Compare commits

...

2 Commits

Author SHA1 Message Date
Random936
7a035d29f7 Fixed bitwarden functions and removed obsolete ones 2025-03-08 11:22:33 -08:00
Random936
6acdff85dd Switched back to okular from mupdf 2025-03-08 11:03:17 -08:00
4 changed files with 9 additions and 49 deletions

View File

@ -1,40 +1,11 @@
bw-load() { awkuniq() {
export BW_SESSION=$(cat $HOME/.bw_session) if [[ "$1" == "-c" ]]; then
} awk '{ !x[$0]++ } END { for (i in x) print x[i] "\t" i }'
else
bw-init() { awk '!x[$0]++'
if [ ! bw login --check &>/dev/null ]; then
bw login
fi fi
bw sync &>/dev/null || return 1
bw-load
if [[ "$(bw status | jq -rc .status)" == "unlocked" ]]; then
return 0
fi
bw unlock --raw > $HOME/.bw_session
bw-load
}
bw-copy() {
clipboard_cmd=""
if [[ "$(uname)" == "Linux" ]]; then
clipboard_cmd="xsel --clipboard -i"
elif [[ "$(uname)" == "Darwin" ]]; then
clipboard_cmd="pbcopy"
fi
bw-load && NODE_OPTIONS="--no-deprecation" bw get password "$1" | eval $clipboard_cmd
}
bw-clear() {
echo -n "" | xsel --clipboard
} }
bw-ssh() { bw-ssh() {
pass=$(bw-load && NODE_OPTIONS="--no-deprecation" bw get password "$1") sshpass -p "$(rbw get "$1")" ssh ${@:2}
sshpass -p "$pass" ssh ${@:2}
} }

View File

@ -5,8 +5,8 @@
homeDirectory = "/home/${user}"; homeDirectory = "/home/${user}";
}; };
imports = [ imports = [
./shared.nix ./shared.nix
./modules/utils.nix ./modules/utils.nix
./modules/linux-only-utils.nix ./modules/linux-only-utils.nix
./modules/networking.nix ./modules/networking.nix

View File

@ -3,7 +3,7 @@
feh feh
vlc vlc
dconf dconf
mupdf okular
zoom-us zoom-us
discord discord
twinkle twinkle
@ -42,6 +42,4 @@
package = pkgs.materia-theme; package = pkgs.materia-theme;
}; };
}; };
} }

View File

@ -60,15 +60,6 @@
if [[ -n "$SSH_CONNECTION" && "$TERM" == "ghostty" ]]; then if [[ -n "$SSH_CONNECTION" && "$TERM" == "ghostty" ]]; then
export TERM="xterm-256color" export TERM="xterm-256color"
fi fi
awkuniq() {
if [[ "$1" == "-c" ]]; then
awk '{ !x[$0]++ } END { for (i in x) print x[i] "\t" i }'
else
awk '!x[$0]++'
fi
}
''; '';
plugins = [ plugins = [