Hello Everyone,
I have done a new Manna OS and I did a new menu for it, But I want users to be able to change it back to the original one which I have named _root_.jwmrc_old.
Can this be done by GUI. I would also like to have it show up with the menu when it is chosen.
Any help with this would be great Thanks
How do I do this _root_.jwmrc to _root_.jwmrc_old?SOLVED
How do I do this _root_.jwmrc to _root_.jwmrc_old?SOLVED
Last edited by oldyeller on Sun 12 May 2013, 17:47, edited 1 time in total.
Hi.
You can do this easily by having two files: the original and the modified. Put them in a special directory and just copy the wanted menu file to its location and execute fixmenus after this.
Here are two examples of how I do switch Openbox Menu:
Standard Menu
Full Menu
The xdotool command executes a key command defined to popup Openboxmenu by key command - so, I do immediately see the changed Openboxmenu on the screen.
I do use such stuff for several puposes - for example: switching option on/off to create a save file at first shutdown in LazY Puppy and some more...
RSH
Hope that helps
You can do this easily by having two files: the original and the modified. Put them in a special directory and just copy the wanted menu file to its location and execute fixmenus after this.
Here are two examples of how I do switch Openbox Menu:
Standard Menu
Code: Select all
#!/bin/sh
xdotool key alt+control+w
#rm /usr/share/applications/obmenuwrapper.desktop
cp -af /usr/share/applications-desktop-files/admin/openbox/obmenu-refresh-full-lp2.desktop /usr/share/applications-desktop-files/admin/obmenuwrapper.desktop
ln -s -f /usr/share/applications-desktop-files/admin/obmenuwrapper.desktop /usr/share/applications/obmenuwrapper.desktop
cp -af /usr/share/applications-desktop-files/admin/openbox/obmenu-refresh-std-lp2 /usr/bin/obmenu-refresh
sleep .1
fixmenus
xdotool key alt+control+w
exit 0
Code: Select all
#!/bin/sh
xdotool key alt+control+w
#rm /usr/share/applications/obmenuwrapper.desktop
cp -af /usr/share/applications-desktop-files/admin/openbox/obmenu-refresh-std-lp2.desktop /usr/share/applications-desktop-files/admin/obmenuwrapper.desktop
ln -s -f /usr/share/applications-desktop-files/admin/obmenuwrapper.desktop /usr/share/applications/obmenuwrapper.desktop
cp -af /usr/share/applications-desktop-files/admin/openbox/obmenu-refresh-full-lp2 /usr/bin/obmenu-refresh
sleep .1
fixmenus
xdotool key alt+control+w
exit 0
I do use such stuff for several puposes - for example: switching option on/off to create a save file at first shutdown in LazY Puppy and some more...
RSH
Hope that helps
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]
The new LazY Puppy Information Centre[/url][/b]
Hi RSH,
this is what I end up doing
I did this in the cli, but I would like to do this with xmessage have it say menu1 or menu2 I will need to take a look at this and see what I can come up with.
Cheers
this is what I end up doing
Code: Select all
cp -f /root/my-document/jwm1/_root_.jwmrc /etc/xdg/templates
fixmunes
restartwm
Cheers
Hi.
As you might have noticed in the two examples: I do copy two files!
The second file is a .desktop file for a menu entry that shows the revert of the current used menu (to switch to it). So, if full menu is enabled, the menu shows option (entry) for standard and revert!
Just to make sure...
As you might have noticed in the two examples: I do copy two files!
The second file is a .desktop file for a menu entry that shows the revert of the current used menu (to switch to it). So, if full menu is enabled, the menu shows option (entry) for standard and revert!
Just to make sure...
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]
The new LazY Puppy Information Centre[/url][/b]
By the way:
I think it is better to change this:
to this
Note the '/' at the end of destination path and '-a' option to keep its properties/permissions (to keep it 'as is').
I think it is better to change this:
Code: Select all
cp -f /root/my-document/jwm1/_root_.jwmrc /etc/xdg/templates
Code: Select all
cp -af /root/my-document/jwm1/_root_.jwmrc /etc/xdg/templates/
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]
The new LazY Puppy Information Centre[/url][/b]
Hi RSH,
This is what I have done
I changed the jwm1 to jwm2 for the other script and it all works great. Will put this in the next build.
Thanks
This is what I have done
Code: Select all
#!/bin/sh
cp -af /usr/local/jwm1/_root_.jwmrc /etc/xdg/templates/
fixmenus
restartwm
exit 0
Thanks