Rofi: Add support for Chrome apps

Created on 24 Jan 2016  路  6Comments  路  Source: davatorium/rofi

I noticed that I can't (or at least, I haven't found a way to) run Chrome apps with rofi. Chrome usually stores its .desktop files in ~/.local/share/applications/, but rofi does not recognize them. I have tried moving them to /usr/share/applications/, but that didn't work neither. I then tried adding an alias to them to my ~/.zshrc file like this:

alias kindle="/opt/google/chrome/google-chrome --profile-directory=Default --app-id=ecojfmkpfekmdhffinndgdcibnlehgig"

...but that didn't help neither. Any tips?

Need more information Question (Please follow the guidelines)

Most helpful comment

if I start rofi -show drun -modi drun it works for me.

All 6 comments

Can you be more clear?

 but rofi does not recognize them

What does this mean? it does not show up in rofi, nothing happens when trying to run them?
Aliasses are not 'discovered' by rofi because this is dependent on shell, see the bugtracker on how to integrate aliases for bash and zsh.

Can you pastebin one of the desktop files?

Also pastebin the commandline/config to launch rofi?

Okay, I just did a bit of playing and it turns around I _can_ execute them by typing:

/opt/google/chrome/google-chrome --profile-directory=Default --app-id=mkblfkpniaaiflmdhgopcaopmilgkcpa

...in my rofi, which would, in this case, run the web app for Facebook's messenger. However, doing so seems impossible because I would never be able to differentiate between them just by looking at the application's ID.

Here's one of the .desktop files an example:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Signal Private Messenger
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=bikioccmkafdpakkkcpdbppfkghcmihk
Icon=chrome-bikioccmkafdpakkkcpdbppfkghcmihk-Default
StartupWMClass=crx_bikioccmkafdpakkkcpdbppfkghcmihk

Now that I got that tip for including my aliases in the list of the commands, I will change my rofi command and then I should be able to execute kindle (for example) instead of typing /opt/google/chrome/google-chrome --profile-directory=Default --app-id=ecojfmkpfekmdhffinndgdcibnlehgig. Thanks for the tip!

How do you start rofi? did you enable the DesktopFile run option (drun?)

if I start rofi -show drun -modi drun it works for me.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pigmonkey picture pigmonkey  路  5Comments

atomheartother picture atomheartother  路  5Comments

sangowen picture sangowen  路  5Comments

jparsert picture jparsert  路  6Comments

herrsimon picture herrsimon  路  5Comments