osx - How can I copy Growl output to the clipboard?

29
2013-07
  • cwd

    Is there any way I can copy Growl notifications to the clipboard, or store them to a file?

    If I get a notification I'd like to be able to do something like right click it and choose "copy to clipboard" or maybe set up a log file that would contain the text that I could then copy.

    Screen shot 2012-03-28 at 12.21.23 PM.png

  • Answers
  • Diago

    The latest MAS version of Growl does support a history feature as well as rollup. The actual log files can be access from the history tab in Growl. Haven't tried copying to the clipboard but is possibly the closest you will get to this functionality.

    Growl History

    I also found this article explaining how to enable a Growl log file to display using GeekTool:

    touch ~/Library/Logs/Growl.log
    defaults write com.Growl.GrowlHelperApp GrowlLoggingEnabled -bool YES
    defaults write com.Growl.GrowlHelperApp GrowlLogType 1
    defaults write com.Growl.GrowlHelperApp "Custom log history 1" /Users/kent/Library/Logs/Growl.log



  • view all most popular Amazon Coupons
    .

    Related Question

    osx - Sharing the Mac OS X clipboard with the internal X server
  • kwutchak

    I'd like to be able to copy and paste between native (Cocoa?) MacOS X apps and those running under Mac's internal X server.

    Currently I can copy and paste independently. If I select text in an xterm window I can paste it back in any other X based window. Similarly, copying information outside X can be pasted into applications which are also outside X.

    As an example, if I (in exactly this order):

    • Copy (select using the mouse) "Copy using X selection" in an xterm window
    • Copy (Edit | Copy) "Text in Firefox" in Firefox
    • Paste (Shift Insert xmodmap) into nano I get "Copy using X selection"
    • Paste (Edit | Paste) here I get -> Text in Firefox
    • Paste in MacVIM (Edit | Paste) I get "Text in Firefox"
    • Paste into /usr/bin/vim (non graphical) I get "Copy using X selection"

    How do I enable "clipboard sharing" between X and Cocoa?

    The xmodmap I am using to paste in X is:

    xmodmap -e "keycode 84 = Insert"
    

    where 84 is the numeric keypad's Enter key. So Shift Enter gives me paste.


  • Related Answers
  • jtb

    You can enable clipboard sync by editing ~/Library/Preferences/org.x.X11.plist and adding the following five boolean keys1 (and checking them).

    sync_clipboard_to_pasteboard
    sync_pasteboard
    sync_pasteboard_to_clipboard
    sync_pasteboard_to_primary
    sync_primary_on_select
    

    Restart X11 and they should be synchronized properly.

    Edit: You can add the keys either with the Property List Editor or with the following Terminal commands:

    defaults write org.x.X11 sync_clipboard_to_pasteboard -boolean true
    defaults write org.x.X11 sync_pasteboard -boolean true
    defaults write org.x.X11 sync_pasteboard_to_clipboard -boolean true
    defaults write org.x.X11 sync_pasteboard_to_primary -boolean true
    defaults write org.x.X11 sync_primary_on_select -boolean true
    

    An alternative solution is to install the latest version of XQuartz which exposes these options through the X11 Preferences >> Pasteboard panel.

  • user47498

    You can also recompile vim-7.3 and add the following to your .vimrc:

    set clipboard=unnamed
    

    Then you'll be able to do 'yy' in vim and paste in Cocoa with Cmd+V. And vice versa: copy with Cmd+V in Cocoa and paste in vim with 'p'