-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'network-public-ip' of https://github.com/ljseng/tmux-dr…
…acula into ljseng-network-public-ip
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# setting the locale, some users have issues with different locales, this forces the correct one | ||
export LC_ALL=en_US.UTF-8 | ||
|
||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
source $current_dir/utils.sh | ||
|
||
main() { | ||
IP_SERVER="ifconfig.me" | ||
ip=$(curl -s "$IP_SERVER") | ||
|
||
IP_LABEL=$(get_tmux_option "@dracula-network-public-ip-label" "") | ||
echo "$IP_LABEL $ip" | ||
} | ||
|
||
# run the main driver | ||
main |