From 2f54423dc95b387daf51ce0509c38b3f7497eda8 Mon Sep 17 00:00:00 2001 From: Leafus Date: Wed, 22 Jan 2025 09:20:19 +0100 Subject: [PATCH] uwu --- home/dot_bash_profile | 8 +++++ home/dot_bashrc | 25 ++++++++++++++++ home/private_dot_bashrc.d/aliases | 2 ++ home/private_dot_bashrc.d/env | 29 +++++++++++++++++++ home/private_dot_bashrc.d/fish | 13 +++++++++ home/private_dot_bashrc.d/gpg | 9 ++++++ home/private_dot_bashrc.d/pathmunge | 16 ++++++++++ home/private_dot_bashrc.d/ssh | 4 +++ home/private_dot_bashrc.d/toolbox | 10 +++++++ .../fish/conf.d/aliases.fish | 4 +++ home/private_dot_config/fish/conf.d/env.fish | 25 ++++++++++++++++ home/private_dot_config/fish/conf.d/fish.fish | 5 ++++ home/private_dot_config/fish/conf.d/gpg.fish | 8 +++++ home/private_dot_config/fish/conf.d/ssh.fish | 4 +++ 14 files changed, 162 insertions(+) create mode 100644 home/dot_bash_profile create mode 100644 home/dot_bashrc create mode 100644 home/private_dot_bashrc.d/aliases create mode 100644 home/private_dot_bashrc.d/env create mode 100644 home/private_dot_bashrc.d/fish create mode 100644 home/private_dot_bashrc.d/gpg create mode 100644 home/private_dot_bashrc.d/pathmunge create mode 100644 home/private_dot_bashrc.d/ssh create mode 100644 home/private_dot_bashrc.d/toolbox create mode 100644 home/private_dot_config/fish/conf.d/aliases.fish create mode 100644 home/private_dot_config/fish/conf.d/env.fish create mode 100644 home/private_dot_config/fish/conf.d/fish.fish create mode 100644 home/private_dot_config/fish/conf.d/gpg.fish create mode 100644 home/private_dot_config/fish/conf.d/ssh.fish diff --git a/home/dot_bash_profile b/home/dot_bash_profile new file mode 100644 index 00000000..baaaa325 --- /dev/null +++ b/home/dot_bash_profile @@ -0,0 +1,8 @@ +# .bash_profile + +# Get the aliases and functions +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi + +# User specific environment and startup programs diff --git a/home/dot_bashrc b/home/dot_bashrc new file mode 100644 index 00000000..1ed1d53c --- /dev/null +++ b/home/dot_bashrc @@ -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 diff --git a/home/private_dot_bashrc.d/aliases b/home/private_dot_bashrc.d/aliases new file mode 100644 index 00000000..6971c248 --- /dev/null +++ b/home/private_dot_bashrc.d/aliases @@ -0,0 +1,2 @@ +alias nano="nvim" +alias yum="rpm-ostree" diff --git a/home/private_dot_bashrc.d/env b/home/private_dot_bashrc.d/env new file mode 100644 index 00000000..fc6c5472 --- /dev/null +++ b/home/private_dot_bashrc.d/env @@ -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" diff --git a/home/private_dot_bashrc.d/fish b/home/private_dot_bashrc.d/fish new file mode 100644 index 00000000..327a9756 --- /dev/null +++ b/home/private_dot_bashrc.d/fish @@ -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 diff --git a/home/private_dot_bashrc.d/gpg b/home/private_dot_bashrc.d/gpg new file mode 100644 index 00000000..d350a0a4 --- /dev/null +++ b/home/private_dot_bashrc.d/gpg @@ -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 diff --git a/home/private_dot_bashrc.d/pathmunge b/home/private_dot_bashrc.d/pathmunge new file mode 100644 index 00000000..c84b9770 --- /dev/null +++ b/home/private_dot_bashrc.d/pathmunge @@ -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 +} diff --git a/home/private_dot_bashrc.d/ssh b/home/private_dot_bashrc.d/ssh new file mode 100644 index 00000000..3345cf3a --- /dev/null +++ b/home/private_dot_bashrc.d/ssh @@ -0,0 +1,4 @@ +# vim: filetype=sh +# .bashrc.d/ssh + +export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/keyring/ssh diff --git a/home/private_dot_bashrc.d/toolbox b/home/private_dot_bashrc.d/toolbox new file mode 100644 index 00000000..eb34b89b --- /dev/null +++ b/home/private_dot_bashrc.d/toolbox @@ -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 diff --git a/home/private_dot_config/fish/conf.d/aliases.fish b/home/private_dot_config/fish/conf.d/aliases.fish new file mode 100644 index 00000000..f9011df0 --- /dev/null +++ b/home/private_dot_config/fish/conf.d/aliases.fish @@ -0,0 +1,4 @@ +# vim: filetype=fish +# .config/fish/conf.d/aliases.fish + +source $HOME/.bashrc.d/aliases diff --git a/home/private_dot_config/fish/conf.d/env.fish b/home/private_dot_config/fish/conf.d/env.fish new file mode 100644 index 00000000..06f8f0fe --- /dev/null +++ b/home/private_dot_config/fish/conf.d/env.fish @@ -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" diff --git a/home/private_dot_config/fish/conf.d/fish.fish b/home/private_dot_config/fish/conf.d/fish.fish new file mode 100644 index 00000000..a17241b5 --- /dev/null +++ b/home/private_dot_config/fish/conf.d/fish.fish @@ -0,0 +1,5 @@ +# vim: filetype=fish +# .config/fish/conf.d/fish.fish + +set -U fish_greeting +# starship init fish | source diff --git a/home/private_dot_config/fish/conf.d/gpg.fish b/home/private_dot_config/fish/conf.d/gpg.fish new file mode 100644 index 00000000..9bbdc02d --- /dev/null +++ b/home/private_dot_config/fish/conf.d/gpg.fish @@ -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 diff --git a/home/private_dot_config/fish/conf.d/ssh.fish b/home/private_dot_config/fish/conf.d/ssh.fish new file mode 100644 index 00000000..d1b36586 --- /dev/null +++ b/home/private_dot_config/fish/conf.d/ssh.fish @@ -0,0 +1,4 @@ +# vim: filetype=fish +# .config/fish/conf.d/ssh + +export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/keyring/ssh