From d01ffc2673085302e9f72655c631c5936b7e3530 Mon Sep 17 00:00:00 2001 From: Bohdan Sukhomlinov Date: Tue, 10 Oct 2023 10:28:20 +0300 Subject: [PATCH] mux templates --- defaults/main/tmux.yml | 15 +++++++++++++-- new_component.sh => scripts/new_component.sh | 0 templates/tmux/mux_components.yml | 12 ++++++++++++ templates/tmux/mux_dnull.yml | 6 ++++++ templates/tmux/mux_dotfiles.yml | 6 ++++++ templates/{ => tmux}/tmux.conf | 0 6 files changed, 37 insertions(+), 2 deletions(-) rename new_component.sh => scripts/new_component.sh (100%) create mode 100644 templates/tmux/mux_components.yml create mode 100644 templates/tmux/mux_dnull.yml create mode 100644 templates/tmux/mux_dotfiles.yml rename templates/{ => tmux}/tmux.conf (100%) diff --git a/defaults/main/tmux.yml b/defaults/main/tmux.yml index 0e070b6..ee2ab25 100644 --- a/defaults/main/tmux.yml +++ b/defaults/main/tmux.yml @@ -14,6 +14,17 @@ role_component: depth: 1 configs: templates: - main: - template: tmux.conf + # main tmux config + tmux_conf: + template: tmux/tmux.conf dest: ~/.tmux.conf + # tmuxinator configs + mux_components: + template: tmux/mux_components.yml + dest: ~/.config/tmuxinator/component.yml + mux_dnull: + template: tmux/mux_dnull.yml + dest: ~/.config/tmuxinator/dnull.yml + mux_dotfiles: + template: tmux/mux_dotfiles.yml + dest: ~/.config/tmuxinator/dotfiles.yml diff --git a/new_component.sh b/scripts/new_component.sh similarity index 100% rename from new_component.sh rename to scripts/new_component.sh diff --git a/templates/tmux/mux_components.yml b/templates/tmux/mux_components.yml new file mode 100644 index 0000000..cb37e81 --- /dev/null +++ b/templates/tmux/mux_components.yml @@ -0,0 +1,12 @@ +--- +name: component +root: ~/ +attach: false +windows: + - component: + - export ACTIONS=<%= @settings["actions"] %> + - export COMPONENTS=<%= @settings["components"] %> + - export HOSTS=<%= @settings["hosts"] %> + - bash ~/dnull/dnull/utils/components_run.sh + - sleep 20 + - exit diff --git a/templates/tmux/mux_dnull.yml b/templates/tmux/mux_dnull.yml new file mode 100644 index 0000000..cebb19c --- /dev/null +++ b/templates/tmux/mux_dnull.yml @@ -0,0 +1,6 @@ +--- +name: dnull +root: ~/dnull +windows: + - editor: lvim + - shell: /bin/zsh diff --git a/templates/tmux/mux_dotfiles.yml b/templates/tmux/mux_dotfiles.yml new file mode 100644 index 0000000..4dff8c5 --- /dev/null +++ b/templates/tmux/mux_dotfiles.yml @@ -0,0 +1,6 @@ +--- +name: dotfiles +root: ~/dnull/dotfiles/ +windows: + - editor: + - export COMPONENTS=<%= @settings["components"] %> && export HOSTS=<%= @settings["hosts"] %> && lvim -O ~/dnull/ansible/external_roles/components/defaults/main/${COMPONENTS}.yml ~/dnull/ansible/host_vars/${HOSTS}.yml diff --git a/templates/tmux.conf b/templates/tmux/tmux.conf similarity index 100% rename from templates/tmux.conf rename to templates/tmux/tmux.conf