A while back, I created a guide about handling lid close action and locking the screen with betterlockscreen.
Since you’re using i3lock, here’s a quick tip to adapt the guide to your setup:
Wherever you see:
/usr/bin/betterlockscreen --lock
replace it with:
/usr/bin/i3lock
Here’s the link to the guide:
Shortcut (W-A-l), start jgmenu screenlocker. For changing screenlocker from i3lock to betterlockscreen, go to edit config file.
Thank you,
I made as You suggest, but I have problem.
In the part 1 section there is a spelling error
yay xxs-lock
I made all the scripts, and they are working. In my system xss-lock and i3lock can be found in the /bin directory not in the /usr/bin. So I changed the directory lines.
I started the acpid service, checked and its working.
I made a lockscreen.desktop entry for the script in the /home/usr/.config/autostart/, and it works fine.
But I dont understand - if I put it into and edit the autostart file manually, why do not start the desktop entries in the //home/usr/.config/autostart/ directory???
So yesterday it worked fine - at the end of the config. And I tried to find i3lock config file, and tried to config i3lock not to lock screen after 10 minutes, and not to get grey screen, but blur - like system uses. I run i3lock from terminal, and tried switches - but cant find this options - of course read through the manual as well.
Now it doesn’t work. When I close the lid - the system suspends, but when I open it, no screen lock. I cant find the solutions, and the reason.
So my next question is how to configure i3lock. I have read through the manual - but I would like to change a longer lock time and blur the screen as its in the Mabox system.
I looked through .config, and other places - but I cant find anything.
I saw the Screen locker menu, but I thought its for the system locker (which I can start from the Exit menu), cos if I lock the screnn from the Exit menu its lock with blurring. While when its hung up its a grey screen. It went to grey after locking - but havent restarted. Tomorrow - its late now.
I set from the Screen locker menu the blur, and thank you for the Xset config. I use the gui - but now its disabled (by me).
I have 2 more questions - these are the lasts.
Is it possible when I open the lid the numlock will On again?
Is it possible that mpv blocks the screen locking while I watch movies?
Unfortuanly i don’t use a laptop at the moment, so i can’t reproduce numlock situation.
Numlock should stay the same. Can’t give an answer to that.
About mpv.
Try this: Put this script in autostart, to start at boot.
dpms-mpv.sh
#!/bin/bash
while true; do
# Check if Stremio is running
if pgrep -x "mpv" > /dev/null; then
# Disable DPMS blanking
xset s off -dpms
fi
# Wait for X seconds before checking again
sleep 5
done
Add line to autostart…
(sleep 7s && dpms-mpv.sh) &
Mabox hotkey Toggle dpms [on of ] = (W-A-B).
Personaly i have in conky and tint2 an icon that shows me the status.
When i have more time i can make a post about the complete setup for blanking.
A quick one for now.
Name it : noblank-conky.sh and put in the ~/bin dir.