mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-14 00:22:39 +02: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 = , XF86AudioNext, exec, playerctl next
|
||||||
bind = , XF86AudioPrev, exec, playerctl previous
|
bind = , XF86AudioPrev, exec, playerctl previous
|
||||||
bind = , XF86Search, exec, anyrun
|
bind = , XF86Search, exec, anyrun
|
||||||
bind = , XF86PowerOff, exec, shutdown -h now
|
|
||||||
|
|
||||||
# WORKSPACES
|
# WORKSPACES
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|||||||
@@ -24,6 +24,29 @@
|
|||||||
# since mesa 25.1(already in nixpkgs), support for asahi is enabled by default.
|
# 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.
|
# After adding this snippet, you need to restart the system for the touchbar to work.
|
||||||
hardware.apple.touchBar = {
|
hardware.apple.touchBar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -6,4 +6,3 @@
|
|||||||
# 1.33: scale to 1.33 times
|
# 1.33: scale to 1.33 times
|
||||||
# bitdepth,10: enable 10 bit support
|
# bitdepth,10: enable 10 bit support
|
||||||
monitor=eDP-1, highres@highrr, 0x0, 1.33, bitdepth,10
|
monitor=eDP-1, highres@highrr, 0x0, 1.33, bitdepth,10
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user