Giter VIP home page Giter VIP logo

passmenu's Introduction

Passmenu

A popup menu for macOS to search for pass passwords and allow you to easily paste them.

I constantly use the wonderful passmenu dmenu script in Linux, so I wanted to be able to do something similar in macOS. This is very basic, but it works, so someone else may find it useful.

Building

You will need Xcode and Carthage, which you can install with Homebrew:

brew install carthage

Clone the repository and run carthage update to install the HotKey framework. You should now be able to just build in Xcode.

Running

Passmenu depends on pass, which in turn depends on gnupg. You can install these with Homebrew. You will almost certainly also need to have pinentry-mac installed, and your ~/.gnupg/gpg-agent.conf should contain a line like:

pinentry-program /usr/local/bin/pinentry-mac

When you run Passmenu, it will show a status menu on the menu bar that says "pass". You can click this to quit or to search for a password. You can also press the global shortcut Command-Option-P at any time to open the search window.

The password search window simply allows you to type and will search the passwords you have stored in ~/.password-store and display the results. You can use cursor keys to navigate and select an entry by double-clicking or hitting return. When you select an entry, passmenu will run /usr/local/bin/pass to decrypt the password, which should pop up the GPG dialog if necessary (if anything fails, it will probably just crash). Once the password is decrypted it will be copied to the clipboard. 45 seconds later, the clipboard will be cleared.

From the menu, you can select Preferences to configure which repository to search, which pass binary to use and the PATH to use when calling it (which should include /usr/local/bin or wherever you keep your Homebrew).

Caveats

This is pretty basic, but it works. I've added some sanity checks so hopefully you'll get more error notifications than crashes.

I'm not a macOS developer, so this is all from-scratch stuff based on googling every function call I need. Turns out Swift is pretty neat, though. If any experienced ninjas have cool suggestions for better ways to manage things, feel free to create an issue or a PR.

Planned features

It would be nice to be able to automatically search multiple pass repositories, which isn't terribly hard to do. I'd need to show some indication of which repo each result came from to allow you to choose between identical names.

I'd like to make the interaction between UserDefaults and the PassFacade object a bit less clumsy.

More preferency things.

Fancy icons.

passmenu's People

Contributors

jamesmcdonald avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

deadundead

passmenu's Issues

HotKey framework wont build on 4.2.1?

Have you ever seen this error?

13:01:49 MacBookPro:~/git/passmenu > carthage update
*** Cloning HotKey
*** Checking out HotKey at "v0.1.1"
*** xcodebuild output can be found in /var/folders/y0/p2hscz2d12b6cq8v3nxh0mkw3kh7nr/T/carthage-xcodebuild.5O3ufn.log
*** Downloading HotKey.framework binary at "Version 0.1.1"
***  Skipped installing HotKey.framework binary due to the error:
	"Incompatible Swift version - framework was built with 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1) and the local version is 4.2.1 (swiftlang-1000.0.42 clang-1000.10.45.1)."

    Falling back to building from the source
*** Skipped building HotKey due to the error:
Dependency "HotKey" has no shared framework schemes

If you believe this to be an error, please file an issue with the maintainers at https://github.com/soffes/HotKey/issues/new
13:01:54 MacBookPro:~/git/passmenu >

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.