-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
506 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
|
||
echo "- [ ] $@" >> "/home/a8ka/Dev/@A/notes/todo - inbox.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,54 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env zsh | ||
|
||
fzf --height 100% --layout reverse --info inline --border \ | ||
--preview 'bat {}' --preview-window right,60%,border-horizontal | xargs -I{} sh -c 'nohup xdg-open {} &' | ||
SEARCH_MODULES_DIR=~/.bin/fzf-search | ||
find $SEARCH_MODULES_DIR -type f | grep -v '_main' | xargs -I{} basename {} .sh | fzf | xargs -I{} zsh $SEARCH_MODULES_DIR/{}.sh | ||
|
||
|
||
# IFS=: read -ra selected < <( | ||
# FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \ | ||
# fzf --ansi \ | ||
# --color "hl:-1:underline,hl+:-1:underline:reverse" \ | ||
# --disabled --query "$INITIAL_QUERY" \ | ||
# --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \ | ||
# --bind "ctrl-d:change-prompt(Docs> )+reload($RG_PREFIX --type docs {q} || true)" \ | ||
# --prompt 'All> ' \ | ||
# --delimiter : \ | ||
# --preview 'bat --color=always {1} --highlight-line {2}' \ | ||
# --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' | ||
# ) | ||
# [ -n "${selected[0]}" ] && ${EDITOR} "${selected[0]}" "+${selected[1]}" | ||
|
||
# --header '╱ CTRL-R (Ripgrep mode) ╱ CTRL-F (fzf mode) ╱' \ | ||
# --bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(fzf> )+enable-search+clear-query+rebind(ctrl-r)" \ | ||
# --bind "ctrl-r:unbind(ctrl-r)+change-prompt(ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)" \ | ||
|
||
|
||
|
||
# Use fzf and ripgrep to parse directories and find patterns of text | ||
# and open selected files in vim | ||
# Switch between Ripgrep launcher mode (CTRL-R) and fzf filtering mode (CTRL-F) | ||
# See more: https://github.com/junegunn/fzf/blob/master/ADVANCED.md#switching-between-ripgrep-mode-and-fzf-mode | ||
|
||
# Ignore auto-generated files and folders | ||
# RG_IGNORE="'!{.git,node_modules,package-lock.json,yarn.lock,.cache}'" | ||
# RG_IGNORE="" | ||
# RG_PREFIX="rg --column --line-number --no-heading --hidden -g $RG_IGNORE --color=always --smart-case " | ||
# INITIAL_QUERY="${*:-}" | ||
# | ||
# IFS=: read -ra selected < <( | ||
# FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \ | ||
# fzf --ansi \ | ||
# --color "hl:-1:underline,hl+:-1:underline:reverse" \ | ||
# --disabled --query "$INITIAL_QUERY" \ | ||
# --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \ | ||
# --bind "ctrl-d:change-prompt(Docs> )+reload($RG_PREFIX --type docs {q} || true)" \ | ||
# --prompt 'All> ' \ | ||
# --delimiter : \ | ||
# --preview 'bat --color=always {1} --highlight-line {2}' \ | ||
# --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' | ||
# ) | ||
# [ -n "${selected[0]}" ] && ${EDITOR} "${selected[0]}" "+${selected[1]}" | ||
# | ||
# # --header '╱ CTRL-R (Ripgrep mode) ╱ CTRL-F (fzf mode) ╱' \ | ||
# # --bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(fzf> )+enable-search+clear-query+rebind(ctrl-r)" \ | ||
# # --bind "ctrl-r:unbind(ctrl-r)+change-prompt(ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/zsh | ||
|
||
RG_PREFIX="rg --column --no-heading --hidden --color=always $RG_ARGS " | ||
INITIAL_QUERY="${*:-}" | ||
|
||
FZF_WORKING_DIR=${FZF_WORKING_DIR:-~} | ||
cd $FZF_WORKING_DIR | ||
|
||
read -r selected < <( | ||
FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \ | ||
fzf --ansi \ | ||
--exact \ | ||
--color "hl:-1:underline,hl+:-1:underline:reverse" \ | ||
--disabled --query "$INITIAL_QUERY" \ | ||
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \ | ||
--bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(2. fzf> )+enable-search+clear-query+rebind(ctrl-r)" \ | ||
--bind "ctrl-r:unbind(ctrl-r)+change-prompt(1. ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)" \ | ||
--prompt "$FZF_PROMPT> " \ | ||
--delimiter : \ | ||
--header "$FZF_PROMPT: ╱ CTRL-R (Ripgrep mode) ╱ CTRL-F (fzf mode) ╱" \ | ||
--preview 'bat --color=always {1} --highlight-line {2}' \ | ||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'\ | ||
) | ||
|
||
if [ -n "${selected[0]}" ]; then | ||
FILE=$(echo "$selected" | cut -d ':' -f1) | ||
FILE=$(echo "${FZF_WORKING_DIR}/${FILE}") | ||
|
||
zsh -c "$FZF_EXEC '$FILE'" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/zsh | ||
|
||
FZF_WORKING_DIR=~/Dev/ \ | ||
FZF_PROMPT="Code" \ | ||
RG_ARGS="-g '*.{js,ts,py,rs,css,html,tsx,jsx,sh,zsh,md}'" \ | ||
FZF_EXEC=$EDITOR \ | ||
zsh ~/.bin/fzf-search/_main.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/zsh | ||
|
||
FZF_WORKING_DIR=~ \ | ||
FZF_PROMPT="Docs" \ | ||
RG_ARGS="-g '*.{md}'" \ | ||
FZF_EXEC="$EDITOR" \ | ||
zsh ~/.bin/fzf-search/_main.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/zsh | ||
|
||
FZF_WORKING_DIR=~/Dev/@A/notes \ | ||
FZF_PROMPT="Notes" \ | ||
RG_ARGS="-g '*.{md}'" \ | ||
FZF_EXEC="$EDITOR" \ | ||
zsh ~/.bin/fzf-search/_main.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env zsh | ||
|
||
# 1. Search for text in files using Ripgrep | ||
# 2. Interactively restart Ripgrep with reload action | ||
# 3. Open the file in Vim | ||
RIPGREP_CONFIG_PATH=/home/a8ka/.config/ripgrep/ripgreprc | ||
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case " | ||
INITIAL_QUERY="${*:-}" | ||
IFS=: read -ra selected < <( | ||
FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \ | ||
fzf --ansi \ | ||
--disabled --query "$INITIAL_QUERY" \ | ||
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \ | ||
--delimiter : \ | ||
--preview 'bat --color=always {1} --highlight-line {2}' \ | ||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' | ||
) | ||
[ -n "${selected[0]}" ] && vim "${selected[0]}" "+${selected[1]}" | ||
|
||
echo 123 | ||
|
||
# INITIAL_QUERY="${*:-}" | ||
# IFS=: read -ra selected < <( | ||
# FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \ | ||
# fzf --ansi \ | ||
# --disabled --query "$INITIAL_QUERY" \ | ||
# --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \ | ||
# --delimiter : \ | ||
# --preview 'bat --color=always {1} --highlight-line {2}' \ | ||
# --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' | ||
# ) | ||
# [ -n "${selected[0]}" ] && vim "${selected[0]}" "+${selected[1]}" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,5 +76,5 @@ colors: | |
|
||
font: | ||
normal: | ||
family: Hack Nerd Font Mono | ||
family: Iosevka Nerd Font | ||
size: 14.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
" markdownWikiLink is a new region | ||
syn region markdownWikiLink matchgroup=markdownLinkDelimiter start="\[\[" end="\]\]" contains=markdownText keepend oneline concealends | ||
" markdownLinkText is copied from runtime files with 'concealends' appended | ||
syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends | ||
" markdownLink is copied from runtime files with 'conceal' appended | ||
syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.