WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Flit - The Next Generation  (Read 2364 times)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Flit - The Next Generation
« on: June 17, 2023, 11:58:54 PM »
Hello!  I'm back from a long TC hiatus and wanted to revisit my old FLTK apps. 

First up is Flit, the little "System Tray".  When I set up TC CorePure64 vesion 14 and loaded up Flit version 1.3.0, it does not show my current laptop (Lenovo ThinkPad T440p) battery state correctly, so I decided to rewrite the code to work with a more modern implementation of the ACPI battery and charging device drivers.

I have it working fairly well right now.  I have a 64-bit beta version extention here if you would like to test it. Note the help documentation is not updated yet.  If you successfully launch it, you can use the right-click menu to "Save Configuration".  You might be able to adjust the power monitoring parameters if your setup is not to strange.  I hope to make it work with either BAT0 or BAT1 in /sys/class/power_supply/.  The beta version is compiled for verbose output currently.

One build quirk is that I see this warning message:

Code: [Select]
/usr/local/bin/ld: warning: flit has a LOAD segment with RWX permissions
I don't see any practical issues related to this yet.  Are there linker settings or something I should do different to avoid the permissions issue or disable this specific warning?  Thanks for any insight or suggestions!

    [EDIT]: Removed attachment due to forum policy violation.  Rich
« Last Edit: June 20, 2023, 08:41:34 AM by Rich »

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flit - The Next Generation
« Reply #1 on: June 18, 2023, 12:29:21 AM »
Here's a screenshot with Flit 1.4.0 beta 1 in the lower right corner and the verbose console messages that come from the current beta build. 


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Flit - The Next Generation
« Reply #2 on: June 18, 2023, 09:04:13 AM »
Hi MikeLockmoore
Hello!  I'm back from a long TC hiatus and wanted to revisit my old FLTK apps. ...

There were a few changes made to flit during your absence. These 2 posts cover
most of them, but you might want to go through the whole thread:
https://forum.tinycorelinux.net/index.php/topic,22579.msg141520.html#msg141520
https://forum.tinycorelinux.net/index.php/topic,22579.msg141656.html#msg141656
and the latest git:
https://github.com/tinycorelinux/fltk_projects/tree/master/flit

I also did some meddling on fluff. Here are the relevant threads:
https://forum.tinycorelinux.net/index.php/topic,23484.0.html
https://forum.tinycorelinux.net/index.php/topic,25601.0.html
and the latest source package:
http://tinycorelinux.net/12.x/x86/tcz/src/fluff/

Since you were also involved with flwm, you may or may not be interested in this:
https://forum.tinycorelinux.net/index.php/topic,22598.msg141585.html#msg141585
and the latest git:
https://github.com/tinycorelinux/flwm

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flit - The Next Generation
« Reply #3 on: June 18, 2023, 01:52:40 PM »
Hi MikeLockmoore
Hello!  I'm back from a long TC hiatus and wanted to revisit my old FLTK apps. ...

There were a few changes made to flit during your absence. These 2 posts cover
most of them, but you might want to go through the whole thread...

...

I also did some meddling on fluff. ..

...

Since you were also involved with flwm, you may or may not be interested in this ...


Thanks for the pointers!  Will try to catch up.  This 1.4  beta update of Flit is a continuation of my last source archive that I had posted on personal website, so it could be missing something that is in the version on the git repo.  I'll see if I can merge my changes into that and make a pull request.

The last version of Flit I had had contributions (from Jacob B?) for One Laptop Per Child machine support.  I'm not inclined to keep that going forward unless there seems to be an outcry for it still.  I'm not sure those machines will support the latest Linux kernels used in TC anyway, and if they do, perhaps they have ACPI drivers that make them look more like other machines today as far as what we can see in the /sys and /proc filetrees?

For Fluff, I notice that the little sorting indicator is overlapping the text label of the file detail column to which it applies.  At a minimum, I want to shift the column label text slightly to make room for the sort indicator.

A longer term project I'd like to at least explore a bit is to make FLTK apps more scalable, at least my apps.  Flit already has some scaling but the battery and speaker graphics are a crude form of scalable vector drawings, so that is easier.  The aterm app reads the .Xdefaults file to get its font, which allows scaling of the text.  Maybe at least some FLTK apps could read a setting there to scale themselves.  On the other hand, I know the philosophy of TC is to stay very small and light (which I love and appreciate), and scalable dialog boxes and windows and everything could require a lot more code.  I've been away from FLTK long enough I don't remember what mechanisms they had (few that I remember) and what they have in the development version that might make this more or less straightforward.  If I get anywhere, I'll share my experimental results and findings!

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flit - The Next Generation
« Reply #4 on: June 20, 2023, 01:14:41 AM »
Thanks to the pointer from Rich, I've rebased my source code on the version 1.3.2 from the fltk_projects repo, which had his sound level setting saving to the config file feature and a change of location for the help file.  I updated the auto-probe for ACPI path to check both BAT1 and BAT0 under /sys/class/power_supply/.  There were a lot of other minor changes to get clean no-warning compiling.  I updated the help file to mention the new ACPI battery monitoring parameters in the config file. 

If I don't get any issue reports or other significant feedback on this in a week or so, I'll submit a pull request to merge this into the master branch of the fltk_projects repo.

This is version 1.4.1 now.  Enjoy!

    [EDIT]: Removed attachment due to forum policy violation.  Rich
« Last Edit: June 20, 2023, 08:42:11 AM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Flit - The Next Generation
« Reply #5 on: June 20, 2023, 08:45:05 AM »
Hi MikeLockmoore
I'm sorry but your attachments have been removed.

The  Forum Rules and Guidelines  state:
Quote
2. No attachments/links of binary extensions
Found here:
http://forum.tinycorelinux.net/index.php/topic,7738.0.html

You are not allowed to post binary attachments, or direct links to external binaries.
You may post a link that leads to an external site, where someone can then choose to download something.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Flit - The Next Generation
« Reply #6 on: June 29, 2023, 08:44:29 PM »
Hi MikeLockmoore
I'm sorry but your attachments have been removed.
...
You are not allowed to post binary attachments, or direct links to external binaries.
You may post a link that leads to an external site, where someone can then choose to download something.

Oops, sorry!  I can zip up the source and build files and post that, right? 

EDIT: source package attached.  You will need fltk-1.3-dev.tcz, and compiletc.tcz at least to build the flit binary.  You need squashfs-tools.tcz to build the flit.tcz package if you want to put that in your optional extensions folder.

Once you unpack the files, build the binary by the command:
$ make binary

Build the .tcz extension file with
$ make package
« Last Edit: June 29, 2023, 09:09:47 PM by MikeLockmoore »