From 4b5d1fc012c537be3de86a216b2d1540f7e19c44 Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 28 Jan 2022 16:42:13 +0100 Subject: [PATCH] Add two fish functions to encrypt and retrieve password via gpg --- .config/fish/functions/cache.fish | 1 + .config/fish/functions/p.fish | 3 +++ .config/fish/functions/up.fish | 4 ++++ 3 files changed, 8 insertions(+) create mode 100644 .config/fish/functions/p.fish create mode 100644 .config/fish/functions/up.fish diff --git a/.config/fish/functions/cache.fish b/.config/fish/functions/cache.fish index 4ab91b3..64ab2ae 100644 --- a/.config/fish/functions/cache.fish +++ b/.config/fish/functions/cache.fish @@ -5,4 +5,5 @@ function cache /usr/bin/go clean -modcache -cache -testcache /usr/bin/composer clear-cache /usr/bin/python -m pip cache purge + /usr/bin/rm --recursive --force ~/.cache end diff --git a/.config/fish/functions/p.fish b/.config/fish/functions/p.fish new file mode 100644 index 0000000..8ab9862 --- /dev/null +++ b/.config/fish/functions/p.fish @@ -0,0 +1,3 @@ +function p + /usr/bin/gpg --decrypt --quiet ~/.password.enc | xclip -rmlastnl -selection clipboard +end diff --git a/.config/fish/functions/up.fish b/.config/fish/functions/up.fish new file mode 100644 index 0000000..cb96a7f --- /dev/null +++ b/.config/fish/functions/up.fish @@ -0,0 +1,4 @@ +function up + /usr/bin/gpg --yes --output ~/.password.enc --encrypt --recipient "EDIT HERE" ~/.password + /usr/bin/rm --force ~/.password +end