Skip to content

Commit

Permalink
conky: convert config to new format
Browse files Browse the repository at this point in the history
Need to do it manually.
New version not completely backward compatible with old format. E.g.:
double_buffer = yes --> crash!

Using /usr/share/doc/conky-all/convert.lua
New format from release 1.10.x

Known issues in conky 1.10.x (2016):
+ if_match fail with locale:
brndnmtthws/conky#20

+ exec not work at first iteration:
brndnmtthws/conky#112
  • Loading branch information
iiey committed Jul 3, 2019
1 parent 35decac commit 041b88a
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 122 deletions.
82 changes: 43 additions & 39 deletions conky/conkyrc_circle
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
# Create own window instead of using desktop (required in nautilus).
own_window yes
own_window_type normal
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 0
own_window_class conky
conky.config = {
-- Create own window instead of using desktop (required in nautilus).
own_window = true,
own_window_type = 'normal',
own_window_transparent = false,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_argb_visual = true,
own_window_argb_value = 0,
own_window_class = 'conky',

# Graphics settings.
double_buffer yes # Use double buffering
use_spacer right # Add space around certain objects.
use_xft yes # Use anti-aliased font.
-- Graphics settings.
double_buffer = true, -- Use double buffering
use_spacer = 'right', -- Add space around certain objects.
use_xft = true, -- Use anti-aliased font.

draw_shades no
draw_shades = false,

alignment top_right
alignment = 'top_right',
xinerama_head = 1, --Show on first monitor (in case more than one)

update_interval 1 # Update interval in seconds.
update_interval = 1, -- Update interval in seconds.

minimum_size 290 600
maximum_width 290
minimum_width = 290, minimum_height = 600,
maximum_width = 290,

# Text settings.
draw_outline no
draw_borders no
uppercase no
-- Text settings.
draw_outline = false,
draw_borders = false,
uppercase = false,

# Border settings.
stippled_borders 3
#border_margin 9
border_width 0
gap_x 12
gap_y 42
-- Border settings.
stippled_borders = 3,
--border_margin 9
border_width = 0,
gap_x = 12,
gap_y = 42,

# Color settings.
default_color ffffff
-- Color settings.
default_color = '#ffffff',

#font
xftfont Open Sans Light:size=10
--font
font = 'Open Sans Light:size=10',

#lua_load ~/.config/conky/rings/rings-v1.2.lua
lua_load ~/conky/rings.lua
lua_draw_hook_pre ring_stats
--lua_load ~/.config/conky/rings/rings-v1.2.lua
lua_load = '~/sources/dotfiles/conky/rings.lua',
lua_draw_hook_pre = 'ring_stats',

# Lines after 'TEXT' will be formatted on screen
TEXT
-- Lines after 'TEXT' will be formatted on screen
};

conky.text = [[
${voffset 135}${goto 127}${font Open Sans:size=23}${time %I:%M}$font
${voffset 5}${goto 157}${font Open Sans:size=10}${time %S}$font
${voffset 27}${goto 65} ${font Open Sans:size=10}${cpu}%
Expand All @@ -69,11 +73,11 @@ ${alignr}${wireless_essid eth0}
${alignr}${addr eth0}
${alignr}Down ${downspeedf eth0}kbps
${alignr}Up ${upspeedf eth0}kbps
$else
${if_existing /proc/net/route wlan0}
${else}${if_existing /proc/net/route wlan0}
${alignc}${wireless_essid wlan0}
${alignc}${addr wlan0}
${alignc}Down ${downspeedf wlan0}kbps
${alignc}Up ${upspeedf wlan0}kbps
$endif
${endif}${endif}

]];
106 changes: 56 additions & 50 deletions conky/conkyrc_default
Original file line number Diff line number Diff line change
@@ -1,53 +1,58 @@
# Conky, a system monitor, based on torsmo
#create a window
own_window yes
own_window_type normal
#transparent background
#note: this works if only desktop effects's active
#kde5: check system setttings > hardware > display and monitor > compositor
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 0
own_window_class Conky

default_color white
default_outline_color white
default_shade_color white

alignment top_left
border_width 0
draw_borders no #outline borders
gap_x 5 #gap between right and left border of screen
gap_y 30 #gap between top and bottom border of screen
minimum_size 90 500 #need restart to take effect

use_xft yes #anti alias font
xftfont DejaVu Sans Mono:size=9
uppercase no

out_to_console no
out_to_stderr no
extra_newline no
use_spacer none

stippled_borders 0
draw_outline no
draw_shades no
draw_graph_borders no
show_graph_scale no
show_graph_range no

update_interval 2.0 #update interval in seconds
double_buffer yes #prevent flickering
cpu_avg_samples 2
net_avg_samples 2

#load rings with cpu, ram and time
#lua_load ~/conky/rings.lua
#lua_draw_hook_pre ring_stats

TEXT
conky.config = {
--Conky, a system monitor, based on torsmo
--create a window
own_window = true,
own_window_type = 'normal',

--transparent background
--note: this works if only desktop effects's active
--kde5: check system setttings > hardware > display and monitor > compositor
own_window_transparent = false,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_argb_visual = true,
own_window_argb_value = 0,
own_window_class = 'Conky',

default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',

alignment = 'top_left', --show on top left of screen
xinerama_head = 1, --show on first monitor (in case more than one)
border_width = 0,
draw_borders = false, --outline borders
gap_x = 5, --gap between right and left border of screen
gap_y = 30, --gap between top and bottom border of screen
minimum_width = 90, minimum_height = 500, --need restart to take effect

use_xft = true, --anti alias font
font = 'DejaVu Sans Mono:size=9',
uppercase = false,

out_to_console = false,
out_to_stderr = false,
extra_newline = false,
use_spacer = 'none',

stippled_borders = 0,
draw_outline = false,
draw_shades = false,
draw_graph_borders = false,
show_graph_scale = false,
show_graph_range = false,

update_interval = 2.0, --update interval in seconds
double_buffer = true, --prevent flickering
cpu_avg_samples = 2,
net_avg_samples = 2,

--load rings with cpu, ram and time
--lua_load ~/sources/dotfiles/conky/rings.lua
--lua_draw_hook_pre ring_stats

};

conky.text = [[
${font DejaVu Sans Mono:size=8}
$nodename - $sysname $kernel on $machine${font}
#${alignr}${time %T}
Expand Down Expand Up @@ -99,3 +104,4 @@ ${font}
${voffset 50}
#$hr

]];
71 changes: 38 additions & 33 deletions conky/conkyrc_wordclock
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
#create window and transparency
background no
own_window yes
own_window_type normal
own_window_class Conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 0
conky.config = {
--create window and transparency
background = false,
own_window = true,
own_window_type = 'normal',
own_window_class = 'Conky',
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_argb_visual = true,
own_window_argb_value = 0,

#alignment mm
alignment bottom_left
gap_x 5
#575
gap_y 10
#310
--alignment mm
alignment = 'bottom_left',
xinerama_head = 1,
gap_x = 5,
--575
gap_y = 10,
--310

#font
use_xft yes
xftfont Source Sans Pro:size=18
uppercase yes
xftalpha 0.1
--font
use_xft = true,
font = 'Source Sans Pro:size=18',
uppercase = true,
xftalpha = 0.1,

draw_shades yes
default_shade_color 000000
default_color ffffff
color1 2d2d2d
#2d2d2d
#4A2B45
#382536
#3F2E2F
#000000
draw_shades = true,
default_shade_color = '#000000',
default_color = '#ffffff',
color1 = '#2d2d2d',
--2d2d2d
--4A2B45
--382536
--3F2E2F
--000000

update_interval 15.0
double_buffer yes
update_interval = 15.0,
double_buffer = true,

#lua_load ~/conky/rings_clock.lua
#lua_draw_hook_pre rings_draw
--lua_load ~/sources/dotfiles/conky/rings_clock.lua
--lua_draw_hook_pre rings_draw

TEXT
};

conky.text = [[
${voffset 250}
${alignc}${color}I T ${color1}L ${color}I S ${color1}A S T I M E
${alignc}${if_match ${exec date +"%M"} < 35}${if_match ${exec date +"%M"} >= 15}${if_match ${exec date +"%M"} < 20}${color}${endif}${endif}A ${color1}C ${if_match ${exec date +"%M"} >= 15}${if_match ${exec date +"%M"} < 20}${color}${endif}${endif}Q U A R T E R ${color1}D C
Expand All @@ -56,3 +60,4 @@ ${alignc}${if_match ${exec date +"%I"} == 3}${color}${else}${color1}${endif}F O
${alignc}${if_match ${exec date +"%I"} == 7}${color}${else}${color1}${endif}E I G H T${if_match ${exec date +"%I"} == 10}${color}${else}${color1}${endif} E L E V E N
${alignc}${if_match ${exec date +"%I"} == 6}${color}${else}${color1}${endif}S E V E N${if_match ${exec date +"%I"} == 11}${color}${else}${color1}${endif} T W E L V E
${alignc}${if_match ${exec date +"%I"} == 9}${color}${else}${color1}${endif}T E N ${endif}${color1}S E ${if_match ${exec date +"%M"} < 5}${color}${endif}O C L O C K
]];

0 comments on commit 041b88a

Please sign in to comment.