Unix

Ubuntu Sway Remix - 전원버튼 disable하기

ForceCore 2026. 3. 11. 22:14

Sway가 아니라 KDE Plasma 였으면 딸깍으로 될텐데... ㅂㄷㅂㄷ

 

https://www.reddit.com/r/swaywm/comments/180ly44/how_to_change_power_button_behavior/

 

Reddit의 swaywm 커뮤니티

swaywm 커뮤니티에서 이 게시물을 비롯한 다양한 콘텐츠를 살펴보세요

www.reddit.com

 

On Arch and I suspect also on EndeavourOS you first need to configure systemd to ignore the power button.

$ [ -d /etc/systemd/logind.conf.d ] || sudo mkdir /etc/systemd/logind.conf.d
$ printf "[Login]\nHandlePowerKey=ignore\n" | sudo tee /etc/systemd/logind.conf.d/ignore-power-key.conf
Check:

$ systemd-analyze cat-config systemd/logind.conf
Activate (watch out you will be logged out):

$ sudo systemctl restart systemd-logind
Or just reboot:

$ sudo systemctl reboot
After that, you can bind the power button in your sway config:

bindsym XF86PowerOff ...

 

이 댓글이 정답이다.

HandlePowerKey=ignore 로 logind에서 전원버튼 disable

그리고 sway config에서 XF86PowerOff 버튼이 컴퓨터 끄는 명령으로 된 것을 echo hello 같이 아무것도 안 하는 명령으로 바꿔주면 된다.

 

노트북 옆면에 전원버튼이 있다니 이건 대체 누구 생각이지