New install of Ubuntu desktop 22.04. I'm trying to get Show Desktop script working for use by all users, with icon in Left Panel of apps. I've put both a shell script show-desktop.sh permissions of 644) using wmctrl and a desktop file show-desktop.desktop with permissions of 744 in /usr/share/applications. However, I don't get Show Desktop found in Activities or Apps. Here is show-desktop.desktop:
Type=Application Name=Show Desktop Exec=/usr/share/applications/show-desktop.sh Icon=desktop
Here is show-desktop.sh:
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/\2/g')"
if [ $status == "ON" ]; then wmctrl -k off else wmctrl -k on fi
What am I doing wrong?