tweak sshd status

This commit is contained in:
Morgan McMillian 2021-10-11 10:23:16 -07:00
parent de3eaea7e3
commit 60a6fb3cfa

View file

@ -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