Created
August 26, 2023 22:00
-
-
Save k5njm/b50a25279a2b2623264d7a2690c95c13 to your computer and use it in GitHub Desktop.
Beepy tmux WiFi status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nick@beepy:~ $ cat .tmux.conf | |
#set -g monitor-silence 5 | |
#set-hook alert-silence 'run-shell "echo hello"' | |
set-option -g status-interval 15 | |
set-option -g status-right "#(~/bin/wifi_status.sh) " | |
set-option -ag status-right "#(~/repos/beepy-battery/src/battery.sh ) " | |
set-option -ag status-right "#(vcgencmd measure_temp | cut -c6-9 )C" | |
nick@beepy:~ $ cat bin/wifi_status.sh | |
#! /bin/bash | |
wifi="$(ip a | grep wlan0 | grep inet | wc -l)" | |
ssid="$(iwgetid -r)" | |
if [ $wifi = 1 ] || [ $wifi = 2 ]; then | |
echo "$ssid↑" | |
else | |
echo "$ssid↓" | |
fi | |
# Looks like this | |
# mynetwork↑ 35% 47.2C |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment