🪟 hyprland-autoname-workspaces

🕹️This is a toy for Hyprland.

This app automatically rename workspaces with icons of started applications - tested with waybar.

You have to set the config file with your prefered rules based on class and title. Regex are supported.

Install

AUR

Available as AUR package under the program name hyprland-autoname-workspaces-git. You can then use the service systemctl --user enable --now hyprland-autoname-workspaces.service.

Cargo

bash $ cargo install --locked hyprland-autoname-workspaces

Usage

bash $ hyprland-autoname-workspaces

or to dedup icon

bash $ hyprland-autoname-workspaces --dedup

Configuration

In the config file ~/.config/hyprland-autoname-workspaces/config.toml.

You can use regex everywhere, and its case sensitive by default

Edit the mapping of applications with class = "icon" in the [icons] part.

In icons value, you can use the placeholder ${class} and ${title}.

Example:

[icons] DEFAULT = "${class}: ${title}" ...

In the exclude part, the key is the window class, and the value the title. You can use "" in order to exclude window with empty title and ".*" as value to match all title of a class name.

Example:

... [exclude] "(?i)fcitx" = ".*" # will match all title for fcitx "[Ss]team" = "Friends list.*" "[Ss]team" = "^$" # will match and exclude all Steam class with empty title (some popups)

Example:

... [title."(?i)kitty"] "(?i)neomutt" = "neomutt"

No need to restart the applications then, there is an autoreload.

Hint: You can use glyphsearch and copy the unicode icon of your font for example https://glyphsearch.com/?query=book&copy=unicode

Hint: You can find hyprland class names for currently running apps using: hyprctl clients | grep -i class, or you can also use hyprland-autoname-workspaces --verbose.

Hint: Feel free to adapt and use this script to generate your config file. This is untested for the moment.