• Stars
    star
    180
  • Rank 211,862 (Top 5 %)
  • Language
    Rust
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sway workspaces with style

Workstyle

Sway/i3/Hyprland 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.

Installation

Install the latest published version from crates.io with

cargo install workstyle

Or for Arch Linux users, install the freshest git version with your favourite AUR helper, e.g.

yay -S workstyle-git

Usage

Simply run the executable:

workstyle
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

over

    bindsym $mod+1 workspace 1

Hyprland configuration

Add this line to your Hyprland config:

exec-once = workstyle &> /tmp/workstyle.log

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

Configuration

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:

[other]
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:

[other]
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.

Minimal waybar configuration so the workspace names are showed

  • For i3/sway
    "modules-left": ["sway/workspaces"],
     "sway/workspaces": {
         "format": "{icon}",
     },
  • For hyprland
    "modules-left": ["wlr/workspaces"],
     "wlr/workspaces": {
         "format": "{icon}",
     },

More Repositories

1

ferris

A low profile split keyboard designed to satisfy one single use case elegantly
Python
817
star
2

rust-dwm-status

A status bar for dwm written in rust
Rust
29
star
3

find_unicode

Find Unicode characters the easy way: from the command line
CSS
27
star
4

2048-rs

Rust implementation of 2048 game
Rust
20
star
5

matrix_display

A rust library to visualise pretty matrixes in cli
Rust
13
star
6

kicad_cli

Run some useful kicad functionality from the command line
Rust
9
star
7

keyboard_footprints

Footprints used in the keyboards I'm designing
7
star
8

rwm

rwm - rustic window manager
Rust
6
star
9

dotfiles

My most important dotfiles
Shell
4
star
10

ferris_pcb_art

PCB Art (copper pads and silkscreens) for the Ferris keyboard
4
star
11

chess-rs

A rust cli frontend for chess
Rust
4
star
12

slider

A Slider Puzzle implemented in rust
Rust
3
star
13

advent_of_code_2020

My submissions for this year's advent of code challenge
Rust
3
star
14

dwm

My clone of dwm with config changes
C
3
star
15

bongo_light

Rust
3
star
16

unicode_types

Types to represent all the unicode characters
Rust
2
star
17

advent_of_code_2022

My solutions to the challenges from Advent of Code 2022
Rust
2
star
18

safenetwork_remark_template

SAFE Network themed remark.js presentation template
HTML
2
star
19

labcoat.nvim

Vim plugin for the labcoat family of configurable colorschemes
Lua
2
star
20

snake-rs

A cli snake game written in rust
Rust
1
star
21

st

Personal configuration for st (solarized dark, scrolling, HiDPI)
C
1
star
22

snake

A go tutorial
Go
1
star
23

talk_24_09_2019

Empowered, A gentle invitation to Rust - Talk at the Rust London User Group on 04/09/2019
HTML
1
star
24

euler

Project Euler (my solutions with C++17 and range-v3)
C++
1
star
25

talk_15_12_2018

Slides from talk at the RustRush conference
HTML
1
star
26

zaphod-config

C
1
star
27

palette-rs

A little utility to display your terminal's ansi color palette
Rust
1
star
28

tabbed

My personalized fork of tabbed from suckless
C
1
star
29

natural_slice

Encoding and decoding various properties of slices into natural numbers using Kociemba's algorithms
Rust
1
star
30

2048

A simple command line implementation of the popular 2048 game.
C++
1
star
31

advent_of_code_2021

My solutions to the challenges from Advent of Code 2021
Rust
1
star
32

snake-ui

A python tutorial
Python
1
star