home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / themes / Dust / Dust_compiz_settings.sh next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2009-03-11  |  2.7 KB  |  51 lines

  1. #!/bin/bash
  2. if [ "$1" == "--help" ]; then
  3.     echo Usage: $0 [OPTIONS]
  4.     echo Adjusts Compiz settings.
  5.     echo 
  6.     echo "  (no args)         Sets the recommended settings."
  7.     echo "  --fade            Changes titlebar to fade."
  8.     echo 
  9.     exit
  10. fi
  11. if [ "$1" == "" ]; then
  12.  
  13.     zenity --question --text="\<big\>\<b\>Compiz shadow settings for Dust\</b\>\</big\>\nThis script will do the following things:\n\n- Adjust compiz gtk-window-decorator titlebar opacity\n<small>   This will make the titlebar completely opaque. Compiz defaults to it being translucent.</small>\n\n- Adjust compiz 'decorator' plugin's drop shadow\n<small>   This will give windows a large drop shadow.</small>\n\nDo you want to proceed?"
  14.     
  15.     if [ "$?" != "0" ]; then
  16.         zenity --info --text="<big><b>Nothing done</b></big>\nDon't worry."
  17.         exit
  18.     fi
  19.  
  20.     # Activate the blurring
  21.     gconftool-2 --set --type=string /apps/gwd/blur_type titlebar
  22.     gconftool-2 --set --type=float  /apps/gwd/metacity_theme_opacity 1
  23.     gconftool-2 --set --type=bool   /apps/gwd/metacity_theme_shade_opacity true
  24.     
  25.     gconftool-2 --set --type=float  /apps/gwd/metacity_theme_active_opacity 1
  26.     gconftool-2 --set --type=bool   /apps/gwd/metacity_theme_active_shade_opacity true
  27.     
  28.     # Set the compiz drop shadow
  29.     gconftool-2 --set --type=float  /apps/compiz/plugins/decoration/allscreens/options/shadow_opacity 0.7
  30.     gconftool-2 --set --type=float  /apps/compiz/plugins/decoration/allscreens/options/shadow_radius 25.0
  31.     gconftool-2 --set --type=string /apps/compiz/plugins/decoration/allscreens/options/shadow_color /apps/compiz/plugins/decoration/allscreens/options/shadow_color #000000ff
  32.     gconftool-2 --set --type=int    /apps/compiz/plugins/decoration/allscreens/options/shadow_x_offset 0
  33.     gconftool-2 --set --type=int    /apps/compiz/plugins/decoration/allscreens/options/shadow_y_offset 5    
  34.     gconftool-2 --set --type=string /apps/compiz/plugins/decoration/allscreens/options/command /usr/bin/compiz-decorator
  35.  
  36.     # Start the GTK window decorator
  37.     if [ -z "`pidof compiz.real`" ]; then echo; else
  38.         gtk-window-decorator --replace 2>/dev/null 1>/dev/null & disown
  39.     fi
  40.     
  41.     zenity --info --text="\<big\>\<b\>Done!\</b\>\</big\>\nYour Compiz's decorator settings have now been adjusted. Try activating Compiz's window decoration plugin (via <i>ccsm</i>) if you did not see any changes."
  42.  
  43. elif [ "$1" == "--fade" ]; then
  44.     # Running this with the "--fade" option will remove the titlebar fading.
  45.     
  46.     gconftool-2 --set --type=float  /apps/gwd/metacity_theme_opacity 0.85
  47.     gconftool-2 --set --type=bool   /apps/gwd/metacity_theme_shade_opacity true
  48.     
  49.     gconftool-2 --set --type=float  /apps/gwd/metacity_theme_active_opacity 1
  50.     gconftool-2 --set --type=bool   /apps/gwd/metacity_theme_active_shade_opacity true
  51. fi