From c176f1a30a2810ef2c06e1f1265b176037211afe Mon Sep 17 00:00:00 2001 From: Dane Williams Date: Sun, 15 Mar 2020 16:13:08 -0700 Subject: [PATCH] sdfsd --- dracula.tmux | 7 +++++-- network.sh | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dracula.tmux b/dracula.tmux index 914ee25..82ee620 100755 --- a/dracula.tmux +++ b/dracula.tmux @@ -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 & } diff --git a/network.sh b/network.sh index 4bd9d1c..0076f86 100755 --- a/network.sh +++ b/network.sh @@ -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 }