working on screens and power stuff
This commit is contained in:
parent
743efa1782
commit
1b06471fa6
11 changed files with 46 additions and 91 deletions
|
@ -174,11 +174,6 @@
|
|||
swayosd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
kanshi = {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -7,51 +7,33 @@
|
|||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
ignore_dbus_inhibit = false;
|
||||
ignore_systemd_inhibit = false;
|
||||
};
|
||||
|
||||
|
||||
# TODO add screen dimming and test configurations with different monitors
|
||||
listener = [
|
||||
# battery timers
|
||||
{
|
||||
timeout = "30";
|
||||
on-timeout = "systemd-ac-power || light -O && light -S 0 && light -s razer/0003:1532:02B6.0003/backlight -S 0";
|
||||
on-resume = "light -I && light -s razer/0003:1532:02B6.0003/backlight -S 40";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = "120";
|
||||
on-timeout = "systemd-ac-power || light -O && loginctl lock-session && niri msg action power-off-monitors";
|
||||
on-resume = "light -I && light -s razer/0003:1532:02B6.0003/backlight -S 40";
|
||||
on-timeout = "systemd-ac-power || lock-power-off-monitors";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = "300";
|
||||
on-timeout = "systemd-ac-power || light -O && loginctl lock-session && systemctl suspend";
|
||||
on-resume = "light -I && light -s razer/0003:1532:02B6.0003/backlight -S 40";
|
||||
on-timeout = "systemd-ac-power || lock-suspend";
|
||||
}
|
||||
|
||||
# ac power timers
|
||||
{
|
||||
timeout = "60";
|
||||
on-timeout = "systemd-ac-power && light -O && light -S 0 && light -s razer/0003:1532:02B6.0003/backlight -S 0";
|
||||
on-resume = "light -I && light -s razer/0003:1532:02B6.0003/backlight -S 40";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = "180";
|
||||
on-timeout = "systemd-ac-power && loginctl lock-session";
|
||||
on-resume = "light -I && light -s razer/0003:1532:02B6.0003/backlight -S 40";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = "300";
|
||||
on-timeout = "systemd-ac-power && light -O && loginctl lock-session && niri msg action power-off-monitors";
|
||||
on-resume = "light -I && light -s razer/0003:1532:02B6.0003/backlight -S 40";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = "900";
|
||||
on-timeout = "systemd-ac-power && light -O && loginctl lock-session && systemctl suspend";
|
||||
on-resume = "light -I && light -s razer/0003:1532:02B6.0003/backlight -S 40";
|
||||
timeout = "600";
|
||||
on-timeout = "systemd-ac-power && loginctl lock-session && systemctl suspend";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ in {
|
|||
spawn-at-startup = [
|
||||
{ command = ["maestral_qt"]; }
|
||||
{ command = ["clipse" "-listen"]; }
|
||||
# { command = ["waybar"]; }
|
||||
{ command = ["waybar"]; }
|
||||
{ command = [ "systemctl" "--user" "restart" "xwayland-satellite.service" ]; }
|
||||
];
|
||||
|
||||
|
@ -179,10 +179,10 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
# switch-events = with config.lib.niri.actions; {
|
||||
# lid-close.action = spawn "niri msg output eDP-1 off && shikanectl switch desk-clam";
|
||||
# lid-open.action = spawn "niri msg output eDP-1 on";
|
||||
# };
|
||||
switch-events = with config.lib.niri.actions; {
|
||||
lid-close.action = spawn "shikanectl switch desk-clam";
|
||||
lid-open.action = spawn "niri msg output eDP-1 on";
|
||||
};
|
||||
|
||||
binds = with config.lib.niri.actions; let
|
||||
wez = spawn "wezterm" "--config-file" "/home/emenel/.config/wezterm/launcher.lua" "start" "--always-new-process";
|
||||
|
@ -349,7 +349,7 @@ in {
|
|||
# Powers off the monitors. To turn them back on, do any input like
|
||||
# moving the mouse or pressing any other key.
|
||||
"Mod+Shift+P".action = power-off-monitors;
|
||||
|
||||
"Mod+Shift+Alt+P".action = spawn "niri msg output eDP-1 on";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@ in {
|
|||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
systemd.enable = true;
|
||||
systemd.enable = false;
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue