comparison .chezmoiscripts/run_onchange_after_16-configure-ubuntu-gnome.sh.tmpl @ 1035:45d1a5571c52

feat: enable hibernation in menu
author Zeger Van de Vannet <zeger@vandevan.net>
date Thu, 13 Jun 2024 19:39:13 +0200
parents 72744c944497
children
comparison
equal deleted inserted replaced
1034:b5a2fd26f4d4 1035:45d1a5571c52
5 if [ -x "$(command -v dconf)" ]; then 5 if [ -x "$(command -v dconf)" ]; then
6 6
7 dconf write /org/gnome/desktop/input-sources/xkb-options "['ctrl:nocaps']" 7 dconf write /org/gnome/desktop/input-sources/xkb-options "['ctrl:nocaps']"
8 8
9 fi 9 fi
10
11 sudo mkdir -p /etc/polkit-1/localauthority/50-local.d
12 sudo apt install polkitd-pkla
13
14 cat <<EOF
15 [Re-enable hibernate by default in upower]
16 Identity=unix-user:*
17 Action=org.freedesktop.upower.hibernate
18 ResultActive=yes
19
20 [Re-enable hibernate by default in logind]
21 Identity=unix-user:*
22 Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
23 ResultActive=yes
24 EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
10 {{- end }} 25 {{- end }}
11 {{- end }} 26 {{- end }}