summaryrefslogtreecommitdiff
path: root/.local/bin/statusbar/bar-ipv4
blob: 4e51eca6200c7914aa166dfba037ac04e752747b (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

case $BUTTON in
	1)notify-send --expire-time=60000 "IP Addresses" "$(ip a | awk '/\/24|\/64/ {if($5=="temporary")print $2 " " $5;else print $2;}')";;
	3)urxvt -e ~/.local/bin/statusbar/ipv4
esac
ip a | awk '/\/24/ { print $2 }' | cut -d '/' -f 1