mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 12:15:29 +00:00
feat: add tmux-cht.sh script of ThePrimagen
This commit is contained in:
15
bin/tmux-cht.sh
Executable file
15
bin/tmux-cht.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# https://youtu.be/hJzqEAf2U4I
|
||||||
|
selected=`cat ~/.tmux-cht-languages ~/.tmux-cht-command | fzf`
|
||||||
|
if [[ -z $selected ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -p "Enter Query: " query
|
||||||
|
|
||||||
|
if grep -qs "$selected" ~/.tmux-cht-languages; then
|
||||||
|
query=`echo $query | tr ' ' '+'`
|
||||||
|
tmux neww bash -c "echo \"curl cht.sh/$selected/$query/\" & curl cht.sh/$selected/$query & while [ : ]; do sleep 1; done"
|
||||||
|
else
|
||||||
|
tmux neww bash -c "curl -s cht.sh/$selected~$query | less"
|
||||||
|
fi
|
||||||
@@ -151,6 +151,7 @@ return packer.startup(function(use)
|
|||||||
use("untitled-ai/jupyter_ascending.vim") -- Interact with jupyter_ascending
|
use("untitled-ai/jupyter_ascending.vim") -- Interact with jupyter_ascending
|
||||||
use("rhysd/vim-grammarous") -- A powerful grammar checker for Vim using LanguageTool
|
use("rhysd/vim-grammarous") -- A powerful grammar checker for Vim using LanguageTool
|
||||||
use("mechatroner/rainbow_csv") -- Rainbow CSV
|
use("mechatroner/rainbow_csv") -- Rainbow CSV
|
||||||
|
use("dbeniamine/cheat.sh-vim") -- Cheat.sh
|
||||||
|
|
||||||
-- Custom Text Objects
|
-- Custom Text Objects
|
||||||
use("christoomey/vim-titlecase")
|
use("christoomey/vim-titlecase")
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ set-window-option -g window-status-current-format '#[fg=#A3AAB7,bg=#2C323C]#[
|
|||||||
# Swap Window to Position 1
|
# Swap Window to Position 1
|
||||||
bind-key T swap-window -t 1
|
bind-key T swap-window -t 1
|
||||||
|
|
||||||
|
# Open cht.sh
|
||||||
|
bind-key -r i run-shell "tmux neww tmux-cht.sh"
|
||||||
|
|
||||||
# Change the default delay
|
# Change the default delay
|
||||||
set -sg escape-time 0
|
set -sg escape-time 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user