diff --git a/conky/conky.conf b/conky/conky.conf index 36956d4..d52d7db 100644 --- a/conky/conky.conf +++ b/conky/conky.conf @@ -26,58 +26,46 @@ along with this program. If not, see . ]] conky.config = { - alignment = 'top_right', - background = false, - border_width = 1, - cpu_avg_samples = 2, + alignment = 'top_right', + background = false, + border_width = 1, + cpu_avg_samples = 2, default_color = 'white', - default_outline_color = 'white', - default_shade_color = 'white', - draw_borders = false, - draw_graph_borders = true, - draw_outline = false, - draw_shades = false, - use_xft = true, - font = 'Hasklug Medium Nerd Font Complete Mono:size=12', - gap_x = 5, - gap_y = 60, - minimum_height = 5, - minimum_width = 5, - net_avg_samples = 2, - no_buffers = true, - out_to_console = false, - out_to_stderr = false, - extra_newline = false, - own_window = true, - own_window_class = 'Conky', - own_window_type = 'desktop', - stippled_borders = 0, - update_interval = 1.0, - uppercase = false, - use_spacer = 'none', - show_graph_scale = false, - show_graph_range = false + default_outline_color = 'white', + default_shade_color = 'white', + draw_borders = false, + draw_graph_borders = true, + draw_outline = false, + draw_shades = false, + use_xft = true, + font = 'Hasklug Medium Nerd Font Complete Mono:size=12', + gap_x = 0, + gap_y = 10, + minimum_height = 500, + minimum_width = 0, + net_avg_samples = 2, + no_buffers = true, + out_to_console = false, + out_to_stderr = false, + extra_newline = false, + own_window = true, + own_window_class = 'Conky', + own_window_type = 'desktop', + own_window_colour = '000000', + own_window_argb_visual = true, + own_window_transparent = true, + own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', + stippled_borders = 0, + update_interval = 1.0, + uppercase = false, + use_spacer = 'none', + show_graph_scale = false, + show_graph_range = false, + lua_load = '~/.conky/scripts/main.lua', + lua_draw_hook_post = 'main', } conky.text = [[ -${scroll 16 $nodename - $sysname $kernel on $machine | } -$hr -${color grey}Uptime:$color $uptime -${color grey}Frequency (in MHz):$color $freq -${color grey}Frequency (in GHz):$color $freq_g -${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4} -${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4} -${color grey}CPU Usage:$color $cpu% ${cpubar 4} -${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes -$hr -${color grey}File systems: - / $color${fs_used /}/${fs_size /} ${fs_bar 6 /} -${color grey}Networking: -Up:$color ${upspeed eth0} ${color grey} - Down:$color ${downspeed eth0} -$hr -${color grey}Name PID CPU% MEM% -${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1} -${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2} -${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3} -${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4} +${voffset 10}${color EAEAEA}${font Hasklug Nerd Font Complete:pixelsize=120}${time %H:%M}${font}${voffset 0}${offset 10}${color FFA300}${font Hasklug Medium Nerd Font Complete Mono:pixelsize=42}${time %d} ${voffset 0}${color EAEAEA}${font Hasklug Medium Nerd Font Complete Mono:pixelsize=22}${time %B} ${time %Y}${font}${voffset 10}${font Hasklug Medium Nerd Font Complete Mono:pixelsize=58}${offset -148}${time %A}${font} +${voffset 50}${offset 150}${font Ubuntu:pixelsize=12}${color FFA300}HOME ${offset 9}$color${fs_free /home} / ${fs_size /home}${offset 30}${color FFA300}RAM ${offset 9}$color$mem / $memmax${offset 30}${color FFA300}CPU ${offset 9}$color${cpu cpu0}% ]] diff --git a/conky/scripts/main.lua b/conky/scripts/main.lua new file mode 100644 index 0000000..0fa7dd5 --- /dev/null +++ b/conky/scripts/main.lua @@ -0,0 +1,21 @@ +-- This is a lua script for use in Conky. +require 'cairo' + +function conky_main () + if conky_window == nil then + return + end + local cs = cairo_xlib_surface_create (conky_window.display, + conky_window.drawable, + conky_window.visual, + conky_window.width, + conky_window.height) + cr = cairo_create (cs) + local updates = tonumber (conky_parse ('${updates}')) + if updates > 5 then + print ("hello world") + end + cairo_destroy (cr) + cairo_surface_destroy (cs) + cr = nil +end