Skip to content

d-hain/fuzzel-pass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fuzzel-pass

A utility to copy passwords from pass using fuzzel.

Usage: {} [password] [options]...

Positional Arguments:
     [password]
         A password to show directly, skipping the selection.

Options:
     -t,--type
         Type the selection instead of copying to the clipboard.
     -h,--help
         Show this help message.

As I have recently switched to using fuzzel instead of wofi i needed a replacement for wofi-pass. So I sat down and wrote this. Feel free to use this as you like, make bug reports using issues or open a PR.

Important!

This assumes that your pass passwords are formatted in the following way:

P@ssword123
login: example@example.com
url: https://example.com

The password MUST be on the first line.

Multiline Fields

Multiline fields are also supported. The syntax is the following:

Field Key:
SOME_UNIQUE_STRING
value
more value
value value value
SOME_UNIQUE_STRING
  • The field key must have nothing but emptyness after the colon!
  • Here SOME_UNIQUE_STRING is the marker for the beginning and end of the multiline value. It MUST NOT occur in the value itself.

Full example for a password file:

password123
field1: github.com
field with space: example value
Private Key:
   PRIVATEKEY
-----BEGIN OPENSSH PRIVATE KEY-----
some private key string
asouu("("(=dsab&(odnsaon6t2
"/&%"("%"(/&"KN")"N§!N"!OINE"
S(/"Bpon)(/")(":89n""=?B&
test
-----END OPENSSH PRIVATE KEY-----
PRIVATEKEY
another field: http://example.com

(the password line CAN be empty, but it MUST exist)

Building / Installation

Clone the repository and cd into it:

git clone https://github.com/d-hain/fuzzel-pass
cd fuzzel-pass

Build from source

cargo build --release

And run using:

./target/release/fuzzel-pass

Build using nix

nix build

And run using:

./result/bin/fuzzel-pass

Build using nix (without cloning the repo)

nix build github:d-hain/fuzzel-pass

Install on NixOS using flakes

# flake.nix
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    fuzzel-pass = {
      url = "github:d-hain/fuzzel-pass";
      # inputs.nixpkgs.follows = "nixpkgs";
    }
  };

  outputs = {
    nixpkgs,
    fuzzel-pass,
    ...
  }: let
    system = "x86_64-linux";
    pkgs = nixpkgs.legacyPackages.${system};
  in {
    nixosConfigurations.default = nixpkgs.lib.nixosSystem {
      system = system;
      specialArgs = { inherit fuzzel-pass; };

      modules = [
        /path/to/configuration.nix
      ];
    };
  };
}
# configuration.nix

{
  config,
  lib,
  pkgs,
  fuzzel-pass,
  ...
}: {
  users.users.USERNAME = {
    packages = with pkgs; [
      (fuzzel-pass.packages.${pkgs.stdenv.hostPlatform.system}.default)
    ];
  };
}

(if enough people use this someday I'll make a PR for adding this to nixpkgs)

About

A utility to copy (or type) passwords from pass using fuzzel.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors