View Full Version : mouse icon
any.linux12
March 23rd, 2009, 02:48 PM
Hi
How can I change the icon on my mouse during a command that takes some time to execute and then when its finish change again to the normal icon???
thanks
Zugzwang
March 23rd, 2009, 02:59 PM
Hi
How can I change the icon on my mouse during a command that takes some time to execute and then when its finish change again to the normal icon???
thanks
It depends on what GUI framework/programming language you are using. Please tell us more.
any.linux12
March 23rd, 2009, 03:04 PM
GUI-gnome
And it's a #!/bin/sh script
Zugzwang
March 23rd, 2009, 03:14 PM
Try something like this:
`sleep 10` | zenity --progress --pulsate --auto-close
Needs "zenity" to be installed. Not precisely what you want, but close to it.
any.linux12
March 23rd, 2009, 03:19 PM
Try something like this:
`sleep 10` | zenity --progress --pulsate --auto-close
Needs "zenity" to be installed. Not precisely what you want, but close to it.
this is my script and I already have the zenity thing but I also want to change my mouse icon and the reason why I want my mouse to change is because the zenity bar does not pulsate, so, it starts it ends but you don't see anything and this script is not for me but for a simple user of my network
#!/bin/sh
user=`whoami`
LOGFILE=`mktemp -t svn_checkout.XXXXXX`
ICONPATH="`dirname $0`/svn.xpm"
list=`ssh $user@192.168.1.3 "ls /esp-server/svn"`
URL=`zenity --entry --title="Subversion: Checkout" --text="$list
Enter repository folder according to the the aboves:" --entry-text="" --width=400 --window-icon="$ICONPATH" 2>&1`
while [ `svn checkout svn+ssh://$user@192.168.1.3/esp-server/svn/$URL &> $LOGFILE` ] ;
do
sleep 0.25
done | zenity --progress --pulsate --auto-kill --text="Wait until the ok button is enable" --window-icon="`dirname $0`/svn.xpm"
rm -f $LOGFILE
thanks
Zugzwang
March 23rd, 2009, 04:47 PM
You cannot globally change the mouse cursor. It is handled locally for every window by the X-Server. In order to get zenity pulsating, you need to feed it with input. Example:
yes | zenity --progress --pulsate --auto-close
any.linux12
March 23rd, 2009, 05:11 PM
You cannot globally change the mouse cursor. It is handled locally for every window by the X-Server. In order to get zenity pulsating, you need to feed it with input. Example:
yes | zenity --progress --pulsate --auto-close
I don't get the diference between your code and this
done | zenity --progress --pulsate --auto-kill --text="Wait until the ok button is enable" --window-icon="`dirname $0`/svn.xpm"
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.