diff options
| -rw-r--r-- | glide/.config/glide/tabbar.glide.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/glide/.config/glide/tabbar.glide.ts b/glide/.config/glide/tabbar.glide.ts index 3ad7817..dd4cf27 100644 --- a/glide/.config/glide/tabbar.glide.ts +++ b/glide/.config/glide/tabbar.glide.ts @@ -122,6 +122,8 @@ async function update_status_bar() { return } + const mode = glide.ctx.mode; + try { const current_window = await browser.windows.getCurrent(); const tabs = await browser.tabs.query({ @@ -138,7 +140,7 @@ async function update_status_bar() { display_url = display_url.substring(0, 47) + "..."; } - tabs_container.textContent = `[${tab_index + 1}/${tabs.length}]`; + tabs_container.textContent = `${mode} [${tab_index + 1}/${tabs.length}]`; right.textContent = `${title} | ${display_url}`; } catch (e) { tabs_container.textContent = e; @@ -146,7 +148,7 @@ async function update_status_bar() { } } -glide.autocmds.create("ModeChanged", "*", (args) => { +glide.autocmds.create("ModeChanged", "*", async (args) => { const style_id = "glide-custom-mode-indicator" glide.styles.remove(style_id) glide.styles.add(` @@ -154,6 +156,7 @@ glide.autocmds.create("ModeChanged", "*", (args) => { border-bottom: 3px solid var(${mode_colors[args.new_mode] ?? fallback_mode_color}) } `, { id: style_id }) + await update_status_bar(); }) glide.autocmds.create("UrlEnter", /.*/, async () => { |
