Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #if egrep -iq 'touchpad' /proc/bus/input/devices; then
- # synclient VertEdgeScroll=1 &
- # synclient TapButton1=1 &
- #fi
- CUNT=1 #for bat indicator
- CZ=1
- CA=1
- YI=1
- #EXEC DROPBOX
- #exec ~/.dropbox-dist/dropboxd &
- xset fp rehash &
- xset fp+ /home/zyal/.fonts &
- xcompmgr -f -l 0.038 -O 0.040 -D 3 -F -C -n &
- nitrogen --restore &
- #redshift -l 43.4:79.4 -o &
- #redshift-diag &
- dunst &
- #sleep 2s
- sleep 1
- nm-applet &
- CMAS () {
- artest=$( cmus-remote -Q | grep "tag artist" | sed s/"tag artist"/""/g | sed '1s/^.//')
- title=$( cmus-remote -Q | grep "tag title" | sed s/"tag title"/""/g )
- status=$( cmus-remote -Q | grep "status" | sed s/"tag title"/""/g )
- #touch .cmtemp
- track=$( echo -e "$artest -$title")
- if [[ "$status" != "status playing" ]]; then
- cm=""
- cmcolor=$(echo -e "\x07$cm\x05")
- else
- #echo "$track" >> .cmptemp
- #cp .cmptemp .cmusinfo
- #rm .cmptemp
- trackc=$( echo -e "\x07$track \x05")
- echo "$trackc"
- fi
- }
- GREET () {
- if [ $( date +%H ) -ge "6" ] && [ $( date +%H ) -le "12" ] && [ "$CA" = 1 ]; then
- notify-send "Good Morning Lazy~"
- CA=2
- fi
- if [ $( date +%H ) -ge "13" ] && [ $( date +%H ) -le "18" ] && [ "$CA" = 1 ]; then
- notify-send "Good Afternoon Lazy~"
- CA=2
- fi
- if [ $( date +%H ) -ge "19" ] && [ "$CA" = 1 ]; then
- notify-send "Good Evening Lazy~"
- CA=2
- fi
- }
- player () {
- np=$(mpc current)
- npcolor=$(echo -e "\x07$np\x05")
- echo "$npcolor"
- }
- timex () {
- BATT=$( acpi -b | sed 's/.*[charging|unknown], \([0-9]*\)%.*/\1/gi' )
- STATUS=$( acpi -b | sed 's/.*: \([a-zA-Z]*\),.*/\1/gi' )
- if [[ "$BATT" -le "10" ]]; then
- batnot="\x06"
- fi
- if [ $BATT -le "30" ] && [ $BATT -gt 10 ]; then
- batnot="\x08"
- else
- batnot="\x01"
- fi
- if [ $STATUS == "Charging" ]; then
- batnot="\x03"
- fi
- battlev=$( acpi -b | awk '{ print $3$4 }' | tr -d ','| sed s/"Discharging"/"-"/g | sed s/"Charging"/"+"/g | sed s/"Full"/""/g )
- numtasks=$( wc -l TODO | egrep "[0-9]{1,}" -o)
- timef=$( date +"%R" )
- timecolor=$(echo -e "\x05 $timef")
- #timecolor=$(echo -e "\x05 $timef\x01\x05$batnot[$battlev]")
- echo "$timecolor"
- }
- BCHECK () {
- BATT=$( acpi -b | sed 's/.*[charging|unknown], \([0-9]*\)%.*/\1/gi' )
- if [ "$BATT" -lt "100" ] && [ "$CUNT" = "1" ]; then
- STATUS=$( acpi -b | sed 's/.*: \([a-zA-Z]*\),.*/\1/gi' )
- if [ $BATT -le "5" ] && [ $STATUS == 'Discharging' ]; then
- notify-send "Battery Critical"
- CUNT=2
- fi
- else
- if [[ "$BATT" -ge "11" ]]; then
- CUNT=1
- fi
- fi
- if [ "$BATT" -le "30" ] && [ "$YI" = "1" ]; then
- notify-send -u critical "Warning: 2/3 Battery Drained"
- mplayer /home/lazy/bin/sc/wd.mp3 >/dev/null 2>&1
- if [ "$BATT" -le "30" ]; then
- YI=2
- fi
- fi
- }
- while true; do
- BCHECK
- GREET
- xsetroot -name "`CMAS``timex`"
- #xsetroot -name "test"
- sleep 3s
- done &
- exec dwm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement