diff --git a/bin/statusbar b/bin/statusbar index 9d0ac06..6552586 100755 --- a/bin/statusbar +++ b/bin/statusbar @@ -24,7 +24,8 @@ case "$BSTATE" in ;; esac -SSHDSTATUS=$(systemctl is-active ssh) +SSHD=$(systemctl list-unit-files|egrep ^sshd?.service|awk '{print $1}') +SSHDSTATUS=$(systemctl is-active $SSHD) if [[ $SSHDSTATUS == "active" ]]; then SSHWARN="🐧" @@ -39,10 +40,10 @@ else RBT="" fi -source $HOME/.config/sway/displays.sh # swaymsg -t get_outputs # LAPTOP="eDP-1" # EXTERNAL="HDMI-A-1" +source $HOME/.config/sway/displays.sh LAPSTAT=$(swaymsg -t get_outputs -r|jq --arg DISP "$LAPTOP" '.[] | select(.name==$DISP) | .active') if [[ $LAPSTAT == "true" ]]; then