File create-budgie-restart-menu-shortcut of Package kimi-utils-ubuntu-budgie

#!/bin/bash
# How to create a specified Encoding
# "echo "$var" | iconv --from-code=utf-8 --to-code=utf-16le --output=file2.txt

fileDir="$(xdg-user-dir HOME)/.local/share/applications"

menuFileName="restart-budgie.desktop"
fullFilePath="$fileDir/$menuFileName"

if test -f "$fullFilePath" ; then
  rm -f "$fullFilePath"
fi

echo "[Desktop Entry]" >> "$fullFilePath"
# echo "Encoding=UTF-8" >> "$fullFilePath"
echo "Name=Restart Budgie desktop" >> "$fullFilePath"
echo "Name[sv]=Starta om Budgie desktop" >> "$fullFilePath"
echo "Comment=Restart Budgie desktop" >> "$fullFilePath"
echo "Type=Application" >> "$fullFilePath"
echo "Icon=system-restart-symbolic" >> "$fullFilePath"
echo "Exec=sh -c 'nohup budgie-panel --replace > /dev/null'" >> "$fullFilePath"
echo "StartupWMClass=system" >> "$fullFilePath"
echo "Categories=System;Settings;" >> "$fullFilePath"

if test -f "$fullFilePath" ; then
  echo "[OK] Restart Budgie desktop menu item was created in:"
  echo "    $fullFilePath"
else
  echo "[ERROR] Restart Budgie desktop menu item was not created."
fi
openSUSE Build Service is sponsored by