按键和盖子的响应动作archlinux

Posted on 2020-03-02 11:49  hulk190  阅读(423)  评论(0编辑  收藏  举报

此内容仅作为参考,安装mate-power-manager可做到低电量提示!!!

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandleSuspendKey=suspend
HandlePowerKey=lock
#HandlePowerKey=poweroff
#HandleHibernateKey=hibernate
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#HandleLidSwitch=suspend
HandleLidSwitch=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

保存文件后,执行 systemctl restart systemd-logind 使其生效。

PercentageLow=15 #<=15%低电量 

PercentageCritical=10 #<=10%警告电量

PercentageAction=5 #<=5%执行动作(即CriticalPowerAction)的电量

CriticalPowerAction=PowerOff #(在本示例中是电量<=5%)执行休眠

CriticalPowerAction的取值有Poweroff、Hibernate和Hybid-sleep。