From 60a6fb3cfa5e9495093c78a73bca1f669d157c06 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Mon, 11 Oct 2021 10:23:16 -0700 Subject: [PATCH] tweak sshd status --- bin/statusbar | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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