Browse Source

Delete unused files

master
Yorick van Pelt 2 years ago
parent
commit
f79c523b96
3 changed files with 0 additions and 116 deletions
  1. +0
    -12
      release-stable.nix
  2. +0
    -12
      release-unstable.nix
  3. +0
    -92
      rofi/.config/rofi/rofi-pass

+ 0
- 12
release-stable.nix View File

@@ -1,12 +0,0 @@
let pkgs = import <nixpkgs> {config = import ./nix/.nixpkgs/config.nix;};
all_userspace = pkgs.lib.mapAttrs (name: paths: pkgs.buildEnv {inherit name paths;}) pkgs.hosts;
in
with pkgs;
{
dotfiles = {
inherit (import ./default.nix pkgs) woodhouse pennyworth frumar;
};
userspace = {
inherit (all_userspace) woodhouse pennyworth frumar;
};
}

+ 0
- 12
release-unstable.nix View File

@@ -1,12 +0,0 @@
let pkgs = import <nixpkgs> {config = import ./nix/.nixpkgs/config.nix;};
all_userspace = pkgs.lib.mapAttrs (name: paths: pkgs.buildEnv {inherit name paths;}) pkgs.hosts;
in
with pkgs;
{
dotfiles = {
inherit (import ./default.nix pkgs) ascanius jarvis;
};
userspace = {
inherit (all_userspace) ascanius jarvis;
};
}

+ 0
- 92
rofi/.config/rofi/rofi-pass View File

@@ -1,92 +0,0 @@
#!/usr/bin/env bash
set -e
set -o pipefail

print-passwords() {
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
printf '%s\n' "${password_files[@]}"
}

copy-account-field() {
lpass show --clip "--${2}" "$1" >/dev/null 2>/dev/null
}

open-account-url() {
local url=$(lpass show --url "$1")
if [[ -n $url ]]; then
xdg-open "$url" >/dev/null 2>/dev/null
else
exit 2
fi
}

is-actual-url() {
local url="$1"
if [[ -n $url && "$url" != " " && "$url" != "http://" && "$url" != "https://" ]]; then
return 0
else
return 1
fi
}

show-account-options() {
local id="$1"

echo ">> Copy password [$id]"
echo ">> Copy username [$id]"

url=$(lpass show --url "$id")
if is-actual-url "$url"; then
echo ">> Open $url [$id]"
echo ">> Copy URL [$id]"
fi

echo ">> Copy ID [$id]"
}

is-entry-selected() {
if [[ -n $@ ]]; then
return 0
else
return 1
fi
}

id-in-selection() {
echo "$1" | grep -oE '\[[0-9]+\]$' | tr -d '[]'
}

debug() {
echo "$@" > /dev/stderr
}

if is-entry-selected "$1"; then
selected="$1"

id="$(id-in-selection "$selected")"

if [[ -n $id ]]; then
case "$selected" in
'>> Copy password'*)
copy-account-field "$id" password ;;
'>> Copy username'*)
copy-account-field "$id" username ;;
'>> Copy URL'*)
copy-account-field "$id" url ;;
'>> Copy ID'*)
copy-account-field "$id" id ;;
'>> Open'*)
open-account-url "$id" ;;
*)
show-account-options "$id" ;;
esac
else
echo "Could not detect the entry ID of \"${selection}\""
exit 1
fi
else
print-passwords
fi

Loading…
Cancel
Save