Compare commits

...

2 commits

Author SHA1 Message Date
522e2ec674
river: implement scratchpad 2024-11-11 15:44:41 +01:00
7aa0d88ecd
update mako config 2024-11-11 14:34:42 +01:00
3 changed files with 19 additions and 3 deletions

View file

@ -4,9 +4,12 @@ on-button-middle=dismiss-all
font=<% opt.font %> 10
default-timeout=8000
default-timeout=4000
max-visible=4
anchor=top-left
layer=overlay
anchor=bottom-right
icon-location=right
# Colors
background-color=#<% opt.catppuccin.base %>E0

View file

@ -34,6 +34,8 @@ end
:battery
:clock
:tray]
:river/tags {:num-tags 10
:tag-labels [:1 :2 :3 :4 :5 :6 :7 :8 :9 :S]}
:cava {:hide_on_silence true
:bars 16
:bar_delimiter 0

View file

@ -44,7 +44,7 @@ pub fn init(alloc: std.mem.Allocator, initial: bool) !void {
.{ "None", "XF86AudioPlay", "spawn", journal_prefix ++ opt.commands.media.play_pause },
.{ "None", "XF86AudioPrev", "spawn", journal_prefix ++ opt.commands.media.prev },
.{ "None", "XF86AudioNext", "spawn", journal_prefix ++ opt.commands.media.next },
// light control
.{ "None", "XF86MonBrightnessUp", "spawn", journal_prefix ++ opt.commands.backlight_up },
.{ "None", "XF86MonBrightnessDown", "spawn", journal_prefix ++ opt.commands.backlight_down },
@ -134,6 +134,17 @@ pub fn init(alloc: std.mem.Allocator, initial: bool) !void {
try con.runCommand(&[_][:0]const u8{ "input", "*" } ++ cmd);
}
// scratchpad
{
var pbuf: [64]u8 = undefined;
const scratchpad_tag: u32 = 1 << 9;
try con.runCommand(&.{ "spawn-tagmask", try std.fmt.bufPrintZ(&pbuf, "{}", .{~scratchpad_tag}) });
const tag_s = try std.fmt.bufPrintZ(&pbuf, "{}", .{scratchpad_tag});
try con.runCommand(&.{ "map", "normal", "Super", "P", "toggle-focused-tags", tag_s });
try con.runCommand(&.{ "map", "normal", "Super+Shift", "P", "set-view-tags", tag_s });
}
// tag config
for (0..9) |i| {
var key_buf: [16]u8 = undefined;