GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nixfred/workspace-names: Give numbered Hyprland workspaces a title in the Omarchy bar. Hover to see it, click to rename inline, a pill slides in on every switch. Numbers stay numbers.

BranchesTags
Open more actions menu

Latest commit

 

History

25 Commits
25 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
tests
tests
 
 
LICENSE
LICENSE
 
 
Names.js
Names.js
 
 
README.md
README.md
 
 
Service.qml
Service.qml
 
 
Suggestions.js
Suggestions.js
 
 
WorkspaceIds.js
WorkspaceIds.js
 
 
WorkspacesWidget.qml
WorkspacesWidget.qml
 
 
manifest.json
manifest.json
 
 

Repository files navigation

Workspace Names

An Omarchy plugin that keeps workspace numbers in the bar and flashes the current workspace name in a centered popup. Names can be automatic or yours.

The numbers share a rounded rail with an animated accent capsule around the active number, adapted from the Kinetic Workspace Strip. This styling is part of Workspace Names itself; it does not require a second workspace widget.

Everyday workflow

  1. Switch to the workspace and press Super+Shift+R, or right-click its number.
  2. Type a short project name and press Enter or Save.
  3. Use Suggest to start from what it is doing right now.
  4. Clear the field and save to return to automatic naming. Esc or Cancel leaves the saved name alone.

Manual names take precedence. A suggestion says what the workspace is doing, from its most recently focused window:

  • A terminal names the program in the foreground, the project directory it runs in, and the task its title names: Claude · Larry · X post discussion, Neovim · atmos, Herdr · workspaces, or just Terminal · blip for an idle shell. Agent spinners in the title (Claude's ✳, braille frames) are ignored, so a working agent keeps one name.
  • A browser names the site and what is on it: Brave · X · Mark Cuban, Brave · YouTube · How QML works, Firefox · GitHub · nixfred/plonk.
  • Anything else is the app's own name, plus its window title when that adds something: Hermes, Remote Desktop · Windows VM - Omarchy.

Names run up to 60 characters. Everything comes from local window metadata: hyprctl clients and, for terminals, the foreground process and its directory (bin/workspace-clients). Nothing leaves the machine.

A workspace names itself, and the name follows the work. Once what a workspace is doing has held still for two seconds, it is written to the names file as a real name — bold in the popup, carried by Plonk, yours to change. Open a different project, switch tabs, start a new agent task, and the name updates by itself; the popup and the bar show the live description straight away, without waiting for the write. Titles are sampled once a second, so a spinning agent costs one small probe a second, not ten. Renaming is always the last word: a name you typed is never touched, and clearing it hands the slot back. Set "autoName": false in _config to keep suggestions display-only.

Automatically written names are listed in the file's _auto array, and typing a name removes it from that list. That is how the plugin and Plonk tell the two apart: a name you typed follows its windows through any move, displacing an automatic label that got there first, while an automatic label reserves no workspace number and is dropped rather than archived when its workspace goes away.

Popup

The bar contains numbers only. Switching workspaces shows the name near the top of the focused screen, with a 1 second fully visible hold and brief 80 ms fades. The popup is one fixed-size box in one place for every workspace: the workspace number sits in an accent badge on its left, and the name follows it. The box is only as wide as its contents, with even padding on each side; a name longer than half the screen elides. It passes clicks through and never takes keyboard focus.

Names and popup settings live in ~/.config/omarchy/workspace-names.json:

{
  "_config": { "pill": true, "hold": 1000, "slide": 80, "topOffset": 139, "autoName": true },
  "2": "Website redesign",
  "4": "Music"
}

topOffset is measured in logical pixels from the screen's top edge. For a 1920×1200 screen reporting 220 mm height at scale 1, 139 pixels is about one inch. Adjust it for your display; the default is 96. Set pill to false to hide the popup. The file is watched for changes.

When the shell stops hearing the compositor

Quickshell's Hyprland event stream can go silent and stay silent. On gus the shell started two seconds after Hyprland at boot, read the workspace list once and never received another event: the rail showed a single number while three workspaces were open, and the popup still named a workspace that had been gone for hours. Only a shell restart fixed it.

Events are still the fast path, but both the bar widget and the service now re-read the compositor every ten seconds (the window list every thirty), so a dead stream costs seconds instead of an evening. The ids are only republished when they actually changed, and a workspace the Quickshell model has never heard of triggers a model refresh, which is what the focus capsule and the click targets read. omarchy-shell nixfred.workspace-names state reports a heartbeats counter, so you can tell a stalled shell from a stalled plugin.

Plonk and custom names

  • Occupied workspaces carry their saved names when Plonk renumbers them.
  • A name follows its windows. Move the last window off a named workspace (Super+Shift+number) and Plonk 1.2.0+ moves the name to wherever that window landed. A name you typed wins over an automatic one at the destination; two typed names never overwrite each other. Closing the window moves nothing.
  • Plonk reserves empty named slots by default. Its empty_names=archive option releases vanished slots while preserving their names in the names file's _plonk_archived_names array.
  • The rename helper shares Plonk's directory lock, so simultaneous saves and compaction do not overwrite each other's JSON updates. A busy or failed save leaves the editor open with an error.
  • Plonk snapshots the names file before remapping it, retaining its last 20 backups under ~/.local/state/plonk/names-backups/.

Hyprland's actual workspace names remain numeric. The widget refreshes from hyprctl on renumber events, avoiding stale Quickshell workspace IDs. The rail's highlight follows the compositor's own switch events rather than Quickshell's model, so it lands on the right number even after Plonk has renumbered the workspace you are standing on.

Install

omarchy plugin add https://github.com/nixfred/workspace-names.git --enable

Replace the existing workspace widget entry in bar.layout.left in ~/.config/omarchy/shell.json with {"id": "nixfred.workspace-names"}. Copy bin/workspace-name (and bin/workspace-cycle, if you want the arrow keys) to a directory on your PATH. For the shortcut, add to ~/.config/hypr/bindings.lua after checking it is available:

o.bind("SUPER + SHIFT + R", "Rename workspace", "workspace-name")

Cycling without skipping a named workspace

Hyprland's e+1 / e-1 walk only the workspaces that exist, and an empty workspace does not exist — so the moment the last window left a titled workspace, the arrow keys jumped straight over it (4 -> 6, with 5 nowhere in the cycle) and its number looked like it had vanished. bin/workspace-cycle steps through the union of the existing numeric workspaces and the slots holding a name, so a named workspace stays reachable while it is empty. Unnamed empty slots are still never visited, it wraps at both ends, and it never creates a workspace.

o.bind("SUPER + LEFT",  "Previous workspace",   "workspace-cycle prev")
o.bind("SUPER + RIGHT", "Next workspace (wraps)", "workspace-cycle next")

Do not be tempted back to Hyprland's own e-1 / e+1: they walk every workspace that exists, and that includes the special ones. A desktop running Orca keeps pharos (id -1337) alive permanently, so RIGHT from the last numbered workspace lands on a blank screen and takes a second press to reach workspace 1. workspace-cycle walks numbered workspaces and named slots only.

Named slots have no monitor of their own, so on a multi-head setup they join the cycle on whichever monitor is focused; existing workspaces are filtered to that monitor.

Run hyprctl reload and hyprctl configerrors. A shell restart may be needed for new plugin modules: omarchy restart shell.

Requires Omarchy Quattro, Hyprland, hyprctl, jq, and flock. The widget uses its bundled helper when saving; the PATH copy serves shortcuts and terminal use. For development, the installed plugin directory can be a symlink to this checkout.

Workspace Map and commands

The map lists workspace labels, occupancy, and app identities. Use arrow keys and Enter or click to switch; right-click a row to rename; Esc closes.

omarchy-shell nixfred.workspace-names.bar map
workspace-name "Website redesign"
workspace-name -i 4 Music
workspace-name --clear
workspace-name --list
workspace-name --peek

workspace-name with no arguments opens the inline editor, falling back to an Omarchy prompt only if the editor is unavailable.

Checks

node tests/suggestions.test.js
node tests/workspace-ids.test.js
node tests/names.test.js
bash tests/rename-helper.test.sh
bash tests/workspace-cycle.test.sh
bash tests/names-agreement.test.sh
bash tests/workspace-clients.test.sh
omarchy plugin validate .

Tests cover local suggestions, manual precedence, renumbering, the inline editor fallback, quoting, and concurrent name writes using temporary state, plus arrow-key cycling: a named empty workspace stays reachable, an unnamed one does not, the cycle wraps, and _auto/_config/the archive are never mistaken for workspace numbers.

names-agreement.test.sh is the one that matters most. Four things read the names document — this plugin's QML, bin/workspace-name, bin/workspace-cycle and Plonk — and they have to mean the same thing by "this workspace has a name". Rather than restate the rule and compare it against itself, the test walks the real bin/workspace-cycle over a set of malformed documents and diffs the cycle it produces against Names.slots(). If either side's idea of a name drifts, it fails with both answers side by side.

License

MIT — Fred Nix & Larry.

Workspace visibility

The bar shows workspaces that currently exist, including an empty workspace you are using. It does not force buttons 1–5 or show a vanished workspace just because a saved title remains. Plonk can release vanished named slots with empty_names=archive in ~/.config/plonk/config; archived titles remain in _plonk_archived_names in the workspace names file.

About

Give numbered Hyprland workspaces a title in the Omarchy bar. Hover to see it, click to rename inline, a pill slides in on every switch. Numbers stay numbers.

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.