dotfiles

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

commit 6adbe15e48a8a46b3004f1750446f4a1c3509722
parent f3b36aaa04ac0bb6f159199c45e1ee77dff00855
Author: Bharatvaj <bharatvaj@yahoo.com>
Date:   Sat, 21 Jan 2023 01:39:07 +0530

Add ci(computer index) script

This will fuzzy find the saved computers from
${PERSONAL_PATH}/systems.json

Reset the red status line, I think I'have seen enough red

Add pofs which is just pfs with 'otp' specified

Add 'gf' alias for sh which will git fuzzy find the current dir

Diffstat:
M.config/sh/aliases | 3+++
A.local/bin/sh/ci | 8++++++++
A.local/bin/sh/pofs | 9+++++++++
M.local/share/vimcommon/hyper-red.vim | 2--
4 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/.config/sh/aliases b/.config/sh/aliases @@ -9,6 +9,7 @@ alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' # [misc] alias doas=sudo +alias qc='ssh $(ci)' # [baseutils_conditioning] thwart sl && thwart ld && thwart lls && thwart sls && thwart lsl && thwart lss && thwart kls @@ -26,6 +27,7 @@ alias ..='cd ..' alias n='cd_and_ls' alias cf="quickopen cd d" alias ef="quickopen ${EDITOR} f" +alias gf='$EDITOR $(git ls-files | ${FUZZER})' alias vf="quickopen ${VISUAL} f" # TODO make it work for linux alias of="quickopen open f" @@ -49,3 +51,4 @@ alias x=extract_archive # [longhands] alias girl='grep -irl' +alias gir='grep -ir' diff --git a/.local/bin/sh/ci b/.local/bin/sh/ci @@ -0,0 +1,8 @@ +#!/bin/sh +# ci - computer index + +s_db=~/.local/share/personal/systems.json + +s_system=$(jq -r 'keys[]' "$s_db" | fzf) +s_addr=$(jq -r ".$s_system" "$s_db") +echo $s_addr diff --git a/.local/bin/sh/pofs b/.local/bin/sh/pofs @@ -0,0 +1,9 @@ +#!/bin/sh -eu + +# reliable password fuzzy searcher + +cd "${PASSWORD_STORE_DIR}" || exit 1 + +selection="$(find -L totp -name '*.gpg' | sed 's/.gpg$//g' | ${FUZZER})" + +test -z "${selection}" || pass otp ${1} "${selection}" diff --git a/.local/share/vimcommon/hyper-red.vim b/.local/share/vimcommon/hyper-red.vim @@ -6,7 +6,6 @@ if &background == "dark" hi! LineNr guibg=NONE ctermbg=NONE guifg=DarkGray ctermfg=DarkGray hi! CursorLineNr cterm=NONE gui=NONE guibg=NONE ctermbg=NONE guifg=White ctermfg=White - hi! StatusLine cterm=bold gui=bold ctermfg=White ctermbg=Red guifg=White guibg=Red hi! StatusLineNC guibg=LightGray ctermbg=LightGray guifg=Black ctermfg=Black hi! Statement ctermfg=Red guifg=Red hi! Constant ctermfg=LightGreen guifg=LightGreen @@ -23,7 +22,6 @@ if &background == "dark" hi! MatchParen ctermbg=NONE cterm=underline ctermfg=LightMagenta else hi! LineNr cterm=NONE gui=NONE guibg=NONE ctermbg=NONE guifg=LightGray ctermfg=LightGray - hi! StatusLine cterm=bold gui=bold guibg=NONE ctermbg=NONE guifg=Black ctermfg=Black hi! StatusLineNC guibg=DarkGray ctermbg=DarkGray guifg=White ctermfg=White hi! Statement ctermfg=Red guifg=Red hi! Constant ctermfg=Green guifg=Green