repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

Merge remote-tracking branch 'bugabinga/trunk' into git_remotes_integration

575abd9554eddbfdf08cb741cf880e56d542371b

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (41)

desktop.symlinks

Modified
124 124 pueue/pueued.service
125 125 ~/.config/systemd/user/pueued.service
127 +wezterm/systemd/wezterm-mux-server.service
128 +~/.config/systemd/user/wezterm-mux-server.service
127 130 psd/psd.conf
128 131 ~/.config/psd/psd.conf

enable_user_services.nu

Modified
12 12 [mako mako mako.service]
13 13 [cliphist cliphist cliphist.service]
14 14 [wl-clip-persist wl-clip-persist wl-clip-persist.service]
15 + [wezterm-mux-server wezterm-mux-server wezterm-mux-server.service]
15 16 [nugu-theme nu nugu-theme.service]
16 17 [ironbar ironbar ironbar.service]
18 + [ironbar-workspaces python ironbar-workspaces.service]
19 21 $services | each { | service |

hypr/AGENTS.md

Modified
11 11 - Mako: `mako/nugu.conf` via `include=~/.config/mako/nugu.conf`
12 12 - Hypr Lua: `hypr/generated/nugu.lua`
13 13 - Runtime JSON: `hypr/generated/nugu.json`
14 -- Runtime switcher `hypr/scripts/theme.nu` writes active color fragments under `$XDG_CONFIG_HOME`.
14 +- Runtime switcher `hypr/scripts/theme.lua` writes active color fragments under `$XDG_CONFIG_HOME`.
16 16 Hyprtoolkit:
17 17 - Never rewrite `hyprtoolkit.conf` while Hyprtoolkit apps run.
37 37 - UI sans: `IBM Plex Sans`; mono/status: `IBM Plex Mono`.
39 39 Testing:
40 -- After theme edits: `NUGU_NO_NOTIFY=1 hypr/scripts/theme.nu dark|light`.
40 +- After theme edits: `NUGU_NO_NOTIFY=1 hypr/scripts/theme.lua dark|light`.
41 41 - Check `systemctl --user is-active mako.service ironbar.service hyprpaper.service`.
42 42 - Screenshot dark/light with `grim`; inspect actual rendered colors, not just CSS.

hypr/lib/apps.lua

Modified
1 +local tui = require("scripts.tui_tab")
1 3 return {
2 - terminal = "wezterm start --always-new-process",
4 + terminal = "wezterm connect unix",
3 5 terminal_class = "wezterm start --always-new-process --class",
4 6 browser = "firefox",
5 7 editor = "nvim",
6 8 launcher = "hyprlauncher",
7 - file_manager = "wezterm start --always-new-process --class yazi yazi",
9 + file_manager = function() tui.spawn("yazi") end,
10 + bluetooth = function() tui.spawn("bluetui") end,
11 + wifi = function() tui.spawn("impala") end,
8 12 lock = "hyprlock",
9 - logout = "hyprshutdown",
10 - theme_toggle = "nu ~/.config/hypr/scripts/theme.nu toggle",
11 - theme_auto = "nu ~/.config/hypr/scripts/theme.nu auto",
13 + logout = "hyprshutdown --dry-run",
14 + theme_toggle = "lua ~/.config/hypr/scripts/theme.lua toggle",
15 + theme_auto = "lua ~/.config/hypr/scripts/theme.lua auto",
12 16 clipboard = "bash -lc 'cliphist list | hyprlauncher --dmenu | cliphist decode | wl-copy'",
13 17 screenshot_region = "hyprshot -m region -z",
14 18 screenshot_window = "hyprshot -m window -z",
15 19 screenshot_output = "hyprshot -m output -z",
16 20 screenshot_annotate = "hyprshot -m region -z -- satty --filename",
17 - binds_help = "nu ~/.config/hypr/scripts/show_binds.nu",
18 - clients_help = "nu ~/.config/hypr/scripts/show_clients.nu",
21 + binds_help = "lua ~/.config/hypr/scripts/show_binds.lua",
22 + clients_help = "lua ~/.config/hypr/scripts/show_clients.lua",

hypr/modules/appearance.lua

Modified
67 67 xwayland = {
68 - force_zero_scaling = true,
68 + enabled = false,

hypr/modules/binds.lua

Modified
3 3 local apps = require("lib.apps")
4 4 local workspaces = require("modules.workspaces")
5 5 local mod = "SUPER"
7 7 local function bind(key, cmd, description)
8 - hl.bind(key, hl.dsp.exec_cmd(cmd), { description = description })
8 + local dispatcher = type(cmd) == "function" and cmd or hl.dsp.exec_cmd(cmd)
9 + hl.bind(key, dispatcher, { description = description })
11 12 bind(mod .. " + Return", apps.terminal, "terminal: wezterm")
12 13 bind(mod .. " + Space", apps.launcher, "launcher: hyprlauncher")
13 14 bind(mod .. " + B", apps.browser, "browser: firefox")
14 -bind(mod .. " + E", apps.file_manager, "file manager: yazi")
15 +-- TUI app binds open in an existing WezTerm default mux workspace window as new tabs.
16 +bind(mod .. " + E", apps.file_manager, "files: yazi")
17 +bind(mod .. " + N", apps.wifi, "wifi: impala")
18 +bind(mod .. " + U", apps.bluetooth, "bluetooth: bluetui")
15 19 hl.bind(mod .. " + Q", hl.dsp.window.close(), { description = "close window" })
16 20 hl.bind(mod .. " + C", hl.dsp.window.close(), { description = "close window" })
17 21 bind(mod .. " + V", apps.clipboard, "clipboard history")
45 49 hl.bind(mod .. " + SHIFT + G", hl.dsp.group.next(), { description = "next group tab" })
47 51 for _, ws in ipairs(workspaces.list) do
48 - local target = "name:" .. ws.name
49 - hl.bind(mod .. " + " .. ws.key, hl.dsp.focus({ workspace = target }), { description = "workspace " .. ws.name })
50 - hl.bind(mod .. " + SHIFT + " .. ws.key, hl.dsp.window.move({ workspace = target }), { description = "move to " .. ws.name })
52 + hl.bind(mod .. " + " .. ws.key, hl.dsp.focus({ workspace = ws.id }), { description = "workspace " .. ws.name })
53 + hl.bind(mod .. " + SHIFT + " .. ws.key, hl.dsp.window.move({ workspace = ws.id }), { description = "move to " .. ws.name })
53 56 hl.bind(mod .. " + S", hl.dsp.workspace.toggle_special("scratch"), { description = "toggle scratch" })

hypr/modules/input.lua

Modified
9 9 repeat_delay = 600,
10 10 follow_mouse = 1,
11 11 sensitivity = 0,
12 - accel_profile = "flat",
12 + accel_profile = "adaptive",
13 + natural_scroll = true,
13 14 touchpad = {
14 15 natural_scroll = true,
15 16 disable_while_typing = true,

hypr/modules/rules.lua

Modified
7 7 suppress_event = "maximize",
10 -hl.window_rule({
11 - name = "fix-xwayland-drags",
12 - match = {
13 - class = "^$",
14 - title = "^$",
15 - xwayland = true,
16 - float = true,
17 - fullscreen = false,
18 - pin = false,
19 - },
20 - no_focus = true,
21 -})
23 -hl.window_rule({ match = { class = "^(firefox|org.mozilla.firefox)$" }, workspace = "name:web" })
10 +hl.window_rule({ match = { class = "^(firefox|org.mozilla.firefox)$" }, workspace = "1" })
24 11 hl.window_rule({ match = { class = "^(firefox|org.mozilla.firefox)$" }, opacity = "0.98 0.96" })
26 -hl.window_rule({ match = { class = "^(wezterm|org.wezfurlong.wezterm)$" }, workspace = "name:term" })
27 -hl.window_rule({ match = { class = "^yazi$" }, workspace = "name:term" })
13 +hl.window_rule({ match = { class = "^(wezterm|org.wezfurlong.wezterm)$" }, workspace = "3" })
14 +hl.window_rule({ match = { class = "^yazi$" }, workspace = "3" })
29 -hl.window_rule({ match = { class = "^(mpv|com.github.celluloid_player.Celluloid)$" }, workspace = "name:media" })
16 +hl.window_rule({ match = { class = "^(mpv|com.github.celluloid_player.Celluloid)$" }, workspace = "5" })
30 17 hl.window_rule({ match = { class = "^(mpv|com.github.celluloid_player.Celluloid)$" }, immediate = true })
32 19 hl.window_rule({ match = { class = "^(pavucontrol|blueman-manager|nm-connection-editor)$" }, float = true, center = true })

hypr/modules/workspaces.lua

Modified
1 1 local M = {}
3 3 M.list = {
4 - { key = "1", name = "web" },
5 - { key = "2", name = "code" },
6 - { key = "3", name = "term" },
7 - { key = "4", name = "chat" },
8 - { key = "5", name = "media" },
9 - { key = "9", name = "misc" },
10 - { key = "0", name = "scratch" },
4 + { key = "1", id = "1", name = "web" },
5 + { key = "2", id = "2", name = "code" },
6 + { key = "3", id = "3", name = "term" },
7 + { key = "4", id = "4", name = "chat" },
8 + { key = "5", id = "5", name = "media" },
9 + { key = "9", id = "9", name = "misc" },
13 12 for _, ws in ipairs(M.list) do
14 - hl.workspace_rule({ workspace = "name:" .. ws.name, monitor = "LVDS-1" })
13 + hl.workspace_rule({ workspace = ws.id, monitor = "LVDS-1" })
17 -hl.workspace_rule({ workspace = "name:web", default = true })
16 +hl.workspace_rule({ workspace = "1", default = true })
18 17 hl.workspace_rule({ workspace = "special:scratch", on_created_empty = "wezterm start --always-new-process" })
19 18 hl.workspace_rule({ workspace = "w[tv1]s[false]", gaps_out = 0, gaps_in = 0 })
20 19 hl.workspace_rule({ workspace = "f[1]s[false]", gaps_out = 0, gaps_in = 0 })

hypr/scripts/common.lua

Added
new file mode 100644
1 +local M = {}
3 +function M.trim(value)
4 + return (value or ""):gsub("^%s+", ""):gsub("%s+$", "")
5 +end
7 +function M.shell_quote(value)
8 + value = tostring(value)
9 + return "'" .. value:gsub("'", "'\\''") .. "'"
10 +end
12 +function M.read_command(command)
13 + local pipe = io.popen(command .. " 2>/dev/null")
14 + if not pipe then return "" end
15 + local output = pipe:read("*a") or ""
16 + pipe:close()
17 + return output
18 +end
20 +function M.choose(lines)
21 + if #lines == 0 then return nil end
23 + local path = os.tmpname()
24 + local file = assert(io.open(path, "w"))
25 + for _, line in ipairs(lines) do
26 + file:write(line, "\n")
27 + end
28 + file:close()
30 + local selected = M.trim(M.read_command("hyprlauncher --dmenu < " .. M.shell_quote(path)))
31 + os.remove(path)
33 + if selected == "" then return nil end
34 + return selected
35 +end
37 +return M

hypr/scripts/cycle_clients.lua

Added
new file mode 100644
1 +#!/usr/bin/env lua
3 +local source = debug.getinfo(1, "S").source:gsub("^@", "")
4 +local script_dir = source:match("(.+)/[^/]+$") or "."
5 +local hypr_dir = script_dir:match("(.+)/[^/]+$") or "."
6 +package.path = hypr_dir .. "/?.lua;" .. hypr_dir .. "/?/init.lua;" .. package.path
8 +local common = require("scripts.common")
10 +local function focus(address)
11 + if not address:match("^0x") then address = "0x" .. address end
12 + local expr = "hl.dispatch(hl.dsp.focus({ window = " .. string.format("%q", "address:" .. address) .. " }))"
13 + os.execute("hyprctl -q eval " .. common.shell_quote(expr))
14 +end
16 +local function parse_active()
17 + return common.read_command("hyprctl activewindow"):match("^Window%s+(%S+)%s+%-%>")
18 +end
20 +local function parse_clients()
21 + local clients = {}
22 + local current
24 + for line in common.read_command("hyprctl clients"):gmatch("[^\n]+") do
25 + local address, title = line:match("^Window%s+(%S+)%s+%-%>%s+(.+):$")
26 + if address then
27 + current = { address = address, title = title, class = "", workspace = 0, mapped = true, hidden = false }
28 + clients[#clients + 1] = current
29 + elseif current then
30 + local key, value = line:match("^%s*([%w_]+):%s*(.*)$")
31 + if key == "class" then
32 + current.class = value
33 + elseif key == "workspace" then
34 + current.workspace = tonumber(value:match("^(%-?%d+)")) or 0
35 + elseif key == "mapped" then
36 + current.mapped = value == "1"
37 + elseif key == "hidden" then
38 + current.hidden = value == "1"
39 + end
40 + end
41 + end
43 + local filtered = {}
44 + for _, client in ipairs(clients) do
45 + if client.mapped and not client.hidden then filtered[#filtered + 1] = client end
46 + end
48 + table.sort(filtered, function(a, b)
49 + if a.workspace ~= b.workspace then return a.workspace < b.workspace end
50 + if a.class ~= b.class then return a.class < b.class end
51 + if a.title ~= b.title then return a.title < b.title end
52 + return a.address < b.address
53 + end)
55 + return filtered
56 +end
58 +local direction = arg[1] == "prev" and -1 or 1
59 +local clients = parse_clients()
60 +if #clients < 2 then os.exit(0) end
62 +local active = parse_active()
63 +local index = 1
65 +for i, client in ipairs(clients) do
66 + if client.address == active then
67 + index = i
68 + break
69 + end
70 +end
72 +local next_index = ((index - 1 + direction) % #clients) + 1
73 +focus(clients[next_index].address)

hypr/scripts/show_binds.lua

Added
new file mode 100644
1 +#!/usr/bin/env lua
3 +local source = debug.getinfo(1, "S").source:gsub("^@", "")
4 +local script_dir = source:match("(.+)/[^/]+$") or "."
5 +local hypr_dir = script_dir:match("(.+)/[^/]+$") or "."
6 +package.path = hypr_dir .. "/?.lua;" .. hypr_dir .. "/?/init.lua;" .. package.path
8 +local common = require("scripts.common")
10 +local modifier_bits = {
11 + { bit = 64, name = "SUPER" },
12 + { bit = 1, name = "SHIFT" },
13 + { bit = 4, name = "CTRL" },
14 + { bit = 8, name = "ALT" },
17 +local function has_bit(value, bit)
18 + return value % (bit * 2) >= bit
19 +end
21 +local function mods(mask)
22 + local out = {}
23 + for _, mod in ipairs(modifier_bits) do
24 + if has_bit(mask, mod.bit) then out[#out + 1] = mod.name end
25 + end
26 + if #out == 0 then return "None" end
27 + return table.concat(out, "+")
28 +end
30 +local function format_key(key)
31 + if key:match("^mouse:") then return key:gsub("^mouse:", "MOUSE_") end
32 + return key:upper()
33 +end
35 +local binds = {}
36 +local current
38 +for line in common.read_command("hyprctl binds"):gmatch("[^\n]+") do
39 + if line:match("^bind") then
40 + current = { modmask = 0, key = "?", dispatcher = "", arg = "", description = "" }
41 + table.insert(binds, current)
42 + elseif current then
43 + local key, value = line:match("^%s*([%w_]+):%s*(.*)$")
44 + if key == "modmask" then
45 + current.modmask = tonumber(value) or 0
46 + elseif key == "key" then
47 + current.key = value
48 + elseif key == "dispatcher" then
49 + current.dispatcher = value
50 + elseif key == "arg" then
51 + current.arg = value
52 + elseif key == "description" then
53 + current.description = value
54 + end
55 + end
56 +end
58 +local labels = {}
59 +local by_label = {}
61 +for _, bind in ipairs(binds) do
62 + local label = string.format("%s + %s -> %s", mods(bind.modmask), format_key(bind.key), bind.description ~= "" and bind.description or bind.dispatcher)
63 + labels[#labels + 1] = label
64 + by_label[label] = bind
65 +end
67 +local selected = common.choose(labels)
68 +if not selected then os.exit(0) end
70 +local bind = by_label[selected]
71 +if not bind then os.exit(1) end
73 +if bind.dispatcher == "exec" and bind.arg ~= "" then
74 + os.execute(bind.arg .. " &")
75 +elseif bind.dispatcher ~= "" and bind.dispatcher ~= "__lua" then
76 + os.execute("hyprctl dispatch " .. common.shell_quote(bind.dispatcher) .. " " .. common.shell_quote(bind.arg))
77 +end

hypr/scripts/show_binds.nu

Deleted
deleted file mode 100644
1 -# Function to parse modmask into readable modifier names
2 -def parse_modmask [modmask: int] {
3 - let modifiers = [
4 - { mask: 64, name: "SUPER" },
5 - { mask: 1, name: "SHIFT" },
6 - { mask: 4, name: "CTRL" },
7 - { mask: 8, name: "ALT" }
8 - ]
9 - let active_mods = $modifiers | where { |mod| ($modmask | bits and $mod.mask) != 0 } | get name
10 - if ($active_mods | is-empty) { "None" } else { $active_mods | str join "+" }
11 -}
13 -# Function to format key for display
14 -def format_key [key: string, mouse: bool] {
15 - if $mouse {
16 - $key | str replace "mouse:" "MOUSE_"
17 - } else {
18 - $key | str upcase
19 - }
20 -}
22 -# Main function to process binds and show fuzzel menu
23 -def main [] {
24 - # Get binds from hyprctl
25 - let binds = (hyprctl binds -j | from json)
27 - # Parse binds into a formatted list for fuzzel
28 - let formatted_binds = $binds | each { |bind|
29 - let mods = (parse_modmask $bind.modmask)
30 - let key = (format_key $bind.key $bind.mouse)
31 - let display = $"($mods) + ($key) -> ($bind.dispatcher): ($bind.arg)"
32 - { display: $display, arg: $bind.arg, dispatcher: $bind.dispatcher }
33 - }
35 - # Create a temporary file for fuzzel
36 - let temp_file = (mktemp -t hypr_binds.XXXXXX | str trim)
37 - $formatted_binds | each { |b| $b.display } | str join "\n" | save -f $temp_file
39 - # Show fuzzel menu and get selection
40 - let selection = (cat $temp_file | fuzzel --dmenu --prompt "Keybindings: " | str trim)
41 - rm $temp_file
43 - # Find the selected binding and execute its arg
44 - if ($selection | is-not-empty) {
45 - let selected_bind = ($formatted_binds | where display == $selection | first)
46 - if ($selected_bind | is-not-empty) {
47 - if $selected_bind.dispatcher == "exec" {
48 - run-external ($selected_bind.arg | split row ' ')
49 - } else {
50 - hyprctl dispatch $selected_bind.dispatcher $selected_bind.arg
51 - }
52 - }
53 - }
54 -}

hypr/scripts/show_clients.lua

Added
new file mode 100644
1 +#!/usr/bin/env lua
3 +local source = debug.getinfo(1, "S").source:gsub("^@", "")
4 +local script_dir = source:match("(.+)/[^/]+$") or "."
5 +local hypr_dir = script_dir:match("(.+)/[^/]+$") or "."
6 +package.path = hypr_dir .. "/?.lua;" .. hypr_dir .. "/?/init.lua;" .. package.path
8 +local common = require("scripts.common")
10 +local clients = {}
11 +local current
13 +for line in common.read_command("hyprctl clients"):gmatch("[^\n]+") do
14 + local address, title = line:match("^Window%s+(%S+)%s+%-%>%s+(.+):$")
15 + if address then
16 + current = { address = address, title = title, class = "?", workspace = "?" }
17 + table.insert(clients, current)
18 + elseif current then
19 + local key, value = line:match("^%s*([%w_]+):%s*(.*)$")
20 + if key == "class" then
21 + current.class = value
22 + elseif key == "workspace" then
23 + current.workspace = value:match("%((.-)%)") or value:match("^(%S+)") or "?"
24 + end
25 + end
26 +end
28 +local labels = {}
29 +local by_label = {}
31 +for _, client in ipairs(clients) do
32 + local label = string.format("%s: %s (%s)", client.class, client.title, client.workspace)
33 + labels[#labels + 1] = label
34 + by_label[label] = client
35 +end
37 +local selected = common.choose(labels)
38 +if not selected then os.exit(0) end
40 +local client = by_label[selected]
41 +if not client then os.exit(1) end
43 +local address = client.address
44 +if not address:match("^0x") then address = "0x" .. address end
46 +local target = "address:" .. address
47 +local expr = "hl.dispatch(hl.dsp.focus({ window = " .. string.format("%q", target) .. " }))"
48 +os.execute("hyprctl -q eval " .. common.shell_quote(expr))

hypr/scripts/show_clients.nu

Deleted
deleted file mode 100644
1 -# Fetch and parse hyprctl clients JSON
2 -let clients = (hyprctl clients -j | from json)
4 -# Format clients for fuzzel: "class: title (workspace)"
5 -let formatted = ($clients | each { |client|
6 - $"($client.class): ($client.title) \(($client.workspace.name)\)"
7 -} | str join "\n")
9 -# Pipe formatted list to fuzzel and get selected item
10 -let selected = ($formatted | fuzzel --dmenu --prompt "Select window: " | str trim)
12 -# Exit if no selection
13 -if ($selected | is-empty) {
14 - exit 0
15 -}
17 -# Find the index of the selected item
18 -let selected_index = ($formatted | split row "\n" | enumerate | where item == $selected | get 0.index)
20 -# Get the address of the selected client
21 -let address = ($clients | get $selected_index | get address)
23 -# Focus the selected window
24 -hyprctl -q dispatch focuswindow address:($address)
25 -hyprctl -q dispatch alterzorder top

hypr/scripts/theme.lua

Added
new file mode 100644
1 +#!/usr/bin/env lua
3 +local source = debug.getinfo(1, "S").source:gsub("^@", "")
4 +local script_dir = source:match("(.+)/[^/]+$") or "."
5 +local hypr_dir = script_dir:match("(.+)/[^/]+$") or "."
6 +package.path = hypr_dir .. "/?.lua;" .. hypr_dir .. "/?/init.lua;" .. package.path
8 +local nugu = require("generated.nugu")
10 +local function trim(value)
11 + return (value or ""):gsub("^%s+", ""):gsub("%s+$", "")
12 +end
14 +local function shell_quote(value)
15 + value = tostring(value)
16 + return "'" .. value:gsub("'", "'\\''") .. "'"
17 +end
19 +local function run(command)
20 + os.execute(command .. " >/dev/null 2>&1")
21 +end
23 +local function mkdir(path)
24 + run("mkdir -p " .. shell_quote(path))
25 +end
27 +local function read_file(path)
28 + local file = io.open(path, "r")
29 + if not file then return nil end
30 + local data = file:read("*a")
31 + file:close()
32 + return data
33 +end
35 +local function write_file(path, content)
36 + local file = assert(io.open(path, "w"))
37 + file:write(content)
38 + file:close()
39 +end
41 +local home = assert(os.getenv("HOME"), "HOME unset")
42 +local config_home = os.getenv("XDG_CONFIG_HOME") or home .. "/.config"
43 +local cache_dir = home .. "/.cache/nugu"
44 +local mode_file = cache_dir .. "/mode"
45 +local auto_file = cache_dir .. "/auto"
47 +local function active_mode()
48 + local mode = trim(read_file(mode_file))
49 + if mode == "light" then return "light" end
50 + return "dark"
51 +end
53 +local function auto_mode()
54 + local hour = tonumber(os.date("%H")) or 0
55 + if hour >= 7 and hour < 19 then return "light" end
56 + return "dark"
57 +end
59 +local function auto_enabled()
60 + local value = read_file(auto_file)
61 + return value == nil or trim(value) ~= "0"
62 +end
64 +local function set_auto(enabled)
65 + mkdir(cache_dir)
66 + write_file(auto_file, enabled and "1" or "0")
67 +end
69 +local function write_desktop_color_scheme(mode)
70 + local scheme = mode == "dark" and "prefer-dark" or "prefer-light"
71 + run("gsettings set org.gnome.desktop.interface color-scheme " .. shell_quote(scheme))
72 +end
74 +local function write_mako(p)
75 + local dir = config_home .. "/mako"
76 + mkdir(dir)
77 + write_file(dir .. "/nugu.conf", string.format([[# Generated by hypr/scripts/theme.lua from Nugu palette.
78 +background-color=%see
79 +text-color=%sff
80 +border-color=%sff
81 +progress-color=over %sff
83 +[urgency=low]
84 +background-color=%se6
85 +text-color=%sff
86 +border-color=%sff
87 +progress-color=over %sff
89 +[urgency=normal]
90 +border-color=%sff
91 +progress-color=over %sff
93 +[urgency=critical]
94 +background-color=%sff
95 +text-color=%sff
96 +border-color=%sff
97 +progress-color=over %sff
99 +[summary~="[Ee]rror|[Ff]ailed|[Ff]ailure|[Cc]rash"]
100 +border-color=%sff
101 +progress-color=over %sff
103 +[summary~="[Ww]arn|[Ww]arning"]
104 +border-color=%sff
105 +progress-color=over %sff
107 +[summary~="[Ii]nfo|[Nn]otice"]
108 +border-color=%sff
109 +progress-color=over %sff
110 +]],
111 + p.ui.backdrop, p.ui.normal, p.ui.accent, p.ui.focus,
112 + p.content.backdrop, p.content.minor, p.ui.unfocus, p.content.minor,
113 + p.ui.accent, p.ui.focus,
114 + p.ui.backdrop, p.ui.important_global, p.error, p.error,
115 + p.error, p.error,
116 + p.warning, p.warning,
117 + p.info, p.info))
118 +end
120 +local function write_ironbar(p)
121 + local dir = config_home .. "/ironbar"
122 + mkdir(dir)
123 + write_file(dir .. "/nugu.css", string.format([[/* Generated by hypr/scripts/theme.lua from Nugu palette. */
124 +:root {
125 + --bg: %s;
126 + --bg-transparent: %see;
127 + --surface: %s;
128 + --fg: %s;
129 + --accent: %s;
130 + --focus: %s;
131 + --on-focus: %s;
132 + --muted: %s;
133 + --unfocus: %s;
134 + --error: %s;
135 + --warning: %s;
136 + --info: %s;
137 + --debug: %s;
138 + --border: %s;
140 +]],
141 + p.ui.backdrop,
142 + p.ui.backdrop,
143 + p.ui.minor,
144 + p.ui.normal,
145 + p.ui.accent,
146 + p.ui.focus,
147 + p.content.backdrop,
148 + p.ui.minor,
149 + p.ui.unfocus,
150 + p.error,
151 + p.warning,
152 + p.info,
153 + p.debug,
154 + p.ui.accent))
155 +end
157 +local function apply_mode(mode)
158 + mkdir(cache_dir)
159 + write_file(mode_file, mode)
161 + local p = assert(nugu.get(mode), "unknown mode: " .. tostring(mode))
162 + write_desktop_color_scheme(mode)
163 + write_mako(p)
164 + write_ironbar(p)
166 + run("hyprctl hyprpaper wallpaper " .. shell_quote(",~/.config/hypr/wallpapers/nugu-" .. mode .. ".png"))
167 + run("hyprctl reload")
168 + if os.getenv("NUGU_NO_RESTART_MAKO") ~= "1" then
169 + run("systemctl --user restart mako.service")
170 + end
171 + run("systemctl --user restart ironbar.service")
172 + if os.getenv("NUGU_NO_NOTIFY") ~= "1" then
173 + run("notify-send --expire-time 1500 nugu " .. shell_quote(mode .. " mode"))
174 + end
175 +end
177 +local function next_mode()
178 + return active_mode() == "dark" and "light" or "dark"
179 +end
181 +local function watch()
182 + while true do
183 + if auto_enabled() then
184 + local target = auto_mode()
185 + if target ~= active_mode() then apply_mode(target) end
186 + end
187 + os.execute("sleep 300")
188 + end
189 +end
191 +local mode = arg[1] or "toggle"
193 +if mode == "dark" or mode == "light" or mode == "toggle" then
194 + set_auto(false)
195 +elseif mode == "auto" then
196 + set_auto(true)
197 +end
199 +if mode == "dark" or mode == "light" then
200 + apply_mode(mode)
201 +elseif mode == "toggle" then
202 + apply_mode(next_mode())
203 +elseif mode == "auto" then
204 + apply_mode(auto_mode())
205 +elseif mode == "current" then
206 + apply_mode(active_mode())
207 +elseif mode == "watch" then
208 + watch()
209 +else
210 + io.stderr:write("mode must be dark|light|toggle|auto|current|watch\n")
211 + os.exit(1)
212 +end

hypr/scripts/tui_tab.lua

Added
new file mode 100644
1 +local M = {}
3 +local function shell_quote(value)
4 + value = tostring(value)
5 + return "'" .. value:gsub("'", "'\\''") .. "'"
6 +end
8 +local function trim(value)
9 + return (value or ""):gsub("^%s+", ""):gsub("%s+$", "")
10 +end
12 +local function run(command)
13 + local pipe = io.popen(command .. " 2>/dev/null")
14 + if not pipe then return nil end
16 + local output = pipe:read("*a")
17 + pipe:close()
19 + return trim(output)
20 +end
22 +function M.spawn(...)
23 + local args = { ... }
24 + if #args == 0 then return end
26 + for i, arg in ipairs(args) do
27 + args[i] = shell_quote(arg)
28 + end
30 + local pane_id = run("wezterm cli --prefer-mux spawn -- " .. table.concat(args, " "))
31 + if pane_id and pane_id:match("^%d+$") then
32 + hl.exec_cmd("wezterm cli --prefer-mux activate-pane --pane-id " .. shell_quote(pane_id))
33 + end
34 +end
36 +return M

hypr/systemd/ironbar-workspaces.service

Added
new file mode 100644
1 +[Unit]
2 +Description=Instant Ironbar workspace state
3 +After=graphical-session.target ironbar.service
4 +PartOf=graphical-session.target ironbar.service
6 +[Service]
7 +ExecStart=%h/.config/ironbar/scripts/workspaces-watch.py
8 +Restart=on-failure
9 +RestartSec=1
10 +Slice=session.slice
12 +[Install]
13 +WantedBy=graphical-session.target

hypr/systemd/ironbar.service

Modified
5 5 Wants=nugu-theme.service
7 7 [Service]
8 +Environment=GSK_RENDERER=cairo
8 9 ExecStart=/usr/bin/ironbar
9 10 Restart=on-failure
10 11 RestartSec=2

hypr/systemd/mako.service

Modified
6 6 [Service]
7 7 Environment=NUGU_NO_RESTART_MAKO=1
8 8 Environment=NUGU_NO_NOTIFY=1
9 -ExecStartPre=/usr/bin/nu %h/.config/hypr/scripts/theme.nu current
9 +ExecStartPre=/usr/bin/lua %h/.config/hypr/scripts/theme.lua current
10 10 ExecStart=/usr/bin/mako --config %h/.config/mako/config
11 11 Restart=on-failure
12 12 RestartSec=2

hypr/systemd/nugu-theme.service

Modified
5 5 Wants=hyprpaper.service
7 7 [Service]
8 -ExecStart=/usr/bin/nu %h/.config/hypr/scripts/theme.nu watch
8 +ExecStart=/usr/bin/lua %h/.config/hypr/scripts/theme.lua watch
9 9 Restart=on-failure
10 10 RestartSec=10

ironbar/PLAN.md

Added
new file mode 100644
1 +# Ironbar rework plan
3 +Goal: rebuild the bar incrementally, one widget/behavior at a time, with Nugu colors, consistent clicks, and verification after each step.
5 +Workflow rule:
7 +1. Propose exact minimal change.
8 +2. Experiment safely when behavior is unknown.
9 +3. Apply focused changes.
10 +4. Verify live with config validation, service state, logs, screenshots, and interaction tests.
11 +5. Remove superfluous widgets/CSS/scripts.
13 +Originally: stop after each step for discussion.
14 +Current standing goal: continue autonomously to completion while preserving brutal verification.
16 +Order rule: start with Bluetooth as requested, then proceed roughly easiest → hardest.
18 +## Current status
20 +Done/live:
22 +- Bluetooth stack installed/running: `bluez`, `bluez-utils`, `bluetooth.service` active.
23 +- `bluetui` installed and preferred as Bluetooth manager.
24 +- Ironbar Bluetooth widget is status-only; builtin popup disabled because GTK switch popup looked bad.
25 +- Bluetooth left/middle click opens `bluetui` through shared Hypr Lua TUI launcher.
26 +- Ironbar icon theme switched to installed `Adwaita`.
27 +- Ironbar `popup_autohide = true` globally.
28 +- WezTerm mux service added under `wezterm/systemd/wezterm-mux-server.service`, enabled and active.
29 +- WezTerm config attaches GUI to Unix mux (`connect unix`) and status shows `MUX` for mux domain.
30 +- Hypr `SUPER+Enter` opens `wezterm connect unix`.
31 +- Hypr TUI app binds:
32 + - `SUPER+E` → `yazi`
33 + - `SUPER+N` → `impala`
34 + - `SUPER+U` → `bluetui`
35 +- TUI launcher activates the newly spawned WezTerm pane/tab.
36 +- XWayland disabled; obsolete XWayland drag workaround removed.
37 +- Mouse accel switched to adaptive; natural scroll enabled.
39 +Known unresolved:
41 +- No hard blocker.
42 +- Physical wheel/trackpad scroll over the volume module remains unverified because `wdotool scroll` does not trigger Ironbar layer-shell scroll events here.
43 +- Existing visible WezTerm local-domain sessions may need manual migration/closure; no seamless transfer to mux known.
45 +## Current live audit
47 +- Repo clean, ahead of origin; Ironbar commits are local.
48 +- Running services verified active: `ironbar.service`, `ironbar-workspaces.service`, `mako.service`, `hyprpaper.service`, `pipewire-pulse.socket`, system `upower.service`, system `bluetooth.service`.
49 +- Resource usage after settling: `ironbar` about 1.3% CPU / 77M RSS; `workspaces-watch.py` 0.0% CPU / 15M RSS.
50 +- Regions use Ironbar `start` / `center` / `end` boxes:
51 + - start: custom workspace switcher, clipboard, bindmode
52 + - center: music, clock
53 + - end: Mako status, WiFi, Bluetooth, tray, CPU, volume, brightness, battery, inhibit, power
54 +- Polling/wakeups:
55 + - Mako status script: 5000ms, shell + `makoctl list | grep`
56 + - WiFi status script: 30000ms, shell + `iwctl station wlan0 show`
57 + - sys_info CPU: interval 2
58 + - workspace state: Hypr socket2 event watcher, 10s idle refresh, no label polling
59 +- Scroll handlers:
60 + - volume: `wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+` / `wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-`, `smooth_scroll_speed = 1.0`
61 + - brightness: builtin systemd backlight backend, `smooth_scroll_speed = 0.5`
62 +- Hardcoded color grep reports only generated `ironbar/nugu.css`; `style.css` uses semantic Nugu vars.
63 +- Known broken/unproven widget behavior: physical volume scroll only. Slider drag and the configured scroll commands are verified.
65 +## Checked facts
67 +- Installed Ironbar: `0.19.0`.
68 +- `ironbar --print-schema` exposes needed modules:
69 + - `battery`, `bindmode`, `bluetooth`, `brightness`, `clipboard`, `clock`, `custom`, `focused`, `inhibit`, `launcher`, `music`, `notifications`, `script`, `sys_info`, `tray`, `volume`, `workspaces`.
70 +- WiFi stack: `iwd` + systemd-networkd.
71 + - `iwd.service`: active.
72 + - `NetworkManager`: not installed.
73 + - Ironbar `network_manager` module is wrong unless we intentionally switch network stacks.
74 +- Notifications: Mako currently.
75 + - Ironbar `notifications` module requires SwayNC.
76 + - SwayNC would replace/compete with Mako, so defer.
77 +- `hyprshutdown` installed; keybind uses `--dry-run`.
78 +- Music config must use `player_type = "mpris"`, not `playerctl`.
79 +- Builtin Ironbar workspaces dispatch legacy Hypr syntax; custom switcher is used for Lua-dispatcher compatibility.
80 +- Workspace highlighting is event-driven via Hypr socket2 + Ironbar vars; no polling labels.
82 +## Upstream feature note
84 +From Ironbar compiling wiki/features:
86 +- Default build enables all features.
87 +- Custom builds can disable defaults and enable selected features.
88 +- Must enable at least one config feature.
89 +- If custom-building for this setup:
91 +```text
92 +cli,config+json,workspaces+hyprland,focused,launcher,music+mpris,sys_info,script,custom,tray,volume,battery,bluetooth,brightness,bindmode,inhibit,clipboard,clock,notifications
93 +```
95 +Notes:
97 +- `cli` implies `ipc`.
98 +- `network_manager` omitted while using `iwd`.
99 +- `notifications` only useful if switching to SwayNC.
101 +## Preferences / launch policy
103 +- Work one thing at a time: propose → experiment → change → verify.
104 +- Prefer awesome fast TUIs when they exist (`bluetui`, `impala`, `btm`, `wiremix`, `yazi`, etc.).
105 +- Prefer mux-backed WezTerm tabs for TUI apps over standalone terminal windows.
106 +- Prefer implementation logic in Lua over shell snippets; shell command strings are acceptable only at process boundary.
107 +- Prefer `require(...)` modules over `dofile(...)` in normal config and shared helpers.
108 +- Shared TUI launch logic lives in Hypr Lua: `hypr/scripts/tui_tab.lua`.
109 +- Hypr binds call it via `require("scripts.tui_tab")`; Ironbar actions bridge through `hyprctl eval 'require("scripts.tui_tab").spawn(...)'` so both use the same implementation.
110 +- TUI launcher should spawn into WezTerm mux and activate the new pane/tab.
111 +- Keep app-specific service/config files in app dirs when possible, e.g. WezTerm systemd unit under `wezterm/systemd/`.
112 +- Avoid fighting ugly GTK popups when a better TUI exists; use Ironbar as status/launcher if builtin popup is poor.
114 +## Package/dependency report
116 +Already installed:
118 +- `ironbar`
119 +- `hyprshutdown`
120 +- `playerctl`
121 +- `iwd`
122 +- `brightnessctl`
123 +- `bluez`
124 +- `bluez-utils`
125 +- `bluetui`
126 +- `impala`
127 +- `wezterm-nightly-bin`
128 +- `upower`
129 +- `pipewire-pulse`
131 +No longer planned:
133 +```sh
134 +sudo pacman -S pavucontrol swaync networkmanager
135 +```
137 +Reasons:
139 +- `wiremix` replaces `pavucontrol` for audio.
140 +- Mako stays; SwayNC would replace/compete with it.
141 +- WiFi stack stays `iwd` + systemd-networkd; no NetworkManager.
143 +Optional only if requested later:
145 +```sh
146 +sudo pacman -S resources
147 +```
149 +Avoid unless intentionally switching network stack:
151 +```sh
152 +sudo pacman -S networkmanager
153 +```
155 +## Verification loop for every step
157 +1. Edit only one widget/behavior.
158 +2. Validate:
160 + ```sh
161 + ironbar --validate-config -c ~/.config/ironbar/config.json -t ~/.config/ironbar/style.css
162 + ```
164 +3. Restart:
166 + ```sh
167 + systemctl --user restart ironbar.service
168 + ```
170 +4. Inspect:
172 + ```sh
173 + systemctl --user status ironbar.service --no-pager
174 + journalctl --user -u ironbar.service -n 80 --no-pager
175 + ```
177 +5. Screenshot / visual check.
178 +6. Discuss before next step.
180 +## Click convention
182 +- Left: popup or primary action.
183 +- Right: toggle/mute/secondary action.
184 +- Middle: open full external tool/TUI.
185 +- Scroll: adjust continuous value.
186 +- Tooltip: document behavior.
188 +## WezTerm mux policy
190 +- WezTerm GUI should attach to Unix mux by default:
191 + - `cfg.unix_domains = { { name = "unix", no_serve_automatically = true } }`
192 + - `cfg.default_gui_startup_args = { "connect", "unix" }`
193 +- Mux server is systemd-managed:
194 + - `wezterm/systemd/wezterm-mux-server.service`
195 +- WezTerm status should make mux visible:
196 + - domain `unix` renders as `MUX`.
197 +- Hypr terminal bind should explicitly use mux:
198 + - `wezterm connect unix`
199 +- TUI app launcher should:
200 + 1. spawn into mux with `wezterm cli --prefer-mux spawn -- ...`
201 + 2. capture pane id in Lua
202 + 3. activate pane with `wezterm cli --prefer-mux activate-pane --pane-id ...`
203 +- Existing non-mux GUI sessions cannot be seamlessly transferred into mux; recreate/close manually.
205 +## Nugu styling rules
207 +- Generated colors stay in `ironbar/nugu.css`.
208 +- Layout/behavior stay in `ironbar/config.json` + `ironbar/style.css`.
209 +- Use vars:
210 + - normal fg: `--fg`
211 + - muted/empty: `--muted` / `--unfocus`
212 + - active bg: `--focus`, fg `--on-focus`
213 + - hover/accent bg: `--accent`, fg `--on-focus`
214 + - error: `--error`
216 +## Ordered implementation steps
218 +### Step 1 — Bluetooth — done
220 +Why first: explicit request.
222 +Implemented:
224 +- `bluez` + `bluez-utils` installed by user; `bluetooth.service` active.
225 +- `bluetui` installed and preferred.
226 +- Ironbar builtin `bluetooth` module used only for bar status.
227 +- Builtin Bluetooth popup disabled; GTK switch popup looked bad even after CSS work.
228 +- Left/middle click opens `bluetui` through shared Hypr Lua TUI launcher:
229 + - `hyprctl eval 'require("scripts.tui_tab").spawn("bluetui")'`
230 +- Bar label uses fixed semantic Bluetooth battery icon, not dynamic percentage icon:
231 + - `󰥈 {device_battery_percent}%`
232 +- `icon_theme` switched from missing `Papirus` to installed `Adwaita`; broken device image fixed.
234 +Verified:
236 +- Ironbar config validates.
237 +- Ironbar restarts and stays active.
238 +- Popup autohide works globally.
239 +- Bluetooth status visible; clicks open `bluetui`.
241 +Follow-up if wanted:
243 +- Tune bar label length/format.
244 +- Add notification if Bluetooth disconnected/low battery.
246 +### Step 2 — baseline validation + obvious fixes
248 +Difficulty: very easy.
250 +Scope:
252 +- Fix music `player_type`: `playerctl` → `mpris`.
253 +- Add `name`/`class` only where needed for CSS targeting.
254 +- No layout rework.
256 +Verify:
258 +- Config validates.
259 +- Ironbar starts cleanly.
261 +### Step 3 — tray
263 +Difficulty: very easy.
265 +Goal:
267 +- Keep tray widget.
268 +- Improve popover padding/colors if needed.
270 +Verify:
272 +- Existing tray icons render.
273 +- Menus/popovers readable.
275 +### Step 4 — clock/calendar colors
277 +Difficulty: easy.
279 +Goal:
281 +- Fix hard-to-read calendar popup.
283 +Scope:
285 +- CSS only.
286 +- Explicit GTK calendar selectors:
287 + - `.popup-clock calendar`
288 + - `.popup-clock calendar header`
289 + - `.popup-clock calendar grid label.day-name`
290 + - `.popup-clock calendar grid label.day-number`
291 + - `.popup-clock calendar grid label.other-month`
292 + - `.popup-clock calendar grid label.today`
293 + - `.popup-clock calendar grid label:selected`
295 +Verify:
297 +- Popup readable in dark + light.
298 +- Today/current/other-month/day-name colors use Nugu vars.
300 +### Step 5 — clipboard
302 +Difficulty: easy.
304 +Goal:
306 +- Keep clipboard widget and make behavior explicit.
308 +Proposed behavior:
310 +- Left: popup/list.
311 +- Middle: optional external launcher later.
312 +- Right: do **not** clear history unless confirmed.
314 +Verify:
316 +- Popup readable.
317 +- Selection/paste still works.
319 +### Step 6 — volume — done
321 +Goal:
323 +- Make volume behavior consistent.
325 +Implemented:
327 +- Builtin `volume` module.
328 +- Scroll adjusts PipeWire output volume.
329 +- Right click mutes output.
330 +- Middle click opens `wiremix` through shared Hypr Lua TUI launcher.
331 +- Sources hidden on bar to reduce clutter.
333 +Verified:
335 +- `pipewire-pulse.socket` active.
336 +- Ironbar logs show volume client connected, no `PAErr(-1)`.
337 +- `wiremix` spawned into WezTerm mux tab and activated.
338 +- Popup/device picker colors fixed for dark+light Nugu.
339 +- Slider drag verified with `wdotool`: volume changed from 55% to 7%, then restored to 55% and unmuted.
340 +- Scroll actions are configured as oneshot scripts and `smooth_scroll_speed = 1.0` is explicit for wheel/trackpad input.
341 +- The exact scroll commands were executed manually: 55% → 57% → 55%.
342 +- `wdotool scroll` does not trigger Ironbar layer-shell scroll events in this live setup, so physical scroll remains the remaining manual check.
344 +### Step 7 — battery — done
346 +Difficulty: easy.
348 +Goal:
350 +- Add/keep robust battery widget.
352 +Implementation:
354 +- Builtin `battery` module.
355 +- Show icon + percent.
356 +- Style low/critical/charging states using Nugu semantic colors.
358 +Verified:
360 +- Hidden on machines without `BAT*` via `show_if`.
361 +- Shows X230 battery percentage.
362 +- `upower` active.
363 +- Warning/critical states styled with Nugu semantic colors.
365 +### Step 8 — brightness — done
367 +Difficulty: easy-medium.
369 +Goal:
371 +- Add brightness widget.
373 +Implementation:
375 +- Builtin `brightness` module.
376 +- Use `systemd`/`backlight` backend.
378 +Implemented:
380 +- Builtin brightness module with `systemd`/`intel_backlight` backend.
381 +- Scroll adjusts brightness through Ironbar backend.
382 +- Rejected custom `brightnessctl` script experiment because direct set failed without permission.
384 +Verified:
386 +- Detects `intel_backlight`.
387 +- Brightness visible/readable in screenshots.
388 +- No config/service errors.
390 +Known issue (scroll does not change brightness):
392 +- `ironbar.service` runs under the user manager, so the process is in a sessionless scope. Ironbar's `systemd` brightness backend calls `org.freedesktop.login1` `SetBrightness`, which is rejected with `org.freedesktop.login1.NotYourDevice: Session is not in foreground, refusing.`
393 +- Root cause is session ownership, not config. The Ironbar config is already correct (`mode.type = systemd`, `smooth_scroll_speed = 0.5`); changing it cannot fix this. The fix is host-side, requires root, and the agent cannot apply it.
395 +Note on `udev` `uaccess`:
397 +- Rejected for this host: the seat's `ActiveSession` is the greeter (Type=wayland, Class=greeter) and the user session is `Idle=yes`. udev `uaccess` hands the device to the session that owns the seat, not the user session ironbar runs in. Live test: after installing `ACTION=="add", SUBSYSTEM=="backlight", TAG+="uaccess"`, `SetBrightness` still returned `NotYourDevice`. Rule was removed. Skip on this seat layout, or also reconfigure seat ownership.
399 +Note on polkit `login1.set-brightness`:
401 +- `NotYourDevice` is raised by `logind` **before** polkit is consulted, so the polkit rule cannot fix it on this seat layout. Staged at `polkit/10-brightness.rules` for completeness; install only after the seat is reconfigured so a real user session owns the foreground.
403 +Arch wiki ([Backlight](https://wiki.archlinux.org/title/Backlight)) recommended fix: udev `RUN+=` to chgrp/chmod the sysfs file, plus the `video` group. sysfs `brightness` is a `DEVICE_ATTR_RW` whose mode is hardcoded `0644`; udev `GROUP=` / `MODE=` keys do **not** apply to sysfs. The rule must include `KERNEL==` to avoid a `RUN+=` flood on every brightness change.
405 + ```sh
406 + # udev/backlight.rules
407 + ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/usr/bin/chgrp video /sys/class/backlight/intel_backlight/brightness"
408 + ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/usr/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness"
409 + ```
411 + ```sh
412 + doas install -m 0644 /home/oli/Workspace/dotfiles/udev/backlight.rules /etc/udev/rules.d/backlight.rules
413 + doas udevadm control --reload
414 + doas udevadm trigger --subsystem-match=backlight --action=add
415 + doas usermod -aG video oli # log out / log in (or `newgrp video` for current shell)
416 + ```
418 + After that, logind `SetBrightness` from the user session still works through the builtin `systemd` backend; sysfs is also directly writable by members of `video` for any helper that bypasses logind (e.g. `brightnessctl` from inside the user session).
420 +### Step 9 — bindmode
422 +Difficulty: easy-medium.
424 +Goal:
426 +- Show Hyprland submap/bindmode only when active.
428 +Implementation:
430 +- Builtin `bindmode` module.
432 +Verify:
434 +- Hidden during normal use.
435 +- Appears/disappears correctly if a Hypr submap is active.
437 +### Step 10 — inhibit — done
439 +Difficulty: medium.
441 +Goal:
443 +- Add sleep/lock inhibition toggle.
445 +Implementation:
447 +- Builtin `inhibit` module.
449 +Proposed behavior:
451 +- Left: toggle selected duration.
452 +- Right: cycle duration.
453 +- Format off/on clearly.
455 +Verified:
457 +- Toggle visible/readable.
458 +- Duration visible in screenshot.
459 +- No Ironbar errors.
461 +### Step 11 — cute cat widget — skipped/removed
463 +Reason:
465 +- Cute but superfluous under the current goal.
466 +- Removed after screenshot showed the right/center area was already dense.
468 +Verified:
470 +- Bar validates/restarts without it.
471 +- Center media has more room.
473 +### Step 12 — media/player controls — done
475 +Difficulty: medium.
477 +Goal:
479 +- Make media useful and compact.
481 +Implementation:
483 +- Builtin `music` module with MPRIS.
484 +- Format: status icon + truncated title/artist.
485 +- Popup: album art + controls.
487 +Implemented:
489 +- Builtin `music` module with MPRIS.
490 +- Compact title/artist format with truncation.
491 +- No extra scroll action; avoid accidental media changes.
493 +Verified:
495 +- Firefox/MPRIS player detected.
496 +- Title visible and compact at 1366px.
497 +- Popup styled by Nugu CSS.
499 +### Step 13 — system monitors
501 +Difficulty: medium.
503 +Goal:
505 +- Add compact system monitor row.
507 +Implementation:
509 +- Builtin `sys_info` module.
511 +Candidate labels:
513 +- CPU percent.
514 +- RAM percent.
515 +- Temperature.
516 +- Disk root percent.
517 +- Network up/down.
519 +Implemented:
521 +- Compact CPU label via builtin `sys_info`.
522 +- Left/middle opens `btm` through shared Hypr Lua TUI launcher.
524 +Useful install:
526 +```sh
527 +sudo pacman -S bottom
528 +```
530 +Optional GUI:
532 +```sh
533 +sudo pacman -S resources
534 +```
536 +Verify:
538 +- Values update at sane intervals.
539 +- Compact enough for 1366px.
540 +- No excessive CPU wakeups.
542 +### Step 14 — power menu
544 +Difficulty: medium-hard.
546 +Goal:
548 +- Polish power menu using installed `hyprshutdown`.
550 +Implementation:
552 +- `custom` module popup.
554 +Candidate buttons:
556 +- poweroff: `hyprshutdown --post-cmd "systemctl poweroff"`
557 +- reboot: `hyprshutdown --post-cmd "systemctl reboot"`
558 +- logout: `hyprshutdown`
559 +- suspend: `loginctl lock-session && systemctl suspend`
560 +- lock: `hyprlock`
561 +- Popup order puts destructive actions far left and safe lock nearest the right-side opener, avoiding accidental shutdown/reboot from a second click at the trigger position.
563 +Verify:
565 +- Popup opens.
566 +- Lock/suspend/logout work.
567 +- Do not test reboot/poweroff without explicit confirmation.
569 +### Step 15 — notifications — done
571 +Decision:
573 +- Keep Mako.
574 +- Do not install SwayNC; it would replace/compete with Mako.
575 +- Ironbar builtin `notifications` module remains unused.
577 +Implemented:
579 +- Custom Mako indicator script:
580 + - empty: `󰂚`
581 + - active notifications: `󰂞 N`
582 +- Left click: `makoctl restore`.
583 +- Right click: `makoctl dismiss --all`.
585 +Verified:
587 +- Mako service active.
588 +- Count visible/readable in screenshots.
589 +- Dismissing all notifications via Mako works.
590 +- No SwayNC dependency.
592 +### Step 16 — WiFi / network — done
594 +Decision:
596 +- Keep `iwd` + systemd-networkd.
597 +- Do not install/use NetworkManager.
599 +Implemented:
601 +- Custom script module reads `iwctl station wlan0 show`.
602 +- Connected state is icon-only to reduce clutter.
603 +- Disconnected state shows `󰖪 off`.
604 +- Left/middle click opens `impala` through shared Hypr Lua TUI launcher.
606 +Verified:
608 +- `iwd.service` active.
609 +- `networkctl status wlan0` routable/online.
610 +- WiFi icon visible/readable.
611 +- No NetworkManager dependency.
613 +### Step 17 — workspaces — done
615 +Goal:
617 +- Show fixed workspace favorites.
618 +- Logical order:
619 + - `1 web`
620 + - `2 code`
621 + - `3 term`
622 + - `4 chat`
623 + - `5 media`
624 + - `9 misc`
625 +- Empty favorites remain visible.
626 +- Active/occupied/empty states readable.
627 +- Click focuses correct workspace.
629 +Problem found:
631 +- Builtin Ironbar `workspaces` sends legacy `hyprctl dispatch workspace N`.
632 +- Hyprland Lua dispatcher rejects that syntax:
633 + - `error: [string "return hl.dispatch(workspace 1)"]:1: ')' expected near '1'`
635 +Implemented:
637 +- Migrated Hypr workspace rules/binds/window rules to numeric IDs.
638 +- Replaced builtin Ironbar workspaces with a custom workspace switcher.
639 +- Each button uses Lua dispatcher syntax:
640 + - `hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = "N" }))'`
641 +- Replaced old polling `ironbar/scripts/workspace-label.lua` with `ironbar/scripts/workspaces-watch.py`.
642 +- Watcher listens to Hypr socket2 and writes Ironbar vars (`#ws1`, `#ws2`, ...), making highlight update immediately on switch.
643 +- Watcher uses direct Hypr Unix socket IPC for state reads and only writes changed Ironbar vars.
644 +- Watcher caches the Hypr socket directory and Nugu CSS vars, avoiding repeated `hyprctl instances` subprocesses and repeated CSS file reads on every workspace event.
645 +- Added `hypr/systemd/ironbar-workspaces.service`, symlink manifest entry, and service enable recipe.
646 +- `ironbar-workspaces.service` is `PartOf=ironbar.service` so bar restarts immediately refresh workspace vars.
647 +- Removed unused builtin `.workspaces` CSS.
648 +- Removed launcher underline styling after screenshot showed it clashed with the active workspace/focused launcher pills.
649 +- Increased system-module spacing slightly; verified clock/power still fit on 1366px.
650 +- Removed unused `.notifications` CSS and normalized `.sysinfo` spacing.
651 +- Removed normal `scratch` workspace from the bar; special scratch remains on `SUPER+S`.
653 +Verified:
655 +- Hypr reload ok; no config errors.
656 +- Existing named `web`/`term` windows moved to numeric `1`/`3`.
657 +- All six icons visible; no tofu/question mark glyphs.
658 +- Empty workspace active-state update verified 0.2s after click.
659 +- Service active and low overhead: `ironbar` ~1.8% CPU shortly after restart, watcher ~0.2% CPU / 6.6M RSS on X230.
660 +- Clicks verified via `wdotool`:
661 + - workspace `1` focuses `id=1`
662 + - empty workspace `2` focuses `id=2`
663 + - workspace `3` focuses `id=3`
664 +- Ironbar logs contain no workspace dispatch errors after custom switcher.
666 +## Suggested final bar layout
668 +Start:
670 +1. workspaces
671 +2. clipboard
672 +3. bindmode
674 +Removed:
676 +- focused window module; active app/title was redundant and made the left side noisy.
677 +- launcher module; colorful app/window icons broke the semantic Nugu bar aesthetic.
679 +Center:
681 +1. media/player
682 +2. clock
684 +End:
686 +1. Mako indicator
687 +2. WiFi icon
688 +4. Bluetooth battery/status
689 +5. tray
690 +6. sys_info CPU
691 +7. volume
692 +8. brightness
693 +9. battery
694 +10. inhibit
695 +11. power menu
697 +Interaction polish:
699 +- All hover states use the same semantic accent background + on-focus foreground, including music and clipboard.
700 +- Generic `:checked` styling was removed; persistent state is explicit per widget.
701 +- Power and volume checked/focus states are explicitly neutral so clicking elsewhere clears visible highlight.
702 +- Clock popup time/month/year/arrows/days were screenshot-verified readable after GTK calendar selector fixes.
703 +- Clipboard grouped with left utilities; notifications grouped with right status.
704 +- Bar edge padding increased so power does not sit flush against the display edge.
705 +- Region/group spacing added between workspace/utility and right-side connectivity/metrics/inhibit groups.
706 +- Active workspace pill widened to make instant highlight easier to see.
707 +- WiFi polling relaxed to 30s because connected state is icon-only and detail action opens `impala`.
708 +- Ironbar systemd unit sets `GSK_RENDERER=cairo`; this removes GTK/Mesa Vulkan startup noise on X230 while staying around 1.5% CPU / 77M RSS after settling.
709 +- Destructive power actions were not clicked during validation.
710 +- Power popup visual test confirmed destructive off/reboot buttons sit away from the opener cursor side.
712 +## Open decisions
714 +- Media scroll: next/prev, volume, or none? Current: no scroll action.
715 +- Optional later: richer Mako popup/history UI. Current: compact count + restore/dismiss actions.

ironbar/config.json

Modified
2 - "icon_theme": "Papirus",
2 + "icon_theme": "Adwaita",
3 3 "position": "top",
4 4 "height": 30,
5 + "popup_autohide": true,
6 + "popup_gap": 4,
5 7 "start": [
7 - "type": "workspaces",
8 - "name_map": {
9 - "web": "󰖟",
10 - "code": "󰅨",
11 - "term": "󰆍",
12 - "chat": "󰭹",
13 - "media": "󰎆",
14 - "misc": "󰋖",
15 - "scratch": "󰙀"
16 - },
17 - "favorites": ["web", "code", "term", "chat", "media"],
18 - "format": "{icon}"
9 + "type": "custom",
10 + "name": "workspace-switcher",
11 + "class": "nugu-workspaces",
12 + "bar": [
13 + {
14 + "type": "box",
15 + "widgets": [
16 + {
17 + "type": "button",
18 + "class": "workspace-item",
19 + "label": "#ws1",
20 + "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"1\" }))'"
21 + },
22 + {
23 + "type": "button",
24 + "class": "workspace-item",
25 + "label": "#ws2",
26 + "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"2\" }))'"
27 + },
28 + {
29 + "type": "button",
30 + "class": "workspace-item",
31 + "label": "#ws3",
32 + "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"3\" }))'"
33 + },
34 + {
35 + "type": "button",
36 + "class": "workspace-item",
37 + "label": "#ws4",
38 + "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"4\" }))'"
39 + },
40 + {
41 + "type": "button",
42 + "class": "workspace-item",
43 + "label": "#ws5",
44 + "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"5\" }))'"
45 + },
46 + {
47 + "type": "button",
48 + "class": "workspace-item",
49 + "label": "#ws9",
50 + "on_click": "!hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = \"9\" }))'"
51 + }
52 + ]
53 + }
54 + ],
55 + "tooltip": "Workspaces: web code term chat media misc"
20 - {
21 - "type": "launcher",
22 - "truncate": {
23 - "mode": "end",
24 - "max_length": 24
25 - }
26 - },
27 - {
28 - "type": "focused",
29 - "truncate": {
30 - "mode": "end",
31 - "max_length": 64
32 - }
33 - }
34 - ],
35 - "center": [
36 - {
37 - "type": "music",
38 - "player_type": "playerctl"
39 - }
40 - ],
41 - "end": [
43 58 "type": "clipboard",
44 59 "max_items": 5,
51 - "type": "tray"
66 + "type": "bindmode",
67 + "truncate": {
68 + "mode": "end",
69 + "max_length": 20
70 + }
71 + }
72 + ],
73 + "center": [
74 + {
75 + "type": "music",
76 + "player_type": "mpris",
77 + "format": "{title} / {artist}",
78 + "truncate": {
79 + "mode": "end",
80 + "max_length": 42
81 + }
82 + },
83 + {
84 + "type": "clock",
85 + "format": "%H:%M"
86 + }
87 + ],
88 + "end": [
89 + {
90 + "type": "script",
91 + "class": "mako-status",
92 + "cmd": "~/.config/ironbar/scripts/mako-status.sh",
93 + "mode": "poll",
94 + "interval": 5000,
95 + "on_click_left": "makoctl restore",
96 + "on_click_right": "makoctl dismiss --all",
97 + "tooltip": "Notifications: left restores last, right dismisses all"
98 + },
99 + {
100 + "type": "script",
101 + "class": "wifi",
102 + "cmd": "~/.config/ironbar/scripts/wifi-status.sh",
103 + "mode": "poll",
104 + "interval": 30000,
105 + "on_click_left": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"impala\")'",
106 + "on_click_middle": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"impala\")'",
107 + "tooltip": "WiFi: left/middle opens impala"
108 + },
110 + "type": "bluetooth",
111 + "format": {
112 + "not_found": "",
113 + "disabled": "󰂲",
114 + "enabled": "󰂯",
115 + "connected": "󰂱",
116 + "connected_battery": "󰂱 {device_battery_percent}%"
117 + },
118 + "disable_popup": true,
119 + "on_click_left": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"bluetui\")'",
120 + "on_click_middle": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"bluetui\")'",
121 + "tooltip": "Bluetooth: left/middle opens bluetui"
122 + },
124 + "type": "tray",
125 + "icon_size": 14
126 + },
128 + "type": "sys_info",
129 + "format": [" {cpu_percent:1}%"],
130 + "interval": {
131 + "cpu": 2
132 + },
133 + "on_click_left": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"btm\")'",
134 + "on_click_middle": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"btm\")'",
135 + "tooltip": "System monitor: left/middle opens btm"
54 138 "type": "volume",
55 139 "on_scroll_up": "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+",
56 140 "on_scroll_down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-",
57 - "on_click_right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
141 + "on_click_right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
142 + "on_click_middle": "hyprctl eval 'require(\"scripts.tui_tab\").spawn(\"wiremix\")'",
143 + "smooth_scroll_speed": 1.0,
144 + "show_sources": false,
145 + "tooltip": "Volume: scroll adjusts, right mutes, middle opens wiremix"
146 + },
148 + "type": "brightness",
149 + "format": "{percentage}%",
150 + "icon_label": "display-brightness-symbolic",
151 + "mode": {
152 + "type": "systemd",
153 + "subsystem": "backlight",
154 + "name": "intel_backlight"
155 + },
156 + "smooth_scroll_speed": 0.5,
157 + "tooltip": "Brightness: scroll adjusts display"
60 160 "type": "battery",
61 - "show_if": "ls /sys/class/power_supply/ | grep -q '^BAT'"
161 + "format": "{percentage}%",
162 + "icon_size": 10,
163 + "show_if": "ls /sys/class/power_supply/ | grep -q '^BAT'",
164 + "profiles": {
165 + "warning": {
166 + "percent": 20
167 + },
168 + "critical": {
169 + "when": {
170 + "percent": 5,
171 + "charging": false
172 + },
173 + "format": "󰂎 {percentage}%"
175 + },
176 + "tooltip": "Battery: left opens details"
64 - "type": "clock",
65 - "format": "%H:%M"
179 + "type": "inhibit",
180 + "durations": ["00:30:00", "01:00:00", "02:00:00", "inf"],
181 + "default_duration": "00:30:00",
182 + "format_on": "󰅶 {duration}",
183 + "format_off": "󰛊 {duration}",
184 + "tooltip": "Inhibit: left toggles, right cycles duration"
68 187 "type": "custom",
92 211 "widgets": [
94 213 "type": "button",
95 - "class": "power-btn",
96 - "label": "󰐥",
97 - "on_click": "!systemctl poweroff"
214 + "class": "power-btn danger",
215 + "label": "󰐥 off",
216 + "on_click": "!hyprshutdown --post-cmd \"systemctl poweroff\""
100 219 "type": "button",
101 220 "class": "power-btn",
102 - "label": "󰜉",
103 - "on_click": "!systemctl reboot"
221 + "label": "󰜉 reboot",
222 + "on_click": "!hyprshutdown --post-cmd \"systemctl reboot\""
106 225 "type": "button",
107 226 "class": "power-btn",
108 - "label": "󰍃",
109 - "on_click": "!loginctl terminate-session $XDG_SESSION_ID"
227 + "label": "󰍃 out",
228 + "on_click": "!hyprshutdown"
229 + },
231 + "type": "button",
232 + "class": "power-btn",
233 + "label": "󰤄 sleep",
234 + "on_click": "!loginctl lock-session && systemctl suspend"
235 + },
237 + "type": "button",
238 + "class": "power-btn",
239 + "label": "󰌾 lock",
240 + "on_click": "!hyprlock"
243 + },
245 + "type": "label",
246 + "name": "uptime",
247 + "label": "up {{30000:uptime -p | cut -d ' ' -f2-}}"
115 - ]
251 + ],
252 + "tooltip": "Power menu"

ironbar/nugu.css

Modified
9 9 --on-focus: #121212;
10 10 --muted: #9d9d9d;
11 11 --unfocus: #6f6f6f;
12 - --error: #e46479;
12 + --error: #ec6376;
13 + --warning: #f0ee69;
14 + --info: #3ec5e3;
15 + --debug: #ed5eed;
13 16 --border: #d86dd8;

ironbar/scripts/mako-status.sh

Added
new file mode 100755
1 +#!/bin/sh
3 +count=$(makoctl list 2>/dev/null | grep -c '^Notification ')
4 +case "$count" in
5 + 0) printf '󰂚\n' ;;
6 + *) printf '󰂞 %s\n' "$count" ;;
7 +esac

ironbar/scripts/wifi-status.sh

Added
new file mode 100755
1 +#!/bin/sh
3 +station=${1:-wlan0}
4 +raw=$(iwctl station "$station" show 2>/dev/null | sed 's/\x1b\[[0-9;]*m//g')
5 +state=$(printf '%s\n' "$raw" | awk '/State/ {print $2; exit}')
7 +if [ "$state" != connected ]; then
8 + printf '󰖪 off\n'
9 + exit 0
10 +fi
12 +printf '󰖩\n'

ironbar/scripts/workspaces-watch.py

Added
new file mode 100755
1 +#!/usr/bin/env python3
3 +import json
4 +import os
5 +import select
6 +import socket
7 +import subprocess
8 +import time
9 +from pathlib import Path
11 +WORKSPACES = [
12 + ("1", "󰖟"),
13 + ("2", "󰅨"),
14 + ("3", "󰆍"),
15 + ("4", "󰭹"),
16 + ("5", "󰎆"),
17 + ("9", "󰉋"),
19 +EVENT_PREFIXES = (
20 + "workspace",
21 + "focusedmon",
22 + "createworkspace",
23 + "destroyworkspace",
24 + "moveworkspace",
25 + "openwindow",
26 + "closewindow",
27 + "movewindow",
28 + "urgent",
30 +last_vars: dict[str, str] = {}
31 +color_mtime = 0
32 +color_vars: dict[str, str] = {}
33 +hypr_socket_dir = ""
36 +def css_vars() -> dict[str, str]:
37 + global color_mtime, color_vars
38 + config_home = Path(os.environ.get("XDG_CONFIG_HOME", Path.home() / ".config"))
39 + path = config_home / "ironbar" / "nugu.css"
40 + mtime = path.stat().st_mtime_ns
41 + if mtime == color_mtime:
42 + return color_vars
43 + colors: dict[str, str] = {}
44 + for line in path.read_text().splitlines():
45 + if ":" not in line:
46 + continue
47 + name, value = line.strip().rstrip(";").split(":", 1)
48 + name = name.strip()
49 + value = value.strip()
50 + if name.startswith("--") and value.startswith("#"):
51 + colors[name[2:]] = value
52 + color_mtime = mtime
53 + color_vars = colors
54 + return colors
57 +def hypr_dir() -> str:
58 + global hypr_socket_dir
59 + if hypr_socket_dir:
60 + return hypr_socket_dir
61 + sig = os.environ.get("HYPRLAND_INSTANCE_SIGNATURE")
62 + if not sig:
63 + result = subprocess.run(("hyprctl", "instances", "-j"), text=True, capture_output=True, check=False)
64 + instances = json.loads(result.stdout or "[]")
65 + sig = instances[0]["instance"]
66 + hypr_socket_dir = f"{os.environ['XDG_RUNTIME_DIR']}/hypr/{sig}"
67 + return hypr_socket_dir
70 +def hypr_cmd(command: str) -> str:
71 + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as sock:
72 + sock.settimeout(1)
73 + sock.connect(f"{hypr_dir()}/.socket.sock")
74 + sock.sendall(command.encode())
75 + chunks: list[bytes] = []
76 + while True:
77 + chunk = sock.recv(65536)
78 + if not chunk:
79 + break
80 + chunks.append(chunk)
81 + return b"".join(chunks).decode("utf-8", "replace")
84 +def event_socket_path() -> str:
85 + return f"{hypr_dir()}/.socket2.sock"
88 +def markup(ws_id: str, icon: str, active: str, occupied: set[str], colors: dict[str, str]) -> str:
89 + if ws_id == active:
90 + return '<span foreground="{}" background="{}" font_weight="bold"> {} </span>'.format(
91 + colors["on-focus"],
92 + colors["focus"],
93 + icon,
94 + )
95 + if ws_id in occupied:
96 + return '<span foreground="{}">{}</span>'.format(colors["fg"], icon)
97 + return '<span foreground="{}">{}</span>'.format(colors["muted"], icon)
100 +def hypr_state() -> tuple[str, set[str]]:
101 + active = json.loads(hypr_cmd("j/activeworkspace") or "{}")
102 + workspaces = json.loads(hypr_cmd("j/workspaces") or "[]")
103 + return str(active.get("id", "")), {str(ws.get("id")) for ws in workspaces if ws.get("windows", 0) > 0}
106 +def set_var(name: str, value: str) -> None:
107 + if last_vars.get(name) == value:
108 + return
109 + subprocess.run(("ironbar", "var", "set", name, value), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=False)
110 + last_vars[name] = value
113 +def update() -> None:
114 + colors = css_vars()
115 + active, occupied = hypr_state()
116 + for ws_id, icon in WORKSPACES:
117 + set_var(f"ws{ws_id}", markup(ws_id, icon, active, occupied, colors))
120 +def watch() -> None:
121 + global hypr_socket_dir
122 + while True:
123 + update()
124 + try:
125 + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as sock:
126 + sock.connect(event_socket_path())
127 + pending = b""
128 + while True:
129 + ready, _, _ = select.select([sock], [], [], 10)
130 + if not ready:
131 + update()
132 + continue
133 + chunk = sock.recv(4096)
134 + if not chunk:
135 + break
136 + pending += chunk
137 + while b"\n" in pending:
138 + raw, pending = pending.split(b"\n", 1)
139 + line = raw.decode("utf-8", "replace")
140 + if line.startswith(EVENT_PREFIXES):
141 + update()
142 + except Exception:
143 + hypr_socket_dir = ""
144 + time.sleep(1)
147 +if __name__ == "__main__":
148 + watch()

ironbar/style.css

Modified
25 25 #bar {
26 26 background-color: var(--bg);
27 - padding: 0 8px;
27 + padding: 0 20px;
28 28 border-bottom: 2px solid var(--accent);
37 37 button {
38 - padding: 2px 8px;
38 + min-height: 0;
39 + padding: 1px 7px;
39 40 border-radius: var(--radius);
40 41 background: transparent;
43 -button:hover, button:active, button:checked {
44 +button:hover, button:active {
44 45 background: var(--accent);
45 46 color: var(--on-focus);
48 -.workspaces .item {
49 - padding: 2px 8px;
49 +button:hover label,
50 +button:active label,
51 +button:hover image,
52 +button:active image {
53 + color: var(--on-focus);
56 +.nugu-workspaces {
57 + margin-left: 4px;
58 + margin-right: 10px;
61 +.nugu-workspaces .workspace-item {
62 + min-height: 0;
50 63 margin: 0 2px;
51 - border-radius: var(--radius);
64 + padding: 1px 5px;
52 65 color: var(--muted);
55 -.workspaces .item.focused {
56 - background: var(--focus);
68 +.nugu-workspaces .workspace-item:hover {
69 + background: var(--accent);
57 70 color: var(--on-focus);
60 -.workspaces .item.focused label {
61 - color: var(--on-focus);
64 -.workspaces .item.visible {
65 - color: var(--fg);
68 -.workspaces .item.urgent {
69 - background-color: var(--error);
70 - color: var(--bg);
73 -.launcher .item {
74 - margin: 0 2px;
75 - padding: 2px 6px;
78 -.launcher .item.open {
79 - box-shadow: inset 0 -2px var(--unfocus);
82 -.launcher .item.focused {
83 - color: var(--on-focus);
84 - background: var(--focus);
87 -.launcher .item.focused label {
88 - color: var(--on-focus);
91 -.popup-launcher {
92 - padding: 8px;
95 -.popup-launcher .popup-item {
96 - padding: 8px 12px;
97 - border-radius: var(--radius);
100 -.popup-launcher .popup-item:hover {
101 - background-color: var(--surface);
104 -.focused {
105 - color: var(--focus);
73 +.bindmode {
106 74 margin-left: 8px;
75 + padding: 1px 7px;
76 + border-radius: var(--radius);
77 + background: var(--warning);
78 + color: var(--bg);
79 + font-weight: bold;
109 82 .popup-music {
118 91 .volume {
119 - margin: 0 4px;
92 + margin: 0 7px;
122 95 .popup-volume {
123 96 padding: 12px;
97 + background-color: var(--bg-transparent);
98 + color: var(--fg);
101 +.popup-volume .device-box,
102 +.popup-volume .apps-box {
103 + background-color: transparent;
104 + color: var(--fg);
107 +.popup-volume .device-selector,
108 +.popup-volume .device-selector button,
109 +.popup-volume dropdown,
110 +.popup-volume dropdown button {
111 + background: var(--accent);
112 + color: var(--on-focus);
113 + border-radius: var(--radius);
116 +.popup-volume .device-selector label,
117 +.popup-volume .device-selector arrow,
118 +.popup-volume .device-selector *,
119 +.popup-volume dropdown button,
120 +.popup-volume dropdown button * {
121 + background: transparent;
122 + color: var(--on-focus);
125 +.popup-volume .btn-mute {
126 + color: var(--fg);
129 +.popup-volume .btn-mute:hover,
130 +.popup-volume .btn-mute:checked {
131 + background: var(--accent);
132 + color: var(--on-focus);
135 +popover listview,
136 +popover list,
137 +popover row,
138 +popover modelbutton {
139 + background-color: var(--bg);
140 + color: var(--fg);
143 +popover listview row,
144 +popover list row {
145 + padding: 6px 10px;
148 +popover listview row label,
149 +popover list row label,
150 +popover row label,
151 +popover modelbutton label {
152 + color: var(--fg);
155 +popover listview row:hover,
156 +popover list row:hover,
157 +popover row:hover,
158 +popover modelbutton:hover {
159 + background-color: var(--accent);
160 + color: var(--on-focus);
163 +popover listview row:hover label,
164 +popover list row:hover label,
165 +popover row:hover label,
166 +popover modelbutton:hover label {
167 + color: var(--on-focus);
170 +popover listview row:selected,
171 +popover list row:selected,
172 +popover row:selected,
173 +popover modelbutton:checked {
174 + background-color: var(--focus);
175 + color: var(--on-focus);
178 +popover listview row:selected label,
179 +popover list row:selected label,
180 +popover row:selected label,
181 +popover modelbutton:checked label {
182 + color: var(--on-focus);
185 +/* GTK dropdown popovers are separate popovers, not children of .popup-volume. */
186 +popover contents listview,
187 +popover contents list,
188 +popover contents row,
189 +popover contents modelbutton,
190 +popover contents button {
191 + background: var(--bg);
192 + color: var(--fg);
195 +popover contents row *,
196 +popover contents modelbutton *,
197 +popover contents button * {
198 + color: var(--fg);
201 +popover contents row:hover,
202 +popover contents modelbutton:hover,
203 +popover contents button:hover {
204 + background: var(--accent);
205 + color: var(--on-focus);
208 +popover contents row:hover *,
209 +popover contents modelbutton:hover *,
210 +popover contents button:hover * {
211 + color: var(--on-focus);
214 +popover contents row:selected,
215 +popover contents modelbutton:checked,
216 +popover contents button:checked {
217 + background: var(--focus);
218 + color: var(--on-focus);
221 +popover contents row:selected *,
222 +popover contents modelbutton:checked *,
223 +popover contents button:checked * {
224 + color: var(--on-focus);
227 +.popup-volume dropdown popover,
228 +.popup-volume dropdown popover contents,
229 +.popup-volume dropdown popover listview,
230 +.popup-volume dropdown popover row {
231 + background: var(--bg);
232 + color: var(--fg);
235 +.popup-volume dropdown popover label,
236 +.popup-volume dropdown popover row *,
237 +.popup-volume dropdown popover listview * {
238 + color: var(--fg);
241 +.popup-volume dropdown popover row:hover {
242 + background: var(--accent);
245 +.popup-volume dropdown popover row:selected {
246 + background: var(--accent);
249 +.popup-volume dropdown popover row:selected * {
250 + color: var(--on-focus);
253 +scale trough {
254 + min-height: 6px;
255 + min-width: 6px;
256 + background-color: var(--unfocus);
257 + border-radius: var(--radius);
126 260 scale highlight {
261 + min-height: 6px;
262 + min-width: 6px;
127 263 background-color: var(--accent);
128 264 border-radius: var(--radius);
267 +.brightness {
268 + margin: 0 7px;
269 + color: var(--fg);
131 272 .battery {
132 - margin: 0 4px;
133 - color: var(--focus);
273 + margin: 0 7px;
274 + color: var(--fg);
277 +.battery.warning {
278 + color: var(--warning);
281 +.battery.critical {
282 + color: var(--error);
283 + font-weight: bold;
286 +.popup-battery {
287 + padding: 10px 12px;
288 + background-color: var(--bg-transparent);
289 + color: var(--fg);
292 +.popup-battery .details {
293 + color: var(--muted);
296 +.inhibit {
297 + margin: 0 7px 0 12px;
298 + color: var(--muted);
301 +.inhibit button:checked,
302 +.inhibit button:active {
303 + background: var(--accent);
304 + color: var(--on-focus);
136 307 .clock {
137 308 font-weight: bold;
138 - margin: 0 4px;
309 + margin: 0 7px;
139 310 color: var(--accent);
313 +.popup-clock {
314 + padding: 12px;
315 + background-color: var(--bg-transparent);
316 + color: var(--fg);
319 +.popup-clock *,
320 +.popup-clock calendar.view header,
321 +.popup-clock calendar.view header *,
322 +.popup-clock calendar.view header stack.month,
323 +.popup-clock calendar.view header label.year {
324 + color: var(--fg);
327 +.popup-clock .calendar-clock {
328 + background: var(--accent);
329 + color: var(--on-focus);
330 + border-radius: var(--radius);
331 + padding: 2px 8px;
332 + margin-bottom: 8px;
335 +.popup-clock .calendar-clock,
336 +.popup-clock .calendar-clock * {
337 + color: var(--on-focus);
338 + font-weight: bold;
341 +.popup-clock calendar {
342 + background: transparent;
343 + color: var(--fg);
344 + border-radius: var(--radius);
347 +.popup-clock calendar header {
348 + border-bottom: 1px solid var(--unfocus);
349 + padding-bottom: 6px;
350 + margin-bottom: 6px;
353 +.popup-clock calendar button:hover,
354 +.popup-clock calendar.view header button:hover,
355 +.popup-clock calendar.view header button:hover * {
356 + background: var(--accent);
357 + color: var(--on-focus);
360 +.popup-clock calendar grid label.day-name,
361 +.popup-clock calendar grid label.week-number {
362 + color: var(--muted);
365 +.popup-clock calendar grid label.day-number {
366 + color: var(--fg);
367 + border-radius: var(--radius);
370 +.popup-clock calendar grid label.other-month {
371 + color: var(--unfocus);
374 +.popup-clock calendar grid label.today {
375 + color: var(--accent);
376 + font-weight: bold;
379 +.popup-clock calendar grid label:selected {
380 + background: var(--focus);
381 + color: var(--on-focus);
384 +.music {
385 + margin: 0 7px;
386 + color: var(--fg);
389 +.clipboard {
390 + margin: 0 10px 0 12px;
142 393 .popup-clipboard {
143 394 padding: 8px;
146 397 .popup-clipboard .item {
147 398 padding: 4px 8px;
148 399 border-radius: var(--radius);
400 + color: var(--fg);
403 +.popup-clipboard .item label {
404 + color: var(--fg);
151 407 .popup-clipboard .item:hover {
152 - background-color: var(--surface);
408 + background-color: var(--accent);
409 + color: var(--on-focus);
412 +.popup-clipboard .item:hover label {
413 + color: var(--on-focus);
416 +.mako-status {
417 + margin: 0 7px 0 12px;
418 + color: var(--fg);
421 +.wifi {
422 + margin: 0 7px;
423 + color: var(--fg);
426 +.bluetooth {
427 + margin: 0 7px;
430 +.bluetooth.disabled,
431 +.bluetooth.not-found {
432 + color: var(--muted);
435 +.bluetooth.enabled {
436 + color: var(--fg);
439 +.bluetooth.connected {
440 + color: var(--fg);
155 443 .tray {
156 - margin: 0 4px;
444 + margin: 0 7px 0 12px;
159 447 .tray popover contents {
163 451 .power-menu {
164 - margin-left: 4px;
452 + margin-left: 12px;
455 +.power-menu button,
456 +.power-menu #power-btn {
457 + color: var(--muted);
460 +.power-menu button:hover,
461 +.power-menu #power-btn:hover {
462 + background: var(--accent);
463 + color: var(--on-focus);
466 +.power-menu button:checked,
467 +.power-menu button:focus,
468 +.power-menu #power-btn:checked,
469 +.power-menu #power-btn:focus {
470 + background: transparent;
471 + color: var(--muted);
167 474 .popup-power-menu {
168 475 padding: 12px;
476 + background-color: var(--bg-transparent);
477 + color: var(--fg);
171 480 .popup-power-menu #header {
172 481 font-size: 14px;
173 482 font-weight: bold;
174 483 margin-bottom: 8px;
484 + padding-bottom: 8px;
175 485 color: var(--accent);
486 + border-bottom: 1px solid var(--unfocus);
489 +.popup-power-menu #buttons {
490 + margin-bottom: 8px;
178 493 .popup-power-menu .power-btn {
179 - background-color: var(--surface);
180 - border: 1px solid var(--accent);
494 + background-color: transparent;
495 + border: 1px solid var(--unfocus);
181 496 border-radius: var(--radius);
182 - padding: 6px 12px;
183 - margin: 0 4px;
184 - font-size: 16px;
497 + padding: 6px 10px;
498 + margin: 0 3px;
499 + color: var(--fg);
187 502 .popup-power-menu .power-btn:hover {
188 503 background-color: var(--accent);
189 - color: var(--bg);
504 + border-color: var(--accent);
505 + color: var(--on-focus);
192 -.notifications .count {
193 - font-size: 10px;
508 +.popup-power-menu .power-btn.danger {
509 + border-color: var(--error);
512 +.popup-power-menu .power-btn.danger:hover {
194 513 background-color: var(--accent);
195 - color: var(--bg);
196 - border-radius: 50%;
197 - padding: 2px 5px;
514 + border-color: var(--accent);
515 + color: var(--on-focus);
518 +.popup-power-menu #uptime {
519 + color: var(--muted);
200 522 .sysinfo {
201 - margin: 0 4px;
523 + margin: 0 7px 0 16px;
204 526 .sysinfo > .item + .item {
205 527 margin-left: 8px;
530 +.music:hover,
531 +.clipboard:hover,
532 +.mako-status:hover,
533 +.wifi:hover,
534 +.bluetooth:hover,
535 +.tray:hover,
536 +.sysinfo:hover,
537 +.volume:hover,
538 +.brightness:hover,
539 +.battery:hover,
540 +.inhibit:hover,
541 +.clock:hover {
542 + background: var(--accent);
543 + color: var(--on-focus);
544 + border-radius: var(--radius);
547 +.music:hover label,
548 +.clipboard:hover label,
549 +.mako-status:hover label,
550 +.wifi:hover label,
551 +.bluetooth:hover label,
552 +.tray:hover label,
553 +.sysinfo:hover label,
554 +.volume:hover label,
555 +.brightness:hover label,
556 +.battery:hover label,
557 +.inhibit:hover label,
558 +.clock:hover label {
559 + color: var(--on-focus);
562 +.music:checked,
563 +.music:focus,
564 +.clipboard:checked,
565 +.clipboard:focus,
566 +.mako-status:checked,
567 +.mako-status:focus,
568 +.wifi:checked,
569 +.wifi:focus,
570 +.bluetooth:checked,
571 +.bluetooth:focus,
572 +.tray:checked,
573 +.tray:focus,
574 +.sysinfo:checked,
575 +.sysinfo:focus,
576 +.volume:checked,
577 +.volume:focus,
578 +.volume button:checked,
579 +.volume button:focus,
580 +.brightness:checked,
581 +.brightness:focus,
582 +.battery:checked,
583 +.battery:focus,
584 +.clock:checked,
585 +.clock:focus {
586 + background: transparent;
587 + color: var(--fg);
590 +.music:checked label,
591 +.music:focus label,
592 +.clipboard:checked label,
593 +.clipboard:focus label,
594 +.mako-status:checked label,
595 +.mako-status:focus label,
596 +.wifi:checked label,
597 +.wifi:focus label,
598 +.bluetooth:checked label,
599 +.bluetooth:focus label,
600 +.tray:checked label,
601 +.tray:focus label,
602 +.sysinfo:checked label,
603 +.sysinfo:focus label,
604 +.volume:checked label,
605 +.volume:focus label,
606 +.brightness:checked label,
607 +.brightness:focus label,
608 +.battery:checked label,
609 +.battery:focus label,
610 +.clock:checked label,
611 +.clock:focus label {
612 + color: var(--fg);
208 615 .popup {
209 616 padding: 8px;

mako/nugu.conf

Modified
17 17 [urgency=critical]
18 18 background-color=#242424ff
19 19 text-color=#f3effbff
20 -border-color=#e46479ff
21 -progress-color=over #e46479ff
20 +border-color=#ec6376ff
21 +progress-color=over #ec6376ff
23 23 [summary~="[Ee]rror|[Ff]ailed|[Ff]ailure|[Cc]rash"]
24 -border-color=#e46479ff
25 -progress-color=over #e46479ff
24 +border-color=#ec6376ff
25 +progress-color=over #ec6376ff
27 27 [summary~="[Ww]arn|[Ww]arning"]
28 -border-color=#9e9a69ff
29 -progress-color=over #9e9a69ff
28 +border-color=#f0ee69ff
29 +progress-color=over #f0ee69ff
31 31 [summary~="[Ii]nfo|[Nn]otice"]
32 -border-color=#3ec5ddff
33 -progress-color=over #3ec5ddff
32 +border-color=#3ec5e3ff
33 +progress-color=over #3ec5e3ff

nugu/ironbar.nu

Modified
20 20 --muted: ($p.ui.minor);
21 21 --unfocus: ($p.ui.unfocus);
22 22 --error: ($p.error);
23 + --warning: ($p.warning);
24 + --info: ($p.info);
25 + --debug: ($p.debug);
23 26 --border: ($p.ui.accent);

pi/.gitignore

Modified
1 1 agent/auth.json
2 +/.demo

pi/agent/settings.json

Modified
14 14 "minimax/MiniMax-M2.7-highspeed",
15 15 "minimax/MiniMax-M2.5-highspeed"
17 - "defaultProvider": "openai-codex",
18 - "defaultModel": "gpt-5.5",
17 + "defaultProvider": "minimax",
18 + "defaultModel": "MiniMax-M3",
19 19 "defaultThinkingLevel": "high",
20 20 "quietStartup": true,
21 21 "collapseChangelog": true,
76 76 "q": {
77 77 "model": "minimax/MiniMax-M2.7-highspeed"
79 -}

polkit/10-brightness.rules

Added
new file mode 100644
1 +polkit.addRule(function(action, subject) {
2 + if (action.id == "org.freedesktop.login1.set-brightness" &&
3 + subject.local && subject.active) {
4 + return polkit.Result.YES;
5 + }
6 +});

udev/backlight.rules

Added
new file mode 100644
1 +ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/usr/bin/chgrp video /sys/class/backlight/intel_backlight/brightness"
2 +ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/usr/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness"

wezterm/bugabinga/key_binds.lua

Modified
213 213 key = 'z',
214 214 mods = 'LEADER',
215 + action = workspace_switcher.switch_workspace_in_new_window(),
216 + },
218 + key = 'Z',
219 + mods = 'LEADER|SHIFT',
215 220 action = workspace_switcher.switch_workspace(),

wezterm/bugabinga/mux.lua

Added
new file mode 100644
1 +local wez = require 'wezterm'
3 +return function ( cfg )
4 + if not wez.target_triple:find( 'linux', 1, true ) then return end
6 + cfg.unix_domains = {
7 + {
8 + name = 'unix',
9 + no_serve_automatically = true,
10 + },
11 + }
13 + cfg.default_gui_startup_args = { 'connect', 'unix' }
14 +end

wezterm/bugabinga/options.lua

Modified
24 24 if wez.target_triple:find( 'linux', 1, true ) and os.getenv 'WAYLAND_DISPLAY' then
25 25 cfg.enable_wayland = true
27 - cfg.font_size = 13
27 + if wez.hostname() == 'x230' then
28 + cfg.font_size = 11
29 + else
30 + cfg.font_size = 13
31 + end

wezterm/bugabinga/status.lua

Modified
107 107 local domain_label = function ( domain )
108 + if domain == 'unix' then return 'MUX', wez.nerdfonts.cod_server or wez.nerdfonts.cod_terminal or '□', palette.info end
108 109 if not domain or domain == 'local' or domain == 'Local' then return host_domain() end
109 110 if domain:find( '^WSL:', 1, false ) then return 'WSL', wez.nerdfonts.dev_linux or '□', palette.ui.important_local end
110 111 if domain:find( '^scope:', 1, false ) then return 'EXE', wez.nerdfonts.cod_gear or '□', palette.warning end

wezterm/systemd/wezterm-mux-server.service

Added
new file mode 100644
1 +[Unit]
2 +Description=WezTerm mux server
3 +Documentation=https://wezterm.org/multiplexing.html
5 +[Service]
6 +ExecStart=/usr/bin/wezterm-mux-server
7 +Restart=on-failure
8 +RestartSec=2
10 +[Install]
11 +WantedBy=default.target

wezterm/wezterm.lua

Modified
4 4 local wez = require 'wezterm'
5 5 local cfg = wez.config_builder()
7 7 require 'bugabinga.theme' ( cfg )
8 8 require 'bugabinga.startup' ( cfg )
9 9 require 'bugabinga.options' ( cfg )
10 +require 'bugabinga.mux' ( cfg )
10 11 require 'bugabinga.key_binds' ( cfg )
11 12 require 'bugabinga.mouse_binds' ( cfg )
12 13 require 'bugabinga.window' ( cfg )

x230.symlinks

Modified
106 106 hypr/systemd/ironbar.service
107 107 ~/.config/systemd/user/ironbar.service
109 +hypr/systemd/ironbar-workspaces.service
110 +~/.config/systemd/user/ironbar-workspaces.service
112 +wezterm/systemd/wezterm-mux-server.service
113 +~/.config/systemd/user/wezterm-mux-server.service
109 115 fontconfig
110 116 ~/.config/fontconfig