diff options
Diffstat (limited to 'i3/blocks/ip-address')
-rwxr-xr-x | i3/blocks/ip-address | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/i3/blocks/ip-address b/i3/blocks/ip-address new file mode 100755 index 0000000..d91ab56 --- /dev/null +++ b/i3/blocks/ip-address @@ -0,0 +1,9 @@ +#!/bin/bash + +IP_ADDRESS=$(ip route get 1 | awk '{print $NF;exit}') + +if [[ "${IP_ADDRESS}" != "" ]]; then + echo "${IP_ADDRESS}" + echo "${IP_ADDRESS}" + echo "" +fi
\ No newline at end of file |