home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 September - Disc 1 / PCNET_CD_2006_09.iso / linux / puppy-barebones-2.01r2.iso / pup_201.sfs / usr / X11R6 / bin / gxsetshell < prev    next >
Encoding:
Text File  |  2006-05-27  |  742 b   |  26 lines

  1. #!/bin/sh
  2.  
  3. #Puppy xset lacks some features.
  4.  
  5. /usr/X11R6/bin/gxset
  6.  
  7. #v1.0.7
  8. #Xorg should be able to handle all xset settings...
  9. if [ "`readlink /usr/X11R6/bin/X`" = "Xorg" ];then
  10.  chmod 755 /root/.xset.sh
  11.  exit
  12. fi
  13.  
  14. if [ -f /root/.xset.sh ];then
  15.  chmod 755 /root/.xset.sh
  16.  #remove comment lines...
  17.  #we need to get rid of "r rate 0 0" (for example)...
  18.  #also get rid of dpms stuff "dpms 0 0 0 -dpms" ...
  19.  cat /root/.xset.sh | grep -v '# ' | sed 's/r rate [0-9]* [0-9]* //g' | sed 's/dpms [0-9]* [0-9]* [0-9]* //g' | sed 's/ \+dpms//g' | sed 's/ -dpms//g'  > /tmp/tmpxset.sh
  20.  sync
  21.  if [ "`cat /tmp/tmpxset.sh | grep --extended-regexp " r off| r on"`" = "" ];then
  22.   cat /tmp/tmpxset.sh | sed 's/xset /xset r on /g' > /root/.xset.sh
  23.  fi 
  24.  sync
  25. fi
  26.