Advertisement
Alie

xmobar external script

May 3rd, 2011
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/bash
  2. _DPOOL=`ls /var/run/daemons`;
  3. _LIST="";
  4. _SUBLIST=""
  5. for _DAEMON in $_DPOOL
  6.     do
  7.         _SUBLIST="$_SUBLIST $_DAEMON";
  8. done
  9. _LIST="[$_SUBLIST ]";
  10.  
  11. _SUBLIST="";
  12. _FREESPACE=`gawk -F: '{print $3 }' /etc/passwd`;
  13. for _PERCENTSPACE in $_FREESPACE
  14.     do
  15.         _PERCENTSPACE=$(($_PERCENTSPACE * 100));
  16.         _SUBLIST="$_SUBLIST $_PERCENTSPACE";
  17. done
  18. _LIST="$_LIST [ $_SUBLIST ]";
  19. echo "$_LIST";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement