Skip to content

A polywins inspired workspace AND window lister, written in Python. Heavy WIP.

License

Notifications You must be signed in to change notification settings

CordlessCoder/polywins.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

polywins.py

A polywins inspired workspace AND window lister, written in Python. Heavy WIP. BSPWM only. Requires xprop, wmctrl, xdo and slop.

Installing the required packages

Arch Linux:

yay -S xorg-xprop xdo wmctrl slop

Adding to polybar

You need to create a module of the custom/script type, and with the tail property set to true.

Example:

[module/polywins]
type = custom/script
exec = ~/.config/polybar/scripts/polywins.py $MONITOR
format = <label>
label = %output%
label-padding = 0
tail = true

You will also need to use a script to make sure polybar runs on all montitors and knows what monitor it's on.

Example:

#!/usr/bin/env bash

# Terminate already running bar instances
killall -q polybar
# If all your bars have ipc enabled, you can also use
# polybar-msg cmd quit

if type "xrandr" >/dev/null; then
    for m in $(polybar -m | cut -d':' -f1); do
        MONITOR=$m polybar --reload main_bar &
    done
else
    polybar --reload main_bar &
fi

and in your main bar:

monitor = ${env:MONITOR:}

About

A polywins inspired workspace AND window lister, written in Python. Heavy WIP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages