Giter Site home page Giter Site logo

Comments (17)

I-Al-Istannen avatar I-Al-Istannen commented on June 21, 2024 2

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.

SebTM avatar SebTM commented on June 21, 2024 1

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.

I-Al-Istannen avatar I-Al-Istannen commented on June 21, 2024 1

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.

I-Al-Istannen avatar I-Al-Istannen commented on June 21, 2024 1

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.

LAST7 avatar LAST7 commented on June 21, 2024

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.

SebTM avatar SebTM commented on June 21, 2024

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.

LAST7 avatar LAST7 commented on June 21, 2024

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.

SebTM avatar SebTM commented on June 21, 2024

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.

LAST7 avatar LAST7 commented on June 21, 2024

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.

SebTM avatar SebTM commented on June 21, 2024

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.

LAST7 avatar LAST7 commented on June 21, 2024

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.

SebTM avatar SebTM commented on June 21, 2024

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.

LAST7 avatar LAST7 commented on June 21, 2024

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

img

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.

LAST7 avatar LAST7 commented on June 21, 2024

Oh yes, moving lockargs+=(-n) below lockargs=() does help. Dunst is paused aftert lock, Cheers!

from betterlockscreen.

LAST7 avatar LAST7 commented on June 21, 2024

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.

SebTM avatar SebTM commented on June 21, 2024

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.

LAST7 avatar LAST7 commented on June 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.