aboutsummaryrefslogtreecommitdiff
path: root/tools/panel
diff options
context:
space:
mode:
authorVasil Zlatanov <vasil.zlatanov@gmail.com>2015-08-18 01:39:43 +0200
committerVasil Zlatanov <vasil.zlatanov@gmail.com>2015-08-18 01:39:43 +0200
commitd923956d4866beb5093c89e0c1a4f54a9c37070f (patch)
tree849dcc217039940b4f41e1e82f595c7a00669d99 /tools/panel
parent26a62982eab36ee68608a61306e6fab6447edd8a (diff)
downloaddotfiles-d923956d4866beb5093c89e0c1a4f54a9c37070f.tar.gz
dotfiles-d923956d4866beb5093c89e0c1a4f54a9c37070f.tar.bz2
dotfiles-d923956d4866beb5093c89e0c1a4f54a9c37070f.zip
major fixes and rearrangement
Diffstat (limited to 'tools/panel')
-rw-r--r--tools/panel/audio_mon1
-rwxr-xr-xtools/panel/batterymon13
-rw-r--r--tools/panel/icons23
-rwxr-xr-xtools/panel/load7
-rwxr-xr-xtools/panel/monce25
-rwxr-xr-xtools/panel/music20
-rwxr-xr-xtools/panel/panel29
-rwxr-xr-xtools/panel/panel_bar146
-rw-r--r--tools/panel/panel_colors14
-rwxr-xr-xtools/panel/profile7
-rwxr-xr-xtools/panel/signal19
11 files changed, 0 insertions, 304 deletions
diff --git a/tools/panel/audio_mon b/tools/panel/audio_mon
deleted file mode 100644
index 1a1fa55..0000000
--- a/tools/panel/audio_mon
+++ /dev/null
@@ -1 +0,0 @@
-alsactl monitor |
diff --git a/tools/panel/batterymon b/tools/panel/batterymon
deleted file mode 100755
index 19a4d5a..0000000
--- a/tools/panel/batterymon
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-while true;do
-if [ `battery -f '%i'` -lt 5 ] && ! [ -z ~/.dontshut ]; then
-touch ~/.dontshut
-zenity --question --title "Battery" --text "Battery if pretty fucking low, go to sleep?"
-if [ $? -ne 1 ];then
-pm-suspend
-fi
-else
-rm ~/.dontshut
-fi
-sleep 30;
-done
diff --git a/tools/panel/icons b/tools/panel/icons
deleted file mode 100644
index aa27523..0000000
--- a/tools/panel/icons
+++ /dev/null
@@ -1,23 +0,0 @@
-
-# Icons
-ICON_CLOCK=''
-ICON_CAL=''
-ICON_WIFI=''
-ICON_PWR=''
-ICON_DB=''
-ICON_SQUARE=''
-ICON_PREV=''
-ICON_PAUSE=''
-ICON_PLAY=''
-ICON_NEXT=''
-ICON_VOLUME_DOWN=''
-ICON_VOLUME_UP=''
-ICON_VOLUME_OFF=''
-ICON_HPHONES=''
-ICON_MUSIC=''
-ICON_PLUG=''
-ICON_FACE=''
-ICON_PRIV=''
-ICON_PUB=''
-ICON_MAIL=''
-
diff --git a/tools/panel/load b/tools/panel/load
deleted file mode 100755
index 3977bee..0000000
--- a/tools/panel/load
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-while true; do
-cpu=`mpstat -P ALL 2 1 | grep "Average.*all" | awk '{print $3+$5}'`
-mem=`free | grep Mem | awk '{print $3/$2 * 100.0}'`
-printf "C%.*f\n" 1 $cpu
-printf "R%.*f\n" 0 $mem
-done
diff --git a/tools/panel/monce b/tools/panel/monce
deleted file mode 100755
index caa316c..0000000
--- a/tools/panel/monce
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-
-f=1
-d=30 # width
-
-new=`mpc current`
-if [ "$old" != "$new" ];then
-f=1;
-old="$new"
-fi
-
-
-e=$(expr $f + $d)
-
-if mpc | grep -q playing; then
-symbol='p'
-else
-symbol='P'
-fi
-
-echo "$symbol`echo $new | cut --bytes $f-$e`"
-echo "K`mpc -h 127.0.0.1 volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`"
-
-
diff --git a/tools/panel/music b/tools/panel/music
deleted file mode 100755
index 2fb91d1..0000000
--- a/tools/panel/music
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-while true;do
-
-new=`mpc current`
-
-if mpc | grep -q playing; then
-symbol='p'
-else
-symbol='P'
-fi
-
-echo "$symbol`echo $new | cut --bytes 1-30`"
-echo "K`mpc -h 127.0.0.1 volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`"
-mpc idle > /dev/null
-if [ $? -ne 0 ];then
-echo 'mpd not alive';
-sleep 30;
-fi
-done
diff --git a/tools/panel/panel b/tools/panel/panel
deleted file mode 100755
index 4260578..0000000
--- a/tools/panel/panel
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh
-cd ~/.tools/panel
-source ./profile
-source ~/.colors
-
-[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
-mkfifo -m 777 "$PANEL_FIFO"
-
-
-#bspc config top_padding $PANEL_HEIGHT
-#bspc control --subscribe > "$PANEL_FIFO" &
-./windows > "$PANEL_FIFO" &
-echo "D`rpws current`" > "$PANEL_FIFO" &
-volume -f 'V%i' > "$PANEL_FIFO" &
-battery -i 60 -sf 'B%s %i' > "$PANEL_FIFO" &
-clock -i 60 -sf 'Z%d %a %H:%M' > "$PANEL_FIFO" &
-./music > "$PANEL_FIFO" &
-#./load > "$PANEL_FIFO" &
-#essid -sf 'E%s' -i 30 -w wlp2s0 > "$PANEL_FIFO" &
-# ./signal > "$PANEL_FIFO" &
-unbuffer alsactl monitor | grep --line-buffered 'Headphone Jack' | while read line; do volume -f 'V%i' > $PANEL_FIFO;done &
-
-
-source ./panel_colors
-
-cat "$PANEL_FIFO" | ./panel_bar | lemonbar -f "$FONT_FONT" -f "$ICON_FONT" -g x$PANEL_HEIGHT -F "$COLOR11" -B "$COLOR0" -u 3 &
-
-#sleep 1;
-#stalonetray --geometry 1x1-415+2 --icon-gravity E --grow-gravity E -bg $COLOR0 -i 20 &
diff --git a/tools/panel/panel_bar b/tools/panel/panel_bar
deleted file mode 100755
index 4bc63f9..0000000
--- a/tools/panel/panel_bar
+++ /dev/null
@@ -1,146 +0,0 @@
-#! /bin/sh
-
-num_mon=$(bspc query -M | wc -l)
-
-source ./panel_colors
-source ./icons
-while read -r line ; do
- case $line in
- Imail)
- mbsync -a > /dev/null
- if bspc control --get-status | grep OIX > /dev/null;then
- mail=''
- else
- mail="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_MAIL} %{B-}%{F-}"
- fi
- ;;
-
- Iface)
- if bspc control --get-status | grep OX > /dev/null;then
- face=''
- else
- face="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_FACE} %{B-}%{F-}"
- fi
- ;;
-
- Ipub)
- if bspc control --get-status | grep OX > /dev/null;then
- pub=''
- else
- pub="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_PUB} %{B-}%{F-}"
- fi
- ;;
-
- Ipriv)
- if bspc control --get-status | grep OX > /dev/null;then
- priv=''
- else
- priv="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_PRIV} %{B-}%{F-}"
- fi
- ;;
- Iclear)
- priv=""
- pub=""
- face=""
- ;;
- Ixlear)
- mail=''
- ;;
-# C*)
-# cpu="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} C:${line#?} %{B-}%{F-}"
-# ;;
-# R*)
-# ram="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} R:${line#?} %{B-}%{F-}"
-# ;;
-
-# S*)
-# signal="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} S:${line#?} %{B-}%{F-}"
-# ;;
-
- p*)
- # playing mpc
- paused=''
- playing="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_PLAY} ${line#?} %{B-}%{F-}"
- ;;
-
- P*)
- # paused mpc
- playing=''
- paused="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_PAUSE} ${line#?} %{B-}%{F-}"
- ;;
- K*)
- # volume output
- musicvol="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_MUSIC} ${line#?} %{B-}%{F-}"
- ;;
-
-
- B*)
- # battery output
- if [[ ${line#?} =~ Discharging ]];then
- percent=`echo ${line#?} | cut -d' ' -f2`
- battery="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_PWR} ${percent} %{B-}%{F-}";
- else
- percent=`echo ${line#?} | cut -d' ' -f2`
- battery="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_PLUG} ${percent} %{B-}%{F-}";
- fi
- ;;
-
-
- V*)
- # volume output
- if amixer contents | head -12 | tail -1 | grep on > /dev/null;then
- volume="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_HPHONES} ${line#?} %{B-}%{F-}"
- else
- volume="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${ICON_VOLUME_UP} ${line#?} %{B-}%{F-}";
- fi
- ;;
-
- E*)
- # essid output
- if [ -z ${line#?} ];then
- essid="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} E:No WiFi %{B-}%{F-}"
- else
- essid="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} E:${line#?} %{B-}%{F-}"
- fi
- ;;
-
- Z*)
- # clock output
- time_infos="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}"
- ;;
-# T*)
-# # xtitle output
-# title="%{F$COLOR_TITLE_FG}%{B$COLOR_TITLE_BG} ${line#?} %{B-}%{F-}"
-# ;;
- D*)
- # active desktop
- desktop="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?}%{B-}%{F-} "
- ;;
- Wclear)
- wm_infos=''
- ;;
-
- \**)
- # current focused window
- wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOCUSED_UG}%{+o} ${line#?} %{-o}%{B-}%{F-}%{U-}"
- ;;
- +*)
- # last focused window
- wm_infos="${wm_infos}%{F$COLOR_OTHER_FG}%{B$COLOR_OTHER_BG} ${line#?} %{B-}%{F-}"
- ;;
- -*)
- # other windows
- wm_infos="${wm_infos}%{F$COLOR_ELSE_FG}%{B$COLOR_ELSE_BG} ${line#?} %{B-}%{F-}"
- ;;
-# u*)
-# # urgent desktop
-# wm_infos="${wm_infos}%{F$COLOR_URGENT_FG}%{B$COLOR_URGENT_BG} ${name} %{B-}%{F-}"
-# ;;
-# L*)
-# # layout
-# wm_infos="$wm_infos %{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG} ${name} %{B-}%{F-}"
-# ;;
- esac
-# printf "%s\n" "%{l}${wm_infos}${title}%{r}${playing}${paused}${cpu}${ram}${essid}${signal}${volume}${musicvol}${battery}${time_infos} "
- printf "%s\n" "%{l}${desktop}${wm_infos}%{r}${face}${priv}${pub}${mail}${playing}${paused}${cpu}${ram}${volume}${musicvol}${battery}${time_infos}"
-done
diff --git a/tools/panel/panel_colors b/tools/panel/panel_colors
deleted file mode 100644
index f04ddbb..0000000
--- a/tools/panel/panel_colors
+++ /dev/null
@@ -1,14 +0,0 @@
-source ~/.colors
-
-COLOR_FOCUSED_FG="#FF`echo $COLOR4 | cut -c 2-`"
-COLOR_FOCUSED_BG="#FF`echo $COLOR0 | cut -c 2-`"
-COLOR_FOCUSED_UG="#FF`echo $COLOR1 | cut -c 2-`"
-
-COLOR_OTHER_FG="#FF`echo $COLOR10 | cut -c 2-`"
-COLOR_OTHER_BG="#FF`echo $COLOR0 | cut -c 2-`"
-
-COLOR_STATUS_FG="#FF`echo $COLOR12 | cut -c 2-`"
-COLOR_STATUS_BG="#FF`echo $COLOR0 | cut -c 2-`"
-
-COLOR_ELSE_FG="#FF`echo $COLOR11 | cut -c 2-`"
-COLOR_ELSE_BG="#FF`echo $COLOR0 | cut -c 2-`"
diff --git a/tools/panel/profile b/tools/panel/profile
deleted file mode 100755
index c8b6807..0000000
--- a/tools/panel/profile
+++ /dev/null
@@ -1,7 +0,0 @@
-PANEL_FIFO=/tmp/panel-fifo
-PANEL_HEIGHT=24
-
-FONT_FONT="fixed"
-ICON_FONT="FontAwesome-9"
-
-export PANEL_FIFO PANEL_HEIGHT PANEL_FONT_FAMILY FONT_FONT ICON_FONT
diff --git a/tools/panel/signal b/tools/panel/signal
deleted file mode 100755
index d494f5d..0000000
--- a/tools/panel/signal
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-while true;do
-signal=`iwconfig $INTERFACE | grep Signal| perl -pe 's/.*level=//; s/ dBm.*//'`
-#convert to Quality
-
- if [ $signal -le -100 ];then
- quality=0;
- elif [ $signal -ge -50 ];then
- quality=100;
- elif [ -z $signal ];then
- quality=0;
- else
- quality=$(( 2 * ( $signal + 100 )));
- fi
-
-echo "S$quality";
-sleep 3;
-done
-