amtoine / dotfiles

My personal archlinux config files.
GNU General Public License v3.0
21 stars 2 forks source link

remove the dependency on polybar from bspwm #21

Open amtoine opened 1 year ago

amtoine commented 1 year ago

hello there :wave: :yum:

i have noticed, and that was intentional at the time, that some part of the config use polybar to get the list of connected monitors i think this is not great because it adds a useless dependency to them...

these files are:

now

bspwm

monitors=($(polybar -m | awk -F: '{ print $1 }' | tr '\n' ' '))

qtile

output = subprocess.check_output(["polybar", "-m"]).decode("utf-8")
monitors = [monitor.split(":")[0] for monitor in output.strip().split("\n")]

new ideas

bspwm

we should be able to use something like

bspc wm -d | jq .monitors.{{SOMETHING}}

qtile

we should be able to use qtile shell but, as i'm not on qtile these days, i did not try this idea :thinking:

amtoine commented 1 year ago

actually, thanks to the Command Syntax Rewrite page of the wiki of bspwm, i think i found it

bspc query --desktops --desktop --names