This commit is contained in:
NAME
2022-06-18 15:15:18 -04:00
parent dc915e293f
commit f1cad2f3cd
+5 -4
View File
@@ -28,21 +28,22 @@ odict(){
# Linux specific functions
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
set_wallpaper(){
function set_wallpaper(){
local file=$1
# convert to abs path
if [[ ! "$file" = /* ]]; then
file=$(pwd)/$1
fi
gsettings set org.gnome.desktop.background picture-uri file://$file
}
}
fi
# Mac OSX specific functions
if [[ "$OSTYPE" == "darwin"* ]]; then
set_wallpaper(){
function set_wallpaper(){
local file=$1
# convert to abs path
if [[ ! "$file" = /* ]]; then
@@ -51,7 +52,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
apple_script_single_desk="tell application \"Finder\" to set desktop picture to POSIX file \"$file\""
osascript -e "$apple_script_single_desk"
}
}
fi