WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Specifying the Placement of Mnttool  (Read 4059 times)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Specifying the Placement of Mnttool
« on: November 27, 2011, 07:11:31 AM »
The recent release notice of TC v4.1 included:
Quote
* Updated mnttool added -g option for user defined initial position when used in .xsession.
What is the correct form to use for such an entry?
   

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11623
Re: Specifying the Placement of Mnttool
« Reply #1 on: November 27, 2011, 10:13:52 AM »
Hi SamK
I believe the syntax is  -g +x +y  so  mnttool -g +100 +200  should offset  mnttool  100 pixels to the
right and 200 pixels down.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Specifying the Placement of Mnttool
« Reply #2 on: November 27, 2011, 11:08:30 AM »
To position to the corners use:

mnttool -g -0+0   top right
mnttool -g -0-0    bottom right
mnttool -g +0+0  top left
mnttool -g +0-0    bottom left

EDIT: corrected top left had an extra leading -



« Last Edit: November 27, 2011, 12:28:13 PM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11623
Re: Specifying the Placement of Mnttool
« Reply #3 on: November 27, 2011, 11:18:40 AM »
Hi roberts
Thanks for that explanation. I was under the false impression that the + signs referred to the
direction of offset, never occurred to me they might refer to which corner to reference.
Quote
mnttool -g -+0+0 top left
I think you have one too many - signs in there.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Specifying the Placement of Mnttool
« Reply #4 on: November 27, 2011, 12:28:55 PM »
Corrected post. Thanks.
10+ Years Contributing to Linux Open Source Projects.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Specifying the Placement of Mnttool
« Reply #5 on: November 28, 2011, 04:48:11 AM »
To position to the corners use:

mnttool -g -0+0   top right
mnttool -g -0-0    bottom right
mnttool -g +0+0  top left
mnttool -g +0-0    bottom left
Thanks thats fine.

Purely for interest...
During a single session, if mnttool is closed then re-opened via a menu, it reverts to the default position (towards upper left) on screen.  Is there a way to force the user choice of location in such circumstances?
   

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Specifying the Placement of Mnttool
« Reply #6 on: November 28, 2011, 05:16:17 AM »
You'd need to edit the .desktop file.
The only barriers that can stop you are the ones you create yourself.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Specifying the Placement of Mnttool
« Reply #7 on: November 28, 2011, 05:31:26 AM »
You'd need to edit the .desktop file.
I have a distant recall of a mnttool variable being available and was wondering if this might be used.
   

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Specifying the Placement of Mnttool
« Reply #8 on: November 28, 2011, 04:46:57 PM »
Sure can. In v3.83 I added the capability of using an environment variable MNTTOOL to specify position of mnttool widget.
Just add to your .profile
Example

export MNTTOOL="800 0"

If you primarily use mnttool via icon or menu then the env variable is easier. If you suppres the icon and primarily start mnttool from .xsession then likely the -g option is more useful.
10+ Years Contributing to Linux Open Source Projects.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Specifying the Placement of Mnttool
« Reply #9 on: November 29, 2011, 01:52:59 AM »
hi friends,

thanks to roberts advice i use a very flexible export-variable to position mnttool at the upper right side
and that fits for all my screen resolution (800x600, 1024x600, 1280x768, 1400x1050).

export MNTTOOL="2000 52"

roberts' export-variable is so flexible that it's always well-positioned :)

for me it was a real enhancement in usability to put the mnttool aside to my active windows,
on the left side i had to much hustle...

thank you, roberts!
« Last Edit: November 29, 2011, 01:54:58 AM by netnomad »

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Specifying the Placement of Mnttool
« Reply #10 on: November 29, 2011, 04:38:25 AM »

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Specifying the Placement of Mnttool
« Reply #11 on: December 04, 2011, 09:03:48 AM »
Having edited .profile to include
Code: [Select]
export MNTTOOL="1024 50" and lived with my preferred placement for a few days everything is fine except for a single, cosmetic issue.

With mnttool running, connecting a USB flash drive and refreshing mnttool results in the drive being correctly included in the mnttool list, however the entire mttool window moves down the screen.  Both the top edge and bottom edge of the window move vertically down the screen.  Attaching a further drive repeats the process.

Removing a drive and refreshing mnttool, the top edge of the window remains in the same (lower) vertical location and the bottom edge moves upward to account for the removed drive.