feat: screen locking
This commit is contained in:
parent
8eef329851
commit
99528721bf
|
@ -38,6 +38,10 @@ autorandr --change --force
|
||||||
mpd
|
mpd
|
||||||
picomdaemon
|
picomdaemon
|
||||||
|
|
||||||
|
# power save
|
||||||
|
xset 600
|
||||||
|
xss-lock $(command -v lock.sh) &
|
||||||
|
|
||||||
exec dbus-run-session -- awesome 2> /tmp/awesome.log
|
exec dbus-run-session -- awesome 2> /tmp/awesome.log
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
|
|
|
@ -337,10 +337,11 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
wibox.widget.systray(),
|
wibox.widget.systray(),
|
||||||
mytextclock,
|
mytextclock,
|
||||||
logout_menu_widget{
|
logout_menu_widget{
|
||||||
onpoweroff = function() awful.spawn.with_shell("sudo poweroff") end,
|
|
||||||
onlogout = awful.quit,
|
onlogout = awful.quit,
|
||||||
onreboot = function() awful.spawn.with_shell("sudo shutdown -r now") end,
|
onpoweroff = function() awful.spawn.with_shell("loginctl poweroff") end,
|
||||||
onlock = function () awful.spawn.with_shell("xset dpms force off") end
|
onreboot = function() awful.spawn.with_shell("loginctl reboot") end,
|
||||||
|
onlock = function () awful.spawn.with_shell("loginctl lock-sessions") end,
|
||||||
|
onsuspend = function() awful.spawn.with_shell("loginctl suspend") end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,7 +14,6 @@ case "$UNAMEA" in
|
||||||
pavucontrol \
|
pavucontrol \
|
||||||
ibus ibus-table ibus-table-wubi \
|
ibus ibus-table ibus-table-wubi \
|
||||||
gnome-keyring \
|
gnome-keyring \
|
||||||
xss-lock \
|
|
||||||
nitrogen \
|
nitrogen \
|
||||||
network-manager network-manager-gnome \
|
network-manager network-manager-gnome \
|
||||||
exfat-utils \
|
exfat-utils \
|
||||||
|
|
11
gui/slock.sh
11
gui/slock.sh
|
@ -4,4 +4,15 @@ DIR=$(dirname "$(readlink -f "$0")")
|
||||||
|
|
||||||
log 'Setting up slock'
|
log 'Setting up slock'
|
||||||
|
|
||||||
|
case "$UNAMEA" in
|
||||||
|
*Ubuntu*)
|
||||||
|
sudo apt install -y \
|
||||||
|
xss-lock
|
||||||
|
;;
|
||||||
|
*artix*)
|
||||||
|
sudo pacman -S --noconfirm --needed \
|
||||||
|
xss-lock
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
makeinstallrepo https://gitee.com/klesh/slock.git slock
|
makeinstallrepo https://gitee.com/klesh/slock.git slock
|
||||||
|
|
Loading…
Reference in New Issue
Block a user