snootforge

chee/wm

x11 window manager written in javascript because

wm

window manager written in javascript

sure, ~~you sometimes have to Mod4+click a window to get it to focus~~

~~and~~ it doesn’t do (real) tiling

and the code is all over the place

and ~~sometimes you have to switch to a tty to tell it to refocus the root window~~

but every keybinding is bound to just a program, just any executable file in PATH be it firefox or wireshark or its own internal programs

here’s an example of a ~/.wmrc:

  1. [keybindings]
  2. M-return = termite
  3. M-A-e = rofi-emoji
  4. M-A-p = rofi-pass
  5. M-space = rofi -show drun -display-drun '' -font 'source code pro 20' -separator-style 'none'
  6. XF86AudioLowerVolume = ponymix decrease 10 -N
  7. XF86AudioRaiseVolume = ponymix increase 10 -N
  8. # window move workspaces
  9. M-S-1 = window workspace 1
  10. M-S-2 = window workspace 2
  11. M-S-3 = window workspace 3
  12. M-S-4 = window workspace 4
  13. M-S-5 = window workspace 5
  14. M-S-6 = window workspace 6
  15. M-S-7 = window workspace 7
  16. M-S-8 = window workspace 8
  17. M-S-9 = window workspace 9
  18. M-S-0 = window workspace 10
  19. M-S-minus = window workspace 11
  20. M-S-equal = window workspace 12
  21. # workspace switch
  22. M-1 = workspace switch 1
  23. M-2 = workspace switch 2
  24. M-3 = workspace switch 3
  25. M-4 = workspace switch 4
  26. M-5 = workspace switch 5
  27. M-6 = workspace switch 6
  28. M-7 = workspace switch 7
  29. M-8 = workspace switch 8
  30. M-9 = workspace switch 9
  31. M-0 = workspace switch 10
  32. M-minus = workspace switch 11
  33. M-equal = workspace switch 12
  34. # window resize
  35. M-A-h = window resize x-10
  36. M-A-j = window resize y+10
  37. M-A-k = window resize y-10
  38. M-A-l = window resize x+10
  39. # window move
  40. M-C-h = window move x-10
  41. M-C-j = window move y+10
  42. M-C-k = window move y-10
  43. M-C-l = window move x+10
  44. # window tile
  45. M-A-comma = window tile left
  46. M-A-period = window tile right
  47. M-A-f = window tile full
  48. M-A-q = window tile top-left
  49. M-A-w = window tile top-right
  50. M-A-a = window tile bottom-left
  51. M-A-s = window tile bottom-right
  52. # window misc
  53. M-period = window toggle-pinning
  54. [settings]
  55. workspaces = 10

now you notice window workspace 1 and workspace switch 1 etc

those are just commands as well that live in the wm/bin directory, which is prepended to PATH before keybound commands are executed

and all those little programs do is write to the socket= living at /tmp/wm, which the window manager is listening on and accepts commands to

keybinding format

modifier keys are uppercase:

all letters are lower case. special keys available so far are space, return, period and comma and tab. also supports media keys (play, next, prev, kbd brightness (up|down), brightness).