dotfiles/home/bin/i3-polybar

25 lines
503 B
Bash
Executable File

#!/bin/bash
killall -9 polybar
if [[ $DESKTOP_SESSION == "i3" ]]; then
WINDOW_MODULE="internal/i3"
WS_LABEL="%name%"
else
WINDOW_MODULE="internal/bspwm"
WS_LABEL="%icon%"
fi;
export WINDOW_MODULE
export WS_LABEL
# Check if we're docked in
export BAR_PA_SINK=$(pactl info |grep -oP "^Default Sink: \K.*")
if [[ $HOSTNAME == "zog"* ]]; then
export BAR_ETH_INTERFACE=eno1
export BAR_MODULES="mpd volume memory eth temperature date"
polybar secondary &
fi;
polybar bascht &