Evie Litherland-Smith
6dd70aa58e
Made swayfx the standard, added nixos system-level module to enable and autostart with greetd; Includes fix for missing session that should be fixed in later nixpkgs versions Fixed formatting for waybar workspaces module, wasn't showing active or empty workspaces correctly
132 lines
3.6 KiB
Nix
132 lines
3.6 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
fonts,
|
|
scheme,
|
|
accentColour ? "base07",
|
|
...
|
|
}: {
|
|
imports = [../desktop.nix];
|
|
wayland.windowManager.sway = {
|
|
enable = true;
|
|
package = null;
|
|
swaynag.enable = true;
|
|
systemd.enable = true;
|
|
xwayland = true;
|
|
config = {
|
|
input = {
|
|
"*" = {
|
|
xkb_layout = "gb";
|
|
xkb_options = "ctrl:nocaps";
|
|
};
|
|
};
|
|
modifier = "Mod4";
|
|
terminal = "${config.programs.alacritty.package}/bin/alacritty";
|
|
menu = "${config.programs.rofi.finalPackage}/bin/rofi -show drun";
|
|
workspaceAutoBackAndForth = true;
|
|
bars = [];
|
|
gaps = {
|
|
inner = 10;
|
|
# outer = 5;
|
|
};
|
|
fonts = {
|
|
names = [fonts.monospace.name];
|
|
style = "regular";
|
|
size = 12.0; # fonts.sizes.desktop;
|
|
};
|
|
colors = with scheme.withHashtag; let
|
|
text = toString base05;
|
|
indicator = toString cyan;
|
|
in rec {
|
|
background = toString base00;
|
|
focused = rec {
|
|
inherit background text indicator;
|
|
border = toString scheme.withHashtag.${accentColour};
|
|
childBorder = border;
|
|
};
|
|
unfocused = rec {
|
|
inherit background text indicator;
|
|
border = toString base03;
|
|
childBorder = border;
|
|
};
|
|
focusedInactive = rec {
|
|
inherit background text indicator;
|
|
border = toString base03;
|
|
childBorder = border;
|
|
};
|
|
};
|
|
startup = [
|
|
{command = "${pkgs.swaynotificationcenter}/bin/swaync";}
|
|
{command = "${pkgs.swaybg}/bin/swaybg -i ${../../wallpapers/waves/cat-waves.png}";}
|
|
{command = "${pkgs.waybar}/bin/waybar";}
|
|
{command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";}
|
|
{command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n";}
|
|
];
|
|
assigns = {
|
|
"3: Files" = [
|
|
{class = "^(libreoffice|soffice)(.*)$";}
|
|
];
|
|
"4: Chat" = [
|
|
{class = "^WebCord$";}
|
|
{class = "^Signal$";}
|
|
];
|
|
"5: Games" = [
|
|
{class = "^steam$";}
|
|
{class = "^org.prismlauncher.PrismLauncher$";}
|
|
];
|
|
};
|
|
window = {
|
|
commands = [
|
|
{
|
|
command = "floating enable";
|
|
criteria = {app_id = "org.kde.polkit-kde-authentication-agent-1";};
|
|
}
|
|
{
|
|
command = "floating enable";
|
|
criteria = {app_id = "Pinentry";};
|
|
}
|
|
{
|
|
command = "floating enable";
|
|
criteria = {app_id = "pavucontrol";};
|
|
}
|
|
{
|
|
command = "floating enable";
|
|
criteria = {app_id = ".blueman-manager-wrapped";};
|
|
}
|
|
{
|
|
command = "floating enable";
|
|
criteria = {app_id = "nm-connection-editor";};
|
|
}
|
|
{
|
|
command = "floating enable";
|
|
criteria = {app_id = "org.prismlauncher.PrismLauncher";};
|
|
}
|
|
];
|
|
};
|
|
keybindings = let
|
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
|
in
|
|
lib.mkOptionDefault {
|
|
"${modifier}+F1" = "exec swaylock";
|
|
"${modifier}+z" = "exec swaync-client -t -sw";
|
|
"${modifier}+e" = "exec emacsclient -c";
|
|
"${modifier}+w" = "exec firefox";
|
|
"${modifier}+f" = "exec thunar";
|
|
};
|
|
};
|
|
extraConfig = ''
|
|
corner_radius 10
|
|
blur enable
|
|
blur_xray disable
|
|
blur_passes 3
|
|
blur_radius 5
|
|
corner_radius 10
|
|
shadows enable
|
|
shadow_blur_radius 4
|
|
titlebar_separator enable
|
|
scratchpad_minimize disable
|
|
'';
|
|
};
|
|
}
|