Skip to content

Commit e37eaa3

Browse files
committed
Make backgroundchooser compattible with i3 and Gnome
1 parent aa82690 commit e37eaa3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

backgroundchooser

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,16 @@ elif [ $link -eq 1 ];then
170170
else
171171
# Set that background
172172
log "I have chosen $background"
173-
feh --bg-fill $background
173+
if [ "$XDG_CURRENT_DESKTOP" == "i3" ];then
174+
feh --bg-fill $background
175+
elif [ "$XDG_CURRENT_DESKTOP" == "GNOME" ];then
176+
gsettings set org.gnome.desktop.background picture-uri $background
177+
gsettings set org.gnome.desktop.background picture-uri-dark $background
178+
else
179+
gsettings set org.gnome.desktop.background picture-uri $background
180+
gsettings set org.gnome.desktop.background picture-uri-dark $background
181+
#die 12 "I don't yet know how to set a background on $XDG_CURRENT_DESKTOP"
182+
fi
174183
fi
175184

176185
exit 0

0 commit comments

Comments
 (0)