Jump to content

Growl Native support gone in Alfred 3


Recommended Posts

Looking for some suggestions with Alfed 3. I have a number of workflows that output extensive text and without growl my output is reduced to 2 lines and basically useless.  I know it says I could use growl notify but that is a command line and do not want to rewrite all of my scripts and not sure of an easy way to send multiple outputs like below at one time to growlnotify.  

 

Most of these scripts are BASH shell and output a ton of info to growl that I need to see on the screen and always had the ability to choose a sticky output easily and it read all of the content.

 

#CVO Status

echo ""
echo
echo "DNS Status:"
networksetup -getdnsservers "Thunderbolt Ethernet"
echo
echo "CISCO"
/usr/sbin/traceroute -m 1 wwwin.cisco.com | cut -c 5-46
echo 
echo "INTERNET"
/usr/sbin/traceroute -m 1 www.sgi.com | cut -c 5-33
echo
netstat -rn | egrep 'default|10.117'
Edited by mikedvzo
Link to comment

 

Most of these scripts are BASH shell and output a ton of info to growl that I need to see on the screen and always had the ability to choose a sticky output easily and it read all of the content.

 

 

There are a few different options - you could wire into a Large Type output... or you could wire into a Write File output (set as temporary file), then wire that into an Open File to open it for copying info out of.

 

I actually have some nice ideas for the future to better present data like this :)

Link to comment

Not as elegant but I solved the problem with a BASH Shell action with the following growlnotify command since Alfred 3 does allow objects to be laid anywhere in the chain.

 

Wondering why native Growl support was dumped since Notification center is really limits with the size of the output.  I will need to rewrite quite a few Alfred 2 scripts.  

 

echo "{query}" | /usr/local/bin/growlnotify --title "CVO on THB-ENET2 Status" --sticky

Link to comment

Thanks Andrew for your quick reply.  Large type is a great option for me.   I am curious the Open File how it would be displayed.  

 

 

If you had a Write File followed by an Open File, it would have simply written the output of your script into a file, then the open file would have opened that file in the default editor. This would be useful if you had an extremely large output from a script and wanted to subsequently be able to scroll around the output, copy, paste etc.

 

Growl was removed as, if you haven't already worked out, I take a HUGE amount of pride in keeping Alfred as efficient, lightweight and bug free as possible. The Growl framework hasn't been maintained in a number of years, and Alfred was carrying the weight of the framework for just a handful of users. Seeing as growlnotify can do the same job, I made the call to drop the framework as part of a sweeping analysis to keep Alfred clean, a point well demonstrated in the fact that with all the improvements I've made to Alfred, the Alfred 3 distributable is 2.9MB (vs 4.6MB for Alfred 2).

 

Cheers,

Andrew

Link to comment

I just want to +1 this.  I also use Alfred extensively to put large blobs of text quickly up onto my screen.  Large type is OK but sometimes I just want it quietly up in the corner not disrupting the rest of my screen.  So, growl and growlnotify is my solution.  Thanks for this post because I don't know if I would have otherwise figured this out.

Link to comment

It is not safe to use growl on el capitan - there was no updates for too long - If you use it constantly it may bug a bit and start infinitely eating all your ram + swap - I have 32gb of ddr4 ram + 2 ssds an it eats all of it + 20gb of swap - it is ok when you are using mac and can kill it but if it bugs when you away you are risking to damage your hardware

Link to comment
  • 3 weeks later...

So I have a variation on this, where I don't want to use Large Type. I think there's a very straightforward way to resolve this, since I only want display two lines.

 

 

If I can get my script to feed the "Title" and "Text" in Post Notification, I'm set.

 

Here's the shell script:

QUERY={query}

HOSTC=`host $QUERY | awk '{printf $NF}'`

echo $HOSTC | /usr/bin/grep -q "NXDOMAIN"

if [ $? -eq 0 ] ;then
    $result="$host not found"
else
    ${var:result}="$HOSTC"
fi

 

I figure I can set Title to "{query}" but I need to be able to somehow get the script output to Text in Post Notification.

 

Thoughts?

Mike

Edited by ostertoaster
Link to comment
QUERY={query}

HOSTC=`host $QUERY | awk '{printf $NF}'`

echo $HOSTC | /usr/bin/grep -q "NXDOMAIN"

if [ $? -eq 0 ] ;then
    $result="$host not found"
else
    ${var:result}="$HOSTC"
fi

 

Variables do not work that way at all. In particular, {var:…} doesn't work in scripts.

 

If you want to set variables, you need to output JSON. Probably something like: 

{"alfredworkflow": {"variables": {"title": "This is my title", "text": "And this is the text"}}}

 

See here.

Link to comment
  • 1 year later...
Quote

Andrew,

 

I have a new system and have run Growlnotify on Sierra and High Sierra in the past.  The new system is a work computer and I am back on Sierra.  Growlnotify fails with the following error and I cannot figure out why.  Xcode is installed and so is the growl package for 2.0 same as my other working system that has High Sierra.  Any ideas??

 

2018-01-25 08:36:20.224 growlnotify[3224:28087] Failed to register with (null)

 

@mikedvzo In reply to your message on Andrew's forum profile, given that this is a GrowlNotify error, and we don't have any direct relationship with Growl, it may be worth seeing whether Growl still provides support and post on their forum/support channel.

 

Cheers,
Vero

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...