On Thu, 16 Apr 2020 21:54:37 +0800 Ed Greshko <ed.gres...@greshko.com> wrote:
> On 2020-04-16 21:41, Ranjan Maitra wrote: > > Dear friends, > > > > Sorry, this is OT but I thought that some of you might have suggestions. > > > > I want to have an on-screen indicator in the form of a icon or something > > that is blinking red if vpn is disconnected and steady green if vpn is up. > > Could also be extended to other features but right now let us go with this. > > > > The reason I need this is because the Cisco icon (that I need for VPN > > because of required third-party 2FA) is very tiny and almost impossible to > > see. It is time-consuming and distracting to constantly have to hover over > > the icon to see whether it says Connected and Disconnected. > > > > So, I am thinking of a small script that will check every second (say) if > > VPN is on or off and then display accordingly. The script part, I think I > > can write on my own. It is what th script will do/call that i am having > > trouble with. So any suggestions as to what I could do. > > > > Now, I am aware that I can perhaps get something like conky to be set up > > for this, but I was hoping to have something far simpler. But I do not > > quite know how to do the simple display part. > > > > My apologies again that this has nothing to do with Fedora, but I come as a > > proud and happy user of its 31 editions. > > > > Many thanks and best wishes, > > US-East is a OpenVPN connection of mine. > > When the VPN is disconnected > > [egreshko@meimei ~]$ nmcli connection show --active | grep US-East | echo $? > 1 > > When the VPN is connected > > [egreshko@meimei ~]$ nmcli connection show --active | grep US-East | echo $? > 0 > > Is that the sort of thing you're looking for? Thanks, yours is the script part. I am looking to feed this into an indicator which will blink red when 1 (in your case) and be steady green when 0 (in your example). Many thanks again for any suggestions, Ranjan _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org