Skip to content

Instantly share code, notes, and snippets.

-- mpv script to manage the state of night color
-- Global variable to store the initial state of night color
local night_color_was_enabled = false
-- Function to execute shell commands and capture output
function execute_command(cmd)
local handle = io.popen(cmd)
local result = handle:read("*a")
handle:close()