A floating, tag-based window manager written in Rust

Related tags

GUI worm
Overview

worm

worm is a floating, tag-based window manager for X11. It is written in the Rust programming language, using the X11RB library.

Install

cargo build --release In the target/release directory you should find two binaries, worm and wormc. Put them somewhere in your path, and then launch as usual - whether with a display manager or via startx (~/.xinitrc).

Screenshot

Contribute

Use it! Spread the word! Report issues! Submit pull requests!

Comments
  • Is quick-tap to initiate window grab intended?

    Is quick-tap to initiate window grab intended?

    One thing that's been bugging me since I've started using Worm as my primary WM is occasionally when I click something on a window, it starts to drag the window around.

    I eventually narrowed it down to specifically when I do a rapid single-click without moving my pointer, and after a bit of digging found the code that causes it:

    https://github.com/codic12/worm/blob/76389eec58cb1490e0702e89680ff1e370849ce8/src/events/buttonpress.nim#L76-L77

    Is this intended? If so, would it be possible to gate it behind a setting somewhere?

    I've played with deleting the lines of code and it just makes using the WM feel way less "glitchy", as with it included it's far too easy for me to accidentally trigger a drag.

    opened by lambdadog 30
  • Feature Requests

    Feature Requests

    1. Allow the user to change the mouse mod key used to resize/move windows (similar to bspwm's bspc config pointer_modifier)
    2. Focus windows when hovering over them (similar to bspwm's bspc config focus_follows_pointer)
    3. Cycle through windows using something like Alt + Tab
    opened by is0n 16
  • unfloat

    unfloat

    When I tried to take a float object (window) I can't make it static again

    I'm sure its a user error.

    here is my sxhkdrc file.

    Restart worm

    super + ctrl + r worm

    Open terminal kitty

    super + Return kitty

    #ctrl + space

    ulauncher &

    super + d ulauncher &

    super + b brave &

    Quit worm

    ctrl + alt + q pkill worm

    Close app

    super + q wormc close-active-client

    Maximize app

    super + f wormc maximize-active-client

    Minimize app

    super + h wormc minimize-active-client

    Tags

    super + {_, shift + } {1-9} wormc {switch,move-active}-tag {1-9}

    Set master windows

    super + m wormc master-active

    Float a window

    super + shift + space wormc float-active

    opened by nixfreak 9
  • More robust button rendering/styling

    More robust button rendering/styling

    For users largely using worm as a floating WM like myself, the button styling and rendering are okay, but not great. Typically I'd like my buttons to change on hover (to indicate that if I click, I will be clicking them and not the space surrounding them) and with everything else having active and inactive coloration, it'd be nice if the buttons could have the same. With the default config's coloration, for example, a black button disappears on a foreground window but looks perfect on a background window.

    Some thought needs to be put into how to achieve this however -- ideally you could just give SVG elements a class like worm-fill or worm-stroke and worm could change their colors dynamically, but looking at pixie it doesn't look like this kind of behavior is exposed in any way.

    It's still probably technically doable -- just separate out a codepath for SVG files, parse the XML, find all elements with class worm-{fill,stroke}, and set their fill or stroke value or whatever the case may be to the selected color, then render back to text and pass to decodeSvg -- but it wouldn't be particularly clean.

    Perhaps worth looking into upstream contributions to pixie's SVG support? SVGs in the browser support styling, with CSS being able to set certain values (including fill and stroke), but since Pixie isn't a browser it does seem like there possibly ought to be a way to pass styles in when rendering an SVG that's not CSS.

    opened by lambdadog 7
  • Delete the commit that introduced target folder

    Delete the commit that introduced target folder

    https://github.com/codic12/worm/commit/13cbcf96b8de25eb77db6e8e1e03c83f20a8697a

    You can use an interactive rebase to remove target folder from repo.

    Or use the following command in project root.

    git filter-branch --tree-filter 'rm -f target' HEAD
    

    Do note that this will change commit hashes and you'll need to force push once ( git push -f ), but I don't see much issue in that since there aren't any public forks.

    Requesting this since the target files are still in git history and that pulls up the size when cloning.

    opened by flyingcakes85 7
  • Fix GTK drag & drop and xprop

    Fix GTK drag & drop and xprop

    Closes #52.

    Turns out that the section I found in i3's source code when first diagnosing the issue was exactly what I needed.

    Also, it turns out xprop was also broken by WM_STATE not being set! Go figure.

    It's not exactly as clean as the rest of your XChangeProperty calls since WM_STATE was neither in netAtoms or ipcAtoms, but I wasn't sure where I should put a new atom so I just interned it inline.

    opened by lambdadog 6
  • Some cleanup

    Some cleanup

    Hi, just found about this project and I really like it :100:. I was skimming through the code and noticed several simple things that could be improved. No new functionality, just some cleaner code.

    Feel free to nitpick stylistic choices. Thanks for the awesome project!

    opened by hochata 5
  • Add active/inactive variants of `{close,maximize,minimize}-path`

    Add active/inactive variants of `{close,maximize,minimize}-path`

    {close,maximize,minimize}-path->{close,maximize,minimize}-{active,inactive}-path

    I chose to go ahead and set up a ButtonState enum and change the config options to enum indexed arrays, since there's discussion in #57 about extending the possible states further.

    Note that while I haven't implemented it in this PR in the interest of doing one thing at a time, it may be reasonable to get rid of ButtonState and instead have just a FocusState (or focused boolean value, if you're not concerned about the type system insurance from using a dedicated enum I suppose) on each client and moving every active/inactive switched value to be an array[FocusState, t] where t is their type. Then when adding hover states you could just have the button paths' config types be array[FocusState, array[HoverState, string]].

    opened by lambdadog 4
  • Not able to compile

    Not able to compile

    Sorry if there is any mistake on my side, but I can't compile worm and it shows an error while doing it.

    Here is the full output when running nimble build -d:release --gc:arc:

      Verifying dependencies for [email protected]
          Info: Dependency on [email protected] version already satisfied
      Verifying dependencies for [email protected]
       Building worm/wormc using c backend
       Building worm/worm using c backend
    /home/wc/.cache/nim/worm_r/@mworm.nim.c: In function ‘getProperty__9aiI5srh3lf4yinTF7HA9aGQ’:
    /home/wc/.cache/nim/worm_r/@mworm.nim.c:3022:26: error: incompatible types when assigning to type ‘tyObject_Option__hcmjwL9c5ECYpHnVevXHwEQ’ from type ‘tyObject_Option__9bcZreTqxpOXg5u4xcKsUEw’
     3022 |                 result = colontmpD__2;
          |                          ^~~~~~~~~~~~
    /home/wc/.cache/nim/worm_r/@mworm.nim.c: In function ‘handleUnmapNotify__IBNx9c2pqwde9cI9bE9afvcRpw’:
    /home/wc/.cache/nim/worm_r/@mworm.nim.c:4423:27: error: incompatible types when assigning to type ‘tyObject_Option__hcmjwL9c5ECYpHnVevXHwEQ’ from type ‘tyObject_Option__9bcZreTqxpOXg5u4xcKsUEw’
     4423 |         (*self).focused = T12_;
          |                           ^~~~
    /home/wc/.cache/nim/worm_r/@mworm.nim.c: In function ‘handleDestroyNotify__UtpRh9a9bdEb3vV3vfdWHAsw’:
    /home/wc/.cache/nim/worm_r/@mworm.nim.c:4509:27: error: incompatible types when assigning to type ‘tyObject_Option__hcmjwL9c5ECYpHnVevXHwEQ’ from type ‘tyObject_Option__9bcZreTqxpOXg5u4xcKsUEw’
     4509 |         (*self).focused = T12_;
          |                           ^~~~
    Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -O3 -fno-strict-aliasing -fno-ident   -I/usr/lib/nim -I/home/wc/tmp/worm/src -o /home/wc/.cache/nim/worm_r/@mworm.nim.c.o /home/wc/.cache/nim/worm_r/@mworm.nim.c' failed with exit code: 1
    
    
           Tip: 5 messages have been suppressed, use --verbose to show them.
         Error: Build failed for package: worm
            ... Execution failed with exit code 1
            ... Command: /usr/bin/nim c --colors:on --noNimblePath -d:release --gc:arc -d:NimblePkgVersion=0.1.0 --path:/home/wc/.nimble/pkgs/x11-1.1 --hints:off -o:/home/wc/tmp/worm/worm /home/wc/tmp/worm/src/worm.nim
    
    opened by WitherCubes 4
  • Tiling layout

    Tiling layout

    Master-stack is a simple algorithm:

    • 1 window takes all of the screen
    • 2 windows, each takes half vertically
    • Else, on the left 1 window (100% height, 50% width) on the right the rest, each having 50% horizontal and some amount of vertical space (which is the same for all on the right)
    opened by codic12 4
  • Worm doesn't start

    Worm doesn't start

    I have tried using git repo and copying over the binaries to /usr/bin/ and chmod +x on both of them.

    I have tried using yay -S worm-git using xessions for sddm and lightdm. When I click on worm in the login manager I can only move the cursor.

    I have setup all the config files: /home/nixfreak/.config/worm ├── polybar │   └── config.ini ├── rc └── sxhkdrc

    I have setup the same config file as in the examples to rc file.

    Nothing works , also I had to remove nim 1.6.1 version and devel because the build using yay wanted to install only 1.4. I nim on a daily basis and nimble.

    I am using an archinux x86-64 Linux chaosArch 5.17.4-arch1-1 #1 SMP PREEMPT Wed, 20 Apr 2022 18:29:28 +0000 x86_64 GNU/Linux I have nimc version Nim Compiler Version 1.6.6 [Linux: amd64] Compiled at 2022-05-05 Copyright (c) 2006-2021 by Andreas Rumpf

    git hash: 0565a70eab02122ce278b98181c7d1170870865c active boot switches: -d:release

    If I could debug this why the executable isn't working I would , just no clue where to start.

    opened by nixfreak 3
  • [Bug] `focus-mode` does not work.

    [Bug] `focus-mode` does not work.

    Documented Behaviour: focus-mode(int)` : Sets the focus mode. 1: is focus-follows-click (like Microsoft Windows). 2: is the traditional X11 focus-follows-mouse.

    Observed Behaviour: wormc focus-mode 2 does not result in activation/focus of inactive client on mouse hover. The same situation is observed in both tile and float modes.

    opened by 2brownc 0
  • [Feature Request] Ability to toggle maximized or minimized state of the active client.

    [Feature Request] Ability to toggle maximized or minimized state of the active client.

    Currently when a client in tile mode is maximized there is no way to minimize it.

    In most window managers pressing the maximize keybind when the active client is maximized results in minimization of the active client.

    A toggle to maximize/minimize the active client would be very convenient.

    opened by 2brownc 3
  • Use of XInternAtoms instead of XInternAtom

    Use of XInternAtoms instead of XInternAtom

    It should be possible to use XInternAtoms function instead of XInternAtom in getNetAtoms() and getNetAtoms() functions from worm/atoms.nim to speed it up.

    opened by adokitkat 1
  • Consider making wormc a thinner client

    Consider making wormc a thinner client

    I imagine this will only ever pop up when developing on worm for most users, but when working on #70 I spent a while attempting to debug why the new config options weren't working, and it was due to my rcfile using my system wormc, rather than ~/devel/worm/wormc.

    That said, it would also be of benefit to reduce down configuration to a "single source of truth" -- currently to add a configuration option you:

    1. add a new IPC atom in src/atoms.nim
    2. add it to the Config type in src/types.nim
    3. implement boilerplate for the option in src/wormc.nim
    4. implement the setter for the option in src/events/clientmessage.nim
    5. and finally, you can actually use the configuration option in your code

    You could get rid of 1 and 3 in a single step (as well as what I mention above, avoiding errors from an easy-to-make mistake) by simply having wormc take its input and send it directly to worm which handles it in its entirety.

    opened by lambdadog 6
  • Use Arrow key to move from a workspace to another

    Use Arrow key to move from a workspace to another

    Example on sxhkdrc:

    super + {Left, Right}
           wormc switch-tag {-1,+1} 
    

    It consists to go to the actualworkspace +1 or -1 (so it depends on on which workspace you are). The same thing with move-active-tag.

    opened by not-NEKO 1
  • Setting button-size larger than value at first render causes clipped image

    Setting button-size larger than value at first render causes clipped image

    It took me a bit to hunt down exactly the circumstances of this bug, but what buttonSize is set to at first render seems to be a "max" for button-size changes without clipping after that.

    Due to this, it's possible to increase button-size from 14 by setting it in your rcfile (which is executed before first render), but any increases at runtime cause the image to be clipped on the right side.

    ex:

    (with button-size set to 20 in rcfile) wormc20

    (after wormc button-size 22 is run) wormc22

    opened by lambdadog 2
Releases(v0.3.1)
  • v0.3.1(May 29, 2022)

    This release does not feature any new features but a new website and an important bugfix which fixes minimize-active-hovered-path ( #80 )

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(May 23, 2022)

    Worm v0.3.0 features many bugfixes, particularly important ones being a fix which made tiling impossible and also one which did not update _NET_CLIENT_LIST upon only having one window, instead early-returning out of the proc. In addition, it features a very important and long awaited feature - you can now set set active, inactive, active + hover, and inactive + hover states for all buttons! Note that the old versions are kept for compatibility and compactness reasons - using them as setters simply sets all of them, so there are no behavioral changes with past configurations. Of course, there are also some nice to have quality of life improvements by our generous contributors.

    Here's Github's changelog (which for whatever reason only includes PRs):

    What's Changed

    • Bump version in worm.nimble by @lambdadog in https://github.com/codic12/worm/pull/50
    • Move --gc:arc to config.nims by @lambdadog in https://github.com/codic12/worm/pull/48
    • Allow setting rcfile path via flag by @lambdadog in https://github.com/codic12/worm/pull/49
    • Fix GTK drag & drop and xprop by @lambdadog in https://github.com/codic12/worm/pull/53
    • Fixup WM_STATE type mismatch by @lambdadog in https://github.com/codic12/worm/pull/59
    • Change defaults and documentation to use AARRGGBB by @lambdadog in https://github.com/codic12/worm/pull/61
    • Quickfix tap grab by @lambdadog in https://github.com/codic12/worm/pull/66
    • Apply tap grab quickfix to titlebar as well by @lambdadog in https://github.com/codic12/worm/pull/67
    • Fix crash when setting text-inactive-pixel in rcfile by @lambdadog in https://github.com/codic12/worm/pull/68
    • Add active/inactive variants of {close,maximize,minimize}-path by @lambdadog in https://github.com/codic12/worm/pull/70
    • Update sxhkdrc by @EdenQwQ in https://github.com/codic12/worm/pull/72

    New Contributors

    • @lambdadog made their first contribution in https://github.com/codic12/worm/pull/50

    Full Changelog: https://github.com/codic12/worm/compare/v0.2.5...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.5(Mar 23, 2022)

    minor release. includes some bugfixes and adds a minimize feature in wormc, along with a button toggle for it. here's github's autogenerated changelog:

    What's Changed

    • Correct install command by @flyingcakes85 in https://github.com/codic12/worm/pull/39
    • Some cleanup by @eqf0 in https://github.com/codic12/worm/pull/40
    • Correct IPC error format introduced by refactor by @eqf0 in https://github.com/codic12/worm/pull/41

    New Contributors

    • @flyingcakes85 made their first contribution in https://github.com/codic12/worm/pull/39
    • @eqf0 made their first contribution in https://github.com/codic12/worm/pull/40

    Full Changelog: https://github.com/codic12/worm/compare/v0.2.0...v0.2.5

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jan 5, 2022)

    Worm v0.2.0 is released. Here's the basic changelog:

    • Tons of bugfixes
    • Code significantly refactored
    • Frame inactive pixel working properly
    • Text pixel split into text active/inactive pixel
    • Better multi-monitor support in floating mode
    • Window rules to disable decorations based on WM_CLASS property
    • Better CSD support. There is still some glitching but you can move windows from the csd titlebar, and resize them without any artifacts. Decorations are disabled but border_width remains. They still work fine with tiling.

    Enjoy! :)

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Dec 13, 2021)

    First release of worm, have at it!

    What's Changed

    • Added a LICENSE file to declutter the README by @CITIZENSIXTYNINE in https://github.com/codic12/worm/pull/6
    • Updates for those who may not be familiar git cloning by @andbenn in https://github.com/codic12/worm/pull/5
    • Update and remove base directory. by @andbenn in https://github.com/codic12/worm/pull/9
    • Rephrasing and removing an /opt reference by @andbenn in https://github.com/codic12/worm/pull/10
    • Add CI by @moson-mo in https://github.com/codic12/worm/pull/13
    • Format LICENSE file by @HeavyRain266 in https://github.com/codic12/worm/pull/15
    • add an example sxhkdrc by @EdenQwQ in https://github.com/codic12/worm/pull/17
    • Enum indexed arrays by @SolitudeSF in https://github.com/codic12/worm/pull/20
    • Add CI by @moson-mo in https://github.com/codic12/worm/pull/22
    • add .desktop file for DM; CI build with different Nim versions by @moson-mo in https://github.com/codic12/worm/pull/24
    • Add examples; make README.md more readable by @EdenQwQ in https://github.com/codic12/worm/pull/28
    • fixed border in rc example by @EdenQwQ in https://github.com/codic12/worm/pull/29
    • Removed a.out & add it to .gitignore by @HeavyRain266 in https://github.com/codic12/worm/pull/33

    New Contributors

    • @CITIZENSIXTYNINE made their first contribution in https://github.com/codic12/worm/pull/6
    • @andbenn made their first contribution in https://github.com/codic12/worm/pull/5
    • @moson-mo made their first contribution in https://github.com/codic12/worm/pull/13
    • @HeavyRain266 made their first contribution in https://github.com/codic12/worm/pull/15
    • @EdenQwQ made their first contribution in https://github.com/codic12/worm/pull/17
    • @SolitudeSF made their first contribution in https://github.com/codic12/worm/pull/20

    Full Changelog: https://github.com/codic12/worm/commits/v0.1.0

    Source code(tar.gz)
    Source code(zip)
Owner
:(){ :|:& };:
null
Generic tiling window manager library in Rust

Pop Tiler Generic tiling window manager library for Rust, using an architecture based on GhostCell. License Licensed under the GNU Lesser General Publ

Pop!_OS 64 Jul 27, 2022
A window manager coded in rust

Tailwin A window manager coded in rust Thanks Victoruler for making the logo under a cc-by licence.

Arthur Melton 3 Jul 27, 2022
A tiling window manager for Windows

komorebi Tiling Window Management for Windows. About komorebi is a tiling window manager that works as an extension to Microsoft's Desktop Window Mana

Jade (جاد) 2.4k Dec 1, 2022
D3D9 Window overlay written in Rust

win-overlay (-rs) DirectX overlay written in Rust for various projects, wanted to easily create overlays across projects so decided to write my own im

Zor 17 Oct 8, 2022
A window swallower for swaywm

swayhide - A window swallower for sway Description swayhide hides the currently active terminal (by moving it to the scratchpad), then it executes the

NomisIV 47 Oct 22, 2022
A Modern, Open Source GTK4 ebook manager powered by Rust.

Bookx An MVP in progress: An ebook reader with .epub support Context menu for each book (delete, rename book, info) On click switch the carousal to th

Anurag Dhadse 11 Nov 18, 2022
A straightforward stateful input manager for the Bevy game engine.

About A simple but robust input-action manager for Bevy: intended to be useful both as a plugin and a helpful library. Inputs from various input sourc

null 191 Dec 2, 2022
A cross-platform Mod Manager for RimWorld intended to work with macOS, linux and Windows

TODOs are available here. Discussions, PRs and Issues are open for anyone who is willing to contribute. rrm Inspired by Spoons rmm. This is a cross-pl

Alejandro Osornio 7 Sep 5, 2022
Experimental package manager/system configurator for system hoppers

mascara An experimental package manager/config initializer tool for system hoppers. mascara.toml [mascara] feature = "Debian" logs = { stdout = "blue"

Ethan Gallucci 1 Apr 15, 2022
An easy to use command line project manager for projects using the ReCT programming language

☢️ A powerful project manager for the ReCT programming language! ☢️ ReCTx makes your projects easier to manage by allowing you to configure everything

Remy 2 Nov 20, 2022
♾️ Fast & Simple AppImage manager

⚠️ Heavily in development (Not working) Leap Fast & Simple AppImage manager What's working Installation (github only, info about app not stored yet) R

lynx 5 Nov 14, 2022
Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust

Relm Asynchronous, GTK+-based, GUI library, inspired by Elm, written in Rust. This library is in beta stage: it has not been thoroughly tested and its

null 2.2k Nov 29, 2022
GUI based tool to sort and categorize images written in Rust

ImageSieve GUI based tool to sort out images based on similarity, categorize them according to their creation date and archive them in a target folder

Florian Fetz 66 Nov 30, 2022
A fast, zbus-based, permissively licensed AT-SPI library written in pure Rust!

AT-SPI for Rust Higher level, asynchronous Rust bindings to AT-SPI2, using zbus. Part of the Odilia screen reader project. Design Fully documented, wi

Odilia 4 Nov 28, 2022
A simple GUI version of the pH calibration tool written in egui, based on the eframe template.

caliphui A simple GUI version of the pH calibration tool written in egui, based on the eframe template. Usage Native binaries are provided under relea

Peter Dunne 0 Dec 29, 2021
Unofficial Linux QQ client, based on GTK4 and libadwaita, developed with Rust and Relm4.

GTK QQ (WIP) Unofficial Linux QQ client, based on GTK4 and libadwaita, developed with Rust and Relm4. Screenshots Light Dark Note The two screenshots

Lomírus 185 Nov 14, 2022
Fuse filesystem that returns symlinks to executables based on the PATH of the requesting process.

Envfs Fuse filesystem that returns symlinks to executables based on the PATH of the requesting process. This is useful to execute shebangs on NixOS th

Jörg Thalheim 80 Nov 28, 2022
Termbox is a library that provides minimalistic API which allows the programmer to write text-based user interfaces.

Termbox is a library that provides minimalistic API which allows the programmer to write text-based user interfaces.

null 1.9k Nov 22, 2022
An idiomatic GUI library inspired by Elm and based on gtk4-rs

An idiomatic GUI library inspired by Elm and based on gtk4-rs. Relm4 is a new version of relm that's built from scratch and is compatible with GTK4 an

Aaron Erhardt 677 Nov 30, 2022