Compare commits

..

No commits in common. "7a035d29f79ca80ddf0377342a4b1c8a5e746fe5" and "21a2e570d49ee1bfbb724c893d03c50bc92337de" have entirely different histories.

4 changed files with 49 additions and 9 deletions

View File

@ -1,11 +1,40 @@
awkuniq() {
if [[ "$1" == "-c" ]]; then
awk '{ !x[$0]++ } END { for (i in x) print x[i] "\t" i }'
else
awk '!x[$0]++'
bw-load() {
export BW_SESSION=$(cat $HOME/.bw_session)
}
bw-init() {
if [ ! bw login --check &>/dev/null ]; then
bw login
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() {
sshpass -p "$(rbw get "$1")" ssh ${@:2}
pass=$(bw-load && NODE_OPTIONS="--no-deprecation" bw get password "$1")
sshpass -p "$pass" ssh ${@:2}
}

View File

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

View File

@ -60,6 +60,15 @@
if [[ -n "$SSH_CONNECTION" && "$TERM" == "ghostty" ]]; then
export TERM="xterm-256color"
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 = [