Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process commands with options as unique entity #207

Open
cypa opened this issue Dec 15, 2024 · 1 comment
Open

process commands with options as unique entity #207

cypa opened this issue Dec 15, 2024 · 1 comment

Comments

@cypa
Copy link

cypa commented Dec 15, 2024

on wayland I have to add the option every time
chromium --ozone-platform=wayland
so I need the whole command line to appear on tofi list

@bigrand
Copy link

bigrand commented Dec 22, 2024

There are two ways to accomplish this, depending on how you are running tofi.

If you are using tofi in drun mode, it looks up desktop files to create the applications list. Since it uses these desktop files, you only need to modify Chrome/Chromium's .desktop file to run with your desired parameters.

Go to /usr/share/applications, locate Chrome/Chromium's .desktop file, and open it with your preferred text editor. Find the [Desktop Entry] section (this is pretty important) and under it find the line that starts with Exec=. Here you can add any parameters you want.

For example, here's my VSCodium .desktop file's Exec line:

Exec=/usr/bin/codium --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland %F

If you are using tofi in run mode instead, you'll need to:

  1. Create a shell script containing the shebang and your desired command (exactly the command you typed)
  2. Make the script executable
  3. Move it to /usr/bin
  4. Done. The command should appear in tofi run mode.

Certainly, you should search for a dedicated tutorial on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants