SimpleConkyScript/conky.lua

43 lines
1.2 KiB
Lua

-- HorlogeSkynet's Lua script (for Conky)
-- https://git.forestier.app/HorlogeSkynet/SimpleConkyScript.git
local SimpleConkyScript = dofile(
os.getenv('HOME') ..
'/.conky/SimpleConkyScript/script.lua')
-- Here we'll try to get the screen definition and gaps to adjust the Conky surface on the screen.
local WIDTH, HEIGHT = SimpleConkyScript.get_screen_definition()
local GAP_X, GAP_Y = SimpleConkyScript.get_gaps()
--------------------------------------------------------------------------------------------------
conky.config = {
alignment = 'top_left',
background = false,
double_buffer = true,
use_xft = true,
own_window = true,
own_window_type = 'desktop',
own_window_transparent = true,
own_window_argb_visual = true,
update_interval = 2,
update_interval_on_battery = 4,
total_run_times = 0,
gap_x = GAP_X,
gap_y = GAP_Y,
minimum_width = WIDTH - (2 * GAP_X),
minimum_height = HEIGHT - (2 * GAP_Y),
format_human_readable = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
diskio_avg_samples = 2,
if_up_strictness = 'link',
lua_load = '$HOME/.conky/SimpleConkyScript/script.lua',
lua_draw_hook_pre = 'main'
};
conky.text = [[]];