Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,52 @@
<img src=logo.svg align=right>

# worm

Worm is a tiny, dynamic, tag-based window manager written in the Nim language.
It supports both a floating mode and master-stack tiling with gaps and struts.
Check out the screenshots on the wiki for some examples of how it looks.

## build / install
Install Nim >= 1.4.0, for example through Choosenim. Clone this directory and run

Install Nim >= 1.4.0, for example through Choosenim. Clone this repo and run

```
$ nimble build -d:release --gc:arc
```
And you should end up with two binaries; strip and use!

Alternatively, for users of the Arch Linux distribution, you can use the AUR package worm-git.
Alternatively, for users using Arch, you can use the AUR package worm-git.

```
$ yay -Sy worm-git
```

## configuration

### autostart

Worm will try to execute the file `~/.config/worm/rc` on startup.
Simply create it as a shell-script to execute your favorite applications with
worm.
(don't forget to make it executable).

An example can be found [here](/examples/rc).

### keybindings

Worm does not have a built-in keyboard mapper, so you should use something like
[sxhkd](https://github.com/baskerville/sxhkd).
Please read [the doc](docs/wormc.md) to understand how wormc works before
writing your own sxhkdrc.

An example sxhkdrc can be found [here](/examples/sxhkdrc).

## license

Licensed under the MIT license. See the LICENSE file for more info.

## credits

Thanks to [phisch](https://github.com/phisch) for making the logo!
Thanks to everyone else that's opened an issue, a PR, or just tried out worm.

Thanks to everyone else that's opened an issue, a PR, or just tried out worm.
4 changes: 2 additions & 2 deletions docs/wormc.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Clears all other tags and enables given tag. Example: `wormc switch-tag 5`
### `layout(string)`
Changes layout. `floating` for floating, `tiling` for tiling, otherwise wormc exits. Eg `wormc layout tiling`
### `struts(uint top, uint bottom, uint left, uint right)`
Sets the struts, also known as the 'outer margins. These are used when maximizing windows (currently unimplemented, sorry!) and while tiling. Example: `wormc 10 50 10 10`.
Sets the struts, also known as the 'outer margins. These are used when maximizing windows (currently unimplemented, sorry!) and while tiling. Example: `wormc struts 10 50 10 10`.
### `move-tag(uint tag, window id)`
Clears the tags of the provided window and turns on the given tag; for example `wormc move-tag 5 123456789`.
### `move-active-tag(uint tag)`
Expand All @@ -61,4 +61,4 @@ Like `master`, but uses the active client. Example: `wormc master-active`
### `float(window id)`
Change the mode of the client indicated by the provided window ID to floating. In a tiling layout, this would indicate that the provided window should not be tiled. TODO: have a way to reverse this affect. As an example: `wormc float 1234567890`
### `float-active()`
Like float, but floats the active client; eg `wormc float-active`.
Like float, but floats the active client; eg `wormc float-active`.
21 changes: 21 additions & 0 deletions examples/rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

exec nitrogen --restore &

exec polybar top -q -c ~/.config/worm/polybar/config.ini &

exec mpd &

exec sxhkd -c ~/.config/worm/sxhkdrc &

wormc border-width 6

# These add support for pywal
# wormc active-border-pixel $((16$(sed -n '4p' .cache/wal/colors)))
# wormc inactive-border-pixel $((16$(sed -n '5p' .cache/wal/colors)))
# wormc background-pixel $((16$(sed -n '6p' .cache/wal/colors)))

wormc layout tiling
wormc struts 75 20 20 20
wormc gaps 20
wormc frame-height 0
71 changes: 71 additions & 0 deletions examples/sxhkdrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Rofi
super + {p,w,x,s}
~/.config/qtile/rofi/bin/{launcher,windows,powermenu,screenshot}

# Launch Apps
super + shift + {f,w,e}
{kitty ranger,firefox,kitty nvim}

super + Return
kitty

# Take a screenshot
Print
scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'

# Take a screenshot in 5 second
alt + Print
scrot -d 5 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'

# Brighness control
XF86MonBrightnessUp
xbacklight -inc 10

XF86MonBrightnessDown
xbacklight -dec 10

# Volume control
XF86AudioRaiseVolume
amixer set Master 5%+

XF86AudioLowerVolume
amixer set Master 5%-

XF86AudioMute
amixer set Master toggle

# Restart worm
super + ctrl + r
worm

# Quit worm
ctrl + alt + q
pkill worm

# Close app
super + q
wormc close-active-client

# Maximize app
super + f
wormc maximize-active-client

# Switch active tag
super + {1,2,3,4,5,6,7,8,9}
wormc switch-tag {1,2,3,4,5,6,7,8,9}

# Switch tag
super + shift + {1,2,3,4,5,6,7,8,9}
wormc move-active-tag {1,2,3,4,5,6,7,8,9}

# Set master windows
super + m
wormc master-active

# Float a window
super + shift + space
wormc float-active

# Pywal apply
super + ctrl + w
~/.config/worm/pywal.sh