Activate passcode lockscreen immediately upon GUI startup on boot
This commit is contained in:
1 parent
8c2a337c0d
commit
8df412085b
53 files changed
+79
-22
No files matched your search
@@ -25,15 +25,15 @@ else
|
||||
CURRENT_STATE="$(sxmo_state.sh get)"
|
||||
fi
|
||||
|
||||
if [ "$CURRENT_STATE" != "unlock" ] && sxmo_state.sh is_locked; then
|
||||
if [ -f /tmp/bananarchy_screen_locked ] || { [ "$CURRENT_STATE" != "unlock" ] && sxmo_state.sh is_locked; }; then
|
||||
case "$ACTION" in
|
||||
"powerbutton_one"|"powerbutton_two"|"powerbutton_three"|"menuleft_one"|"menuright_one"|"enter_one"|"enter_two"|"enter_three")
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
wlopm --on "*" >/dev/null 2>&1 || sxmo_wm.sh display on
|
||||
sxmo_wm.sh display on
|
||||
if [ -f /tmp/bananarchy_screen_locked ]; then
|
||||
xlocker wake >/dev/null 2>&1 &
|
||||
else
|
||||
sxmo_wm.sh display on
|
||||
sxmo_state.sh set unlock &
|
||||
fi
|
||||
sxmo_state.sh set unlock &
|
||||
exit 0
|
||||
;;
|
||||
"voldown_one"|"volup_one")
|
||||
|
||||
@@ -78,8 +78,9 @@ if sxmo_wakelock.sh isenabled; then
|
||||
sxmo_wakelock.sh lock sxmo_not_suspendable infinite
|
||||
fi
|
||||
|
||||
# To setup initial unlock state
|
||||
sxmo_state.sh set unlock
|
||||
# Activate lockscreen upon GUI startup
|
||||
printf '1\n' > /tmp/bananarchy_screen_locked
|
||||
sxmo_state.sh set lock
|
||||
|
||||
# Turn on lisgd only on touch devices
|
||||
if [ -z "$SXMO_NO_VIRTUAL_KEYBOARD" ] && [ ! -e "$XDG_CACHE_HOME"/sxmo/sxmo.nogesture ]; then
|
||||
@@ -97,6 +98,10 @@ fi
|
||||
|
||||
# Start the desktop widget (e.g. clock)
|
||||
pidof -s conky >/dev/null 2>&1 || DISPLAY=:0 CONKY_DPY=:0 conky -c /home/user/.config/sxmo/conky.conf -d >/dev/null 2>&1 </dev/null || true
|
||||
if [ -f /tmp/bananarchy_screen_locked ]; then
|
||||
pkill -STOP -x conky 2>/dev/null || true
|
||||
xlocker wake >/dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
# It watch network changes and update the status bar icon by example
|
||||
superctl start sxmo_networkmonitor
|
||||
|
||||
Reference in new issue
Block a user