initial
This commit is contained in:
60
.conkyrc
Normal file
60
.conkyrc
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
## pkill -xf "conky -q -c /media/5/conky/mangstadt.conky" &
|
||||||
|
alignment top_left
|
||||||
|
background false
|
||||||
|
border_width 1
|
||||||
|
cpu_avg_samples 2
|
||||||
|
default_color grey
|
||||||
|
default_outline_color grey
|
||||||
|
default_shade_color grey
|
||||||
|
|
||||||
|
own_window yes
|
||||||
|
own_window_type panel
|
||||||
|
own_window_transparent yes #no
|
||||||
|
own_window_hints skip_taskbar,skip_pager,undecorated,below,sticky
|
||||||
|
own_window_colour 000000
|
||||||
|
own_window_class Conky
|
||||||
|
own_window_title mangstadt mangstadt test conky
|
||||||
|
minimum_size 1920
|
||||||
|
maximum_width 1920
|
||||||
|
default_bar_size 50 10
|
||||||
|
|
||||||
|
double_buffer yes
|
||||||
|
draw_borders false
|
||||||
|
draw_graph_borders true
|
||||||
|
draw_outline false
|
||||||
|
draw_shades false
|
||||||
|
use_xft true
|
||||||
|
font DejaVu Sans Mono:size=10
|
||||||
|
gap_x 0
|
||||||
|
gap_y 0
|
||||||
|
minimum_size 5 5
|
||||||
|
net_avg_samples 2
|
||||||
|
no_buffers true
|
||||||
|
out_to_console false
|
||||||
|
out_to_stderr false
|
||||||
|
extra_newline false
|
||||||
|
stippled_borders 0
|
||||||
|
update_interval 1.0
|
||||||
|
uppercase false
|
||||||
|
use_spacer right
|
||||||
|
show_graph_scale true
|
||||||
|
show_graph_range true
|
||||||
|
|
||||||
|
lua_load ~/bin/conky_format.lua
|
||||||
|
|
||||||
|
TEXT
|
||||||
|
CPU: ${lua_parse format %4.4s ${freq}} MHz \
|
||||||
|
${lua_parse format %3.3s ${cpu cpu0}}% \
|
||||||
|
${if_match ${cpu cpu0}>90}${color red}${else}\
|
||||||
|
${if_match ${cpu cpu0}>50}${color yellow}${endif}${endif}\
|
||||||
|
${cpubar cpu0 10,50}${color} \
|
||||||
|
RAM: ${lua_parse format %4.4s ${memperc}}% \
|
||||||
|
${membar 10,50} \
|
||||||
|
BAT: ${lua_parse format %4.4s ${apm_battery_life}} \
|
||||||
|
${if_match ${execi 10 apm -l}<10}${color red}${else}${if_match ${execi 10 apm -l}<50}${color yellow}${endif}${endif}${execibar 10 apm -l}$color \
|
||||||
|
WIFI: ${lua_parse format %3.3s ${execi 10 conky_wifi.sh sig}}% ${execibar 10 conky_wifi.sh sig} \
|
||||||
|
▲ ${upspeed iwm0} ▼ ${downspeed iwm0} \
|
||||||
|
${if_empty ${addr iwm0}}${lua_parse format %15.15s 0.0.0.0}${endif}${lua_parse format %15.15s ${addr iwm0}} : \
|
||||||
|
${execi 10 conky_wifi.sh sid} \
|
||||||
|
$alignr Mails: ${new_mails $HOME/.local/share/mail/werler_is/INBOX 5} \
|
||||||
|
$alignr ${time %a %d. %b %Y %H:%M:%S}${font}${offset 1920}
|
||||||
3
conky_format.lua
Normal file
3
conky_format.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function conky_format( format, string )
|
||||||
|
return string.format( format, conky_parse( string ) )
|
||||||
|
end
|
||||||
48
conky_wifi.sh
Executable file
48
conky_wifi.sh
Executable file
@@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
_sep=":"
|
||||||
|
|
||||||
|
ifconfig wlan | { while read _line; do
|
||||||
|
|
||||||
|
case ${_line} in
|
||||||
|
|
||||||
|
status*)
|
||||||
|
|
||||||
|
[[ ${_line} != "status: active" ]] && exit
|
||||||
|
;;
|
||||||
|
|
||||||
|
ieee80211:*)
|
||||||
|
|
||||||
|
_sid=${_line%% chan*}
|
||||||
|
_sid=${_sid##*nwid }
|
||||||
|
_sid=${_sid##*join }
|
||||||
|
|
||||||
|
_sig=${_line%%\%*}
|
||||||
|
_sig=${_sig##* }
|
||||||
|
;;
|
||||||
|
|
||||||
|
inet\ *)
|
||||||
|
|
||||||
|
_ip=${_line##*inet }
|
||||||
|
_ip=${_ip%% *}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
for _arg in $@; do
|
||||||
|
|
||||||
|
case ${_arg} in
|
||||||
|
|
||||||
|
sig)
|
||||||
|
set -A WIFI ${WIFI[*]} ${WIFI:+${_sep}} ${_sig}
|
||||||
|
;;
|
||||||
|
sid)
|
||||||
|
set -A WIFI ${WIFI[*]} ${WIFI:+${_sep}} ${_sid}
|
||||||
|
;;
|
||||||
|
ip)
|
||||||
|
set -A WIFI ${WIFI[*]} ${WIFI:+${_sep}} ${_ip}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
print ${WIFI[*]}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user