Set wallpaper in sway
This commit is contained in:
parent
d31f971717
commit
ad890cc43f
3 changed files with 20 additions and 2 deletions
16
bin/set_wallpaper
Executable file
16
bin/set_wallpaper
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
WALLPAPER_DIRECTORY="$HOME/pictures/wallpapers/enabled"
|
||||
WALLPAPER_FILE="$(find "$WALLPAPER_DIRECTORY" -type l -print | shuf | head -n 1)"
|
||||
|
||||
case "$1" in
|
||||
sway)
|
||||
swaymsg --quiet output "*" bg "$WALLPAPER_FILE" fill
|
||||
;;
|
||||
*)
|
||||
hash feh 2>/dev/null && feh --bg-scale "$WALLPAPER_FILE"
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue