Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/ksh
- #Archivos de configuracion
- FONT_NAME="SF Regular"
- FONT_COLOR="#FFFFFF"
- BACKGROUND="#203051"
- X_PATH="/usr/X11R6/bin/"
- $X_PATH/xrandr --output default --dpí 96
- #call to the fonts
- $_PATH/xset fp+ /usr/local/fonts/$FONT_NAME
- $X_PATH/setroot -solid $BACKGROUND
- SIZES=$($X_PATH/randr | /usr/bin/awk ' /\*/ { print $1}')
- WIDTH=${SIZES%x*}
- HEIGHT=${SIZES#*x}
- POSY=$(($HEIGHT * 5 / 100))
- PUFFY_WIDTH=$(( 700 - 2 * $POSY))
- POSX=$((($WIDTH - $PUFFY_WIDTH)/2))
- PICTURE_FILE="/tmp/xenodm.jpg"
- if [! -f $PICTURE_FILE]; then
- cp /etc/X11/xenodm/pixmaps/bluepuffy.jpg $PICTURE_FILE
- fi
- chmod 666 $PICTURE_FILE
- #show bluepuffy
- /usr/local/bin/feh -B$BG_COLOR -g${PUFFY_WIDTH}x{PUFFY_WIDTH}+$POSX+$POSY -. -Z "$PICTURE_FILE" &
- (
- while true; do
- POS=$(($WIDTH -12*34)/2)
- /usr/X11R6/bin/xmessage -geometry +$POS-150 -buttons "[ Sleep ]"
- ACTION=$? #Press Key
- echo "Xmessage said $ACTION"
- if[$ACTION -eq 20]; then /usr/bin/zzz
- elif[$ACTION -eq 21 ];then
- /usr/X11R6/bin/xsetroot -cursor_name watch
- /sbin/shutdown -r now
- elif[$ACTION -eq 22];then
- /usr/X11R6/bin/xsetroot -cursor_name watch
- /sbin/shutdown -r now
- else echo "Something bad happened to Xmessage"
- fi
- #stop looping
- if[ -z "$(/usr/bin/pgrep -qx -U xclock)"]; then break; fi
- done
- )&
- OS_NAME=$(/usr/bin/uname -n)
- OS_INFO=$(/usr/bin/uname -smr)
- KEYBD=$(/usr/X11/bin/setxkbmap -print | grep xkb_symbols | cut -d"+" -f2)
- /usr/X11R6/bin/xclock -geometry -0+20 -strftime "OS_NAME ($OS_INFO) $KEYBD | %a. %d %b. %Y %H:%M:%S" &
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement