Release Pandora config tray icon


slaeshjag

¯\_(ツ)_/¯
Joined
Apr 8, 2010
Messages
2,687
Location
~Stockholm, Sweden
cfgbtn.png



A small tray icon that lets you set bluetooth, WiFi, USB host status and change the CPU speed. I was unable to get CPU-speed and usb-host toggling working as a regular user, so for now, you'll need to enter your password.


In its final release, it probably won't be a PND, as EvilDragon expressed interest in bundling it with the stock OS.


Plugins are dynamically loaded. If you want to make a plugin, use the header in include/ from this repo.


Afaik, all plugins *should* work, apart from the icons (I'm too lazy to find suitable icons, I'll leave that to whoever finds them needed,) but that's why I release it for beta test :p


»» Download ««
 
Last edited by a moderator:
cpu speed should work with 'sudo -n /usr/pandora/scripts/op_cpuspeed.sh <number>', for usb-host, somebody needs to write a script and add it to sudoers.
 
Since this is already in C, why not just make the parts of those scripts as C executable with setuid bit. Would save swinging that sudo around everywhere, making the pandora scripts more tidier and use less code duplication as well + you would have all the pandoara related privilidged stuff in one place.


Infact I have done this already, but it's not really cherry on top as it still just runs the shell scripts instead of doing the dirty parts on C code.


eg. pandora-ctl stop wifi, to unload the wifi modules


The current source for it would be here, but yeah future plans to make it not launch shell scripts / daemons is there..


And example of rfkill simulator using it, so some applications depending on rfkill can control the HW too..


Anyways, on-topic. This application looks useful indeed and would help saving space for pandora related stuff on that xfce4 panel.


Also the source is KISS enough, way to go there :)


One suggestion though would be adding some helper functions for plugins for most common tasks, like checking if module is loaded for example.
 
Last edited by a moderator:
Since this is already in C, why not just make the parts of those scripts as C executable with setuid bit.
Doesn't pass the "must be editable by ED" requirement, and if you just make it call shell scripts, there is not much point to have that at all IMO. Also I'm not sure if setuid bit won't be lost somewhere in it's copy path (git -> oe_work_root -> ubi image|sd_tar.bz2, user extraction to SD (for those that boot from SD) and maybe more). Also there are some programs already calling existing scripts with sudo.


Main problem is really that there is no one to fix up potential regressions this is going to make, lots of potential problems with very little benefit.
 
Last edited by a moderator:
Awesome!


Let me know when it's on a GIT so I can create a recipe for it :)


Just added the USB Host Toggle-Script, will be included in Beta 4.


/usr/pandora/scripts/op_usbhost.sh


Works the same way as op_wifi.sh: Switches the USB Host on and off.


EDIT: Aaaah, just saw you already have a GIT.


I'll try to include it :)
 
Last edited by a moderator:
It would be very nice to see this in the next OS update ;) All those Pandora-specific launchers/icons in XFCE are getting cumbersome (even when they don't include the USB toggle, yet, and here it is).
 
This kind of settings should also be handled in the new overlay menu by WizardStan.
 
Very cool indeed! With suitable icons, this will def rock!


This would be very very cool...


Have an option to toggle the status of each of the icons on the main tray ( ie have more icons placed beside the spanner icon ), eg I would show speed and current wifi connected, but not bluetooth.
 
It's entierly possible for them to share the same plugins as well, the plugins mearly provides a struct with label name and path to an icon.
 
Could you add $(LDFLAGS) to all plugin/Makefile targets?


OE sets some magic there and complains later if it's not built with it.
 
Last edited by a moderator:
Awesome, notaz fixed the recipe now and it's building :)


Won't make it into Beta 4 (released in half an hour), but I'll include it including some nice icons into Beta 5 :)
 
Okay, currently getting this ready for Beta 5.


It builds and works fine.


Got a few quick questions though:


* You mention in your instructions that I should send you absolut paths for the icons. So are these paths hardcoded into the system? Maybe a config files with links to the icons would be better (then everyone could change the icons). Or maybe hardcoded default icons with override via config possible?


* One of he most-wanted reasons: Since this now is a program in a tray and not just an icon, how about showing dynamically the current CPU-Speed and Wifi/BT/USB/TVOut-Status (using red and green LED symbols)? Would be a neat addition I think.
 
nicely done!


What about toggling nub settings, could that be part of this applet?
 
Back
Top