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"'';
|
|
|
|
|
|
|
|
# Mod + 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'';
|
|
|
|
"${primeMod}+x" = ''exec rofiscripts --power'';
|
|
|
|
"${primeMod}+b" = ''exec pkill -USR1 waybar'';
|
|
|
|
"${primeMod}+Return" = ''exec foot'';
|
2024-12-03 16:50:23 -05:00
|
|
|
"${primeMod}+Escape" = ''exec swaytools --kill'';
|
2024-11-07 18:17:51 -05:00
|
|
|
|
|
|
|
# Mod + 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'';
|
|
|
|
|
|
|
|
# Mod + ctrl + key
|
2024-12-03 16:50:23 -05:00
|
|
|
"${primeMod}+Ctrl+x" = ''exec swaytools --prop'';
|
|
|
|
"${primeMod}+Ctrl+s" = ''exec rofiscripts --scratchpads'';
|
|
|
|
"${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
|
|
|
|
"${secMod}+f" = ''exec swayshot --swappy'';
|
|
|
|
"${secMod}+Shift+f" = ''exec swayshot --screen'';
|
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Display and keyboard brightness
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+equal" = ''exec light -A 5'';
|
|
|
|
"${primeMod}+minus" = ''exec light -U 5'';
|
|
|
|
"${primeMod}+Shift+equal" = ''exec light -A 1'';
|
|
|
|
"${primeMod}+Shift+minus" = ''exec light -U 1'';
|
|
|
|
"XF86KbdBrightnessUp" = ''exec light -s sysfs/leds/smc::kbd_backlight -A 5'';
|
|
|
|
"XF86KbdBrightnessDown" = ''exec light -s sysfs/leds/smc::kbd_backlight -U 5'';
|
|
|
|
|
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
|
|
|
|
"${primeMod}+grave" = ''workspace ${config.ws.w0}'';
|
|
|
|
"${primeMod}+1" = ''workspace ${config.ws.w1}'';
|
|
|
|
"${primeMod}+2" = ''workspace ${config.ws.w2}'';
|
|
|
|
"${primeMod}+3" = ''workspace ${config.ws.w3}'';
|
|
|
|
"${primeMod}+4" = ''workspace ${config.ws.w4}'';
|
|
|
|
"${primeMod}+5" = ''workspace ${config.ws.w5}'';
|
|
|
|
"${primeMod}+6" = ''workspace ${config.ws.w6}'';
|
|
|
|
"${primeMod}+7" = ''workspace ${config.ws.w7}'';
|
|
|
|
"${primeMod}+8" = ''workspace ${config.ws.w8}'';
|
|
|
|
"${primeMod}+9" = ''workspace ${config.ws.w9}'';
|
|
|
|
|
|
|
|
# Switch to alternate workspaces
|
|
|
|
"${secMod}+F1" = ''workspace ${config.ws.w1a}'';
|
|
|
|
"${secMod}+F2" = ''workspace ${config.ws.w2a}'';
|
|
|
|
"${secMod}+F3" = ''workspace ${config.ws.w3a}'';
|
|
|
|
"${secMod}+F4" = ''workspace ${config.ws.w4a}'';
|
|
|
|
"${secMod}+F5" = ''workspace ${config.ws.w5a}'';
|
|
|
|
"${secMod}+F6" = ''workspace ${config.ws.w6a}'';
|
|
|
|
"${secMod}+F7" = ''workspace ${config.ws.w7a}'';
|
|
|
|
"${secMod}+F8" = ''workspace ${config.ws.w8a}'';
|
|
|
|
"${secMod}+F9" = ''workspace ${config.ws.w9a}'';
|
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Move window to and focus workspace
|
2024-11-07 18:17:51 -05:00
|
|
|
"${primeMod}+Shift+grave" = ''move container to workspace ${config.ws.w0}; workspace ${config.ws.w0}'';
|
|
|
|
"${primeMod}+Shift+1" = ''move container to workspace ${config.ws.w1}; workspace ${config.ws.w1}'';
|
|
|
|
"${primeMod}+Shift+2" = ''move container to workspace ${config.ws.w2}; workspace ${config.ws.w2}'';
|
|
|
|
"${primeMod}+Shift+3" = ''move container to workspace ${config.ws.w3}; workspace ${config.ws.w3}'';
|
|
|
|
"${primeMod}+Shift+4" = ''move container to workspace ${config.ws.w4}; workspace ${config.ws.w4}'';
|
|
|
|
"${primeMod}+Shift+5" = ''move container to workspace ${config.ws.w5}; workspace ${config.ws.w5}'';
|
|
|
|
"${primeMod}+Shift+6" = ''move container to workspace ${config.ws.w6}; workspace ${config.ws.w6}'';
|
|
|
|
"${primeMod}+Shift+7" = ''move container to workspace ${config.ws.w7}; workspace ${config.ws.w7}'';
|
|
|
|
"${primeMod}+Shift+8" = ''move container to workspace ${config.ws.w8}; workspace ${config.ws.w8}'';
|
|
|
|
"${primeMod}+Shift+9" = ''move container to workspace ${config.ws.w9}; workspace ${config.ws.w9}'';
|
|
|
|
|
2024-12-03 16:50:23 -05:00
|
|
|
# Move window to and focus alternate workspace
|
2024-11-07 18:17:51 -05:00
|
|
|
"${secMod}+Shift+F1" = ''move container to workspace ${config.ws.w1a}; workspace ${config.ws.w1a}'';
|
|
|
|
"${secMod}+Shift+F2" = ''move container to workspace ${config.ws.w2a}; workspace ${config.ws.w2a}'';
|
|
|
|
"${secMod}+Shift+F3" = ''move container to workspace ${config.ws.w3a}; workspace ${config.ws.w3a}'';
|
|
|
|
"${secMod}+Shift+F4" = ''move container to workspace ${config.ws.w4a}; workspace ${config.ws.w4a}'';
|
|
|
|
"${secMod}+Shift+F5" = ''move container to workspace ${config.ws.w5a}; workspace ${config.ws.w5a}'';
|
|
|
|
"${secMod}+Shift+F6" = ''move container to workspace ${config.ws.w6a}; workspace ${config.ws.w6a}'';
|
|
|
|
"${secMod}+Shift+F7" = ''move container to workspace ${config.ws.w7a}; workspace ${config.ws.w7a}'';
|
|
|
|
"${secMod}+Shift+F8" = ''move container to workspace ${config.ws.w8a}; workspace ${config.ws.w8a}'';
|
|
|
|
"${secMod}+Shift+F9" = ''move container to workspace ${config.ws.w9a}; workspace ${config.ws.w9a}'';
|
|
|
|
|
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-11-07 18:17:51 -05:00
|
|
|
# Change focus between floating/tiled, toggle floating
|
|
|
|
"${primeMod}+space" = ''focus mode_toggle'';
|
|
|
|
"${primeMod}+Shift+space" = ''floating toggle'';
|
|
|
|
|
|
|
|
# Toggle fullscreen
|
|
|
|
"${primeMod}+f" = ''fullscreen toggle'';
|
|
|
|
"${primeMod}+${secMod}+Ctrl+f" = ''fullscreen toggle global'';
|
|
|
|
|
|
|
|
# Change container layout
|
|
|
|
"${primeMod}+w" = ''layout toggle split'';
|
|
|
|
"${primeMod}+e" = ''layout toggle tabbed stacking'';
|
|
|
|
|
|
|
|
# Change split direction
|
|
|
|
"${primeMod}+v" = ''split v'';
|
|
|
|
|
|
|
|
# Focus parent / child
|
|
|
|
"${primeMod}+a" = ''focus parent'';
|
|
|
|
"${primeMod}+shift+a" = ''focus child'';
|
|
|
|
|
|
|
|
# Scratchpads
|
2024-11-13 09:43:47 -05:00
|
|
|
"Shift+Ctrl+Backslash" = ''[app_id="gotop"] 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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|