Commit c225c801 authored by kohl42's avatar kohl42
Browse files

modified path to make script callable from anywhere

parent b05fb7da
# Conky settings #
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
#imlib_cache_size 0
temperature_unit celsius
# XFCE lightdm backround issue
own_window_argb_visual yes
own_window_argb_value 0
# Window specifications #
own_window_class Conky
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_hints undecorate
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
minimum_size 520 600
maximum_width 520
alignment tr
gap_x -20
gap_y 100
# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
#default_color gray
default_shade_color red
default_outline_color green
# Text settings #
use_xft yes
override_utf8_locale yes
xftfont Play:normal:size=8
xftalpha 0.9
uppercase no
# TEXT color
default_color 333333
#color0 b2ff34
#color1 efefef
color0 34cdff
color1 efefef
# Lua Load ##${voffset 750}
lua_load ~/conky/conky-grappes/rings-v1.2.2.lua
#lua_load ~/conky/rings-v1.2.2.lua
#lua_draw_hook_pre ring_stats
lua_draw_hook_pre conky_main
${font Play:normal:size=8}${voffset 16}${color1}${goto 106}${freq_g cpu0} Ghz${alignr 330}${acpitemp} °C
${font Play:normal:size=8}${voffset 0}${goto 120}${color1}CPU 1 ${alignr 330}${color1}${cpu cpu0}%
${font Play:normal:size=8}${voffset 2}${goto 120}${color1}CPU 2${alignr 330}${color1}${cpu cpu1}%
${font Play:normal:size=8}${voffset 2}${goto 120}${color1}CPU 3${alignr 330}${color1}${cpu cpu2}%
${font Play:normal:size=8}${voffset 2}${goto 120}${color1}CPU 4${alignr 330}${color1}${cpu cpu3}%
${goto 50}${voffset 16}${font Play:normal:size=8}${color1}${top name 1}${alignr 306}${top cpu 1}%
${goto 50}${font Play:normal:size=8}${color1}${top name 2}${alignr 306}${top cpu 2}%
${goto 50}${font Play:normal:size=8}${color1}${top name 3}${alignr 306}${top cpu 3}%
${font Michroma:size=10}${color0}${goto 80}${voffset 4}CPU
${font Michroma:size=10}${color0}${goto 394}${voffset 48}MÉMOIRE
${goto 324}${voffset -2}${font Play:normal:size=8}${color1}${top_mem name 1}${alignr 40}${top_mem mem 1}%
${goto 324}${font Play:normal:size=8}${color1}${top_mem name 2}${alignr 40}${top_mem mem 2}%
${goto 324}${font Play:normal:size=8}${color1}${top_mem name 3}${alignr 40}${top_mem mem 3}%
${font Play:normal:size=8}${voffset 12}${goto 348}${color1}SWAP${alignr 40}${color1}${swap} / ${color1}${swapmax}
${font Play:normal:size=8}${voffset 2}${goto 348}${color1}RAM ${alignr 40}${color1}${mem} / ${color1}${memmax}
${font Play:normal:size=8}${goto 80}${voffset -68}Root${color1}${alignr 310}${fs_used /} / ${fs_size /}
${font Play:normal:size=8}${goto 80}${voffset 0}Home${alignr 310}${color1}${fs_used /home} / ${fs_size /home}
${font Play:normal:size=8}${goto 80}${voffset 0}Srv${alignr 310}${color1}${fs_used /srv} / ${fs_size /srv}
${font Michroma:size=10}${color0}${goto 66}${voffset 10}DISQUE DUR
${font Michroma:size=10}${color0}${voffset 34}${goto 324}INFO INTERNET
${if_existing /proc/net/route wlan0}${font Play:normal:size=8}${color1}${alignr 54}${voffset -6}WiFi ${color1}${wireless_essid wlan0}
${font Play:normal:size=8}${color1}${goto 298}${voffset 0}Up${goto 370}${color1}${totalup wlan0} / ${color1}${upspeed wlan0}
${font Play:normal:size=8}${goto 298}${color1}Down${goto 370}${color1}${totaldown wlan0} / ${color1}${downspeed wlan0}
${font Play:bold:size=8}${goto 300}${voffset 2}Local IP${goto 370}${addr wlan0}
${font Play:bold:size=8}${goto 300}${voffset 1}Public IP${goto 370}${execi 3600 wget -q -O - | sed -e 's/[^[:digit:]\|.]//g'}
${font Michroma:size=9}${goto 90}${voffset -42}${color0}${time %a} ${color0}${time %x}
${font Michroma:size=18}${goto 108}${color1}${voffset -4}${time %H}:${time %M}
${font Michroma:size=8}${color0}${goto 296}${voffset 20}BATTERIE
${font Play:size=8}${color0}${goto 278}${voffset 8}${color1}${battery_percent BAT1}%
# |--ETH0
${else}${if_existing /proc/net/route eth0}${font Play:normal:size=8}${color1}${goto 298}${voffset 6}Up${goto 370}${color1}${totalup eth0} / ${color1}${upspeed eth0}
${font Play:normal:size=8}${goto 298}${color1}Down${goto 370}${color1}${totaldown eth0} / ${color1}${downspeed eth0}
${font Play:bold:size=8}${goto 300}${voffset 2}Local IP${goto 370}${addr eth0}
${font Play:bold:size=8}${goto 300}${voffset 1}Public IP${goto 370}${execi 3600 wget -q -O - | sed -e 's/[^[:digit:]\|.]//g'}
${font Michroma:size=9}${alignr 298}${voffset -42}${color0}${time %a} ${color0}${time %x}
${font Michroma:size=18}${goto 108}${color1}${voffset -4}${time %H}:${time %M}
${font Michroma:size=8}${color0}${goto 296}${voffset 20}BATTERIE
${font Play:size=8}${color0}${goto 278}${voffset 8}${color1}${battery_percent BAT1}%${endif}${endif}
#${font Play:normal:size=8}${goto 180}Uptime${color1}${alignr 100}${uptime_short}
${font Michroma:bold:size=11}${color0}${voffset 50}${alignr 100}${pre_exec cat /etc/}
#${font Michroma:bold:size=11}${color0}${voffset 50}${alignr 100}${pre_exec cat /etc/} ${machine}
File mode changed from 100755 to 100644
......@@ -8,12 +8,15 @@ import platform
import re
from collections import OrderedDict
import sys
from os.path import expanduser
src_lua = './rings-v2_tpl'
dest_lua = './rings-v2_gen.lua'
home = expanduser("~")
working_dir = home+'/conky/conky-grappes/'
src_conky = './conky_tpl'
dest_conky = './conky_gen.conkyrc'
src_lua = working_dir+'rings-v2_tpl'
dest_lua = working_dir+'rings-v2_gen.lua'
src_conky = working_dir+'conky_tpl'
dest_conky = working_dir+'conky_gen.conkyrc'
# Defaults is blue metrics and white font
## blue | 34cdff
......@@ -28,9 +31,10 @@ couleurs = {
'red': 'ff1d2b',
'green': '1dff22',
'pink': 'd70751',
'skyblue': '008cff',
'skyblue': '8fd3ff',
'brown': 'd7bd4c',
'blue': '34cdff',
'blue': '165cc4',
'iceblue': '43d2e5',
'white': 'efefef',
'grey': '323232',
'black': '000000',
......@@ -253,7 +257,7 @@ def write_fsconf_lua(disk, cpunb):
# for DISK_WATCH section
index = index_start + cpt
with open('./fs_watch') as f:
with open(working_dir+'fs_watch') as f:
for line in f:
test = re.sub(r'FILESYS', data['arg'], line)
fsconf_watch.append(re.sub(r'INDEX', format(index), test))
......@@ -443,7 +447,7 @@ def write_netconf_conky(interface):
if interface[0] == "no_gateway_interface":
print('No default route on the system! Tachikoma, what is happening?!')
with open('./nonetconf') as f:
with open(working_dir+'nonetconf') as f:
for line in f:
#print('netconf: {0}'.format(netconf))
......@@ -454,7 +458,7 @@ def write_netconf_conky(interface):
elif interface[1] is True:
print('Setting up Wifi as main interface')
with open('./wificonf') as f:
with open(working_dir+'wificonf') as f:
for line in f:
netconf.append(re.sub(r'INTERFACE', interface[0], line))
#print('netconf: {0}'.format(netconf))
......@@ -464,7 +468,7 @@ def write_netconf_conky(interface):
write_conf(filedata, dest_conky)
print('Setting up NIC as main interface')
with open('./ethconf') as f:
with open(working_dir+'ethconf') as f:
for line in f:
netconf.append(re.sub(r'INTERFACE', interface[0], line))
#print('netconf: {0}'.format(netconf))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment