bash script to periodically change the cursor theme.

2010-05-07 174 words 1 min read

#!/bin/bash
[[ ”$1” == ”” ]] && time=5 || time=$1
[[ ”$2” == ”” ]] && (
cd ~/.icons
cont=”y”
echo ”Select one of the icon themes”
echo ”When you like some theme just press Ctrl+c”
for i in *
do
[[ -d $i/cursors ]] && (
echo ”Now trying …. : $i”
gconftool-2 –type string -s  /desktop/gnome/peripherals/mouse/cursor_theme ”$i”
sleep $time
)
done
) || gconftool-2 –type string -s  /desktop/gnome/peripherals/mouse/cursor_theme ”$2”

How does it work/How to use:

just copy paste the script in ~/bin or any other directory and make it executable. Now run the script without any parameter to check out all the themes one after the other, changing your cursor every 5 seconds.

If you want to chnage the timer, just provide the time in seconds as first parameter.

If you want to chnage to specific theme, just provide the theme name as second parameter.

<span style="text-decoration: underline;">This can also be used as a script running in the background to change the cursor every specified time and thus making your friends dazzled.


author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it