Last active
May 22, 2019 21:26
-
-
Save Kogia-sima/8394e2034db513b832f08f2f859bc2dd to your computer and use it in GitHub Desktop.
flair theme with conky 1.10.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- vim:set expandtab ts=2 sw=2 syntax=lua: | |
conky.config = { | |
background = false, | |
use_xft = true, | |
xftalpha = 0.8, | |
update_interval = 1, | |
own_window = true, | |
own_window_class = 'Conky', | |
own_window_type = 'desktop', | |
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', | |
own_window_transparent = true, | |
own_window_argb_visual = true, | |
own_window_argb_value = 0, | |
double_buffer = true, | |
draw_shades = false, | |
draw_outline = false, | |
draw_borders = true, | |
draw_graph_borders = false, | |
stippled_borders = 0, | |
border_width = 1, | |
default_color = '#000', | |
default_shade_color = '#000', | |
default_outline_color = '#000', | |
alignment = 'top_left', | |
minimum_height = 600, | |
minimum_width = 600, | |
maximum_width = 900, | |
gap_x = 235, | |
gap_y = 70, | |
no_buffers = true, | |
uppercase = false, | |
cpu_avg_samples = 2, | |
net_avg_samples = 2, | |
short_units = true, | |
text_buffer_size = 2048, | |
use_spacer = 'none', | |
override_utf8_locale = true, | |
lua_load = '~/.conky/script.lua', | |
lua_draw_hook_post = 'main' | |
} | |
conky.text = [[ | |
${alignr 270}${voffset 25}${font GeosansLight:size=25}Today | |
${alignr 270}${voffset 10}${font GeosansLight:light:size=70}${time %I:%M} | |
${alignc 75}${voffset -55}${font GeosansLight:size=17}${time %A, %d %B} | |
${goto 383}${voffset -187}${font GeosansLight:size=25}Systems${font GeosansLight:size=22} | |
${goto 411}${voffset 15}${font GeosansLight:size=15}${cpu cpu0}% / 100% | |
${goto 411}${voffset 6}$mem / $memmax${font GeosansLight:size=15} | |
${goto 411}${voffset 6}${fs_used /} / ${fs_size /} | |
${goto 411}${voffset 6}${if_up wlan0}${upspeed wlan0} kb/s / ${totalup wlan0}${endif}${if_up enp1s0}${upspeed enp1s0} kb/s / ${totalup enp1s0}${endif}${if_up ppp0}${upspeed ppp0} kb/s / ${totalup ppp0}${endif} | |
${goto 411}${voffset 6}${if_up wlan0}${downspeed wlan0} kb/s / ${totaldown wlan0}${endif}${if_up enp1s0}${downspeed enp1s0} kb/s / ${totaldown enp1s0}${endif}${if_up ppp0}${downspeed ppp0} kb/s / ${totaldown ppp0}${endif} | |
${goto 383}${voffset -167}${font Dingytwo:size=17}O$font | |
${goto 383}${voffset 3}${font Dingytwo:size=17}7$font | |
${goto 383}${voffset 3}${font Dingytwo:size=17}J$font | |
${goto 383}${voffset 3}${font Dingytwo:size=17}5$font | |
${goto 383}${voffset 3}${font Dingytwo:size=17}4$font | |
]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cairo' | |
function conky_main() | |
if conky_window == nil then | |
return | |
end | |
-- parameters -- | |
line_width = 2 | |
line_cap = CAIRO_LINE_CAP_BUTT | |
red,green,blue,alpha = 0,0,0,0.6 | |
startx = 356 | |
starty = 32 | |
endx = 356 | |
endy = 232 | |
-- draw line -- | |
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) | |
cairo_set_line_width (cr, line_width) | |
cairo_set_line_cap (cr, line_cap) | |
cairo_set_source_rgba (cr, red, green, blue, alpha) | |
cairo_move_to (cr, startx, starty) | |
cairo_line_to(cr, endx, endy) | |
cairo_stroke(cr) | |
-- destroy -- | |
cairo_destroy(cr) | |
cairo_surface_destroy(cs) | |
cr=nil | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment