Skip to content

Instantly share code, notes, and snippets.

@NISH1001
Created October 6, 2018 02:47
Show Gist options
  • Save NISH1001/c5c72dffab348b4a9e3903585f3154f4 to your computer and use it in GitHub Desktop.
Save NISH1001/c5c72dffab348b4a9e3903585f3154f4 to your computer and use it in GitHub Desktop.
Lunch chromium app directly withou opening the browser

First get the app id

  • Go to the pat h/home/paradox/.local/share/applications/
  • When you open each file, you will see the texts in following format:
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=ScreenMeter Time Tracker
Exec=chromium --profile-directory=Default --app-id=ngdikfecpjmmbbfoleehgojgmekeehad
Icon=chrome-ngdikfecpjmmbbfoleehgojgmekeehad-Default
StartupWMClass=crx_ngdikfecpjmmbbfoleehgojgmekeehad
  • Just copy the Exec part for next step

Create a bash script

  • Create a bash script such as some-name.sh.
  • Inside this, paste the Exec part
  • Make sure the script is executable that can be done using chmod command
  • add the script to the system path

Note The --profile-directory=Default part can be ignore

Little of rofi

I use Rofi as an application luncher/switcher with my i3 configuration.
So, I put the script inside /bin/ path directly so that Rofi will be able to catch the script name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment