1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#+TITLE: YATwm
#+OPTIONS: \n:t
* This config is best read in emacs!
* Disclaimer: This is still very much in beta
This only just works, multiple monitors aren't supported and floating windows cannot move and there is no resizing. Many features are just hacked together and are likely to break. However, it is just about usable so if you really want to try then go for it! (feel free to make an issue if you have any questions).
* Usage instructions
** Installation
*** Pre reqs
- ~Xlib~ and ~g++~ and ~libnotify~ to build the program
- ~Xephyr~ for the test script
- ~rofi~, ~alacritty~, ~picom~, ~feh~, ~polybar~, ~qutebrowser~ and ~i3lock~ for the default config
- The current default config is currently just the configuration that I want to use (this will likely change)
*** Installing and removing
- ~make i~ or ~make install~ to install
- ~make r~ or ~make remove~ to remove
- ~./test~ to test
** Config
You can configure YATwm with the config file in ~$HOME/.config/YATwm/config.toml~. I have provided an example config file in this directory that has all the variables set to their defaults.
It should alert you with a notification if you have an error, and put the error your log file. It will just use default values if you didn't provide them or provided invalid values (apart from keybinds and startupBash entries, which will just be skipped if invalid (but defaults will be used if the whole array is missing).
*** Startup
Add a bash command to the ~startupBash~ string array in your config and it will execute on startup.
*** General
You can change either the inner gaps (padding around each window - so double it for space between windows), or the outer gaps (padding around the display - add to inner gaps to get space between window and screen edges).
They can be changed with the integers ~gaps~ and ~outerGaps~ in the config file.
YATwm also keeps a log file, the location of this file can be changed with the string ~logFile~.
*** Workspaces
You can change the number of workspaces by editing ~numWS~ in the config file (this will likely change), and the names by editing ~workspaceNames~. You can think of workspaces as virtual desktops. You can change the preference of workspaces by editing the ~screenPreferences~ array. It orders the screens with 0 being the first monitor and they go up from there. The number coming first for each workspace will be the highest priority and other ones will be used if that monitor is not detected. All preference arrays should end in 0. You can use maxMonitors to set how many is the max amount of monitors you would have plugged in (this will likely change).
*** Keybinds
Current keybinds (these can all be edited):
- ~mod + e~ : exit
- ~mod + t~ : change next tile direction
- ~mod + q~ : quit focused window
- ~mod + shift + r~ : reload WM (rechecks monitors)
- ~mod + direction~ : change focus in direction
- ~mod + shift + direction~ : move window in direction
- ~mod + enter~ : alacritty
- ~mod + d~ : rofi
- ~mod + c~ : firefox
- ~mod + x~ : lock
- ~mod + shift + x~ : lock and sleep
- ~mod + p~ : log testing stuff
- ~mod + (num)~ : switch to workspace (num) - currently only for 1-10 but you can add more
- ~mod + shift + (num)~ : move window to workspace (num) - currently only for 1-10 but you can add more
(mod is super, and the direction keys are h, j, k, l - left, down, up, right respectively like vim)
You can use the variable ~swapSuperAlt~ to make ~mod~ act as ~alt~ and ~alt~ act as ~mod~.
To add new keybinds create a new entry in the Keybinds.key array:
#+begin_src
[[Keybinds.key]]
bind = "bind"
func = "func"
args = args
#+end_src
Args can be either a string or a number, directions are strings.
e.g.
#+begin_src
[[Keybinds.key]]
bind = "mod+shift+j"
func = "wMove"
args = "Down"
#+end_src
Commands are executed going down the list and multiple commands with the same keybind and modifiers will all be executed
* Credits
Catwm (https://github.com/pyknite/catwm)
basic_wm (https://github.com/jichu4n/basic_wm)
|