On Thu, 16 Apr 2020 14:54:29 -0000 "Doug Herr" <fedoraproject....@wombatz.com> 
wrote:

> > On Thu, 16 Apr 2020 21:54:37 +0800 Ed Greshko <ed.greshko(a)greshko.com&gt; 
> > wrote:
> >
> >
> > 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).
>
> In Xfce I change a panel icon depending on a condition with the script below. 
> I created an icon for my script and then I created the alternate version by 
> hand and the script swaps them. this updates right away. Not flashing but 
> maybe you can use an animated gif for icons, not sure...
>
> #!/bin/sh
>
> test=`grep -l 111.72.252.91 /etc/hosts`
> if [ "$test" == "/etc/hosts" ];then
>       # Ad blocking seems to be on right now:
>       rm /home/doug/Desktop/Adblock\ On.desktop
>       cp -a /home/doug/bin/Adblock\ Off.desktop /home/doug/Desktop
>       echo -n "" > /etc/hosts
>       cp /etc/hosts.normal /etc/hosts
> else
>       # Ad blocking seems to be off right now:
>       rm /home/doug/Desktop/Adblock\ Off.desktop
>       cp -a /home/doug/bin/Adblock\ On.desktop /home/doug/Desktop
>       echo -n "" > /etc/hosts
>       cp /etc/hosts.normal /etc/hosts
>       cat /etc/hosts.adblocking >> /etc/hosts
> fi

Thanks, is the icon called On.desktop/Off.desktop in your example?

Can I get something like this on to my screen? I use openbox window manager and 
no DE but that is likely irrelevant.

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

Reply via email to