new file: .config/bspwm/conky.conf

deleted:    .config/bspwm/conkyrc
	deleted:    .config/bspwm/panel2
This commit is contained in:
Deon Spengler
2015-11-01 11:44:05 +02:00
parent a78c5b2b60
commit 3264672105
3 changed files with 21 additions and 149 deletions

21
.config/bspwm/conky.conf Normal file
View File

@@ -0,0 +1,21 @@
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
conky.config = {
update_interval = 1,
cpu_avg_samples = 1,
net_avg_samples = 1,
short_units = true,
out_to_console = true,
out_to_x = false,
own_window = false,
}
conky.text = [[
S\
%{c}%{F\#ff3d3d3d}%{B\#ff3d3d3d}%{F\#ffffffff} ${time %a %b %d, %T}%{B-}%{F\#ff3d3d3d} \
%{r} \
%{F\#ff517ba2}%{B-}%{F\#ffffffff}%{B\#ff517ba2} ${upspeedf br0}K \
%{F\#ff3d3d3d}%{B\#ff517ba2}%{F\#ffffffff}%{B\#ff3d3d3d} ${downspeedf br0}K \
%{F\#ff517ba2}%{B\#ff3d3d3d}%{F\#ffffffff}%{B\#ff517ba2} ${platform coretemp.0/hwmon/hwmon1 temp 1}° \
%{F\#ff3d3d3d}%{B\#ff517ba2}%{F\#ffffffff}%{B\#ff3d3d3d} ${cpu cpu0}% \
%{F\#ff517ba2}%{B\#ff3d3d3d}%{F\#ffffffff}%{B\#ff517ba2} ${mem} %{B-}\
]]

View File

@@ -1,22 +0,0 @@
# conky settings
background no
update_interval 1
cpu_avg_samples 1
net_avg_samples 1
total_run_times 0
override_utf8_locale yes
short_units yes
pad_percents 2
top_name_width 9
uppercase no
out_to_console yes
out_to_x no
TEXT
S\
%{c}%{F\#ff3d3d3d}%{B\#ff3d3d3d}%{F\#ffffffff} ${time %a %b %d, %T}%{B-}%{F\#ff3d3d3d} \
%{r}%{F\#ff517ba2}%{B-}%{F\#ffffffff}%{B\#ff517ba2} ${if_match "${mpd_status}" =="Playing"}${mpd_smart}${else}MPD ${mpd_status}${endif} \
%{F\#ff3d3d3d}%{B\#ff517ba2}%{F\#ffffffff}%{B\#ff3d3d3d} ${upspeedf br0}K \
%{F\#ff517ba2}%{B\#ff3d3d3d}%{F\#ffffffff}%{B\#ff517ba2} ${downspeedf br0}K \
%{F\#ff3d3d3d}%{B\#ff517ba2}%{F\#ffffffff}%{B\#ff3d3d3d} ${cpu cpu0}%% \
%{F\#ff517ba2}%{B\#ff3d3d3d}%{F\#ffffffff}%{B\#ff517ba2} ${mem} %{B-}\

View File

@@ -1,127 +0,0 @@
#!/usr/bin/dash
PANEL_FIFO="/tmp/panel-fifo"
num_mon=$(bspc query -M | wc -l)
PANEL_HEIGHT=16
FONT="-misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1"
FG='#FFFFFFFF'
BG='#FF000000'
GREY='#ff3d3d3d'
BLUE='#ff517ba2'
BGSWAP=1
wm_info_array='array'
if [ $(pgrep -cx panel) -gt 1 ] ; then
killall -o 1s panel
fi
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO"
bspc config top_padding $PANEL_HEIGHT
bspc control --subscribe > "$PANEL_FIFO" &
conky -c ~/.config/bspwm/conkyrc > "$PANEL_FIFO" &
while read -r line ; do
case $line in
S*)
# clock output
sys_infos="${line#?}"
;;
W*)
# bspwm internal state
wm_infos=""
cur_mon=-1
IFS=':'
set -- ${line#?}
while [ $# -gt 0 ] ; do
item=$1
name=${item#?}
case $item in
M*)
# active monitor
cur_mon=$((cur_mon + 1))
wm_infos=""
;;
m*)
# inactive monitor
cur_mon=$((cur_mon + 1))
wm_infos=""
;;
O*)
# focused occupied desktop
if [ $BGSWAP -eq 1 ]; then
wm_infos="$wm_infos%{F$FG}%{B$BLUE} %{+u}${name}%{-u}%{F$BLUE}%{B$GREY}"
BGSWAP=2
else
wm_infos="$wm_infos%{F$FG}%{B$GREY} %{+u}${name}%{-u}%{F$GREY}%{B$BLUE}"
BGSWAP=1
fi
;;
F*)
# focused free desktop
if [ $BGSWAP -eq 1 ]; then
wm_infos="$wm_infos%{F$FG}%{B$BLUE} %{+u}${name}%{-u}%{F$BLUE}%{B$GREY}"
BGSWAP=2
else
wm_infos="$wm_infos%{F$FG}%{B$GREY} %{+u}${name}%{-u}%{F$GREY}%{B$BLUE}"
BGSWAP=1
fi
;;
U*)
# focused urgent desktop
wm_infos="$wm_infos%{F$FG} %{B$BG}%{U$FG}%{+u}${name}%{-u}"
;;
o*)
# occupied desktop
if [ $BGSWAP -eq 1 ]; then
wm_infos="$wm_infos%{B$BLUE}%{F$FG} ${name}%{B$GREY}%{F$BLUE}"
BGSWAP=2
else
wm_infos="$wm_infos%{B$GREY} %{F$FG}%{B$GREY}${name}%{B$BLUE}%{F$GREY}"
BGSWAP=1
fi
;;
f*)
# free desktop
if [ $BGSWAP -eq 1 ]; then
wm_infos="$wm_infos%{B$BLUE}%{F$FG} ${name}%{B$GREY}%{F$BLUE}"
BGSWAP=2
else
wm_infos="$wm_infos%{B$GREY} %{F$FG}%{B$GREY}${name}%{B$BLUE}%{F$GREY}"
BGSWAP=1
fi
;;
u*)
# urgent desktop
wm_infos="$wm_infos %{F$FG}%{B$BG}${name}"
;;
L*)
# layout
layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/')
wm_infos="$wm_infos%{B$BLUE} %{F$FG}$layout %{B$BG}%{F$BLUE}%{B-}"
;;
esac
shift
eval ${wm_info_array}${cur_mon}="'$wm_infos'"
done
;;
esac
if [ $num_mon -eq 3 ]; then
mon1=0
mon2=1
mon3=2
wm_info_mon1=$(echo $(eval echo \$$wm_info_array${mon1}))
wm_info_mon2=$(echo $(eval echo \$$wm_info_array${mon2}))
wm_info_mon3=$(echo $(eval echo \$$wm_info_array${mon3}))
fmt="%{l}${wm_info_mon1}%{S+}%{l}${wm_info_mon2}%{S+}%{l}${wm_info_mon3}"
fi
printf "%s\n" "$fmt $sys_infos"
done < "$PANEL_FIFO" | bar -f $FONT -g x$PANEL_HEIGHT -F "$FG" -B "$BG"