repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(wezterm): show stable workload tab labels

35b70b32ead9644bb52895f0c545d10083a4a360

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

unsigned

Browse filesCompare with HEAD

Changed files (7)

Notes

Modified
1 -Subproject commit 0f25f5ad3c818c7dabf278755905548d017173ca
1 +Subproject commit 4bd76fe649d16327801e09a9d4209884d9cbe34a

mise.toml

Modified
69 69 [tasks.wezterm-test]
70 -description = "Test WezTerm helpers, modernization inspector, and config loading"
70 +description = "Test WezTerm modernization and instance helpers"
71 71 run = '''
72 72 run("node", "--test", "wezterm/.pi/skills/modernize/scripts/inspect.test.mjs");
73 -run("lua", "wezterm/tests/modules_test.lua");
74 73 run("nu", "--no-config-file", "wezterm/tests/wezterm_instances_test.nu");
75 -run("wezterm", "--config-file", "wezterm/wezterm.lua", "show-keys", "--lua");

pi-ext

Modified
1 -Subproject commit b5befb12e300b1c4d7f5e3422ad81061789b810f
1 +Subproject commit cbdb59d8977ae0dcdaa8471a5f087f4428097d0b

wezterm/.pi/skills/modernize/scripts/inspect.test.mjs

Modified
1 1 import assert from "node:assert/strict";
2 2 import { execFileSync } from "node:child_process";
3 -import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3 +import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
4 4 import { tmpdir } from "node:os";
5 5 import { join } from "node:path";
6 -import { fileURLToPath } from "node:url";
6 +import { fileURLToPath, pathToFileURL } from "node:url";
7 7 import { test } from "node:test";
8 8 import { compare, inspect, parseVersion, readBaseline, versionStatus } from "./inspect.mjs";
161 161 globalThis.fetch = async url => new Response(JSON.stringify(url.includes('/commits/')
162 162 ? { sha: '${sha(2)}' } : { status: 'identical', total_commits: 0, commits: [] }));
164 - const output = execFileSync(process.execPath, ["--import", preload, fileURLToPath(new URL("inspect.mjs", import.meta.url))], {
164 + const output = execFileSync(process.execPath, ["--import", pathToFileURL(preload).href, fileURLToPath(new URL("inspect.mjs", import.meta.url))], {
165 165 cwd: directory, encoding: "utf8", timeout: 10_000,
167 167 const result = JSON.parse(output);
173 173 rmSync(directory, { recursive: true, force: true });
177 -test("Lua runtime guard warns only for older timestamps and never prevents config loading", () => {
178 - const source = readFileSync(new URL("../../../../wezterm.lua", import.meta.url), "utf8");
179 - const baseline = source.match(/^local supported_version <const> = .*$/m)?.[0];
180 - assert.ok(baseline);
181 - const unknown = source.replace(baseline, "local supported_version <const> = nil");
182 - const known = source.replace(baseline, `local supported_version <const> = '${installedVersion}'`);
183 - const lua = `
184 -local function check(source, version, expected)
185 - local warnings = {}
186 - local cfg = {}
187 - local wez = {
188 - version = version,
189 - config_builder = function() return cfg end,
190 - log_warn = function(message) table.insert(warnings, message) end,
191 - }
192 - local env = { require = function(name)
193 - if name == 'wezterm' then return wez end
194 - return function(value) assert(value == cfg) end
195 - end }
196 - assert(assert(load(source, 'wezterm.lua', 't', env))() == cfg)
197 - assert(#warnings == expected, version)
198 - if expected == 1 then
199 - assert(warnings[1]:find('${installedVersion}', 1, true))
200 - assert(warnings[1]:find(version, 1, true))
201 - end
202 -end
203 -check([====[${unknown}]====], '${baselineVersion}', 0)
204 -check([====[${known}]====], '${baselineVersion}', 1)
205 -check([====[${known}]====], '${installedVersion}', 0)
206 -check([====[${known}]====], '20260607-081727-0000000', 0)
207 -check([====[${known}]====], '20260607-081728-0000000', 0)
208 -check([====[${known}]====], '20270607-081727-0000000', 0)
209 -`;
210 - execFileSync("lua", ["-"], { input: lua, encoding: "utf8", timeout: 10_000 });
211 -});

wezterm/bugabinga/agent.lua

Modified
25 25 return value:match( '([^/]+)$' ) or value
28 -local function detect( title, process )
28 +local function program( user_vars )
29 + local command = clean( user_vars and user_vars.WEZTERM_PROG )
30 + if not command then return nil end
31 + command = command:gsub( '^%^', '' )
32 + local executable = basename( command:match( '^([^%s]+)' ) )
33 + return executable and executable:lower():gsub( '%.exe$', '' ):gsub( '%.cmd$', '' ):gsub( '%.bat$', '' ) or nil
34 +end
36 +local function identity( user_vars )
37 + local explicit = clean( user_vars and user_vars.agent )
38 + if explicit and names[explicit:lower()] then return names[explicit:lower()] end
39 + return names[program( user_vars )]
40 +end
42 +local function detect( title, process, user_vars )
43 + local explicit = identity( user_vars )
44 + if explicit then return explicit end
29 46 local executable = basename( process )
30 47 if executable then
31 48 executable = executable:lower():gsub( '%.exe$', '' )
32 49 if names[executable] then return names[executable] end
52 + if clean( user_vars and user_vars.WEZTERM_STATE ) == 'idle' then return nil end
35 54 title = clean( title )
36 55 if not title then return nil end
37 56 if title:sub( 1, #'π' ) == 'π' then return 'Pi' end
86 105 local pane_id = call( pane, 'pane_id' ) or pane_info.pane_id
87 106 local title = call( pane, 'get_title' ) or ''
88 107 local process = call( pane, 'get_foreground_process_name' )
89 - local agent = detect( title, process )
108 + local agent = detect( title, process, call( pane, 'get_user_vars' ) )
90 109 local progress_state, priority
91 110 if agent then progress_state, priority = state( call( pane, 'get_progress' ) ) end
92 111 table.insert( panes, {
118 137 local function from_instances( rows )
119 138 local entries = {}
120 139 for _, row in ipairs( rows or {} ) do
121 - local agent = row.agent or detect( row.title, row.process )
140 + local agent = row.agent
122 141 if agent then
123 142 local state = row.state or 'unknown'
124 143 local priority = tonumber( row.priority ) or ({ error = 0, working = 1, idle = 2, unknown = 3, })[state] or 3
265 284 return {
266 285 badge = badge,
286 + identity = identity,
287 + program = program,
267 288 write_snapshot = write_snapshot,
268 289 switcher = switcher,

wezterm/bugabinga/status.lua

Modified
6 6 local nugu_light = require 'bugabinga.nugu.palette_light'.palette
7 7 local palette = nugu_dark
9 +local program_icons = {
10 + aerc = wez.nerdfonts.md_email,
11 + bat = wez.nerdfonts.md_file_document,
12 + btm = wez.nerdfonts.md_monitor_dashboard,
13 + cargo = wez.nerdfonts.dev_rust,
14 + chawan = wez.nerdfonts.md_web,
15 + claude = wez.nerdfonts.md_robot_outline,
16 + cmus = wez.nerdfonts.md_music,
17 + code = wez.nerdfonts.custom_neovim,
18 + codex = wez.nerdfonts.cod_openai,
19 + edit = wez.nerdfonts.custom_neovim,
20 + fd = wez.nerdfonts.md_folder_search_outline,
21 + fin = wez.nerdfonts.md_magnify,
22 + firefox = wez.nerdfonts.fa_firefox,
23 + fzf = wez.nerdfonts.md_magnify,
24 + g = wez.nerdfonts.dev_git,
25 + gh = wez.nerdfonts.dev_github_badge,
26 + git = wez.nerdfonts.dev_git,
27 + gitu = wez.nerdfonts.dev_git,
28 + glow = wez.nerdfonts.md_language_markdown,
29 + java = wez.nerdfonts.dev_java,
30 + jj = wez.nerdfonts.md_source_branch,
31 + lazygit = wez.nerdfonts.dev_git,
32 + list = wez.nerdfonts.md_folder_multiple,
33 + mise = wez.nerdfonts.md_hammer_wrench,
34 + mpv = wez.nerdfonts.fa_film,
35 + mvn = wez.nerdfonts.dev_maven,
36 + neovide = wez.nerdfonts.custom_neovim,
37 + node = wez.nerdfonts.dev_nodejs_small,
38 + npm = wez.nerdfonts.dev_npm,
39 + npx = wez.nerdfonts.dev_npm,
40 + nu = wez.nerdfonts.oct_terminal,
41 + nvim = wez.nerdfonts.custom_neovim,
42 + package = wez.nerdfonts.md_hammer_wrench,
43 + podman = wez.nerdfonts.linux_docker,
44 + python = wez.nerdfonts.dev_python,
45 + rbw = wez.nerdfonts.md_shield_key,
46 + rg = wez.nerdfonts.md_file_search,
47 + rustc = wez.nerdfonts.dev_rust,
48 + show = wez.nerdfonts.md_file_document,
49 + ssh = wez.nerdfonts.md_shield_key,
50 + topgrade = wez.nerdfonts.md_update,
51 + tree = wez.nerdfonts.md_file_tree,
52 + tre = wez.nerdfonts.md_file_tree,
53 + unpackage = wez.nerdfonts.md_hammer_wrench,
54 + uv = wez.nerdfonts.dev_python,
55 + vi = wez.nerdfonts.custom_neovim,
56 + video = wez.nerdfonts.fa_film,
57 + vim = wez.nerdfonts.custom_neovim,
58 + web = wez.nerdfonts.fa_firefox,
59 + wezterm = wez.nerdfonts.oct_terminal,
60 + yazi = wez.nerdfonts.md_folder_open,
61 + yy = wez.nerdfonts.md_folder_open,
62 + zed = wez.nerdfonts.md_code_braces,
63 + zeditor = wez.nerdfonts.md_code_braces,
64 + zig = wez.nerdfonts.dev_zig,
9 67 local clean = function ( value )
10 68 if not value or value == '' then return nil end
11 69 value = value:gsub( '^%s+', '' ):gsub( '%s+$', '' )
16 74 local basename = function ( value )
17 75 if not value or value == '' then return nil end
18 - value = value:gsub( '\\', '/' )
76 + value = value:gsub( '\\', '/' ):gsub( '/+$', '' )
19 77 return value:match( '([^/]+)$' ) or value
67 125 return table.concat( parts, ' ' )
70 -local primary_pane = function ( tab )
71 - local primary = nil
72 - for _, pane in ipairs( tab.panes or {} ) do
73 - if not primary or (pane.pane_index or 0) < (primary.pane_index or 0) then
74 - primary = pane
75 - end
76 - end
77 - return primary or tab.active_pane
128 +local function starts_with_name( title, name )
129 + if not title or not name then return false end
130 + local lower = title:lower()
131 + name = name:lower()
132 + if lower:sub( 1, #name ) ~= name then return false end
133 + local boundary = lower:sub( #name + 1, #name + 1 )
134 + return boundary == '' or boundary:match( '%W' ) ~= nil
135 +end
137 +local function pane_project( pane )
138 + local cwd = pane and pane.current_working_dir
139 + local ok, path = pcall( function () return cwd and cwd.file_path end )
140 + return ok and path and short_workspace( path, 24 ) or nil
80 143 local tab_text = function ( tab )
81 - local pane = primary_pane( tab )
82 - return clean( tab.tab_title )
83 - or clean( pane and pane.title )
84 - or clean( tab.active_pane and tab.active_pane.title )
85 - or 'tab'
144 + local explicit = clean( tab.tab_title )
145 + if explicit then return explicit end
147 + local pane = tab.active_pane
148 + local user_vars = pane and pane.user_vars
149 + local title = clean( pane and pane.title )
150 + local identity = agent.identity( user_vars )
151 + if identity == 'Pi' then
152 + local parts = { (wez.nerdfonts.md_pirate or '\u{f0a08}') .. ' Pi', }
153 + local session = clean( user_vars and user_vars.agent_session )
154 + local project = clean( user_vars and user_vars.agent_project ) or pane_project( pane )
155 + if session then table.insert( parts, session ) end
156 + if project and project ~= session then table.insert( parts, project ) end
157 + return table.concat( parts, ' · ' )
158 + end
160 + local program = agent.program( user_vars )
161 + local label = identity or program
162 + if not label then return title or 'tab' end
163 + if starts_with_name( title, label ) or starts_with_name( title, program ) then
164 + label = title
165 + else
166 + local project = pane_project( pane )
167 + if project then label = label .. ' · ' .. project end
168 + end
169 + local icon = program_icons[program]
170 + return icon and (icon .. ' ' .. label) or label
88 173 local zoomed = function ( pane )

wezterm/tests/modules_test.lua

Deleted
deleted file mode 100644
1 -package.path = 'wezterm/?.lua;wezterm/?/init.lua;' .. package.path
3 -local niri_socket = nil
4 -local getenv = os.getenv
5 -os.getenv = function ( name )
6 - if name == 'NIRI_SOCKET' then return niri_socket end
7 - return getenv( name )
8 -end
10 -local background_calls = {}
11 -local child_calls = {}
12 -local battery_rows = {}
13 -local worktree_output = [[
14 -worktree /home/test/Workspace/project
15 -HEAD 1111111111111111111111111111111111111111
16 -branch refs/heads/trunk
18 -worktree /home/test/Workspace/project-fix
19 -HEAD 2222222222222222222222222222222222222222
20 -detached
21 -]]
22 -local instance_rows = {
23 - {
24 - gui_pid = 99,
25 - niri_window_id = 12,
26 - pane_id = 7,
27 - workspace = 'remote',
28 - title = 'π - remote task',
29 - },
32 -local wezterm = {
33 - action = setmetatable( {}, {
34 - __index = function ( _, name )
35 - return function ( value ) return { kind = name, value = value, } end
36 - end,
37 - } ),
38 - mux = {
39 - all_windows = function () return {} end,
40 - get_workspace_names = function () return { 'local', } end,
41 - },
42 - procinfo = { pid = function () return 42 end, },
43 - config_dir = '/tmp/wezterm-test',
44 - home_dir = '/home/test',
45 - hostname = function () return 'test' end,
46 - target_triple = 'x86_64-unknown-linux-gnu',
47 - truncate_right = function ( value ) return value end,
48 - format = function ( items )
49 - local text = ''
50 - for _, item in ipairs( items ) do
51 - if item.Foreground then text = text .. '<' .. item.Foreground.Color .. '>' end
52 - text = text .. (item.Text or '')
53 - end
54 - return text
55 - end,
56 - battery_info = function () return battery_rows end,
57 - background_child_process = function ( args ) table.insert( background_calls, args ) end,
58 - action_callback = function ( fn ) return fn end,
59 - json_parse = function () return instance_rows end,
60 - run_child_process = function ( args )
61 - table.insert( child_calls, args )
62 - if args[1] == 'nu' then return true, '[]', '' end
63 - if args[1] == 'git' then return true, worktree_output, '' end
64 - return false, '', ''
65 - end,
66 - read_dir = function () return {} end,
67 - split_by_newlines = function ( value )
68 - local lines = {}
69 - for line in value:gmatch( '[^\r\n]+' ) do table.insert( lines, line ) end
70 - return lines
71 - end,
72 - log_error = function () end,
75 -package.preload.wezterm = function () return wezterm end
77 -local agent = require 'bugabinga.agent'
78 -local battery = require 'bugabinga.battery'
79 -local configure_options = require 'bugabinga.options'
80 -local configure_window = require 'bugabinga.window'
81 -local presentation_mode = require 'bugabinga.presentation_mode'
82 -local workspace_switcher = require 'bugabinga.workspace_switcher'
84 -local function equal( actual, expected, message )
85 - if actual ~= expected then
86 - error( string.format( '%s: expected %q, got %q', message, tostring( expected ), tostring( actual ) ) )
87 - end
88 -end
90 -local function contains( value, expected, message )
91 - if not value:find( expected, 1, true ) then
92 - error( string.format( '%s: expected %q in %q', message, expected, value ) )
93 - end
94 -end
96 -local function capture_selector( action, pane )
97 - local selector = nil
98 - local window = {
99 - perform_action = function ( _, performed ) selector = performed.value end,
100 - toast_notification = function () end,
101 - }
102 - action( window, pane or {} )
103 - return selector, window
104 -end
106 -local function public_api( module )
107 - local names = {}
108 - for name in pairs( module ) do table.insert( names, name ) end
109 - table.sort( names )
110 - return table.concat( names, ',' )
111 -end
113 -local glyph, progress_state = agent.badge 'Indeterminate'
114 -equal( glyph, '◉', 'indeterminate progress badge' )
115 -equal( progress_state, 'working', 'indeterminate progress state' )
116 -glyph, progress_state = agent.badge { Error = 12, }
117 -equal( glyph, '✗', 'error progress badge' )
118 -equal( progress_state, 'error', 'error progress state' )
119 -glyph, progress_state = agent.badge 'None'
120 -equal( glyph, nil, 'cleared progress badge' )
121 -equal( progress_state, 'idle', 'cleared progress state' )
122 -local battery_fixtures = {
123 - { state = 'Full', state_of_charge = 1, glyph = '󰁹 ', role = 'accent', },
124 - { state = 'Empty', state_of_charge = 0, glyph = '󱃍 ', role = 'error', },
125 - { state = 'Unknown', state_of_charge = 0.75, glyph = '󱈑 ', role = 'accent', },
126 - { state = 'Unknown', state_of_charge = 0.25, glyph = '󰂑 ', role = 'minor', },
127 - { state = 'Charging', state_of_charge = 0, glyph = '󰢟 ', role = 'error', },
128 - { state = 'Charging', state_of_charge = 0.1, glyph = '󰢟 ', role = 'error', },
129 - { state = 'Charging', state_of_charge = 0.1001, glyph = '󰢜 ', role = 'warning', },
130 - { state = 'Charging', state_of_charge = 0.25, glyph = '󰂆 ', role = 'warning', },
131 - { state = 'Charging', state_of_charge = 0.2501, glyph = '󰂆 ', role = 'accent', },
132 - { state = 'Charging', state_of_charge = 0.5, glyph = '󰂈 ', role = 'accent', },
133 - { state = 'Charging', state_of_charge = 0.75, glyph = '󰢞 ', role = 'accent', },
134 - { state = 'Charging', state_of_charge = 1, glyph = '󰂋 ', role = 'accent', },
135 - { state = 'Discharging', state_of_charge = 0, glyph = '󰂎 ', role = 'error', },
136 - { state = 'Discharging', state_of_charge = 0.1, glyph = '󰂎 ', role = 'error', },
137 - { state = 'Discharging', state_of_charge = 0.1001, glyph = '󰁺 ', role = 'warning', },
138 - { state = 'Discharging', state_of_charge = 0.25, glyph = '󰁻 ', role = 'warning', },
139 - { state = 'Discharging', state_of_charge = 0.2501, glyph = '󰁻 ', role = 'accent', },
140 - { state = 'Discharging', state_of_charge = 0.5, glyph = '󰁽 ', role = 'accent', },
141 - { state = 'Discharging', state_of_charge = 0.75, glyph = '󰂀 ', role = 'accent', },
142 - { state = 'Discharging', state_of_charge = 1, glyph = '󰂂 ', role = 'accent', },
144 -for _, theme in ipairs { 'dark', 'light', 'dark', } do
145 - local palette = require( 'bugabinga.nugu.palette_' .. theme ).palette
146 - local expected = {}
147 - for _, fixture in ipairs( battery_fixtures ) do
148 - battery_rows = { fixture, }
149 - local color = palette[fixture.role] or palette.ui[fixture.role]
150 - local icon = '<' .. color .. '>' .. fixture.glyph
151 - equal( battery.get_battery_icons( palette ), icon, theme .. ' ' .. fixture.state .. ' ' .. fixture.state_of_charge )
152 - table.insert( expected, icon )
153 - end
154 - battery_rows = battery_fixtures
155 - equal( battery.get_battery_icons( palette ), table.concat( expected, ' | ' ), theme .. ' multiple batteries' )
156 - battery_rows = {}
157 - equal( battery.get_battery_icons( palette ), '', theme .. ' no batteries' )
158 -end
160 -local function pane( id, title, process, progress )
161 - return {
162 - pane_id = function () return id end,
163 - get_title = function () return title end,
164 - get_foreground_process_name = function () return process end,
165 - get_progress = function () return progress end,
166 - }
167 -end
169 -local idle_pi = pane( 3, 'π - idle', '/usr/bin/node', 'None' )
170 -local working_codex = pane( 2, 'codex', '/usr/bin/codex', 'Indeterminate' )
171 -local failed_claude = pane( 1, 'Claude Code', '/usr/bin/claude', { Error = 1, } )
172 -local plain_shell = pane( 4, 'grep claude history', '/usr/bin/nu', 'None' )
173 -local fake_tab = {
174 - panes_with_info = function ()
175 - return {
176 - { pane = idle_pi, },
177 - { pane = working_codex, },
178 - { pane = failed_claude, },
179 - { pane = plain_shell, },
180 - }
181 - end,
183 -local fake_window = {
184 - get_workspace = function () return 'dotfiles' end,
185 - tabs = function () return { fake_tab, } end,
188 -niri_socket = nil
189 -wezterm.mux.all_windows = function () return { fake_window, } end
190 -local local_agents = capture_selector( agent.switcher() )
191 -equal( #local_agents.choices, 3, 'agent count' )
192 -contains( local_agents.choices[1].label, 'Claude', 'failed agent priority' )
193 -contains( local_agents.choices[2].label, 'Codex', 'working agent priority' )
194 -contains( local_agents.choices[3].label, 'Pi', 'idle agent priority' )
196 -local cwd_pane = {
197 - get_current_working_dir = function () return { file_path = '/home/test/Workspace/project', } end,
199 -local worktree_selector = capture_selector( workspace_switcher.switch_workspace(), cwd_pane )
200 -equal( #worktree_selector.choices, 3, 'local workspace and worktree count' )
201 -equal( worktree_selector.choices[2].id, '/home/test/Workspace/project', 'main worktree target' )
202 -contains( worktree_selector.choices[2].label, 'trunk', 'main worktree branch' )
203 -equal( worktree_selector.choices[3].id, '/home/test/Workspace/project-fix', 'linked worktree target' )
204 -contains( worktree_selector.choices[3].label, 'detached', 'linked worktree state' )
206 -niri_socket = '/test/niri.sock'
207 -wezterm.mux.all_windows = function () error 'external inventory must not require local mux windows' end
208 -local remote_agents = capture_selector( agent.switcher() )
209 -equal( #remote_agents.choices, 1, 'remote agent count' )
210 -equal( remote_agents.choices[1].id, 'niri:99:7', 'remote agent target' )
211 -remote_agents.action( {}, {}, 'niri:99:7' )
212 -local remote_activation = child_calls[#child_calls]
213 -equal( remote_activation[4], 'activate', 'remote agent activation command' )
215 -local selector = nil
216 -local fake_gui = {
217 - perform_action = function ( _, action ) selector = action.value end,
219 -local fake_pane = {}
220 -workspace_switcher.switch_workspace()( fake_gui, fake_pane )
221 -equal( #selector.choices, 2, 'local and external workspace count' )
222 -equal( selector.choices[2].id, 'niri:99:7', 'external workspace target' )
223 -selector.action( fake_gui, fake_pane, 'niri:99:7' )
224 -local activation = child_calls[#child_calls]
225 -equal( activation[4], 'activate', 'external workspace activation command' )
226 -equal( activation[5], '99', 'external workspace GUI PID' )
227 -equal( activation[6], '7', 'external workspace pane ID' )
229 -local new_window_selector = capture_selector( workspace_switcher.switch_workspace_in_new_window(), cwd_pane )
230 -new_window_selector.action( {}, {}, 'local' )
231 -local background_spawn = background_calls[#background_calls]
232 -equal( background_spawn[2], 'start', 'new workspace window executable action' )
233 -equal( background_spawn[3], '--always-new-process', 'new workspace window process isolation' )
234 -equal( background_spawn[5], 'local', 'new workspace window target' )
236 -local options_config = {}
237 -configure_options( options_config )
238 -equal( options_config.default_cwd, nil, 'native default cwd' )
239 -equal( options_config.enable_wayland, nil, 'native Wayland default' )
240 -equal( options_config.front_end, nil, 'native OpenGL front end' )
242 -local window_config = {}
243 -configure_window( window_config )
244 -equal( window_config.window_decorations, 'RESIZE', 'titlebar-free resizable window' )
246 -local overrides = nil
247 -local fullscreen_toggles = 0
248 -local presentation_window = {
249 - window_id = function () return 11 end,
250 - effective_config = function ()
251 - return {
252 - font = { font = { { weight = 'Regular', }, }, },
253 - font_size = 13,
254 - }
255 - end,
256 - get_config_overrides = function () return overrides end,
257 - set_config_overrides = function ( _, value ) overrides = value end,
258 - toggle_fullscreen = function () fullscreen_toggles = fullscreen_toggles + 1 end,
260 -presentation_mode.toggle( presentation_window )
261 -equal( overrides.font.font[1].weight, 'DemiBold', 'presentation font weight' )
262 -equal( overrides.font_size, 26, 'presentation font size' )
263 -equal( fullscreen_toggles, 1, 'presentation fullscreen enable' )
264 -presentation_mode.toggle( presentation_window )
265 -equal( overrides.font.font[1].weight, 'Regular', 'restored font weight' )
266 -equal( overrides.font_size, 13, 'restored font size' )
267 -equal( fullscreen_toggles, 2, 'presentation fullscreen disable' )
269 -equal( public_api( agent ), 'badge,switcher,write_snapshot', 'agent public API' )
270 -equal( public_api( battery ), 'get_battery_icons', 'battery public API' )
271 -equal(
272 - public_api( workspace_switcher ),
273 - 'switch_workspace,switch_workspace_in_new_window',
274 - 'workspace public API'
277 -print 'wezterm module checks passed'