Comments (17)
Seems to work, though after a suspend the screen is shown for a second before the lockscreen appears. But that's probably more on my side.
Thanks :)
from betterlockscreen.
Please retry newest release, can't reproduce as I don't use betterlockscreen anymore but open to pull-requests if the issue gets confirmed.
from betterlockscreen.
The problem still persists for me. I wonder whether I am on the only one with that problem now… This issue did not gain a single reaction as far as I can judge and that should be a relatively glaring problem.
from betterlockscreen.
Moving the lockargs+=(-n)
below the lockargs=()
works for me and has the same effect as hardcoding --no-fork
as outlined in the OP.
Before:
❯ betterlockscreen -l
[B] Betterlockscreen
[*] Running prelock...
Fr 1. Sep 10:07:34 CEST 2023
[*] Locking screen...
[*] Running postlock...
Fr 1. Sep 10:07:34 CEST 2023
After:
❯ betterlockscreen -l
[B] Betterlockscreen
[*] Running prelock...
Fr 1. Sep 10:07:51 CEST 2023
[*] Locking screen...
[*] Running postlock...
Fr 1. Sep 10:07:54 CEST 2023
from betterlockscreen.
Same issue here. My dunst is still sending notifications after locking the screen with betterlockscreen -l
, even when I put dunstctl set-paused true
into the custom-pre.sh, and nothing in the custom-post.sh.
I used sleep 5 && dunstctl is-paused
on one terminal, and then quickly locked the screen with betterlockscreen -l
on another terminal. When I was back from the lockscreen, the result indicated that dunst was in fact not paused when the screen was locked.
I have no idea why this is happening, but I do consider the post-lock function being executed right after the screen is locked as a possible cause. If so, it would be weird to me, shouldn't the post-lock function be executed after the screen is UNlocked?
I am using the newest release and bspwm btw.
from betterlockscreen.
From my point of view the suggested --no-fork
is already there (https://github.com/betterlockscreen/betterlockscreen/blob/next/betterlockscreen#L850), could you try out to replace line 307 (https://github.com/betterlockscreen/betterlockscreen/blob/next/betterlockscreen#L307) with this:
lockselect "$@" &
does that help?
from betterlockscreen.
Nope, dunst is still showing notifications after, sry about that...
Btw I have checked multiple related issues, some of them mentioned about compton like picom, but even with unredir-if-possible = true
being written in picom's config file, the problem still remain.
from betterlockscreen.
I don't see what/why picom/compton as compositor should have todo with dunst not pausing notifications right?
Can you place set -x
at the top of betterlockscreen and post the full output for more information's please?
from betterlockscreen.
Sure, there you go:
+ lockargs+=(-n)
+ init_config
+ display_on=0
+ span_image=false
+ lock_timeout=300
+ fx_list=(dim blur dimblur pixel dimpixel color)
+ dim_level=40
+ blur_level=1
+ pixel_scale=10,1000
+ solid_color=333333
+ description=
+ quiet=false
+ i3lockcolor_bin=i3lock-color
+ suspend_command='systemctl suspend'
+ cmd_exists i3lock-color
+ command -v i3lock-color
+ cmd_exists i3lock
+ command -v i3lock
+ i3lockcolor_bin=i3lock
+ loginbox=00000066
+ loginshadow=00000000
+ locktext='Type password to unlock...'
+ font=sans-serif
+ ringcolor=ffffffff
+ insidecolor=00000000
+ separatorcolor=00000000
+ ringvercolor=ffffffff
+ insidevercolor=00000000
+ ringwrongcolor=ffffffff
+ insidewrongcolor=d23c3dff
+ timecolor=ffffffff
+ time_format=%H:%M:%S
+ greetercolor=ffffffff
+ layoutcolor=ffffffff
+ keyhlcolor=d23c3dff
+ bshlcolor=d23c3dff
+ veriftext=Verifying...
+ verifcolor=ffffffff
+ wrongtext='Failure!'
+ wrongcolor=d23c3dff
+ modifcolor=d23c3dff
+ bgcolor=000000ff
+ wallpaper_cmd='feh --bg-fill'
+ USER_CONF_DIR=/home/last/.config
+ USER_CONF=/home/last/.config/betterlockscreenrc
+ SYS_CONF=/etc/betterlockscreenrc
+ XDG_USER_CONF=/home/last/.config/betterlockscreen/betterlockscreenrc
+ '[' -e /etc/betterlockscreenrc ']'
+ '[' -e /home/last/.config/betterlockscreenrc ']'
+ '[' -e /home/last/.config/betterlockscreen/betterlockscreenrc ']'
+ source /home/last/.config/betterlockscreen/betterlockscreenrc
++ display_on=0
++ span_image=false
++ lock_timeout=300
++ fx_list=(dim blur dimblur pixel dimpixel color)
++ dim_level=40
++ blur_level=1
++ pixel_scale=10,1000
++ solid_color=333333
++ wallpaper_cmd='feh --bg-fill'
++ quiet=false
++ loginbox=00000066
++ loginshadow=00000000
++ locktext='Type password to unlock...'
++ font='Noto Sans'
++ ringcolor=ffffffff
++ insidecolor=00000000
++ separatorcolor=00000000
++ ringvercolor=ffffffff
++ insidevercolor=00000000
++ ringwrongcolor=ffffffff
++ insidewrongcolor=d23c3dff
++ timecolor=ffffffff
++ time_format=%H:%M:%S
++ greetercolor=ffffffff
++ layoutcolor=ffffffff
++ keyhlcolor=d23c3dff
++ bshlcolor=d23c3dff
++ veriftext=Verifying...
++ verifcolor=ffffffff
++ wrongtext='Failure!'
++ wrongcolor=d23c3dff
++ modifcolor=d23c3dff
++ bgcolor=000000ff
+ cmd_exists i3lock
+ command -v i3lock
+ VERSION=4.1.0
+ CACHE_DIR=/home/last/.cache/betterlockscreen
+ CUR_DIR=/home/last/.cache/betterlockscreen/current
+ CUR_W_RESIZE=/home/last/.cache/betterlockscreen/current/wall_resize.png
+ CUR_W_DIM=/home/last/.cache/betterlockscreen/current/wall_dim.png
+ CUR_W_BLUR=/home/last/.cache/betterlockscreen/current/wall_blur.png
+ CUR_W_DIMBLUR=/home/last/.cache/betterlockscreen/current/wall_dimblur.png
+ CUR_W_PIXEL=/home/last/.cache/betterlockscreen/current/wall_pixel.png
+ CUR_W_DIMPIXEL=/home/last/.cache/betterlockscreen/current/wall_dimpixel.png
+ CUR_W_COLOR=/home/last/.cache/betterlockscreen/current/wall_color.png
+ CUR_L_RESIZE=/home/last/.cache/betterlockscreen/current/lock_resize.png
+ CUR_L_DIM=/home/last/.cache/betterlockscreen/current/lock_dim.png
+ CUR_L_BLUR=/home/last/.cache/betterlockscreen/current/lock_blur.png
+ CUR_L_DIMBLUR=/home/last/.cache/betterlockscreen/current/lock_dimblur.png
+ CUR_L_PIXEL=/home/last/.cache/betterlockscreen/current/lock_pixel.png
+ CUR_L_DIMPIXEL=/home/last/.cache/betterlockscreen/current/lock_dimpixel.png
+ CUR_L_COLOR=/home/last/.cache/betterlockscreen/current/lock_color.png
++ cut -d ' ' -f4
+++ xset q
+++ sed -n 25p
+ DEFAULT_TIMEOUT=600
++ xset q
++ awk '/^[[:blank:]]*DPMS is/ {print $(NF)}'
+ DEFAULT_DPMS=Enabled
+ DUNST_INSTALLED=false
++ command -v dunstctl
+ [[ -e /usr/bin/dunstctl ]]
+ DUNST_INSTALLED=true
+ DUNST_IS_PAUSED=false
+ [[ true == \t\r\u\e ]]
++ dunstctl is-paused
+ DUNST_IS_PAUSED=false
+ FEH_INSTALLED=false
++ command -v feh
+ [[ -e /usr/bin/feh ]]
+ FEH_INSTALLED=true
+ [[ -l = '' ]]
+ lockargs=()
+ for arg in "$@"
+ [[ - = \- ]]
+ case "$1" in
+ runlock=true
+ [[ '' = \- ]]
+ lockstyle=
+ shift 2
+ echof header Betterlockscreen
+ local prefix=header
+ local message=Betterlockscreen
+ case "$prefix" in
+ msgpfx='[\e[1;95mB\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;95mB\e[m] Betterlockscreen'
[B] Betterlockscreen
+ [[ -n '' ]]
+ [[ -n true ]]
+ lockinit ''
+ pgrep -u last i3lock
+ echof act 'Running prelock...'
+ local prefix=act
+ local 'message=Running prelock...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Running prelock...'
[*] Running prelock...
+ prelock
+ '[' Enabled == Enabled ']'
+ xset dpms 300
+ [[ true == \t\r\u\e ]]
+ [[ false == \f\a\l\s\e ]]
+ dunstctl set-paused true
+ '[' -e /home/last/.config/custom-pre.sh ']'
+ [[ -n '' ]]
+ lockselect ''
+ case "$1" in
+ '[' -f /home/last/.cache/betterlockscreen/current/lock_resize.png ']'
+ lock /home/last/.cache/betterlockscreen/current/lock_resize.png
+ echof act 'Locking screen...'
+ local prefix=act
+ local 'message=Locking screen...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Locking screen...'
[*] Locking screen...
+ local image=/home/last/.cache/betterlockscreen/current/lock_resize.png
+ local fontlg=32
+ local fontmd=16
+ local fontsm=12
+ i3lock --image /home/last/.cache/betterlockscreen/current/lock_resize.png --color 000000ff --screen 0 --ind-pos=x+310:y+h-80 --radius=25 --ring-width=5 --inside-color=00000000 --ring-color=ffffffff --separator-color=00000000 --insidever-color=00000000 --insidewrong-color=d23c3dff --ringver-color=ffffffff --ringwrong-color=ffffffff --line-uses-inside --keyhl-color=d23c3dff --bshl-color=d23c3dff --clock --force-clock --time-pos=ix-265:iy-10 --time-align 1 --time-str %H:%M:%S --time-color=ffffffff '--time-font=Noto Sans' --time-size=32 --date-str '' --greeter-pos=ix-265:iy+12 --greeter-align 1 --greeter-text 'Type password to unlock...' --greeter-color=ffffffff '--greeter-font=Noto Sans' --greeter-size=16 --layout-pos=ix-265:iy+32 --layout-align 1 --layout-color=ffffffff '--layout-font=Noto Sans' --layout-size=12 --verif-pos=ix+35:iy-34 --verif-align 2 --verif-text=Verifying... --verif-color=ffffffff '--verif-font=Noto Sans' --verif-size=12 --wrong-pos=ix+24:iy-34 --wrong-align 2 '--wrong-text=Failure!' --wrong-color=d23c3dff '--wrong-font=Noto Sans' --wrong-size=12 --modif-pos=ix+45:iy+43 --modif-align 2 --modif-size=12 --modif-color=d23c3dff --noinput-text= --pass-media-keys --pass-screen-keys --pass-volume-keys --pass-power-keys
+ echof act 'Running postlock...'
+ local prefix=act
+ local 'message=Running postlock...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Running postlock...'
[*] Running postlock...
+ postlock
+ '[' Enabled == Enabled ']'
+ xset dpms 600
+ [[ true == \t\r\u\e ]]
+ [[ false == \f\a\l\s\e ]]
+ dunstctl set-paused false
+ '[' -e /home/last/.config/custom-post.sh ']'
+ exit 0
Whats more, if I manually pause dunst with dunstctl set-paused true
and then lock the screen with betterlockscreen -l
, then its done, no notification on the lockscreen anymore. Btw writing that command into custom-pre.sh
does not help as well.
from betterlockscreen.
Can you add date
output to prelock and postlock and wait between locking and unlocking around 15-30 seconds and repost the logs?
I want to ensure if postlock is called after unlocking or right after locking if you have another idea how to do that.
Did you check your journalctl or dunst-service logs if the command raised any silent/logged errors in background?
from betterlockscreen.
I found multiple errors using journalctl, they all look like this: dunst[9842]: CRITICAL: Source ID 165 was not found when attempting to remove it
+ lockargs+=(-n)
+ init_config
+ display_on=0
+ span_image=false
+ lock_timeout=300
+ fx_list=(dim blur dimblur pixel dimpixel color)
+ dim_level=40
+ blur_level=1
+ pixel_scale=10,1000
+ solid_color=333333
+ description=
+ quiet=false
+ i3lockcolor_bin=i3lock-color
+ suspend_command='systemctl suspend'
+ cmd_exists i3lock-color
+ command -v i3lock-color
+ cmd_exists i3lock
+ command -v i3lock
+ i3lockcolor_bin=i3lock
+ loginbox=00000066
+ loginshadow=00000000
+ locktext='Type password to unlock...'
+ font=sans-serif
+ ringcolor=ffffffff
+ insidecolor=00000000
+ separatorcolor=00000000
+ ringvercolor=ffffffff
+ insidevercolor=00000000
+ ringwrongcolor=ffffffff
+ insidewrongcolor=d23c3dff
+ timecolor=ffffffff
+ time_format=%H:%M:%S
+ greetercolor=ffffffff
+ layoutcolor=ffffffff
+ keyhlcolor=d23c3dff
+ bshlcolor=d23c3dff
+ veriftext=Verifying...
+ verifcolor=ffffffff
+ wrongtext='Failure!'
+ wrongcolor=d23c3dff
+ modifcolor=d23c3dff
+ bgcolor=000000ff
+ wallpaper_cmd='feh --bg-fill'
+ USER_CONF_DIR=/home/last/.config
+ USER_CONF=/home/last/.config/betterlockscreenrc
+ SYS_CONF=/etc/betterlockscreenrc
+ XDG_USER_CONF=/home/last/.config/betterlockscreen/betterlockscreenrc
+ '[' -e /etc/betterlockscreenrc ']'
+ '[' -e /home/last/.config/betterlockscreenrc ']'
+ '[' -e /home/last/.config/betterlockscreen/betterlockscreenrc ']'
+ source /home/last/.config/betterlockscreen/betterlockscreenrc
++ display_on=0
++ span_image=false
++ lock_timeout=300
++ fx_list=(dim blur dimblur pixel dimpixel color)
++ dim_level=40
++ blur_level=1
++ pixel_scale=10,1000
++ solid_color=333333
++ wallpaper_cmd='feh --bg-fill'
++ quiet=false
++ loginbox=00000066
++ loginshadow=00000000
++ locktext='Type password to unlock...'
++ font='Noto Sans'
++ ringcolor=ffffffff
++ insidecolor=00000000
++ separatorcolor=00000000
++ ringvercolor=ffffffff
++ insidevercolor=00000000
++ ringwrongcolor=ffffffff
++ insidewrongcolor=d23c3dff
++ timecolor=ffffffff
++ time_format=%H:%M:%S
++ greetercolor=ffffffff
++ layoutcolor=ffffffff
++ keyhlcolor=d23c3dff
++ bshlcolor=d23c3dff
++ veriftext=Verifying...
++ verifcolor=ffffffff
++ wrongtext='Failure!'
++ wrongcolor=d23c3dff
++ modifcolor=d23c3dff
++ bgcolor=000000ff
+ cmd_exists i3lock
+ command -v i3lock
+ VERSION=4.1.0
+ CACHE_DIR=/home/last/.cache/betterlockscreen
+ CUR_DIR=/home/last/.cache/betterlockscreen/current
+ CUR_W_RESIZE=/home/last/.cache/betterlockscreen/current/wall_resize.png
+ CUR_W_DIM=/home/last/.cache/betterlockscreen/current/wall_dim.png
+ CUR_W_BLUR=/home/last/.cache/betterlockscreen/current/wall_blur.png
+ CUR_W_DIMBLUR=/home/last/.cache/betterlockscreen/current/wall_dimblur.png
+ CUR_W_PIXEL=/home/last/.cache/betterlockscreen/current/wall_pixel.png
+ CUR_W_DIMPIXEL=/home/last/.cache/betterlockscreen/current/wall_dimpixel.png
+ CUR_W_COLOR=/home/last/.cache/betterlockscreen/current/wall_color.png
+ CUR_L_RESIZE=/home/last/.cache/betterlockscreen/current/lock_resize.png
+ CUR_L_DIM=/home/last/.cache/betterlockscreen/current/lock_dim.png
+ CUR_L_BLUR=/home/last/.cache/betterlockscreen/current/lock_blur.png
+ CUR_L_DIMBLUR=/home/last/.cache/betterlockscreen/current/lock_dimblur.png
+ CUR_L_PIXEL=/home/last/.cache/betterlockscreen/current/lock_pixel.png
+ CUR_L_DIMPIXEL=/home/last/.cache/betterlockscreen/current/lock_dimpixel.png
+ CUR_L_COLOR=/home/last/.cache/betterlockscreen/current/lock_color.png
++ cut -d ' ' -f4
+++ xset q
+++ sed -n 25p
+ DEFAULT_TIMEOUT=600
++ xset q
++ awk '/^[[:blank:]]*DPMS is/ {print $(NF)}'
+ DEFAULT_DPMS=Enabled
+ DUNST_INSTALLED=false
++ command -v dunstctl
+ [[ -e /usr/bin/dunstctl ]]
+ DUNST_INSTALLED=true
+ DUNST_IS_PAUSED=false
+ [[ true == \t\r\u\e ]]
++ dunstctl is-paused
+ DUNST_IS_PAUSED=false
+ FEH_INSTALLED=false
++ command -v feh
+ [[ -e /usr/bin/feh ]]
+ FEH_INSTALLED=true
+ [[ -l = '' ]]
+ lockargs=()
+ for arg in "$@"
+ [[ - = \- ]]
+ case "$1" in
+ runlock=true
+ [[ '' = \- ]]
+ lockstyle=
+ shift 2
+ echof header Betterlockscreen
+ local prefix=header
+ local message=Betterlockscreen
+ case "$prefix" in
+ msgpfx='[\e[1;95mB\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;95mB\e[m] Betterlockscreen'
[B] Betterlockscreen
+ [[ -n '' ]]
+ [[ -n true ]]
+ lockinit ''
+ pgrep -u last i3lock
+ echof act 'Running prelock...'
+ local prefix=act
+ local 'message=Running prelock...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Running prelock...'
[*] Running prelock...
+ prelock
+ date
Fri Sep 1 07:22:48 AM CST 2023
+ '[' Enabled == Enabled ']'
+ xset dpms 300
+ [[ true == \t\r\u\e ]]
+ [[ false == \f\a\l\s\e ]]
+ dunstctl set-paused true
+ '[' -e /home/last/.config/custom-pre.sh ']'
+ [[ -n '' ]]
+ echof act 'Running postlock...'
+ lockselect ''
+ local prefix=act
+ local 'message=Running postlock...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Running postlock...'
[*] Running postlock...
+ case "$1" in
+ postlock
+ date
+ '[' -f /home/last/.cache/betterlockscreen/current/lock_resize.png ']'
+ lock /home/last/.cache/betterlockscreen/current/lock_resize.png
+ echof act 'Locking screen...'
+ local prefix=act
+ local 'message=Locking screen...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Locking screen...'
[*] Locking screen...
+ local image=/home/last/.cache/betterlockscreen/current/lock_resize.png
+ local fontlg=32
+ local fontmd=16
+ local fontsm=12
+ i3lock --image /home/last/.cache/betterlockscreen/current/lock_resize.png --color 000000ff --screen 0 --ind-pos=x+310:y+h-80 --radius=25 --ring-width=5 --inside-color=00000000 --ring-color=ffffffff --separator-color=00000000 --insidever-color=00000000 --insidewrong-color=d23c3dff --ringver-color=ffffffff --ringwrong-color=ffffffff --line-uses-inside --keyhl-color=d23c3dff --bshl-color=d23c3dff --clock --force-clock --time-pos=ix-265:iy-10 --time-align 1 --time-str %H:%M:%S --time-color=ffffffff '--time-font=Noto Sans' --time-size=32 --date-str '' --greeter-pos=ix-265:iy+12 --greeter-align 1 --greeter-text 'Type password to unlock...' --greeter-color=ffffffff '--greeter-font=Noto Sans' --greeter-size=16 --layout-pos=ix-265:iy+32 --layout-align 1 --layout-color=ffffffff '--layout-font=Noto Sans' --layout-size=12 --verif-pos=ix+35:iy-34 --verif-align 2 --verif-text=Verifying... --verif-color=ffffffff '--verif-font=Noto Sans' --verif-size=12 --wrong-pos=ix+24:iy-34 --wrong-align 2 '--wrong-text=Failure!' --wrong-color=d23c3dff '--wrong-font=Noto Sans' --wrong-size=12 --modif-pos=ix+45:iy+43 --modif-align 2 --modif-size=12 --modif-color=d23c3dff --noinput-text= --pass-media-keys --pass-screen-keys --pass-volume-keys --pass-power-keys
Fri Sep 1 07:22:48 AM CST 2023
+ '[' Enabled == Enabled ']'
+ xset dpms 600
+ [[ true == \t\r\u\e ]]
+ [[ false == \f\a\l\s\e ]]
+ dunstctl set-paused false
+ '[' -e /home/last/.config/custom-post.sh ']'
+ exit 0
pre(copied from above):
+ prelock
+ date
Fri Sep 1 07:22:48 AM CST 2023
+ '[' Enabled == Enabled ']'
post:
+ postlock
+ date
+ '[' -f /home/last/.cache/betterlockscreen/current/lock_resize.png ']'
+ lock /home/last/.cache/betterlockscreen/current/lock_resize.png
+ echof act 'Locking screen...'
+ local prefix=act
+ local 'message=Locking screen...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Locking screen...'
[*] Locking screen...
+ local image=/home/last/.cache/betterlockscreen/current/lock_resize.png
+ local fontlg=32
+ local fontmd=16
+ local fontsm=12
+ i3lock --image /home/last/.cache/betterlockscreen/current/lock_resize.png --color 000000ff --screen 0 --ind-pos=x+310:y+h-80 --radius=25 --ring-width=5 --inside-color=00000000 --ring-color=ffffffff --separator-color=00000000 --insidever-color=00000000 --insidewrong-color=d23c3dff --ringver-color=ffffffff --ringwrong-color=ffffffff --line-uses-inside --keyhl-color=d23c3dff --bshl-color=d23c3dff --clock --force-clock --time-pos=ix-265:iy-10 --time-align 1 --time-str %H:%M:%S --time-color=ffffffff '--time-font=Noto Sans' --time-size=32 --date-str '' --greeter-pos=ix-265:iy+12 --greeter-align 1 --greeter-text 'Type password to unlock...' --greeter-color=ffffffff '--greeter-font=Noto Sans' --greeter-size=16 --layout-pos=ix-265:iy+32 --layout-align 1 --layout-color=ffffffff '--layout-font=Noto Sans' --layout-size=12 --verif-pos=ix+35:iy-34 --verif-align 2 --verif-text=Verifying... --verif-color=ffffffff '--verif-font=Noto Sans' --verif-size=12 --wrong-pos=ix+24:iy-34 --wrong-align 2 '--wrong-text=Failure!' --wrong-color=d23c3dff '--wrong-font=Noto Sans' --wrong-size=12 --modif-pos=ix+45:iy+43 --modif-align 2 --modif-size=12 --modif-color=d23c3dff --noinput-text= --pass-media-keys --pass-screen-keys --pass-volume-keys --pass-power-keys
Fri Sep 1 07:22:48 AM CST 2023
+ '[' Enabled == Enabled ']'
It seems that the pre-lock and post-lock function are executed at the same time? Is it the main cause?
(I'm sure I've waited for at least 10 seconds after the screen is locked)
from betterlockscreen.
I think there is the bug - it seems that https://github.com/betterlockscreen/betterlockscreen/blob/next/betterlockscreen#L858C1-L858C12 overwrites the https://github.com/betterlockscreen/betterlockscreen/blob/next/betterlockscreen#L850 additionally lockargs does not exist at the time of the addition.
can you move lockargs=()
to line 849 and try again/post log please?
from betterlockscreen.
Log:
+ lockargs=()
+ lockargs+=(-n)
+ init_config
+ display_on=0
+ span_image=false
+ lock_timeout=300
+ fx_list=(dim blur dimblur pixel dimpixel color)
+ dim_level=40
+ blur_level=1
+ pixel_scale=10,1000
+ solid_color=333333
+ description=
+ quiet=false
+ i3lockcolor_bin=i3lock-color
+ suspend_command='systemctl suspend'
+ cmd_exists i3lock-color
+ command -v i3lock-color
+ cmd_exists i3lock
+ command -v i3lock
+ i3lockcolor_bin=i3lock
+ loginbox=00000066
+ loginshadow=00000000
+ locktext='Type password to unlock...'
+ font=sans-serif
+ ringcolor=ffffffff
+ insidecolor=00000000
+ separatorcolor=00000000
+ ringvercolor=ffffffff
+ insidevercolor=00000000
+ ringwrongcolor=ffffffff
+ insidewrongcolor=d23c3dff
+ timecolor=ffffffff
+ time_format=%H:%M:%S
+ greetercolor=ffffffff
+ layoutcolor=ffffffff
+ keyhlcolor=d23c3dff
+ bshlcolor=d23c3dff
+ veriftext=Verifying...
+ verifcolor=ffffffff
+ wrongtext='Failure!'
+ wrongcolor=d23c3dff
+ modifcolor=d23c3dff
+ bgcolor=000000ff
+ wallpaper_cmd='feh --bg-fill'
+ USER_CONF_DIR=/home/last/.config
+ USER_CONF=/home/last/.config/betterlockscreenrc
+ SYS_CONF=/etc/betterlockscreenrc
+ XDG_USER_CONF=/home/last/.config/betterlockscreen/betterlockscreenrc
+ '[' -e /etc/betterlockscreenrc ']'
+ '[' -e /home/last/.config/betterlockscreenrc ']'
+ '[' -e /home/last/.config/betterlockscreen/betterlockscreenrc ']'
+ source /home/last/.config/betterlockscreen/betterlockscreenrc
++ display_on=0
++ span_image=false
++ lock_timeout=300
++ fx_list=(dim blur dimblur pixel dimpixel color)
++ dim_level=40
++ blur_level=1
++ pixel_scale=10,1000
++ solid_color=333333
++ wallpaper_cmd='feh --bg-fill'
++ quiet=false
++ loginbox=00000066
++ loginshadow=00000000
++ locktext='Type password to unlock...'
++ font='Noto Sans'
++ ringcolor=ffffffff
++ insidecolor=00000000
++ separatorcolor=00000000
++ ringvercolor=ffffffff
++ insidevercolor=00000000
++ ringwrongcolor=ffffffff
++ insidewrongcolor=d23c3dff
++ timecolor=ffffffff
++ time_format=%H:%M:%S
++ greetercolor=ffffffff
++ layoutcolor=ffffffff
++ keyhlcolor=d23c3dff
++ bshlcolor=d23c3dff
++ veriftext=Verifying...
++ verifcolor=ffffffff
++ wrongtext='Failure!'
++ wrongcolor=d23c3dff
++ modifcolor=d23c3dff
++ bgcolor=000000ff
+ cmd_exists i3lock
+ command -v i3lock
+ VERSION=4.1.0
+ CACHE_DIR=/home/last/.cache/betterlockscreen
+ CUR_DIR=/home/last/.cache/betterlockscreen/current
+ CUR_W_RESIZE=/home/last/.cache/betterlockscreen/current/wall_resize.png
+ CUR_W_DIM=/home/last/.cache/betterlockscreen/current/wall_dim.png
+ CUR_W_BLUR=/home/last/.cache/betterlockscreen/current/wall_blur.png
+ CUR_W_DIMBLUR=/home/last/.cache/betterlockscreen/current/wall_dimblur.png
+ CUR_W_PIXEL=/home/last/.cache/betterlockscreen/current/wall_pixel.png
+ CUR_W_DIMPIXEL=/home/last/.cache/betterlockscreen/current/wall_dimpixel.png
+ CUR_W_COLOR=/home/last/.cache/betterlockscreen/current/wall_color.png
+ CUR_L_RESIZE=/home/last/.cache/betterlockscreen/current/lock_resize.png
+ CUR_L_DIM=/home/last/.cache/betterlockscreen/current/lock_dim.png
+ CUR_L_BLUR=/home/last/.cache/betterlockscreen/current/lock_blur.png
+ CUR_L_DIMBLUR=/home/last/.cache/betterlockscreen/current/lock_dimblur.png
+ CUR_L_PIXEL=/home/last/.cache/betterlockscreen/current/lock_pixel.png
+ CUR_L_DIMPIXEL=/home/last/.cache/betterlockscreen/current/lock_dimpixel.png
+ CUR_L_COLOR=/home/last/.cache/betterlockscreen/current/lock_color.png
++ cut -d ' ' -f4
+++ xset q
+++ sed -n 25p
+ DEFAULT_TIMEOUT=600
++ xset q
++ awk '/^[[:blank:]]*DPMS is/ {print $(NF)}'
+ DEFAULT_DPMS=Enabled
+ DUNST_INSTALLED=false
++ command -v dunstctl
+ [[ -e /usr/bin/dunstctl ]]
+ DUNST_INSTALLED=true
+ DUNST_IS_PAUSED=false
+ [[ true == \t\r\u\e ]]
++ dunstctl is-paused
+ DUNST_IS_PAUSED=false
+ FEH_INSTALLED=false
++ command -v feh
+ [[ -e /usr/bin/feh ]]
+ FEH_INSTALLED=true
+ [[ -l = '' ]]
+ for arg in "$@"
+ [[ - = \- ]]
+ case "$1" in
+ runlock=true
+ [[ '' = \- ]]
+ lockstyle=
+ shift 2
+ echof header Betterlockscreen
+ local prefix=header
+ local message=Betterlockscreen
+ case "$prefix" in
+ msgpfx='[\e[1;95mB\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;95mB\e[m] Betterlockscreen'
[B] Betterlockscreen
+ [[ -n '' ]]
+ [[ -n true ]]
+ lockinit ''
+ pgrep -u last i3lock
+ echof act 'Running prelock...'
+ local prefix=act
+ local 'message=Running prelock...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Running prelock...'
[*] Running prelock...
+ prelock
+ date
Fri Sep 1 08:00:46 AM CST 2023
+ '[' Enabled == Enabled ']'
+ xset dpms 300
+ [[ true == \t\r\u\e ]]
+ [[ false == \f\a\l\s\e ]]
+ dunstctl set-paused true
+ '[' -e /home/last/.config/custom-pre.sh ']'
+ [[ -n '' ]]
+ echof act 'Running postlock...'
+ local prefix=act
+ local 'message=Running postlock...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ lockselect ''
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Running postlock...'
[*] Running postlock...
+ postlock
+ date
+ case "$1" in
+ '[' -f /home/last/.cache/betterlockscreen/current/lock_resize.png ']'
+ lock /home/last/.cache/betterlockscreen/current/lock_resize.png
+ echof act 'Locking screen...'
+ local prefix=act
+ local 'message=Locking screen...'
+ case "$prefix" in
+ msgpfx='[\e[1;92m*\e[m]'
+ '[' false '!=' true ']'
+ echo -e '[\e[1;92m*\e[m] Locking screen...'
[*] Locking screen...
+ local image=/home/last/.cache/betterlockscreen/current/lock_resize.png
+ local fontlg=32
+ local fontmd=16
+ local fontsm=12
+ i3lock --image /home/last/.cache/betterlockscreen/current/lock_resize.png --color 000000ff --screen 0 --ind-pos=x+310:y+h-80 --radius=25 --ring-width=5 --inside-color=00000000 --ring-color=ffffffff --separator-color=00000000 --insidever-color=00000000 --insidewrong-color=d23c3dff --ringver-color=ffffffff --ringwrong-color=ffffffff --line-uses-inside --keyhl-color=d23c3dff --bshl-color=d23c3dff --clock --force-clock --time-pos=ix-265:iy-10 --time-align 1 --time-str %H:%M:%S --time-color=ffffffff '--time-font=Noto Sans' --time-size=32 --date-str '' --greeter-pos=ix-265:iy+12 --greeter-align 1 --greeter-text 'Type password to unlock...' --greeter-color=ffffffff '--greeter-font=Noto Sans' --greeter-size=16 --layout-pos=ix-265:iy+32 --layout-align 1 --layout-color=ffffffff '--layout-font=Noto Sans' --layout-size=12 --verif-pos=ix+35:iy-34 --verif-align 2 --verif-text=Verifying... --verif-color=ffffffff '--verif-font=Noto Sans' --verif-size=12 --wrong-pos=ix+24:iy-34 --wrong-align 2 '--wrong-text=Failure!' --wrong-color=d23c3dff '--wrong-font=Noto Sans' --wrong-size=12 --modif-pos=ix+45:iy+43 --modif-align 2 --modif-size=12 --modif-color=d23c3dff --noinput-text= --pass-media-keys --pass-screen-keys --pass-volume-keys --pass-power-keys -n
Fri Sep 1 08:00:46 AM CST 2023
+ '[' Enabled == Enabled ']'
+ xset dpms 600
+ [[ true == \t\r\u\e ]]
+ [[ false == \f\a\l\s\e ]]
+ dunstctl set-paused false
+ '[' -e /home/last/.config/custom-post.sh ']'
+ exit 0
Dunst is still sending message to locked screen :( and the output of the two date are still identical(I have waited for a while in the locked screen)
(Just in case it matters, I am using bspwm rather than i3wm)
from betterlockscreen.
Oh yes, moving lockargs+=(-n)
below lockargs=()
does help. Dunst is paused aftert lock, Cheers!
from betterlockscreen.
Also, it seems that the program would only seek for custom-pre.sh
and custom-post.sh
in ~/.config
rather than ~/.config/betterlockscreen
.
It seems that the program is still using "${XDG_CONFIG_HOME:-$HOME/.config}"
as USER_CONF_DIR
(see line 56), and the ~/.config/betterlockscreen
is not used as the config directory when executing custom scripts.(see line 134)
I believe the fix for this problem should be easy, just deprecate the previous config dir or seek custom scripts in both two dirs.
Thanks for your great work!
from betterlockscreen.
Hey, can please everyone having issues try the pull-request #395 and let me know if it fixes your issues so I can make a release?
from betterlockscreen.
Hey, can please everyone having issues try the pull-request #395 and let me know if it fixes your issues so I can make a release?
Both pausing dunst and executing custom pre/post script works perfectly for me. Thanks! :)
from betterlockscreen.
Related Issues (20)
- Wrong config file location HOT 6
- Different timeout for lock,suspend,hibernate and reusming from suspend or hibernate or a normal startup
- Change keyboard layout in lockscreen / show virtual keyboard
- Betterlockscreen not triggering on suspend HOT 8
- lockscreen and wallpaper does not work when home folder path has spaces HOT 1
- not working on fedora HOT 1
- Using default configuration file does not seem to work HOT 2
- Custom arguments to i3lock-color do not work. HOT 2
- Doesn't seem to work anymore on suspend / sleep after latest update HOT 9
- Loginbox too small on HiDPI displays HOT 1
- $DISPLAY keeps changing HOT 4
- Issue with systemd / suspend HOT 8
- Make betterlockscreen blur the image on suspend HOT 2
- Worng password no matter what I input HOT 2
- Corner radius for information box
- suspend service is not working as there is no [email protected] file in the system HOT 2
- No wallpaper shown when running betterlockscreen HOT 1
- Cant get suspend or hibernate working on NixOS HOT 1
- Cannot use file names containing braces as input.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from betterlockscreen.