1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

i3b/iface: add clipboard insertion of IPs on click

This commit is contained in:
Joe Groocock 2018-03-29 11:53:27 +01:00
parent c8eb0184f0
commit 29d4bbae7b
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

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