PDA

View Full Version : [SOLVED] How To Change The "Show Desktop" Icon



nodrog1952iii
June 17th, 2010, 02:37 PM
I hate the purple "Show Desktop Icon" in Lucid and I finally figured out how to change it:


1) sudo apt-get install wmctrl
2) Create the following script and proceed as directed within the script's comments:


#!/bin/sh
# GLD's Show Desktop Button script. Here's how to do it.
# sudo apt-get install wmctrl
# Right click on the panel and select "Add To Panel".
# Choose "Custom Application Launcher".
# Use the file name of this script for the Command.
# Use whatever icon that you want. The generic Ubuntu
# Show_Desktop_Button icon is located here:
# /usr/share/gnome/help/user-guide/C/figures/show_desktop_button.png
#

if [ -f /tmp/toggle_show_desktop_$USER ]

then

wmctrl -k off
rm /tmp/toggle_show_desktop_$USER
else

wmctrl -k on
touch /tmp/toggle_show_desktop_$USER
fi


Enjoy,

Gordon

nilarimogard
June 17th, 2010, 03:56 PM
There's no need for a temp file:


#!/bin/sh
if wmctrl -m | grep "mode: ON"; then
exec wmctrl -k off
else
exec wmctrl -k on
fi

nodrog1952iii
June 17th, 2010, 04:00 PM
There's no need for a temp file:


#!/bin/sh
if wmctrl -m | grep "mode: ON"; then
exec wmctrl -k off
else
exec wmctrl -k on
fi


Cool! Thanks.