157 lines
5.2 KiB
Nix
157 lines
5.2 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
config.wayland.windowManager.sway = {
|
|
enable = true;
|
|
package = pkgs.sway;
|
|
config = with pkgs.rice; {
|
|
bars = [];
|
|
# reintroduces flicker
|
|
# output = {
|
|
# "*" = {
|
|
# adaptive_sync = "on";
|
|
# };
|
|
# };
|
|
focus = {
|
|
mouseWarping = "container";
|
|
wrapping = "no";
|
|
};
|
|
fonts = with fonts; {
|
|
names = [sans.name emoji.name];
|
|
size = 10.0;
|
|
};
|
|
gaps = {
|
|
inner = borders.gaps_in;
|
|
outer = borders.gaps_out;
|
|
smartGaps = true;
|
|
smartBorders = "no_gaps";
|
|
};
|
|
window = {
|
|
border = borders.thickness;
|
|
hideEdgeBorders = "smart";
|
|
titlebar = false;
|
|
commands = [
|
|
{
|
|
command = "move scratchpad";
|
|
criteria = {
|
|
app_id = "org.keepassxc.KeePassXC";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
workspaceAutoBackAndForth = false;
|
|
input = {
|
|
"*" = {
|
|
accel_profile = "flat";
|
|
pointer_accel = "0.0";
|
|
xkb_options = "caps:escape";
|
|
};
|
|
};
|
|
startup = with pkgs; [
|
|
{command = "${lib.getExe' keepassxc "keepassxc"}";}
|
|
{command = "${lib.getExe' ckb-next "ckb-next"} -c -b";}
|
|
{command = "${lib.getExe' mullvad "mullvad"} connect";}
|
|
{command = "${lib.getExe' xorg.xrdb "xrdb"} -l ~/.Xresources";}
|
|
{command = "${lib.getExe' flashfocus "flashfocus"} -o 0.95 -t 175 -n 30 --no-flash-fullscreen -l on_open_close";}
|
|
{command = "${lib.getExe' glib.bin "gsettings"} set org.gnome.desktop.interface gtk-theme '${rice.gtk-theme.name}'";}
|
|
{command = "${lib.getExe' glib.bin "gsettings"} set org.gnome.desktop.interface font-name '${rice.fonts.sans.name}'";}
|
|
{command = "${lib.getExe' glib.bin "gsettings"} set org.gnome.desktop.interface icon-theme '${rice.icons.name}'";}
|
|
];
|
|
terminal = "kitty";
|
|
modifier = "Mod4";
|
|
keybindings = {
|
|
"Mod4+Return" = "exec kitty";
|
|
"Mod4+d" = "exec fuzzel";
|
|
"Mod4+e" = "exec thunar";
|
|
"Mod4+f" = "exec firefox";
|
|
"Mod4+Shift+e" = "exec wlogout";
|
|
"Mod4+Shift+s" = "exec grim -g \"$(slurp)\" -t png -o \"${config.home.homeDirectory}/Pictures/$(date +%F_%H-%m-%S).png\" && notify-send \"Screenshot taken.\"";
|
|
"Mod4+Shift+Ctrl+s" = "exec kooha";
|
|
"Mod4+n" = "exec swaync-client -t";
|
|
"Mod4+Space" = "floating toggle; move absolute position center";
|
|
"Mod4+c" = "focus floating; move absolute position center";
|
|
"Mod4+Shift+Space" = "fullscreen toggle";
|
|
"Mod4+a" = "focus parent";
|
|
"Mod4+Shift+a" = "focus child";
|
|
"Mod4+h" = "focus left";
|
|
"Mod4+j" = "focus down";
|
|
"Mod4+k" = "focus up";
|
|
"Mod4+l" = "focus right";
|
|
"Mod4+Shift+h" = "move left";
|
|
"Mod4+Shift+j" = "move down";
|
|
"Mod4+Shift+k" = "move up";
|
|
"Mod4+Shift+l" = "move right";
|
|
"Mod4+1" = "workspace 1";
|
|
"Mod4+Shift+1" = "move container to workspace 1";
|
|
"Mod4+2" = "workspace 2";
|
|
"Mod4+Shift+2" = "move container to workspace 2";
|
|
"Mod4+3" = "workspace 3";
|
|
"Mod4+Shift+3" = "move container to workspace 3";
|
|
"Mod4+4" = "workspace 4";
|
|
"Mod4+Shift+4" = "move container to workspace 4";
|
|
"Mod4+r" = "mode resize";
|
|
"Mod4+Shift+minus" = "move scratchpad";
|
|
"Mod4+minus" = "scratchpad show";
|
|
"Mod4+Shift+q" = "kill";
|
|
"Mod4+v" = "split toggle";
|
|
"XF86AudioMute" = "exec swayosd --output-volume mute-toggle";
|
|
"XF86AudioRaiseVolume" = "exec swayosd --output-volume raise";
|
|
"XF86AudioLowerVolume" = "exec swayosd --output-volume lower";
|
|
"XF86AudioStop" = "exec playerctl stop";
|
|
"XF86AudioPlay" = "exec playerctl play-pause";
|
|
"XF86AudioPrev" = "exec playerctl previous";
|
|
"XF86AudioNext" = "exec playerctl next";
|
|
"XF86MonBrightnessUp" = "exec swayosd --brightness raise";
|
|
"XF86MonBrightnessDown" = "exec swayosd --brightness lower";
|
|
};
|
|
menu = "fuzzel";
|
|
colors = with palette-hex; {
|
|
background = util.bg;
|
|
focused = {
|
|
background = util.bg;
|
|
border = bright.yellow;
|
|
childBorder = bright.yellow;
|
|
indicator = bright.yellow;
|
|
text = util.fg;
|
|
};
|
|
focusedInactive = {
|
|
background = normal.black;
|
|
border = util.bg;
|
|
childBorder = util.bg;
|
|
indicator = util.bg;
|
|
text = normal.white;
|
|
};
|
|
placeholder = {
|
|
background = util.bg;
|
|
border = bright.green;
|
|
childBorder = bright.green;
|
|
indicator = bright.green;
|
|
text = util.fg;
|
|
};
|
|
unfocused = {
|
|
background = normal.black;
|
|
border = util.bg;
|
|
childBorder = util.bg;
|
|
indicator = util.bg;
|
|
text = normal.white;
|
|
};
|
|
urgent = {
|
|
background = normal.red;
|
|
border = normal.red;
|
|
childBorder = normal.red;
|
|
indicator = normal.red;
|
|
text = normal.blue;
|
|
};
|
|
};
|
|
};
|
|
systemd.enable = true;
|
|
wrapperFeatures = {
|
|
base = true;
|
|
gtk = true;
|
|
};
|
|
xwayland = true;
|
|
};
|
|
}
|