GithubHelp home page GithubHelp logo

p0deje / maccy Goto Github PK

View Code? Open in Web Editor NEW
11.7K 64.0 500.0 85.74 MB

Lightweight clipboard manager for macOS

Home Page: https://maccy.app

License: MIT License

Swift 100.00%
macos clipboard-manager maccy

maccy's Introduction

Logo

Downloads Build Status Donate

Maccy is a lightweight clipboard manager for macOS. It keeps the history of what you copy and lets you quickly navigate, search, and use previous clipboard contents.

Maccy works on macOS Mojave 10.14 or higher.

Features

  • Lightweight and fast
  • Keyboard-first
  • Secure and private
  • Native UI
  • Open source and free

Install

Download the latest version from the releases page, or use Homebrew:

brew install maccy

Usage

  1. SHIFT (⇧) + COMMAND (⌘) + C to popup Maccy or click on its icon in the menu bar.
  2. Type what you want to find.
  3. To select the history item you wish to copy, press ENTER, or click the item, or use COMMAND (⌘) + n shortcut.
  4. To choose the history item and paste, press OPTION (⌥) + ENTER, or OPTION (⌥) + CLICK the item, or use OPTION (⌥) + n shortcut.
  5. To choose the history item and paste without formatting, press OPTION (⌥) + SHIFT (⇧) + ENTER, or OPTION (⌥) + SHIFT (⇧) + CLICK the item, or use OPTION (⌥) + SHIFT (⇧) + n shortcut.
  6. To delete the history item, press OPTION (⌥) + DELETE (⌫).
  7. To see the full text of the history item, wait a couple of seconds for tooltip.
  8. To pin the history item so that it remains on top of the list, press OPTION (⌥) + P. The item will be moved to the top with a random but permanent keyboard shortcut. To unpin it, press OPTION (⌥) + P again.
  9. To clear all unpinned items, select Clear in the menu, or press OPTION (⌥) + COMMAND (⌘) + DELETE (⌫). To clear all items including pinned, select Clear in the menu with OPTION (⌥) pressed, or press SHIFT (⇧) + OPTION (⌥) + COMMAND (⌘) + DELETE (⌫).
  10. To disable Maccy and ignore new copies, click on the menu icon with OPTION (⌥) pressed.
  11. To ignore only the next copy, click on the menu icon with OPTION (⌥) + SHIFT (⇧) pressed.
  12. To customize the behavior, check "Preferences…" window, or press COMMAND (⌘) + ,.

Advanced

Ignore Copied Items

You can tell Maccy to ignore all copied items:

defaults write org.p0deje.Maccy ignoreEvents true # default is false

This is useful if you have some workflow for copying sensitive data. You can set ignoreEvents to true, copy the data and set ignoreEvents back to false.

You can also click the menu icon with OPTION (⌥) pressed. To ignore only the next copy, click with OPTION (⌥) + SHIFT (⇧) pressed.

Ignore Custom Copy Types

By default Maccy will ignore certain copy types that are considered to be confidential or temporary. The default list always include the following types:

  • org.nspasteboard.TransientType
  • org.nspasteboard.ConcealedType
  • org.nspasteboard.AutoGeneratedType

Also, default configuration includes the following types but they can be removed or overwritten:

  • com.agilebits.onepassword
  • com.typeit4me.clipping
  • de.petermaurer.TransientPasteboardType
  • Pasteboard generator type
  • net.antelle.keeweb

You can add additional custom types using preferences or defaults:

defaults write org.p0deje.Maccy ignoredPasteboardTypes -array-add "com.myapp.CustomType"

If you need to find what custom types are used by an application, you can use free application Pasteboard-Viewer. Simply download the application, open it, copy something from the application you want to ignore and look for any custom types in the left sidebar. Here is an example of using this approach to ignore Adobe InDesign.

If you accidentally removed default types, you can restore the original configuration:

defaults write org.p0deje.Maccy ignoredPasteboardTypes -array "de.petermaurer.TransientPasteboardType" "com.typeit4me.clipping" "Pasteboard generator type" "com.agilebits.onepassword" "net.antelle.keeweb"

Speed up Clipboard Check Interval

By default, Maccy checks clipboard every 500 ms, which should be enough for most users. If you want to speed it up, you can change it with defaults:

defaults write org.p0deje.Maccy clipboardCheckInterval 0.1 # 100 ms

FAQ

Why doesn't it paste when I select an item in history?

  1. Make sure you have "Paste automatically" enabled in Preferences.
  2. Make sure "Maccy" is added to System Settings -> Privacy & Security -> Accessibility.

When assigning a hotkey to open Maccy, it says that this hotkey is already used in some system setting.

  1. Open System settings -> Keyboard -> Keyboard Shortcuts.
  2. Find where that hotkey is used. For example, "Convert text to simplified Chinese" is under Services -> Text.
  3. Disable that hotkey or remove assigned combination (screenshot).
  4. Restart Maccy.
  5. Assign hotkey in Maccy settings.

How to restore hidden footer?

  1. Open Maccy window.
  2. Press ⌘, to open preferences.
  3. Enable footer in Appearance section.

If for some reason it doesn't work, run the following command in Terminal.app:

defaults delete org.p0deje.Maccy hideFooter

Translations

The translations are hosted in Weblate. You can use it to suggest changes in translations and localize the application to a new language.

Translation status

Motivation

There are dozens of similar applications out there, so why build another? Over the past years since I moved from Linux to macOS, I struggled to find a clipboard manager that is as free and simple as Parcellite, but I couldn't. So I've decided to build one.

Also, I wanted to learn Swift and get acquainted with macOS application development.

License

MIT

maccy's People

Contributors

5idereal avatar columbusux avatar georgekandamkolathy avatar gongchoong avatar kthchew avatar le0zh0u avatar loseth avatar lulor avatar marsavela avatar milotype avatar naijab avatar onurpolattimur avatar ozziekhoo avatar p0deje avatar p3l6 avatar phlpsong avatar pitschr avatar quentinchampenois avatar saeedseyfi avatar simonla avatar smarquez1 avatar tai-zhou avatar thekaleidoscope avatar thewisenerd avatar weblate avatar weensy avatar weisj avatar xjrcode avatar yarons avatar yasingunaydiin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maccy's Issues

Multiple popups with HotKey

Apologies if this is already noted and maybe I can dive in and implement myself when I get the time.

  • CMD+SHIFT+C pops it up, cool
  • If you hit CMD+SHIFT+C without doing anything else, it opens up a second popup that you then need to ESC out of, so if I hit CMD+SHIFT+C 5 times then I need to hit ESC 5 times.
  • CMD+SHIFT+C should really open and close the same window.

Great clipboard tool! Doesn't try to do what it is isn't, simple!

Log?

I would like to have log where all items are stored.

Even better if each item has time stamp. Thanks!

[README] Update process looks scary

This thing may really scare any user:

brew update
brew cask upgrade maccy
killall Maccy # closes the app if it is running
open /Applications/Maccy.app # opens the new version

I think it would be better to add

uninstall quit: 'org.p0deje.Maccy'

to the maccy.rb Cask.

And shorten "Update" to

brew cask upgrade maccy
open -a maccy

Cannot select with arrow keys after using mouse

After using Maccy for some time, selecting with arrow keys and Enter stops working. This bug can be easily reproduced with the following steps:

  1. Pop up Maccy.
  2. Hit down arrow key a couple of times.
  3. Move mouse on top of "Maccy" title field.
  4. Move mouse outside of the menu
  5. Click. Menu is closed now.
  6. Pop up Maccy.
  7. Hit down arrow key a couple of times.
  8. Move mouse on top of "Maccy" title field.
  9. Move mouse outside of the menu
  10. Click. Menu is closed now.
  11. Pop up Maccy.
  12. Hit down arrow key.

At this point selecting with arrow keys stops working.

It seems like the problem lies somewhere in the chain of event handlers below the one Maccy defines. If I change our event handler to call the next one:

diff --git a/Maccy/FilterMenuItemView.swift b/Maccy/FilterMenuItemView.swift
index 7d04f74..ebab227 100644
--- a/Maccy/FilterMenuItemView.swift
+++ b/Maccy/FilterMenuItemView.swift
@@ -86,7 +86,7 @@ class FilterMenuItemView: NSView, NSTextFieldDelegate {
         let eventProcessorPointer = UnsafeMutablePointer<Any>.allocate(capacity: 1)
         eventProcessorPointer.initialize(to: processInterceptedEvent)

-        let eventHandlerCallback: EventHandlerUPP = { _, eventRef, userData in
+        let eventHandlerCallback: EventHandlerUPP = { eventHandlerCallRef, eventRef, userData in
           guard let event = eventRef else { return noErr }
           guard let callbackPointer = userData else { return noErr }

@@ -97,7 +97,9 @@ class FilterMenuItemView: NSView, NSTextFieldDelegate {
           if eventProcessed {
             return noErr
           } else {
-            return OSStatus(Carbon.eventNotHandledErr)
+            let response = CallNextEventHandler(eventHandlerCallRef, event)
+            print("Response \(response)")
+            return response
           }
         }

The in a normal behavior it prints "Response 0" all the time, but when the bug starts it prints "Response -9874" (eventNotHandledErr).

Any help is much appreciated because frankly I have no idea how to fix or workaround this issue.

[Feature Request] snippets/folders like Clipy

I love that somebody is actively developing a lightweight clip board manager! Thank you! 👍🏼

I would like to see two features Clipy features:

  1. being able to delete individual items from the bezel
  2. adding folders to the bottom to have certain clips always at hand

Cheers!

"clear" not working

Screen Shot 2019-10-27 at 22 54 37

The "clear" button does call Menu.clear but the HistoryMenuItem still remains in the menu.
I have to restart the application in order to get the menu cleared.

Copying something else also does weird behavior, like in the attached screenshot.

version: 0.6.0 from homebrew
macOS: catalina

[FEATURE REQUEST] Support for case insensitive fuzzy search

First of all - thanks for very promising tool!
I was wondering - would there be a way that (via configuration) enable fuzzy search so that e.g if I have entry in history:

Foo Bar Baz

and if I search

fbb

it matches entry from above?

Cheers

Customizable key bindings

Right now I have to adjust the key binding in the sources manually and compile the project myself because I got used to cmd+shift+v, but the default keybinding is hardcoded as cmd+shift+c which feels more like copying to me, rather than pasting.

Would be cool if there would be an option in preferences or at least some config file where it can be changed.

Focus on "Quit" on search

Hi,
Thanks for the nice app <3
There is an issue with search functionality:

What happens:

  • When I start typing(searching), it sets the focus on Quit. Even if there is a result for search!

Whats expected:

  1. Quit will close the app completely, so it never should get a focus automatically.
  2. If there is a result for the searched text, it should focus on the first item.
  3. (Optional) You can add Hide option that hides the menu. On search, if there is no result, it can focus on Hide.

Screen record: Record.mov.zip

⌘+C for Clear is a bit weird

When you open Maccy with ⌘+⇧+C and then press ⌘+C by accident, you clear all your work. Maybe give an option to edit or disable this (or even a confirm dialog/Undo last action).

Maccy does not enter any text

On macOS 10.14.1, when I click an item in the Maccy dropdown or menu bar icon menu, or select it with arrow keys and press Enter, no text is entered. Text isn't entered in any app, as far as I can tell.

Otherwise, Maccy is superb! ;)

Possibility of a setting to paste after selection?

I was wondering if you would consider adding an optional setting in Maccy to simulate a Cmd+V keypress after a string is chosen in Maccy - thus pasting whatever has just been moved into the clipboard at the current position of the cursor? I'm not sure how feasible this is on macOS without demanding accessibility permissions from everything.

Auto update option

Can the app have the ability to request update or auto-update within the app

[FEATURE REQUEST] Limit history setting

Hi,

I never reboot my Mac unless it is required , like a system update etc. That's why the clipboard history on Maccy grows enormously. A simple setting for history size, "Keep n clipboards" will be useful.

Allow to pin/bookmark items

There were few requests to support pins/bookmarks of the history items. Here is one of them:

I reply to all of our Yelp! Business requests.  They typically are inquiring about pricing and I have two formatted replies, which I select based on their inquiry.  I then of course edit it to make it more personal to their needs, but it’s handy to have most of the text added on a fly.

While I’m no developer I can offer some random suggestions.

+Maccy continues it’s clean UI.  I wouldn’t want any extra feature to hamper this.
+“Pinned” results will always appear at the top when opening Maccy.
  ++ This can either be with a pinned icon, star, etc.
  ++ This also allows the top pinned results to always be the same command shortcut (unless you’d like the user to be able to add custom)

  • How you’d pin/favorite would be up to you! We both know there’s various ways, either through an addition menu, a submenu, etc.
      ++ I think pins would be the most simple, but folders would apply organization.  The folder option may be too far in another direction though, as Maccy is great to search though.
    +If no pins, maybe a ’tag’ system? Instead of searching for words appropriate for my desired query, I can search the ’tag’.
      ++ I want to find “work”.  I just type work, and it shows the results I tagged appropriately.

This issue is to track this feature and prototype it as there are multiple ways to approach this.

Fresh Maccy install won't start on MacOS Catalina

I just read about Maccy in the Dense Discovery news letter, so I thought I'd give it a try. Installing it via brew was not a problem, but when I try to start it, I get a pop-up that says:

“Maccy.app” can’t be opened because Apple cannot check it for malicious software.

This software needs to be updated. Contact the developer for more information.

Homebrew Cask downloaded this file today at 6:59 AM from github.com.

Control+` hot key doesn't work

I'm trying to set Control+` as my hot key but Maccy wouldn't show up when I hit the combination (after restarting the app, of course).

Here is what I tried so far:

defaults write org.p0deje.Maccy hotKey control+\`
defaults write org.p0deje.Maccy hotKey 'control+`'
defaults write org.p0deje.Maccy hotKey control+\\\`

I used Perf Setter to confirm that the setting is indeed control+`
Any help would be much appreciated.

No such module HotKey

Hi

When trying to compile the project I get the compile error "No such module 'HotKey'. I know it's something to do with packages or whatever, but am lost trying to get this to work.

Help!

Automatically Paste by Default not working

I ran the command in my terminal

defaults write org.p0deje.Maccy pasteByDefault true

closed Maccy and reopened it, and tried a paste after selection and it didnt seem to work

Mojave 10.14.6
Maccy 0.4.1

Paste right away without copying?

Right now when selecting an entry in clipboard history it gets copied to buffer. But to me it would make more sense if it would paste it right away without overwriting existing buffer. Maybe that's a matter of personal opinion/choice, but I wonder what do you think about it

Changes in Hotkey not working

Hello, I'm using this command, but it seems that is not working...

defaults write org.p0deje.Maccy hotKey command+option+v

Anything wrong?

Searching is slow

I wonder if there is a way to make searching faster because right the program hangs for about 10-20 sec on each key press when in the search field, for relatively small clipboard history (about 50-100 entries).

Why is Maccy sending and receiving data?

Activity Monitor suggests that Maccy has sent and received 38 and 68MB of data. Since the clipboard undoubtedly holds some very sensitive text, you could see why this can be troubling.

Can you please clarify?

Screenshot 2019-11-12 at 10 30 31

edit: okay this was really stupid on my part. Apologies.

Sometimes slow and then old list

Hi,
I can't quite reproduce it, but sometimes if I haven't used Maccy in a while (a few minutes to hours) and then press the hotkey, it takes a few seconds to load the list. When this happens I'm always being presented an old list. So I close the context menu right away, immediately press the hotkey again - the list pops up quickly and shows the most recently copied entries.

Originally I had my historySize set to 1000. I've tried reducing it to 100, but still had the same problem. I am running 0.4.0 and I have also tried rebooting the Mac entirely. Any ideas what I could do?

Kind regards

Context menu not respecting dark mode

Firstly, thanks for the hard work making this app. It suits my daily needs perfectly!
As seen in the title the context menu doesn't respect dark mode.

I attempted to see if this could be solved easily using

defaults write org.p0deje.Maccy NSRequiresAquaSystemAppearance 0

which was something I learned about on the Sublime Text forums. Unfortunately this didn't fix the issue. I don't know enough about Swift to do a PR but if I can help in anyway let me know. :)

Screenshot 2019-08-08 at 10 22 48

Features of CopyQ?

I saw Maccy in ProductHunt although there was CopyQ which does a lot feature but buggy on macOS, it would be nice to implement some of the similar CopyQ features.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.