| Author |
Message |
Jasper

Joined: 25 Apr 2010 Posts: 869 Location: England
|
Posted: Tue 14 Feb 2012, 13:33 Post subject:
Solved-Use alias & join commands? |
|
Hi,
Using Slacko 5.3.1 Main/JWM and typing "fx" in a urxvt terminal then pressing Enter works if I insert into /root/.bashrc the line:
I would like to add into the same command after running fixmenus - "jwm -restart" and "exit" so as to close the terminal automatically after running both commands from the single "fx" alias.
It's not important, but I'd be very happy to be educated.
My regards
Last edited by Jasper on Thu 16 Feb 2012, 20:20; edited 1 time in total
|
|
Back to top
|
|
 |
duke93535

Joined: 05 May 2005 Posts: 192 Location: California , High Desert
|
Posted: Tue 14 Feb 2012, 15:51 Post subject:
|
|
Sounds to me like you want to Refresh Menus in one step as was done in Puppy 421? Just add refreshmenus to /usr/bin.
You can add it to the menu by editing the /etc/xdg/templates/_root_jwmrc with this line below the <Program label="Help”..... line.
| Code: | | <Program label="Refresh Menus” icon="refresh24.png">exec /usr/bin/refreshmenus</Program> |
You need to add the icon to /usr/local/lib/X11/pixmaps. To unzip left click and say yes in popup.
You will have to do a fixmenus and a jwm -restart in terminal so it will show up in the menu.
duke
| Description |
|

Download |
| Filename |
refresh24.png.gz |
| Filesize |
1.82 KB |
| Downloaded |
62 Time(s) |
| Description |
|

Download |
| Filename |
refreshmenus.gz |
| Filesize |
377 Bytes |
| Downloaded |
62 Time(s) |
|
|
Back to top
|
|
 |
Jasper

Joined: 25 Apr 2010 Posts: 869 Location: England
|
Posted: Tue 14 Feb 2012, 19:31 Post subject:
|
|
Hi duke93535,
Thank you so much for your clear and excellent help and I am pleased to tell you that I am now using "refreshmenus" which works very well and I like the elegant message and progress bar.
The refreshmenus script was too complicated [for me] to copy the style and to use it to combine more commands. However, I successfully managed multiple [albeit simple] commands with the "xdotool" when I used Lupu 5.1.
My regards and appreciation
|
|
Back to top
|
|
 |
stu90

Joined: 25 Feb 2010 Posts: 1401 Location: England. Dell Inspiron 1501. Dpup
|
Posted: Wed 15 Feb 2012, 03:03 Post subject:
|
|
Hello Jasper,
Sounds like you are sorted now but for your original question - you could try adding to your .bashrc:
alias fx="fixmenus && jwm -restart && exit"
the && lets you run one command after another but only when the command before it has finished.
exmaple: geany && mtpaint - you have to finish / close geany before mtpaint opens.
a single & will let you run the commands at the same time.
example: geany & mtpaint & - both geany and mtpaint will open at the same time.
The exit command at the end will close the terminal.
|
|
Back to top
|
|
 |
Jasper

Joined: 25 Apr 2010 Posts: 869 Location: England
|
Posted: Wed 15 Feb 2012, 04:43 Post subject:
|
|
Hi stu90,
Thank you too. You are also a star writer. Your solution will help with other alias' (to save typing and improve speed) in executing command line actions.
My regards
Note for any less experienced readers [like me] - I tried &&, but it failed because I had the inverted commas in wrong positions.
It seems vital that if there is any space in the full text of the joined commands [except around &&] they should start and end with inverted commas e.g. "command 1 && command 2" or if using the alias feature e.g. alias "command 1 && command 2 && exit"
|
|
Back to top
|
|
 |
|