How can I set default command arguments for apps in CachyOS?

0
0
Asked By MellowMoon123 On

I'm using CachyOS with Hyprland and prefer launching applications directly from the terminal. However, some applications require additional arguments to run correctly. While I could create a shell script for each app with the necessary arguments, that would clutter my home directory or require me to navigate to their paths each time. Is there a way to customize commands like 'firefox' or 'discord' to always include these arguments by default? I've heard that .desktop files can specify 'exec = ' to include arguments, but my applications folder is empty, so I'm not sure how to implement that.

4 Answers

Answered By TechieTagalong77 On

To clarify about the .desktop files: those are mainly for GUI launchers and won't affect what happens when you type commands in the shell itself, like `firefox`. But if you just want to add some custom parameters, stick to aliases—they're much simpler!

Answered By CuriousCoyote42 On

You can easily set this up using aliases! Just add a line like `alias firefox="firefox --foo --bar"` to your `.bashrc` or the equivalent for your shell, and it will always include those arguments when you run the command.

Answered By ScriptSage99 On

Really, using shell aliases should do the trick without any need for complex scripts. If you're considering a more permanent fix, make sure to save these in either your `.bashrc` or a separate `.bash_aliases` file. That way, they can load up every time you open a new terminal.

Answered By HelpfulHiker88 On

Just to clarify, when you mention 'default command,' are you referring to launching an app through a file manager or just running commands in the terminal? If it's in the terminal, setting up aliases is the way to go.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.