From a44dde93388f1c5c9ed6ea73d5e9ee7849e2d475 Mon Sep 17 00:00:00 2001 From: Filip Wandzio Date: Sat, 24 Jan 2026 09:01:19 +0100 Subject: Update thesis --- shell/bash/.bash_profile | 7 -- shell/bash/.bashrc | 130 ++++++++++++++------------------- shell/dash/.profile | 27 ++++++- shell/zsh/.zprofile | 3 - shell/zsh/.zsh/zsh-autosuggestions | 1 - shell/zsh/.zsh/zsh-syntax-highlighting | 1 - shell/zsh/.zshenv | 1 - shell/zsh/.zshrc | 115 ----------------------------- 8 files changed, 80 insertions(+), 205 deletions(-) delete mode 100644 shell/zsh/.zprofile delete mode 160000 shell/zsh/.zsh/zsh-autosuggestions delete mode 160000 shell/zsh/.zsh/zsh-syntax-highlighting delete mode 100644 shell/zsh/.zshenv delete mode 100644 shell/zsh/.zshrc (limited to 'shell') diff --git a/shell/bash/.bash_profile b/shell/bash/.bash_profile index f702739..3f56aa0 100644 --- a/shell/bash/.bash_profile +++ b/shell/bash/.bash_profile @@ -1,8 +1 @@ -# -# ~/.bash_profile -# - [[ -f ~/.bashrc ]] && . ~/.bashrc -. "$HOME/.cargo/env" - -echo 75 > /sys/class/backlight/intel_backlight/brightness diff --git a/shell/bash/.bashrc b/shell/bash/.bashrc index 61c9b03..75cc861 100644 --- a/shell/bash/.bashrc +++ b/shell/bash/.bashrc @@ -1,92 +1,70 @@ -parse_git_branch() { - local branch="" - branch=$(git branch 2> /dev/null | sed -n '/^[^*]/d;s/* \(.*\)/\1/p') - local git_status=$(git status --porcelain 2>/dev/null) - - if [ -n "$branch" ]; then - branch="(${branch}) " - fi +[[ $- != *i* ]] && return - echo "$branch" +parse_git_branch() { + local branch + branch=$(git symbolic-ref --short HEAD 2>/dev/null) || return + printf '(%s) ' "$branch" } - update_prompt() { - PS1="\[\e[31m\][\[\e[33m\]\u\[\e[32m\]@\[\e[34m\]\h \[\e[35m\]\w\[\e[31m\]]\[\e[35m\] \[\e[33m\]\$(parse_git_branch)\[\e[34m\]# \[\e[0m\]" + PS1="\u@\h \W \$(parse_git_branch)# " } -PROMPT_COMMAND="update_prompt" - -if [ -z "$XDG_RUNTIME_DIR" ]; then - XDG_RUNTIME_DIR="/tmp/$(id -u)-runtime-dir" - mkdir -pm 0700 "$XDG_RUNTIME_DIR" - export XDG_RUNTIME_DIR -fi - -export XDG_DATA_HOME="$HOME"/.local/share -export XDG_CONFIG_HOME="$HOME"/.config -export XDG_STATE_HOME="$HOME"/.local/state -export XDG_CACHE_HOME="$HOME"/.cache -#export PATH=$PATH:$(xdg-user-dir USER)/.local/bin +PROMPT_COMMAND="update_prompt${PROMPT_COMMAND:+;$PROMPT_COMMAND}" + +export R_HOME_USER="$XDG_CONFIG_HOME/R" +export R_PROFILE_USER="$XDG_CONFIG_HOME/R/profile" +export R_HISTFILE="$XDG_CONFIG_HOME/R/history" +export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc" +export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default" +export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" +export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history" +export SCREENRC="$XDG_CONFIG_HOME/screen/screenrc" +export SCREENDIR="$XDG_RUNTIME_DIR/screen" +export PLATFORMIO_CORE_DIR="$XDG_DATA_HOME/platformio" +export BUN_INSTALL="$XDG_DATA_HOME/bun" +export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" +export W3M_DIR="$XDG_STATE_HOME/w3m" +export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker" export XDG_CURRENT_DESKTOP=dwm export XDG_SESSION_DESKTOP=dwm -export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv -export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc -export LESSHISTFILE="$XDG_CACHE_HOME"/less/history +export TMUX_TMPDIR="$XDG_RUNTIME_DIR" +export CARGO_HOME="$XDG_DATA_HOME/cargo" +export RUSTUP_HOME="$XDG_DATA_HOME/rustup" +export GOPATH="$XDG_DATA_HOME/go" +export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv" +export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc" +export LESSHISTFILE="$XDG_CACHE_HOME/less/history" +export HISTFILE="$XDG_STATE_HOME/bash/history" export EDITOR=/usr/bin/nvim export BUILDDIR=/tmp/makepkg -export RAVEDUDE_PORT=/dev/ttyACM0 -export BUN_INSTALL="$HOME/.bun" -export PATH="$BUN_INSTALL/bin:$PATH" -export PATH="$HOME/.cargo/bin:$PATH" -export ANDROID_HOME=$HOME/Android/sdk -export PATH=$PATH:$ANDROID_HOME/emulator -export PATH=$PATH:$ANDROID_HOME/platform-tools export AWT_TOOLKIT=MToolkit export _JAVA_AWT_WM_NONREPARENTING=1 -export JAVA_HOME=/usr/lib/jvm/openjdk17 export RUST_LOG=debug +export GPG_TTY=$(tty) -alias get_idf='. $HOME/esp/esp-idf/export.sh' +export PATH="$HOME/.local/bin:$CARGO_HOME/bin:$BUN_INSTALL/bin:$PATH" -alias l='ls -la --color=auto' -alias la='ls -la --color=auto' -alias ls='ls --color=auto' +alias l='ls -hN -la --group-directories-first' +alias mbsync='mbsync --config "$XDG_CONFIG_HOME"/isync/mbsyncrc' alias ..='cd ..' - -alias mvn="~/Downloads/apache-maven-3.9.9/bin/mvn" -alias v="nvim" -alias c="clear" -alias j="joshuto" -alias zl="zellij" -alias h="htop" -alias n="neofetch" -alias poweroff="doas /usr/bin/poweroff" -alias reboot="doas /usr/bin/reboot" -alias update-grub="doas grub-mkconfig -o /boot/grub/grub.cfg" - -alias gts="git status" -alias gta="git add ." -alias gtc="git commit -m" -alias gpo="git push origin" -alias pull="git pull origin" -alias glg="git log" - -[ -s "/home/fw/.bun/_bun" ] && source "/home/fw/.bun/_bun" - -if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then - exec startx &> /dev/null -# exec dbus-run-session run_something &> /dev/null -fi - -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - - -export GPG_TTY=$(tty) -export PATH=$PATH:$HOME/.local/bin -. "$HOME/.cargo/env" - -#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! -export SDKMAN_DIR="$HOME/.sdkman" -[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" +alias v=nvim +alias c=clear +alias j=joshuto +alias zl=zellij +alias h=htop +alias sxiv=nsxiv +alias poweroff='doas /usr/bin/poweroff' +alias reboot='doas /usr/bin/reboot' +alias update-grub='doas grub-mkconfig -o /boot/grub/grub.cfg' +alias no-screen-dim='xset s off && xset -dpms' +alias gts='git status' +alias gta='git add .' +alias gtc='git commit -m' +alias gpo='git push origin' +alias pull='git pull origin' +alias glg='git log' +alias rsync='rsync -avz --progress' +alias orphans='doas pacman -Rcns $(pacman -Qqdt)' + +command -v cargo >/dev/null 2>&1 && [ -f "$CARGO_HOME/env" ] && . "$CARGO_HOME/env" diff --git a/shell/dash/.profile b/shell/dash/.profile index c2f3182..10cb98f 100644 --- a/shell/dash/.profile +++ b/shell/dash/.profile @@ -1 +1,26 @@ -. "$HOME/.cargo/env" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_STATE_HOME="$HOME/.local/state" +export XDG_CACHE_HOME="$HOME/.cache" + +if [ -z "$XDG_RUNTIME_DIR" ]; then + export XDG_RUNTIME_DIR="/tmp/$(id -u)-runtime-dir" + mkdir -pm 0700 "$XDG_RUNTIME_DIR" +fi + +export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" +touch "$XAUTHORITY" +chmod 600 "$XAUTHORITY" + +if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then + exec startx "$XDG_CONFIG_HOME/x/xinitrc" +fi + +case "$-" in + *i*) + if [ -z "$BASH_VERSION" ]; then + exec bash --login + fi + ;; +esac + diff --git a/shell/zsh/.zprofile b/shell/zsh/.zprofile deleted file mode 100644 index 73e39eb..0000000 --- a/shell/zsh/.zprofile +++ /dev/null @@ -1,3 +0,0 @@ - -# Created by `pipx` on 2024-06-26 00:09:05 -export PATH="$PATH:/home/fw/.local/bin" diff --git a/shell/zsh/.zsh/zsh-autosuggestions b/shell/zsh/.zsh/zsh-autosuggestions deleted file mode 160000 index c3d4e57..0000000 --- a/shell/zsh/.zsh/zsh-autosuggestions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5 diff --git a/shell/zsh/.zsh/zsh-syntax-highlighting b/shell/zsh/.zsh/zsh-syntax-highlighting deleted file mode 160000 index e0165ea..0000000 --- a/shell/zsh/.zsh/zsh-syntax-highlighting +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e0165eaa730dd0fa321a6a6de74f092fe87630b0 diff --git a/shell/zsh/.zshenv b/shell/zsh/.zshenv deleted file mode 100644 index c2f3182..0000000 --- a/shell/zsh/.zshenv +++ /dev/null @@ -1 +0,0 @@ -. "$HOME/.cargo/env" diff --git a/shell/zsh/.zshrc b/shell/zsh/.zshrc deleted file mode 100644 index 0f6c767..0000000 --- a/shell/zsh/.zshrc +++ /dev/null @@ -1,115 +0,0 @@ -stty susp "^P" -parse_git_branch() { - local branch="" - branch=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') - local git_status=$(git status --porcelain 2>/dev/null) - local color=red - if [[ -n "$branch" ]]; then - branch=" (${branch})" - fi - echo "$branch " -} -update_prompt() { - PS1="%F{red}[%F{yellow}%n%F{green}@%F{blue}%m %F{magenta}%c%f%F{red}]%F{magenta}%F{yellow}$(parse_git_branch)%F{blue}# %F{reset}" -} -precmd_functions+=(update_prompt) -update_prompt - -HISTFILE="$XDG_CACHE_HOME"/zsh-histfile -GNUPGHOME="~/.gnupg/" -HISTSIZE=2500 -SAVEHIST=2000 -setopt INC_APPEND_HISTORY -setopt HIST_EXPIRE_DUPS_FIRST -setopt HIST_FIND_NO_DUPS -unsetopt beep -bindkey -e -zstyle :compinstall filename "/home/$USER/.zshrc" -autoload -Uz compinit -compinit -setopt autocd -eval "$(zoxide init zsh)" - -export GPG_TTY=$(tty) -export XDG_DATA_HOME="$HOME"/.local/share -export XDG_CONFIG_HOME="$HOME"/.config -export XDG_STATE_HOME="$HOME"/.local/state -export XDG_CACHE_HOME="$HOME"/.cache -#export PATH=$PATH:$(xdg-user-dir USER)/.local/bin -export XDG_CURRENT_DESKTOP=dwm -export XDG_SESSION_DESKTOP=dwm -export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv -export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc -export LESSHISTFILE="$XDG_CACHE_HOME"/less/history -export EDITOR=nvim -export BUILDDIR=/tmp/makepkg -export RAVEDUDE_PORT=/dev/ttyACM0 -alias get_idf='. $HOME/Repositories/c/esp/esp-idf/export.sh' -export BUN_INSTALL="$HOME/.bun" -export PATH="$BUN_INSTALL/bin:$PATH" -export PATH="$HOME/.cargo/bin:$PATH" -export ANDROID_HOME=$HOME/Android/sdk -export PATH=$PATH:$ANDROID_HOME/emulator -export PATH=$PATH:$ANDROID_HOME/platform-tools -export AWT_TOOLKIT=MToolkit -export JAVA_HOME=/usr/lib/jvm/java-21-openjdk -export GEM="/home/fw/.local/share/gem/ruby/3.0.0/bin" -# . "${HOME}/.cache/wal/colors.sh" - -alias dmenu='dmenu_run -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15"' - -alias acl='arduino-cli' -alias acla='arduino-cli compile --fqbn arduino:avr:uno' -alias acla='arduino-cli compile' -alias aclbl='arduino-cli board list' - -alias ls='eza -l --icons --color=always' -alias l='eza -l --icons --color=always' -alias ls='eza -l --icons --color=always' -alias la='eza -la --icons --color=always' -alias ll='eza -l --color=always --group-directories-first' -alias lt='eza -T --color=always --group-directories-first' -alias v="nvim" -alias c="clear" -alias e="exit" -alias j="doas joshuto" -alias g="grep" -alias g="rg" -alias zl="zellij" -alias h="htop" -alias n="neofetch --off" -alias poweroff="doas /usr/bin/poweroff" -alias reboot="doas /usr/bin/reboot" - -alias latexmk="latex-mk" - -alias orphans='doas pacman -Rcns $(pacman -Qqdt)' - -alias pf="prettier --write ." - - -alias gts="git status" -alias gta="git add ." -alias gtc="git commit -m" -alias gpo="git push origin" -alias pull="git pull origin" -alias glg="git log" - -[ -s "/home/fw/.bun/_bun" ] && source "/home/fw/.bun/_bun" - -if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then - exec startx &> /dev/null -# exec dbus-run-session run_something &> /dev/null -fi - -case ":$PATH:" in - *":$GEM:"*) ;; - *) export PATH="$GEM:$PATH" ;; -esac -export PATH=$PATH:$HOME/.platformio/penv/bin - -source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh - -# Created by `pipx` on 2024-06-26 00:09:05 -export PATH="$PATH:/home/fw/.local/bin" -- cgit v1.2.3