2024-10-15 02:40:43 -04:00
|
|
|
{ pkgs, config, ... }:
|
2024-10-09 03:36:08 -04:00
|
|
|
{
|
2024-11-07 18:17:51 -05:00
|
|
|
wayland.windowManager.sway.config = let
|
|
|
|
# Set default modifier and variables
|
|
|
|
primeMod = "Mod4";
|
|
|
|
secMod = "Mod1";
|
|
|
|
resizeAmount = "55";
|
|
|
|
in {
|
|
|
|
# Hotkeys
|
|
|
|
modifier = "${primeMod}";
|
2024-12-03 16:50:23 -05:00
|
|
|
keybindings = {
|
|
|
|
## Launchers
|
|
|
|
|
|
|
|
# Browser profiles
|
|
|
|
"${primeMod}+F1" = ''exec librewolf -p Main --name MainBrowser | notify-send "Main Browser"'';
|
|
|
|
"${primeMod}+F2" = ''exec librewolf -p Alt --name AltBrowser | notify-send "Alternate Browser"'';
|
|
|
|
"${primeMod}+F3" = ''exec librewolf -p Misc --name MiscBrowser | notify-send "Miscellaneous Browser"'';
|
|
|
|
|
|
|
|
# Virtual machines
|
|
|
|
"${primeMod}+F4" = ''exec virt-manager | notify-send "Virtual Machines"'';
|
|
|
|
"${primeMod}+F5" = ''exec looking-glass-client input:rawMouse=yes | notify-send "Looking Glass"'';
|
|
|
|
|
2024-12-08 06:41:06 -05:00
|
|
|
# Prime + key
|
2024-11-19 13:20:34 -05:00
|
|
|
"${primeMod}+s" = ''exec rofi -show run -p Command'';
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+c" = ''exec clipman pick -t rofi'';
|
2024-12-12 06:37:05 -05:00
|
|
|
"${primeMod}+x" = ''exec rofipower'';
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+b" = ''exec pkill -USR1 waybar'';
|
|
|
|
"${primeMod}+Return" = ''exec foot'';
|
|
|
|
|
2024-12-08 06:41:06 -05:00
|
|
|
# Prime + shift + key
|
2024-11-19 13:20:34 -05:00
|
|
|
"${primeMod}+Shift+s" = ''exec rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history'';
|
2024-12-03 16:50:23 -05:00
|
|
|
"${primeMod}+Shift+t" = ''exec pcmanfm'';
|
|
|
|
"${primeMod}+Shift+e" = ''exec bemoji -n -P 0'';
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+Shift+b" = ''exec rofi-bluetooth'';
|
|
|
|
"${primeMod}+Shift+Return" = ''exec foot ranger'';
|
|
|
|
|
2024-12-08 06:41:06 -05:00
|
|
|
# Prime + ctrl + key
|
|
|
|
"${primeMod}+Ctrl+x" = ''exec prop-sway'';
|
2024-12-12 06:37:05 -05:00
|
|
|
"${primeMod}+Ctrl+s" = ''exec rofiscratch'';
|
2024-12-03 16:50:23 -05:00
|
|
|
"${primeMod}+Ctrl+c" = ''exec wlpicker && notify-send "Color copied to clipboard"'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
## Media
|
2024-11-07 18:17:51 -05:00
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Volume
|
2024-11-07 18:17:51 -05:00
|
|
|
"${secMod}+j" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-'';
|
|
|
|
"${secMod}+k" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+'';
|
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# MPD
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+Backslash" = ''exec mpc toggle'';
|
|
|
|
"${secMod}+Shift+h" = ''exec mpc prev'';
|
|
|
|
"${secMod}+Shift+j" = ''exec mpc volume -3'';
|
|
|
|
"${secMod}+Shift+k" = ''exec mpc volume +3'';
|
|
|
|
"${secMod}+Shift+l" = ''exec mpc next'';
|
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
## Miscellaneous
|
2024-11-07 18:17:51 -05:00
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Notifications
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+n" = ''exec makotoggle'';
|
|
|
|
"${primeMod}+Shift+n" = ''exec makoctl restore'';
|
|
|
|
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
|
|
|
|
|
|
|
|
# Screenshots
|
2024-12-10 17:54:39 -05:00
|
|
|
"${secMod}+f" = ''exec grimedit'';
|
2024-12-08 06:41:06 -05:00
|
|
|
"${secMod}+Shift+f" = ''exec shot-sway --screen'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Display and keyboard brightness
|
2024-12-20 13:38:47 -05:00
|
|
|
"${primeMod}+equal" = ''exec brightnessctl s 5%+'';
|
2024-12-20 13:35:20 -05:00
|
|
|
"${primeMod}+minus" = ''exec brightnessctl s 5%-'';
|
2024-12-20 13:38:47 -05:00
|
|
|
"${primeMod}+Shift+equal" = ''exec brightnessctl s 1%+'';
|
2024-12-20 13:35:20 -05:00
|
|
|
"${primeMod}+Shift+minus" = ''exec brightnessctl s 1%-'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
## Window manager
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+q" = ''kill'';
|
|
|
|
"${primeMod}+Shift+r" = ''reload'';
|
|
|
|
|
|
|
|
# Switch to workspaces
|
2024-12-04 02:54:40 -05:00
|
|
|
"${primeMod}+grave" = ''workspace 0:${config.ws.w0}'';
|
|
|
|
"${primeMod}+1" = ''workspace 1:${config.ws.w1}'';
|
|
|
|
"${primeMod}+2" = ''workspace 2:${config.ws.w2}'';
|
|
|
|
"${primeMod}+3" = ''workspace 3:${config.ws.w3}'';
|
|
|
|
"${primeMod}+4" = ''workspace 4:${config.ws.w4}'';
|
|
|
|
"${primeMod}+5" = ''workspace 5:${config.ws.w5}'';
|
|
|
|
"${primeMod}+6" = ''workspace 6:${config.ws.w6}'';
|
|
|
|
"${primeMod}+7" = ''workspace 7:${config.ws.w7}'';
|
|
|
|
"${primeMod}+8" = ''workspace 8:${config.ws.w8}'';
|
|
|
|
"${primeMod}+9" = ''workspace 9:${config.ws.w9}'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
|
|
|
# Switch to alternate workspaces
|
2024-12-04 02:54:40 -05:00
|
|
|
"${secMod}+F1" = ''workspace 11:${config.ws.w1a}'';
|
|
|
|
"${secMod}+F2" = ''workspace 22:${config.ws.w2a}'';
|
|
|
|
"${secMod}+F3" = ''workspace 33:${config.ws.w3a}'';
|
|
|
|
"${secMod}+F4" = ''workspace 44:${config.ws.w4a}'';
|
|
|
|
"${secMod}+F5" = ''workspace 55:${config.ws.w5a}'';
|
|
|
|
"${secMod}+F6" = ''workspace 66:${config.ws.w6a}'';
|
|
|
|
"${secMod}+F7" = ''workspace 77:${config.ws.w7a}'';
|
|
|
|
"${secMod}+F8" = ''workspace 88:${config.ws.w8a}'';
|
|
|
|
"${secMod}+F9" = ''workspace 99:${config.ws.w9a}'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Move window to and focus workspace
|
2024-12-04 02:54:40 -05:00
|
|
|
"${primeMod}+Shift+grave" = ''move container to workspace 0:${config.ws.w0}; workspace 0:${config.ws.w0}'';
|
|
|
|
"${primeMod}+Shift+1" = ''move container to workspace 1:${config.ws.w1}; workspace 1:${config.ws.w1}'';
|
|
|
|
"${primeMod}+Shift+2" = ''move container to workspace 2:${config.ws.w2}; workspace 2:${config.ws.w2}'';
|
|
|
|
"${primeMod}+Shift+3" = ''move container to workspace 3:${config.ws.w3}; workspace 3:${config.ws.w3}'';
|
|
|
|
"${primeMod}+Shift+4" = ''move container to workspace 4:${config.ws.w4}; workspace 4:${config.ws.w4}'';
|
|
|
|
"${primeMod}+Shift+5" = ''move container to workspace 5:${config.ws.w5}; workspace 5:${config.ws.w5}'';
|
|
|
|
"${primeMod}+Shift+6" = ''move container to workspace 6:${config.ws.w6}; workspace 6:${config.ws.w6}'';
|
|
|
|
"${primeMod}+Shift+7" = ''move container to workspace 7:${config.ws.w7}; workspace 7:${config.ws.w7}'';
|
|
|
|
"${primeMod}+Shift+8" = ''move container to workspace 8:${config.ws.w8}; workspace 8:${config.ws.w8}'';
|
|
|
|
"${primeMod}+Shift+9" = ''move container to workspace 9:${config.ws.w9}; workspace 9:${config.ws.w9}'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Move window to and focus alternate workspace
|
2024-12-04 02:54:40 -05:00
|
|
|
"${secMod}+Shift+F1" = ''move container to workspace 11:${config.ws.w1a}; workspace 11:${config.ws.w1a}'';
|
|
|
|
"${secMod}+Shift+F2" = ''move container to workspace 22:${config.ws.w2a}; workspace 22:${config.ws.w2a}'';
|
|
|
|
"${secMod}+Shift+F3" = ''move container to workspace 33:${config.ws.w3a}; workspace 33:${config.ws.w3a}'';
|
|
|
|
"${secMod}+Shift+F4" = ''move container to workspace 44:${config.ws.w4a}; workspace 44:${config.ws.w4a}'';
|
|
|
|
"${secMod}+Shift+F5" = ''move container to workspace 55:${config.ws.w5a}; workspace 55:${config.ws.w5a}'';
|
|
|
|
"${secMod}+Shift+F6" = ''move container to workspace 66:${config.ws.w6a}; workspace 66:${config.ws.w6a}'';
|
|
|
|
"${secMod}+Shift+F7" = ''move container to workspace 77:${config.ws.w7a}; workspace 77:${config.ws.w7a}'';
|
|
|
|
"${secMod}+Shift+F8" = ''move container to workspace 88:${config.ws.w8a}; workspace 88:${config.ws.w8a}'';
|
|
|
|
"${secMod}+Shift+F9" = ''move container to workspace 99:${config.ws.w9a}; workspace 99:${config.ws.w9a}'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Change focused window
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+h" = ''focus left'';
|
|
|
|
"${primeMod}+j" = ''focus down'';
|
|
|
|
"${primeMod}+k" = ''focus up'';
|
|
|
|
"${primeMod}+l" = ''focus right'';
|
|
|
|
|
|
|
|
# Move focused window
|
|
|
|
"${primeMod}+Shift+h" = ''move left ${resizeAmount} px'';
|
|
|
|
"${primeMod}+Shift+j" = ''move down ${resizeAmount} px'';
|
|
|
|
"${primeMod}+Shift+k" = ''move up ${resizeAmount} px'';
|
|
|
|
"${primeMod}+Shift+l" = ''move right ${resizeAmount} px'';
|
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Resize window
|
|
|
|
"${primeMod}+${secMod}+h" = ''resize shrink width ${resizeAmount} px or 5 ppt'';
|
|
|
|
"${primeMod}+${secMod}+j" = ''resize shrink height ${resizeAmount} px or 5 ppt'';
|
|
|
|
"${primeMod}+${secMod}+k" = ''resize grow height ${resizeAmount} px or 5 ppt'';
|
|
|
|
"${primeMod}+${secMod}+l" = ''resize grow width ${resizeAmount} px or 5 ppt'';
|
|
|
|
|
2024-12-08 06:41:06 -05:00
|
|
|
# Floating
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+space" = ''focus mode_toggle'';
|
|
|
|
"${primeMod}+Shift+space" = ''floating toggle'';
|
|
|
|
|
2024-12-08 06:41:06 -05:00
|
|
|
# Change layout
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+f" = ''fullscreen toggle'';
|
|
|
|
"${primeMod}+w" = ''layout toggle split'';
|
|
|
|
"${primeMod}+v" = ''split v'';
|
2024-12-08 06:41:06 -05:00
|
|
|
"${primeMod}+e" = ''layout toggle tabbed stacking'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
|
|
|
# Focus parent / child
|
|
|
|
"${primeMod}+a" = ''focus parent'';
|
|
|
|
"${primeMod}+shift+a" = ''focus child'';
|
|
|
|
|
|
|
|
# Scratchpads
|
2024-12-06 04:03:03 -05:00
|
|
|
"${primeMod}+Shift+Backslash" = ''[app_id="btop"] scratchpad show, move position center, resize set 1216 888'';
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+Shift+m" = ''[app_id="music"] scratchpad show, move position center, resize set 1006 657'';
|
|
|
|
"${primeMod}+Shift+v" = ''[app_id="sound"] scratchpad show, move position center, resize set 1000 800'';
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|