diff --git a/fzf_nova/_bluepill b/fzf_nova/_bluepill new file mode 100755 index 0000000..5d25a51 --- /dev/null +++ b/fzf_nova/_bluepill @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry) +# https://www.youtube.com/user/gotbletu +# DESC: open a cheatsheet to read notes +# DEPEND: fzf findutils coreutils + +selected="$(find ~/.config/bluepill/ -type f | sort | fzf -e -i --reverse --delimiter / --with-nth -1 --preview 'cat {}')" +[ -z "$selected" ] && exit + +# add to tmux and X11 clipboard +xsel -b < "$selected" +tmux load-buffer "$selected" diff --git a/fzf_nova/_calc b/fzf_nova/_calc new file mode 100755 index 0000000..3bd1980 --- /dev/null +++ b/fzf_nova/_calc @@ -0,0 +1,24 @@ +#!/usr/bin/env sh +# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry) +# https://www.youtube.com/user/gotbletu + +helpmsg() { + printf "%s\n" "desc: commandline calculator (ctrl+d to exit)" + printf "%s\n" "demo: http://www.youtube.com/watch?v=JkyodHenTuc" + printf "%s\n" "depends: python2, python3 or bc" + printf "\n" + printf "%s\n" "usage: ${0##*/}" +} +if [ "$1" = -h ] || [ "$1" = --help ]; then + helpmsg + exit 0 +elif command -v python3 >/dev/null; then + python3 -ic "from math import *; import cmath" +elif command -v python2 >/dev/null; then + python2 -ic "from __future__ import division; from math import *; from random import *" +elif command -v bc >/dev/null; then + bc -q -l +else + printf "%s\n" "missing python2, python3 or bc" + exit 1 +fi diff --git a/fzf_nova/_pipe_viewer b/fzf_nova/_pipe_viewer index 72c2fc1..c4fb3f9 100755 --- a/fzf_nova/_pipe_viewer +++ b/fzf_nova/_pipe_viewer @@ -1,3 +1,4 @@ #!/usr/bin/env sh -# youtube viewer not using API +# youtube viewer not using youtube API +# https://github.com/trizen/pipe-viewer pipe-viewer diff --git a/fzf_nova/_translate_eng_to_spanish b/fzf_nova/_translate_eng_to_spanish new file mode 100755 index 0000000..26d1141 --- /dev/null +++ b/fzf_nova/_translate_eng_to_spanish @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry) +# https://www.youtube.com/user/gotbletu +# DESC: translate text +# DEMO: +# DEPEND: translate-shell + +set -o vi +while true +do + read -rep ">>> Translate English to Spanish: " INPUT + history -s "$INPUT" + trans en:es "$INPUT" + printf "\n" +done diff --git a/fzf_nova/_translate_shell b/fzf_nova/_translate_shell new file mode 100755 index 0000000..08cd965 --- /dev/null +++ b/fzf_nova/_translate_shell @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry) +# https://www.youtube.com/user/gotbletu +# DESC: translate text +# DEMO: +# DEPEND: translate-shell + +set -o vi +while true +do + read -rep ">>> Translate Text: " INPUT + history -s "$INPUT" + trans "$INPUT" + printf "\n" +done + diff --git a/fzf_nova/_tuxi b/fzf_nova/_tuxi new file mode 100755 index 0000000..46dbc11 --- /dev/null +++ b/fzf_nova/_tuxi @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry) +# https://www.youtube.com/user/gotbletu +# DESC: google top answers to your questions +# DEMO: https://youtu.be/mWJBlkHwZy8 +# DEPEND: tuxi (https://github.com/Bugswriter/tuxi) +# REFF: read with history https://unix.stackexchange.com/a/302923/430298 + +set -o vi +while true +do + read -rep "Ask Google A Question: " INPUT + history -s "$INPUT" + tuxi -r "$INPUT" + printf "\n" +done diff --git a/fzf_nova/_ytfzf b/fzf_nova/_ytfzf new file mode 100755 index 0000000..c0b070a --- /dev/null +++ b/fzf_nova/_ytfzf @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +# A posix script that helps you find Youtube videos (with out API) and opens/downloads using mpv/youtube-dl. +# https://github.com/pystardust/ytfzf + +ytfzf -l