2.12: How to bring menu to desktop only for rightclick

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
eMeRy
Posts: 86
Joined: Sun 22 Jan 2006, 20:22
Location: Hungary,Europe

2.12: How to bring menu to desktop only for rightclick

#1 Post by eMeRy »

Only jwm puppy can learn it!

It was annoying for me when I tried to start a program with left click on its desktop icon but I missed, and the rootmenu came up instead of starting the desired program.

I've just learnt the jwm configuration page and found how to avoid it.

There's a 'rootmenu' attribute which name is 'onroot' and its description is:
Determine which buttons on the root window activate the menu. This is a list of integers specifying buttons. The default is 123456789.
So you only need to modify this line in /root/jwmrc file:
<!-- jwm menu for puppy Linux -->
<RootMenu label="Start" labeled="false" height="0">
to
<!-- jwm menu for puppy Linux -->
<RootMenu label="Start" labeled="false" height="0" onroot="3">
This way after you reboot X (reboot jwm still buggy) rootmenu come up only for right click of the mouse on desktop.

Bonus: Tweak with the clock in jwmrc file:
<Clock>xclock</Clock>
change to:
<Clock format=" %b %d %R ">xclock</Clock>

It shows the name of the month, day, and clock in 00-24 hour format.

I hope you'll find it useful.
:wink:

virtualsamana
Posts: 5
Joined: Wed 25 Oct 2006, 06:57

#2 Post by virtualsamana »

Wow this is so helpful. If this isn't on the Beginner's Help Forum it should be. Also wondering why future versions of puppy wouldn't have this as its default since the menu on the left click is really annoying especially with a hyper sensitive track pad.

Lovin' the pup,

VM

User avatar
eMeRy
Posts: 86
Joined: Sun 22 Jan 2006, 20:22
Location: Hungary,Europe

#3 Post by eMeRy »

JWM has changed since I wrote this little tweak. Its 1.8rc4 version is in Puppy 2.12b now, and because of the changes in JWM, if you want to use this trick in Puppy, from now you should do some more modification in your jwm configuration files.

Edited 06/12/13
So first you have to modify this line in /root/jwmrc file:
<!-- jwm menu for puppy Linux -->
<RootMenu label="Start" labeled="false" height="0">
to
<!-- jwm menu for puppy Linux -->
<RootMenu label="Start" labeled="false" height="0" onroot="3">
Then in /root/.jwmrc:
<Key mask="A" key="F1">root:1</Key>
line should change to
<Key mask="A" key="F1">root:3</Key>
and in /root/.jwmrc-tray:
<TrayButton label="Menu" icon="mini-dog.xpm"/>
line should change to
<TrayButton label="Menu" icon="mini-dog.xpm">root:3</TrayButton>
and in /root/.jwm/.jwmrc-personal:
<Key key="F12">root:1</Key>
...
<Key mask="A" key="F1">root:1</Key>
lines should change to
<Key key="F12">root:3</Key>
...
<Key mask="A" key="F1">root:3</Key>
That's all :wink:
eMeRy
Last edited by eMeRy on Wed 13 Dec 2006, 19:58, edited 1 time in total.

User avatar
jason.b.c
Posts: 755
Joined: Wed 08 Feb 2006, 05:32
Location: Marshfield,MO
Contact:

Re: 2.12: How to bring menu to desktop only for rightclick

#4 Post by jason.b.c »

eMeRy wrote:
Bonus: Tweak with the clock in jwmrc file:
<Clock>xclock</Clock>
change to:
<Clock format=" %b %d %R ">xclock</Clock>

It shows the name of the month, day, and clock in 00-24 hour format.

I hope you'll find it useful.
:wink:
Yea but what about 12 hour format..?? 12:00 o-clock am ,1:00 o-clock pm

Instead of 0000 hours and 1300 hours..
Puppy is Awesome..!!!!
[url=http://www.puppylinux.com/][img]http://www.browserloadofcoolness.com/sig.png[/img][/url]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#5 Post by Pizzasgood »

Why? I've been using 24-hour time for half a decade now, and I find I miss-set the alarm-clock far less than I used to. It also takes up less space (no tag at the end) and makes calculations easier (the difference between 15 and 8 is much easier than between 3PM and 8AM).
Within the Tray tag the following tags are supported:

* Clock
Add a clock to the tray. The text of this tag may specify a command to run when the clock is clicked. This tag supports the following attributes:
---format
The clock format. See strftime(3) for more information.
---width
The width to use. 0 indicates that the width should be determined from the tray and the font used. The default is 0.
---height
The height to use. 0 indicates that the height should be determined from the tray and the font used. The default is 0.
http://joewing.net/programs/jwm/config.shtml

I believe this is the stuff you need for the clock format:
%l:%M %p
http://www.hmug.org/man/3/strftime.php

You can also set it to have the day of week, seconds since the epoch, etc.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
eMeRy
Posts: 86
Joined: Sun 22 Jan 2006, 20:22
Location: Hungary,Europe

#6 Post by eMeRy »

Yes, that's the way I learnt how to modify the date format few months ago.
My link leads to a linux man page of strftime(3) which probably gives the same content like the BSD or Mac OS one:
http://www.die.net/doc/linux/man/man3/strftime.3.html

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

#7 Post by Henry »

I too dislike that the right click brings up the menu - for example, in the center of the Opera icon ;-)

I went through the above procedure carefully but without success. This is stated for 2.12b. Should it work in 2.12 final, which is what I am using?

Thanks,
Henry

Taavi
Posts: 146
Joined: Fri 10 Mar 2006, 19:23
Location: Suomi, Finland

#8 Post by Taavi »

did you add option: onroot="3" to <RootMenu label="Start" labeled="false" height="0">

I tired this too without success and then noticed i forget this. No it works for me.

Taavi

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

#9 Post by Henry »

Thank you, Taavi. That did it.

Henry

Lefty Mills
Posts: 21
Joined: Mon 17 Apr 2006, 09:54
Location: near the Red Sea

#10 Post by Lefty Mills »

did you add option: onroot="3" to <RootMenu label="Start" labeled="false" height="0">

I would appreciate further clarification. Which file is being modified?
What is the quote of the line before the change, and after the change?

Thank you.
Lefty

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

#11 Post by Henry »

Lefty,

As eMeRy indicated,

In
/root/.jwmrc

Change
<RootMenu label="Start" labeled="false" height="0">
to
<RootMenu label="Start" labeled="false" height="0" onroot="3">

Change
<Key mask="A" key="F1">root:1</Key>
to
<Key mask="A" key="F1">root:3</Key>

In /root/.jwmrc-tray

Change
<TrayButton label="Menu" icon="mini-dog.xpm"/>
to
<TrayButton label="Menu" icon="mini-dog.xpm">root:3</TrayButton>

In /root/.jwm/.jwmrc-personal

Change
<Key key="F12">root:1</Key>
to
<Key key="F12">root:3</Key>

Change
<Key mask="A" key="F1">root:1</Key>
to
<Key mask="A" key="F1">root:3</Key>


I hope I have transcribed his instructions helpfully.

Henry

User avatar
eMeRy
Posts: 86
Joined: Sun 22 Jan 2006, 20:22
Location: Hungary,Europe

#12 Post by eMeRy »

Thanx Henry, your interpretation is excellent :)
I completed my previous post too. I hope now it is clear.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#13 Post by BarryK »

yeah, I reckon it is annoying also, so have made the changes to disable left-click on desktop for Pup 2.13.

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#14 Post by richard.a »

Agreed it's annoying.

Barry, 2.13 and onwards is cool, what about the ongoing ver1 development, will they need to be manually "fixed"?
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#15 Post by BarryK »

I have no idea about ver1 development, ongoing or otherwise. It is below my radar.

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#16 Post by richard.a »

ah :)

I wasn't sure how it all fitted together

I'll keep an eye out for 2.13 anyway.

Thanks.
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

Lefty Mills
Posts: 21
Joined: Mon 17 Apr 2006, 09:54
Location: near the Red Sea

#17 Post by Lefty Mills »

Sorry, but I could not get this to work. I am running Puppy 2.12 and the line in /root/.jwmrc is
<RootMenu label="Menu" labeled="false" height="0">

and not
<RootMenu label="Start" labeled="false" height="0">

Lefty

User avatar
eMeRy
Posts: 86
Joined: Sun 22 Jan 2006, 20:22
Location: Hungary,Europe

#18 Post by eMeRy »

Lefty Mills wrote:Sorry, but I could not get this to work. I am running Puppy 2.12 and the line in /root/.jwmrc is
<RootMenu label="Menu" labeled="false" height="0">

and not
<RootMenu label="Start" labeled="false" height="0">

Lefty
"Menu" or "Start" do not matter. Previous versions of Puppy had "Start" label, the new ones has "Menu".
onroot="3" tells to JWM that the third button's click of the mouse valid for onroot menu. Third button means the right one. (1 - left 2 - middle)
So your solution is:
<RootMenu label="Menu" labeled="false" height="0" onroot="3">
if your choice is right click for root-menu.

You can rename the root-menu button on left end the tray.
Now in .jwmrc-tray file you find this line:
<TrayButton label="Menu" icon="mini-dog.xpm">root:3</TrayButton>
You can rename "Menu" to whatever you want. I modified it to "Puppy".
(modified on 16/12/06)

Lefty Mills
Posts: 21
Joined: Mon 17 Apr 2006, 09:54
Location: near the Red Sea

#19 Post by Lefty Mills »

Thanks for your help but it still doesn't work. Let's forget it. I have added an extension to firefox 2.0 called "foxclocks" which gives me exactly what I want at the lower right corner of my monitor - time to the second, day of week and date.

Lefty

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#20 Post by richard.a »

Lefty,

We appear to be talking at cross purposes here.

If you would like to change the default 12-hour clock to 24-hour notation, you need do just this... only this... and nothing else but this...

Go to the end of the .jwmrc-tray configuration file, and you will see the last three lines are:

Code: Select all

<Clock>minixcal</Clock>
	</Tray>
</JWM>
To get a 24-hour notation clock just one statement needs to be changed, adding in the hieroglyphics format="%H:%M" within the opening tag <Clock>.

So those three lines will now read:

Code: Select all

<Clock format="%H:%M">minixcal</Clock>
	</Tray>
</JWM>
Then click on Restart JWM and the display on the taskbar should show your changes.

Without restarting, the changes you have just done will not show up until your next reboot.

If you choose to Restart X, then you will need to reopen the windows you are currently working in.

Once you have done this, you can experiment - if you wish - with spaces instead of colons between digits, ahead of and/or after the block of hours and minutes, etc, to create exactly the look of the time display you are after.

I've succesfully done this in every version of puppy since 2.02 (latest being 2.12) without any failure since someone told me the secret :)

I hope this helps.



The other stuff in this thread deals with the totally different topic of how to eliminate left click option on the desktop from working, as described in this thread, following the details exactly. I've done this completely succesfully by following the instructions exactly as documented here.

Note that Ver 2.12 onwards (of Puppy) requires more configuration file alterations than the earlier ones. This is where strict attention to the detail posted is needed.

Richard in Australia
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

Post Reply