Solved-Use alias & join commands?

Using applications, configuring, problems
Post Reply
Message
Author
Jasper

Solved-Use alias & join commands?

#1 Post by Jasper »

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:

Code: Select all

alias fx=fixmenus
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 Fri 17 Feb 2012, 00:20, edited 1 time in total.

User avatar
duke93535
Posts: 194
Joined: Thu 05 May 2005, 16:45
Location: California , High Desert

#2 Post by duke93535 »

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
Attachments
refresh24.png.gz
(1.82 KiB) Downloaded 158 times
refreshmenus.gz
(377 Bytes) Downloaded 145 times

Jasper

#3 Post by Jasper »

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

stu90

#4 Post by stu90 »

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.

Jasper

#5 Post by Jasper »

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"

Post Reply