Use dotter

This commit is contained in:
Kristofers Solo
2024-08-28 09:02:07 +03:00
parent d888080cc7
commit a42ded1119
1200 changed files with 1231 additions and 2261 deletions

15
local/bin/chtsh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
selected=$(cat ~/.config/tmux/tmux-cht-languages ~/.config/tmux/tmux-cht-command | fzf)
if [[ -z $selected ]]; then
exit 0
fi
read -p "Enter Query: " query
if rg -qs "$selected" ~/.config/tmux/tmux-cht-languages; then
query=$(echo $query | tr ' ' '+')
tmux neww zsh -c "echo \"curl cht.sh/$selected/$query/\" & curl cht.sh/$selected/$query & while [ : ]; do sleep 1; done"
else
tmux neww zsh -c "curl -s cht.sh/$selected~$query | less"
fi