scorpion-26 / gBar

Blazingly fast status bar written with GTK
MIT License
479 stars 17 forks source link

Add workspace symbol configuration #2

Closed mosswg closed 1 year ago

mosswg commented 1 year ago

Added the ability to configure the symbols of the workspaces in the .config. The syntax is:

WorkspaceSymbol-[Workspace Index]: [Symbol]

For example, to change the third workspace to be "3":

WorkspaceSymbol-3: 3

This indexes from 1, but I can easily change that if you prefer indexing from 0.

I also added a default workspace symbol option, which is used when no workspace symbol is provided. If no default is provided, then the circle with dot symbol is used. The syntax for changing the default is:

DefaultWorkspaceSymbol: [Symbol]

The default and a workspace symbol change has been added to the config at data/config.

scorpion-26 commented 1 year ago

This indexes from 1, but I can easily change that if you prefer indexing from 0.

Clicking on a workspace currently adds 1 to the internal index anyway, so that's fine.

mosswg commented 1 year ago

I've added a log output on index out of bounds including the invalid index in the log. I've also moved the "GetWorkspaceSymbol" function into the Hyprland ifdef and I fixed the mistake in the config. Let me know if there is anything else I should change.

scorpion-26 commented 1 year ago

LGTM, thanks!