Fix Autorandr/Lock Screen Bug
- Had a bug where autorandr would run after waking up from sleep which ran the postswitch script which would restart the window manager session, thus displaying the windows ON TOP of the lock screen - Added a simple check to only restart session if i3lock (what betterlockscreen uses) is not running
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
#!/bin/bash
|
||||
/home/sravan/.scripts/session.sh --restart & # Restart dwm
|
||||
/usr/bin/nvidia-force-comp-pipeline & # NVIDIA Force Composition Pipeline
|
||||
/usr/bin/nitrogen --restore & # Restore wallpaper
|
||||
/usr/bin/betterlockscreen -u /home/sravan/Documents/Wallpapers/Desktop/Solar_System.png & # Update lock screen wallpaper
|
||||
# Check if screen is not currently locked
|
||||
if ! pgrep -x "i3lock" > /dev/null
|
||||
then
|
||||
# Restart session
|
||||
/home/sravan/.scripts/session.sh --restart &
|
||||
fi
|
||||
|
||||
# NVIDIA Force Composition Pipeline
|
||||
/usr/bin/nvidia-force-comp-pipeline &
|
||||
|
||||
# Restore wallpaper
|
||||
/usr/bin/nitrogen --restore &
|
||||
|
||||
# Update lock screen wallpaper
|
||||
/usr/bin/betterlockscreen -u \
|
||||
/home/sravan/Documents/Wallpapers/Desktop/Solar_System.png &
|
||||
|
20
README.org
20
README.org
@@ -3069,10 +3069,22 @@ See [[https://github.com/phillipberndt/autorandr#hook-scripts][autorandr hook sc
|
||||
*** Post Switch
|
||||
|
||||
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle .config/autorandr/postswitch
|
||||
/home/sravan/.scripts/session.sh --restart & # Restart dwm
|
||||
/usr/bin/nvidia-force-comp-pipeline & # NVIDIA Force Composition Pipeline
|
||||
/usr/bin/nitrogen --restore & # Restore wallpaper
|
||||
/usr/bin/betterlockscreen -u /home/sravan/Documents/Wallpapers/Desktop/Solar_System.png & # Update lock screen wallpaper
|
||||
# Check if screen is not currently locked
|
||||
if ! pgrep -x "i3lock" > /dev/null
|
||||
then
|
||||
# Restart session
|
||||
/home/sravan/.scripts/session.sh --restart &
|
||||
fi
|
||||
|
||||
# NVIDIA Force Composition Pipeline
|
||||
/usr/bin/nvidia-force-comp-pipeline &
|
||||
|
||||
# Restore wallpaper
|
||||
/usr/bin/nitrogen --restore &
|
||||
|
||||
# Update lock screen wallpaper
|
||||
/usr/bin/betterlockscreen -u \
|
||||
/home/sravan/Documents/Wallpapers/Desktop/Solar_System.png &
|
||||
#+END_SRC
|
||||
|
||||
** Compositor
|
||||
|
Reference in New Issue
Block a user