Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- background="$(grep "*background" "$HOME/.Xresources" | tail -c 7)"
- foreground="$(grep "*foreground" "$HOME/.Xresources" | tail -c 7)"
- gray="$(grep "*background" "$HOME/.Xresources" | tail -c 7)"
- font=-*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
- storage="$HOME/.scripts/storage"
- me=$(id -u -n & hostname & uname -r)
- while true; do
- battery=$(acpi --battery | awk -F, '{print $2 $3}' | sed "s/%/%%/" | sed "s/until charged/charging/")
- ip=$(hostname --ip-address)
- backlight=$(xbacklight -get | sed 's/\([a-zA-Z: \t]\)//g' | cut -d . -f 1)
- mem=$(free -m | awk '{print $3}' | sed "s/free/Mem Used:/" | sed "s/\b[^\s]\b//
- ")
- pavo=$(ponymix get-volume)
- time=$(date +"%A, %I:%M %p")
- CURRENT=`mpc current`
- if [[ `cat $storage` = "1" ]]
- then
- # echo %{c}%{F#FF$gray}%{F#FF$foreground}%{A:counter:} $CURRENT %{A}
- echo %{c}%{F#FF$gray}%{F#FF$foreground}%{A:counter:} $me %{A}
- elif [[ `cat $storage` = "2" ]]
- then
- echo %{c}%{F#FF$gray}%{F#FF$foreground}%{A:counter:} Bat:$battery %{A}
- elif [[ `cat $storage` = "3" ]]
- then
- echo %{c}%{F#FF$gray}%{F#FF$foreground}%{A:counter:} $ip %{A}
- elif [[ `cat $storage` = "4" ]]
- then
- echo %{c}%{F#FF$gray}%{F#FF$foreground}%{A:counter:}Backlight: $backlight%% %{A}
- elif [[ `cat $storage` = "5" ]]
- then
- echo %{c}%{F#FF$gray}%{F#FF$foreground}%{A:counter:} $mem mb %{A}
- elif [[ `cat $storage` = "0" ]]
- then
- echo %{c}%{F#FF$gray}%{F#FF$foreground}%{A:counter:}Volume: $pavo%% %{A}
- elif [[ `cat $storage` = "6" ]]
- then
- echo %{c}%{F#FF$gray}%{F#FF$foreground}%{A:counter:}$time %{A}
- fi
- sleep 1
- done | bar -p -g 199x40+1155+717 -d -f $font -B \#FF$background | bash
Advertisement
Add Comment
Please, Sign In to add comment