2

How can I pass an option from a Unity shortcut? For instance, can I invoke "gnome-terminal --maximize" instead of "gnome-terminal" from the Unity shortcut?

Tohuw
  • 310

4 Answers4

1

One way might be to add a Quicklist for the parameters. You can find out how to do that here: What Custom Launchers and Unity Quicklists are available?

1

If you want to pass the option every time you launch an app by clicking on the launcher in the launch bar, this is what you could do:

Install the app called "Alacarte" (also known as "Main Menu") from the Ubuntu Software Center. In this app, you can modify the command called by each launcher, or even create new custom launchers. I think you will like it.

Agmenor
  • 16,394
0

I don't know if by "Unity shortcut" you mean a launcher in the launch bar or any button in the Unity Dash. If you mean the latter, keep on reading.

You can "launch" (execute) commands from Unity with the keyboard shortcut Alt+F2. This opens up a "Run a command" interface, where your previous commands are conveniently remembered.

Agmenor
  • 16,394
0

First off, I apologize to Agmenor for my lack of understanding in his solution.

I now see that the launchers you can modify in alacarte are the same items generated in Dash. Therefore, I was able to customize the terminal item and add the needed parameter, remove the existing Unity launcher, then add the launcher back after executing it from Dash. While this is still a little clunkier than I wanted ideally, it did work.

I consider this question now solved. I will take the time to learn exactly what Alacarte is modifying and perhaps post a future self-answer with details on how to achieve the same effect with no extra tools.

Thank you to everyone who contributed to this solution.

Tohuw
  • 310