-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmuxinator.yaml
59 lines (56 loc) · 1.91 KB
/
.tmuxinator.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# vim: syntax=yaml
---
# SETUP A TERMINAL BASED REPOSITORY'S WORKSPACE
#
# https://github.com/tmuxinator/tmuxinator
# brew install tmux tmuxinator
# tmuxinator start . branch="master"
# tmuxinator start . branch="release"
# tmuxinator start . branch="develop"
# tmuxinator start . branch="feature/name"
name: " dotfiles "
root: "./"
attach: true
startup_pane: 0
startup_window: "git"
on_project_start: |
txbranch="<%= @settings["branch"] %>"
[ -z "$txbranch" ] && git checkout "$txbranch"
git pull origin "$(git branch --show-current)"
windows:
- git: # show repository git status
layout: "even-vertical"
panes:
- git: # launch lazygit if exists else use git
- |
[ -n "$(command -v lazygit)" ] && lazygit || git log --oneline
- edit: # edit and view dotfiles
layout: "main-vertical"
panes:
- edit:
- |
# launch neovim if exists else use vim
[ -n "$(command -v nvim)" ] && nvim || vim
- debug: # view current machine config files
layout: "main-vertical"
panes:
- config:
- |
# check if required tooling exists
[ -z "$(command -v ag)" ] \
|| [ -z "$(command -v entr)" ] \
|| [ -z "$(command -v chezmoi)" ] \
&& exit 0
# do a chezmoi apply if a file changes
ag -l | entr "chezmoi apply --force --verbose"
- config: # view current machine config files
layout: "main-vertical"
panes:
- config:
- |
# check if config directory exists
[ -d "$XDG_CONFIG_HOME" ] && cd "$XDG_CONFIG_HOME" || exit 0
# launch exa if exists else use ls
[ -n "$(command -v exa)" ] \
&& exa --git --long --tree --icons --level=2 \
|| ls -la