Menu

#259 having trouble with notification area icon ...

New
nobody
None
High
Defect
2015-08-25
2015-08-23
No

Sorry, I'm a bit confused by the documentation for "yad" ... I'd like to create a notification area icon that when clicked runs a command which opens another application, and then the notification area icon disappears.

I can only figure out how to do one or the other ...

This makes it so that Firefox opens when I click the icon, but the icon doesn't go away:
yad --notification --command='firefox'

This makes it so the icon goes away when clicked, but of course Firefox doesn't open:
yad --notification --command='quit'

How can I get both to happen at once?

Thanks so much for your help!

Discussion

  • Victor Ananjevsky

    1
    2
    3
    4
    #! /bin/sh
    mkfifo yad.pipe
    cat yad.pipe | yad --notification --command='sh -c "firefox && echo quit > yad.pipe'
    rm -f yad.pipe
    
     
    • Anonymous

      Anonymous - 2015-08-25

      Thanks for the suggestion, but it's not working :-/

      If I run that script unmodified, the notification icon appears, but clicking it does nothing.

      If I add an ending double quote just before the ending single quote and run that script, Firefox opens, but the icon does not go away.

       
  • Anonymous

    Anonymous - 2015-08-25

    Nevermind, had to add --listen

     

Log in to post a comment.