Add support for 'None' modifier for keybinds
This is mostly useful for media and brightness keys, but could be used for other stuff, too.
This commit is contained in:
parent
7f571da187
commit
e29c4d01e1
3 changed files with 23 additions and 12 deletions
20
README.md
20
README.md
|
|
@ -10,20 +10,18 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
||||
These are in rough order of my priority, though no promises I do them in this order.
|
||||
|
||||
- [ ] Support `None` modifier for keybinds (needed for media/brightness keys)
|
||||
- [ ] Support per-host config using properties (maybe also per-output?)
|
||||
- [ ] Add input configuration, i.e. pointer acceleration and that type of thing
|
||||
- [ ] Support a basic bar
|
||||
- [ ] Support starting programs at WM launch
|
||||
- [ ] Support per-host config using properties
|
||||
- [ ] Implement an optional clock bar
|
||||
- [ ] Implement a rivertile clone
|
||||
- [ ] Support overriding config location
|
||||
- [ ] Add support for multimedia/brightness keys (this might not be neccesary)
|
||||
- [ ] Support window rules (float/tags/SSD by app-id/title)
|
||||
- [ ] Support switch handling (e.g. lid close)
|
||||
- [ ] Support keybind modes (e.g. passthrough)
|
||||
- [ ] Support solid `background-color` fallback (no wallpaper)
|
||||
- [ ] Support per-output wallpapers
|
||||
- [ ] Support `focus-follows-cursor` granularity (`normal` vs `always`)
|
||||
- [ ] Support multiple seats
|
||||
- [ ] Support clipping floating windows on edge of/between outputs
|
||||
- [ ] Support keybind modes (e.g. passthrough)
|
||||
- [ ] Support `focus-follows-cursor` granularity (`normal` vs `always`)
|
||||
- [ ] Support solid `background-color` fallback (no wallpaper)
|
||||
- [x] Support changeable primary ratio
|
||||
- [x] Support changeable primary count
|
||||
- [x] Support multiple outputs
|
||||
|
|
@ -31,5 +29,5 @@ These are in rough order of my priority, though no promises I do them in this or
|
|||
- [x] Support wallpapers
|
||||
- [x] Make "orelse return" bits into errors; handle gracefully
|
||||
- [x] Implement runtime log levels
|
||||
- [ ] Switch all structs to idiomatic Zig init/deinit pattern (init returns value, caller decides stack/heap)
|
||||
- I'm not sure I really need this
|
||||
- [x] Add input configuration, i.e. pointer acceleration and that type of thing
|
||||
- [x] Support `None` modifier for keybinds (needed for media/brightness keys)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,17 @@ keybinds {
|
|||
resize_height Mod4+Alt+Shift J 100
|
||||
resize_height Mod4+Alt+Shift K -100
|
||||
resize_width Mod4+Alt+Shift L 100
|
||||
// Media keys (no modifier)
|
||||
spawn None XF86AudioRaiseVolume "~/.config/river/volume-up.sh"
|
||||
spawn None XF86AudioLowerVolume "~/.config/river/volume-down.sh"
|
||||
spawn None XF86AudioMute "~/.config/river/volume-toggle-mute.sh"
|
||||
spawn None XF86AudioMedia "playerctl play-pause"
|
||||
spawn None XF86AudioPlay "playerctl play-pause"
|
||||
spawn None XF86AudioPrev "playerctl previous"
|
||||
spawn None XF86AudioNext "playerctl next"
|
||||
// Brightness keys (no modifier)
|
||||
spawn None XF86MonBrightnessUp "~/.config/river/brightness-up.sh"
|
||||
spawn None XF86MonBrightnessDown "~/.config/river/brightness-down.sh"
|
||||
// Special command to generate keybinds for keys 1-9 and tags 1<<0 through 1<<9
|
||||
tag_bind Mod4 set_output_tags
|
||||
tag_bind Mod4+Shift set_window_tags
|
||||
|
|
|
|||
|
|
@ -82,7 +82,9 @@ pub fn parseModifiers(s: []const u8) !?river.SeatV1.Modifiers {
|
|||
const lower = try std.ascii.allocLowerString(utils.allocator, part);
|
||||
defer utils.allocator.free(lower);
|
||||
|
||||
if (mem.eql(u8, lower, "mod4") or mem.eql(u8, lower, "super")) {
|
||||
if (mem.eql(u8, lower, "none")) {
|
||||
// No modifier bits to set
|
||||
} else if (mem.eql(u8, lower, "mod4") or mem.eql(u8, lower, "super")) {
|
||||
modifiers.mod4 = true;
|
||||
} else if (mem.eql(u8, lower, "shift")) {
|
||||
modifiers.shift = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue