POSIXify, correct tmux conf
j3s j3s@cyberia.club
Wed, 11 Dec 2019 09:50:12 -0600
3 files changed,
24 insertions(+),
7 deletions(-)
M
.tmux.conf
→
.tmux.conf
@@ -1,10 +1,7 @@
# Global opts -set-option -g default-shell fish setw -g mode-keys vi set-option -sg escape-time 0 set -s escape-time 0 - -bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." # use vim-like keys for splits and windows bind-key \ split-window -h -c "#{pane_current_path}"@@ -14,7 +11,9 @@ bind-key j select-pane -D
bind-key k select-pane -U bind-key l select-pane -R +# shortcuts +bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." + # colors hurt my eyes set -g status-bg black set -g status-fg white -set -g status-interval k
M
bin/MACC02VK5ECHTD7/j
→
bin/MACC02VK5ECHTD7/j
@@ -1,6 +1,6 @@
#!/bin/sh -local query="$1" +query="$1" shift 2> /dev/null -local ip=$(awless list instances --filter state=running,name="$query" "$@" --format json | jq -r '.[] | [.PrivateIP] | .[]' | head -n1) +ip=$(awless list instances --filter state=running,name="$query" "$@" --format json | jq -r '.[] | [.PrivateIP] | .[]' | head -n1) /usr/local/bin/ssh "$ip"
M
bin/MACC02VK5ECHTD7/jmass
→
bin/MACC02VK5ECHTD7/jmass
@@ -1,7 +1,25 @@
#!/bin/bash query="$1" shift 2> /dev/null -ips=$(awless list instances --filter state=running,name="$query" "$@" --format json | jq -r '.[] | [.PrivateIP] | .[]') + +text=$( + printf "$*" | \ + sed -e 's/bpe/-p browse_prod -r us-east-1/g' | \ + sed -e 's/bpw/-p browse_prod -r us-west-2/g' | \ + sed -e 's/bse/-p browse_stage -r us-east-1/g' | \ + sed -e 's/bsw/-p browse_stage -r us-west-2/g' | \ + sed -e 's/bte/-p browse_test -r us-east-1/g' | \ + sed -e 's/btw/-p browse_test -r us-west-2/g' | \ + sed -e 's/cpe/-p cgraph_prod -r us-east-1/g' | \ + sed -e 's/cpw/-p cgraph_prod -r us-west-2/g' | \ + sed -e 's/cse/-p cgraph_stage -r us-east-1/g' | \ + sed -e 's/csw/-p cgraph_stage -r us-west-2/g' | \ + sed -e 's/cte/-p cgraph_test -r us-east-1/g' | \ + sed -e 's/ctw/-p cgraph_test -r us-west-2/g' +) + +ips=$(awless list instances --filter state=running,name="$query" $text --format json | jq -r '.[] | [.PrivateIP] | .[]') + tmux new-window 'ssh-trash-test' while IFS= read -r i