47 lines
2.1 KiB
Nix
47 lines
2.1 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
mod = config.wayland.windowManager.sway.config.modifier;
|
|
homeDir = config.home.homeDirectory;
|
|
menu = config.wayland.windowManager.sway.config.menu;
|
|
term = config.wayland.windowManager.sway.config.terminal;
|
|
in {
|
|
wayland.windowManager.sway.config.keybindings = lib.mkOptionDefault {
|
|
"${mod}+d" = "${menu}";
|
|
"${mod}+Shift+F" = "exec MOZ_DISABLE_RDD_SANDBOX=1 firefox";
|
|
"${mod}+Return" = "exec ${term}";
|
|
"${mod}+Shift+Return" = "exec ${pkgs.wezterm}/bin/wezterm";
|
|
"${mod}+x" = "exec wlogout";
|
|
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
|
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
|
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
|
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
|
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
|
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
|
"XF86AudioPlay" = "exec playerctl play-pause";
|
|
"XF86AudioNext" = "exec playerctl next";
|
|
"XF86AudioPrev" = "exec playerctl previous";
|
|
"Ctrl+F3" = "exec grimshot save screen";
|
|
"Ctrl+F4" = "exec grimshot save area";
|
|
"Ctrl+F5" = "exec grimshot save active";
|
|
"Ctrl+F6" = "exec grimshot save window";
|
|
"Shift+F3" = "exec grimshot copy screen";
|
|
"Shift+F4" = "exec grimshot copy area";
|
|
"Shift+F5" = "exec grimshot copy active";
|
|
"Shift+F6" = "exec grimshot copy window";
|
|
"${mod}+Shift+1" = "move container to workspace number 1";
|
|
"${mod}+Shift+2" = "move container to workspace number 2";
|
|
"${mod}+Shift+3" = "move container to workspace number 3";
|
|
"${mod}+Shift+4" = "move container to workspace number 4";
|
|
"${mod}+Shift+5" = "move container to workspace number 5";
|
|
"${mod}+Shift+6" = "move container to workspace number 6";
|
|
"${mod}+Shift+7" = "move container to workspace number 7";
|
|
"${mod}+Shift+8" = "move container to workspace number 8";
|
|
"${mod}+Shift+9" = "move container to workspace number 9";
|
|
"${mod}+Shift+0" = "move container to workspace number 10";
|
|
"${mod}+0" = "workspace number 10";
|
|
};
|
|
}
|