Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: MikeLockmoore on August 27, 2009, 09:42:27 PM

Title: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 27, 2009, 09:42:27 PM
I've been working with flwm, and like some parts of it (and working on fixing a few I don't  >:(), but I really missed having a clock on-screen like I have in jwm and other desktops (gnome, windows).  I didn't see much that was FLTK-native, so, of course I decided to make my own.  ::)  While I was at it, I decided to also add a battery monitor (since I use TC on a laptop) and an easy to adjust sound control.  ;D

I call this little "tray" application Flit.  It works something like the system tray in Windows XP and some aspects of the panel UIs in GNOME and other X11 desktops.  But of course, being made with tight FLTK code, it is really small... less than 20 kb!  Each applet can be individually toggled on and off, so if you don't want to see one or two of them, that's OK.  There are few color options, and the location is flexible too.  Your preferences can be saved so they automatically used each time you launch Flit.

At this alpha release stage, I don't have it packaged up yet... Maybe Jason will beat me to making a .tce/.tcz package.  ;)

I've attached a screenshot, the source code, and a make file.  I'll also post the full help text to this thread.  Maybe later I'll highlight a few interesting parts of the code.  If you have any issues or suggestions, please post them here.  If there is interest, I may add CPU monitor and/or network activity monitor applets.

I hope it's useful to others, especially users of flwm or other light environments like openbox/fluxbox.
--
Mike Lockmoore

EDIT: Source code updated to version 0.9.2, which has keyboard shortcuts along with the previous flexibility to configure it to work with various sound hardware via OSS.  See reply #28 and #32 to get more details.

EDIT: Source code updated to version 0.9.4, which calculates a battery charging/discharging rate if ACPI fails to provide a nonzero value.  See reply #46 and #51 for details.

EDIT: Source code updated to version 0.9.5(b),  which  prevents sound applet from unhiding if OSS not present, surpresses batt. charge/discharge remaining time estimates for three minutes after a change in status, and automatically shows menu as soon as Alt key is pressed for better keyboard usage.

EDIT: Source code updated to version 0.9.6,  which  replaces the Alt key bindings with Ctrl key bindings. Also, the tooltip text formatting was changed slightly for better readability.

EDIT: Source code updated to version 0.9.7, Removed non-FLTK-standard "Esc opens context menu" with "Esc closes window/app", also added '%' char above batt. icon when it's discharging.

EDIT: Source code updated to version 0.9.8, with option to disable the Ctrl "hotkey"-triggered opening of the right-click menu, as well immediately releasing input focus on application startup.

EDIT: Source code updated to version 0.9.9, to handle case where battery rate is non-numeric by allowing battery charging/discharging rate calculations to proceed using derived rates.

EDIT: Let's call this major version done! Source code updated to 1.0.0. Same code with the updated version string.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 27, 2009, 09:45:48 PM
The help text for Flit (ver. 1.0.0):

INTRO

Flit is an applet 'tray', currently offering clock, master sound volume control, and battery monitor. It is written to be small and low-overhead, using the FLTK user interface library, so it is especially efficient on TinyCore Linux. The source code of Flit is released under the GNU license. See http://www.gnu.org/licenses/ for more details.

There is a menu of choices made available through right-clicking on Flit. The sound control applet has several additional keyboard shortcuts (see below). The Flit menu may optionally be opened automatically by a Ctrl key, as defined in the General Options section.

If you don't want to see all three applets, you can disable one or two of them in the right-click menu, but not all three!

'Hover' your mouse pointer over each applet to get more detailed information. The battery recharge time estimate is very approximate in this release. (I hope to improve the algorithm soon!)

If you want to start Flit automatically, invoke it in your /opt/bootlocal.sh startup script or make a custom .xsession script file, and use a & symbol to return control immediately to the script, like this:
     /path/to/flit &
Note: The base configuration of TinyCore Linux (at least version 2.3) includes and
automatically starts Flit if the default window manager flwm is used.

CLOCK
The only option for the clock is 24-hour time format, or 12-hour format with AM or PM indication. Use the right-click menu to toggle between these modes. Hover the mouse pointer to see date and year in addition to time.

SOUND CONTROL
The current sound volume level is indicated by the number and size of the sound "rays" next to the speaker icon. To adjust the volume, place your mouse cursor over the speaker and use the mouse scroll wheel (or equivalent) to adjust the sound volume in 5% increments. You may also use the following keystrokes:

Louder: Ctrl+U, or Up arrow cursor key, or + key
Quieter: Ctrl+L, or Down arrow cursor key, or - key
Mute/Unmute: Ctrl+M, or Pause key

Future versions may also provide a pop-up slider control.

The sound control requires an OSS "mixer" device '/dev/mixer' to be present. There is a lot of variation in how sound devices can be controlled, but Flit will try to support some common methods. By default, Flit will try to find an appropriate mixer control to adjust the overall playback volume. You can override this behavior by specifying an exact OSS mixer control name in the .flit.conf file, in the "oss_control_name =" statement. If the name is "autosel", Flit will do the default auto-selection. But if you know that you get best results from a specific mixer control, such as "vol" or "pcm" or something else, put it name into the .flit.conf file, such as:

    oss_control_name = pcm

If flit is not successful in finding a suitable control (which must be marked with the MASTER_VOLUME or PCM_VOLUME in OSS), you won't see the sound control applet in Flit, and you won't be able to "unhide" it. You may want to try the graphical mixer application ossxmix (note the X in the name) or command-line application ossmix and experiment with the controls made available for your hardware to see which ones can control the volume. If OSS + your hardware don't support an adjustable output volume, you may still be able to use a mute control with Flit.

LIMITATIONS: The OSS vmix software mixer control will only work if vmix is fully "attached" to your audio hardware (beyond the scope of this document). ALSA is not supported (at least not yet, anyway).

BATTERY MONITOR
In the battery icon, charge is colored green if the level is 40% or higher, yellow when 20% or higher, and red below 20%. If the estimated charge Is less than 13%, the outline of the battery icon will slowly flash red. When recharging power is available, an AC power plug icon is shown over the battery icon. If the battry is discharging, the remaining charge percentage number is shown above the battery icon.

The battery monitor requires information in the /proc/acpi system information, so you must boot Linux with the 'laptop' kernel option or load the appropriate ACPI kernel module. About three minutes after a switch between charging and discharging, Flit will begin showing estimates of the remaining time.

GENERAL OPTIONS
By default, Flit will automatically pop up the right-click menu if Flit has the keyboard focus and you press either Ctrl key, which you may do as part of a Ctrl+key combination. If you would prefer to not have Flit open the menu on Ctrl keypress, select the 'Toggle Ctrl key menu activation' menu option and then save the configuration.

You can choose one of appearance styles:
 a) Normal: black on light gray, with a sunken tray effect
 b) Inverse: light gray on black, also with a sunken tray effect
 c) 'Transparent', which has a background color slightly lighter than the
     X11 root window where Flit plans to appear and a contrasting
     foreground color, with a flat effect, which matches
     wbar nicely. If the planned location is occupied
     by a window when Flit starts, its background color
     will be based on that.

You may reposition Flit with your mouse (left-click + drag), or hand-edit the .flit.conf configuration file (see cautions below). The location can be defined to one of the four corners (se = SouthEast, i.e. the lower-right corner, and so on) or a x,y pair. See the configuration file for an example.

SAVING PREFERENCES
Use the 'Save configuration' command to make flit remember your preferences by writing the .flit.conf file in your home directory (as defined by the $HOME environment variable). You may edit this file with a text editor, but please preserve the spelling, capitalization, and spacing of content to prevent parsing problems. You can revert to default settings by deleting the .flit.conf file and restarting Flit.


EDIT: Attached help file here.  The preferred place for this help file as of version 0.9.3 (and modified 0.9.2 in TC 2.3) is now /usr/share/doc/tc/flit_help.htm.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: alu on August 28, 2009, 12:51:56 AM
sounds great and useful; can i use it with evilwm?
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 28, 2009, 06:01:02 AM
alu: If you have the setup and inclination to compile it, just give it a try!  If not, we should have an "alpha" release package ready within a few days.

As long as you still have the FLTK dynamic libraries around, I would think Flit will work fine in evilwm.  Flit does not need window decorations anyway.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on August 28, 2009, 06:18:29 AM
Seems to compile and work fine for me so far  :)

Edit: 'Spoke too soon - after loading OSS:
Code: [Select]
$ /mnt/sda1/tmp/flit &
$ No config file found!
Bad mixer control name(987) 'vol

..maybe needs an "always on top" switch in order to be visible above maximised windows?
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: alu on August 28, 2009, 09:21:15 AM
thanks Mike, great, i surely shall use it, i don't have time right now to compile it and test it on my own, so i shall wait a bit
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 28, 2009, 09:35:25 AM
Juanito:

The "always on top" property is a good idea. I'll look into how to do that.

Your first "No config file found!" message is harmless and expected if you've never saved your configuration (maybe I'll get rid of it).  

The mixer message is more puzzling.  Flit is just trying to run ossmix to get or set the volume, so if OSS is truly active, I'm suprised it failed like that.  Maybe repeat the test but run ossmix on the command line first?  Could you post the output of your ossmix (with no arguments) here?  Maybe there is some way your OSS implementation names the sound volume differently than in mine.
--
Mike
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on August 28, 2009, 10:25:27 AM
Code: [Select]
$ ossmix
Selected mixer 0/High Definition Audio STAC9200
Known controls are:
jack.black.mode1 <select|input> (currently select)
jack.black.select1 <pcm|select> (currently pcm)
jack.black.select2 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.int-speaker.mode <select|input> (currently select)
jack.int-mic.mode <select|input> (currently select)
jack.black.mode2 <select|input> (currently input)
record.select.select1 [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
record.select.select2 <select|select> (currently select)
record.select.select3 [<leftvol>:<rightvol>] (currently 19.4:19.4 dB)
misc <-28.-8dB|-19.-2dB|-9.-6dB|0.0dB|mute> (currently 131(too large (a=5)?))
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|Low|Medium|High|High+|Production|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm4 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm5 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm6 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm7 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 28, 2009, 10:33:45 AM
Juanito:  :o  That looks really different.  The killer is that ossmix is dealing is dealing with dB for your device, not percentages!  I was hoping ossmix would make different sound devices appear more consistent than this. 

If you wanted to use ossmix to set the volume, do you know how you would do it?  ???
--
Mike
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on August 28, 2009, 10:38:19 AM
Mike: Looks great. However, I too have an issue with ossmix
flit reports: Bad mixer control name (987) 'vol'

In my /opt/bootlocal.sh I set the volume with:
ossmix -d0 misc.pcm1 90:90
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 28, 2009, 10:41:23 AM
Is this bug report relevant?

http://forum.tinycorelinux.net/index.php?topic=2820.0
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on August 28, 2009, 10:43:35 AM
There are two versions of OSS extension for v2.x
4.1 and 4.0 which there have been reports of differences in operation.
I am using 4.1
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 28, 2009, 10:47:40 AM
I'll check to see which OSS version I'm using later tonight.  If I'm on 4.0, maybe I'll update to 4.1 and figure out how to make it work as consistently as posible.  Juanito's device looks like it might be a bugger to support! :-\
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 28, 2009, 09:21:44 PM
OK, I've changed the interface to the OSS audio system.  I'm now opening the device "file" /dev/mixer and using the OSS-published ioctl( ) interface.  It works just as well for me, and I'm hoping it works at least somewhat OK for others.  The new code iterates through all of the mixer control paramters and tries to find a control that is of "main volume" or "PCM  volume type".  As I don't know yet a way to select a "best" one, it quits searching as soon as it finds one of either type.  I hope this first one will work for most OSS users.   

Juanito and RobertS: if you can spare a few minutes, please try this version and tell me how it works for you.  If it does not work, maybe enable the #define DIAG manifest constant and see if the output can tell us anything.

I also updated the code that looks at the background to set the transparent color... it now actually looks at the spot it plans to appear in, not just the 0,0 corner of the screen... so now if Flit appears over a background, it should hopefully choose a color related to its location.
--
Mike L.
--
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on August 28, 2009, 09:42:38 PM
Juanito and RobertS: if you can spare a few minutes, please try this version and tell me how it works for you.  If it does not work, maybe enable the #define DIAG manifest constant and see if the output can tell us anything.

No problem to try, but where is it?  :)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 28, 2009, 10:12:28 PM
I updated the .cpp file up in the start of the thread.
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on August 29, 2009, 03:25:37 AM
make aborts with an error about not finding soundcard.h - even though it is present in /usr/include?
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: alu on August 29, 2009, 05:17:34 AM
Mike, here is the output of ossmix (i am using OSS.tcz, so the 4.1 oss); i also tried to change the volume for pcm2, and even if it apparently does it, it doesn't seem to:

tc@box:~$ ossmix   
Selected mixer 0/High Definition Audio 0x11061708
Known controls are:
jack.black.pcm2 [<leftvol>:<rightvol>] (currently 38.4:38.4 dB)
jack.pink.mode <pcm3|input> (currently pcm3)
jack.pink.pcm3 [<leftvol>:<rightvol>] (currently 38.4:38.4 dB)
jack.blue.mode <pcm2|input> (currently input)
jack.green.mix [<leftvol>:<rightvol>] (currently 38.4:38.4 dB)
jack.green.pcm1 [<leftvol>:<rightvol>] (currently 45.4:45.4 dB)
jack.green.pcm3 [<leftvol>:<rightvol>] (currently 45.4:45.4 dB)
jack.green.pcm2 [<leftvol>:<rightvol>] (currently 54.1:54.1 dB)
jack.green.pcm4 [<leftvol>:<rightvol>] (currently 45.4:45.4 dB)
jack.gray.pcm4 [<leftvol>:<rightvol>] (currently 38.4:38.4 dB)
record.select1.select1 <mix|pcm3|pcm2> (currently mix)
record.select1 [<leftvol>:<rightvol>] (currently 29.6:29.6 dB)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|Low|Medium|High|High+|Production|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm7 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm9 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
tc@box:~$ ossmix -d0 jack.green.pcm2 +50
Value of mixer control jack.green.pcm2 set to 104.1:104.1
tc@box:~$ ossmix -d0                   
Selected mixer 0/High Definition Audio 0x11061708
Known controls are:
jack.black.pcm2 [<leftvol>:<rightvol>] (currently 38.4:38.4 dB)
jack.pink.mode <pcm3|input> (currently pcm3)
jack.pink.pcm3 [<leftvol>:<rightvol>] (currently 38.4:38.4 dB)
jack.blue.mode <pcm2|input> (currently input)
jack.green.mix [<leftvol>:<rightvol>] (currently 38.4:38.4 dB)
jack.green.pcm1 [<leftvol>:<rightvol>] (currently 45.4:45.4 dB)
jack.green.pcm3 [<leftvol>:<rightvol>] (currently 45.4:45.4 dB)
jack.green.pcm2 [<leftvol>:<rightvol>] (currently 54.1:54.1 dB)
jack.green.pcm4 [<leftvol>:<rightvol>] (currently 45.4:45.4 dB)
jack.gray.pcm4 [<leftvol>:<rightvol>] (currently 38.4:38.4 dB)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 29, 2009, 07:28:11 AM
Juanito:  Sorry, I should have thought of that.  I posted the soundcard.h back at the top of the thread, but I'll attach it here too.  I downloaded this version straight from the OSS home repository.

alu: It looks like your sound device is similar to Juanito's, so if it works for Juanito, it would be likely to work for you too. I'll put together a package request with the latest code and ask one of the site admins to post it here.  I'm not supposed to post .tce's and .tcz's directly.
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on August 29, 2009, 07:42:34 AM
OK, flit compiles now - but soundcard.h in base-devs is already OSS ready?

I'm not sure of the expected behaviour, but flit now has a "loudspeaker with sound coming out of it" icon and if I hold the cursor over it, it says "250", which seems like it corresponds to 25.0dB
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on August 29, 2009, 07:53:04 AM
Same here.
Here is the output starting with the found device:
Code: [Select]
===>    61      Volume control item: 'vmix0-outvol'
===>    Min is 0, max is 250, type is 19
Root RGB colors are 12:17:1b
Value is 0xFA00FA (=250)
Sound ctrl. new value is 250
Value is 0xFA00FA (=250)
Sound ctrl. new value is 250
Value is 0xFA00FA (=250)
Sound ctrl. new value is 250
Value is 0xFA00FA (=250)
Sound ctrl. new value is 250
Value is 0xFA00FA (=250)
Sound ctrl. new value is 250
[/quote]
Seems to be polling all the time, even when the mouse is not hoving.
Mouse wheel does not ajust same Value is displayed.
Clicking on speaker does toggle mute
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 29, 2009, 08:23:50 AM
Robert:  That helps.  It the mixer control type of 19 indicates it is a MIXT_STEREODB type (marked obsolete in the header!).  I added support for this type, I hope, in version 0.9.0.   I'm only doing a proportional conversion between the dB and % values, so perhaps a large part of the range won't be useful.  Maybe later I can do a more-mathematically appropriate value conversion.  

Here is the updated version of the source.  I'll also post an update to the top of the thread.

EDIT: Issue with DIAG compile problem fixed.
--
Mike L
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on August 29, 2009, 08:32:18 AM
I didn't see a change - note that "about" still reports 0.8.9 and "help" gives "unable to follow the link ./flit_help.htm, no such file or directory", maybe not implemented yet?

Looking good nonetheless  :)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on August 29, 2009, 08:45:41 AM
Same results on v.0.9.0. Unable to change volume.
DIAG enabled now does not compile.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 29, 2009, 09:15:39 AM
EDITED:

Here is a fixed 0.9.0 with DIAG already enabled and  much more diag output, including details during the OSS parameter selection proccess.

RobertS: if you can run this, please post the full list of OSS mixer control parameters that Flit considers.

--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 29, 2009, 09:19:00 AM
Juanito:

Here is the help file.  I'll post it up at reply 1.
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 29, 2009, 10:24:02 AM
Juanito:  When you can spare the time, could you get the very latest flit.cpp, compile, run it, and capture the output during the OSS parameter selection?  It's posted two comments back.

Here is the initial output when I run it, although it should now run through ALL of the parameters:

Code: [Select]
Mixer device is 'ICH AC97 Mixer (STAC9750)', priority 10
There are 60 controls in the mixer
--->    0       Considering volume control item: '', type 0, flags 0x4
                        (not selected)
--->    1       Considering volume control item: 'vol', type 1, flags 0x84
                        (not selected)
--->    2       Considering volume control item: 'vol', type 5, flags 0x403
===>    2       Selected volume control item: 'vol'
...

The 0x0400 flag bit indicates field MAIN_VOLUME, and type 5 is STEREOSLIDER.  I hope we can see a combo of type and flags that will indicate a useful parameter.  Do you have a command-line option that works with ossmix to set the sound volume?
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on August 29, 2009, 10:52:36 AM
Here is my latest results:
Code: [Select]
No config file found: using defaults.
Mixer device is 'High Definition Audio ALC662', priority 10
There are 74 controls in the mixer
---> 0 Considering volume control item: '', type 0, flags 0x4
(not selected)
---> 1 Considering volume control item: '2', type 12, flags 0x4
(not selected)
---> 2 Considering volume control item: 'jack', type 1, flags 0x4
(not selected)
---> 3 Considering volume control item: 'jack.green', type 1, flags 0x4
(not selected)
---> 4 Considering volume control item: 'jack.green.mode', type 3, flags 0x3
(not selected)
---> 5 Considering volume control item: 'jack.green.mute', type 21, flags 0x3
(not selected)
---> 6 Considering volume control item: 'jack.green.front', type 20, flags 0x103
(not selected)
---> 7 Considering volume control item: 'jack.green.front-mute', type 21, flags 0x3
(not selected)
---> 8 Considering volume control item: 'jack.green.mix-mute', type 21, flags 0x3
(not selected)
---> 9 Considering volume control item: 'jack.pink', type 1, flags 0x4
(not selected)
---> 10 Considering volume control item: 'jack.pink.mode', type 3, flags 0x3
(not selected)
---> 11 Considering volume control item: 'jack.pink', type 20, flags 0x103
(not selected)
---> 12 Considering volume control item: 'jack.pink.mute', type 21, flags 0x3
(not selected)
---> 13 Considering volume control item: 'jack.pink.center/lfe', type 20, flags 0x103
(not selected)
---> 14 Considering volume control item: 'jack.pink.center/lfe-mute', type 21, flags 0x3
(not selected)
---> 15 Considering volume control item: 'jack.pink.mix-mute', type 21, flags 0x3
(not selected)
---> 16 Considering volume control item: 'jack.fp-pink', type 1, flags 0x4
(not selected)
---> 17 Considering volume control item: 'jack.fp-pink.mode', type 3, flags 0x3
(not selected)
---> 18 Considering volume control item: 'jack.fp-pink', type 20, flags 0x103
(not selected)
---> 19 Considering volume control item: 'jack.fp-pink.mute', type 21, flags 0x3
(not selected)
---> 20 Considering volume control item: 'jack', type 1, flags 0x4
(not selected)
---> 21 Considering volume control item: 'jack.blue', type 1, flags 0x4
(not selected)
---> 22 Considering volume control item: 'jack.blue.mode', type 3, flags 0x3
(not selected)
---> 23 Considering volume control item: 'jack.blue.mute', type 21, flags 0x3
(not selected)
---> 24 Considering volume control item: 'jack.blue.rear', type 20, flags 0x103
(not selected)
---> 25 Considering volume control item: 'jack.blue.rear-mute', type 21, flags 0x3
(not selected)
---> 26 Considering volume control item: 'jack.blue.mix-mute', type 21, flags 0x3
(not selected)
---> 27 Considering volume control item: 'jack.fp-green', type 1, flags 0x4
(not selected)
---> 28 Considering volume control item: 'jack.fp-green.mode', type 3, flags 0x3
(not selected)
---> 29 Considering volume control item: 'jack.fp-green', type 20, flags 0x103
(not selected)
---> 30 Considering volume control item: 'jack.fp-green.mute', type 21, flags 0x3
(not selected)
---> 31 Considering volume control item: 'record', type 1, flags 0x4
(not selected)
---> 32 Considering volume control item: 'record.mix', type 1, flags 0x4
(not selected)
---> 33 Considering volume control item: 'record.mix.mute', type 1, flags 0x44
(not selected)
---> 34 Considering volume control item: 'record.mix.mute.c/lfe1', type 21, flags 0x3
(not selected)
---> 35 Considering volume control item: 'record.mix.mute.fp-mic1', type 21, flags 0x3
(not selected)
---> 36 Considering volume control item: 'record.mix.mute.rear1', type 21, flags 0x3
(not selected)
---> 37 Considering volume control item: 'record.mix.mute.fp-headphone1', type 21, flags 0x3
(not selected)
---> 38 Considering volume control item: 'record.mix.mute.front1', type 21, flags 0x3
(not selected)
---> 39 Considering volume control item: 'record.mix.mute.mix1', type 21, flags 0x3
(not selected)
---> 40 Considering volume control item: 'record.mix1', type 20, flags 0x103
(not selected)
---> 41 Considering volume control item: 'record.mix', type 1, flags 0x4
(not selected)
---> 42 Considering volume control item: 'record.mix.mute', type 1, flags 0x44
(not selected)
---> 43 Considering volume control item: 'record.mix.mute.c/lfe2', type 21, flags 0x3
(not selected)
---> 44 Considering volume control item: 'record.mix.mute.fp-mic2', type 21, flags 0x3
(not selected)
---> 45 Considering volume control item: 'record.mix.mute.rear2', type 21, flags 0x3
(not selected)
---> 46 Considering volume control item: 'record.mix.mute.fp-headphone2', type 21, flags 0x3
(not selected)
---> 47 Considering volume control item: 'record.mix.mute.front2', type 21, flags 0x3
(not selected)
---> 48 Considering volume control item: 'record.mix.mute.mix2', type 21, flags 0x3
(not selected)
---> 49 Considering volume control item: 'record.mix2', type 20, flags 0x103
(not selected)
---> 50 Considering volume control item: 'misc', type 1, flags 0x4
(not selected)
---> 51 Considering volume control item: 'misc.c/lfe', type 20, flags 0x103
(not selected)
---> 52 Considering volume control item: 'misc.fp-mic', type 20, flags 0x103
(not selected)
---> 53 Considering volume control item: 'misc.rear', type 20, flags 0x103
(not selected)
---> 54 Considering volume control item: 'misc.fp-headphone', type 20, flags 0x103
(not selected)
---> 55 Considering volume control item: 'misc.front', type 20, flags 0x103
(not selected)
---> 56 Considering volume control item: 'misc.mix', type 3, flags 0x3
(not selected)
---> 57 Considering volume control item: 'vmix0-enable', type 2, flags 0x3
(not selected)
---> 58 Considering volume control item: 'vmix0-rate', type 13, flags 0x800D
(not selected)
---> 59 Considering volume control item: 'vmix0-channels', type 3, flags 0x3
(not selected)
---> 60 Considering volume control item: 'vmix0-src', type 3, flags 0x8003
(not selected)
---> 61 Considering volume control item: 'vmix0-outvol', type 19, flags 0x903
===> 61 Selected volume control item: 'vmix0-outvol'
---> 62 Considering volume control item: 'vmix0-outvu', type 10, flags 0x205
(not selected)
---> 63 Considering volume control item: 'vmix0', type 1, flags 0x4
(not selected)
---> 64 Considering volume control item: 'vmix0-invol', type 19, flags 0x903
(not selected)
---> 65 Considering volume control item: 'vmix0-invu', type 10, flags 0x205
(not selected)
---> 66 Considering volume control item: 'vmix0.pcm6', type 20, flags 0x903
(not selected)
---> 67 Considering volume control item: 'vmix01', type 10, flags 0x205
(not selected)
---> 68 Considering volume control item: 'vmix0.pcm7', type 20, flags 0x903
(not selected)
---> 69 Considering volume control item: 'vmix02', type 10, flags 0x205
(not selected)
---> 70 Considering volume control item: 'vmix0.pcm8', type 20, flags 0x903
(not selected)
---> 71 Considering volume control item: 'vmix03', type 10, flags 0x205
(not selected)
---> 72 Considering volume control item: 'vmix0.pcm9', type 20, flags 0x903
(not selected)
---> 73 Considering volume control item: 'vmix04', type 10, flags 0x205
(not selected)
Root RGB colors are 12:17:1b
Raw value is 0xFA00FA (=250), or 250%
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Raw value is 0xFA00FA (=250), or 250%
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Value is now 0xFA00FA (=250 or 250%)
Sound ctrl. new value is 250
Raw value is 0xFA00FA (=250), or 250%
Sound ctrl. new value is 250
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 30, 2009, 08:25:05 PM
Well, I'm stumped.   ???  I tried to get the vmix mixing controls working in my TC installation, but can't.  I have a /dev/oss/oss_ich0/pcm0 device node, but not a .../pcmin0 node, which I think I need to have vmix be able to sample and retransmit system audio.  If I start up ossxmix (GUI mixer), all of the vmix VU meters are dead, and changing the volume sliders has zero affect.  I tried the vmixctl utility, but it does not seem to help. To go any further on this path, we might need some help from someone with more OSS experience and knowledge.

I also don't know how the "jack.(color).*" controls that some of you have (High Definition Audio systems?) work, so I can't have Flit automatically pick one if the OSS flags don't look right. But maybe one of those is useful for controlling the sound?  But I think the bottom line for now is: If you can get the sound to adjust in ossxmix or ossmix, it should be possible in Flit too.

In my own system, I can get Flit to control the sound with either the control parameter "vol" or "pcm", both of which show up in ossmix and ossxmix and do the expected thing (both adjust the output sound level).  

To give users some flexibility, Flit version 0.9.1 has a new config parameter: oss_control_name.  If it is not specified, or if it is specified as "autosel", Flit will check the flags for each OSS mixer control and try to pick an approrpriate one (like before).  But note that if Flit only finds a vmix* control, and your vmix is not properly attached (like mine), it still won't work.  However, you can specify the exact name of a control if you know that it will work in your setup.  I think a "mute" control could be specified too, so even if you don't have a volume "slider", Flit might still be able to togge the mute setting.  (Could someone test this?  My hardware does not expose a "mute" mixer control type.)

Full Diag version of the latest code is posted here.  The help .htm is also updated.
--
ML
 
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on August 31, 2009, 08:45:39 AM
Mike,

Great News!
This version 0.9.1 is working on both my desktop and netbook.
Great Job.

Now if there could just be an ALT combo to adjust sound up/down as netbooks typically don't have a wheel.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 31, 2009, 09:55:57 AM
Robert: Glad to hear it!  :D  Did you have to do something to OSS outside of Flit?  Did you need to supply a custom oss_control_name?  

About keyboard shortcuts: I have wanted to at least trap the esc key, since it seems to hide the Flit window without killing it... not very friendly behavior.  While I'm at it, I could try to make some kind of keyboard shortcut for changing the sound level.  Or maybe if I pop up a slider widget, it would already have some keystroke shortcuts built in?  I'll experiment with it and let people try it out.
--
Mike L.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on August 31, 2009, 10:10:02 AM
I didn't do anything. Just compiled and started the new version and noticed vol was at 100 instead of 250, Mouse wheel adjusted the volume as expected.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on August 31, 2009, 09:10:06 PM
Flit now has keyboard shortcuts:

Louder: Menu + Alt+U, or Up arrow cursor key, or + key
Quieter: Menu + Alt+L, or Down arrow cursor key, or - key
Mute/Unmute: Menu + Alt+M, or Pause key

You can also now pop open the menu with the Esc. key.

The non-diag version of Flit still compiles to less (barely!) than 20 kb.

Updated source code and help file posted here.
--
Mike L.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on September 01, 2009, 06:09:07 AM
I gave v0.92 a spin - looks good.

The volume control works up to a limit of 100 - I didn't have much time to look at this, so I'm not sure if this is imposed by flit, the limit of the device, OSS, or what...

The always-on-top bit works with a terminal window and beaver with no file opened, but is hidden by beaver with a file open, emelfm and gtkfind.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 01, 2009, 11:21:20 AM
Juanito:

Flit normalizes the sound levels to a range of 0 to 100, even if your device uses some other range natively.

I don't have a good solution yet for the window always-on-top behavior.  The X11 Windows system does not easily support such an option...  it's more like: if any windows have covered you up, pop yourself over them.  Some people see this as kind of obnoxious, but I'd still kinda of like having this as an option.  I just don't know if I can fully pull it off without messing up the input focus for other apps.
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: alu on September 06, 2009, 05:58:06 AM
flit looks really nice; i would add the date as an option (useful for me since i am using evilwm); with evilwm, wenn i want to hide the volume icon, it hides the time (only the volume icon remains); is this flit or evilwm? very nice app Mike, thanks
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: clach04 on September 06, 2009, 07:54:17 AM
Great little app! With the release included in TC 2.3 (0.9.2?) when new desktops are added (e.g. CTRL+F2) flit is only visible on Desktop 1. Any way to change this? I've not worked out how too make it sticky (is they any way to make it auto sticky?) using the sticky menu in flwm.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 06, 2009, 08:03:15 AM
To make it sticky is the same procedure to move an app to a different desktop.
Select the desktop to move there, then popup menu and select the app.
Sticky desktop only shows when more than one desktop has been selected.
flwm always starts with minimal resources, i.e., initially only one desktop.

Note too, that without moving to Sticky desktop, you can always popup menu and select flit thusraising it, thereby it is visible, overlaying the currently displayed app/window.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 07, 2009, 12:26:29 AM
Note too, that without moving to Sticky desktop, you can always popup menu and select flit thusraising it, thereby it is visible, overlaying the currently displayed app/window.

or create a flit-start script that kills the previous instance and loads another, so it's on top (only) when you need it.  This works nicely with a jwm hotkey.  
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 07, 2009, 08:28:35 PM
Interesting idea, jpeters.  I'll have to try it out sometime. -- Mike
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 08, 2009, 12:41:22 AM
Interesting idea, jpeters.  I'll have to try it out sometime. -- Mike

flit works great on my Dell laptops; very useful, Mike.  
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 08, 2009, 09:08:43 PM
Glad to hear it!  It was one of those "itches" I wanted to scratch, as I think E. Raymond has put it.  But it is nice to hear others find it useful.
--
Mike L.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 08, 2009, 10:40:40 PM
on Dell Mini 9, battery reports strange hours.
87% about -2147483648hrs -2147483648min remianing.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 09, 2009, 06:48:12 AM
roberts:

Maybe you got the lithium-tachyon battery cell option on your Dell?  :D

More seriously, I'll try to fix this.  Is it during the charging cycle or discharging?

Everybody: If you see strange battery charge levels or time estimates (either charging or discharging), please post the contents of your /proc/acpi/battery/BATT*/state pseudo-file and also the /proc/acpi/battery/BATT*/info pseudo-file.  Also, if you have a copy of Flit built with the with the DIAG output enabled and launch it from the command-line, you should see battery info and status updates every 6 seconds.  Maybe post a sample of that too, starting from the app startup and going 30 seconds or so.

If there is a difference in your battery info or status files that lead to crazy math results, I'll try to enhance the parsing in Flit to handle it properly.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 09, 2009, 11:32:41 PM
Dell Mini 9
info
Code: [Select]
present:                 yes
design capacity:         3200 mAh
last full capacity:      3200 mAh
battery technology:      rechargeable
design voltage:          11100 mV
design capacity warning: 420 mAh
design capacity low:     156 mAh
capacity granularity 1:  264 mAh
capacity granularity 2:  3780 mAh
model number:           
serial number:           11
battery type:            Lion
OEM info:                DELL

state:
Code: [Select]
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            0 mA
remaining capacity:      3168 mAh
present voltage:         11100 mV
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 10, 2009, 09:37:35 AM
roberts: The "present rate:            0 mA" could lead to a divide-by-zero, messing up the math.  Boy, those Dell Mini 9's barely use power, huh? ;)

Flit tries to average and smooth the battery discharging rate to make the remaining time estimates more steady.  However, if the ACPI driver is not populating the rate line with a real number, the average rate is also meaningless.  I think I'll enhance the Flit code to derive the rate from the change in remaining capacity over time, if the recent average of the reported rates is zero.
--
Mike
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 10, 2009, 08:49:33 PM
OK, I think I have a fix for roberts' situation of an misleading 'present rate' field in the ACPI battery state pseudo-file.  As I hinted at in the previous comment, Version 0.9.3 of Flit can calculate an effective charging or discharging rate by looking at the overall change in stored charge over time. 

Also made minor changes in the help file and merged in roberts' changed location of the help file (/usr/share/doc/tc/flit_help.htm).

Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 10, 2009, 10:19:30 PM
The hours remaining varies widely, so I don't know how useful it is.
Upon first bootiing, 90% battery displays 2,752 hours remaining!
Then after a short wait, 3hr + mins, a short wait then reports 5hr + min, much later
at 79% it is reporting 4 hours and 7 mins. I get about 4hr when at 100%.

The percentage seems accurate, the hours remaining varies too much to be useful and is too high.
I wonder, if when present rate is not supported,  the popup hours remaining should just be skipped?

On an ASUS S101 netbook, it works extremely well.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 11, 2009, 03:25:23 AM
The hours remaining varies widely, so I don't know how useful it is.
Upon first bootiing, 90% battery displays 2,752 hours remaining!
Then after a short wait, 3hr + mins, a short wait then reports 5hr + min, much later
at 79% it is reporting 4 hours and 7 mins. I get about 4hr when at 100%.

The percentage seems accurate, the hours remaining varies too much to be useful and is too high.

....must have been formulated by an economist
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: bmarkus on September 11, 2009, 03:32:44 AM
Just a side note regarding the accuracy of the remaing time. It is worth to read the 'Motivation' section at the Intelligent Battery Monitor (http://ibam.sourceforge.net/) page:

"Most battery monitors rely on the data provided by the underlying power management system, which in most cases is quite inaccurate for many reasons: Batteries are non-linear, the capacities are wearing off, and among others the actual power usage is highly individual. As rechargable batteries expose a steep voltage drop at low capacity remaining, it is quite common and very annoying, that the reported time remaining is far larger than the actual time that is left to save your data."

BTW, ibam.tce & ibam.tcz are in the 2.x repo.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jemimah on September 11, 2009, 08:49:27 AM
I'm currently tinkering with flwm on puppy linux and had the same problem with there being no clock or battery meter.  I compiled flit and it works well, except the sound control segfaults.

Anyway, I was thinking: flwm already supports a clock in the active title bar, it would be trivial to add a battery percent readout in the same place.  You can fix flwm not to display the title in the active window, so the title does write over your clock and battery status.  The cool about doing it that way is you can always see the clock and battery status, and it wastes no screen real-estate, which stays in line with the flwm philosophy. 
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 11, 2009, 11:37:56 AM
roberts: you are right about the rate being wrong.  Due to a mental blunder, I put in the wrong scaling factor in the effective rate calculation.  There are 12 battery state samples per second, not 10 like I assumed last night (I blame "coding while tired"   :-[).  So the correct conversion factors for the discharging and charging rate should be 720 (samples per hour), not 600.  You can manually patch your code around lines 710 and 735 with the new factor or try the new version 0.9.4 attached here. 

This fix won't help the very unrealistic initial estimates (for the first two or three minutes) when you switch between charging and discharging, or vice-versa.  As bmarkus points out, simple kinds of estimates using the ACPI values are fairly bad.  I may move to more of a "learning" approach where a few observational parameters are stored in the .flit.conf file, so the accuracy should improve over time (multiple charge and discharge cycles), and we can avoid the initially unrealistic results.

jemimah: I'm a Puppy user too, but over the last few months, I'm mostly using TC, which is frugally installed in my Puppy partition.  Anyway, I'm not targeting JWM or Puppy specifically right now, so changes to better support such use are likely to be deferred, but if I can make a simple change to prevent a segfault, I'll try to do that.  Can you provide a few more details about your Puppy environment and what you did exactly in Flit that led to a segfault?  Doesn't Puppy use ALSA for sound?

ALSA should be able to be supported by using amixer (or whatever it is called) in the same way that my earlier Flit versions did with ossmix, but I have a bunch of other things I plan to work on first.  If you are a coder and want to try to add ALSA support, I would consider merging it into my releases.

As for the clock in flwm, I've never tried flwm configured with that option, so I don't know first-hand how that would work, but I strongly suspect that with the normal left-side title bars, there is not enough room for the title and a clock and a battery read-out.  Ususally, there is not enough room for the full title itself!  Maybe if I get the "topside titlebar" version of flwm working, it could be considered.

--
Mike L.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 11, 2009, 12:37:59 PM
Mike, seems much more reasonable now. Thanks.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 11, 2009, 12:43:06 PM
Regarding merging flit into Ttitle bar:
I personally do not like launching many daemons.
I still wear a wristwatch, which far more accurate than a PC clock.
For battery it is nice, especially laptops/netbooks.
Actually, I would rather see daemons lauched from the control panel, or /opt/bootlocal.sh.
That way, the user has the choice on how to use their CPU cycles and memory.

EDIT: Of course, flit could just be offered as an extension and then it can grow to be as fancy and as large as desired.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: robc on September 11, 2009, 12:57:16 PM
I'm having problems with the show/hide sound option. When I try to hide the sound it doesn't go away, instead it covers half the clock. It will go away if I choose to hide the clock and the sound, but will reappear over the clock if I choose to show the clock.

Also the key bindings only work if the right click menu is up.

I don't have OSS or alsa loaded if that would matter.

This is on TC 2.3 with flwm.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: alu on September 11, 2009, 01:12:19 PM
same here with evilwm as mentioned in my post on page 3; meanwhile i have understand that date shows up as popup, very nice.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 11, 2009, 02:43:36 PM
robc: Thanks for the report.  I'll have to test it with no OSS too and try to duplicate the show/hide bug.

As far as the keybindings, yes, the "Alt + (whatever)" key bindings only work if the menu is up.  I may try to automatically open the menu as soon as the alt key is pressed, or maybe I will just make the key combos work the same without the menu is popping up. 

I'm still learning good ways to make various things happen in FLTK.  :)
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: robc on September 11, 2009, 03:33:24 PM
do you need to have the menu open to capture keys in FLTK? I'm not too familiar with FLTK but you should only need the focus in order to register keys... I just see it more useful to have the key bindings available without the need to right click, I would understand needing a focus though as to not interfere with other apps. Plus it would be nice to be able to use the bindings when a mouse isn't present.

It looks though, a great addition to TC  :)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 11, 2009, 06:36:04 PM
robc: FLTK's menu auto-magically makes key-bindings work if you initialize the menu structure with the right text strings.  But, as you have seen, this only works when the menus are open.  It is true that an FLTK app can react to all kinds of key events, so nothing in principle prevents it from having the same key bindings without the menu being open, it just takes some more code.  But perhaps there is an easier way in FLTK... like an "accelerator" resource in the Win32 API.  For the sound control, Flit already reacts to a few different keys.  I can add more of the key bindings at some point.
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 11, 2009, 08:44:29 PM
New version 0.9.5 offers three significant changes:
1) Sound applet cannot be "unhidden" if OSS is not present, so the bug reported by robc should be prevented.  If you try to unhide the sound applet, Flit will warn you if OSS is not found.

2) Battery charge/discharge time estimates are not shown for three minutes after a change in status, preventing unrealistic estimates appearing.

3) Either Alt key automatically pops up the menu, making keyboard use easier.  Maybe not as elegant as menu-less keybinding, but it is less code (keeping Flit a bit smaller).
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 11, 2009, 08:48:38 PM
Jemimah: I wonder if ver 0.9.5 fixes your segfault?  Do you have a /dev/mixer in Puppy?
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 11, 2009, 11:16:34 PM
Just noticed a problem with flit and keyboard shortcuts.

Quote
FLWM popup menu is always readily available by:
   right click on empty area of desktop
   right click on any window title bar
   alt-tab on empty area of desktop

The alt-tab does not work on the desktop where flit is running.
Perhaps other keycodes are an issue as well?


Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on September 12, 2009, 05:17:57 AM
..just tried what I believe is the latest version.

When I first disconnect the power cord, the battery life remaining showed 111%, but it started making more sense (i.e. less than 100%) after a minute or two.

It looks like there's space to add "%" after the battery life remaining number  ;)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 12, 2009, 08:18:05 AM
roberts: Excellent point.  I should have tested a bit more.  I would have realized that trapping the Alt key like that was obnoxious.  :-[  I have now switched all of the Alt+key binding to Ctrl+key combos, and either Ctrl key as well as Esc will pop up the Flit menu if Flit has the input focus.  The one-key controls for sound (Pause, up arrow, dn. arrow, etc.) still work.  I changed the key for clock hiding/unhiding to 'k' so the traditional Ctrl+c "interrupt" key combo would not be masked.  I hope this arrangement is more acceptable to most people.

Juanito: A space before % in tooltips and diag output added. Hey, maybe you discovered an overunity power source!  Better patent it.  :D

Version 0.9.6 attached.
--
Mike
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on September 12, 2009, 08:32:48 AM
Maybe we're speaking at cross purposes or maybe I don't see it on my machine, but I was meaning the number above the battery symbol in the window - at present mine shows "27", can it show "27%"
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 12, 2009, 10:01:50 AM
An Fltk standard is that the escape key is used to close an application.
Using  Esc to call menu is non-standard and could by accident close an opened with focus Fltk application. 
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: fladd on September 12, 2009, 06:51:30 PM
Found a bug:

When the sound icon is set to not show on startup and I load the oss extension then the sound cannot be adjusted with flit!
Killing flit, changing the .flit.conf to show the sound icon, and restart flit with flit .flit.conf solves this.

fladd
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 13, 2009, 08:19:39 AM
fladd: Thanks for reporting.  However, I am fairly sure I just fixed that as of version 0.9.5.  Perhaps you are using the version of Flit that came with TC 2.3?  You could confirm this in the about box.

Just to make sure, I rebooted with the "base" boot option and confirmed your bug report with the older version 0.9.2.  Then I started over with version 0.9.6 and I was able to enable the sound applet after installing OSS and control the sound.  Back when I fixed the bug reported by robc, I made Flit re-check for OSS when you unhide the sound applet.  This fixed both your reported bug and robc's.
--
Mike L.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 13, 2009, 08:39:26 AM
robert: In this new version 0.9.7, I took out the Esc keybinding, with some reluctance.  I'll have to learn not to hit Esc so often.  I liked the symmetry of popping up the menu with Esc, then closing the menu with another tap of Esc.  But now that Ctrl opens the menu, I don't mind it as much to not have Esc doing that.  And I think consistency across apps is importatnt, too, so Esc reverts to the default FLTK behavior.

Juanito: Sorry I misunderstood.  I have added the '%' above the icon when the battery is discharging.
--
Mike L.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: fladd on September 13, 2009, 09:48:40 AM
I have the version that is in the brand new 2.3.1, so that should be fine actually (except the new TC has for some reasons an old version included).

fladd
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 13, 2009, 10:10:15 AM
2.3.1 when cut was made flit was 0.9.5 and now we are at 0.9.7
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 13, 2009, 10:24:06 AM
Perhaps flit would be better offered as an extension.
I could change .xsession to test for its executeable existence for continued seamless experience.

It also seems that flit is useful for other window mangers other than fltk.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: fladd on September 13, 2009, 10:41:21 AM
2.3.1 when cut was made flit was 0.9.5 and now we are at 0.9.7

0.94 you mean. Just checked it.

fladd
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 13, 2009, 11:14:39 AM
I will post 0.9.7 as an extension.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: fladd on September 13, 2009, 11:29:47 AM
I will post 0.9.7 as an extension.

Which will overwrite the one in the core, right? Sounds good I think.

fladd
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 13, 2009, 12:11:39 PM
Posted in repository. See announcement.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 13, 2009, 02:11:14 PM
What would be really useful is for the battery monitor to "beep" when it's down to, say, 10 minutes left. Ever lose documents when the laptop becomes unplugged?
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: curaga on September 13, 2009, 02:21:38 PM
What would be really useful is for the battery monitor to "beep" when it's down to, say, 10 minutes left. Ever lose documents when the laptop becomes unplugged?
Isn't that acpid's business?
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: gerald_clark on September 13, 2009, 02:57:17 PM
My laptop has a dead battery, so I run it off AC.  I certainly don't want it beeping.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 13, 2009, 03:08:08 PM
It would only beep if disconnected from power. Actually, I like the idea of a popup better. I don't think my ACPI setup is currently handling this. (the "alarm" seems to be just for wakeup/sleep ...but no "beep"  )


Here was a script from dsl that issues a popup:
http://www.damnsmalllinux.org/f/topic-3-2-18266-0.html

Code: [Select]
simple battery script called from torsmo

# modprobe battery needs to be done somewhere 1st
# installing beep is one way to make a noise from the background

MAXCAP=$(awk '/^last full capacity:/ {print $4}' /proc/acpi/battery/BAT0/info)

REMAINING=$(awk '/^remaining capacity:/ {print $3}' /proc/acpi/battery/BAT0/state)

CHARGING=$(awk '/^charging state:/ {print $3}' /proc/acpi/battery/BAT0/state)

(( TEST = REMAINING * 5 ))

if [ $CHARGING = discharging ]; then

echo "$REMAINING/$MAXCAP mAh"

if [ $TEST -le $MAXCAP ]; then
beep -l 400 -r 2
popup.lua "LOW BATTERY ALERT! Charge remaining = $REMAINING mAh Less than 20 per cent full.   Recharge now
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 13, 2009, 06:00:19 PM
I think all of the versions I have posted so far will slowly flash the battery icon with a red outline (5 sec red outline, 5 sec normal, ...) , so it draws some attention without inteferring a lot in what you are trying to do. A beep and/or pop-up warning might be nice, but for now, I think I'd like to freeze the features as-is, fix any significant bugs, and call it version 1.0.0.  For the versions leading up to 2.0, we can experiment with some different alert features.  Maybe some new applets too. 
--
Mike L.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 13, 2009, 06:01:11 PM
roberts: Thanks for posting the latest in the repository! -- Mike
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Juanito on September 14, 2009, 03:37:40 AM
Juanito: Sorry I misunderstood.  I have added the '%' above the icon when the battery is discharging.

Looks good now  :)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jemimah on September 14, 2009, 09:09:14 AM
Mike, I

 tried .9.7 on puppy (yes it has /dev/mixer) but it just says "no sound found". 

Also quick question for you.  Have you posted source for your flwm bug fixes anywhere?  It would save me the trouble of fixing all that stuff again for my puppy version.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jls on September 14, 2009, 03:40:43 PM
would it be possible to add support 4 alsa?
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 14, 2009, 04:19:30 PM
Jemimah: If you can compile it, try it with the "#define DIAG" enabled (un-comment it).  You may get a bit more info on why it does not work for you.  But if your sound system is ALSA and not OSS, it will not work currently.

I guess the current "lightly" modified flwm is not posted with the 2.3.1 release of TC.  Maybe roberts can post it soon.

jls_legalize: I'd like to add an ALSA option during the pre-2.0 levels.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 20, 2009, 10:46:06 PM
Any way to get rid of the hotkeys?  They can be a real nuisance (I have a lot of keys that involve ctr-alt)..This is just a utility, not a word-processor or editor.  :)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 21, 2009, 09:51:05 AM
jpeters:  If you click on something else (give input focus to another app), Flit should no longer respond to the Ctrl-key press.  Maybe I can try to make Flit forfeit the input focus on startup so it is not an issue most of the time.
--
Mike
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 21, 2009, 11:03:40 AM
jpeters:  If you click on something else (give input focus to another app), Flit should no longer respond to the Ctrl-key press.  Maybe I can try to make Flit forfeit the input focus on startup so it is not an issue most of the time.
--
Mike

Flit continues to respond with focus on desktop.  That's where all my jwm hotkeys work.  Fact is, how often does someone need to hotkey Flit? You can get rid of all the hotkeys, IMHO. 
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 21, 2009, 07:50:53 PM
Where is the Alt Ctrl  keybinding in the source code .....It must be there somewhere  ??

Edit: found it; comment out line 846. Now I can use it again  :)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: roberts on September 21, 2009, 08:27:44 PM
lines 110-126 and 802
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 21, 2009, 09:03:41 PM
lines 110-126 and 802

Thanks Robert (didn't get  your post in time).   Commenting out 846  worked. 
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 22, 2009, 06:02:31 AM
jpeters: I have not had the time yet to look further into the hotkey and keyboard focus issues, especially on jwm, since I now use flwm.  Maybe jwm handles focus differently will not , and other jwm users will be frustrated in the same way you were before your little modification.      (EDIT: in both flwm and jwm, Flit will not fully release hotkey event-grabbing until the user clicks on another application... clicking on the desktop is not sufficient)

Anyway, I think you make a good case that the keypress-based popup of the menu might not be helpful and/or wanted by everybody, so it should be an option.  So, the next cut of Flit will have an option to not automatically open the menu on the hotkey event (i.e. blocking current line 846 from running), which should make the other Ctrl+key combos only opperable if the menu is opened with a right-click.  This will at least be an option in the .flit.conf configuration file, probably changable from the menu too.
--
Mike L.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 22, 2009, 08:41:21 PM
I have implemented the "jpeters" hotkey-disable function in Flit version 0.9.8. If you don't like the behavior of the Ctrl key poping open the menu automatically, you may select the 'Toggle Ctrl key menu activation' option and save your configuration.  Then the .flit.conf file should have a statement that says "menu_hotkey_activation = 0".  With this set to zero, only the right-click will pop open the menu.  This is the "full" solution to jpeters' concern.

Beyond the option described above, I also now use an XLib call to cause Flit to "unfocus" (ignore keypresses) when it first starts up, so even if the user keeps the menu_hotkey_activation set to 1, Flit will not react to the hotkey until the user sets input focus to Flit.   This is a partial/passive solution to unintended menu pop-ups.

jpeters: I now see that Flit running with flwm does not loose the hotkey behavior if you just click on the "desktop" (blank area of root window).  You need to click on another open application to get Flit off the hotkey. With this new version, you won't need to make your own custom builds.
--
Mike L.
 
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 23, 2009, 12:05:16 AM
Looks like transparency function broke. 
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 23, 2009, 06:22:06 AM
jpeters: Can you provide more info?  I normally use the "transparent" style, and when I tested new version 0.9.8 last night on my TC 2.3 installation, it appeared to me to be working the same as before.  Maybe you tested 0.9.8 on tc 2.4rc1?  Or maybe the background was not "clean" when you had Flit start?

FYI... when the style is set to "transparent", at startup Flit looks at whatever pixel is in the background at the location of the upper left corner where Flit will open itself.  If Flit is starting up as part of the X-Windows startup, normally the pixel under the location of Flit is part of the desktop wallpaper, or a fixed color.  Flit then modifies this color to lighten it and chooses a contrasting color for the clock and icon text and outlines.  However, if there are application windows already open and covering the area where Flit will be located as it starts, the color will be sampled from the app, and is perhaps unpredictable.

Note that this is not true transparency... just picking a background color from a one point sample.  If Flit samples more points, the background color could be averaged, making the color more representative.  Maybe I should call it "translucent"... I think that term more accurately describes the visual effect.  My goal was to make it look like a frosted piece of glass placed over the background with a minimal amount of code and CPU utilization.
--
ML
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: jpeters on September 23, 2009, 08:20:15 AM
I tested on tinycore_2.4rc1, and compared it with the previous version.  0.9.7 changes to the color of desktop background when clicking "transparent style", while 0.9.8. remains white (normal style). Inverse style works.  


Edit:  I made another copy, and now it's working.   :)  Thanks for the mod....way friendlier...
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 27, 2009, 09:01:39 PM
Thanks to a bug report by dentonlt, I have fixed a bug which prevented the battery applet for working on the HP Mini 1001.  In dentonlt's setup, the acpi was reporting charging/discharging rate as "unknown" (a non-numeric string).  The code up thorugh 0.9.8 did not handle this well (won't proceed with remaining time estimates due to missing "rate", although Flit is fully capable of deriving the rate from the changes in remaining capacity.   :-[ )

This new version 0.9.9 does not require any acpi statement of charging/discharging rate, but will use it if it is available.  Now I really hope I don't need to fix anything else before version 1.0.0!
--
Mike L.
Title: Release of version 1.0.0 of Flit
Post by: MikeLockmoore on October 03, 2009, 08:44:03 PM
Let's call this major version done!   :)

Version 1.0.0 is the same as 0.9.9 but the version string has been updated, along with the version string in the .htm help file.

I'll open a new thread when I'm ready to start working toward version 2.0.0.  But first I may work on some other projects.  ;)
--
Mike Lockmoore
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: catcore on July 20, 2011, 01:35:34 AM
HI  MikeLockmoore and other friends:

  I search for wbar clock for a long time. At last I find flit.tcz ( 1.2.1), It's great.

I don't know which different between 1.1.0 and 1.2.1(now tcz)?

And I'll ask a new feature for adjust  fontsize of time ( color is better).
The interface is a slide bar is better ( input number is also good)

Sorry for poor english.

{here must be some good words what I forgot}

catcore

 
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: Rich on July 20, 2011, 10:03:45 AM
Hi catcore
Quote
I don't know which different between 1.1.0 and 1.2.1(now tcz)?
Was the old one a  tce?  If so, those are no longer being used. All extensions are now  tcz.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on July 20, 2011, 07:58:55 PM
Here is the recent revision history from the source code file:

Code: [Select]
// Version 1.3.0 - M. Losh - Released with changes to default values of custom colors
//                           and to the "About" text   

/* Version pre-1.3.0  Jakob Bysewski <jbysewski@googlemail.com>
 *              * ALSA is now working with USB soundcards without a hardware mixer using an alsa virtual softvol device
 *              * flit prevents itself from starting multiple instances using a pidfile
 *              * flit can be made dockable
 *              * flit can be made to appear on all desktops (experimental - to be tested)
 *              * flit got command line parameters using argp
 *              * flit can be passed an optional config file to be used
 *              * support for custom fg and bg colors in config
 */
//

// Version 1.2.2 Fix ALSA bug when selected parameter is Mono

// Version 1.2.1 Fix OSS setsound bug and diag message for OSS setup

// Version 1.2.0 Rounded up version number for public release

// Version 1.1.7 Made size scaling work with floating-point factor

// Version 1.1.6 Support size scaling, fixed hide/show bug

// Version 1.1.5 Compile-time option for OLPC hardware battery support

// Version 1.1.0 ALSA sound control support

// Version 1.0.0 Let's call this major level done!  No real code changes.

The extension currently in the official TC repository is labeled 1.2.1 in the download list and info file, but really contains the 1.2.2 code, I think.  I have not submitted the 1.3 version to the repository yet.  I'll try to get that submitted soon.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: catcore on July 21, 2011, 01:27:48 AM
HI RICH

  I use TC3.7.1 ( and test TC3.8 RC2 in QEMU), use flit.tcz (1.2.1 by info)

and if I want change  fontsize of time in cpp, I only found 1.1.0 flit.cpp in searching this forum.

thanks for reply.


Yours catcore.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: SamK on July 21, 2011, 02:07:00 AM
Hi Mike,

I have not submitted the 1.3 version to the repository yet.  I'll try to get that submitted soon.

Way back in post #1 of this topic you mentioned:
Quote from: MikeLockmoore
If there is interest, I may add CPU monitor and/or network activity monitor applets.
Has there been any progress on these?  Both are good ideas.  The network applet may dovetail nicely with the work currently going on to develop a lightweight wifi management tool.
   
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: catcore on July 21, 2011, 08:27:15 AM
Hi MikeLockmoore
   Thanks for answer the diff of version.
 
 Whould you add new feature for adjust  fontsize of time(and color) with a slide bar in Ver1.3.0 ?
(Or a dropDownlist with 18,24,32.40 ? I think 40 is enough)
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on July 21, 2011, 09:51:41 AM
Quote
Whould you add new feature for adjust  fontsize of time(and color) with a slide bar in Ver1.3.0

Sorry, not in ver 1.3.0. :-\  That version is almost ready and I don't plan to invest more development time before submitting it.  Maybe a future version.  I know editing a .conf file is not as convenient, but within a few minutes you can probably achieve a look that will work well for you.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on July 26, 2011, 10:32:45 AM
Version 1.3.1 is now available from the official Tiny Core repository.  It is essentially the same as the 1.3.0 beta posted many months ago and described in another thread (http://forum.tinycorelinux.net/index.php?topic=8065.0 (http://forum.tinycorelinux.net/index.php?topic=8065.0)).  This new official extension has a fix for a file & directory ownership issue and has an updated help document.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: SamK on July 27, 2011, 02:22:40 AM
Unable to Display in JWM Panel

flit.tcz v1.3.1
jwm.tcz v2.0.1 (TC supported WM)
http://joewing.net/programs/jwm/


This JWM instance has a working:

flit is started from a terminal:

flit is started using a Swallow entry in ~/.jwmrc-tray
   
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on July 27, 2011, 07:44:12 PM
@SamK: Thanks for the report.  Maybe Jakob B. can look into this, since the desktop/docking feature was his idea and code contribution. I'm not a JWM user myself anymore.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: zatman on September 09, 2011, 09:31:20 AM
Mike:  You said in your 1st post, that you might add the CPU monitor and/or network activity monitor applets.  I would love to see both of these get added.  So please, can you add them?

I have a system running DSL (a cousin of TC), which has always had the CPU monitor and  network activity monitor applets.  This simple display, blew me away, and made it seem very cool.  This system has been up and running non-stop for over 1 year, but its getting long in the tooth.

I hope to have a few TC systems running (and take down DSL) in my home (later in the year or next), and would like to see the CPU use and network activity on them.

Thanks
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: curaga on September 09, 2011, 10:26:34 AM
@zatman

DSL used torsmo, a precursor of conky. There are several versions of conky available in our repo.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: MikeLockmoore on September 09, 2011, 10:30:58 AM
@zatman: Thanks for your interest.  I've not had much time available to work on any of my FLTK apps in recent months.  But I've noticed your comment and will keep it in mind as I plan and develop new features.
Title: Re: Flit: an FLTK-native "tray" with clock, sound control, and battery monitor
Post by: gerald_clark on September 09, 2011, 12:48:23 PM
Have you looked at conky?