This commit is contained in:
Dane Williams 2020-03-15 16:13:08 -07:00
parent bcd74c50c4
commit c176f1a30a
2 changed files with 9 additions and 6 deletions

View file

@ -20,6 +20,9 @@ main()
pink='#ff79c6'
yellow='#f1fa8c'
# start weather script in background
./sleep_weather.sh &
# set refresh interval
tmux set-option -g status-interval 1
@ -43,7 +46,7 @@ main()
tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ☺ "
tmux set-option -g status-right "#[fg=${dark_gray},bg=${pink}] #(~/.tmux/plugins/tmux-dracula/battery.sh) "
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${cyan}] #(~/.tmux/plugins/tmux-dracula/network.sh) "
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${cyan}]#(~/Documents/GitRepos/tmux-dracula/network.sh) "
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${orange}] #(cat ~/.tmux/plugins/tmux-dracula/weather.txt) "
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %I:%M %p #(date +%Z) "
@ -52,7 +55,7 @@ main()
tmux set-window-option -g window-status-format "#[fg=${white}]#[bg=${gray}] #I #W "
# run weather update script in background
./sleep_weather.sh &
#./sleep_weather.sh &
}

View file

@ -7,10 +7,10 @@
get_ssid()
{
if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 &> /dev/null
echo $(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)
if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 &> /dev/null; then
echo "$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)"
else
echo 'Ethernet'
echo ' Ethernet'
fi
}
@ -19,7 +19,7 @@ main()
if ping -q -c 1 -W 1 google.com &>/dev/null; then
echo "$(get_ssid)"
else
echo 'Offline'
echo ' Offline'
fi
}