Skip to content

Instantly share code, notes, and snippets.

@ammgws
Created October 30, 2024 07:33
Show Gist options
  • Save ammgws/b1dc6dad2b5683bbb2e2841d4a355faf to your computer and use it in GitHub Desktop.
Save ammgws/b1dc6dad2b5683bbb2e2841d4a355faf to your computer and use it in GitHub Desktop.
set filename /tmp/swaybg_kernelupdate_"$WAYLAND_DISPLAY"
printf 'text 0,0 "Kernel was updated, restart!!!\n\nRunning: %s\nInstalled: %s"' "$running_version" "$installed_version" > "$filename".txt
convert \
-size 1920x1080 xc:black \
-pointsize 85 \
-fill red \
-gravity center \
-draw @"$filename".txt "$filename".png
swaymsg output '*' bg "$filename".png stretch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment