mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-17 23:37:47 +02:00
Compare commits
No commits in common. "b74a23af1da3cfc2a4c46184f93466998f81cf51" and "3cfd34313ee20174329290c2c6065f0f43c430ed" have entirely different histories.
b74a23af1d
...
3cfd34313e
@ -3,17 +3,9 @@
|
|||||||
# Adapted from a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
# Adapted from a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||||
|
|
||||||
wall_desk=${WALLPAPER_DESKTOP:-$XDG_DATA_HOME/bg}
|
wall_desk=${WALLPAPER_DESKTOP:-$XDG_DATA_HOME/bg}
|
||||||
lightdm_desk=${WALLPAPER_LIGHTDM:-$XDG_DATA_HOME/lightdm}
|
|
||||||
wall_lock=${WALLPAPER_LOCK:-$XDG_DATA_HOME/lock}
|
wall_lock=${WALLPAPER_LOCK:-$XDG_DATA_HOME/lock}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
lightdm) trueloc="$(readlink -f "$2")" &&
|
|
||||||
case "$(file --mime-type -b "$trueloc")" in
|
|
||||||
image/* ) sudo cp "$(readlink -f "$2")" "$lightdm_desk" && notify-send -i "$lightdm_desk" "LightDM wallpaper has been changed." ;;
|
|
||||||
inode/directory ) sudo cp "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$lightdm_desk" && notify-send -i "$lightdm_desk" "Random LightDM wallpaper chosen." ;;
|
|
||||||
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
|
||||||
esac
|
|
||||||
xwallpaper --stretch "$wall_desk" ;;
|
|
||||||
desktop) trueloc="$(readlink -f "$2")" &&
|
desktop) 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_desk" && notify-send -i "$wall_desk" "Desktop wallpaper has been changed." ;;
|
image/* ) ln -f "$(readlink -f "$2")" "$wall_desk" && notify-send -i "$wall_desk" "Desktop wallpaper has been changed." ;;
|
||||||
@ -27,29 +19,20 @@ case "$1" in
|
|||||||
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 ;;
|
||||||
all) wallpaper lightdm "$2" &&
|
both) wallpaper desktop "$2" &&
|
||||||
wallpaper lock "$2" &&
|
wallpaper lock "$2";;
|
||||||
wallpaper desktop "$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.
|
||||||
|
|
||||||
Allowed options:
|
Allowed options:
|
||||||
|
|
||||||
desktop [PATH] Set the wallpaper of the desktop to the specified path.
|
desktop [PATH] Set the wallpaper of the desktop to the specified path.
|
||||||
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
|
||||||
lightdm [PATH] Set the wallpaper of the lightdm screen to the specified
|
specified path.
|
||||||
path.
|
|
||||||
If no path is given reset it.
|
If no path is given reset it.
|
||||||
|
|
||||||
all [PATH] Set wallpaper for both lock screen, the dektop and the
|
|
||||||
lightdm screen to a specified path.
|
|
||||||
If no path is given reset it.
|
|
||||||
|
|
||||||
all else Print this message
|
all else Print this message
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/etc/lightdm/background.jpg
|
|
Loading…
x
Reference in New Issue
Block a user