All Projects β†’ roosta β†’ I3wsr

roosta / I3wsr

Licence: mit
Change i3-wm workspace names based on content

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to I3wsr

i3blocks-crypto
πŸ’΅ View your favorite coins' ticker prices with i3blocks.
Stars: ✭ 30 (-71.96%)
Mutual labels:  rice, i3, i3wm
I3wm Config
my i3wm config
Stars: ✭ 196 (+83.18%)
Mutual labels:  i3, i3wm, window-manager
no-mans-sky-rice-i3wm
i3WM rice themed using No Man's Sky's colors
Stars: ✭ 34 (-68.22%)
Mutual labels:  rice, i3, i3wm
sway-alttab
Simple Alt-Tab daemon for SwayWM/i3. Switches back to previous focused window on Alt-Tab or SIGUSR1
Stars: ✭ 36 (-66.36%)
Mutual labels:  i3, window-manager, i3wm
axyl-iso
Axyl is a Linux distro centered on tiling window managers. Choose from i3, bspwm, dwm and more.
Stars: ✭ 348 (+225.23%)
Mutual labels:  rice, window-manager, i3wm
dotfiles
πŸ’» 🍚 πŸ”³ πŸ”² My riced-up Kali dotfiles – off-white | dark leet | chrome lambo
Stars: ✭ 55 (-48.6%)
Mutual labels:  rice, i3, i3wm
dotfiles
collection (and a backup) of my config files
Stars: ✭ 49 (-54.21%)
Mutual labels:  rice, i3, i3wm
Direwolf Arch Rice
🐺🍚 A guide to replicating my riced Arch Linux set-up.
Stars: ✭ 501 (+368.22%)
Mutual labels:  rice, i3, i3wm
Dots
A Repository For Config Files / Dotfiles / Themes / Color Schemes / Etc...
Stars: ✭ 100 (-6.54%)
Mutual labels:  i3wm, window-manager
I3lock Fancy Rapid
A faster implementation of i3lock-fancy.
Stars: ✭ 102 (-4.67%)
Mutual labels:  i3, i3wm
I3 Polybar Config
My i3 configuration with polybar for HiDPI screen (4k)
Stars: ✭ 84 (-21.5%)
Mutual labels:  i3, i3wm
Matrixlock
Replace i3's lock screen by the Matrix.
Stars: ✭ 42 (-60.75%)
Mutual labels:  i3, i3wm
I3blocks Airpods
i3blocks script for managing airpods and airpods pro.
Stars: ✭ 36 (-66.36%)
Mutual labels:  i3, i3wm
Dotfiles
Stars: ✭ 85 (-20.56%)
Mutual labels:  rice, window-manager
Nmcli Rofi
A simple manager for network connections using rofi and nmcli
Stars: ✭ 39 (-63.55%)
Mutual labels:  i3, i3wm
Xsuspender
πŸ‘€ πŸ’» πŸ’€ πŸ”‹ Save battery by auto-suspending unfocused X11 applications.
Stars: ✭ 53 (-50.47%)
Mutual labels:  i3, i3wm
I3 Linux Config Tokyo Rice
My config files for i3-gaps and Linux, first rice.
Stars: ✭ 58 (-45.79%)
Mutual labels:  i3, i3wm
Dotfiles
Get ready for dotfiles. Contains i3, i3blocks, rofi, dunst, picom, vim, tmux, and zsh.
Stars: ✭ 985 (+820.56%)
Mutual labels:  i3, i3wm
I3 workspaces
Workspace manager for i3-wm
Stars: ✭ 53 (-50.47%)
Mutual labels:  i3, i3wm
Polybar
A fast and easy-to-use status bar
Stars: ✭ 9,604 (+8875.7%)
Mutual labels:  i3wm, window-manager

i3wsr - i3 workspace renamer

Build Status Crates.io

i3wsr is a small program that uses I3's IPC Interface to change the name of a workspace based on its contents.

Table of content

Details

The chosen name for a workspace is a composite of the WM_CLASS X11 window property for each window in a workspace. In action it would look something like this:

Requirements

i3wsr requires XCB, if you get compilation errors mentioning xcb, you might need to install libxcb. On Ubuntu for example you'd install:

sudo apt-get install libxcb1-dev

Refer to #18 for more.

Installation

Rust, and Cargo is required, and i3wsr can be installed using cargo like so:

cargo install i3wsr

Or alternatively, you can build a release binary,

cargo build --release

Then place the built binary, located at target/release/i3wsr, somewhere on your $path.

Arch linux

If you're running Arch you can install either stable, or latest from AUR thanks to reddit user u/OniTux.

Usage

Just launch the program and it'll listen for events if you are running I3. Another option is to put something like this in your i3 config

# cargo
exec_always --no-startup-id $HOME/.cargo/bin/i3wsr
# AUR
exec_always --no-startup-id /usr/bin/i3wsr

i3 configuration

This program depends on numbered workspaces, since we're constantly changing the workspace name. So your I3 configuration need to reflect this:

bindsym $mod+1 workspace number 1

If you're like me and don't necessarily bind your workspaces to only numbers, or you want to keep a part of the name constant you can do like this:

bindsym $mod+q workspace number 1:[Q]

This way the workspace would look something like this when it gets changed:

1:[Q] Emacs|Firefox

You can take this a bit further by using a bar that trims the workspace number and be left with only

[Q] Emacs|Firefox

Configuration / options

Configuration for i3wsr can be done using cmd flags, or a config file. A config file allows for more nuanced settings, and is required to configure icons and aliases. To use a config file pass to the --config option on invocation:

i3wsr --config ~/my_config.toml

Example config can be found in assets/example_config.toml.

Icons

You can configure icons for the respective classes, a very basic preset for font-awesome is configured, to enable it use the option --icons awesome (requires font-awesome to be installed).

A more in depth icon configuration can be setup by using a configuration file. In there you can define icons for whatever class you'd like.

[icons]
Firefox = "🌍"

# Use quote when matching anything other than [a-zA-Z]
"Org.gnome.Nautilus" = "πŸ“˜"

A font that provides icons is of course recommended, like font-awesome. Make sure your bar has that font configured.

Aliases

Sometimes class names for windows can be overly verbose, so its possible to match a class name with an alias:

[aliases]
Google-chrome-unstable = "Chrome-dev"

# Use quote when matching anything other than [a-zA-Z]
"Org.gnome.Nautilus" = "Nautilus"

Now i3wsr will display the alias instead of the full class name.

Separator

Normally i3wsr uses the pipe character | between class names in a workspace, but a custom separator can be configured in the config file:

[general]
separator = " ξ‚± "

Default icon

To use a default icon when no other is defined use:

[general]
default_icon = "πŸ’€"

No names

If you have icons and don't want the names to be displayed, you can use the --no-names flag, or enable it in your config file like so:

[options]
no_names = true

Remove duplicates

If you want duplicates removed from workspaces use either the flag --remove-duplicates, or configure it in the options section of the config file:

[options]
remove_duplicates = true

Use instance

Use WM_INSTANCE instead of WM_CLASS when assigning workspace names, instance is usually more specific. i3wsr will try to match icon with instance, and if that fail, will fall back to class.

To enable this, either pass the flag --use-instance, or add it in your config file under options.

[options]
use_instance = true

A use case for this option could be launching chromium --app="https://web.whatsapp.com", and then assign a different icon to whatsapp in your config file:

[icons]
"web.whatsapp.com" = "πŸ’§"

Aliases will also match on instance:

[aliases]
"web.whatsapp.com" = "WhatsApp"

Sway

Check Pedro Scaff's port swaywsr.

Contributors

Test environment

To run the tests Xvfb needs to be installed and run:

Xvfb :99.0

This sets up a headless x server running on DISPLAY :99.0, then some apps needs to be run in this new server:

env DISPLAY=:99.0 gpick
env DISPLAY=:99.0 i3 -c /etc/i3/config

refer to .travis.yml for a CI example

Attribution

This program would not be possible without i3ipc-rs, a rust library for controlling i3-wm through its IPC interface and rust-xcb, a set of rust bindings and wrappers for XCB.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].