nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
This commit is contained in:
parent
550eed06e0
commit
ee178b7d57
190 changed files with 5 additions and 6 deletions
28
unprocessed/config/polybar/launch.sh
Executable file
28
unprocessed/config/polybar/launch.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Getting some vars
|
||||
primary=$(xrandr | grep primary | head -1 | cut -d' ' -f1)
|
||||
export ethI=$(/bin/ls /sys/class/net/ | grep ^enp* | head -1)
|
||||
export wlanI=$(/bin/ls /sys/class/net/ | grep ^wl* | head -1)
|
||||
|
||||
# Launch bar for each display
|
||||
polybar -m | cut -d':' -f1 | while read display
|
||||
do
|
||||
export display=$display
|
||||
if [ "$display" == "$primary" ]
|
||||
then
|
||||
bar="primary"
|
||||
else
|
||||
bar="secondary"
|
||||
fi
|
||||
polybar -q $bar -c ~/.config/polybar/config.ini &
|
||||
done
|
||||
|
||||
echo "Bars launched..."
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue