mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
Make layout API-interface a bit simpler
Additionally, also fix a bug when creating a window, where as if the session name was the same as a window that already existed, it would fail, accidentally using the window rather than the session at a target.
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
# Set custom session name. Default is based on filename.
|
||||
# session_name "Example Session"
|
||||
# Set a custom session root path. Default is `$HOME`.
|
||||
# Must be called before `initialize_session`.
|
||||
#session_root "~/Projects/example"
|
||||
|
||||
# Set a custom session root. Default is `$HOME`.
|
||||
# session_root "~/Projects/example"
|
||||
# Create session with specified name if it does not already exist. If no
|
||||
# argument is given, session name will be based on layout file name.
|
||||
if initialize_session "{{SESSION_NAME}}"; then
|
||||
|
||||
# Create session if it does not already exist.
|
||||
if initialize_session; then
|
||||
# Create a new window inline within session layout definition.
|
||||
#new_window "misc"
|
||||
|
||||
# Load window layouts if session was created.
|
||||
# load_window "example"
|
||||
# Load a defined window layout.
|
||||
#load_window "example"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
# Set custom window name. Default is based on filename.
|
||||
# window_name "Example Window"
|
||||
# Set window root path. Default is `$session_root`.
|
||||
# Must be called before `new_window`.
|
||||
#window_root "~/Projects/example"
|
||||
|
||||
# Set a window root path. Default is `$session_root`.
|
||||
# window_root "~/Projects/example"
|
||||
|
||||
# Create new window. Remove if you want to apply layout to current window.
|
||||
tmux new-window -t "$session" -n "$window"
|
||||
# Create new window. If no argument is given, window name will be based on
|
||||
# layout file name.
|
||||
new_window "{{WINDOW_NAME}}"
|
||||
|
||||
# Split window into panes.
|
||||
# tmux split-window -t "$session:$window.0" -h -p 20
|
||||
#tmux split-window -t "$session:$window.0" -h -p 20
|
||||
|
||||
# Set active pane.
|
||||
# tmux select-pane -t "$session:$window.0"
|
||||
#tmux select-pane -t "$session:$window.0"
|
||||
|
||||
Reference in New Issue
Block a user