#waybar #sway #i3 #systemctl-user #environment-variables #automatically-start #exec-always-no #workspace-bar #former-takes #bindsym-mod-1

app workstyle

Workspaces with style! This program will dynamically rename your workspaces to indicate which programs are running in each workspace. It uses the i3 ipc protocol, which makes it compatible with sway and i3. By default, each program is mapped to a unicode character for concision. The short description of each program is configurable. In the absence of a config file, one will be generated automatically. See ${XDG_CONFIG_HOME}/workstyle/config.yml for details.

11 releases (6 breaking)

0.8.2 Feb 20, 2022
0.8.1 Feb 19, 2022
0.7.0 Jan 8, 2022
0.6.1 Dec 17, 2021
0.1.0 Sep 19, 2019

#745 in Filesystem

Download history 21/week @ 2023-10-29 5/week @ 2023-11-05 18/week @ 2023-11-12 7/week @ 2023-11-19 42/week @ 2023-11-26 16/week @ 2023-12-03 13/week @ 2023-12-10 2/week @ 2023-12-17 27/week @ 2023-12-24 3/week @ 2023-12-31 17/week @ 2024-01-07 1/week @ 2024-01-14 14/week @ 2024-01-21 28/week @ 2024-01-28 2/week @ 2024-02-04 43/week @ 2024-02-11

87 downloads per month

MIT license

346 lines


Sway/i3 workspaces with style:

This application will dynamically rename your workspaces to indicate which programs are running in each one.

A picture is better than a thousand words!

  • The workspace bar could look like this (uses waybar) alt tag

  • In context: alt tag

Note: if you are using waybar and want the workspaces to be displayed with their number, like in the screenshot, please set "format": "{icon}",. See the waybar wiki for more information on configuring waybar.


cargo install workstyle


Simply run the executable:

workspace --help

will give you some more context.

Sway configuration

Add this line to your sway config:

exec_always --no-startup-id workstyle &> /tmp/workstyle.log

You may also want to control the log level with the environment variable: RUST_LOG to error, info or debug.

Note that since your workspaces will be renamed all the time, you should configure your keybindings to use numbered workspaces instead of assuming that the name is the number: Prefer

    bindsym $mod+1 workspace number 1


    bindsym $mod+1 workspace 1

SystemD integration

Alternatively you can use the workstyle.service file to configure systemd to automatically start workstyle after you login

Copy workstyle.service to $HOME/.config/systemd/user/

and run

systemctl --user enable workstyle.service
systemctl --user start workstyle.service


The main configuration consists of deciding which icons to use for which applications.

The config file is located at ${XDG_CONFIG_HOME}/workstyle/config.toml or /etc/xdg/workstyle/config.toml (the former takes precedence over the latter). It will be generated if missing. Read the generated file. The syntax is in TOML and should be pretty self-explanatory.

When an app isn't recogised in the config, workstyle will log the application name as an error. Simply add that string (case insensitive) to your config file, with an icon of your choice.

If no matching icon can be found in the config, a blank space will be used. To override this, set the default icon in the config as per below:

fallback_icon = "your icon"

If you prefer not to have multiple copies of the same icon when there are multiple matching windows, set this config option:

deduplicate_icons = true

Note that the crate find_unicode can help find a unicode character directly from the command line. It now supports all of nerdfonts unicode space.


~158K SLoC