2017-08-01 08:47:22 +02:00
|
|
|
-- -*- mode: lua; -*-
|
2017-07-31 18:39:21 +02:00
|
|
|
|
2017-08-01 08:47:22 +02:00
|
|
|
conky.config = {
|
2017-08-02 23:55:42 +02:00
|
|
|
out_to_x = false,
|
2017-08-01 08:47:22 +02:00
|
|
|
background = false,
|
|
|
|
cpu_avg_samples = 2,
|
|
|
|
net_avg_samples = 2,
|
|
|
|
no_buffers = true,
|
|
|
|
out_to_console = true,
|
|
|
|
out_to_stderr = false,
|
|
|
|
extra_newline = false,
|
|
|
|
update_interval = 1.0,
|
|
|
|
uppercase = false,
|
|
|
|
use_spacer = left,
|
2018-02-10 12:23:49 +01:00
|
|
|
times_in_seconds = true,
|
2017-08-01 08:47:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
-- Colors are in dzen2 format.
|
|
|
|
conky.text =
|
|
|
|
[[^fg(grey)${time %a %d %b %R} \
|
2017-07-31 18:39:21 +02:00
|
|
|
\
|
2017-08-01 08:47:22 +02:00
|
|
|
^fg(grey)CPU:^fg(DeepSkyBlue)$cpu% \
|
2018-02-01 12:38:43 +01:00
|
|
|
^fg(grey)RAM:^fg(DeepSkyBlue)${if_match ${to_bytes $memeasyfree} < 536870912}^fg(Red)${endif}$memperc% \
|
2017-08-01 08:47:22 +02:00
|
|
|
^fg(grey)↓^fg(DeepSkyBlue)${eval $${downspeedf ${gw_iface}}} \
|
2018-02-11 19:59:35 +01:00
|
|
|
^fg(grey)↑^fg(DeepSkyBlue)${upspeedf wlp2s0} \
|
2018-05-03 07:36:28 +02:00
|
|
|
${if_match "${exec pactl list sinks | awk '/^\tMute:/ {print $2;exit}'}" == "no"}^fg(grey)♪^fg(DeepSkyBlue)${exec pactl list sinks | awk '/^\tVolume:/ {print $5;exit}'}${endif} \
|
2018-02-10 12:23:49 +01:00
|
|
|
${if_match $battery_percent != 0}^fg(grey)⚡^fg(DeepSkyBlue)${if_match ${battery_time} <= 600}^fg(Red)${endif}${battery_short}: ${format_time ${battery_time} "(\dd )(\hh )\mmin"} ${endif}\
|
2018-02-11 19:59:35 +01:00
|
|
|
${if_match ${to_bytes ${diskio nvme0n1}} > 1048576}^fg(grey)nvme0n1:^fg(DeepSkyBlue)${diskio nvme0n1}${endif} \
|
2018-02-01 12:38:43 +01:00
|
|
|
${if_match ${to_bytes ${diskio sda}} > 1048576}^fg(grey)sda:^fg(DeepSkyBlue)${diskio sda}${endif} \
|
|
|
|
${if_match ${to_bytes ${diskio sdb}} > 1048576}^fg(grey)sdb:^fg(DeepSkyBlue)${diskio sdb}${endif} \
|
|
|
|
${if_match ${to_bytes ${diskio sdc}} > 1048576}^fg(grey)sdc:^fg(DeepSkyBlue)${diskio sdc}${endif} \
|
2018-04-24 14:42:21 +02:00
|
|
|
${if_match ${to_bytes ${fs_free /}} < 1073741824}^fg(grey)/:^fg(Red)${fs_free /}${endif} \
|
|
|
|
${if_match ${to_bytes ${fs_free /home}} < 1073741824}^fg(grey)/home:^fg(Red)${fs_free /home}${endif} \
|
2017-08-01 08:47:22 +02:00
|
|
|
]]
|
2017-07-31 18:39:21 +02:00
|
|
|
|
2018-10-17 14:40:03 +02:00
|
|
|
-- mu unread emails: This is treacherously distracting...
|
2018-09-02 22:07:09 +02:00
|
|
|
-- ${if_existing .mu/}^fg(grey)✉^fg(DeepSkyBlue)${execi 30 mu find --nocolor --sortfield=d --maxnum=500 flag:unread AND NOT flag:trashed 2>/dev/null | wc -l} ${endif}\
|
2018-10-17 14:40:03 +02:00
|
|
|
-- Unread mail with native 'new_mails' does not seem to support totals.
|
|
|
|
-- Change color when e-mails are not 0?
|
2018-09-02 22:07:09 +02:00
|
|
|
|
2018-02-11 19:59:35 +01:00
|
|
|
-- TODO: Emms current track:
|
|
|
|
-- ${if_match "${execi 5 emacsclient -e '(and (fboundp (quote emms-playlist-current-selected-track)) (emms-playlist-current-selected-track) (emms-track-description (emms-playlist-current-selected-track)))'}" != "nil"}^fg(grey)♪^fg(DeepSkyBlue)${execi 5 emacsclient -e '(emms-track-description (emms-playlist-current-selected-track))' | tr -d '"'}${endif} \
|
|
|
|
-- Above line works but polling interferes with bindings (Emacs echoes '<t>' on keypresses).
|
|
|
|
|
2017-08-16 00:14:48 +02:00
|
|
|
-- TODO: Conditional display of network, sound.
|
2017-08-02 23:55:42 +02:00
|
|
|
-- Probably need $lua+$eval for most of the TODOs.
|
2018-05-21 12:53:42 +02:00
|
|
|
-- TODO: Calling pactl when pulseaudio is not running will fire it up, which can
|
|
|
|
-- lead to a race condition when relogging: 4 pulseaudio processes will end up
|
|
|
|
-- running.
|