104 lines
3.6 KiB
Nix
104 lines
3.6 KiB
Nix
|
{ pkgs, config, ... }: {
|
||
|
|
||
|
# User packages
|
||
|
users.users.agatha.packages = with pkgs; [ grim rofi-wayland waybar ydotool ];
|
||
|
|
||
|
home-manager.users.agatha = {
|
||
|
wayland.windowManager.sway = let
|
||
|
cfg = config.home-manager.users.agatha.wayland.windowManager.sway.config;
|
||
|
in {
|
||
|
enable = true;
|
||
|
config = {
|
||
|
up = "i";
|
||
|
left = "j";
|
||
|
down = "k";
|
||
|
right = "l";
|
||
|
|
||
|
modifier = "Mod4";
|
||
|
terminal = "kitty";
|
||
|
|
||
|
fonts = {
|
||
|
names = [ "Font Awesome 5 Free" "Iosevka Gothic" ];
|
||
|
size = 11.0;
|
||
|
};
|
||
|
|
||
|
workspaceAutoBackAndForth = true;
|
||
|
window = {
|
||
|
titlebar = true;
|
||
|
hideEdgeBorders = "both";
|
||
|
border = 0;
|
||
|
};
|
||
|
|
||
|
gaps.inner = 15;
|
||
|
|
||
|
output."*" = { bg = "/home/agatha/Pictures/wallpaper.png fill"; };
|
||
|
|
||
|
input."type:keyboard" = {
|
||
|
xkb_layout = config.services.xserver.layout;
|
||
|
xkb_options = config.services.xserver.xkbOptions;
|
||
|
};
|
||
|
|
||
|
input."type:touchpad" = { tap = "enabled"; };
|
||
|
|
||
|
keybindings = let mod = cfg.modifier;
|
||
|
in {
|
||
|
"${mod}+Return" = "exec ${cfg.terminal}";
|
||
|
"Caps_Lock" = "exec ${cfg.terminal}";
|
||
|
"${mod}+e" = "exec nautilus";
|
||
|
"${mod}+space" = "exec rofi -show drun";
|
||
|
"${mod}+shift+e" = "exec rofimoji --action clipboard";
|
||
|
"${mod}+c" = ''
|
||
|
exec rofi -show calc -modi calc -calc-command 'xdotool type --clearmodifiers "\{result\}"'
|
||
|
'';
|
||
|
XF86AudioRaiseVolume = "exec pamixer -i 5";
|
||
|
XF86AudioLowerVolume = "exec pamixer -d 5";
|
||
|
XF86AudioMute = "exec pamixer -t";
|
||
|
XF86AudioPrev = "exec playerctl previous";
|
||
|
XF86AudioNext = "exec playerctl next";
|
||
|
XF86AudioPlay = "exec playerctl play-pause";
|
||
|
Print = "exec flameshot gui";
|
||
|
"shift+Print" = "exec flameshot gui -d 3000";
|
||
|
"${mod}+n" = "exec dunstctl set-paused toggle";
|
||
|
# "${mod}+o" = "TODO: port audio switcher";
|
||
|
"${mod}+shift+r" =
|
||
|
"reload; exec 'for p in waybar dunst; do; killall $p; done'";
|
||
|
"${mod}+w" = "kill";
|
||
|
"${mod}+m" = "layout tabbed";
|
||
|
"${mod}+t" = "layout toggle split";
|
||
|
"${mod}+s" = "floating toggle";
|
||
|
"${mod}+f" = "fullscreen toggle";
|
||
|
|
||
|
"alt+Tab" = "exec rofi -show window";
|
||
|
|
||
|
# "${mod}+x" = "TODO: lockscreen";
|
||
|
|
||
|
"${mod}+Shift+${cfg.left}" = "move left";
|
||
|
"${mod}+Shift+${cfg.down}" = "move down";
|
||
|
"${mod}+Shift+${cfg.up}" = "move up";
|
||
|
"${mod}+Shift+${cfg.right}" = "move right";
|
||
|
|
||
|
"${mod}+1" = "workspace number 1";
|
||
|
"${mod}+2" = "workspace number 2";
|
||
|
"${mod}+3" = "workspace number 3";
|
||
|
"${mod}+4" = "workspace number 4";
|
||
|
"${mod}+5" = "workspace number 5";
|
||
|
"${mod}+6" = "workspace number 6";
|
||
|
"${mod}+7" = "workspace number 7";
|
||
|
"${mod}+8" = "workspace number 8";
|
||
|
"${mod}+9" = "workspace number 9";
|
||
|
|
||
|
"${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";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|