Re: OT: simplest way to display on-screen blinking colored indicator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 16 Apr 2020 14:54:29 -0000 "Doug Herr" <fedoraproject.org@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux