You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Settings are no longer compiled in, only loaded during runtime
- Settings can be changed dynamically (with set/2 and add/2)
- Any setting can be omitted, because everything has a default value
- Default settings are installed to /etc/plwm/config.pl
- reload_config/0 re-reads config file
- dump_settings/1 dumps current setting values to a file
- Config files must NOT use module declarations (settings are in the global namespace)
- bar_class/2 became bar_classes/1 taking a list (all settings must have arity 1 and be deterministic)
Copy file name to clipboardExpand all lines: README.md
+34-22Lines changed: 34 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,24 +181,16 @@ then you'll have a triple stack layout where your windows will be evenly spread
181
181
182
182
## Configuration
183
183
184
-
Configuration is done by modifying [config.pl](src/config.pl)then recompiling with `make && sudo make install`.
184
+
`sudo make install` installs the [default configuration](config/config.pl)to `/etc/plwm/config.pl`. This file can be copied to user config directories.
185
185
186
-
plwm will also attempt reading configuration when it starts from the first file among
186
+
plwm attempts reading configuration when it starts from the first file among
187
187
-`$XDG_CONFIG_HOME/plwm/config.pl`
188
188
-`$HOME/.config/plwm/config.pl`
189
189
-`/etc/plwm/config.pl`
190
190
191
-
if any exists, so users don't have to recompile each time if they don't wish to. Any values read from the runtime config will override the compiled in settings.
192
-
193
191
A custom path can be specified with the `-c` flag.
194
192
195
-
**Attention:** the module name in the runtime config must be `runtime_config`!
196
-
197
-
You can run:
198
-
199
-
`$ make mkconfig`
200
-
201
-
which takes `src/config.pl` and generates the runtime config from it. Then keep modifying the latter while leaving the former in the default state. Or you can use the source one as a stable config and the runtime one for experimental overrides...
193
+
**Note:** a reinstall will overwrite `/etc/plwm/config.pl`, however a backup is always created if there is any difference.
202
194
203
195
While cooking your config, you can use the `-C` flag to quickly and easily check its validity.
204
196
@@ -223,7 +215,7 @@ While cooking your config, you can use the `-C` flag to quickly and easily check
223
215
|`ws_format`| string with a \~w **or**<br/>string with a \~d followed by a \~w<br>**Default:** "\~w" | Format of empty workspaces on bars (~d = index, ~w = name) |
224
216
|`ws_format_occupied`| string with a \~w **or**<br/>string with a \~d followed by a \~w<br>**Default:** "▘\~w" | Format of occupied workspaces on bars |
225
217
|`layout_default_overrides`| list of (Monitor, Workspace -> Nmaster, Mfact, Layout)<br>**Default:**[]| Overrides of the 3 values to specific monitors and/or workspaces (explained [here](#layout-overrides)) |
226
-
|`bar_class`| the two strings from bar's WM_CLASS,<br/>query with [xprop(1)](https://linux.die.net/man/1/xprop)<br>**Default:** "polybar", "Polybar" | Space will be reserved for matching windows and they cannot be focused, resized, etc. |
218
+
|`bar_classes`| list of string pairs from bar's WM_CLASS,<br/>query with [xprop(1)](https://linux.die.net/man/1/xprop)<br>**Default:**["polybar"-"Polybar"]| Space will be reserved for matching windows and they cannot be focused, resized, etc. |
|`fifo_enabled`| true or false<br>**Default:** false | Whether to spawn a command FIFO<br>(explained [here](#scriptability)) |
229
221
|`fifo_path`| string<br>**Default:** "/tmp/plwm_fifo" | Path of command FIFO |
@@ -238,13 +230,31 @@ While cooking your config, you can use the `-C` flag to quickly and easily check
238
230
|`rules`| list of (Name, Class, Title -> Monitor, Workspace, Mode)<br>**Default:**[]| Auto place and configure matching windows (explained [here](#rules)) |
239
231
|`hooks`| list of (Event -> Action)<br>**Default:**`[start -> writeln("plwm starting"), quit -> writeln("plwm quitting")]`| Run custom logic on certain events (explained [here](#hooks)) |
240
232
241
-
**Notes**
233
+
**Tips**
242
234
243
-
In `keymaps/1`, the callback predicates can be arbitrary shell commands using `shellcmd/1`, even whole commandlines (some examples are included in the [default config](src/config.pl)).
235
+
* You can safely remove any setting from your config file, plwm will use the default value for those.
236
+
* In `keymaps/1`, the callback predicates can be arbitrary shell commands using `shellcmd/1`, even whole commandlines (some examples are included in the [default config](config/config.pl)).
237
+
* If you wish to stick to default keymaps mostly, with only a few changes and feel redundant to list the whole table in your config, you can simply omit the `keymaps/1` setting and add your changes as a `start` hook like this:
238
+
239
+
```Prolog
240
+
hooks([
241
+
start -> (
242
+
add(keymaps, super + g -> shellcmd("gcolor2")), % add new
243
+
add(keymaps, super + l -> switch_workspace(next)), % overwrite existing
244
+
add(keymaps, super + f -> none) % remove existing
245
+
)
246
+
]).
247
+
```
248
+
249
+
**Changing settings during runtime**
250
+
251
+
*`set/2` and `add/2` can be used to overwrite or append to existing settings, respectively. You can invoke them via a keymap, the [command fifo](#scriptability) or the [command menu](#menus).
252
+
* The whole configuration file can be reloaded by calling `reload_config/0`.
253
+
* You can use `dump_settings/1` to dump all current settings to a file.
244
254
245
255
## External bars
246
256
247
-
First, you must specify `bar_class/2` based on the WM_CLASS properties of your bars, which you can find out using [xprop(1)](https://linux.die.net/man/1/xprop). Then you can both:
257
+
First, you must specify `bar_classes/1` based on the WM_CLASS properties of your bars, which you can find out using [xprop(1)](https://linux.die.net/man/1/xprop). Then you can both:
248
258
* manually start/close bars while plwm is already running
249
259
* automatically start bars using `hooks/1` and its `start` event in the config
250
260
@@ -275,7 +285,7 @@ alt + b -> shellcmd("pkill -fx 'polybar top' || polybar top"),
275
285
alt + shift + b -> shellcmd("pkill -fx 'polybar bot' || polybar bot")
276
286
```
277
287
278
-
**Note:** if you are using polybar, **do not enable** its `override-redirect = true` setting (it can even crash plwm in some cases)! Reasoning: plwm itself handles all bars (anything that matches `bar_class`, not just polybar) the intended way: bars cannot be focused, grabbed, moved or resized; tiling windows will never cover them (but you can drag floating windows above them); fullscreen windows will always cover them.
288
+
**Note:** if you are using polybar, **do not enable** its `override-redirect = true` setting (it can even crash plwm in some cases)! Reasoning: plwm itself handles all bars (anything that matches `bar_classes`, not just polybar) the intended way: bars cannot be focused, grabbed, moved or resized; tiling windows will never cover them (but you can drag floating windows above them); fullscreen windows will always cover them.
279
289
280
290
## Multi-monitor
281
291
@@ -538,9 +548,9 @@ For known problems, see [the Issues with bug labels](https://github.com/Seeker04
538
548
539
549
First and foremost, if you find any bugs, please [create a GitHub issue](https://github.com/Seeker04/plwm/issues/new), preferably, with all details you can provide. (First, please check if it's not reported already).
540
550
541
-
If you have a feature request, please do the same.
551
+
If you have a feature request or questions, feel free to [open discussions](https://github.com/Seeker04/plwm/discussions).
542
552
543
-
Any code contribution is also welcome. Especially if it solves some known issue. For brand new ideas, I recommend creating an issue first, so we can discuss it.
553
+
Any code contribution is also welcome. Especially if it solves some known issue. For brand new ideas, I recommend creating a discussion first.
544
554
545
555
Please read the [Development Guide](docs/development_guide.md).
Most likely your configuration is faulty. Run `plwm --check`, then you should see the problem.
585
+
Run `plwm --check`, then you should see the problem. Consult the [table here](#configuration) to see the proper type for each setting. E.g. make sure you use double quotes for _strings_ and single quotes for _atoms_.
576
586
577
-
If you don't see a config error, then please report it as an issue. Preferably by attaching any message plwm dumps to stderr or to its logfile with `-l`.
587
+
If you don't see any error, then please report it as an issueby attaching your config and any message plwm dumps to stderr or to its logfile with `-l`.
578
588
579
589
**Something is missing...**
580
590
581
-
plwm is minimal in the sense that it doesn't try to solve problems outside of a window manager's domain, especially if they are easily served by other programs (see [here](https://en.wikipedia.org/wiki/Unix_philosophy)):
591
+
tl;dr plwm is a window manager, not a full-fledged desktop environment.
592
+
593
+
plwm is minimal in the sense that it doesn't try to solve problems outside of a wm's domain, especially if they are easily served by other programs (see [here](https://en.wikipedia.org/wiki/Unix_philosophy)):
582
594
583
595
* Don't want a status bar? You're set. Want one (or more)? Here are a few: [polybar](https://polybar.github.io/), [lemonbar](https://github.com/LemonBoy/bar), [xmobar](https://codeberg.org/xmobar/xmobar)
584
596
* Want transparent windows or other effects? Use a compositor like [picom](https://wiki.archlinux.org/title/Picom)
0 commit comments