Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyprland-community/hyprland-autoname-workspaces
Hyprland autoname workspaces πͺ [maintainers=@cyrinux,@maximbaz]
https://github.com/hyprland-community/hyprland-autoname-workspaces
desktop desktop-application eww hyprland hyrpland icons linux rust waybar wayland
Last synced: 5 days ago
JSON representation
Hyprland autoname workspaces πͺ [maintainers=@cyrinux,@maximbaz]
- Host: GitHub
- URL: https://github.com/hyprland-community/hyprland-autoname-workspaces
- Owner: hyprland-community
- License: isc
- Created: 2023-01-08T21:11:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-14T17:47:15.000Z (9 months ago)
- Last Synced: 2024-05-21T13:57:58.602Z (9 months ago)
- Topics: desktop, desktop-application, eww, hyprland, hyrpland, icons, linux, rust, waybar, wayland
- Language: Rust
- Homepage:
- Size: 310 KB
- Stars: 177
- Watchers: 3
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# πͺ hyprland-autoname-workspaces






[](https://discord.gg/zzWqvcKRMy)
[](https://codecov.io/gh/hyprland-community/hyprland-autoname-workspaces)β οΈ We are seeking for active maintainers !
This project need your help. See here https://github.com/hyprland-community/hyprland-autoname-workspaces/issues/117
πΉοΈThis is a toy for Hyprland.
This app automatically rename workspaces with icons of started applications - tested with _[waybar](https://github.com/Alexays/Waybar)_ and _[eww](https://github.com/elkowar/eww)_.
You have to set the config file with your prefered rules based on `class` and `title`. Regex (match and captures) are supported.
## FAQ, tips and tricks β
https://github.com/hyprland-community/hyprland-autoname-workspaces/wiki/FAQ
## Install
### AUR π¦
Available as AUR package under the program name [`hyprland-autoname-workspaces-git`](https://aur.archlinux.org/packages/hyprland-autoname-workspaces-git).
You can then use the service `systemctl --user enable --now hyprland-autoname-workspaces.service`.### Fedora π¦
Package available here https://copr.fedorainfracloud.org/coprs/solopasha/hyprland/.
### Nix π¦
Available in nixpkgs as [`hyprland-autoname-workspaces`](https://search.nixos.org/packages?channel=unstable&show=hyprland-autoname-workspaces).
You can add it to your `systemPackages` or try it without installing it with `nix run`.```bash
$ nix run nixpkgs#hyprland-autoname-workspaces
```### Cargo π¦
```bash
$ cargo install --locked hyprland-autoname-workspaces
```## Usage
```bash
$ hyprland-autoname-workspaces
```## Configuration
First, you have to set your `waybar` for example, with the good module `hyprland/workspaces`. The module `wlr/workspaces` is deprecated.
You have to use `hyprland/workspaces` module with as config `"format" = "{name}"`.```
"hyprland/workspaces": {
"format": "{name}",
}
```_For all parameters, check the `config.toml.example` in this repository._
The config file can be specified using the `-c ` option, otherwise it defaults to `~/.config/hyprland-autoname-workspaces/config.toml`. If you specify a path that doesn't exist, a default configuration file will be generated.
_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 placeholders `{class}`, `{title}` and `{match1}`, `{match2}` if you use regex captures.
Example:
```
[class]
DEFAULT = "{class}: {title}"
...
```- You can exclude applications in the `[exclude]` with `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)
```- You can match on title with `[title_in_class.classname]` and `[title_in_class_active.class]` with `"a word in the title" = "icons"`.
_Hint_: There is also `title_in_initial_class`, `initial_title_in_class`, `initial_title_in_initial_class` and so on.
Example:
```
...
[title."(xterm|(?i)kitty|alacritty)"]
"(?i)neomutt" = "mail"
ncdu = "file manager"[title."(firefox|chrom.*)"]
youtube = "yt"
google = "gg"[title_active."(firefox|chrom.*)"]
youtube = "yt"
google = "{icon}"
...```
- You can deduplicate icons with the `dedup` parameter in the `root` section of config file.
```
dedup = true
dedup_inactive_fullscreen = true
...
[title."(xterm|(?i)kitty|alacritty)"]
"(?i)neomutt" = "mail"
ncdu = "file manager"
...
```- You can also redefine all the default formatter with those `[format]` section formatters parameters.
The available list of `{placeholder}` is:workspace:
- client
- id (or id_long)
- name (use value from `[workspaces_name]` mapping)
- delimclients:
- icon
- counter_s, counter_unfocused_s, counter, counter_unfocused
- class, iitle
- delim
- match1, match2, match3, matchN (for regex captures)```
[format]
# max_clients = 10 (default: usize::MAX)
dedup = true
dedup_inactive_fullscreen = true
delim = "β―" # NARROW NO-BREAK SPACE
workspace = "{id}:{delim}{clients}"
workspace_empty = "{id}"
client = "{icon}{delim}"
client_active = "{icon}{delim}"
client_dup = "{icon}{counter_sup}{delim}"
client_dup_fullscreen = "[{icon}]{delim}{icon}{counter_unfocused_sup}"
client_fullscreen = "[{icon}]{delim}"
...
```See `config.toml.example` and the wiki for more example, feel free to share your config !
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©=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](https://github.com/Psykopear/i3autoname/blob/master/scripts/generate_icons.py) to generate your config file. This is untested for the moment.
_Hint_: You can bootstrap your `[icons]` with the `contrib/generate_icons.py` script.
_Hint_: All styling param that you can use with `` are here: https://docs.gtk.org/Pango/pango_markup.html