copy vpn ip when clicking on its icon in xfce taskbar

relies on xclip , updated tooltip to quickly give usage of the feature.

I'm doing the OSCP and I need to copy my vpn ip every 5 minutes, 
I think it would be useful to other pentesters.
This commit is contained in:
Lucas Parsy 2024-02-01 10:56:49 +00:00
parent 9b3a90836f
commit d78bca234a

View File

@ -6,8 +6,13 @@ ip="$(ip a s "${interface}" 2>/dev/null \
if [ "${ip}" != "" ]; then
printf "<icon>network-vpn-symbolic</icon>"
printf "<iconclick>bash -c 'printf ${ip} | xclip -selection clipboard'</iconclick>"
printf "<txt>${ip}</txt>"
printf "<tool>VPN IP</tool>"
if command -v xclip; then
printf "<tool>VPN IP (click icon to copy)</tool>"
else
printf "<tool>VPN IP (install xclip to copy to clipboard)</tool>"
fi
else
printf "<txt></txt>"
fi