summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/.bash_profile8
-rw-r--r--bash/.bashrc7
-rwxr-xr-xqutebrowser/.local/share/qutebrowser/userscripts/user-password11
3 files changed, 16 insertions, 10 deletions
diff --git a/bash/.bash_profile b/bash/.bash_profile
index d7297c5..d0742ef 100644
--- a/bash/.bash_profile
+++ b/bash/.bash_profile
@@ -1,7 +1,3 @@
-# Prompt
-if [[ -n $SSH_CLIENT ]]; then
- PS1=$'\w \e[0;31m$\e[0m '
-else
- PS1='\w $ '
-fi
+# Source .bashrc if it exists
+[[ -f ~/.bashrc ]] && source ~/.bashrc
diff --git a/bash/.bashrc b/bash/.bashrc
index 23b523d..387b5d6 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -1,2 +1,9 @@
+# Prompt
+if [[ -n $SSH_CLIENT ]]; then
+ PS1=$'\w \e[0;31m$\e[0m '
+else
+ PS1='\w $ '
+fi
+
# FZF
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/user-password b/qutebrowser/.local/share/qutebrowser/userscripts/user-password
index 33ca7b5..c2db041 100755
--- a/qutebrowser/.local/share/qutebrowser/userscripts/user-password
+++ b/qutebrowser/.local/share/qutebrowser/userscripts/user-password
@@ -1,7 +1,10 @@
#!/usr/bin/env bash
target=$(find $HOME/.password-store/ -name "*.gpg" -printf "%P\n" | dmenu -i -p "Get identifier for:")
-echo "fake-key '<Esc>'" >> $QUTE_FIFO
-echo "fake-key '$(basename $target .gpg)'" >> $QUTE_FIFO
-echo "fake-key '<Tab>'" >> $QUTE_FIFO
-echo "fake-key '$(pass show ${target%.gpg})'" >> $QUTE_FIFO
+username=$(basename $target .gpg | sed 's/\\/\\\\/g; s/"/\\"/g')
+password=$(pass show ${target%.gpg} | sed 's/\\/\\\\/g; s/"/\\"/g')
+echo "fake-key '<Esc>'" >> $QUTE_FIFO
+echo "fake-key \"$username\"" >> $QUTE_FIFO
+echo "fake-key '<Tab>'" >> $QUTE_FIFO
+echo "fake-key \"$password\"" >> $QUTE_FIFO
+echo "fake-key \"$password\"" > ~/.test