Ansible template Conky config

This commit is contained in:
Scott Wallace 2019-01-20 10:14:18 +00:00
parent 8d07f06bac
commit 5da2de5041
3 changed files with 64 additions and 59 deletions

View file

@ -5,3 +5,12 @@
repo: "{{ item.repo }}"
dest: "{{ item.dest }}"
with_items: "{{ config_repos }}"
- name: Conky configuration
tags:
- config
- conky
template:
src: templates/conkyrc.j2
dest: ~/.conkyrc
mode: "0600"

View file

@ -0,0 +1,55 @@
conky.config = {
background = true,
update_interval = 1.5,
cpu_avg_samples = 2,
net_avg_samples = 2,
out_to_console = false,
override_utf8_locale = true,
double_buffer = true,
no_buffers = true,
text_buffer_size = 32768,
imlib_cache_size = 0,
own_window = true,
own_window_type = 'desktop',
own_window_argb_visual = true,
own_window_argb_value = 120,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
border_inner_margin = 10,
border_outer_margin = 0,
xinerama_head = 2,
alignment = 'bottom_right',
gap_x = 90,
gap_y = 90,
draw_shades = true,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
use_xft = true,
font = 'Ubuntu Mono:size=12',
xftalpha = 0.8,
uppercase = false,
default_color = '#FFFFFF',
own_window_colour = '#000000',
minimum_width = 0, minimum_height = 0,
};
conky.text = [[
${color #DD3A21}${nodename}${color}${goto 105}${font Webdings}~ ${font}${battery_short}${goto 200}${font Modern Pictograms}3${font}${voffset -2} ${time %d/%m/%y} ${font Modern Pictograms}}${font}${voffset -2} ${time %H:%M}
${hr}
${font Modern Pictograms}^${font}${voffset -2} ${addrs {{ ansible_default_ipv4.interface }}} / ${curl https://ipinfo.io/ip}
${goto 20}${upspeedgraph {{ ansible_default_ipv4.interface }} 30,350 06E9F8 2104FA}
${goto 20}${font Modern Pictograms}]${font} ${upspeed {{ ansible_default_ipv4.interface }}}
${goto 20}${downspeedgraph {{ ansible_default_ipv4.interface }} 30,350 FFFF00 DD3A21}
${goto 20}${font Modern Pictograms}[${font} ${downspeed {{ ansible_default_ipv4.interface }}}
${hr}
${font Modern Pictograms}V${font}${voffset -2} ${mem}/${memmax} (${memperc}%) | Swap: ${swapperc}%
${goto 20}${memgraph 30,350 AAF5D0 00B35B}
${hr}
{% for cpu in range(ansible_processor_vcpus) %}
${goto 20}CPU{{ cpu }}: ${cpu cpu{{ cpu }}}%${goto 100}${cpubar 7,280 cpu{{ cpu }}}
{% endfor %}
${hr}
${color #FFFF00}${goto 20}Name ${goto 200}PID${goto 255}CPU%${goto 310}Mem%${color}
{% for top in range(1, 6) %}
${goto 20}${top name {{top}}} ${goto 180}${top pid {{top}}}${goto 235}${top cpu {{top}}}${goto 290}${top mem {{top}}}
{% endfor %}
]];

View file

@ -1,59 +0,0 @@
conky.config = {
background = true,
update_interval = 1.5,
cpu_avg_samples = 2,
net_avg_samples = 2,
out_to_console = false,
override_utf8_locale = true,
double_buffer = true,
no_buffers = true,
text_buffer_size = 32768,
imlib_cache_size = 0,
own_window = true,
own_window_type = 'desktop',
own_window_argb_visual = true,
own_window_argb_value = 120,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
border_inner_margin = 10,
border_outer_margin = 0,
xinerama_head = 2,
alignment = 'bottom_right',
gap_x = 90,
gap_y = 90,
draw_shades = true,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
use_xft = true,
font = 'Ubuntu Mono:size=12',
xftalpha = 0.8,
uppercase = false,
default_color = '#FFFFFF',
own_window_colour = '#000000',
minimum_width = 0, minimum_height = 0,
};
conky.text = [[
${color #DD3A21}${nodename}${color}${goto 105}${font Webdings}~ ${font}${battery_short}${goto 200}${font Modern Pictograms}3${font}${voffset -2} ${time %d/%m/%y} ${font Modern Pictograms}}${font}${voffset -2} ${time %H:%M}
${hr}
${font Modern Pictograms}^${font}${voffset -2} ${addrs wlp3s0} / ${curl https://ipinfo.io/ip}
${goto 20}${upspeedgraph wlp3s0 30,350 06E9F8 2104FA}
${goto 20}${font Modern Pictograms}]${font} ${upspeed wlp3s0}
${goto 20}${downspeedgraph wlp3s0 30,350 FFFF00 DD3A21}
${goto 20}${font Modern Pictograms}[${font} ${downspeed wlp3s0}
${hr}
${font Modern Pictograms}V${font}${voffset -2} ${mem}/${memmax} (${memperc}%) | Swap: ${swapperc}%
${goto 20}${memgraph 30,350 AAF5D0 00B35B}
${hr}
${goto 20}CPU0: ${cpu cpu0}%${goto 100}${cpubar 7,280 cpu0}
${goto 20}CPU1: ${cpu cpu1}%${goto 100}${cpubar 7,280 cpu1}
${goto 20}CPU2: ${cpu cpu2}%${goto 100}${cpubar 7,280 cpu2}
${goto 20}CPU3: ${cpu cpu3}%${goto 100}${cpubar 7,280 cpu3}
${hr}
${color #FFFF00}${goto 20}Name ${goto 200}Pid${goto 255}Cpu%${goto 310}Mem%${color}
${goto 20}${top name 1} ${goto 180}${top pid 1}${goto 235}${top cpu 1}${goto 290}${top mem 1}
${goto 20}${top name 2} ${goto 180}${top pid 2}${goto 235}${top cpu 2}${goto 290}${top mem 2}
${goto 20}${top name 3} ${goto 180}${top pid 3}${goto 235}${top cpu 3}${goto 290}${top mem 3}
${goto 20}${top name 4} ${goto 180}${top pid 4}${goto 235}${top cpu 4}${goto 290}${top mem 4}
${goto 20}${top name 5} ${goto 180}${top pid 5}${goto 235}${top cpu 5}${goto 290}${top mem 5}
]];