home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #(c) Copyright Barry Kauler 2006 www.puppylinux.com
-
- PUPPYPIN="$1"
- [ "$PUPPYPIN" = "" ] && PUPPYPIN="/root/Choices/ROX-Filer/PuppyPin"
-
- SCREENX=""
- if [ "`readlink /usr/X11R6/bin/X`" = "Xorg" ];then
- SCREENX=`xrandr | grep '\*' | tr -s " " | cut -f 2 -d " "`
- else
- if [ -f /etc/videomode ];then #used by Xvesa.
- SCREENX=`cat /etc/videomode | cut -f 2 -d " " | cut -f 1 -d "x"`
- fi
- fi
-
- if [ ! "$SCREENX" = "" ];then
-
- #find out current right side in PuppyPin...
- RIGHTX="`cat $PUPPYPIN | grep "Xlock" | cut -f 2 -d '"'`"
-
- #all icons on right side of screen will be relocated to correct right side...
- NEWRIGHTX=`expr $SCREENX - 32`
- if [ $NEWRIGHTX ];then #precaution.
- if [ ! "$RIGHTX" = "$NEWRIGHTX" ];then
- APATTERN="s/x=\"${RIGHTX}\"/x=\"${NEWRIGHTX}\"/g"
- cat $PUPPYPIN | sed -e "$APATTERN" > /tmp/PuppyPin
- sync
- cp -f /tmp/PuppyPin $PUPPYPIN
- fi
- fi
-
- fi
-
- echo "$SCREENX"
- echo "$RIGHTX"
- echo "$NEWRIGHTX"
-
- ###END###
-