mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2025-02-07 04:54:18 -05:00
21 lines
559 B
Bash
Executable File
21 lines
559 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
WM=$(wmctrl -m | grep Name | cut -d: -f2)
|
|
WM=${WM//[[:space:]]/}
|
|
|
|
if [ "$WM" == "i3" ]; then
|
|
if ! command -v polybar &>/dev/null; then
|
|
echo "polybar could not be found"
|
|
else
|
|
if ! pgrep -x "polybar" >/dev/null; then
|
|
if ! test -f "$HOME/.config/polybar/launch.sh"; then
|
|
echo "$HOME/.config/polybar/launch.sh could not be found"
|
|
else
|
|
sh $HOME/.config/polybar/launch.sh
|
|
fi
|
|
else
|
|
echo "polybar already Running"
|
|
fi
|
|
fi
|
|
fi
|