mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-19 08:17:47 +02:00
Compare commits
No commits in common. "320d84e302c44342ce6fc8d9280c929e2fc15649" and "9c2d1ddbe697a5b534ce4818d541b87e1953a978" have entirely different histories.
320d84e302
...
9c2d1ddbe6
@ -12,15 +12,13 @@ case "$1" in
|
|||||||
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$wall_desk" && notify-send -i "$wall_desk" "Random desktop wallpaper chosen." ;;
|
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$wall_desk" && notify-send -i "$wall_desk" "Random desktop wallpaper chosen." ;;
|
||||||
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
||||||
esac
|
esac
|
||||||
xwallpaper --stretch "$wall_desk" ;;
|
xwallpaper --zoom "$wall_desk" ;;
|
||||||
lock) trueloc="$(readlink -f "$2")" &&
|
lock) trueloc="$(readlink -f "$2")" &&
|
||||||
case "$(file --mime-type -b "$trueloc")" in
|
case "$(file --mime-type -b "$trueloc")" in
|
||||||
image/* ) ln -f "$(readlink -f "$2")" "$wall_lock" && notify-send -i "$wall_lock" "Lock screen wallpaper has been changed." ;;
|
image/* ) ln -f "$(readlink -f "$2")" "$wall_lock" && notify-send -i "$wall_lock" "Lock screen wallpaper has been changed." ;;
|
||||||
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$wall_lock" && notify-send -i "$wall_lock" "Random lock screen wallpaper chosen." ;;
|
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$wall_lock" && notify-send -i "$wall_lock" "Random lock screen wallpaper chosen." ;;
|
||||||
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
||||||
esac ;;
|
esac ;;
|
||||||
both) wallpaper desktop "$2" &&
|
|
||||||
wallpaper lock "$2";;
|
|
||||||
*) cat << EOF
|
*) cat << EOF
|
||||||
wallpaper: cli script to set and reset the wallpaper of the desktop and lock
|
wallpaper: cli script to set and reset the wallpaper of the desktop and lock
|
||||||
screen.
|
screen.
|
||||||
@ -30,9 +28,6 @@ Allowed options:
|
|||||||
If no path is given reset it.
|
If no path is given reset it.
|
||||||
lock [PATH] Set the wallpaper of the lock screen to the specified path.
|
lock [PATH] Set the wallpaper of the lock screen to the specified path.
|
||||||
If no path is given reset it.
|
If no path is given reset it.
|
||||||
both [PATH] Set wallpaper for both lock screen and dektop to a
|
|
||||||
specified path.
|
|
||||||
If no path is given reset it.
|
|
||||||
all else Print this message
|
all else Print this message
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user