From: Samir Benmendil Date: Mon, 23 Oct 2017 22:44:57 +0000 (+0100) Subject: conky: remove conky X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/31036b38da4f923c8afdce37aa87573c37eb8d99 conky: remove conky --- diff --git a/Makefile b/Makefile index 9b8fe2f..8892687 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ APATH := $(realpath .) FILES := bin -DOTFILES := conky* goobookrc msmtp* mutt profile tmux.conf weechat Xresources +DOTFILES := goobookrc msmtp* mutt profile tmux.conf weechat Xresources CONFIGFILES := aliases compton.conf git mpv offlineimap ranger retroarch xbindkeys xkb .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES) @@ -19,6 +19,7 @@ vim: gdb: ln -sfT $(APATH)/gdbinit ~/.gdbinit ln -sfT $(APATH)/cgdb ~/.cgdb +.PHONY: gdb awesome: ~/.config ln -sfT $(APATH)/awesome ~/.config/awesome diff --git a/conky/awesome.png b/conky/awesome.png deleted file mode 100644 index 5b08e53..0000000 Binary files a/conky/awesome.png and /dev/null differ diff --git a/conky/chakra.png b/conky/chakra.png deleted file mode 100644 index a9fcc6c..0000000 Binary files a/conky/chakra.png and /dev/null differ diff --git a/conky/functions.lua b/conky/functions.lua deleted file mode 100644 index 4f51702..0000000 --- a/conky/functions.lua +++ /dev/null @@ -1,85 +0,0 @@ ---[[ - - Licensed under GNU General Public License v2 - * (c) 2014, Samir Benmendil - * (c) 2013, Luke Bonham - * (c) 2010-2012, Peter Hofmann - ---]] - -local io = io -local os = { getenv = os.getenv } -local pairs = pairs -local string = { len = string.len, - match = string.match, - format = string.format, - sub = string.sub } - --- Maildir check --- lain.widgets.maildir -local maildir = {} -local newmail - -function conky_mail() - local updates=tonumber(conky_parse('${updates}')) - if newmail and updates % 30 ~= 0 then - return newmail - end - local mailpath = os.getenv("HOME") .. "/mail" - - -- Find pathes to mailboxes. - local dirs = io.popen("find " .. mailpath .. " -type d -name new -or -name cur -prune") - local boxes = {} - for line in dirs:lines() do - -- Strip off leading mailpath. - local acc = string.match(line, mailpath.."/*([^/]+)") - local box = string.match(line, mailpath..'/'..acc.."/*([^/]+)") - if boxes[acc] == nil then - boxes[acc] = {} - end - if boxes[acc][box] == nil then - boxes[acc][box] = {} - end - - -- Find all files in the "new" subdirectory. For each - -- file, print a single character (no newline). Don't - -- match files that begin with a dot. - -- Afterwards the length of this string is the number of - -- new mails in that box. - if line:sub(-3) == 'new' then - local new = io.popen("find " .. line .. " -type f -not -name '.*' -printf a") - cnt_new = string.len(new:read("*all")) - new:close() - if cnt_new > 0 then - boxes[acc][box]['cnt_new'] = string.format("${color e6db74}%5d${color}", cnt_new) - else - boxes[acc][box]['cnt_new'] = string.format("%5d", cnt_new) - end - elseif line:sub(-3) == 'cur' then - local old = io.popen("find " .. line .. " -type f -not -name '*:2,*S*' -printf a") - cnt_old = string.len(old:read("*all")) - old:close() - if cnt_old > 0 then - boxes[acc][box]['cnt_old'] = string.format("${color fd971f}%2d${color}", cnt_old) - else - boxes[acc][box]['cnt_old'] = string.format("%2d", cnt_old) - end - end - end - dirs:close() - - newmail = "" - local accounts = {"gmail"} - local mailboxes = { {"inbox", "chakra"}, - {"youtube", "unimaas"}} - for a, acc in pairs(accounts) do - for b, box in ipairs(mailboxes) do - local boxl = boxes[acc][box[1]] - local boxr = boxes[acc][box[2]] - newmail = newmail .. string.format("%10s:%s/%s", box[1], boxl['cnt_new'], boxl['cnt_old']) - newmail = newmail .. string.format("%11s:%s/%s\n", box[2], boxr['cnt_new'], boxr['cnt_old']) - end - end - newmail = string.sub(newmail, 1 , #newmail - 1) - return newmail -end diff --git a/conkyrc b/conkyrc deleted file mode 100644 index 6eb26d0..0000000 --- a/conkyrc +++ /dev/null @@ -1,132 +0,0 @@ -alignment top_left -gap_x 8 -gap_y 30 -border_width 0 -border_inner_margin 8 - -minimum_size 320 1080 -maximum_width 320 - -default_bar_size 92 6 - -format_human_readable - -use_xft yes -override_utf8_locale yes -xftfont Anonymous Pro:style=Bold:size=11 -text_buffer_size 2048 - -own_window yes -own_window_argb_visual yes -own_window_argb_value 128 -own_window_class Conky -own_window_hints below,skip_taskbar,skip_pager -own_window_transparent no -own_window_type desktop - -draw_borders no -draw_graph_borders yes -draw_outline no -draw_shades yes -default_color white -default_outline_color white -default_shade_color 000000 - -background no -cpu_avg_samples 2 -net_avg_samples 2 -extra_newline no -no_buffers yes -double_buffer yes -out_to_console no -out_to_stderr no -show_graph_range no -show_graph_scale no -stippled_borders 0 -update_interval 2 -uppercase no -use_spacer none - -lua_load ~/.conky/functions.lua - -TEXT -${image ~/.conky/chakra.png -p 10,15 -s 70x70} -${image ~/.conky/awesome.png -p 100,15 -s 70x70}# -${font Droid Sans:style=Bold:size=24}${alignr}${time %R} -${font Droid Sans:style=Bold:size=12}${alignr}${time %a, %e %b %Y}${font} -${font Droid Sans:style=Bold:size=12}${color 75D1FF}SYSTEM${color 1B71CC}$hr${color}${font} -Kernel: ${alignr}${kernel} -Uptime: ${alignr}${uptime} -# |--Updates -Updates: ${alignr}${font Droid Sans:style=Bold:size=10}${execpi 600 checkupdates | wc -l | sed '/^0$/! s/^\(.*\)$/${color 75D1FF}\1${color}/' }${font} Package(s) - -# |--Mail -${font Droid Sans:style=Bold:size=12}${color 75D1FF}MAIL${color 1B71CC}$hr${color}${font} -${lua_parse mail} - -# |--MPD -${font Droid Sans:style=Bold:size=12}${color 75D1FF}MPD${color 1B71CC}$hr${color}${font} - -# |--CPU -${font Droid Sans:style=Bold:size=12}${color 75D1FF}CPU${color 1B71CC}$hr${color}${font} -${color AAAAAA}${exec grep "model name" /proc/cpuinfo | uniq | sed 's/.*: //'}${color} -${if_empty ${cpu cpu1}}${else}Core 0 @ ${color 75D1FF}${alignr 65}${cpu cpu1}%${alignr}${cpubar cpu1 7,150}${color} -${endif}${if_empty ${cpu cpu2}}${else}Core 1 @ ${color 75D1FF}${alignr 65}${cpu cpu2}%${alignr}${cpubar cpu2 7,150}${color} -${endif}${if_empty ${cpu cpu3}}${else}Core 2 @ ${color 75D1FF}${alignr 65}${cpu cpu3}%${alignr}${cpubar cpu3 7,150}${color} -${endif}${if_empty ${cpu cpu4}}${else}Core 3 @ ${color 75D1FF}${alignr 65}${cpu cpu4}%${alignr}${cpubar cpu4 7,150}${color} -${endif}${if_empty ${cpu cpu5}}${else}Core 4 @ ${color 75D1FF}${alignr 65}${cpu cpu5}%${alignr}${cpubar cpu5 7,150}${color} -${endif}${if_empty ${cpu cpu6}}${else}Core 5 @ ${color 75D1FF}${alignr 65}${cpu cpu6}%${alignr}${cpubar cpu6 7,150}${color} -${endif}${if_empty ${cpu cpu7}}${else}Core 6 @ ${color 75D1FF}${alignr 65}${cpu cpu7}%${alignr}${cpubar cpu7 7,150}${color} -${endif}${if_empty ${cpu cpu8}}${else}Core 7 @ ${color 75D1FF}${alignr 65}${cpu cpu8}%${alignr}${cpubar cpu8 7,150}${color} -${endif}${if_empty ${cpu cpu9}}${else}Core 8 @ ${color 75D1FF}${alignr 65}${cpu cpu9}%${alignr}${cpubar cpu9 7,150}${color} -${endif} -# |--MEM -${font Droid Sans:style=Bold:size=12}${color 75D1FF}MEMORY${color 1B71CC}$hr${color}${font} -RAM${alignr}$memperc% -${mem}/${memmax}${alignr}${color 75D1FF}${membar 8,150}${color}# -# |--SWAP -${if_match "${swapmax}" == "0B"} -SWAP${alignr}${swapperc}# -${swap}/${swapmax}${alignr}${color 75D1FF}${swapbar 8,150}${color}# -${endif} - -# |--PROC -${font Droid Sans:style=Bold:size=12}${color 75D1FF}TOP${color 1B71CC}$hr${color}${font} -${color AAAAAA}PROCESS${alignr 120}CPU${alignr 20}RAM${color} -${top name 1}${alignr 80}${top cpu 1}${alignr}${top mem 1} -${top name 2}${alignr 80}${top cpu 2}${alignr}${top mem 2} -${top name 3}${alignr 80}${top cpu 3}${alignr}${top mem 3} -${top name 4}${alignr 80}${top cpu 4}${alignr}${top mem 4} -${top name 5}${alignr 80}${top cpu 5}${alignr}${top mem 5} - -############# -# - NETWORK - # -############### -${font Droid Sans:style=Bold:size=12}${color 75D1FF}NETWORK${color 1B71CC}$hr${color}${font} -Public IP: ${alignr}${execi 1800 ~/bin/whatsmyip}# -${if_up enp3s0} -Local IP: ${alignr}${addr enp3s0} -Upload: ${alignr 10}${upspeed enp3s0}/s${alignr}${color 75D1FF}${upspeedgraph enp3s0 20,150}${color} -${voffset -20}Overall: ${alignr 160}${totalup enp3s0} -Download: ${alignr 10}${downspeed enp3s0}/s${alignr}${color 75D1FF}${downspeedgraph enp3s0 20,150}${color} -${voffset -20}Overall: ${alignr 160}${totaldown enp3s0}${endif}# -${if_up wlp3s0} -Local IP: ${alignr}${addr wlp3s0} -Upload: ${alignr 10}${upspeed wlp3s0}/s${alignr}${color 75D1FF}${upspeedgraph wlp3s0 20,150}${color} -${voffset -20}Overall: ${alignr 160}${totalup wlp3s0} -Download: ${alignr 10}${downspeed wlp3s0}/s${alignr}${color 75D1FF}${downspeedgraph wlp3s0 20,150}${color} -${voffset -20}Overall: ${alignr 160}${totaldown wlp3s0}${endif} - -########## -# - HD - # -########## -${font Droid Sans:style=Bold:size=12}${color 75D1FF}HDD${color 1B71CC}$hr${color}${font} -# |--HD default -Root: ${fs_used_perc /}%${goto 100}${alignr}${color 75D1FF}${fs_bar 7,150 /}${color} -Free: ${fs_free /} ${alignr 1}Used: ${fs_used /} -Home: ${fs_used_perc /home}%${goto 100}${alignr}${color 75D1FF}${fs_bar 7,150 /home}${color} -Free: ${fs_free /home} ${alignr 1}Used: ${fs_used /home} -${if_mounted /mnt/data}data: ${fs_used_perc /mnt/data}%${goto 100}${alignr}${color 75D1FF}${fs_bar 7,150 /mnt/data}${color} -Free: ${fs_free /mnt/data} ${alignr 1}Used: ${fs_used /mnt/data}${endif} -${if_mounted /mnt/Skaro}Skaro: ${fs_used_perc /mnt/Skaro}%${goto 100}${alignr}${color 75D1FF}${fs_bar 7,150 /mnt/Skaro}${color} -Free: ${fs_free /mnt/Skaro} ${alignr 1}Used: ${fs_used /mnt/Skaro}${endif}