screensaver (xss-lock/i3lock)

pacman -S xss-lock
  • set to use i3lock as a locker
xss-lock --transfer-sleep-lock -- i3lock --nofork --image=$HOME/Pictures/config/screensaver &
  • for i3lock, --nofork prevents multiple instances and set background image
  • manually trigger lock
loginctl lock-session

picom transparency leaks screen after lock

  • picom set to make inactive windows slightly transparent (inactive-opacity = 0.9;)
  • this causes i3lock to also become transparent, leaking your desktop screen
  • see reddit - Picom make i3lock opaque
  • edit ~/.config/picom/picom.conf, add
opacity-rule = [ "100:class_g = 'i3lock'" ];

using picom-trans?

  • man picom
       --opacity-rule OPACITY:'CONDITION'
           Specify a list of opacity rules, in the format PERCENT:PATTERN, like
           50:name *= "Firefox". picom-trans is recommended over this.
  • okay, man picom-trans, should be ran like
picom-trans -n "i3lock" 100
  • however, this has to happen after the window exists
  • hard to do, since i3lock is should be ran with --nofork

archive

  • below simply doesn't work, works when running i3lock from a terminal but not when actually triggered (by sleep or with loginctl lock-session)
  • follow the instructions for slock in the picom article: arch wiki - picom
  • install xwininfo
sudo pacman -S xorg-xwininfo
  • run the command and click to get the window id
xwininfo & i3lock --nofork --image=$HOME/Pictures/config/screensaver
  • use the discovered id to have picom exclude the window
picom --daemon --focus-exclude 'id = 0x4600007'