mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 15:46:12 +01:00
feat: laptop optimizations
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
./system/hyprland.nix
|
||||
./system/rofi.nix
|
||||
./system/stylix.nix
|
||||
./system/theme.nix
|
||||
./system/theme.nix
|
||||
./system/waybar.nix
|
||||
./system/wlsunset.nix
|
||||
./system/wofi.nix
|
||||
@@ -54,7 +54,7 @@
|
||||
./system/hyprland.nix
|
||||
./system/rofi.nix
|
||||
./system/stylix.nix
|
||||
./system/theme.nix
|
||||
./system/theme.nix
|
||||
./system/waybar.nix
|
||||
./system/wlsunset.nix
|
||||
./system/wofi.nix
|
||||
@@ -68,5 +68,6 @@
|
||||
./programs/helix.nix
|
||||
./programs/fastfetch.nix
|
||||
]
|
||||
else [ ];
|
||||
else
|
||||
[ ];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ lib, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
hostname,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# ------------------------------------------------
|
||||
# Needed Packages
|
||||
@@ -268,6 +274,7 @@
|
||||
################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=, preferred, auto, 1
|
||||
monitor=HDMI-A-1, preferred, 0x360, 1
|
||||
monitor=DP-1, highrr, 4480x0, 1
|
||||
monitor=DP-2, highrr, 1920x0, 1
|
||||
@@ -659,48 +666,75 @@
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
listener =
|
||||
if hostname == "zion" then
|
||||
[
|
||||
# {
|
||||
# timeout = 60;
|
||||
# on-timeout = "brightnessctl -sd asus::kbd_backlight set 0";
|
||||
# on-resume = "brightnessctl -rd asus::kbd_backlight";
|
||||
# }
|
||||
|
||||
# {
|
||||
# timeout = 60;
|
||||
# on-timeout = "brightnessctl -sd asus::kbd_backlight set 0";
|
||||
# on-resume = "brightnessctl -rd asus::kbd_backlight";
|
||||
# }
|
||||
# {
|
||||
# timeout = 80;
|
||||
# on-timeout = "brightnessctl -s set 0";
|
||||
# on-resume = "brightnessctl -r";
|
||||
# }
|
||||
|
||||
# {
|
||||
# timeout = 80;
|
||||
# on-timeout = "brightnessctl -s set 0";
|
||||
# on-resume = "brightnessctl -r";
|
||||
# }
|
||||
# {
|
||||
# timeout = 100;
|
||||
# on-timeout = "hyprctl dispatch dpms off ";
|
||||
# on-resume = "hyprctl dispatch dpms on";
|
||||
# }
|
||||
|
||||
# {
|
||||
# timeout = 100;
|
||||
# on-timeout = "hyprctl dispatch dpms off ";
|
||||
# on-resume = "hyprctl dispatch dpms on";
|
||||
# }
|
||||
# {
|
||||
# timeout = 150;
|
||||
# on-timeout = "systemctl suspend";
|
||||
# }
|
||||
{
|
||||
timeout = 300; # 5min
|
||||
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
on-resume = "brightnessctl -r"; # monitor backlight restore.
|
||||
}
|
||||
|
||||
# {
|
||||
# timeout = 150;
|
||||
# on-timeout = "systemctl suspend";
|
||||
# }
|
||||
{
|
||||
timeout = 300; # 5min
|
||||
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
on-resume = "brightnessctl -r"; # monitor backlight restore.
|
||||
}
|
||||
{
|
||||
timeout = 600; # 10min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 600; # 10min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
# {
|
||||
# timeout = 1800; # 30min
|
||||
# on-timeout = "systemctl hibernate";
|
||||
# on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
||||
# on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
||||
# }
|
||||
]
|
||||
else if hostname == "thor" then
|
||||
[
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "brightnessctl -s set 0";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
|
||||
# {
|
||||
# timeout = 1800; # 30min
|
||||
# on-timeout = "systemctl hibernate";
|
||||
# on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
||||
# on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
||||
# }
|
||||
];
|
||||
{
|
||||
timeout = 400; # 10min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 450;
|
||||
on-timeout = "hyprctl dispatch dpms off ";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
]
|
||||
else
|
||||
[ ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user