[2008.09][FSO] Programming interface to wifi Icon

Arigead captain.deadly at gmail.com
Wed Oct 1 15:39:08 CEST 2008


Alastair Johnson wrote:
> Matthias Apitz wrote:
>   
>> El día Wednesday, October 01, 2008 a las 08:30:00AM +0100, Arigead escribió:
>>
>>     
>>> Matthias Apitz wrote:
>>>       
>>>> El día Tuesday, September 30, 2008 a las 02:38:51PM +0100, Arigead escribió:
>>>>
>>>>   
>>>>         
>>>>> Hello all,
>>>>>     Want to play with the wifi icon on the FR either in [2008.09] or 
>>>>> [FSO] Perhaps [FSO] makes more sense in the long run.
>>>>>
>>>>> Anyhow can I from a C Program set the icon? And can I have a call back 
>>>>> so that Icon being pressed issues a DBUS message?
>>>>>     
>>>>>           
>>>> If you create a file like this:
>>>>
>>>> root at om-gta02:/usr/share/applications# cat Wifi-up.desktop 
>>>> [Desktop Entry]
>>>> Encoding=UTF-8
>>>> Name=Wifi-up
>>>> Comment=Bring Wifi up with ifup eth0
>>>> Exec=xterm -e "ifdown eth0 ; iwconfig eth0 txpower auto channel 1 ; killall wpa_supplicant ; killall udhcp ; ifup eth0 ; sleep 20"
>>>> Icon=wifi
>>>> Terminal=false
>>>> Type=Application
>>>> Categories=Application;Utilities;
>>>> SingleInstance=true
>>>> StartupNotify=true
>>>>
>>>> the icon will appear and of course you have an action Exec=...
>>>>
>>>> 	matthias
>>>>
>>>>   
>>>>         
>>> Thanks for that Matthias but you misunderstand me. At present the wifi 
>>> icon, as far as I know, is plain white. I'd like to have three different 
>>> Icons for the wifi one Red, one Orange/Amber and one Green (Traffic 
>>> Lights). I'd like to create a daemon in C which every so often did a wee 
>>> wifi scan to see what networks are out there. If no know wifi SSIDs are 
>>> available then the icon is red.
>>>       
>> 	...
>>
>> I think I understood you already in your first post very well; you can
>> change the color or the image of a given icon just be rewriting (from C
>> or shell) the corresponding desktop file and let it point to another
>> icon with
>>
>> Icon=wifiRed
>>
>> or 
>>
>> Icon=wifiAmber
>>
>> ... ofc the files 'wifiAmber.png' must exist in /usr/share/pixmaps
>>     
>
> The .desktop file will put an icon in the application launcher. I think 
> the parent is talking about the wifi icon in the illume bar at the top 
> of the screen which is somewhat different.
Sorry Yes I would like to use the Icon on the top of the illume bar. I 
was thinking interfacing this to my daemon so regardless of app you can 
see the wifi status the same as you can see the GSM status at present.

If anybody knows about "somewhat different" :-) Would this presently be 
set by Kernel code the Window Manager?




More information about the community mailing list