fixPuppyPin 930 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. #(c) Copyright Barry Kauler 2006 www.puppylinux.com
  3. #2007 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html)
  4. #BK Aug/Sept 2007: bugfixes for v2.20, 2.21
  5. #BK Oct 2007: bugfix new version xrandr v3.02
  6. #v3.99 BK apr 2008: workaround for dual monitors.
  7. #v404 change to xwininfo, tidyup.
  8. PUPPYPIN="$1"
  9. [ "$PUPPYPIN" = "" ] && PUPPYPIN="/root/Choices/ROX-Filer/PuppyPin"
  10. SCREENX=`xwininfo -root | grep -o '\-geometry.*x' | cut -f 2 -d ' ' | cut -f 1 -d 'x'`
  11. if [ $SCREENX ];then
  12. #find out current right side in PuppyPin...
  13. RIGHTX=`grep 'Xlock' $PUPPYPIN | cut -f 2 -d '"'` #'Geany fix
  14. #all icons on right side of screen will be relocated to correct right side...
  15. NEWRIGHTX=`expr $SCREENX - 32`
  16. if [ "$RIGHTX" != "$NEWRIGHTX" ];then
  17. APATTERN="s/x=\"${RIGHTX}\"/x=\"${NEWRIGHTX}\"/"
  18. cat $PUPPYPIN | sed -e "$APATTERN" > /tmp/PuppyPin
  19. sync
  20. cp -f /tmp/PuppyPin $PUPPYPIN
  21. fi
  22. fi
  23. ###END###