diff --git a/core_functions.sh b/core_functions.sh index db0647b..f5abb2a 100644 --- a/core_functions.sh +++ b/core_functions.sh @@ -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 # diff --git a/repo_functions_ub1604.sh b/repo_functions_ub1604.sh index ac09ddd..20e8011 100644 --- a/repo_functions_ub1604.sh +++ b/repo_functions_ub1604.sh @@ -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 } diff --git a/repo_functions_ub1804.sh b/repo_functions_ub1804.sh index cf2fb20..7dddaf0 100644 --- a/repo_functions_ub1804.sh +++ b/repo_functions_ub1804.sh @@ -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 }