More configuration

Notably polybar
This commit is contained in:
Vincent Bernat 2021-07-04 18:25:28 +02:00
parent f306d92a0d
commit 662db00e36
8 changed files with 204 additions and 25 deletions

14
bin/polybar Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
export LAN=$(nmcli -t device | awk -F: '($2 == "ethernet") {print $1; exit}')
export WLAN=$(nmcli -t device | awk -F: '($2 == "wifi") {print $1; exit}')
export DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
export HEIGHT=$((20 * DPI / 96))
MONITOR=$(polybar --list-monitors | awk -F: '($0 ~ /primary/) {print $1; exit}') \
polybar --reload primary &
for MONITOR in $(polybar --list-monitors | awk -F: '($0 !~ /primary/) {print $1}'); do
export MONITOR
polybar --reload secondary &
done
wait