feat: switch to i3lock
This commit is contained in:
parent
52504e6879
commit
a340d8e84f
|
@ -4,7 +4,11 @@ if mpc status | grep -F '[playing]'; then
|
||||||
mpc pause
|
mpc pause
|
||||||
RESTORE=1
|
RESTORE=1
|
||||||
fi
|
fi
|
||||||
slock
|
if [ -n "$LOCKER" ]; then
|
||||||
|
$LOCKER
|
||||||
|
else
|
||||||
|
slock
|
||||||
|
fi
|
||||||
if [ "$RESTORE" = 1 ]; then
|
if [ "$RESTORE" = 1 ]; then
|
||||||
mpc play
|
mpc play
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -34,6 +34,8 @@ export VIM_MODE=enhanced
|
||||||
export XDG_RUNTIME_DIR=/tmp/runtime-klesh
|
export XDG_RUNTIME_DIR=/tmp/runtime-klesh
|
||||||
mkdir -p $XDG_RUNTIME_DIR
|
mkdir -p $XDG_RUNTIME_DIR
|
||||||
|
|
||||||
|
export LOCKER='i3lock -i /home/klesh/Nextcloud/wallpapers/1027.png -t --nofork'
|
||||||
|
|
||||||
autorandr --change --force
|
autorandr --change --force
|
||||||
mpd
|
mpd
|
||||||
picomdaemon
|
picomdaemon
|
||||||
|
|
|
@ -340,7 +340,7 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
onlogout = awful.quit,
|
onlogout = awful.quit,
|
||||||
onpoweroff = function() awful.spawn.with_shell("loginctl poweroff") end,
|
onpoweroff = function() awful.spawn.with_shell("loginctl poweroff") end,
|
||||||
onreboot = function() awful.spawn.with_shell("loginctl reboot") end,
|
onreboot = function() awful.spawn.with_shell("loginctl reboot") end,
|
||||||
onlock = function () awful.spawn.with_shell("loginctl lock-sessions") end,
|
onlock = function () awful.spawn.with_shell("loginctl lock-session") end,
|
||||||
onsuspend = function() awful.spawn.with_shell("loginctl suspend") end,
|
onsuspend = function() awful.spawn.with_shell("loginctl suspend") end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
19
gui/i3lock.sh
Executable file
19
gui/i3lock.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
DIR=$(dirname "$(readlink -f "$0")")
|
||||||
|
. "$DIR/../env.sh"
|
||||||
|
|
||||||
|
log 'Setting up i3lock'
|
||||||
|
|
||||||
|
case "$UNAMEA" in
|
||||||
|
*Ubuntu*)
|
||||||
|
sudo apt install -y \
|
||||||
|
xss-lock i3lock
|
||||||
|
;;
|
||||||
|
*artix*)
|
||||||
|
sudo pacman -S --noconfirm --needed \
|
||||||
|
xss-lock i3lock
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
echo "export LOCKER=i3lock"
|
|
@ -16,3 +16,5 @@ case "$UNAMEA" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
makeinstallrepo https://gitee.com/klesh/slock.git slock
|
makeinstallrepo https://gitee.com/klesh/slock.git slock
|
||||||
|
|
||||||
|
echo "export LOCKER=slock"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user