From 7197da69d72d3596de8374e78510a8bf5f723ba6 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Sat, 17 Aug 2024 11:07:10 +0800 Subject: [PATCH] chore(global): do some quick `stash apply` after a rebase against main branch Signed-off-by: Andrei Jiroh Halili --- .bash_login | 20 ++++++++++---------- .bash_logout | 3 +-- .profile | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.bash_login b/.bash_login index 541ec8b..1e7101b 100644 --- a/.bash_login +++ b/.bash_login @@ -1,20 +1,17 @@ -#!/usr/bin/env bash -# # shellcheck disable=SC2046,SC1091,SC2155 +#!/data/data/com.termux/files/usr/bin/env bash +# shellcheck disable=SC2046,SC1091,SC2155 -# Stage 0: Source dotenv stuff from homedir +# This is a minimal bash login scrupt for loading local +# configs as well as hooking in byobu on login. + +# source local vars +# TODO: Hook up with dotenvx for decrypting encrypted secrets source "$HOME/.env" if [[ -f "$HOME/.env.local" ]]; then source "$HOME/.env.local" export LOCAL_DOTENV_LOADED=true fi -if [[ $TERMUX ]]; then - export SSH_AGENT_=todo -elif command -v keychain >> /dev/null; then - export KEYCHAIN_PATH=$(command -v keychain) - eval $(keychain --agents gpg,ssh --eval) -fi - # how about detecting local configs if [ -f "$HOME/.config/localconfig.env" ]; then . "$HOME/.config/localconfig.env" @@ -74,3 +71,6 @@ then fi ########################################################################################## +if [[ $FF_BYOBU_ON_LOGIN == "true" || $LC_BYOBU == "1" ]]; then + _byobu_sourced=1 . /data/data/com.termux/files/usr/bin/byobu-launch 2>/dev/null || true +fi diff --git a/.bash_logout b/.bash_logout index de4f5f7..aa71472 100644 --- a/.bash_logout +++ b/.bash_logout @@ -1,7 +1,6 @@ # ~/.bash_logout: executed by bash(1) when login shell exits. # when leaving the console clear the screen to increase privacy - if [ "$SHLVL" = 1 ]; then - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q + command -v clear_console && clear_console -q fi diff --git a/.profile b/.profile index b5984ca..0251e35 100644 --- a/.profile +++ b/.profile @@ -67,6 +67,6 @@ then fi ########################################################################################## -if [[ $LC_BYOBU == "1" ]]; then +if [[ $FF_BYOBU_ON_LOGIN == "true" || $LC_BYOBU == "1" ]]; then _byobu_sourced=1 . /data/data/com.termux/files/usr/bin/byobu-launch 2>/dev/null || true fi