commit 0230180ef9fdf2a11d942ecde4bd3114e1267599 from: Brett Fisher date: Fri May 15 21:37:11 2026 UTC lua/manage-bxbar, lua/bxbar/datetime.lua, lua/bxbar/workspace.lua: Create scripts to send information to display in bxbar. - manage-bxbar to manage Lua modules. - date-time.lua to display date, day of week, and time. - workspace.lua to display current workspace number commit - 485331c7b91c5ef04485d8fb089ae6d2f07fa137 commit + 0230180ef9fdf2a11d942ecde4bd3114e1267599 blob - /dev/null blob + 92c73d6f32aea79cf63f215397d49e2c07d65a6d (mode 644) --- /dev/null +++ lua/bxbar/datetime.lua @@ -0,0 +1,9 @@ +-- ~/.local/share/lua/5.4/bxbar/datetime.lua +local M = {} + +function M.render() + return os.date("%Y-%m-%d %a %H:%M") +end + +return M + blob - /dev/null blob + 821ce4fcc8ed2c6c876cd3e0a14f0a8dda6450cc (mode 644) --- /dev/null +++ lua/bxbar/workspace.lua @@ -0,0 +1,12 @@ +-- ~/.local/share/lua/5.4/bxbar/workspace.lua +local M = {} + +function M.render() + -- This will eventually call out to your WM, + -- but for now, it returns a hardcoded active ascii emoticon + -- return "(^.~)" + return "(•_•)" +end + +return M + blob - /dev/null blob + 25c08f892b784ee40be9b68834f555bd617871e8 (mode 644) --- /dev/null +++ lua/manage-bxbar @@ -0,0 +1,23 @@ +#!/usr/bin/env lua5.4 + +-- Enforce Lua 5.4+ +if not _VERSION:match("5.4") then + io.stderr:write("Error: Lua 5.4 required (got " .. _VERSION .. ").\n") + os.exit(1) +end + +-- Load modules +local workspace = require("bxbar.workspace") +local datetime = require("bxbar.datetime") + +-- Main loop +while true do + local ws_text = workspace.render() + local dt_text = datetime.render() + + io.write(ws_text .. " | " .. dt_text .. "\n") + io.flush() + + os.execute("sleep 30") +end +