Tiny Core Linux

Tiny Core Base => TCB Tips & Tricks => Topic started by: netnomad on November 15, 2011, 03:57:14 AM

Title: mnttool - position in the right up corner for different resolutions
Post by: netnomad on November 15, 2011, 03:57:14 AM
hi friends, hi roberts,

i use my tc-environment with different xvesa-resolutions.
mnttool should be alwayson on the right side, not just at position 1024.

in the moment mnttool is in my left corner...
i'm a heavy user of the mnttool so it's often under new opened windows...
the usability would be far higher, if i can put it to the right side.

is there a way like
export MNTTOOL="-0 54"?
http://forum.tinycorelinux.net/index.php/topic,11244.msg58927.html (http://forum.tinycorelinux.net/index.php/topic,11244.msg58927.html)

so f.e. -0 means right side

this way seems to be for this subject to overcomplicated, perhaps there is a better way...
http://forum.tinycorelinux.net/index.php/topic,11880.0.html (http://forum.tinycorelinux.net/index.php/topic,11880.0.html)
...in the moment i didn't succeed yet...

Title: Re: mnttool - position in the right up corner for different resolutions
Post by: curaga on November 15, 2011, 08:37:30 AM
Adding -g support to it would be a 1-line patch, adding

Quote
Fl::args(argc, argv);

To the start of main.
Title: Re: mnttool - position in the right up corner for different resolutions
Post by: netnomad on November 15, 2011, 09:01:12 AM
that would  be just a great job!
at what place should this patch be implemented?
do you think you could implement that, or should i ask  roberts to do us this favour?

you say that it's not such a big effort and in the meantime it improves significantly the usability.

how is the recommended way to that patch?
Title: Re: mnttool - position in the right up corner for different resolutions
Post by: curaga on November 15, 2011, 09:35:27 AM
Let's wait and hear what Robert thinks.
Title: Re: mnttool - position in the right up corner for different resolutions
Post by: Rich on November 15, 2011, 09:50:12 AM
Hi netnomad
I believe curaga may have been suggesting that you try this yourself, possibly because the subject
of window placement does not come up that often and currently you are the only one looking for
a change in the behavior of  mnttool.
Install the  compiletc  package
Download the source files for  mnttool
http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/src/fltk_projects/mnttool/ (http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/src/fltk_projects/mnttool/)
Change this:
Code: [Select]
int main(int argc, char **argv) {
  setlocale(LC_ALL, "");
To this:
Code: [Select]
int main(int argc, char **argv) {
  Fl::args(argc, argv);
  setlocale(LC_ALL, "");
I don't see a make file or compile script, so you probably want to compile using something like:
Code: [Select]
gcc -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti -c mnttool.cxx -o mnttool
strip mnttool
If my compiler syntax is incorrect hopefully curaga or someone else will correct me.
Then copy the file to  /usr/local/bin


Title: Re: mnttool - position in the right up corner for different resolutions
Post by: roberts on November 15, 2011, 10:32:40 AM
mnttool already supports user controlled positioning via the env variable MNTTOOL
Example:  MNTTOOL="100 100"

I did not deploy reading command line options as launching mnttool is not normally launched from a shell and in fact with the dynamic nature of Core, it would not be easy specify such. I purposely did not anchor mntttool in any of the four corners, as many users deploy various task bars, pagers, etc along such borders.
Title: Re: mnttool - position in the right up corner for different resolutions
Post by: roberts on November 15, 2011, 10:50:39 AM
OK I add the -g suport, but as I said I will not preset a position in any of the corners due to possible conflicts as stated before.
Title: Re: mnttool - position in the right up corner for different resolutions
Post by: curaga on November 15, 2011, 11:13:51 AM
The env var position code may conflict?
Title: Re: mnttool - position in the right up corner for different resolutions
Post by: roberts on November 15, 2011, 11:37:05 AM
I don't get your point. By the user setting the env variable, they would obviously know their preferred environment, e.,g which taskbar, pager, window manager, or DE. And therefore which would be their preferred location for mnttool.  As it was, +0+0,  I got complaints to move it. I decided to move it off border.
Title: Re: mnttool - position in the right up corner for different resolutions
Post by: curaga on November 16, 2011, 10:32:58 AM
I meant that using only -g and no env var, merely adding that one line may not be enough, as the env var code already had a default position. That default might override the one supplied on the command line.