This commit is contained in:
Leafy :3 2025-01-22 09:20:19 +01:00
commit 2f54423dc9
14 changed files with 162 additions and 0 deletions

8
home/dot_bash_profile Normal file
View file

@ -0,0 +1,8 @@
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs

25
home/dot_bashrc Normal file
View file

@ -0,0 +1,25 @@
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc

View file

@ -0,0 +1,2 @@
alias nano="nvim"
alias yum="rpm-ostree"

View file

@ -0,0 +1,29 @@
# vim: filetype=sh
# .bashrc.d/env
## User Directories
## https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
## Set default FZF command
## https://medium.com/@sidneyliebrand/how-fzf-and-ripgrep-improved-my-workflow-61c7ca212861
export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'
export EDITOR='nvim'
export SVN_EDITOR='nvim'
set -o vi
eval "$(dircolors $HOME/.dir_colors)"
export TERM="xterm-256color"
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
export PATH="$PATH:$HOME/.local/bin:$HOME/.asdf/bin:$HOME/.asdf/shims:$HOME/.npm-global/bin:$ANDROID_SDK_ROOT/platform-tools:$HOME/.cargo/bin"
export NPM_CONFIG_PREFIX="$HOME/.npm-global"
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
export TERMINAL="/usr/bin/footclient"

View file

@ -0,0 +1,13 @@
# vim: filetype=sh
#
## Start fish shell for my terminals
## We can use `lchsh` to change the shell, however, because fish cannot read
## shell files it will also disable loading of /etc/profile and what is worse
## even /etc/profile.d/. Thanks to that we are missing a lot of environment
## variables like XDG_DATA_DIR injected by Flatpaks to get the Flatpak Desktop
## files.
## This is a workaround to have fish in terminal but not for the system
## loading.
[ ! -z "$PS1" ] && [ -x /usr/bin/fish ] && exec /usr/bin/fish

View file

@ -0,0 +1,9 @@
# vim: filetype=sh
# .bashrc.d/gpg
## Recommended by GPG agent to resolve issues with not being able to use gpg2.
GPG_TTY=$(tty)
export GPG_TTY
gpgconf --launch gpg-agent
gpg-connect-agent updatestartuptty /bye >/dev/null

View file

@ -0,0 +1,16 @@
# vim: filetype=sh
# .bashrc.d/pathmunge
# Create pathmunge to avoid path duplications
pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}

View file

@ -0,0 +1,4 @@
# vim: filetype=sh
# .bashrc.d/ssh
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/keyring/ssh

View file

@ -0,0 +1,10 @@
# vim: filetype=sh
# .bashrc.d/toolbox
# toolbox customisation
## toolbox path customisation
if [[ "$(cat /proc/sys/kernel/hostname)" = "toolbox" ]] ; then
PATH=$(echo $PATH | sed -e 's;:\?/var/lib/flatpak/exports/bin;;' -e 's;/var/lib/flatpak/exports/bin:\?;;')
pathmunge $HOME/.local/toolbox/bin after
export TERM=xterm-256color
fi

View file

@ -0,0 +1,4 @@
# vim: filetype=fish
# .config/fish/conf.d/aliases.fish
source $HOME/.bashrc.d/aliases

View file

@ -0,0 +1,25 @@
# vim: filetype=fish
# .config/fish/conf.d/env.fish
# Environmental Variables
## User Directories
## https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
set -gx XDG_CONFIG_HOME $HOME/.config
set -gx XDG_CACHE_HOME $HOME/.cache
set -gx XDG_DATA_HOME $HOME/.local/share
set -gx XDG_STATE_HOME $HOME/.local/state
## Set default FZF command
## https://medium.com/@sidneyliebrand/how-fzf-and-ripgrep-improved-my-workflow-61c7ca212861
set -gx FZF_DEFAULT_COMMAND "rg --files --no-ignore-vcs --hidden"
## Default editor
set -gx EDITOR nvim
set -gx SVN_EDITOR nvim
set -gx TERM xterm-256color
set -gx ANDROID_SDK_ROOT "$HOME/Android/Sdk"
set -gx PATH "$PATH:$HOME/.local/bin $HOME/.asdf/bin $HOME/.asdf/shims $HOME/.npm-global/bin $ANDROID_SDK_ROOT/platform-tools $HOME/.cargo/bin"
set -gx NPM_CONFIG_PREFIX "$HOME/.npm-global"

View file

@ -0,0 +1,5 @@
# vim: filetype=fish
# .config/fish/conf.d/fish.fish
set -U fish_greeting
# starship init fish | source

View file

@ -0,0 +1,8 @@
# vim: filetype=fish
# .config/fish/conf.d/gpg
## Recommended by GPG agent to resolve issues with not being able to use gpg2.
set -gx GPG_TTY (tty)
gpgconf --launch gpg-agent
gpg-connect-agent updatestartuptty /bye >/dev/null

View file

@ -0,0 +1,4 @@
# vim: filetype=fish
# .config/fish/conf.d/ssh
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/keyring/ssh