feat: add XF86 keys and lid events
This commit is contained in:
parent
101ab079ac
commit
914bbd7d53
1 changed files with 20 additions and 6 deletions
|
@ -43,6 +43,8 @@ in
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
rivercarro
|
rivercarro
|
||||||
|
wlr-randr
|
||||||
|
jq
|
||||||
];
|
];
|
||||||
services.kanshi = {
|
services.kanshi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -57,6 +59,12 @@ in
|
||||||
"normal"
|
"normal"
|
||||||
"passthrough"
|
"passthrough"
|
||||||
];
|
];
|
||||||
|
map-switch.normal.lid = {
|
||||||
|
close = ''
|
||||||
|
spawn 'wlr-randr --output eDP-1 --off; monitors=$(wlr-randr --json | jq .[].name | count); [ "$monitors" = 1] && loginctl lock-session'
|
||||||
|
'';
|
||||||
|
open = "spawn 'wlr-randr --output eDP-1 --on'";
|
||||||
|
};
|
||||||
map = {
|
map = {
|
||||||
normal = {
|
normal = {
|
||||||
"Super Q" = "close";
|
"Super Q" = "close";
|
||||||
|
@ -86,6 +94,14 @@ in
|
||||||
|
|
||||||
# lock screen
|
# lock screen
|
||||||
"Super+Alt L" = ''spawn "loginctl lock-session"'';
|
"Super+Alt L" = ''spawn "loginctl lock-session"'';
|
||||||
|
|
||||||
|
# XF86 keys
|
||||||
|
"None XF86AudioLowerVolume" = "spawn 'pamixer -d 5'";
|
||||||
|
"None XF86AudioRaiseVolume" = "spawn 'pamixer -i 5'";
|
||||||
|
"None XF86AudioMute" = "spawn 'pamixer -t'";
|
||||||
|
"None XF86AudioNext" = "spawn 'playerctl -p spotifyd,firefox next'";
|
||||||
|
"None XF86AudioPlay" = "spawn 'playerctl -p spotifyd,firefox play-pause'";
|
||||||
|
"None XF86AudioPrev" = "spawn 'playerctl -p spotifyd,firefox previous'";
|
||||||
} //
|
} //
|
||||||
# tags
|
# tags
|
||||||
(
|
(
|
||||||
|
@ -110,12 +126,10 @@ in
|
||||||
lib.listToAttrs mappings
|
lib.listToAttrs mappings
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
map-pointer = {
|
map-pointer.normal = {
|
||||||
normal = {
|
"Super BTN_LEFT" = "move-view";
|
||||||
"Super BTN_LEFT" = "move-view";
|
"Super BTN_RIGHT" = "resize-view";
|
||||||
"Super BTN_RIGHT" = "resize-view";
|
"Super BTN_MIDDLE" = "toggle-float";
|
||||||
"Super BTN_MIDDLE" = "toggle-float";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
attach-mode = "bottom";
|
attach-mode = "bottom";
|
||||||
default-layout = "rivercarro";
|
default-layout = "rivercarro";
|
||||||
|
|
Loading…
Reference in a new issue