commit 1ae5bb9139e291b20e4609372df12ea6a28da72d
parent 70e536931d83f3a130d56c2bfdfd86da4b1f8221
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Mon, 21 Apr 2025 01:30:08 +0530
parent 70e536931d83f3a130d56c2bfdfd86da4b1f8221
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Mon, 21 Apr 2025 01:30:08 +0530
Merge branch 'main' of getsh.org:dotfiles
19 files changed, 85 insertions(+), 88 deletions(-)
diff --git a/.bashrc b/.bashrc @@ -5,7 +5,4 @@ PS1='\w> ' -set -o vi - -bind '"\C-P":"quickopen\n"' bind '"\C-T":"fg\n"'
diff --git a/.config/X11/Xresources b/.config/X11/Xresources @@ -0,0 +1,10 @@ +! These might also be useful depending on your monitor and personal preference: +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +! 4K Display +! Xft.dpi: 192
diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc @@ -1,9 +1,9 @@ #!/bin/sh -. $XDG_CONFIG_HOME/X11/keybindings - WM=dwm +xrdb -merge $XDG_CONFIG_HOME/X11/Xresources + __type $WM || (echo "$WM not found" && exit 1) __type slstatus && exec slstatus &
diff --git a/.config/cmd/setup.cmd b/.config/cmd/setup.cmd @@ -1,6 +1,7 @@ @echo on rem TODO Make this work for Administrator accounts + goto :main :set_var @@ -56,6 +57,9 @@ call :set_var GPGHOME %XDG_DATA_HOME%\gnupg call :set_var PASSWORD_STORE_DIR %XDG_DATA_HOME%\pass call :set_var PASS_BASE_DIR %XDG_DATA_HOME%\pass +call :set_var LYNX_CFG %XDG_CONFIG_HOME%/lynx/lynx.cfg +call :set_var LYNX_LSS %XDG_CONFIG_HOME%/lynx/lynx.lss + call :set_var FUZZER fzf call :add_path %USERPROFILE%\.local\bin\cmd
diff --git a/.config/git/config b/.config/git/config @@ -42,7 +42,7 @@ [init] defaultBranch = main - templatedir = ~/.config/git/template + # templatedir = ~/.config/git/template [include] path = ~/.config/git/user
diff --git a/.config/lynx/lynx.cfg b/.config/lynx/lynx.cfg @@ -15,7 +15,6 @@ DEFAULT_EDITOR:vim EDITOR:vim DEFAULT_KEYPAD_MODE:LINKS_AND_FIELDS_ARE_NUMBERED -#MAKE_LINKS_FOR_ALL_IMAGES:TRUE # Status line pausing INFOSECS:0.5 @@ -38,3 +37,12 @@ EXTERNAL_MENU:http:songdl:songdl %s &:TRUE EXTERNAL_MENU:http:wget:wget %s &:TRUE #KEYMAP:o:ECGOTO #KEYMAP:O:GOTO +XLOADIMAGE_COMMAND:open %s & + +VIEWER:application/postscript:ghostview %s&:XWINDOWS +VIEWER:image/*:open %s&:XWINDOWS +VIEWER:video/*:open %s &:XWINDOWS + +MAKE_LINKS_FOR_ALL_IMAGES:TRUE +MAKE_PSEUDO_ALTS_FOR_INLINES:TRUE +VERBOSE_IMAGES:FALSE
diff --git a/.config/mutt/keybindings b/.config/mutt/keybindings @@ -25,10 +25,10 @@ bind index l display-message bind index,query <space> tag-entry #bind browser h goto-parent macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder" -bind index,pager H view-raw-message +#bind index,pager H view-raw-message bind browser l select-entry -bind pager,browser gg top-page -bind pager,browser G bottom-page +#bind pager,browser gg top-page +#bind pager,browser G bottom-page bind index,pager,browser d half-down bind index,pager,browser u half-up bind index,pager S sync-mailbox @@ -60,15 +60,11 @@ macro index,pager Mg ";<save-message>=Google<enter>" "move mail to google" macro index,pager Mf ";<save-message>=Friends<enter>" "move mail to Friends" macro index,pager MF ";<save-message>=Family<enter>" "move mail to Family" -macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook" +# macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook" macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read" macro index O "<shell-escape>mw -Y<enter>" "run mw -Y to sync all mail" -macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern" -macro index A "<limit>all\n" "show all messages (undo limit)" -bind index,pager \Ck sidebar-prev -bind index,pager \Cj sidebar-next -bind index,pager \Co sidebar-open -bind index,pager \Cp sidebar-prev-new -bind index,pager \Cn sidebar-next-new -bind index,pager B sidebar-toggle-visible +bind index,pager <Esc>k sidebar-prev +bind index,pager <Esc>j sidebar-next +bind index,pager <Esc>o sidebar-open +bind index,pager <Esc>b sidebar-toggle-visible
diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc @@ -1,29 +1,31 @@ set mbox_type = Maildir +source ~/.local/share/mutt/accounts +source ~/.local/share/mutt/mailboxes source ~/.config/mutt/keybindings source ~/.config/mutt/ui -source ~/.config/mutt/accounts + +set header_cache = ~/.cache/mutt/headercache + +set imap_check_subscribed # mailbox settings set spoolfile = + set postponed = +Drafts set record = +Sent set trash = +Trash -set auto_tag=true +set auto_tag = yes auto_view text/html set mailcap_path = ~/.config/mutt/mailcap -set query_command= "abook --mutt-query '%s'" - set mailcap_path = "~/.config/mutt/mailcap" set mime_type_query_command = "file --mime-type -b %s" set date_format="%y/%m/%d %I:%M%p" set index_format="%D %-15.15F %s (%-4.4c)" set sort = 'reverse-date' set smtp_authenticators = 'gssapi:login' -set query_command = "abook --mutt-query '%s'" set rfc2047_parameters = yes set sleep_time = 0 set markers = no # Disables the `+` displayed at line wraps @@ -31,12 +33,13 @@ set mark_old = no # Unread mail stay unread until read set mime_forward = yes # attachments are forwarded with mail set wait_key = no # mutt won't ask "press key to continue" set fast_reply # skip to compose when replying + set fcc_attach # save attachments with the body -set forward_format = "Fwd: %s" # format of subject when forwarding -set forward_quote # include message in forwards +set forward_format = "Fwd: %s" +set forward_quote = no set reverse_name # reply as whomever it was to -# TODO should we include though? -set include # include message in replies + +set include = no set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example) auto_view text/html
diff --git a/.config/mutt/ui b/.config/mutt/ui @@ -1,18 +1,16 @@ +unset help + +set sidebar_visible = yes +set sidebar_width = 25 + # Default index colors: -color index yellow default '.*' -color index_author red default '.*' -color index_number blue default -color index_subject cyan default '.*' +color index white default '.*' # New mail is boldened: -color index brightyellow black "~N" -color index_author brightred black "~N" -color index_subject brightcyan black "~N" +color index green default "~N" # Tagged mail is highlighted: color index brightyellow blue "~T" -color index_author brightred blue "~T" -color index_subject brightcyan blue "~T" # Other colors and aesthetic settings: mono bold bold @@ -31,8 +29,8 @@ color tilde black default color message cyan default color markers red white color attachment white default -color search brightmagenta default -color status brightyellow black +color search black yellow +#color status white default color hdrdefault brightgreen default color quoted green default color quoted1 blue default @@ -40,7 +38,7 @@ color quoted2 cyan default color quoted3 yellow default color quoted4 red default color quoted5 brightred default -color signature brightgreen default +color signature lightmagenta default color bold black default color underline black default color normal default default @@ -50,7 +48,7 @@ color header blue default ".*" color header brightmagenta default "^(From)" color header brightcyan default "^(Subject)" color header brightwhite default "^(CC|BCC)" -color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses +color body brightblue default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL color body green default "\`[^\`]*\`" # Green text between ` and ` color body brightblue default "^# \.*" # Headings as bold blue @@ -68,4 +66,3 @@ color body brightyellow default "^gpg: " color body brightyellow red "^gpg: BAD signature from.*" mono body bold "^gpg: Good signature" mono body bold "^gpg: BAD signature from.*" -color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
diff --git a/.config/profile.cmd b/.config/profile.cmd @@ -10,6 +10,7 @@ doskey pwd=cd doskey rm=del $* doskey clear=cls doskey cat=type $* +doskey open=start $* doskey hb=sh %USERPROFILE%\.local\bin\sh\hb $* doskey d=curl -fLO $* doskey x=7z x $*
diff --git a/.config/sh/aliases b/.config/sh/aliases @@ -2,12 +2,12 @@ alias abook='abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook' alias abook='abook -C "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook' alias dict='dict -c "$XDG_CONFIG_HOME"/dict/dictrc' -alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc' +there mbsync && alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc' alias startx='startx "$XDG_CONFIG_HOME/X11/xinitrc" vt1' alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' # [misc] -alias doas=sudo +# alias doas=sudo alias qc='ssh $(ci)' # [helper_functions] @@ -55,5 +55,6 @@ alias girl='grep -irl' alias gir='grep -ir' alias markdown=md2html alias fy='fzf | clip' +alias o='xdg-open' alias voom='VIM_DIR=$XDG_DATA_HOME/vim voom'
diff --git a/.config/sh/functions b/.config/sh/functions @@ -13,14 +13,6 @@ open_project() { done } && export $is_bash open_project -open() { - case "$(uname -o)" in - *Linux*)xdg-open "$@" ;; - Darwin) command open "$@" ;; - *) start "$@" ;; - esac -} && export $is_bash open - attach() { command -v abduco >/dev/null || return if [ $# -eq 0 ]; then
diff --git a/.gitignore b/.gitignore @@ -18,7 +18,6 @@ # Local shell scripts !.local/bin/ -# !.local/bin/** !.local/bin/cmd/ !.local/bin/cmd/** !.local/bin/sh/
diff --git a/.local/bin/sh/cam b/.local/bin/sh/cam @@ -2,8 +2,10 @@ c_os="$(uname -s)" -if [ "$c_os" == "Windows_NT" ]; then - ffplay -f dshow -i video="Integrated Webcam" -else - ffplay -f avfoundation -i 0:0 -video_size 1280x720 -framerate 30 -fi +case "$c_os" in + Windows_NT) + ffplay -f dshow -i video="Integrated Webcam";; + Darwin) + ffplay -f avfoundation -i 0:0 -video_size 1280x720 -framerate 30;; +*) ffplay /dev/video0 +esac
diff --git a/.local/bin/sh/extract.sh b/.local/bin/sh/extract.sh @@ -5,8 +5,8 @@ # Treat last argument as dest folder? or use -d # Allow extraction of multple archives in the order test $# -lt 1 && { printf "Usage: $(basename $0) <archive>\n"; exit 1; } -test -f $1 || { printf "$0: $1: No such file \n"; exit 1; } -case $1 in +test -f "$1" || { printf "$0: $1: No such file \n"; exit 1; } +case "$1" in *.a) ar x "$1" ;; *.z) 7z x "$1" ;; *.rar) unrar x "$1" ;;
diff --git a/.local/bin/sh/pfs b/.local/bin/sh/pfs @@ -5,7 +5,6 @@ : ${PASSWORD_STORE_DIR?"Error var not set"} cd "${PASSWORD_STORE_DIR}" || exit 1 -export PASSWORD_STORE_KEY=bharatvaj@yahoo.com PASSTOOL=spm type ${PASSTOOL} 2>/dev/null || PASSTOOL=pass @@ -16,3 +15,4 @@ test -z "${selection}" || { *totp/*) pass ${1:-"otp"} "${selection}" ;; ?*)pass ${1:-"show"} "${selection}" ;; esac +}
diff --git a/.local/share/vim/hyper-red.vim b/.local/share/vim/hyper-red.vim @@ -21,7 +21,7 @@ if &background == "dark" hi! Special cterm=NONE ctermfg=LightMagenta guifg=NONE hi! Identifier ctermfg=White guifg=White hi! IncSearch ctermbg=Black ctermfg=Yellow guibg=Black guifg=Yellow - hi! Search ctermbg=LightBlue ctermfg=Black guibg=DarkGray guifg=Black + hi! Search ctermbg=DarkGray ctermfg=LightGray guibg=DarkGray guifg=Black hi! Todo cterm=underline ctermbg=NONE ctermfg=LightYellow guibg=NONE guifg=LightYellow hi! Comment ctermfg=DarkGray guifg=DarkGray hi! Visual ctermbg=White ctermfg=Black guibg=White guifg=Black
diff --git a/.profile b/.profile @@ -13,17 +13,11 @@ HISTFILE="$XDG_STATE_HOME"/history LESSHISTFILE="$XDG_STATE_HOME"/lesshst # Global programs -BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle -DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker ELINKS_CONFDIR="$XDG_CONFIG_HOME/elinks" INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc -LESSHISTFILE=- LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg" LYNX_LSS="$XDG_CONFIG_HOME/lynx/lynx.lss" NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config" -NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc -NPM_CONFIG_PREFIX="~/.local/share/npm" -PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass" PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf" PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc" @@ -33,28 +27,9 @@ WGETRC="$XDG_CONFIG_HOME/wgetrc" XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc #XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc -BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle -CARGO_HOME="$XDG_DATA_HOME"/cargo -FFMPEG_DATADIR="$XDG_DATA_HOME"/ffmpeg -GEM_HOME="$XDG_DATA_HOME"/gem GNUPGHOME="$XDG_DATA_HOME/gnupg" -GOPATH="$XDG_DATA_HOME"/go -GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle -MACHINE_STORAGE_PATH="$XDG_DATA_HOME"/docker-machine -MYSQL_HISTFILE="$XDG_DATA_HOME/mysql_history" -NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass -RUSTUP_HOME="$XDG_DATA_HOME"/rustup -SONGDL_HOME="${XDG_DATA_HOME}/music/" -SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history" -VSCODE_PORTABLE="$XDG_DATA_HOME/vscode" W3M_DIR="$XDG_DATA_HOME"/w3m -_Z_DATA="$XDG_DATA_HOME/z" - -BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle -GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem -NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages -PSQL_HISTORY="$XDG_CACHE_HOME/pg/psql_history" # Local executables PATH=${PATH}:${HOME}/.local/bin:${HOME}/.local/bin/sh:${XDG_DATA_HOME}/npm/bin:${XDG_DATA_HOME}/.cargo/bin:${GOPATH}/bin:${XDG_DATA_HOME}/gem/bin @@ -90,4 +65,3 @@ HISTCONTROL=erasedups . "${XDG_CONFIG_HOME}/sh/functions" . "${XDG_CONFIG_HOME}/sh/aliases" [ -f "${XDG_CONFIG_HOME}/sh/unstaged" ] && . "${XDG_CONFIG_HOME}/sh/unstaged" -
diff --git a/.vimrc b/.vimrc @@ -52,6 +52,7 @@ set nospell let g:netrw_banner = 0 let g:netrw_liststyle = 3 let g:netrw_fastbrowse= 2 +let g:netrw_dirhistmax = 0 let g:netrw_preview = 1 let g:netrw_winsize = 20 @@ -169,3 +170,15 @@ if has("win32") else set shell=sh endif + +" Map key chord `jk` to <Esc> +let g:esc_j_lasttime = 0 +let g:esc_k_lasttime = 0 +function! JKescape(key) + if a:key == 'j' | let g:esc_j_lasttime = reltimefloat(reltime()) | endif + if a:key == 'k' | let g:esc_k_lasttime = reltimefloat(reltime()) | endif + let l:timediff = abs(g:esc_j_lasttime - g:esc_k_lasttime) + return (l:timediff <= 0.05 && l:timediff >=0.001) ? "\b\e" : a:key +endfunction +inoremap <expr> j JKescape('j') +inoremap <expr> k JKescape('k')