Major cleanup for pop os minimal config.

This commit is contained in:
2026-09-09 05:48:19 +02:00
parent 1e2dd2f5fb
commit 3a111d6017
15 changed files with 520 additions and 589 deletions
-184
View File
@@ -1,184 +0,0 @@
# ==============================================================================
# ENVIRONMENT VARIABLES
# ==============================================================================
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_STATE_HOME="$HOME/.local/state"
export GOOGLE_API_KEY="no"
export GOOGLE_DEFAULT_CLIENT_ID="no"
export GOOGLE_DEFAULT_CLIENT_SECRET="no"
# Core settings
export EDITOR="vim"
export VISUAL="vim"
export MANPAGER="vim +Man!"
export BROWSER="firefox"
export COLORTERM="truecolor"
# Development
export DEBUG=1
export GOPATH="$HOME/.go"
export GOCACHE="$HOME/.go/cache"
export GOROOT=/usr/local/go
export PATH="/usr/local/go/bin:$GOPATH/bin:$PATH"
# Direnv
eval "$(direnv hook bash)"
# ==============================================================================
# FZF configuration
# ==============================================================================
export FZF_DEFAULT_OPTS="
--height 40%
--layout=reverse
--border
--ansi
--preview-window=down:30%
--bind 'ctrl-d:preview-page-down,ctrl-u:preview-page-up'
--color=fg:#ffffff,header:#f38ba8,info:#cba6ac,pointer:#f5e0dc
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6ac,hl+:#f38ba8"
export FZF_DEFAULT_COMMAND='fdfind --exclude={.git,.cache,.xmake,.zig-cache,build,tmp,node_modules,elpa} --type f -H'
# ==============================================================================
# PATH CONFIGURATION
# ==============================================================================
# bash has no fish_add_path (which dedupes + checks existence), so roll a
# small helper that does the same thing.
add_to_path() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
PATH="$1:$PATH"
fi
}
add_to_path /var/lib/flatpak/exports/bin
add_to_path /usr/local/bin
add_to_path /usr/local/go/bin
add_to_path "$GOPATH/bin"
add_to_path "$HOME/bin"
add_to_path "$HOME/.local/bin"
add_to_path "$HOME/.local/share/flatpak/exports/bin"
add_to_path "$HOME/.npm-global/bin"
add_to_path "$HOME/.odin/"
export PATH
# ==============================================================================
# AUTO COMPLETE
# ==============================================================================
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
fi
# ==============================================================================
# ALIASES
# ==============================================================================
# Void linux helpers
# System update (sync + update all packages)
alias void-update='sudo xbps-install -Su'
# Remove orphaned dependencies + clean cache
alias void-clean='sudo xbps-remove -Oo'
# List explicitly installed (manual) packages
alias void-installed='xbps-query -m'
# List all installed packages
alias void-installedall='xbps-query -l'
# Show which package owns a file
alias void-owns='xbps-query -o'
# Remove a package and its unused deps in one go (usage: purge <pkgname>)
alias void-purge='sudo xbps-remove -R'
# Install a package (usage: install <pkgname>)
alias void-install='sudo xbps-install'
# Remove a package (usage: remove <pkgname>)
alias void-remove='sudo xbps-remove'
# Search for a package
alias void-search='xbps-query -Rs'
# Show info about a package
alias void-query='xbps-query -R'
# List commands
alias ls='ls -lh --color=auto --group-directories-first'
alias ll='ls -lAh --color=auto --group-directories-first'
alias la='ls -la --color=auto --group-directories-first'
alias l='ls -CF --color=auto'
alias tree='tree --dirsfirst -C'
# Safety aliases
alias rm='rm -I --preserve-root'
alias mv='mv -i'
alias cp='cp -i'
alias ln='ln -i'
# System information
alias df='df -h'
alias du='du -h'
alias free='free -h'
alias bat='bat --theme="ansi" --paging=never'
# Application shortcuts
alias :q='exit'
alias files='thunar .'
alias fetch='pfetch'
# Custom shortcuts
alias v='vim'
alias vi='vim'
alias reload='source ~/.bashrc'
alias dots='cd ~/.dotfiles && vim'
alias doti='bash ~/.dotfiles/install.sh -i'
alias dotl='bash ~/.dotfiles/install.sh -l'
alias myip='curl ipinfo.io/ip; echo ""'
alias query='xbps-query -Rs'
alias commits='git log origin/main..HEAD --oneline'
## Basic project picker using fzf
pp() {
local project
project=$(
find ~/Projects -mindepth 1 -maxdepth 1 -type d |
awk -F/ '{print $NF "\t" $0}' |
fzf --with-nth=1
)
[ -z "$project" ] && return
project=$(echo "$project" | cut -f2)
cd "$project" && clear
}
# ==============================================================================
# PROMPT
# ==============================================================================
# bash has no built-in __fish_git_prompt_* equivalent, so we write a small
# git-branch function and build PS1 by hand.
parse_git_branch() {
git branch 2>/dev/null | sed -n '/\* /s///p'
}
git_prompt_info() {
local branch
branch=$(parse_git_branch)
[ -z "$branch" ] && return
local esc=$'\033'
local status marker
status=$(git status --porcelain 2>/dev/null)
if [ -n "$status" ]; then
if echo "$status" | grep -q '^[MADRC]'; then
marker=" ${esc}[33m●${esc}[0m " # staged - yellow ●
elif echo "$status" | grep -q '^??'; then
marker="" # untracked - no char
else
marker=" ${esc}[31m+${esc}[0m " # dirty - red +
fi
else
marker=" ${esc}[1;32m${esc}[0m " # clean - green
fi
echo " ${esc}[1;35m(${branch})${esc}[0m${marker}"
}
PS1='\[\033[32m\]\u\[\033[0m\]@\[\033[34m\]\h\[\033[0m\]:\[\033[36m\]\w\[\033[0m\]$(git_prompt_info)\$ '
+134
View File
@@ -0,0 +1,134 @@
# ==============================================================================
# ENVIRONMENT VARIABLES
# ==============================================================================
set -gx XDG_CONFIG_HOME "$HOME/.config"
set -gx XDG_DATA_HOME "$HOME/.local/share"
set -gx XDG_CACHE_HOME "$HOME/.cache"
set -gx XDG_STATE_HOME "$HOME/.local/state"
set -gx GOOGLE_API_KEY "no"
set -gx GOOGLE_DEFAULT_CLIENT_ID "no"
set -gx GOOGLE_DEFAULT_CLIENT_SECRET "no"
# Core settings
set -gx EDITOR "vim"
set -gx VISUAL "vim"
set -gx MANPAGER "vim +Man!"
set -gx BROWSER "firefox"
set -gx COLORTERM "truecolor"
# Development
set -gx DEBUG 1
set -gx GOPATH "$HOME/.go"
set -gx GOCACHE "$HOME/.go/cache"
set -gx GOROOT /usr/local/go
# Direnv
direnv hook fish | source
# ==============================================================================
# FZF configuration
# ==============================================================================
set -gx FZF_DEFAULT_OPTS "
--height 40%
--layout=reverse
--border
--ansi
--preview-window=down:30%
--bind 'ctrl-d:preview-page-down,ctrl-u:preview-page-up'
--color=fg:#ffffff,header:#f38ba8,info:#cba6ac,pointer:#f5e0dc
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6ac,hl+:#f38ba8"
set -gx FZF_DEFAULT_COMMAND "fdfind --exclude={.git,.cache,.xmake,.zig-cache,build,tmp,node_modules,elpa} --type f -H"
# ==============================================================================
# PATH CONFIGURATION
# ==============================================================================
# fish_add_path dedupes + checks existence natively, no helper needed
fish_add_path /var/lib/flatpak/exports/bin
fish_add_path /usr/local/bin
fish_add_path /usr/local/go/bin
fish_add_path $GOPATH/bin
fish_add_path $HOME/bin
fish_add_path $HOME/.local/bin
fish_add_path $HOME/.local/share/flatpak/exports/bin
fish_add_path $HOME/.npm-global/bin
fish_add_path $HOME/.odin/
# ==============================================================================
# ALIASES
# ==============================================================================
# List commands
alias ls 'ls -lh --color=auto --group-directories-first'
alias ll 'ls -lAh --color=auto --group-directories-first'
alias la 'ls -la --color=auto --group-directories-first'
alias l 'ls -CF --color=auto'
alias tree 'tree --dirsfirst -C'
# Safety aliases
alias rm 'rm -I --preserve-root'
alias mv 'mv -i'
alias cp 'cp -i'
alias ln 'ln -i'
# System information
alias df 'df -h'
alias du 'du -h'
alias free 'free -h'
alias bat 'bat --theme="ansi" --paging=never'
# Application shortcuts
alias :q 'exit'
alias files 'thunar .'
alias fetch 'pfetch'
# Custom shortcuts
alias reload 'source ~/.config/fish/config.fish'
alias dots 'cd ~/.dotfiles && vi'
alias doti 'bash ~/.dotfiles/install.sh -i'
alias dotl 'bash ~/.dotfiles/install.sh -l'
alias myip 'curl ipinfo.io/ip; echo ""'
alias query 'xbps-query -Rs'
alias commits 'git log origin/main..HEAD --oneline'
## Basic project picker using fzf
function pp
set -l project (find ~/Projects -mindepth 1 -maxdepth 1 -type d | awk -F/ '{print $NF "\t" $0}' | fzf --with-nth=1)
test -z "$project"; and return
set project (echo $project | cut -f2)
cd $project; and clear
end
# ==============================================================================
# GIT PROMPT CONFIG
# (used by fish_git_prompt, called from fish_prompt.fish below)
# ==============================================================================
set -g __fish_git_prompt_show_informative_status
set -g __fish_git_prompt_char_stagedstate '●'
set -g __fish_git_prompt_char_dirtystate '+'
set -g __fish_git_prompt_char_untrackedstate ''
set -g __fish_git_prompt_color_branch magenta
set -g __fish_git_prompt_color_stagedstate yellow
set -g __fish_git_prompt_color_dirtystate red
# ==============================================================================
# PROMPT
# ==============================================================================
function fish_prompt
set_color green
echo -n (whoami)
set_color normal
echo -n '@'
set_color blue
echo -n (prompt_hostname)
set_color normal
echo -n ':'
set_color cyan
echo -n (prompt_pwd)
set_color normal
fish_git_prompt
echo -n '$ '
end
@@ -3,12 +3,8 @@
)
;; HHKB Professional Classic (Linux)
;;
;; Small key left of Space = Muhenkan
;; Large key left of Space = Left Alt
;;
;; AwesomeWM:
;; modkey = "Mod4"
(defsrc
esc 1 2 3 4 5 6 7 8 9 0 - = \ grv
-56
View File
@@ -1,56 +0,0 @@
# ============================================================================
# Kitty Configuration
# ============================================================================
enable_audio_bell no
term xterm-256color
# ----------------------------------------------------------------------------
# Font
# ----------------------------------------------------------------------------
font_family JetBrainsMono Nerd Font
font_size 12.0
# ----------------------------------------------------------------------------
# Window
# ----------------------------------------------------------------------------
window_padding_width 10
window_padding_height 10
# ----------------------------------------------------------------------------
# Cursor
# ----------------------------------------------------------------------------
cursor_shape beam
cursor_blink_interval 0.5
# ----------------------------------------------------------------------------
# Layout
# ----------------------------------------------------------------------------
enabled_layouts splits
# ----------------------------------------------------------------------------
# Splits
# ----------------------------------------------------------------------------
# Vertical split
map ctrl+v launch --location=vsplit --cwd=current
# Close current kitty split
map ctrl+q close_window
# ----------------------------------------------------------------------------
# Colors
# ----------------------------------------------------------------------------
foreground #e8e8e8
background #121212
cursor #D4D4D4
cursor_text_color #1F1F1F
color0 #1F1F1F
color1 #F44747
color2 #6A9955
color3 #DCDCAA
color4 #569CD6
color5 #C586C0
color6 #56B6C2
color7 #D4D4D4
color8 #808080
-116
View File
@@ -18,7 +18,6 @@ set number
set relativenumber
set wildmenu
set showcmd
colorscheme jellybeans
" ----------------------------------------------------------------------------
" Transparent UI
@@ -59,19 +58,6 @@ set completeopt=menu,menuone,noselect
syntax on
filetype plugin indent on
" ----------------------------------------------------------------------------
" fzf
" ----------------------------------------------------------------------------
if executable('rg')
let $FZF_DEFAULT_COMMAND =
\ 'rg --files --hidden --follow --glob "!.git/*"'
endif
nnoremap <C-p> :Files<CR>
nnoremap <C-o> :Buffers<CR>
nnoremap <C-s> :Rg<CR>
nnoremap <C-b> :Build<CR>
" ----------------------------------------------------------------------------
" Search
" ----------------------------------------------------------------------------
@@ -88,72 +74,6 @@ nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-x> <C-w>q
" ----------------------------------------------------------------------------
" LSP - OLS
" ----------------------------------------------------------------------------
packadd lsp
call LspOptionsSet(#{
\ autoComplete: v:false,
\ autoHighlight: v:false,
\ autoHighlightDiags: v:true,
\ autoPopulateDiags: v:true,
\ semanticHighlight: v:false,
\ showSignature: v:false,
\ completionInPreview: v:false,
\ condensedCompletionMenu: v:true,
\ })
if executable('ols')
call LspAddServer([#{
\ name: 'ols',
\ filetype: ['odin'],
\ path: 'ols',
\ args: ['--stdio'],
\ features: #{
\ diagnostic: v:false,
\ completion: v:true,
\ hover: v:true,
\ signatureHelp: v:false,
\ documentHighlight: v:true,
\ semanticHighlight: v:true,
\ },
\ }])
endif
command! Action LspCodeAction
command! Rename LspRename
autocmd FileType odin setlocal omnifunc=LspOmniFunc
inoremap <C-@> <C-X><C-O>
nnoremap K :LspHover<CR>
" ----------------------------------------------------------------------------
" Go to Definition
" ----------------------------------------------------------------------------
function! GotoDefinitionSplit() abort
vsplit
LspGotoDefinition
endfunction
nnoremap gd :call GotoDefinitionSplit()<CR>
" ----------------------------------------------------------------------------
" Diagnostics
" ----------------------------------------------------------------------------
function! ToggleDiagnostics() abort
for l:win in getwininfo()
if get(l:win, 'quickfix', 0)
execute l:win.winnr .. 'close'
return
endif
endfor
LspDiag show
endfunction
command! Diagnostics call ToggleDiagnostics()
nnoremap <C-i> :Diagnostics<CR>
" ----------------------------------------------------------------------------
" Netrw / File Tree
" ----------------------------------------------------------------------------
@@ -164,39 +84,3 @@ let g:netrw_altv = 1
let g:netrw_winsize = 33
let g:netrw_keepdir = 0
nnoremap <C-e> :Lexplore<CR>
" ----------------------------------------------------------------------------
" Build System
" ----------------------------------------------------------------------------
function! Build(...) abort
" Already in the build terminal → close it.
if get(b:, 'build_terminal', 0) && &buftype ==# 'terminal'
close
echo ''
return
endif
if !filereadable('build.sh')
echohl WarningMsg
echo 'No build.sh found in current directory.'
echohl None
return
endif
wall
let l:command = './build.sh'
if a:0 > 0
let l:command .= ' ' .. join(a:000, ' ')
endif
botright vsplit
execute 'vertical resize ' .. float2nr(&columns * 0.37)
execute 'terminal ++curwin ' .. l:command
let b:build_terminal = 1
tnoremap <buffer> <CR> <Nop>
endfunction
command! -nargs=* Build call Build(<f-args>)