WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Suggestion for Mouse Tool  (Read 2329 times)

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Suggestion for Mouse Tool
« on: May 20, 2011, 07:26:22 AM »
After raising this issue: http://forum.tinycorelinux.net/index.php?topic=9472.0

I came to the conclusion, you can change to a 2 button mouse using this command:

Quote
sed -i 's/-shadow -mouse/-shadow -2button -mouse/' ~/.xsession

You can change to back to a 3 button mouse, using this command

Quote
sed -i 's/-shadow -2button -mouse/-shadow -mouse/' ~/.xsession


I suggest the Mouse Tool be updated, to give the user the option of selecting a 2 button mouse, or a 3 button mouse. The above commands can be used with these selections.
Many people see what is. Some people see what can be, and make a difference.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Suggestion for Mouse Tool
« Reply #1 on: May 20, 2011, 11:29:25 AM »
That assumes options in a particular order.
Better might be:

For 3 button:
sed -i 's/-2button//' ~/.xsession

For 2 button:
sed -i 's/-2button//' ~/.xsession
sed -i 's/-mouse/-2button -mouse/' ~/.xsession

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Suggestion for Mouse Tool
« Reply #2 on: May 20, 2011, 12:24:12 PM »
That would work too

This is what you meant to write

Quote
For 3 button:
sed -i 's/-2button //' ~/.xsession

For 2 button:
sed -i 's/-mouse/-2button -mouse/' ~/.xsession
Many people see what is. Some people see what can be, and make a difference.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Suggestion for Mouse Tool
« Reply #3 on: May 20, 2011, 02:55:50 PM »
No, that is not what I meant.
Your version for the 2 button will add additional -2buttons when they already exist.
That is why I deleted '-2button' first.

You did catch that I forgot the trailing space that might cause growing whitespace.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Suggestion for Mouse Tool
« Reply #4 on: May 20, 2011, 03:14:11 PM »
OK, if it is set up so you can select the 2 button mouse again, when it is already set to the 2 button mouse, you are right.

Another thing to think about. I kept it long in the first post, in case the file is modified in the future, and -mouse appears somewhere else. The way it is at present, it is not a problem.

If it is implemented, Robert can decide how he wants to do it. Maybe different again.
Many people see what is. Some people see what can be, and make a difference.