mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 22:30:25 +01:00
feat: shoukei - add Lid & PowerKey settings (#207)
This commit is contained in:
@@ -40,7 +40,6 @@ bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bind = , XF86AudioNext, exec, playerctl next
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
bind = , XF86Search, exec, anyrun
|
||||
bind = , XF86PowerOff, exec, shutdown -h now
|
||||
|
||||
# WORKSPACES
|
||||
# ============================================================================
|
||||
|
||||
@@ -24,6 +24,29 @@
|
||||
# since mesa 25.1(already in nixpkgs), support for asahi is enabled by default.
|
||||
};
|
||||
|
||||
# Lid & PowerKey settings
|
||||
#
|
||||
# Suspend: Store system state to RAM - fast, requires minimal power to maintain RAM.
|
||||
# Hibernate: Store system state & RAM to Disk, and then poweroff the system.
|
||||
#
|
||||
# NOTE: Hibernate is not supported by Asahi Linux.
|
||||
services.logind = {
|
||||
lidSwitch = "suspend";
|
||||
lidSwitchExternalPower = "lock";
|
||||
# 'Docked' means: more than one display is connected or the system is inserted in a docking station
|
||||
lidSwitchDocked = "ignore";
|
||||
|
||||
powerKey = "suspend";
|
||||
powerKeyLongPress = "poweroff";
|
||||
};
|
||||
systemd.targets.sleep.enable = true;
|
||||
systemd.sleep.extraConfig = ''
|
||||
AllowSuspend=yes
|
||||
AllowHibernate=no
|
||||
AllowSuspendThenHibernate=no
|
||||
HibernateDelaySec=5min
|
||||
'';
|
||||
|
||||
# After adding this snippet, you need to restart the system for the touchbar to work.
|
||||
hardware.apple.touchBar = {
|
||||
enable = true;
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
# 1.33: scale to 1.33 times
|
||||
# bitdepth,10: enable 10 bit support
|
||||
monitor=eDP-1, highres@highrr, 0x0, 1.33, bitdepth,10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user