Keybinds go in a "keybinds" block and follow the format
<command> <modifiers> <keysym> <options>
But there's also a special "tag_bind" command that just takes modifiers
and one of set_output_tags, set_window_tags, toggle_output_tags, and
toggle_window_tags. It will automatically be used to loop through the
1-9 keys on tags 1<<0 to 1<<9, however, you can still implement those
commands individually if you want.
logWarnInvalidNodeArg() can be used for when a node has an invalid type
for its argument.
logDebugSettingNode() prints the configuration name and the value being
set.
Config goes in $XDG_CONFIG_HOME/beansprout/config.kdl or
$HOME/.config/beansprout/config.kdl
Config is in the kdl format. Right now, the supported options are
```zig
/// Width of window borders in pixels
border_width: u8 = 2,
/// Color of focused window's border in 0xRRGGBBAA or 0xRRGGBB form
border_color_focused: RiverColor = utils.parseRgbaComptime("0x89b4fa"),
/// Color of uffocused windows' borders in 0xRRGGBBAA or 0xRRGGBB form
border_color_unfocused: RiverColor = utils.parseRgbaComptime("0x1e1e2e"),
/// Where a new window should attach, top or bottom of the stack
attach_mode: AttachMode = .top,
/// Should focus change when the cursor moves onto a new window
focus_follows_pointer: bool = true,
/// Should the pointer warp to the center of newly-focused windows
pointer_warp_on_focus_change: bool = true,
```
I plan to add Keybinds shortly. If parsing the configuration fails,
the default config will be used and the WM will continue loading.
I added 7 new Commands to XkbKeybinds.Commands, though 3 of them don't
work yet.
The new commands that *work* are
+ set_output_tags: u32,
+ set_window_tags: u32,
+ toggle_output_tags: u32,
+ toggle_window_tags: u32,
They each take a 32-bit value as a bitmask to set (or toggle) tags.
The 3 unimplemented commands are
+ spawn_tagmask: u32,
+ focus_previous_tags,
+ send_to_previous_tags,
and they will all panic if they're used.
For now, default keybinds are hardcoded as part of WindowManager's
initializing in the first \`manage_start\` event. Multi-output support
is not added yet, so this will still all happen on a single Output.
Right now, essentially nothing has changed, there is still no multi-
output support and not even a way to change/set/toggle/view/etc. tags.
However, tags *are* implemented at a core level. Next step is to add
keybinds for the various tag actions.
After that, I will work on multi-output support.
Right now, colors are hardcoded in the Config in main.zig.
This commit also adds a couple of new keybinds for navigating between
windows. All keybinds are hardcoded as well right now.
Right now, colors are hardcoded in the Config in main.zig.
This commit also adds a couple of new keybinds for navigating between
windows. All keybinds are hardcoded as well right now.
For now, it's hardcoded to be a right-primary/stack layout (similar to
dwm but with the primary on the right) with the primary window getting
55% of the width of the screen.