2024-04-12 11:43:34 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
fonts,
|
|
|
|
scheme,
|
|
|
|
accentColour ? "base07",
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [../desktop.nix];
|
2024-04-20 13:07:01 +01:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
(writeShellScriptBin "protonmail-setup-bridge" ''
|
|
|
|
pkill -9 -f protonmail-bridge
|
|
|
|
${protonmail-bridge}/bin/protonmail-bridge -c
|
|
|
|
swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n"
|
|
|
|
'')
|
|
|
|
(writeShellScriptBin "davmail-setup" ''
|
|
|
|
systemctl --user restart davmail # Ensure config file is present
|
|
|
|
systemctl --user stop davmail
|
2024-04-20 13:25:47 +01:00
|
|
|
${davmail}/bin/davmail -n ~/.davmail.properties
|
2024-04-20 13:07:01 +01:00
|
|
|
systemctl --user restart davmail
|
|
|
|
'')
|
|
|
|
];
|
2024-04-12 11:43:34 +01:00
|
|
|
wayland.windowManager.sway = {
|
|
|
|
enable = true;
|
2024-04-12 21:17:54 +01:00
|
|
|
package = null;
|
2024-04-12 11:43:34 +01:00
|
|
|
swaynag.enable = true;
|
|
|
|
systemd.enable = true;
|
|
|
|
xwayland = true;
|
|
|
|
config = {
|
|
|
|
input = {
|
|
|
|
"*" = {
|
|
|
|
xkb_layout = "gb";
|
|
|
|
xkb_options = "ctrl:nocaps";
|
|
|
|
};
|
2024-04-12 21:25:48 +01:00
|
|
|
"type:touchpad" = {
|
|
|
|
tap = "enabled";
|
|
|
|
natural_scroll = "enabled";
|
|
|
|
};
|
2024-04-12 11:43:34 +01:00
|
|
|
};
|
2024-04-13 07:29:06 +01:00
|
|
|
seat = {
|
|
|
|
"seat0" = {
|
|
|
|
xcursor_theme = with config.gtk.cursorTheme; "${name} ${toString size}";
|
|
|
|
};
|
|
|
|
};
|
2024-04-12 11:43:34 +01:00
|
|
|
modifier = "Mod4";
|
|
|
|
terminal = "${config.programs.alacritty.package}/bin/alacritty";
|
2024-04-12 17:56:13 +01:00
|
|
|
menu = "${config.programs.rofi.finalPackage}/bin/rofi -show drun";
|
|
|
|
workspaceAutoBackAndForth = true;
|
|
|
|
bars = [];
|
2024-04-15 10:40:04 +01:00
|
|
|
gaps = {
|
|
|
|
inner = 5;
|
|
|
|
outer = 5;
|
|
|
|
};
|
2024-04-12 17:56:13 +01:00
|
|
|
fonts = {
|
2024-04-12 21:17:54 +01:00
|
|
|
names = [fonts.monospace.name];
|
2024-04-12 17:56:13 +01:00
|
|
|
style = "regular";
|
2024-04-15 07:58:33 +01:00
|
|
|
size = fonts.sizes.desktop * 1.0;
|
2024-04-12 17:56:13 +01:00
|
|
|
};
|
|
|
|
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;
|
|
|
|
};
|
2024-04-15 10:40:04 +01:00
|
|
|
focusedInactive = rec {
|
2024-04-15 14:49:03 +01:00
|
|
|
inherit background text indicator;
|
|
|
|
border = toString base04;
|
|
|
|
childBorder = border;
|
|
|
|
};
|
|
|
|
unfocused = rec {
|
2024-04-12 17:56:13 +01:00
|
|
|
inherit background text indicator;
|
2024-04-12 21:17:54 +01:00
|
|
|
border = toString base03;
|
2024-04-12 17:56:13 +01:00
|
|
|
childBorder = border;
|
|
|
|
};
|
2024-04-15 10:40:04 +01:00
|
|
|
urgent = rec {
|
2024-04-12 17:56:13 +01:00
|
|
|
inherit background text indicator;
|
2024-04-15 10:40:04 +01:00
|
|
|
border = toString red;
|
2024-04-12 17:56:13 +01:00
|
|
|
childBorder = border;
|
|
|
|
};
|
2024-04-12 11:43:34 +01:00
|
|
|
};
|
|
|
|
startup = [
|
2024-04-12 17:56:13 +01:00
|
|
|
{command = "${pkgs.swaynotificationcenter}/bin/swaync";}
|
2024-04-21 06:40:55 +01:00
|
|
|
{command = "${pkgs.swaybg}/bin/swaybg -m fill -i ${../../wallpapers/waves/cat-waves.png}";}
|
2024-04-12 17:56:13 +01:00
|
|
|
{command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";}
|
|
|
|
{command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n";}
|
2024-04-12 11:43:34 +01:00
|
|
|
];
|
2024-04-12 17:56:13 +01:00
|
|
|
window = {
|
2024-04-15 11:18:19 +01:00
|
|
|
border = 1;
|
2024-04-12 17:56:13 +01:00
|
|
|
commands = [
|
|
|
|
{
|
|
|
|
criteria = {app_id = "org.kde.polkit-kde-authentication-agent-1";};
|
2024-04-21 06:40:55 +01:00
|
|
|
command = "floating enable";
|
2024-04-12 17:56:13 +01:00
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = {app_id = "Pinentry";};
|
2024-04-21 06:40:55 +01:00
|
|
|
command = "floating enable";
|
2024-04-12 17:56:13 +01:00
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = {app_id = "pavucontrol";};
|
2024-04-21 06:40:55 +01:00
|
|
|
command = "floating enable";
|
2024-04-12 17:56:13 +01:00
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = {app_id = ".blueman-manager-wrapped";};
|
2024-04-21 06:40:55 +01:00
|
|
|
command = "floating enable";
|
2024-04-12 17:56:13 +01:00
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = {app_id = "nm-connection-editor";};
|
2024-04-21 06:40:55 +01:00
|
|
|
command = "floating enable";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = {class = "steam";};
|
|
|
|
command = "layout tabbed";
|
2024-04-12 17:56:13 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-04-15 11:18:19 +01:00
|
|
|
floating.border = 1;
|
2024-04-13 07:29:06 +01:00
|
|
|
keybindings = with config; let
|
|
|
|
modifier = wayland.windowManager.sway.config.modifier;
|
2024-04-12 17:56:13 +01:00
|
|
|
in
|
|
|
|
lib.mkOptionDefault {
|
2024-04-14 21:43:37 +01:00
|
|
|
# Movement
|
2024-04-21 13:03:33 +01:00
|
|
|
"${modifier}+comma" = "workspace prev";
|
|
|
|
"${modifier}+period" = "workspace next";
|
2024-04-14 21:43:37 +01:00
|
|
|
"${modifier}+bracketleft" = "move workspace to output left";
|
|
|
|
"${modifier}+bracketright" = "move workspace to output right";
|
|
|
|
|
2024-04-13 07:29:06 +01:00
|
|
|
# Function keys
|
|
|
|
## Sound
|
|
|
|
"XF86AudioMute" = "exec ${services.avizo.package}/bin/volumectl %";
|
|
|
|
"XF86AudioMicMute" = "exec ${services.avizo.package}/bin/volumectl -m %";
|
|
|
|
"XF86AudioRaiseVolume" = "exec ${services.avizo.package}/bin/volumectl -u + 5";
|
|
|
|
"XF86AudioLowerVolume" = "exec ${services.avizo.package}/bin/volumectl -u - 5";
|
|
|
|
|
|
|
|
## Playback
|
|
|
|
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
|
|
|
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
|
|
|
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
|
|
|
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
|
|
|
|
|
|
|
## Brightness
|
|
|
|
"XF86MonBrightnessUp" = "exec ${services.avizo.package}/bin/lightctl + 5";
|
|
|
|
"XF86MonBrightnessDown" = "exec ${services.avizo.package}/bin/lightctl - 5";
|
|
|
|
|
|
|
|
# System utilities
|
|
|
|
"${modifier}+F1" = "exec ${programs.swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse";
|
2024-04-15 10:47:43 +01:00
|
|
|
"${modifier}+p" = "exec ${programs.rofi.pass.package}/bin/rofi-pass";
|
|
|
|
"${modifier}+Shift+p" = "exec ${programs.rofi.finalPackage}/bin/rofi -show powermenu -modi powermenu:${pkgs.rofi-power-menu}/bin/rofi-power-menu";
|
2024-04-13 07:29:06 +01:00
|
|
|
"${modifier}+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
|
|
|
|
"${modifier}+Shift+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
|
2024-04-14 21:31:09 +01:00
|
|
|
"${modifier}+Shift+Return" = "exec ${programs.emacs.finalPackage}/bin/emacsclient -c";
|
2024-04-13 07:29:06 +01:00
|
|
|
# "${modifier}+s" = "exec ${withTerm {
|
|
|
|
# progname = "btm";
|
|
|
|
# args = "--autohide_time --battery --celsius --enable_cache_memory --enable_gpu_memory --group --hide_avg_cpu --hide_table_gap --retention=3m --show_table_scroll_position";
|
|
|
|
# }}";
|
|
|
|
# "${modifier}+c" = "exec ${withTerm {progname = "cava";}}"
|
2024-04-12 17:56:13 +01:00
|
|
|
};
|
2024-04-12 11:43:34 +01:00
|
|
|
};
|
2024-04-12 21:17:54 +01:00
|
|
|
extraConfig = ''
|
2024-04-21 13:03:33 +01:00
|
|
|
bindgesture swipe:right workspace prev
|
|
|
|
bindgesture swipe:left workspace next
|
2024-04-12 21:17:54 +01:00
|
|
|
corner_radius 10
|
|
|
|
blur enable
|
|
|
|
blur_xray disable
|
|
|
|
blur_passes 3
|
|
|
|
blur_radius 5
|
|
|
|
corner_radius 10
|
|
|
|
shadows enable
|
|
|
|
shadow_blur_radius 4
|
2024-04-16 14:10:34 +01:00
|
|
|
layer_effects "system-menu" blur enable; blur_ignore_transparent enable; shadows disable
|
|
|
|
layer_effects "gtk-layer-shell" blur enable; blur_ignore_transparent enable; shadows disable
|
2024-04-15 14:49:03 +01:00
|
|
|
layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows disable
|
|
|
|
layer_effects "rofi" blur enable; blur_ignore_transparent enable; shadows disable
|
2024-04-16 14:10:34 +01:00
|
|
|
layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows disable
|
|
|
|
layer_effects "swaync-notification-window" blur enable; blur_ignore_transparent enable; shadows disable
|
|
|
|
layer_effects "swaync-control-center" blur enable; blur_ignore_transparent enable; shadows disable
|
2024-04-12 21:17:54 +01:00
|
|
|
titlebar_separator enable
|
2024-04-15 07:58:33 +01:00
|
|
|
scratchpad_minimize enable
|
2024-04-12 21:17:54 +01:00
|
|
|
'';
|
2024-04-12 11:43:34 +01:00
|
|
|
};
|
|
|
|
}
|