mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-16 03:40:57 +01:00
polybar: Get host width from bspc
Although width can also be found through xrandr, it felt a bit messy to parse output that wasn't meant to be parsed by other programs. Since I can guarantee that the user will have bspwm (and not xrandr) installed, I decided to use bspc instead. The current setup only works for one monitor, but it should be relatively painless to setup multiple monitors in the future (assuming they share the same dpi).
This commit is contained in:
parent
22a4e548d1
commit
14fa7d6c52
@ -16,7 +16,7 @@ if [ -z "$1" ]; then bspc_config 0 4 0; exit; fi
|
||||
|
||||
# Set defaults
|
||||
POLYBAR_HEIGHT=80
|
||||
HOST_WIDTH=3840
|
||||
HOST_WIDTH=$(bspc query -T -m | jq '.rectangle.width')
|
||||
|
||||
# Make the bar float
|
||||
if [ "$1" == "float" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user