update tmux stuff
This commit is contained in:
		
							parent
							
								
									7ec203a8de
								
							
						
					
					
						commit
						28cf00c838
					
				| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
if [[ $# -eq 1 ]]; then
 | 
			
		||||
    selected=$1
 | 
			
		||||
else
 | 
			
		||||
    selected=$(find ~/ ~/Development -mindepth 1 -maxdepth 1 -type d | fzf)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ -z $selected ]]; then
 | 
			
		||||
    exit 0
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
selected_name=$(basename "$selected" | tr . _)
 | 
			
		||||
tmux_running=$(pgrep tmux)
 | 
			
		||||
 | 
			
		||||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
 | 
			
		||||
    tmux new-session -s $selected_name -c $selected
 | 
			
		||||
    exit 0
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if ! tmux has-session -t $selected_name 2> /dev/null; then
 | 
			
		||||
    tmux new-session -ds $selected_name -c $selected
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
tmux switch-client -t $selected_name
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,37 @@
 | 
			
		|||
find
 | 
			
		||||
man
 | 
			
		||||
tldr
 | 
			
		||||
sed
 | 
			
		||||
awk
 | 
			
		||||
tr
 | 
			
		||||
cp
 | 
			
		||||
ls
 | 
			
		||||
grep
 | 
			
		||||
xargs
 | 
			
		||||
rg
 | 
			
		||||
ps
 | 
			
		||||
mv
 | 
			
		||||
kill
 | 
			
		||||
lsof
 | 
			
		||||
less
 | 
			
		||||
head
 | 
			
		||||
tail
 | 
			
		||||
tar
 | 
			
		||||
cp
 | 
			
		||||
rm
 | 
			
		||||
rename
 | 
			
		||||
jq
 | 
			
		||||
cat
 | 
			
		||||
ssh
 | 
			
		||||
cargo
 | 
			
		||||
git
 | 
			
		||||
git-worktree
 | 
			
		||||
git-status
 | 
			
		||||
git-commit
 | 
			
		||||
git-rebase
 | 
			
		||||
docker
 | 
			
		||||
docker-compose
 | 
			
		||||
stow
 | 
			
		||||
chmod
 | 
			
		||||
chown
 | 
			
		||||
make
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
golang
 | 
			
		||||
solidity
 | 
			
		||||
nodejs
 | 
			
		||||
javascript
 | 
			
		||||
tmux
 | 
			
		||||
typescript
 | 
			
		||||
zsh
 | 
			
		||||
cpp
 | 
			
		||||
c
 | 
			
		||||
lua
 | 
			
		||||
rust
 | 
			
		||||
python
 | 
			
		||||
bash
 | 
			
		||||
php
 | 
			
		||||
haskell
 | 
			
		||||
ArnoldC
 | 
			
		||||
css
 | 
			
		||||
html
 | 
			
		||||
gdb
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
set -g bell-action none
 | 
			
		||||
set -g visual-bell on
 | 
			
		||||
set -g status-style 'bg=#333333 fg=#5eacd3'
 | 
			
		||||
 | 
			
		||||
bind r source-file ~/.tmux.conf
 | 
			
		||||
set -g base-index 1
 | 
			
		||||
 | 
			
		||||
set-window-option -g mode-keys vi
 | 
			
		||||
 | 
			
		||||
# forget the find window.  That is for chumps
 | 
			
		||||
bind-key -r f run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
 | 
			
		||||
 | 
			
		||||
bind-key -r i run-shell "tmux neww tmux-cht.sh"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue