Giter VIP home page Giter VIP logo

woomer's Introduction

Woomer - Boomer but for wayland

Zoomer application for wayland (linux) inspired by tsoding's boomer written in rust

demo of woomer

Controls

Control Description
Right Click or ESC Quit the application.
R Reload the shaders (only for Developer mode)
Hold CTRL Enable flashlight effect.
Drag with left mouse button Move the image around.
Scroll wheel Zoom in/out.
Ctrl + SHIFT + Scroll wheel Change the radius of the flashlight.

Building

Dependencies:

  • wayland-client
  • cmake
  • rust
  • pkg-config
  • clang (for compiling raylib)
  • libclang (for bindgen)

Like with any other rust program you can run:

cargo b

However if you want hot reloading of the spotlight shader you can add the dev feature:

cargo b -F dev

Installing using the Nix flake

You can also install woomer using the nix flake:

# flake.nix
{
  inputs = {
    woomer.url = "github:coffeeispower/woomer";
    # .....
  }
  # ....
}

After that, you can just install it

{inputs, system, ...}:
{
  home.packages = [
    inputs.woomer.packages.${system}.default
    # ....
  ];
  # ....
}

woomer's People

Contributors

coffeeispower avatar jacekpoz avatar iynaix avatar

Stargazers

Gio Rice avatar Štěpán Žák avatar  avatar sioodmy avatar  avatar chokerman avatar Mori Zen avatar  avatar xStormy avatar  avatar Sergey A. avatar Andrew Prentice avatar  avatar Nasser Alshammari avatar  avatar rei avatar  avatar HatsuSixty avatar Shoumodip Kar avatar Ivan Ramos avatar  avatar Oleg Pykhalov avatar Philippe Pittoli avatar  avatar  avatar MarcosA avatar Cal avatar  avatar  avatar Syed Ahkam avatar Zielino avatar Zeljko Stevanovic avatar Bintang avatar Emad Deve avatar Mateus Zancho Neto avatar Tyler D avatar Yago Maia avatar Clysman avatar Andrejs Agejevs avatar Sepand Sadraei Javahery avatar  avatar Alireza |S.N| avatar pixelsuft‮ avatar Baris avatar Anderson Santos avatar h4rl avatar CrazyForeverDev avatar Sergey Kacheev avatar AYOUB EL MHAMDI avatar Himadri Bhattacharjee avatar Soc Virnyl S. Estela avatar Almaz avatar rv avatar  avatar Simone avatar mazin avatar João Ribeiro avatar sxrose avatar Soumyadip Moni avatar James Tan avatar Alexandr Iurchenko avatar Ansh Dadwal avatar Dave avatar Alexey Kutepov avatar Tulili avatar Lucas Tavares avatar Aakash Sen Sharma avatar  avatar  avatar Diogo avatar

Watchers

Lucian avatar White Morpheus avatar  avatar

woomer's Issues

Occasional crashes on Hyprland on NixOS

not sure what causes this, it doesn't happen every time

hyprland 553232a3e4c112c8511309e6b685cb614895e714
nixos 5710852ba686cc1fd0d3b8e22b3117d43ba374c2
woomer 2d2c607bc44cbcb55ccebf52dfe96fabdd15a9bb

output:

~ ❯ woomer
INFO: Initializing raylib 5.0
INFO: Platform backend: DESKTOP (GLFW)
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
WARNING: SYSTEM: Closest fullscreen videomode: 1920 x 1280
INFO: DISPLAY: Trying to enable VSYNC
INFO: DISPLAY: Device initialized successfully
INFO:     > Display size: 1920 x 1280
INFO:     > Screen size:  1920 x 1280
INFO:     > Render size:  1920 x 1280
INFO:     > Viewport offsets: 0, 0
INFO: GLAD: OpenGL extensions loaded successfully
INFO: GL: Supported extensions count: 230
INFO: GL: OpenGL device information:
INFO:     > Vendor:   Intel
INFO:     > Renderer: Mesa Intel(R) Xe Graphics (TGL GT2)
INFO:     > Version:  4.6 (Core Profile) Mesa 24.0.7
INFO:     > GLSL:     4.60
INFO: GL: VAO extension detected, VAO functions loaded successfully
INFO: GL: NPOT textures extension detected, full NPOT textures supported
INFO: GL: DXT compressed textures supported
INFO: GL: ETC2/EAC compressed textures supported
INFO: PLATFORM: DESKTOP (GLFW): Initialized successfully
INFO: TEXTURE: [ID 1] Texture loaded successfully (1x1 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 1] Default texture loaded successfully
INFO: SHADER: [ID 1] Vertex shader compiled successfully
INFO: SHADER: [ID 2] Fragment shader compiled successfully
INFO: SHADER: [ID 3] Program shader loaded successfully
INFO: SHADER: [ID 3] Default shader loaded successfully
INFO: RLGL: Render batch vertex buffers loaded successfully in RAM (CPU)
INFO: RLGL: Render batch vertex buffers loaded successfully in VRAM (GPU)
INFO: RLGL: Default OpenGL state initialized successfully
INFO: TEXTURE: [ID 2] Texture loaded successfully (128x128 | GRAY_ALPHA | 1 mipmaps)
INFO: FONT: Default font loaded successfully (224 glyphs)
INFO: TEXTURE: [ID 3] Texture loaded successfully (1920x1280 | R8G8B8A8 | 1 mipmaps)
INFO: SHADER: [ID 4] Fragment shader compiled successfully
INFO: SHADER: [ID 5] Program shader loaded successfully
Getting shader location "spotlightTint" 13
Getting shader location "cursorPosition" 14
Getting shader location "spotlightRadiusMultiplier" 25
listener function for opcode 1 of wl_data_offer is NULL
zsh: IOT instruction (core dumped)  woomer

Unable to run

❯ cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.66s
     Running `target/debug/woomer`
INFO: Initializing raylib 5.0
INFO: Platform backend: DESKTOP (GLFW)
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
xkbcommon: ERROR: couldn't find a Compose file for locale "en_IN" (mapped to "en_IN.ISO8859-1")
WARNING: GLFW: Error: 65544 Description: Wayland: Failed to create XKB compose table
WARNING: SYSTEM: Closest fullscreen videomode: 1920 x 1080
FATAL: PLATFORM: Failed to initialize graphics device

My wayland compositor is sway.

GLFW can't load `libwayland-client` in the devShell

clone woomer, nix develop and cargo run

this is the output (at least for me):

     Running `target/debug/woomer`
INFO: Initializing raylib 5.0
INFO: Platform backend: DESKTOP (GLFW)
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
WARNING: GLFW: Error: 65544 Description: Wayland: Failed to load libwayland-client
WARNING: GLFW: Failed to initialize GLFW
Segmentation fault (core dumped)

you most likely installed something system wide and forgot to add it to the shell

sorry for making so many issues, I'm a bit tired for doing these myself right now

I'll look into them later (tomorrow or on wednesday) if they're not fixed yet though

Add support for Windows and X11

Apart from wayland I also wanted to try to add support for Windows and X11, which is not difficult at all because raylib is already cross platform and the only thing that changes is the screenshotting code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.