diff options
author | luxagraf <sng@luxagraf> | 2021-05-05 20:20:52 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf> | 2021-05-05 20:20:52 -0400 |
commit | 484d4d8cbaa5145324d80456ab5ddb624f590ddc (patch) | |
tree | 10de629be1b9b597fe2acb935031c04199a268db /.bashrc | |
parent | dbb33e4bfbf7b9e7fe3f3a38cc501bc3d3aa4732 (diff) |
new openbox setupdebian
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 38 |
1 files changed, 21 insertions, 17 deletions
@@ -1,28 +1,20 @@ #basics stty -ixon -#export BROWSER="firefox-developer-edition" export MOZ_DBUS_REMOTE=1 -#export BROWSER="qutebrowser" alias vivaldi-snapshot="vivaldi-snapshot --use-gl=egl" -alias chromium="GDK_BACKEND=x11 && chromium" -export BROWSER="firefox-developer-edition" -#export BROWSER="chromium" -export EDITOR="nvim" +export BROWSER="vivaldi-snapshot" +export EDITOR="vim" # keep dictionaries in ~/bin/ export STARDICT_DATA_DIR="$HOME/bin/dict/" export NOTES_DIR="$HOME/notes" export TERM="screen-256color" export GREP_COLOR='00;38;5;166' +export CM_HISTLENGTH=50 # my scripts on PATH export PATH=/usr/local/bin:$PATH export PATH=$PATH:$HOME/bin export PATH=$PATH:$HOME/bin/bash-scripts export PATH=$PATH:$HOME/.gem/ruby/2.6.0/bin -#export QT_QPA_PLATFORM=wayland -#export QT_PLATFORM_THEME=qt5ct -#export QT_QPA_PLATFORMTHEME=qt5ct -#export XDG_SESSION_TYPE=wayland -#export GDK_BACKEND=wayland # Alias definitions if [ -f ~/.aliases ]; then @@ -62,7 +54,7 @@ shopt -s autocd shopt -s cdable_vars export FZF_DEFAULT_OPTS=" ---color dark,hl:33,hl+:37,fg+:235,bg+:136,fg+:254
+--color dark,hl:33,hl+:37,fg+:235,bg+:136,fg+:254 --color info:254,prompt:37,spinner:108,pointer:235,marker:235 --no-mouse --height 70% -1 --multi --inline-info --preview='[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {} || cat {}) 2> /dev/null | head -300' --preview-window='right:hidden:wrap' --bind='f3:execute(bat --style=numbers {} || less -f {}),f2:toggle-preview,ctrl-d:half-page-down,ctrl-u:half-page-up,ctrl-a:select-all+accept,ctrl-y:execute-silent(echo {+} | wl-copy),ctrl-x:execute(rm -i {+})+abort'" if type rg &> /dev/null; then @@ -71,8 +63,6 @@ if type rg &> /dev/null; then fi # Don't use ~ to define your home here, it won't work. export wir="$HOME/writing/wired" -export reg="$HOME/writing/register" -export ars="$HOME/writing/ars-technica/" export l="$HOME/writing/luxagraf/" export lux="$HOME/sites/luxagraf.net" export d="$HOME/documents" @@ -126,7 +116,12 @@ function fore(){ #search any folder like you're in nvalt: function nv() { - find ${2:-~/notes} -maxdepth ${3:-1} -type f -print0 | xargs -0 grep -li $1 + ${EDITOR:-vim} "$(find ${2:-~/notes} -maxdepth ${3:-1} -type f -print0 | xargs -0 grep -li $1 | fzf --preview="bat {}" --preview-window=right:70%:wrap)"; +} + +#search any folder like you're in nvalt but have ripgrep at your disposal +function fn() { + ${EDITOR:-vim} "$(rg -l $1 ${2:-~/notes} | fzf --preview="bat {}" --preview-window=right:70%:wrap)"; } # same thing, but context function nvl(){ @@ -137,10 +132,12 @@ function nvl(){ function fnt(){ find ~/notes ~/documents/bookmarks ~/documents/reading\ notes -type f -maxdepth 2 -print0 | xargs -0 grep -$2i $1 } - +function fntt(){ + ${EDITOR:-nvim} "$(rg -l $1 ~/notes/ ~/documents/bookmarks/ ~/documents/reading\ notes/ | fzf --preview="bat {}" --preview-window=right:70%:wrap)"; +} #fuzzy find function f() { - rg -l $1 ${2:-.} | fzf --preview="bat {}" --preview-window=right:70%:wrap + ${EDITOR:-nvim} "$(rg -l $1 ${2:-.} | fzf --preview="bat {}" --preview-window=right:70%:wrap)"; } #fuzzy find file names only @@ -410,6 +407,13 @@ fshow() { {} FZF-EOF" } +#dirsize - finds directory sizes and lists them for the current directory +ds () { + du -shx -- * .[a-zA-Z0-9_]* 2>/dev/null | grep -E '^ *[0-9.]*[MG]' | sort -n >/tmp/list + grep -E '^ *[0-9.]*M' /tmp/list + grep -E '^ *[0-9.]*G' /tmp/list + rm /tmp/list +} RIPGREP_CONFIG_PATH=~/.ripgreprc GPG_TTY=$(tty) export GPG_TTY |