forked from Integralist/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.sh
More file actions
executable file
·40 lines (33 loc) · 1.2 KB
/
tmux.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
# check if we've not already got a session created
#
if [[ $(tmux ls 2> /dev/null | grep -c fastly) -eq 1 ]]; then
tmux attach -t fastly
else
# create a new session and detach from it
#
tmux new -s fastly -d
# Go-Fastly
#
tmux rename-window -t 1 'go-fastly'
tmux send-keys -t fastly:1 'cd ~/Code/fastly/go-fastly && export GPG_USER=integralist@fastly.com && clear && git wip' 'C-m'
# CLI
#
tmux new-window -n 'cli' -t fastly:2
tmux send-keys -t fastly:2 'cd ~/Code/fastly/cli && export GPG_USER=integralist@fastly.com && clear && git wip' 'C-m'
# Terraform
#
tmux new-window -n 'terraform' -t fastly:3
tmux send-keys -t fastly:3 'cd ~/Code/fastly/terraform-provider-fastly && export GPG_USER=integralist@fastly.com && clear && git wip' 'C-m'
# Top
#
tmux new-window -n 'htop' -t fastly:4
tmux send-keys -t fastly:4 'cd ~/ && export GPG_USER=integralist@fastly.com && clear && sudo htop' 'C-m'
# RSS
#
tmux new-window -n 'rss' -t fastly:5
tmux send-keys -t fastly:5 'cd ~/ && export GPG_USER=integralist@fastly.com && clear && tuifeed' 'C-m'
# now everything is setup we'll attach to a specific window we're interested in
#
tmux attach -t fastly:1
fi