Skip to content

Instantly share code, notes, and snippets.

-- Global variable to store the initial state of night color
local night_color_was_enabled = false
local was_paused = false
-- Function to execute shell commands and capture output
local function execute_command(cmd)
local handle = io.popen(cmd)
local result = handle:read("*a")
handle:close()
return result:match("^%s*(.-)%s*$") -- Trim whitespace