mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-04 10:14:34 +02:00
polybar: generate mountpoints automatically
This commit is contained in:
parent
0e76f2c3ad
commit
cb9e692c8d
2 changed files with 6 additions and 8 deletions
|
@ -7,6 +7,9 @@ MONITORS=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+*]*(
|
|||
PRIMARY=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+]?[*]([^ ]*).*/\2/p')
|
||||
PRIMARY=${PRIMARY:-${MONITORS%% *}}
|
||||
|
||||
awk 'BEGIN { i=0 } ($4 == "/" && $3 !~ /^0:/) {print "mount-"i" = "$5; i++}' /proc/self/mountinfo \
|
||||
> $XDG_RUNTIME_DIR/i3/polybar-filesystems.conf
|
||||
|
||||
case $(echo $MONITORS | wc -w) in
|
||||
1)
|
||||
MONITOR=$PRIMARY polybar --reload alone &
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue