feat: add tags keybinds to river
This commit is contained in:
parent
31cd3f9957
commit
5aba3a032c
1 changed files with 38 additions and 3 deletions
|
@ -99,7 +99,30 @@ in
|
|||
|
||||
# bump in layout stack
|
||||
"Super Z" = "zoom";
|
||||
};
|
||||
|
||||
} //
|
||||
# tags
|
||||
(
|
||||
let
|
||||
numbers = range 1 9;
|
||||
toTag = num: "$((1 << (${toString num} - 1)))";
|
||||
|
||||
mkMappings = num:
|
||||
let
|
||||
numStr = toString num;
|
||||
tag = toTag num;
|
||||
in
|
||||
[
|
||||
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
||||
{ name = "Super ${numStr}"; value = "toggle-focused-tags ${tag}"; }
|
||||
|
||||
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
|
||||
{ name = "Super+Shift ${numStr}"; value = "toggle-view-tags ${tag}"; }
|
||||
];
|
||||
mappings = flatten (map mkMappings numbers);
|
||||
in
|
||||
listToAttrs mappings
|
||||
);
|
||||
};
|
||||
map-pointer = {
|
||||
normal = {
|
||||
|
@ -108,12 +131,19 @@ in
|
|||
"Super BTN_MIDDLE" = "toggle-float";
|
||||
};
|
||||
};
|
||||
attach-mode = "bottom";
|
||||
default-layout = "rivercarro";
|
||||
focus-follows-cursor = "normal";
|
||||
hide-cursor = {
|
||||
timeout = "1500";
|
||||
when-typing = "enabled";
|
||||
};
|
||||
set-cursor-warp = "on-focus-change";
|
||||
};
|
||||
extraConfig = /* bash */ ''
|
||||
riverctl default-layout rivercarro
|
||||
rivercarro_pid="$(pidof rivercarro)"
|
||||
if [[ -z $rivercarro_pid ]]; then
|
||||
rivercarro -inner-gaps 4 -outer-gaps 4
|
||||
rivercarro -inner-gaps 4 -outer-gaps 4 &
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
@ -139,6 +169,11 @@ in
|
|||
modules-right = [ "network" "memory" "cpu" "battery" "clock" ];
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
#tags button.focused {
|
||||
color: #ffffff
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# lock screen after timeout
|
||||
|
|
Loading…
Reference in a new issue