Queen BeeCon Widget
(→Parameter Substitution at Command/Script Runtime) |
(→Now-Brewing) |
||
Line 551: | Line 551: | ||
= Now-Brewing = | = Now-Brewing = | ||
+ | '''queen-beecon (0.1.9.5)''' | ||
+ | * New: Added supplementary progress images/icons (cycle is "queen-beecon-progress[0-3].png") searching logic in directory storage in this order 1) "~/Mydocs/.images/queen_beecon_dir" 2) "~/.queen_beecon_dir" | ||
+ | * New: Implementation of following DBUS methods: get_current_results_text (Get current content of results text) | ||
+ | * New: Parameter Variables substitution for using with scripts which holds the current content of results text ($QBW_CURRENT_RESULTS_TEXT=Current content of results text) | ||
+ | * Changed: Changed Warning and Information notification in Advanced Settings to display hildon_banner* | ||
+ | * Bugfixing: Changed and fixed logic for handling/displaying Exit Code if error spawning asynchronous command | ||
+ | * Bugfixing: New asynchronous execution logic was not releasing file handles. Fixed | ||
---- | ---- | ||
Revision as of 16:40, 21 June 2010
Queen BeeCon Widget (See Talk Thread) is a highly customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for Maemo 5 Fremantle and the N900.
The Widget is based on the execution of external Shell/OS Commands which can be either as simple as one-liner statements or as complex as articulated shell scripts, which, for example, fetch, parse and aggregate contents retreived from the system, other applications or the Internet.
There are two basic Widget types, Beecons and Snippets:
Beecons are small hexagonal cells whose background color or associated image/icon changes according to the executed Command Exit Status.
Beecons can handle virtually unlimited Command Exit Status:
- <0 Normally notifying system errors in esecuting the script/command
- 0 Returned when script/command successfully completes
- 1 Used to report a warning condition
- 2 If script/command needs to notify some application error conditions
- <=126 Other exit status which can be handled for displaying user defined icons/images
Snippets are normal text/graphic boxes with fixed background color and images which is not influenced by the executed Command Exit Status.
Current Status in Maemo Repositories
(v0.1.9.4 extras-devel / v0.1.4 extras-testing / v0.1.4 EXTRAs on 26/4/2010)
Features List
- Widget can be multi-instantiated, disabled and minimized on desktop (click on minimized icon on desktop will wakeup and maximize instance)
- Possibility to define multiple commands and command labels to be displayed inside the Widget
- Different types of Widget layouts and behaviours (currently Beecons and Snippets)
- Possibility to hide the background Canvas both for Beecons and Snippets
- Possibility to use icons/images instead of text both for Beecons/Snippets command title and output (with high positioning, zooming/scaling 5%-200%-FitToWidget versatility) ;)
- It is possible to independently show or hide both snippet's images/texts and beecon images/texts. This way you can have two images and two text placeholders on widget, for more flexibility in graphic layout
- Independent images/icons for Command Exit Statuses >=3 can also been specified. The display of this extended statuses is driven by Command Exit Status. Useful, for example, for displaying different icons according to percentages values returned by command.
- Possibility to use different icons/images for Beecon's status output instead of just specific background color (Ex. 0=green led, 1=yellow led, 2=red led) (with high positioning versatility) ;)
- Nice gummy "button-press"-like visual feedback using Gradient fill
- Widget relies also on a private general purpose directories "~/.queen_beecon_dir/" & "..../MyDocs/.images/queen_beecon_dir/" as images/icons/etc. immediate storage. For easier population via USB of BLUETOOTH File Services.
- Widget texts can be formatted through Pango Markup Language
- Widget Size can be customized (Width: 10-800, Height: 10-420) and position can be fine tuned (X,Y +/- 5pix); Tweaking /usr/share/hildon-desktop/transitions.ini may also help. (snap_grid_size = 1 & snap_to_grid_while_move = 1)
- Background color for Beecons can be customized for each 4 Command Exit Statuses
- Background color for Snippets can be customized
- Font Color of both command label and results can be configured
- Position and Visibility of both command label and results can be configured (Hidden, Top L, Top C, Top R, Center L, Center, Center R, Bottom L, Bottom C, Bottom R)
- Font Face of both command label and results can be configured (Nokia Sans, NewCourier, NewTimes, Monospace, Nokia Sans Cn, Nokia Sans Maps, Nokia Sans SemiBold, Sans, Serif, SwissA, Tanseek Pro Arabic, Univers OTS Arabic)
- Font Style of both command label and results can be configured (Regular, Italic, Bold, Italic Bold)
- Text Justification of both command label and results can be configured (Left, Center, Right, Fill)
- Font Size of both command label and results can be configured (8->48)
- Command execution can be triggered optionally on widget startup, by manual pressing on Widget, by desktop switching, by periodic updates (0=Manual, 30s, 1m, 5m, 30m, 1h, 6h, 12h, 1d)
- Command execution can be subject to network connection status.
- Tool includes a powerful Advanced Maintenance Dialog Box for command development and testing (TestDrive mode to display raw output of predefined or user-defined commands)
- Advanced Maintenance Dialog Box includes extended functionalities like: instance export/import w/ checksum, command export/import w/ checksum, command update with current Test Drive buffer, clipboard operations, export/import to/from files for instance data and commands.
- A set of basic Images/Icons for Snippets and Beecon Statuses is included inside the distribution package and installed inside canonical hildon hicolor 48x48 directory
- Inter Process Communication mechanism among QBW instances and with other Applications has been implemented through DBUS methods and signals handling
- It is integrated into the N900 system backup/restore features according to standard specifications as better described in SDK Using Backup Application
- For Web and Proxy related issue please have a look to THIS post.
Icons in Package
Settings and Tools
Standard Settings and Configuration File
Global and per-instance QBW parameters are stored in this file:
/home/user/.queen_beecon
Configuration Parameters, Types & Reference
These are the parameters stored inside the configuration file for each Instance.
Their reference is also useful for Interaction with QBW over DBUS and in particular for parameters amendments/fetching methods:
Release | Parameter | Type | Possible Values | Description |
---|---|---|---|---|
0.0.1 | widgetType | int32 | 0=Beecon|1=Snippet | Specify the type of the instantiated widget |
0.1.7 | widgetVisible | int32 | 0=Hidden|1=Visible | Specify if widget components should be visible or not |
0.1.4 | operationalStatus | int32 | 0=Enabled|1=Disabled | If disabled, the widget will not be subject to update policies and will be iconified on desktop, a subsequent tap on it will revert its status to Enabled |
0.1.0 | hideCanvas | boolean | true|false | If set to true, the geometric canvas of the widget will not be shown |
0.1.0 | snippetBgRGB | int32 | - | - |
0.1.9.1 | snippetExtBgRGB | string | - | - |
0.1.0 | beecon_lt0_ImgFilename | string | - | - |
0.1.4 | beecon_lt0_ImgZoom | int32 | - | - |
0.1.0 | beecon_lt0_BgRGB | int32 | - | - |
0.1.9.1 | beecon_lt0_ExtBgRGB | string | - | - |
0.1.0 | beecon_eq0_ImgFilename | string | - | - |
0.1.4 | beecon_eq0_ImgZoom | int32 | - | - |
0.1.0 | beecon_eq0_BgRGB | int32 | - | - |
0.1.9.1 | beecon_eq0_ExtBgRGB | string | - | - |
0.1.0 | beecon_eq1_ImgFilename | string | - | - |
0.1.4 | beecon_eq1_ImgZoom | int32 | - | - |
0.1.0 | beecon_eq1_BgRGB | int32 | - | - |
0.1.9.1 | beecon_eq1_ExtBgRGB | string | - | - |
0.1.0 | beecon_ge2_ImgFilename | string | - | - |
0.1.4 | beecon_ge2_ImgZoom | int32 | - | - |
0.1.0 | beecon_ge2_BgRGB | int32 | - | - |
0.1.9.1 | beecon_ge2_ExtBgRGB | string | - | - |
0.1.0 | beecon_idxge2_ImgFilename | string | - | - |
0.1.4 | beecon_idxge2_ImgZoom | int32 | - | - |
0.1.0 | beecon_idxge2_BgRGB | int32 | - | - |
0.1.9.1 | beecon_idxge2_ExtBgRGB | string | - | - |
0.0.1 | widWidth | double | - | - |
0.0.1 | widHeight | double | - | - |
0.1.0 | cmdImgFilename | string | - | - |
0.1.4 | cmdImgZoom | int32 | - | - |
0.1.0 | cmdFgRGB | int32 | - | - |
0.1.9.1 | cmdExtFgRGB | string | - | - |
0.1.9.1 | cmdTextAngle | uint32 | - | - |
0.1.3 | cmdVisibilityPosition | int32 | - | - |
0.1.3 | cmdImgVisibilityPosition | int32 | - | - |
0.1.0 | cmdJustify | int32 | - | - |
0.1.9 | cmdExtFont | string | [<family>] [italic] [bold] [<size>] | Font string specification for Command label (Ex. Nokia Sans Italic Bold 12) |
0.1.0 | cmdFontName | int32 | - | - |
0.1.0 | cmdFontSize | double | - | - |
0.1.0 | resImgFilename | string | - | - |
0.1.4 | resImgZoom | int32 | - | - |
0.1.0 | resFgRGB | int32 | - | - |
0.1.9.1 | resExtFgRGB | string | - | - |
0.1.9.1 | resTextAngle | uint32 | - | - |
0.1.3 | resVisibilityPosition | int32 | - | - |
0.1.3 | resImgVisibilityPosition | int32 | - | - |
0.1.0 | resJustify | int32 | - | - |
0.1.9 | resExtFont | string | [<family>] [italic] [bold] [<size>] | Font string specification for Results label (Ex. Nokia Sans Italic Bold 12) |
0.1.0 | resFontName | int32 | - | - |
0.1.0 | resFontSize | double | - | - |
0.0.1 | instanceTitle | string | - | - |
0.0.1 | instanceCmd | string | - | - |
0.1.0 | updOnStartup | boolean | - | - |
0.0.1 | updOnClick | boolean | - | - |
0.0.1 | updOnDesktop | boolean | - | - |
0.0.1 | delayIndex | uint32 | - | - |
0.1.9.2 | customIntervalSecs | uint32 | - | - |
0.0.1 | updNeworkPolicy | uint32 | - | - |
0.1.9.4 | updOnDBUS | uint32 | 0=Disabled|1=Enabled | - |
0.1.9.4 | updOnDBUSBus | uint32 | 0=SYSTEM|1=SESSION | - |
0.1.9.4 | updOnDBUSMatchRule | string | See Specifications | - |
Advanced Settings and Tools
Dialog can be reached via QBW Settings:
- Section A: (Command TestDrive)
- 1) This is the list of Stored Commands that you can Test Drive; upon entering the dialog box, [1] & [6] are initialized with current Instance command.
- 2) Use this button to Test Drive the command currently typed in [6]
- 3) This button will update current instance command with the content of [6] (use it when command is working and thoroughly tested)
- 4) Will copy to clipboard the command currently in [6]
- 5) Will paste the clipboard into [6]
- 6) Read-Write text field; this is the "command input buffer", it is used as extended Test Drive tool for troubleshooting commands with issues
- 7) Read-Only text field; will display the Exit Status & Raw Output of the command in [6] executed by pressing button [2]
- Section B: (Commands/Beecons Import/Export processing)
- 8) Button will export the command currently in [6]. Result of the export will be stored into [14] text buffer
- 9) Button will import the command currently in [14].
- 10) Will paste the clipboard into [14]
- 11) Will copy to clipboard the [14] text buffer
- 12) Will read from a file into [14]
- 13) Will write to a file the [14] text buffer
- 14) Button will import the Beecon/Snippet Instance Data currently in [14]; useful for restoring Beecons of for importing Beecons created by others.
- 15) Button will export the Beecon/Snippet Instance Data for the current instance. Result of the export will be stored into [14] text buffer; useful for backup of Beecons of for exporting Beecons to others.
- 16) Read-Write text field; used for temporarily processing export/import of commands and Beecon/Snippet Instance Data
Parameter Substitution at Command/Script Runtime
QBW can provide a set of specific parameters to the executing script/command. The script will have to identify the placeholders for this extra parameters as better specified in the following table:
Release | Placeholder | Substituted | Description |
---|---|---|---|
0.1.9.1 | $QBW_ID | <QBW Instance ID> | Retreives the QBW Instance ID and substitutes it into the run script |
0.1.9.1 | $QBW_EXEC_REASON | QBW_STARTUP_UPDATE | QBW instance is starting up and script run |
0.1.9.1 | $QBW_EXEC_REASON | QBW_SETTINGS_SAVE_RUN | Save and Run is pressed in Settings Dialog Box and script run |
0.1.9.1 | $QBW_EXEC_REASON | QBW_TEST_DRIVE | Script is run via Test Drive advanced dialog box |
0.1.9.1 | $QBW_EXEC_REASON | QBW_WAKEUP_CLICK | A disabled instance is waken up by a click on icon and script is run |
0.1.9.1 | $QBW_EXEC_REASON | QBW_CLICK | An instance is clicked and script is run |
0.1.9.1 | $QBW_EXEC_REASON | QBW_DESKTOP_SWITCH | The desktop, on which and instance is displayed, is switched/scrolled and script is run |
0.1.9.1 | $QBW_EXEC_REASON | QBW_CONNECTION_EVENT | A connection event takes place and script is run |
0.1.9.1 | $QBW_EXEC_REASON | QBW_DBUS_SET_PARAM_UPDATE | A set_param DBUS method is called and "update content" (script run) is explicitly required |
0.1.9.1 | $QBW_EXEC_REASON | QBW_DBUS_WAKEUP | A wakeup DBUS method is called and script is run |
0.1.9.1 | $QBW_EXEC_REASON | QBW_DBUS_UPDATE_CONTENT | "update content" DBUS method is called and script run is explicitly required |
0.1.9.1 | $QBW_EXEC_REASON | QBW_DBUS_EXEC | "exec" DBUS method is called and external script run is explicitly required |
0.1.9.4 | $QBW_EXEC_REASON | QBW_DBUS_MONITOR | Execution of script was triggered by DBUS Match Rules in DBUS Event Monitoring |
0.1.9.4 | $QBW_DBUS_VERBOSE_OUTPUT | signal|method call|method return|error|unknown sender=<sender> -> dest=<destination> path=<path> interface=<interface> member=<member>\n <type1> <param1>\n <type2> <param2>\n <typeX> <paramX> | Extended values returned by DBUS Monitor for Matched Rule. Example:signal sender=:1.31 -> dest=(null destination) path=/com/example/app/Signal; interface=com.example.app.Signal; member=Test
|
0.1.9.5 | $QBW_CURRENT_RESULTS_TEXT | <current content of results text> | Current content of results text even if label is hidden. Useful for holding and processing previous state conditions across command executions |
Timer Logic
bla, bla, bla!!!
System Backup/Restore Integration
As of release >=0.1.8 QBW is integrated into the N900 system backup/restore features according to standard specifications as better described in the SDK Using Backup Application
/etc/osso-backup/applications/queen-beecon.conf
file is:
<backup-configuration> <locations> <location type="file" category="settings">$HOME/.queen-beecon</location> <location type="dir" category="documents">$HOME/MyDocs/.images/queen_beecon_dir</location> <location type="dir" category="documents">$HOME/.queen_beecon_dir</location> </locations> </backup-configuration>
Interaction with QBW over DBUS
Overview
As of release >= 0.1.7 a new Inter Process Communication mechanism among QBW instances and with other Applications has been implemented.
Through the standard DBUS interface, both at the OS-shell and at different programming environments level, QBW instances can be controlled/accessed and mutual interaction can be guaranteed, thus allowing a set of extended functionalities like:
- Give impulse to other Beecons for content update
- Give impulse to other Beecons for layout update
- Give other Beecons one-shot alternative scripts to execute
- Remotely change QBW settings
- Retrieve other beecon's last executed commands exit status
- Provide to non graphical programs and daemons a suitable interface for displaying information on precustomized beecons on screen (for example Dbus Scripts for displaying events on the system/session DBUS like cell IDs changes, available WLANs and the like)
I encourage you to suggest possible enhancements or wishlists in this area and report them in the main TALK thread
QBW Instance ID
Queen Beecon Widget's Instance Id, needed for every reference in DBUS method calls, can be found at the very top of the Settings dialog box:
DBUS Specifications
QBW_DBUS_SERVICE ="oh.no.more.qbw" [Name of D-Bus service] QBW_DBUS_PATH ="/oh/no/more/qbw<idX>" [Name of Object Path] QBW_DBUS_IFACE ="oh.no.more.qbw" [Name of D-Bus interface]
- <idX> is the QBW Instance ID
DBUS Methods & Parameters
QBW implements the following list of methods to trigger specific actions:
WARNING!!! Methods' Parameters are case-sensitive
Method | Input Params | Returns | Description |
---|---|---|---|
dbus_method_monitor | string:'on|off' | Toggle on-screen yellow notification message of incoming DBUS method requests for destination Instance (for debug purposes). Default=OFF | |
reset_rearm_timer | Reset and rearm timer for periodically auto-updating QBW, needed to be explicitly called if parameter delayIndex has been changed via DBUS set_param_uint32 method
| ||
show | Give show impulse to a QBW | ||
hide | Give hide impulse to a QBW | ||
wakeup | Give wake up impulse to a QBW and update content and layout | ||
sleep | Give sleep/disable/minimize impulse to a QBW | ||
update_content | Give impulse to a QBW for content update | ||
update_layout | Give impulse to a QBW for layout update | ||
exec | string:'<command|script>' | Give other QBWs one-shot alternative scripts/commands to execute and update content accordingly | |
set_param_string | string:'<param name>' string:'<new value>' string:''|'update_content'|'update_layout' | Change and store QBW settings parameter of type string | |
set_param_int32 | string:'<param name>' int32:'<new value>' string:''|'update_content'|'update_layout' | Change and store QBW settings parameter of type int | |
set_param_uint32 | string:'<param name>' uint32:'<new value>' string:''|'update_content'|'update_layout' | Change and store QBW settings parameter of type uint | |
set_param_double | string:'<param name>' double:'<new value>' string:''|'update_content'|'update_layout' | Change and store QBW settings parameter of type double | |
set_param_boolean | string:'<param name>' boolean:'<new value>' string:''|'update_content'|'update_layout' | Change and store QBW settings parameter of type boolean | |
get_param | string:'<param name>' | string:'value' | Get QBW settings parameter |
get_current_results_text | string:'value' | Get current content of results text | |
set_position | int32:'<X-coord>' int32:'<Y-coord>' | Set QBW position on desktop | |
get_position | int32:'<X-coord>' int32:'<Y-coord>' | Get QBW position on desktop | |
get_exit_status | int32:'<ExitStatus>' | Retrieve other QBW's last executed commands exit status |
DBUS Signals & Parameters
QBW issues the following list of signals to notify the "world" about predefined conditions and events. They will be emitted on the bus according to the following specifications:
PATH ="/oh/no/more/qbw<idX>" INTERFACE ="oh.no.more.qbw" MEMBER ="<signal name>" [Signal column in below list] PARAMETERS ="<parameter>" [Broadcast column in below list]
- <idX> is the QBW Instance ID
Signal | Broadcasts | Description |
---|---|---|
signal_content_update | int32:'<ExitStatus>' | Issued when QBW Instance <idX> executes and returns an exit status |
Interacting with QBW from the Shell
This is the template to use for calling the QBW instance methods:
- For methods which DO return values
run-standalone.sh dbus-send --session --print-reply --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw<idX> oh.no.more.qbw.<method> <type1>:"<param1>" <type2>:"<param2>" ... <typeN>:"<paramN>"
WARNING!!! Hildon-home is quite sensitive to long running commands inside Queen Beecon Widget. If you believe that the dbus-send command is going to take much time (say >2/3 secs) it is better if you add the --reply-timeout=<milliseconds>
to the dbus-send list of parameters
- For methods which DO NOT return values
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw<idX> oh.no.more.qbw.<method> <type1>:"<param1>" <type2>:"<param2>" ... <typeN>:"<paramN>"
Where:
- <idX> is the QBW Instance ID
- <method> is the Method to be called for the specific QBW Instance
- <typeX> & <paramX> are the parameter type and value as per the specific Method Synopsis
For example:
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.set_param_string string:"cmdImgFilename" string:"new_image_filename.png" string:"update_layout"
or
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.dbus_method_monitor string:'on'
or
run-standalone.sh dbus-send --session --print-reply --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.get_position
QBW DBUS Monitor and Interceptor
Overview
As of release >= 0.1.9.4 QBW is now able to monitor and intercept DBUS events (like signals, methods, errors) issued by the system or other applications. For example:
- Keyboard lock/unlock
- Slide open/close
- Bluetooth connections
- GSM cells change
- WIFI networks
- Battery & Charging status
- Changes in device orientation
- Incoming Calls
- Incoming SMS/IM
This events will then trigger the execution of a script which can be programmed to analyze and parse the intercepted event and perform actions accordingly.
The configuration is performed via the DBUS Event Monitoring section in Settings Dialog Box:
1) States if DBUS Monitoring is enabled or disabled for this QBW
2) Specify whether to monitor SYSTEM or SESSION BUS
3) Is the Match Rule as per this DBUS specifications
I encourage you to suggest possible enhancements or wishlists in this area and report them in the main TALK thread
Example
We will monitor the SYSTEM BUS with the following Match Rule:
type='signal',interface='com.example.app.Signal'
The cmd/script which will be executed when the event is intercepted is the following:
echo "$QBW_ID $QBW_EXEC_REASON"; echo '$QBW_DBUS_VERBOSE_OUTPUT'; exit 2
This is a simulation of the following sample DBUS command:
run-standalone.sh dbus-send --system --type=signal /com/example/app/Signal com.example.app.Signal.Test string:'Oh' string:'No!!!' string:'More QBWs!!!' boolean:true uint32:10000
And here's the output:
Known Issues
TBD
Bug Tracker/Reports
Release | Date | Priority | Status | Description | Notes |
---|---|---|---|---|---|
<=0.1.7 | 20100522 | low | Fixed >=0.1.8 DONE | The choice of Nokia Sans fonts are invalid as I it's "Nokia Sans" and not "Nokia, Sans"... | (quickfix using Pango Markup Language); However, even with standard font dialog, I couldn't see any difference between Sans and Nokia Sans ...; it seems like pure Sans is not there and the N900 falls back to Nokia Sans |
<=0.1.7 | 20100522 | high | Fixed >=0.1.8 DONE | My widgets aren't auto-updating periodically. |
Feature Requests
Release | Date | Priority | Status | Description | Notes |
---|---|---|---|---|---|
<=0.1.9.2 | 20100601 | low | Acknowledged >=0.1.9.3 Testing | Implementation of Asynchronous Non Hildon-Home blocking command execution + Icon Showing progress during execution | |
<=0.1.9 | 20100601 | low | Acknowledged >=0.1.9.2 Testing | Timeout in seconds wanted for periodic update, not just predefined list of values | Uhm ... expected same problems here for instances exported by newer releases and imported into older ones ... what to default to in that case?!?!?! |
<=0.1.9 | 20100601 | low | >=0.1.9.1 DONE | Parameter/Environment Variable substitution usable by script (Ex. Own Instance ID, Reason for updating content ... | Interesting, already had that in mind for passing own instance ID to script to be run (as per self-managing beecons through DBUS methods; Ex. dice rolling on screen and changing position/face when tapped) |
<=0.1.9 | 20100530 | low | >=0.1.9.1 DONE | Add possibility to rotate text inside labels | |
<=0.1.9 | 20100527 | low | Acknowledged >=0.1.9.4 Testing | Ability to execute scripts by intercepting specific DBUS broadcasted signals/methods issued by the system or other applications (Ex.keyboard lock, slide open/close, ecc.) | |
<=0.1.7 | 20100525 | low | >=0.1.8 DONE | Export from Buffer to File and Import from File to Buffer in Advanced Dialog Box | |
20100522 | low | DONE | Create a 'BeeCon' to display random images from Flickr's 'Most Interesting' pages | ||
<=0.1.7 | 20100522 | low | >=0.1.9 DONE | Request for replacing that font dialog with http://wiki.maemo.org/Hildon-Extras#HeFontDialog | |
<=0.1.7 | 20100522 | low | Acknowledged >=0.1.9.1 Testing | Request for replacing that color dialog with http://wiki.maemo.org/Hildon-Extras#HeFontDialog | |
<=0.1.7 | 20100522 | low | >=0.1.8 DONE | Usage of Back-up Application - Custom back-up locations |
Now-Brewing
queen-beecon (0.1.9.5)
- New: Added supplementary progress images/icons (cycle is "queen-beecon-progress[0-3].png") searching logic in directory storage in this order 1) "~/Mydocs/.images/queen_beecon_dir" 2) "~/.queen_beecon_dir"
- New: Implementation of following DBUS methods: get_current_results_text (Get current content of results text)
- New: Parameter Variables substitution for using with scripts which holds the current content of results text ($QBW_CURRENT_RESULTS_TEXT=Current content of results text)
- Changed: Changed Warning and Information notification in Advanced Settings to display hildon_banner*
- Bugfixing: Changed and fixed logic for handling/displaying Exit Code if error spawning asynchronous command
- Bugfixing: New asynchronous execution logic was not releasing file handles. Fixed
Change Log
queen-beecon (0.1.9.4)
- New: Ability to execute scripts by intercepting specific DBUS broadcasted signals/methods issued by the system or other applications + Relevant configuration parameters (Ex.keyboard lock, slide open/close, ecc.)
- New: Parameter Variables substitution for using with scripts triggered by intercepted DBUS broadcasted signals/methods ($QBW_EXEC_REASON=QBW_DBUS_MONITOR, $QBW_DBUS_VERBOSE_OUTPUT=Verbose Output see WIKI)
- Changed: Changed icons for displaying command execution in progress (shown when script in progress and hidden on execution completion)
- Changed: Package installation now performs an automatic restart of hildon-home process
- Bugfixing: Memory reallocation bugs fixed in new async command execution logic
queen-beecon (0.1.9.3)
- New: Added icon for displaying command execution in progress (shown when script in progress and hidden on execution completion)
- New: Implementation of Asynchronous Non Hildon-Home blocking command execution (Test Drive is still Synchronous for command timing evaluation purposes)
- Changed: -
- Bugfixing: Memory reallocation bugs fixed for all string values management in settigs dialog box
queen-beecon (0.1.9.2)
- New: Added custom timeout in seconds for periodic update, not just predefined list of values
- Changed: Restyle in settings configuration for Update Policies, Fonts & Colors Buttons
- Bugfixing:
queen-beecon (0.1.9.1)
- New: Parameter Variables substitution usable by script (Ex. Own Instance ID, Reason for updating content)
- New: Implementation of Command and Results text orientation angle (w/ relevant configuration parameters)
- New: New extended color dialog for background and foreground colors (Old color selection deprecated; backward compatibility for instances exported from previous releases is guaranteed and settings upgraded as necessary)
- Changed: Restyle in settings configuration for Beecon Command Exit Statuses area & Command Title/Results Settings area + changed color settings appearance
- Bugfixing: Disabled instance (icon) wasn't correctly drawn on startup; fixed
- Bugfixing: Memory deallocation bug for >=3 Exit Status image file beecon_idxge2_ImgFilename; fixed
queen-beecon (0.1.9)
- New: New extended font dialog for command and results labels (Old font selection deprecated; backward compatibility for instances exported from previous releases is guaranteed and settings upgraded as necessary)
- Changed: Due to new font settings implementation, exported instances from this release onward will have their fonts reset to command="Nokia Sans bold italic 12" results="Nokia Sans bold 12" when imported in previous releases
- Bugfixing: Some fixing and cleanup in package install/uninstall
queen-beecon (0.1.8-testonly-PR1.2)
- WARNING This release is for testing purposes only as PR1.2 upgrade brought some instabilities which need forensics!!!
- New: Implementation of DBUS methods: reset_rearm_timer
- New: QBW is now integrated into the N900 system backup/restore features according to standard specifications as better described in SDK "Using Backup Application" http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Generic_Platform_Components/Using_Backup_Application#Custom_back-up_locations
- Changed: Completely revised Timer logic and reset/re-arming for widget periodic auto-update
- Changed: Visual feedback when Beecons pressed; now rectangle gets drawn as well as cell (better chance of noticing feedback for canvas-less Beecons)
- Bugfixing: Fixed segmentation fault if dbus get_position method called and dbus_method_monitor turned on
queen-beecon (0.1.7-PR1.1.1)
- NOTE: Special Build for PR1.1.1
- New: Implementation of Widget Instance visibility toggle and configuration parameter (for showing or hiding the widget also via DBUS)
- New: Implementation of following DBUS methods: dbus_method_monitor, show, hide, wakeup, sleep, update_content, update_layout, exec, set_param_string, set_param_int32, set_param_uint32, set_param_double, set_param_boolean, get_param string, set_position, get_position, get_exit_status
- New: Implementation of following DBUS signals: sig_content_updated
- Changed: Enhanced DBUS implementation for Widget2Widget & System2Widget Inter Process Communication
- Changed: Changed default values for some Update Policies in new QBW instances (updOnStartup now defaults to FALSE; updOnDesktop now defaults to FALSE) to prevent bugged Beecons from freezing hildon-home even after restart
- Respect: To querty12@talk.maemo.org Many, many, many, many, many thanks for supporting QBW IPC implementation
queen-beecon (0.1.6)
- New: Simple DBUS implementation for Widget2Widget & System2Widget Inter Process Communication
- New: Added Widget Instance ID in Settings Dialog Title
- Changed: Compiled Vs. PR1.2
queen-beecon (0.1.5)
- Changed: Thanks "qwerty12" disabled automatic capitalization for all text entry fields
queen-beecon (0.1.4)
- New: Implementation of Widget Instance disabling and minimizing on desktop (click on minimized icon on desktop will wakeup and maximize instance)
- New: Implementation of image/icon scaling function for all images used (Zoom In/Out from 5% to 200% or Fit to Widget Width/Height)
- Bugfixing: In Advanced Maintenance Dialog Box several bugfixes for Import/Export commands and instances,
queen-beecon (0.1.3)
- New: Added possibility to show or hide both snippet's image/text and beecon image/text. This way you can have two images and two text placeholders on widget, for more flexibility in graphic layout
- New: Added supplementary images/icons directory storage "~/Mydocs/.images/queen_beecon_dir". If images/icons without path are not found here then they are searched in "~/.queen_beecon_dir". For easier population via USB of BLUETOOTH File Services.
- New: Added functions in Advanced Maintenance Dialog Box: instance export/import w/ checksum, command export/import w/ checksum, command update with current Test Drive buffer, clipboard operations
- New: Added some confirmation dialogs for critical operations and some notification messages
- New: Added possibility to use different images/icons for Command Exit Statuses >=3 . Basically the Exit Status value will be appended to a fixed image filename and relevant image will be loaded (ex. "queen-beecon-status.png.3" ... 4 ... 5 ...)
- New: Basic Images/Icons for Snippets and Beecon Statuses incorporated into .deb package and installed inside canonical hildon hicolor 48x48 directory
- Bugfixing: Fixed size and positioning of controls in Advanced Maintenance Dialog Box
- Bugfixing: Removed directory purge in "rmnobraco.sh" script
- Bugfixing: Checked and removed some memory leaks and resources deallocation (were causing hildon-home desktop to crash on instance disposal)
- Changed: Restyle and lots of optimization in Settings Dialog Box UI layout
- Changed: Widget's fill gradients when background is enabled
- Changed: Restyle in Advanced Maintenance Dialog Box interface, now more functional and user friendly
- Changed: When opening Advanced Maintenance Dialog Box, command in current instance is automatically copied to the TestDrive command text box
- Changed: Advanced Maintenance Dialog Box changed font to Monospace Bold for the three text views for inproved visibility
queen-beecon (0.1.2)
- New: Implemented Pango Markup Language support for both Command Title and Output Results text (Description HERE)
- New: Basic implementation of Advanced Maintenance Dialog Box (For future use like export/import ...)
- New: Advanced Maintenance Dialog Box: TestDrive mode (to display raw output of predefined or user-defined commands)
- Changed: Had to change description in debian "control" file (Testers Karma-- me for this)
- Changed: Changed logic in settings dialog box, now it doesn't redraw unless strictly necessary and just content and controls which need it. Also quicker transition to main settings when back from child dialog boxes.
queen-beecon (0.1.1)
- Changed: Visual feedback for widget pressure is now also provided for Canvas-less beecons and snippets (button down canvas is displayed when pressed)
- Changed: Changed default size for newly created instances (50px=>100px)
- Changed: Housekeeping for dead/disposed instances is now run on each instance initialization and on class termination (should be more accurate now)
- Bugfixing: Writing/Reading configuration file inconsistencies fixed
- Bugfixing: Correction in images (status/results/title) hide/show logic. If images displayed and then commented out, they kept showing! - FIXED
queen-beecon (0.1.0)
- WARNING! Architecture and readibility of code has been heavily revised for implementing the new functionalities...
- WARNING! Please bear with possible regressions and report bugs to the Maintainer
- New: Implemented the possibility to hide the background Canvas both for Beecons and Snippets
- New: Implemented the possibility to use different icons/images for Beecon's status output instead of just specific background color (Ex. 0=green led, 1=yellow led, 2=red led) (with high positioning versatility)
- New: Implemented the possibility to use icons/images instead of text both for Beecons/Snippets command title and output (with high positioning versatility)
- New: Implemented creation and management of private general purpose directory "~/.queen_beecon_dir" for widget (images/icons/etc.)
- New: Implemented "Update on widget Startup" option for every instance
- New: Implemented basic management/deletion of dead/disposed instances configurations data from config file
- New: Added button "Save & Run" settings dialog which saves settings and contextually triggers command execution
- Changed: Widget Layout is now nicer with better gummy "button-press" like visual feedback using Gradient fill
- Changed: Button Save in settings dialog does not trigger a command execution any more
- Changed: Now command do not get updated after getting back from settings dialog (even after "save"); relevant event only drives updates (manual, timer, desktop, network)
queen-beecon (0.0.3)
- Bugfixing for widget resize(dimensions) and positioning
- Bugfixing for general network related behaviours and content update, even after settings change
- Bugfixing for Command Edit and blank command selector after returning from command edit dialog
- Changed Exit Code output for command from !?0000xxxx to !?xxxx
- Changed Command Output is returned, if any, even if Exit Code less then 0
queen-beecon (0.0.2)
- First Extras-devel release
queen-beecon (0.0.1)
- Initial Basic Queen BeeCon Implementation
TODO list
- Bugfixing and Improving Stability
- Instance Import/Export optimization and simplification
HOW-TOs
Create a new Basic Instance of QBW
After you have installed QBW package, these are the steps to create and start customizing a new Instance of the widget.
- Tap on an empty area of the Desktop and gear icon for configuration will pop up in the upper right area of the screen
- Click on the "Add widget" button
- Scroll selector till you find "Queen Beecon Widget" and click on it
- A new instance of the widget will be created with very basic default configuration
- Now if you click on the Settings Wrench Icon you'll reach the Settins Dialog for customization
How and Where to store Icons and Images for your Beecons
If no PATH is specified in the Settings for Icons & Images, QBW will look in directories on the phone's internal memories in the following order:
- First, the directory accessible via Bluetooth/PC Suite/OVI Suite or USB (Storage Mode).
/home/user/MyDocs/.images/queen_beecon_dir/
- WARNING!!! When phone is connected via USB in Storage Mode this directory is not available to the Widget; so if you plan to use QBW when in Storage Mode use directory in "Second" point.
- Second, the directory:
/home/user/.queen_beecon_dir
- Third, the directory where QBW's Package Icons are stored:
/usr/share/icons/hicolor/48x48/hildon/
If you want to replace a partial/complete set of QBW's Package Icons just create Icons/Images with same name in directories "First" or "Second"
If specified image is not found, following icon will appear:
Create an Exit Status driven Multi Images Beecon
Naive Dice Roller is a good place to start looking for such implementation.
Scripts/Commands with long output
Some scripts/commands may create multiple lines which are too long to be displayed on a single line. The widget will not wrap these. In order to wrap them you can use the fold command:
command-that-produces-long-lines | fold -s -w 80
The 80 in that instance is the maximum length of the line, which you can change. The -s option makes fold word wrap with spaces. More information is available from the fold man page.
Backup all Widget Instances
Apply Export/Save/Backup Procedure for Beecon Instance Data for every Widget Instance you want to Backup
Save content (Beecons' Images) of directories:
/home/user/.queen_beecon_dir /home/user/MyDocs/.images/queen_beecon_dir/
Restore all Widget Instances
Apply Import/Load/Restore Procedure for Beecon Exported Instance Data for every Widget Instance you want to Restore
Restore content (Beecons' Images) of directories:
/home/user/.queen_beecon_dir /home/user/MyDocs/.images/queen_beecon_dir/
Import/Load/Restore Procedure for Beecon Exported Instance Data
Export/Save/Backup Procedure for Beecon Instance Data
Copy Exported Instance Data from Browser to Phone's Clipboard
Reset QBW to Default Configuration/Commands
- Open up X-Terminal (or SSH/Putty into N900) and issue the following command
sudo gainroot (only if you are not already root) rm /home/user/.queen_beecon killall hildon-home
Completely remove QBW from your N900
- Open up X-Terminal (or SSH/Putty into N900) and issue the following command
sudo gainroot (only if you are not already root) dpkg -P queen-beecon rm /home/user/.queen_beecon rm -r /home/user/.queen_beecon_dir rm -r /home/user/MyDocs/.images/queen_beecon_dir/
Run every Desktop Application with different Icons/Sizes buttons
You can run every desktop application with a script like this and just change the image and size of the Beecon to one of your choice:
dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"<application name here>"
where <application name here> is application name that you can find in /usr/share/applications/hildon directory w/o trailing .desktop
Example for launching the image viewer:
/usr/bin/dbus-send --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:image-viewer
some applications might accept extra parameters by adding extra "string:<parameter here>" to the command
Easter Eggs
Magic Word for bypassing Export/Import Instance Data CheckSum protection
Use the Source ... Luke! ;) or ask politely!!!
Troubleshooting
Startup
If you are having issues at widget startup because of improper "Update on Widget/System Startup" settings:
- Open up X-Terminal (or SSH/Putty into N900) and issue the following commands:
sudo gainroot (only if you are not already root) vi /home/user/.queen_beecon
- find updOnStartup=true (all instances supposed to be culprits)
- Set it to false (updOnStartup=false)
- Save file
- Immediately issue:
killall hildon-home
- hildon-home will automatically restart and widgets won't run any more at startup
Running
"No Output" is displayed inside Widget instead of expected output
If you are using Pango Markup Language Tags as output from your scripts, make sure all Tags are correctly written/spelled and terminated. Make also sure that there is an explicit <newline> at the very end of your output.
If you need to display the following special characters:
These NEED to be escaped:
- The less-than character (<) starts element markup (the first character of a start-tag or an end-tag). Escape: <
- The greater-than character (>) ends a start-tag or an end-tag. Escape: >
These MIGHT NEED to be escaped:
- The ampersand character (&) starts entity markup (the first character of a character entity reference). Escape: &
- The double-quote character (") can be symbolised with this character entity reference when you need to embed a double-quote inside a string which is already double-quoted. Escape: "
- The apostrophe or single-quote character (') can be symbolised with this character entity reference when you need to embed a single-quote or apostrophe inside a string which is already single-quoted. Escape: '
Beecon seems to hang when fetching data or accessing the Internet/Network
Please have a look to THIS post for Timeout and Proxy related issues.
Published Beecons, Scripts & Commands
Beecons
O'clocker CPU Frequency Monitor
The Beecon will display different frequencies in graphic format based upon /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq file
Random images from Flickr's 'Most Interesting' pages
The Beecon will display random photos/images from http://m.flickr.com. Change update policies as per your taste.
N900 Overclocking (Thanks Jakiman and all contributors)
The Guide will give you a thorough insight of the N900 overclocking methods with plenty of instructions and tutorials. QBW will provide a GUI Button for switching OC Frequencies
Random Images/Photos Slideshow (4x3 and 16x9 frames)
The Beecon will display random photos/images from a specified directory. Both 4x3 and 16x9 aspect ratios white frames are provided. Change update policies as per your taste.
N900 Mini Monitor (Extras Admission Celebration Edition)!!!
The Beecon will show System Information relevant to Battery, CPU and Load, Uptime, Network/Internet, WIFI and File Systems.
Zodiac Personal Horoscope (Italian + Bonus Read Talk)
The Beecon will show your horoscope for the day. It will be personalized with the image/icon of the sign you specify.
Lunar Phases
The Beecon will show the current phase of the moon.
Ebay Item Watcher
The Beecon will watch an item that you specify and will provide a small Photo, Item Number, Current Bid or Buy It Now Price, Time Left for bidding, Bid Count, High Bidder and Quantity.
Internet Traffic Report Live Graphs
The Beecons will fetch some Graphs from the Internet Traffic Report website. The Internet Traffic Report monitors the flow of data around the world. It then displays a value between zero and 100. Higher values indicate faster and more reliable connections. See ITR FAQs to learn more.
Today Schedules for TVRage.com Favourites TV Serials
The Beecon will also provide a small miniature if your most favourite Show is aired on the day.
N900 Hard Sleep Mode
The Beecon will put the N900 into Hard Sleep Mode. When pressed, it'll perform the following actions: Set WIFI OFF, Change phone network mode to GSM, Shutdown all network connections, Blank the screen, Lock device
European Soccer Leagues Live Results and Next Matches Beecon
The Beecon will also be able to highlight the match of your favourite Team and display a Green ball if it is winning, Yellow ball if match is tied, Red ball if team is losing, White ball if match is still not currently being played.
World Cup 2010 South Africa - Live Results, News and Next Matches
The Beecon will also provide the most recent WC2010 news and will be able to highlight the match of your favourite Team and display, behind mascot, a Green ball if it is winning, Yellow ball if match is tied, Red ball if team is losing, White ball if match is still not currently being played.
Naive Dice Roller
The Beecon will show a dice that you'll be able to roll by clicking on it.
World Day & Night Zones
The Beecon will display a map of the world and current position of the Sun, indicating which parts of the Earth are in day and which are in night.
European Accuweather Meteo
The Beecon will display the meteo graphs provided by Accuweather.com for Western Europe
MRTG The Multi Router Traffic Grapher
The Beecon will display the graphs provided by the uber-famous MRTG - The Multi Router Traffic Grapher
GMail: New Mail Notifier Beecon
The Beecon will display an empty mailbox icon or a yellow full mailbox icon and the number of new unread messages of the specified GMail account
Italian Ringroads (Tangenziali) Live Traffic Beecon
The Beecon is configured to display Live Traffic graphic status of Milan Ringroads System. Other major cities in Italy are also available: ROME, TURIN, FLORENCE, NAPLES, BOLOGNA!
MLB Major League Baseball Matches of the Day (+tutorial/walkthrough)
The Beecon will display near Real Time MLB Major League Baseball Matches results. The Widget is also capable of showing different icons/images/emoticons according to the result of a Favourite Team.
Thanks 2 gkuenning for alternative script
Scripts & Commands
Desktop Command Execution Widget scripts Warning: This are scripts for Desktop Command Execution Widget; QBW has extended functionalities so it might be needed to tweak scripts or commands a little bit for both cosmetic and functional improvements.
Useful References
DbusScripts is a daemon that can execute a command when various actions occurs on DBus
Phone_control D-Bus commands can be run from terminal or as shell scripts. Useful for scheduling events with fcron, executing commands, , startup events, install scripts, etc.