Advertisement
Guest User

Untitled

a guest
Oct 26th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. #!/bin/sh
  2. wid=/tmp/conkywid
  3. state=/tmp/conkystate
  4. case $1 in
  5.     start)
  6.         foo=`xdotool search --name "Conky"`
  7.         echo $foo > "$wid"
  8.         xdotool windowunmap "$foo"
  9.     ;;
  10.     *)
  11.         test -f "$wid" && foo="`<$wid`" || exit 1
  12.         test -f "$state" && bar="`<$state`" || bar="0"
  13.         if test "$bar" = "0"; then
  14.             xdotool windowmap "$foo"
  15.             echo 1 > "$state"
  16.         else
  17.             xdotool windowunmap "$foo"
  18.             echo 0 > "$state"
  19.         fi
  20.     ;;
  21. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement