Re:Ask HN: What are your favorite terminal programs?
by accnumnplus1 on Monday May 07, 2018 @11:41AM
(#17013601)
I use a shell script for such config. eg tmux split-window -h ; tmux send-keys "ls -la" C-m; ...
[ Parent
| on HN ]
Re:Ask HN: What are your favorite terminal programs?
by kaushalmodi on Tuesday May 08, 2018 @10:26AM
(#17021081)
As I mentioned earlier, it is possible to do such things within the .tmux.conf, but not practical. Here's one of my real tmuxp configs:
# How to use this file:
# tmuxp load /path/to/this/file/main.yaml
# - Specifying the .yaml extension is optional
# - Specifying the path is optional if file is in ~/.tmuxp
#
# tmuxp --help for full help.
session_name: main
suppress_history: false
start_directory: '~'
shell_command_before:
- unsetenv SHELL_CONFIG_LOADED
- source ~/.alias
windows:
- window_name: '*scratch*'
layout: tiled
focus: true
panes:
- cd ~/downloads/git # Top-left
- cd ~/downloads/git/emacs # Top-right
- focus: true # Bottom-left
shell_command:
- bob
- sleep 2
- tclr # Clear tmux status indicators
- shell_command: # Bottom-right
- cd ~/.emacs.d/elisp/org-mode
- module load gcc/6.1.0 # Needed for ob-fortran tests to pass when doing make test for Org
- window_name: foo-1
layout: even-horizontal
shell_command_before:
- bob
- cduh
panes:
- null
- null
- null
- window_name: foo-2
layout: tiled
shell_command_before:
- bob
- cduh
panes:
- null
- null
- null
- null
- window_name: uvm_lib
layout: tiled
panes:
- cd ~/gitlab/bar_uvm_lib
- window_name: sandbox
layout: even-horizontal
panes:
- null
- null
- null
- window_name: hugo
layout: tiled
panes:
- shell_command:
- cd '~/downloads/git'
- shell_command:
- cd '~/e/elisp/ox-hugo/example-site'
- ./srv
- shell_command:
- cd '~/hugo'
- focus: true
shell_command:
- cd '~/e/elisp/ox-hugo'
- window_name: nim
layout: even-horizontal
panes:
- cd ~/sandbox/nim
- cd ~/sandbox/nim
- focus: true
shell_command:
- cd ~/sandbox/nim/chat
- window_name: tok
layout: even-horizontal
shell_command_before:
- tok
- cduh
panes:
- null
- null
- null
- window_name: zoo
layout: even-horizontal
shell_command_before:
- bob
- cduh
panes:
- null
- null
- null
Re:Ask HN: What are your favorite terminal programs?
by accnumnplus1 on Tuesday May 08, 2018 @06:37PM
(#17025944)
I don't do it within the .tmux.conf - I use separate scripts, one per project.
Re:Ask HN: What are your favorite terminal programs?
by kaushalmodi on Tuesday May 08, 2018 @06:46PM
(#17026001)
I understand. But the point I am trying to make applies there too. A script to do what I am doing in the tmuxp config I last pasted would be too unmanageable, and not as readable and reusable.