mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-05 03:32:34 +01:00
river: implement scratchpad
This commit is contained in:
parent
7aa0d88ecd
commit
522e2ec674
2 changed files with 14 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue