add nitrogen support to cinnamon/nemo (TBT!)

This commit is contained in:
Francois B 2018-06-05 09:13:53 +02:00
parent 85c0ef6c13
commit cec17db99c
3 changed files with 39 additions and 2 deletions

View file

@ -113,6 +113,17 @@ function isMate () {
fi
}
#
# heck if DE is Cinnamon
#
function isCinnamon () {
if [[ $DESKTOP_SESSION == *"cinnamon"* ]]; then
return 0
else
return 1
fi
}
#
# check and install required dependencies for Yggdrasil
#

View file

@ -1374,6 +1374,19 @@ function nitrogen_PostTrtFct () {
runCmd "gsettings set org.mate.background show-desktop-icons false" \
"disabling Caja desktop icons management"
createAppShortcut "bash -c \"sleep 10; nitrogen --restore\"" \
"/usr/share/icons/hicolor/48x48/apps/nitrogen.png" \
"Utility;GTK" \
"Nitrogen" \
"local" \
"start"
update-menus
elif isCinnamon; then
runCmd "gsettings set org.nemo.desktop draw-background false" \
"disabling Caja background management"
runCmd "gsettings set org.nemo.desktop show-desktop-icons false" \
"disabling Caja desktop icons management"
createAppShortcut "bash -c \"sleep 10; nitrogen --restore\"" \
"/usr/share/icons/hicolor/48x48/apps/nitrogen.png" \
"Utility;GTK" \
@ -1382,6 +1395,6 @@ function nitrogen_PostTrtFct () {
"start"
update-menus
else
printf "[ERR] only Mate Desktop is currently supported\n"
printf "[ERR] only Mate/Cinnamon Desktop is currently supported\n"
fi
}

View file

@ -1178,6 +1178,19 @@ function nitrogen_PostTrtFct () {
runCmd "gsettings set org.mate.background show-desktop-icons false" \
"disabling Caja desktop icons management"
createAppShortcut "bash -c \"sleep 10; nitrogen --restore\"" \
"/usr/share/icons/hicolor/48x48/apps/nitrogen.png" \
"Utility;GTK" \
"Nitrogen" \
"local" \
"start"
update-menus
elif isCinnamon; then
runCmd "gsettings set org.nemo.desktop draw-background false" \
"disabling Caja background management"
runCmd "gsettings set org.nemo.desktop show-desktop-icons false" \
"disabling Caja desktop icons management"
createAppShortcut "bash -c \"sleep 10; nitrogen --restore\"" \
"/usr/share/icons/hicolor/48x48/apps/nitrogen.png" \
"Utility;GTK" \
@ -1186,6 +1199,6 @@ function nitrogen_PostTrtFct () {
"start"
update-menus
else
printf "[ERR] only Mate Desktop is currently supported\n"
printf "[ERR] only Mate/Cinnamon Desktop is currently supported\n"
fi
}