Code Monkey home page Code Monkey logo

swayest_workstyle's Introduction

Swayest Workstyle

An executable similar to workstyle.

The main difference between this and workstyle is that this supports exact app names instead of only generic titles.

Meant to work best/only with Wayland and Sway.

It also supports a fallback icon for when it couldn't match an App.

This ensures that icons are always valid based on the application being run instead of soly relying on application title. (Does not work well with browers, since you can type anything and it will show up in title name)

Your workspace shall never contain an empty icon again!

An example of what it does (using waybar which also hides the workspace index):


Installation

Cargo

cargo install sworkstyle

Arch Linux

You can install it manually or use a aur helper like Yay.

yay -S sworkstyle

Usage

sworkstyle

Sway Configuration

exec_always sworkstyle &> /tmp/sworkstyle.log

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

Configuration

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

The config file is located at ${XDG_CONFIG_HOME}/sworkstyle/config.toml. 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, sworkstyle will log the application name as a warning. Simply add that string to your config file, with an icon of your choice.

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.

Example Config

fallback = ''

[matching]
"github" = { type = "generic", value = "" }
"rust" = { type = "generic", value = "" }
"vim" = { type = "generic", value = "" }
"npm" = { type = "generic", value = "" }
"node" = { type = "generic", value = "" }
"yarn" = { type = "generic", value = "" }
"thunderbird" = ""
"Bitwarden" = ""
"Google-chrome" = ""
"Slack" = ""
"Code" = ""
"Alacritty" = ""
"Spotify" = ""
"firefox" = ""

swayest_workstyle's People

Contributors

lyr-7d1h avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.