From 284ea2c1115f3546568a9eb1856280fe64801110 Mon Sep 17 00:00:00 2001 From: BardofSprites <89086143+BardofSprites@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:26:50 -0400 Subject: simple shell env changes --- shell/.bash_aliases | 19 ++++++++++++++++++ shell/.bashrc | 3 +++ tmux/.config/tmux/tmux.conf | 6 ++++++ vim/.vimrc | 49 +++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 75 insertions(+), 2 deletions(-) diff --git a/shell/.bash_aliases b/shell/.bash_aliases index 82d798b..1731413 100644 --- a/shell/.bash_aliases +++ b/shell/.bash_aliases @@ -9,6 +9,12 @@ alias ta="tmux attach" alias ts="tmux-sessionizer" alias rec="ffmpeg -f x11grab -s 1920x1080 -i :0.0+0+0 out.mp4" +# smart launcher aliases +alias p="smart-launcher ~/Pictures/" +alias r="smart-launcher ~/Repositories/" +alias d="smart-launcher ~/Documents/" +alias c="smart-launcher ~/Code/" + function _recentimages() { find "$1" -type f \( -iname "*.jpg" -o -iname "*.png" -o -iname "*.jpeg" -o -iname "*.gif" -o -iname "*.bmp" \) -printf "%T@ %p\n" | sort -nr | @@ -17,6 +23,19 @@ function _recentimages() { alias recentimages='_recentimages' +function xrdb-theme() { + local theme_file + theme_file=$(find ~/.Xresources.d/ -type l | fzf) + + if [[ -n "$theme_file" ]]; then + xrdb -merge "$theme_file" + echo "Loaded theme: $(basename "$theme_file")" + else + echo "No theme selected." + fi +} + + alias checkmail="$HOME/.local/bin/scripts/checkmail" # gentoo related alias sysupdate="sudo eix-sync" diff --git a/shell/.bashrc b/shell/.bashrc index 804da8b..84f7853 100644 --- a/shell/.bashrc +++ b/shell/.bashrc @@ -5,10 +5,13 @@ export TERMINAL="/usr/local/bin/st" export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin/scripts/:$PATH" export PATH="$HOME/.local/bin/scripts/perl/:$PATH" +export PATH="$HOME/.local/bin/scripts/status/:$PATH" export PATH="$HOME/.cargo/bin/:$PATH" export PATH="$HOME/opt/:$PATH" export PKG_CONFIG_PATH="$HOME/opt/raylib/lib/pkgconfig/:$PKG_CONFIG_PATH" export PATH="$HOME/.nimble/bin":$PATH +PLAN9=/home/bard/Repositories/plan9port export PLAN9 +PATH=$PATH:$PLAN9/bin export PATH source "$HOME/.config/fzf/key-bindings.bash" diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index e7b0a75..7e6bf2d 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -21,3 +21,9 @@ setw -g window-status-current-format ' #I #W #F ' set -g status-bg color2 set -g status-fg black +# bindings +# splits +bind s split-window -v +bind v split-window -h +bind l choose-session + diff --git a/vim/.vimrc b/vim/.vimrc index bfea324..ecfd17e 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,4 +1,4 @@ -syntax on +syntax enable filetype plugin indent on set tabstop=4 set shiftwidth=4 @@ -9,4 +9,49 @@ set number set ignorecase set smartcase set incsearch -set modeline \ No newline at end of file +set modeline +set nohlsearch + +autocmd FileType org,outline setlocal nofoldenable +call plug#begin() +Plug 'junegunn/goyo.vim' +Plug 'junegunn/fzf.vim' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-surround' +Plug 'ap/vim-css-color' +Plug 'zah/nim.vim' +call plug#end() +vmap "+yi +vmap "+c +vmap c"+p +imap "+pa + +function! BardFindNotesFile() + let l:cmd = "find ~/Notes/denote -type f -name '*.org' " . + \ "! -path '*/.git/*' ! -path '*/.cache/*' | " . + \ "grep -E './[0-9]{8}T[0-9]{6}--.*\\.org$'" + call fzf#run(fzf#wrap({ + \ 'source': l:cmd, + \ 'sink': 'e', + \ 'options': '--prompt "Notes> " --preview "cat {}"' + \ })) +endfunction + +command! FindNotesFile call BardFindNotesFile() + +function! BardSearchNotes() + call fzf#vim#grep( + \ "rg --column --line-number --no-heading --color=always " . + \ "--hidden --glob '!**/.git/*' --glob '!**/.cache/*' " . + \ "' ' ~/Notes/denote", 1, + \ fzf#vim#with_preview(), 0) +endfunction + +command! SearchNotes call BardSearchNotes() + +" KEYBINDS +let mapleader = " " +nnoremap fn :FindNotesFile +nnoremap sn :SearchNotes +nnoremap ff :Files +nnoremap b :Marks -- cgit v1.2.3