dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@nonplanar.org:dotfiles.git
Log | Files | Refs

commit bd890549fd0c9f1f852c7f41fbb1cc3c61837c00
parent 2d002e7cd28b67ce204abf77fc7b79f13f516f95
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date:   Thu, 27 Feb 2025 16:39:22 +0530

Remove useless XDG env variables, keep only for portability use

Update hyper-red to have non-distracting search

Possibly fix the 'lynx.cfg not found' issue for Windows

Remove key name in pfs script

Remove open() in favour of the defaults in the respective OS.
	open - is present in Mac
	start - is doskey'd to open
TODO	chndlr/xdg-open - should be symlinked to open

Remove the horrible C-P key-mapping and the default vi keybindings for
bash

Diffstat:
M.bashrc | 3---
M.config/cmd/setup.cmd | 4++++
M.config/lynx/lynx.cfg | 10+++++++++-
M.config/profile.cmd | 1+
M.config/sh/functions | 8--------
M.local/bin/sh/pfs | 2+-
M.local/share/vim/hyper-red.vim | 2+-
M.profile | 26--------------------------
8 files changed, 16 insertions(+), 40 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/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/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/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 $* if exist "%XDG_CONFIG_HOME%\cmd\userenv.cmd" @call %XDG_CONFIG_HOME%\cmd\userenv.cmd 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/.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 @@ -89,4 +64,3 @@ HISTCONTROL=erasedups . "${XDG_CONFIG_HOME}/sh/functions" [ -f "${XDG_CONFIG_HOME}/sh/unstaged" ] && . "${XDG_CONFIG_HOME}/sh/unstaged" -