diff --git a/.config/i3/blocks/iface b/.config/i3/blocks/iface index 4b49830..f597580 100755 --- a/.config/i3/blocks/iface +++ b/.config/i3/blocks/iface @@ -51,6 +51,10 @@ LOCIP=$(ip addr show $IF | perl -n -e "/$AF ([^\/]+).* scope global/ && print \$ #------------------------------------------------------------------------ case $BLOCK_BUTTON in - 1) curl -s https://api.ipify.org;; - *) echo "$LOCIP";; + 1) curl -s https://api.ipify.org; + break;; + 2) curl -s https://api.ipify.org | tee >(xclip -i); + break;; + *) echo "$LOCIP" | tee >(xclip -i); + break;; esac