commit 11351e089cdc2800ddac23cf51c1e695867cca0d parent 9085446dfcba747408e737b2c231df802b93932e Author: Sven Möller <sven-moeller@outlook.de> Date: Mon, 7 Feb 2022 01:54:01 +0100 Sorted out environment variables Diffstat:
M | bash/.bashrc | | | 14 | -------------- |
M | bash/.profile | | | 12 | ++++++++++++ |
M | bin/.local/bin/passfill | | | 2 | +- |
3 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/bash/.bashrc b/bash/.bashrc @@ -20,17 +20,3 @@ alias cgp="git -C ~/.dotfiles push" alias cgr="git -C ~/.dotfiles restore" alias cga="git -C ~/.dotfiles add" alias cs="stow -d ~/.dotfiles" - -if [ "$(uname -o)" = "Android" ]; then - export BROWSER=termux-open - export LINK_HANDLER=termux-open - export NOTIFY=termux-toast -elif [ -z "$DISPLAY" ]; then - export BROWSER=w3m - export LINK_HANDLER='lh open' - export NOTIFY=echo -else - export BROWSER='setsid -f qutebrowser' - export LINK_HANDLER='lh open' - export NOTIFY=notify-send -fi diff --git a/bash/.profile b/bash/.profile @@ -10,8 +10,20 @@ export IMAGE_VIEWER=imv git -C ~/.dotfiles pull +if [ "$(uname -o)" = "Android" ]; then + export BROWSER=termux-open + export LINK_HANDLER=termux-open + export NOTIFY=termux-toast +else + export LINK_HANDLER='lh open' +fi + if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then + export BROWSER='setsid -f qutebrowser' + export NOTIFY=notify-send startx elif [ -z "$STY" ] && [ -z "$TMUX" ] && [ "$(uname -o)" != "Android" ]; then + export BROWSER='w3m' + export NOTIFY=echo tmux new -AD && exit fi diff --git a/bin/.local/bin/passfill b/bin/.local/bin/passfill @@ -3,6 +3,6 @@ account="$(gopass ls --flat | dmenu | xargs -r gopass find | head -n1)" entry="$(gopass show "$account")" echo "$entry" | grep "login:" | cut -d' ' -f2 | xclip -echo "$entry" | grep "url:" | cut -d' ' -f2 | xargs -r qutebrowser +echo "$entry" | grep "url:" | cut -d' ' -f2 | xargs -r $BROWSER gopass -c "$account" gopass otp "$account" | xargs -r notify-send -t 60000