How wekers/conky works
Project type and purpose
• This is an open-source “plugin”/configuration bundle for Conky, a desktop system-monitoring tool.
File structure
• Top-level scripts and configs:
• Multiple .conkyrc files (.conkyrc, .conkyrc_720p, .conkyrc_1366x768p, .conkyrc_2k) – resolution-specific Conky configurations
• conky.lua – Lua extension module for Conky (custom functions, temperature logic)
• Shell scripts under project root (time.sh, GetMoon.sh, lune_die.sh) and moon.pl – fetch & parse external data (weather, moon phases)
• printscreen/ – sample screenshots
• conky-1.9.0.tar.bz2 – Conky source archive for custom build
• No traditional “frontend/backend” directories – it’s a single Conky client embedding scripts.
README
• Describes dependencies (Lua, xmllint, curl, hddtemp, sensors, Perl module Astro::MoonPhase).
• Explains how .conkyrc invokes execi, lua_parse, and ${image} calls to shell scripts and Lua functions.
• Describes external services: OpenWeatherMap API (XML), die.net JavaScript-protected moon pages (replaced by Perl), local sensors via hwmon.
a. Main components
1. Conky Engine (conky binary)
2. Conky Configuration (.conkyrc*, conky.lua)
3. Shell & Perl Data-Fetch Scripts
• time.sh → OpenWeatherMap (weather, forecast)
• lune_die.sh + moon.pl → Astro::MoonPhase → moon phases
• GetMoon.sh (legacy)
4. Local OS Sensors & Utilities
• hwmon (sensors)
• hddtemp daemon
• nvidia-smi / nvidia-settings
6. External Services
• OpenWeatherMap REST API
• CPAN repository (Astro::MoonPhase)
b. Relationships & Data Flows
• Conky Engine reads .conkyrc →
• invokes lua_parse on conky.lua → reads hwmon, hddtemp, GPU metrics → returns values to Conky
• Conky Engine outputs overlay to X11 server on user’s desktop.
• Build process (offline): conky-1.9.0.tar.bz2 → configure/make → custom Conky binary with Lua & weather modules.
c. Architectural patterns & design principles
• Plugin-style: Conky core + scripts + Lua modules are loosely coupled.
• Polling model: execi triggers periodic data fetch.
• Cache intermediary: external data is first written locally then consumed by Conky.
• Separation of concerns:
• Data fetching/parsing in shell/Perl
• Presentation in .conkyrc and images
• Computation (temperatures, moon phase) in Lua/Perl
d. Key technologies & libraries
• Conky (C) with Lua support
• Bash scripts with curl, xmllint, imagemagick (optional)
• Perl + Astro::MoonPhase
• Linux hwmon/sysfs, hddtemp, nvidia CLI tools
• OpenWeatherMap XML API
Detail
• Every script invocation and data path.