summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc48
1 files changed, 38 insertions, 10 deletions
diff --git a/.bashrc b/.bashrc
index bb3dbac..092a80d 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,16 +1,20 @@
#basics
stty -ixon
#export BROWSER="firefox-developer-edition"
+export BROWSER="qutebrowser"
export MOZ_DBUS_REMOTE=1
+<<<<<<< HEAD
+#export BROWSER="vivaldi-snapshot --use-gl=egl"
+=======
#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"
+>>>>>>> dbb33e4bfbf7b9e7fe3f3a38cc501bc3d3aa4732
export EDITOR="nvim"
# 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'
# my scripts on PATH
@@ -18,11 +22,19 @@ 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
+<<<<<<< HEAD
+export QT_QPA_PLATFORM=wayland
+export QT_PLATFORM_THEME=qt5ct
+export QT_QPA_PLATFORMTHEME=qt5ct
+export XDG_SESSION_TYPE=wayland
+export GDK_BACKEND=wayland
+=======
#export QT_QPA_PLATFORM=wayland
#export QT_PLATFORM_THEME=qt5ct
#export QT_QPA_PLATFORMTHEME=qt5ct
#export XDG_SESSION_TYPE=wayland
#export GDK_BACKEND=wayland
+>>>>>>> dbb33e4bfbf7b9e7fe3f3a38cc501bc3d3aa4732
# Alias definitions
if [ -f ~/.aliases ]; then
@@ -69,10 +81,10 @@ if type rg &> /dev/null; then
export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
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 wir="$HOME/writing/conde/wired"
export l="$HOME/writing/luxagraf/"
export lux="$HOME/sites/luxagraf.net"
export d="$HOME/documents"
@@ -126,7 +138,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:-nvim} "$(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:-nvim} "$(rg -l $1 ${2:-~/notes} | fzf --preview="bat {}" --preview-window=right:70%:wrap)";
}
# same thing, but context
function nvl(){
@@ -138,20 +155,20 @@ 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)";
}
+fo() { ${EDITOR:-nvim} $(rg -n '.*' "$HOME/documents/org/" | fzf --layout=reverse --height 50% --ansi | sed -E 's/(.*):([0-9]+):.*/\1 +\2/g'); }
#fuzzy find file names only
function ff() {
ag -g "$1" ${2:-.} | fzf --preview="bat {}" --preview-window=right:70%:wrap
}
-# Notational Velocity
-function fn() {
- rg -l $1 ${2:-~/notes} | fzf --preview="bat {}" --preview-window=right:70%:wrap
-}
function tolux() {
scp $3 $1 lxf:/home/lxf/$2
@@ -275,6 +292,10 @@ fd() {
cd "$dir"
}
+fo() { ${EDITOR:-nvim} $(rg -n '.*' "$HOME/documents/org/" | fzf --layout=reverse --height 50% --ansi | sed -E 's/(.*):([0-9]+):.*/\1 +\2/g'); }
+
+fr() { ${EDITOR:-nvim} $(rg -n '.*' "$HOME/.config/remind/" | fzf --layout=reverse --height 50% --ansi | sed -E 's/(.*):([0-9]+):.*/\1 +\2/g'); }
+
if [[ "$OSTYPE" == "darwin"* ]]; then
# OSX-SPECIFIC SETTINGS
@@ -410,6 +431,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