Add Swayidle and add more monitors to config

This commit is contained in:
Bun 2025-05-08 21:12:29 -04:00
parent 74b2840bf7
commit b532ebb5ae
7 changed files with 68 additions and 3 deletions

View file

@ -9,5 +9,8 @@
tower2 = "BNQ BenQ GW2270 6CH00781019"; tower2 = "BNQ BenQ GW2270 6CH00781019";
tower3 = "Eizo Nanao Corporation CG223W 23252050"; tower3 = "Eizo Nanao Corporation CG223W 23252050";
tower4 = "Samsung Electric Company SAMSUNG Unknown"; tower4 = "Samsung Electric Company SAMSUNG Unknown";
estradiol1 = "Dell Inc. DELL P2214H KW14V4965YKS";
estradiol2 = "Toshiba America Info Systems Inc TOSHIBA-TV 0x01010101";
}; };
} }

View file

@ -5,6 +5,7 @@
./kanshi ./kanshi
./mako ./mako
./rofi ./rofi
./swayidle
./swaylock ./swaylock
./waybar ./waybar
./wlsunset ./wlsunset

View file

@ -28,6 +28,25 @@
]; ];
}; };
} }
{
profile = {
name = "estradiol";
outputs = [
{
criteria = config.displays.estradiol1;
position = "0,0";
}
{
criteria = config.displays.estradiol2;
position = "1920,0";
}
{
criteria = "eDP-1";
status = "disable";
}
];
};
}
{ {
profile = { profile = {
name = "docked"; name = "docked";
@ -52,7 +71,7 @@
status = "enable"; status = "enable";
mode = "800x1280@59.99900"; mode = "800x1280@59.99900";
transform = "270"; transform = "270";
scale = 1.0; scale = 1.15;
} }
]; ];
}; };

View file

@ -15,7 +15,6 @@
Shutdown) poweroff;; Shutdown) poweroff;;
Reboot) reboot;; Reboot) reboot;;
Lock) swaylock;; Lock) swaylock;;
Sleep) swaylock & systemctl suspend;;
Kill) pkill -9 $XDG_CURRENT_DESKTOP;; Kill) pkill -9 $XDG_CURRENT_DESKTOP;;
esac esac
'') '')

View file

@ -0,0 +1,35 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.home.desktop.enable {
services.swayidle = {
enable = config.home.desktop.enable;
timeouts = [
{
timeout = 1800;
command = "notify-send 'Locking in 30 seconds'";
}
{
timeout = 1830;
command = "swaylock";
}
{
timeout = 3600;
command = "swaymsg 'output * dpms off'";
resumeCommand = "swaymsg 'output * dpms on'";
}
{
timeout = 3605;
command = "systemctl suspend";
}
];
events = [
{
event = "before-sleep";
command = "swaylock";
}
];
};
home.packages = with pkgs; [ sway-audio-idle-inhibit ];
};
}

View file

@ -9,6 +9,9 @@
{ command = "foot -a music -T Music ncmpcpp"; } { command = "foot -a music -T Music ncmpcpp"; }
{ command = "foot -a sound -T Sound pulsemixer"; } { command = "foot -a sound -T Sound pulsemixer"; }
# Daemons and tray
{ command = "sway-audio-idle-inhibit"; }
# Foreground # Foreground
{ command = "thunderbird"; } { command = "thunderbird"; }
{ command = "vesktop"; } { command = "vesktop"; }

View file

@ -40,6 +40,11 @@
(assign "${config.displays.tower1}" workspaces1) ++ (assign "${config.displays.tower1}" workspaces1) ++
(assign "${config.displays.tower2}" workspaces2) ++ (assign "${config.displays.tower2}" workspaces2) ++
(assign "${config.displays.tower3}" workspaces3) ++ (assign "${config.displays.tower3}" workspaces3) ++
(assign "${config.displays.tower4}" workspaces4); (assign "${config.displays.tower3}" workspaces4) ++
(assign "${config.displays.estradiol1}" workspaces1) ++
(assign "${config.displays.estradiol1}" workspaces2) ++
(assign "${config.displays.estradiol1}" workspaces4) ++
(assign "${config.displays.estradiol2}" workspaces3);
}; };
} }