Creating menu entry for switching window manager (Solved)

Using applications, configuring, problems
Post Reply
Message
Author
okokoook
Posts: 23
Joined: Thu 08 Dec 2011, 18:33

Creating menu entry for switching window manager (Solved)

#1 Post by okokoook »

hello everyone
here is what i am concerned with. i am currently using lucid puppy 528 with xfce installed.
every time when i try to switch to xfce window manager, i have to exit to prompt and type in "win startxfce4" to launch xfce,and when i want to back to jwm, exit to prompt again and type in "xwin jwm". i wonder is there a way to create a script similar to the "restart x server" thing in the menu to allow users easily switch window manager by simply clicking on the entry in the menu, i have no clue on how to create such a script. if anyone knows how to make it, please help out. your attention and help are really appreciated. thank you in advance

regards

michael
Last edited by okokoook on Sun 26 Feb 2012, 00:44, edited 2 times in total.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#2 Post by RSH »

Usually there is a menu entry called WM Switcher Switch between JWM and Icewm. I do not know xfce, so i can not say where it is in the menu.

Maybe Utilitys, Tools ... ...?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

okokoook
Posts: 23
Joined: Thu 08 Dec 2011, 18:33

#3 Post by okokoook »

RSH wrote:Usually there is a menu entry called WM Switcher Switch between JWM and Icewm. I do not know xfce, so i can not say where it is in the menu.

Maybe Utilitys, Tools ... ...?
thank you for the reply , i do not think there is an entry existed in the menu where we can switch between xfce and jwm. such thing needs to be created manually, but i have no idea about how to modify the script to let it do so. any thought?

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#4 Post by RSH »

okokoook wrote:
RSH wrote:Usually there is a menu entry called WM Switcher Switch between JWM and Icewm. I do not know xfce, so i can not say where it is in the menu.

Maybe Utilitys, Tools ... ...?
thank you for the reply , i do not think there is an entry existed in the menu where we can switch between xfce and jwm. such thing needs to be created manually, but i have no idea about how to modify the script to let it do so. any thought?
What happens if you type wmswitcher into console?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

Hello, okokoook.

Here's a menu I use to do so:

Code: Select all

# (excerpt from an "aemenu")
# save this as 
# /root/my-applications/bin/changewm 
# if you have aemenu

-wide config file for aewm clients

menu "> Restart with..."
        cmd "...echinus" "restartwm echinus"
        cmd "...icewm" "restartwm icewm"		
        cmd "...lxp-icewm" "restartwm lxp-icewm"
        cmd "...jwm" "restartwm jwm"
#      cmd "...pekwm" "restartwm pekwm"
        cmd "...openbox" "restartwm openbox"
        cmd "...oroborus" "restartwm oroborus"
end
In the above, comment / uncomment the wm's you don't have or have.

As you can see the "magic word" is

restartwm plus the name_of_your_wm

which you simply type in a terminal.

You could of course download aemenu (see attached; it's a fresh compile) and create yourself a neat little restart menu in the form of a script such as

Code: Select all

#!/bin/sh
#/root/my-applications/bin/changewm.sh
####
/root/my-applications/bin/aemenu -rc /root/my-applications/bin/changewm
(The full directory mention is needed in the above because aemenu was originally written to be launched from the /usr/X11/bin directory as default. However, I found that it complicates matters to put it there on modern Linuxes.)

Make the above script executable, decorate it with an icon you like, copy it on your desktop and voilà : you'll be able to change wm's on a whim. :-)

Enjoy!
Attachments
aemenu.tar.gz
(7.12 KiB) Downloaded 160 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

okokoook
Posts: 23
Joined: Thu 08 Dec 2011, 18:33

#6 Post by okokoook »

musher0 wrote:Hello, okokoook.

Here's a menu I use to do so:

Code: Select all

# (excerpt from an "aemenu")
# save this as 
# /root/my-applications/bin/changewm 
# if you have aemenu

-wide config file for aewm clients

menu "> Restart with..."
        cmd "...echinus" "restartwm echinus"
        cmd "...icewm" "restartwm icewm"		
        cmd "...lxp-icewm" "restartwm lxp-icewm"
        cmd "...jwm" "restartwm jwm"
#      cmd "...pekwm" "restartwm pekwm"
        cmd "...openbox" "restartwm openbox"
        cmd "...oroborus" "restartwm oroborus"
end
In the above, comment / uncomment the wm's you don't have or have.

As you can see the "magic word" is

restartwm plus the name_of_your_wm

which you simply type in a terminal.

You could of course download aemenu (see attached; it's a fresh compile) and create yourself a neat little restart menu in the form of a script such as

Code: Select all

#!/bin/sh
#/root/my-applications/bin/changewm.sh
####
/root/my-applications/bin/aemenu -rc /root/my-applications/bin/changewm
(The full directory mention is needed in the above because aemenu was originally written to be launched from the /usr/X11/bin directory as default. However, I found that it complicates matters to put it there on modern Linuxes.)

Make the above script executable, decorate it with an icon you like, copy it on your desktop and voilà : you'll be able to change wm's on a whim. :-)

Enjoy!
hello my friend

i just try to summarize what you said to ensure that i got everything right

1.save the content below as changewm.sh in /root/my-applications/bin/ and make it executable

Code: Select all

# (excerpt from an "aemenu")
# save this as 
# /root/my-applications/bin/changewm 
# if you have aemenu

-wide config file for aewm clients

menu "> Restart with..."
        cmd "...echinus" "restartwm echinus"
        cmd "...icewm" "restartwm icewm"		
        cmd "...lxp-icewm" "restartwm lxp-icewm"
        cmd "...jwm" "restartwm jwm"
#      cmd "...pekwm" "restartwm pekwm"
        cmd "...openbox" "restartwm openbox"
        cmd "...oroborus" "restartwm oroborus"
end
2.download and extract the aemenu.tar.gz and put aemenu in /root/my-applications/bin/

3.create a shortcut on the desktop to link the changewm.sh

am i getting it right? thank you

regards

michael

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

Yep! That's it! (Powerful brain, you have!) (:-)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

okokoook
Posts: 23
Joined: Thu 08 Dec 2011, 18:33

#8 Post by okokoook »

musher0 wrote:Yep! That's it! (Powerful brain, you have!) (:-)
wow it works well. this is fantastic. thank you so much, musher0 :D

regards

michael

User avatar
Eyes-Only
Posts: 1043
Joined: Thu 10 Aug 2006, 06:32
Location: La Confederation Abenaquaise

#9 Post by Eyes-Only »

Yes! Thank you as well Musher! Merci mille fois mon cher ami! ;) This is really a great time-saving simple script for someone like me who has around 14 different puplets installed - each having around 10+ different window managers and desktops. I often forget which managers I have on which install but this isn't the case now! A mere click upon the desktop icon and within seconds I'm into my desired desktop!

Really a great tool - I can't thank you enough mon chum! :)

Cheers/Amicalement,

Eyes-Only
"L'Peau-Rouge d'Acadie"
*~*~*~*~*~*
Proud user of LXpup and 3-Headed Dog. 8)
*~*~*~*~*~*

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#10 Post by musher0 »

Don't mention it! / C'est rien ! / De nada!

Okokook, maybe you should add [Resolved] to the title of the thread, since we now have a solution? This is how it's done, usually. You're the only one who can do it, since you started the thread. Just a thought.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

okokoook
Posts: 23
Joined: Thu 08 Dec 2011, 18:33

#11 Post by okokoook »

musher0 wrote:Don't mention it! / C'est rien ! / De nada!

Okokook, maybe you should add [Resolved] to the title of the thread, since we now have a solution? This is how it's done, usually. You're the only one who can do it, since you started the thread. Just a thought.
thank you for the suggestion. sorry, it is my bad. i have modified the title to resolved. thank you once again, musher0

regards

michael

Post Reply