87 lines
3.3 KiB
Nix
87 lines
3.3 KiB
Nix
{pkgs, ...}: {
|
|
services.swayosd.enable = true;
|
|
home.packages = [
|
|
pkgs.playerctl
|
|
];
|
|
wayland.windowManager.hyprland.settings = {
|
|
bindel = [
|
|
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise"
|
|
", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower"
|
|
", XF86MonBrightnessUp, exec, ddcutil setvcp 10 + 10"
|
|
", XF86MonBrightnessDown, exec, ddcutil setvcp 10 - 10"
|
|
];
|
|
|
|
bindl = [
|
|
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
|
|
", Caps_Lock, exec, swayosd-client --caps-lock"
|
|
", XF86AudioPlay, exec, playerctl play-pause && notify-send -u low -t 1000 \"Media\" \"$(playerctl status)\""
|
|
", XF86AudioPrev, exec, playerctl previous && notify-send -u low -t 1000 \"Previous Track\" \"$(playerctl metadata title)\""
|
|
", XF86AudioNext, exec, playerctl next && notify-send -u low -t 1000 \"Next Track\" \"$(playerctl metadata title)\""
|
|
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
|
|
]; # FIXME: not working
|
|
bindm = [
|
|
"SUPER, mouse:272, movewindow"
|
|
"SUPER, mouse:273, resizewindow"
|
|
];
|
|
|
|
bindd =
|
|
[
|
|
# essential
|
|
"SUPER, Return, Open Terminal, exec, uwsm app -- xdg-terminal-exec"
|
|
"SUPER, Q, Kill active, killactive"
|
|
|
|
# resize
|
|
"SUPER CTRL, H, Resize Left, resizeactive, -40 0"
|
|
"SUPER CTRL, J, Resize Down, resizeactive, 0 40"
|
|
"SUPER CTRL, K, Resize Up, resizeactive, 0 -40"
|
|
"SUPER CTRL, L, Resize Right, resizeactive, 40 0"
|
|
|
|
# move focus
|
|
"SUPER, J, Move focus down, movefocus, d"
|
|
"SUPER, K, Move focus up, movefocus, u"
|
|
"SUPER, H, Move focus left, movefocus, l"
|
|
"SUPER, L, Move focus right, movefocus, r"
|
|
|
|
# move window
|
|
"SUPER SHIFT, h, Move window left, swapwindow, l"
|
|
"SUPER SHIFT, j, Move window down, swapwindow, d"
|
|
"SUPER SHIFT, k, Move window up, swapwindow, u"
|
|
"SUPER SHIFT, l, Move window right, swapwindow, r"
|
|
|
|
# fullscreen
|
|
"SUPER, F, Toggle Fullscreen, fullscreen, 0"
|
|
"SUPER SHIFT, F, Toggle Maximized Fullscreen, fullscreen, 1"
|
|
|
|
# layout
|
|
"SUPER, O, Toggle Split, layoutmsg, togglesplit"
|
|
|
|
# apps
|
|
"SUPER, W, Open Browser, exec, uwsm app -- firefox" # FIXME: must be xdg-open
|
|
"SUPER, SPACE, Open App Launcher, exec, nc -U $XDG_RUNTIME_DIR/walker/walker.sock"
|
|
"SUPER, T, Toggle Steam, togglespecialworkspace, steam"
|
|
"SUPER, M, Toggle Music, togglespecialworkspace, music"
|
|
|
|
# [Workspaces] Toggle between most recent workspaces
|
|
"SUPER, Tab, Cycle workspaces, workspace, previous"
|
|
]
|
|
++ (
|
|
# Generate binds for Super + [1-10] to switch workspaces
|
|
# and Super + Shift + [1-10] to move window to workspace
|
|
builtins.concatLists (builtins.genList (
|
|
i: let
|
|
ws = i + 1;
|
|
key = toString (
|
|
if ws == 10
|
|
then 0
|
|
else ws
|
|
);
|
|
in [
|
|
"SUPER, ${key}, Switch to workspace ${toString ws}, workspace, ${toString ws}"
|
|
"SUPER SHIFT, ${key}, Move window to workspace ${toString ws}, movetoworkspace, ${toString ws}"
|
|
]
|
|
)
|
|
10)
|
|
);
|
|
};
|
|
}
|