diff --git a/conkyrc.lua b/conkyrc.lua
index a06e647..d990b24 100644
--- a/conkyrc.lua
+++ b/conkyrc.lua
@@ -6,20 +6,8 @@ local script_dir = debug.getinfo(1, 'S').source:match("^@(.*/)") or "./"
conkyrc.config = {
lua_load = script_dir .. "layout.lua",
- lua_startup_hook = "conky_setup",
- lua_draw_hook_pre = "conky_paint_background",
- lua_draw_hook_post = "conky_update",
-
- update_interval = 1,
-
- -- awesome wm --
- own_window = true,
- own_window_class = 'conky',
- own_window_type = 'override',
- own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager',
-
- double_buffer = true,
+ -- positioning --
alignment = 'top_left',
gap_x = 0,
gap_y = 28,
@@ -27,24 +15,11 @@ conkyrc.config = {
maximum_width = 140,
minimum_height = 1080 - 28,
- draw_shades = false,
- draw_outline = false,
- draw_borders = false,
- border_width = 0,
- border_inner_margin = 0,
- border_outer_margin = 0,
-
- top_cpu_separate = true,
- top_name_width = 10,
- no_buffers = true, -- include buffers in easyfree memory?
- cpu_avg_samples = 2,
- net_avg_samples = 1,
-
-- font --
- use_xft = true, -- Use Xft (anti-aliased font and stuff)
font = 'Ubuntu:pixelsize=10',
- override_utf8_locale = true,
- xftalpha = 0, -- Alpha of Xft font. Must be a value at or between 1 and 0.
+ draw_shades = true,
+ default_shade_color = 'black',
+ use_xft = true, -- Use Xft (anti-aliased font and stuff)
-- colors --
own_window_colour = '131313',
@@ -87,6 +62,18 @@ $endif]],
template9 = '${goto 10}',
}
+core_config = require('src/config/core')
+
+if os.getenv("DESKTOP") == "Enlightenment" then
+ wm_config = require('src/config/enlightenment')
+else
+ wm_config = require('src/config/awesome')
+end
+
+tmp_config = util.merge_table(core_config, wm_config)
+config = util.merge_table(tmp_config, script_config)
+
+conkyrc.config = config
-----------------
----- START -----
-----------------
diff --git a/docs/index.html b/docs/index.html
index 355c052..8aac54a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -35,7 +35,14 @@
Modules
data
polycore
util
- widget
+ widget_core
+ widget_cpu
+ widget_drive
+ widget_gpu
+ widget_indicator
+ widget_memory
+ widget_network
+ widget_text
@@ -64,7 +71,35 @@ Modules
Various helper functions |
- | widget |
+ widget_core |
+ A collection of Widget classes |
+
+
+ | widget_cpu |
+ A collection of CPU Widget classes |
+
+
+ | widget_drive |
+ A collection of Disk Drive Widget classes |
+
+
+ | widget_gpu |
+ A collection of GPU Widget classes |
+
+
+ | widget_indicator |
+ A collection of Basic Graph and indicator Widget classes |
+
+
+ | widget_memory |
+ A collection of Widget classes |
+
+
+ | widget_network |
+ A collection of Network Widget classes |
+
+
+ | widget_text |
A collection of Widget classes |
@@ -73,7 +108,7 @@ Modules
generated by LDoc 1.4.6
-
Last updated 2023-03-26 23:57:51
+
Last updated 2023-05-09 11:37:33
+
+
+
+
+
+
+
+
+
+
+
+
+
+
polycore
+
+
+
+
Contents
+
+
+
+
Modules
+
+
+
+
+
+
+
Module widget_core
+
A collection of Widget classes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ w.temperature_color(temperature, low, high)
+
+ -
+ Generate a temperature based color.
+ Colors are chosen based on float offset in a pre-defined color gradient.
+
+
+
Parameters:
+
+ - temperature
+ number
+ current temperature (or any other type of numeric value)
+
+ - low
+ number
+ threshold for lowest temperature / coolest color
+
+ - high
+ number
+ threshold for highest temperature / hottest color
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ default_text_color
+
+ -
+ Text color used by widgets if no other is specified.
+
+
+
Fields:
+
+ - default_text_color
+ {number,number,number,number}
+
+
+
+
+
+
+
+
+
+ -
+
+ default_graph_color
+
+ -
+ Color used to draw some widgets if no other is specified.
+
+
+
Fields:
+
+ - default_graph_color
+ {number,number,number,number}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ default_font_family
+
+ -
+ Font used by widgets if no other is specified.
+
+
+
+ - default_font_family
+ string
+
+
+
+
+
+
+
+
+
+ -
+
+ default_font_size
+
+ -
+ Font size used by widgets if no other is specified.
+
+
+
+ - default_font_size
+ int
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Root widget wrapper
+ Takes care of managing layout reflows and background caching.
+
+
+ -
+
+ Renderer:init(args)
+
+ -
+
+
+
+
Parameters:
+
+ - args table of options
+
+ - root
+ Widget
+ The Widget subclass that should be rendered,
+ usually a Rows widget
+
+ - width
+ int
+ Width of the surface that should be covered
+
+ - height
+ int
+ Height of the surface that should be covered
+
+
+
+
+
+
+
+
+
+ -
+
+ Renderer:layout()
+
+ -
+ Layout all Widgets and cache their backgrounds.
+ Call this once to create the initial layout.
+ Will be called again automatically each time the layout changes.
+
+
+
+
+
+
+
+
+ -
+
+ Renderer:update(update_count)
+
+ -
+ Update all Widgets
+
+
+
Parameters:
+
+ - update_count
+ int
+ Conky's $updates
+
+
+
+
+
+
+
+
+ -
+
+ Renderer:render(cr)
+
+ -
+ Render to the given context
+
+
+
Parameters:
+
+
+
+
+
+
+
+
+
+
+
+ Base Widget class.
+
+
+ -
+
+ Widget.width
+
+ -
+ Set a width if the Widget should have a fixed width.
+ Omit (=nil) if width should be adjusted dynamically.
+
+
+
+
+
+
+
+
+ -
+
+ Widget.height
+
+ -
+ Set a height if the Widget should have a fixed height.
+ Omit (=nil) if height should be adjusted dynamically.
+
+
+
+
+
+
+
+
+ -
+
+ Widget:layout(width, height)
+
+ -
+ Called at least once to inform the widget of the width and height
+ it may occupy.
+
+
+
Parameters:
+
+ - width
+ int
+
+
+ - height
+ int
+
+
+
+
+
+
+
+
+
+ -
+
+ Widget:render_background(cr)
+
+ -
+ Called at least once to allow the widget to draw static content.
+
+
+
Parameters:
+
+ - cr
+ cairo_t
+ Cairo context for background rendering
+ (to be cached by the Renderer)
+
+
+
+
+
+
+
+
+ -
+
+ Widget:update(update_count)
+
+ -
+ Called before each call to Widget:render.
+ If this function returns a true-ish value, a reflow will be triggered.
+ Since this involves calls to all widgets' :layout functions,
+ reflows should be used sparingly.
+
+
+
Parameters:
+
+ - update_count
+ int
+ Conky's $updates
+
+
+
+ Returns:
+
+
+ optional bool
+ true(-ish) if a layout reflow should be triggered, causing
+ all Widget:layout and Widget:render_background methods
+ to be called again
+
+
+
+
+
+
+ -
+
+ Widget:render(cr)
+
+ -
+ Called once per update to do draw dynamic content.
+
+
+
Parameters:
+
+
+
+
+
+
+
+
+
+
+
+ Basic collection of widgets.
+ Rows are drawn in a vertical stack starting at the top of the drawble
+ surface.
+
+
+ -
+
+ Rows:init(widgets)
+
+ -
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+
+
+
+
+ Display Widgets side by side
+
+
+ -
+
+ Columns:init(widgets)
+
+ -
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+
+
+
+
+ Leave space between widgets.
+ If either height or width is not specified, the available space
+ inside a Rows or Columns widget will be distributed evenly between Fillers
+ with no fixed height/width.
+ A Filler may contain one other Widget which will have its dimensions
+ restricted to those of the Filler.
+
+
+ -
+
+ Filler:init(args)
+
+ -
+
+
+
+
Parameters:
+
+ - args table of options
+
+ - width
+ optional int
+
+
+ - height
+ optional int
+
+
+ - widget
+ optional Widget
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Draw a static border and/or background around/behind another widget.
+
+
+ -
+
+ Frame:init(widget, args)
+
+ -
+
+
+
+
Parameters:
+
+ - widget
+ Widget
+ Widget to be wrapped
+
+ - args table of options
+
+ - padding
+ number or {number,...}
+ Leave some space around the inside
+ of the frame.
+ - number: same padding all around.
+ - table of two numbers: {top & bottom, left & right}
+ - table of three numbers: {top, left & right, bottom}
+ - table of four numbers: {top, right, bottom, left}
+
+ - margin
+ number or {number,...}
+ Like padding but outside the border.
+
+ - background_color
+ optional {number,number,number,number}
+
+
+ - border_color
+ optional {number,number,number,number}
+
+ (default transparent)
+
+ - border_width
+ optional number
+ border line width
+ (default 0)
+
+ - border_sides
+ optional {string,...}
+ any combination of
+ "top", "right", "bottom" and/or "left"
+ (default: all sides)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
generated by LDoc 1.4.6
+
Last updated 2023-05-09 11:37:33
+
+
+
diff --git a/docs/modules/cairo_helpers.html b/docs/modules/cairo_helpers.html
index 6d12564..9acd60d 100644
--- a/docs/modules/cairo_helpers.html
+++ b/docs/modules/cairo_helpers.html
@@ -43,7 +43,14 @@
diff --git a/docs/modules/data.html b/docs/modules/data.html
index 9128006..e84ed0d 100644
--- a/docs/modules/data.html
+++ b/docs/modules/data.html
@@ -43,7 +43,14 @@
diff --git a/docs/modules/polycore.html b/docs/modules/polycore.html
index 15eff51..6f65df1 100644
--- a/docs/modules/polycore.html
+++ b/docs/modules/polycore.html
@@ -44,7 +44,14 @@
diff --git a/docs/modules/util.html b/docs/modules/util.html
index a712e31..2ca3548 100644
--- a/docs/modules/util.html
+++ b/docs/modules/util.html
@@ -45,7 +45,14 @@
diff --git a/docs/modules/widget_core.html b/docs/modules/widget_core.html
new file mode 100644
index 0000000..aa09e6b
--- /dev/null
+++ b/docs/modules/widget_core.html
@@ -0,0 +1,718 @@
+
+
+
+