diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2021-05-26 18:44:54 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2021-05-26 18:44:54 +0300 |
| commit | 8a3972f856e13561dddf8db30f0af69a20087743 (patch) | |
| tree | 92249c488fea85f54de47f318098328704456906 | |
| parent | fd9c7318a79da6471c5f6eb8b5f3c8215f0c957a (diff) | |
| download | dotfiles-8a3972f856e13561dddf8db30f0af69a20087743.tar.gz dotfiles-8a3972f856e13561dddf8db30f0af69a20087743.zip | |
bashrc: fix issues and push scripts to separate files
for some weird reasons they were included in bashrc as functions
| -rw-r--r-- | .bashrc | 47 | ||||
| -rwxr-xr-x | .local/bin/fslcd | 10 | ||||
| -rwxr-xr-x | .local/bin/keylookup | 8 |
3 files changed, 30 insertions, 35 deletions
@@ -12,59 +12,36 @@ set -o vi alias ls='ls --color=auto --group-directories-first' alias ll='ls -lAh' alias cat='bat -p' -alias ssh='TERM=rxvt ssh' +alias mocp='mocp -M "~/.config/moc"' +alias ssh='TERM=rxvt ssh' # fix alacritty term issues + +# see https://www.atlassian.com/git/tutorials/dotfiles +# and https://youtu.be/tBoLDpTWVOM alias config='/usr/bin/git --git-dir=$HOME/Documents/dotfiles --work-tree=$HOME' + alias brc='nvim ~/.bashrc && source ~/.bashrc' alias vrc='nvim ~/.config/nvim/init.vim' + alias v='nvim' alias fsl='fossil' -alias mocp='mocp -M "~/.config/moc"' PS1='[\u@\h \W]\$ ' # use gpg authentication key for ssh auth -export SSH_AUTH_SOCK=$( gpgconf --list-dirs agent-ssh-socket ) +SSH_AUTH_SOCK=$( gpgconf --list-dirs agent-ssh-socket ) +export SSH_AUTH_SOCK gpgconf --launch gpg-agent # fzf bindings and tweaks source /usr/share/fzf/key-bindings.bash source /usr/share/fzf/completion.bash export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git' +# shellcheck disable=SC2016 export FZF_CTRL_T_COMMAND='$FZF_DEFAULT_COMMAND' -keylookup() { - curl "http://hkps.pool.sks-keyservers.net/pks/lookup?op=get&search=0x$1" -} - FOSSILS_HOME=$HOME/Documents/Fossils - -fslcd() { - local fsl_checkout - fsl_checkout=$(fossil all ls -c | fzf +m) && - cd "$fsl_checkout" -} - -# fossil init script -# modified version of one taken from -# https://www.fossil-scm.org/home/doc/trunk/www/server/openbsd/fastcgi.md - -source $HOME/.local/bin/finit - -# real one is there, but because it has some -#personal information, i'll not include it, but it almost identical to -#following: -# -#finit() { -# FINIT_REPO=$FOSSILS_HOME/$1.fossil -# fossil init $FINIT_REPO && \ -# chmod 664 $FINIT_REPO && \ -# fossil open $FINIT_REPO --workdir $HOME/Documents/$1 && \ -# fossil user -R $FINIT_REPO password $USER $PASSWD && \ -# fossil remote-url -R $FINIT_REPO https://$USER@domain.tld/$1 && \ -# rsync --perms $FINIT_REPO $USER@domain.tld:/var/www/fossils/ \ -# >/dev/null && \ -# chmod 644 $FINIT_REPO -#} +export FOSSILS_HOME # starship prompt eval "$(starship init bash)" + diff --git a/.local/bin/fslcd b/.local/bin/fslcd new file mode 100755 index 0000000..4045ff9 --- /dev/null +++ b/.local/bin/fslcd @@ -0,0 +1,10 @@ +#!/bin/sh + +# script to quickly get to any fossil repo using fzf + +main() { + _fsl_checkout=$(fossil all ls -c | fzf +m) && + cd "$_fsl_checkout" || return +} + +main "$@" diff --git a/.local/bin/keylookup b/.local/bin/keylookup new file mode 100755 index 0000000..90e3a45 --- /dev/null +++ b/.local/bin/keylookup @@ -0,0 +1,8 @@ +#!/bin/sh + +main() { + curl "http://hkps.pool.sks-keyservers.net/pks/lookup?op=get&search=0x$1" +} + +main "$@" + |
