WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mnttool - position in the right up corner for different resolutions  (Read 5238 times)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
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

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
...in the moment i didn't succeed yet...

« Last Edit: November 15, 2011, 04:09:08 AM by netnomad »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: mnttool - position in the right up corner for different resolutions
« Reply #1 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.
« Last Edit: November 15, 2011, 08:39:42 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: mnttool - position in the right up corner for different resolutions
« Reply #2 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?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: mnttool - position in the right up corner for different resolutions
« Reply #3 on: November 15, 2011, 09:35:27 AM »
Let's wait and hear what Robert thinks.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: mnttool - position in the right up corner for different resolutions
« Reply #4 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/
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



Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: mnttool - position in the right up corner for different resolutions
« Reply #5 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.
10+ Years Contributing to Linux Open Source Projects.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: mnttool - position in the right up corner for different resolutions
« Reply #6 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.
10+ Years Contributing to Linux Open Source Projects.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: mnttool - position in the right up corner for different resolutions
« Reply #7 on: November 15, 2011, 11:13:51 AM »
The env var position code may conflict?
The only barriers that can stop you are the ones you create yourself.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: mnttool - position in the right up corner for different resolutions
« Reply #8 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.
10+ Years Contributing to Linux Open Source Projects.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: mnttool - position in the right up corner for different resolutions
« Reply #9 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.
The only barriers that can stop you are the ones you create yourself.