Skip to content

Per output background example

Jovan Lanik edited this page Jul 11, 2023 · 2 revisions

Example

This example is adapted from https://github.com/jovanlanik/gtklock/issues/16#issuecomment-1155142522.

Screenshot

image

Dependencies

Files

  • lock.sh (somewhere in $PATH)
#!/bin/sh
for o in HDMI-A-2 DP-1 eDP-1
do
	grim -o "$o" "/tmp/$o.png"
	corrupter "/tmp/$o.png" "/tmp/$o.png" &
done
wait
exec gtklock -s ~/.config/gtklock/style.css "$@"
  • style.css (by default ~/.config/gtklock/style.css)
window#HDMI-A-2 {
	background-image: url("/tmp/HDMI-A-2.png");
}
window#DP-1 {
	background-image: url("/tmp/DP-1.png");
}
window#eDP-1 {
	background-image: url("/tmp/eDP-1.png");
}

#window-box {
	padding: 64px;
	border: 1px solid black;
	border-radius: 4px;
	box-shadow: rgba(0, 0, 0, 0.5) 0px 4px 12px;
	background-color: white;
}
Clone this wiki locally