tmuxinator 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tmuxinator/assets/template.erb +15 -6
- data/lib/tmuxinator/project.rb +12 -6
- data/lib/tmuxinator/version.rb +1 -1
- data/spec/lib/tmuxinator/project_spec.rb +12 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 837a353050a6ac064ea463e3e33113a845a1b555a9069c2514045b59440a634b
|
4
|
+
data.tar.gz: '008ef11a9c0734010632d58c06ea63f9ebc1d46eba0cfb4153c1dc63b1c7b6bc'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81c8a46ec5380f78d7db741ee707d69e25ac5d6edb56892e861ebfe06131d1c7d2725f6ce4e8880192564e761ff4e2a4de50087b01addfa0d3a6305df444c4f1
|
7
|
+
data.tar.gz: 39c755d7aa5c61ff52b225ab1a2a3f5f7eef68c58cfefcd421c217f350e304b2b3f920df61af349d004e7cc53eff61d69e84afd9179fd113a4ca86dda185f039
|
@@ -21,9 +21,15 @@ cd <%= root || "." %>
|
|
21
21
|
|
22
22
|
# Create the session and the first window. Manually switch to root
|
23
23
|
# directory if required to support tmux < 1.9
|
24
|
-
TMUX= <%= tmux_new_session_command %>
|
25
24
|
<% if windows.first.root? %>
|
25
|
+
<% if Tmuxinator::Config.version < 1.9 %>
|
26
|
+
TMUX= <%= tmux_new_session_command %>
|
26
27
|
<%= windows.first.tmux_window_command_prefix %> <%= "cd #{windows.first.root}".shellescape %> C-m
|
28
|
+
<%- else -%>
|
29
|
+
TMUX= <%= tmux_new_session_command %> -c <%= windows.first.root.shellescape %>
|
30
|
+
<% end %>
|
31
|
+
<%- else -%>
|
32
|
+
TMUX= <%= tmux_new_session_command %>
|
27
33
|
<% end %>
|
28
34
|
|
29
35
|
<% if Tmuxinator::Config.version < 1.7 %>
|
@@ -36,12 +42,9 @@ cd <%= root || "." %>
|
|
36
42
|
<% if enable_pane_titles? %>
|
37
43
|
<% if Tmuxinator::Config.version < 2.6 %>
|
38
44
|
<%= pane_titles_not_supported_warning %>
|
39
|
-
|
40
|
-
|
45
|
+
<% end %>
|
46
|
+
<% if pane_title_position? && !pane_title_position_valid? %>
|
41
47
|
<%= pane_title_position_not_valid_warning %>
|
42
|
-
<% end %>
|
43
|
-
<%= tmux_set_pane_title_position %>
|
44
|
-
<%= tmux_set_pane_title_format %>
|
45
48
|
<% end %>
|
46
49
|
<% end %>
|
47
50
|
|
@@ -56,6 +59,12 @@ cd <%= root || "." %>
|
|
56
59
|
<% if window.synchronize_before? %>
|
57
60
|
<%= window.tmux_synchronize_panes %>
|
58
61
|
<% end %>
|
62
|
+
|
63
|
+
<% if enable_pane_titles? && Tmuxinator::Config.version >= 2.6 %>
|
64
|
+
<%= tmux_set_pane_title_position(window.tmux_window_target) %>
|
65
|
+
<%= tmux_set_pane_title_format(window.tmux_window_target) %>
|
66
|
+
<% end %>
|
67
|
+
|
59
68
|
<% unless window.panes? %>
|
60
69
|
<% if window.project.pre_window %>
|
61
70
|
<%= window.tmux_pre_window_command %>
|
data/lib/tmuxinator/project.rb
CHANGED
@@ -341,19 +341,21 @@ module Tmuxinator
|
|
341
341
|
yaml["enable_pane_titles"]
|
342
342
|
end
|
343
343
|
|
344
|
-
def tmux_set_pane_title_position
|
344
|
+
def tmux_set_pane_title_position(tmux_window_target)
|
345
|
+
command = set_window_option(tmux_window_target)
|
345
346
|
if pane_title_position? && pane_title_position_valid?
|
346
|
-
"#{
|
347
|
+
"#{command} pane-border-status #{yaml['pane_title_position']}"
|
347
348
|
else
|
348
|
-
"#{
|
349
|
+
"#{command} pane-border-status top"
|
349
350
|
end
|
350
351
|
end
|
351
352
|
|
352
|
-
def tmux_set_pane_title_format
|
353
|
+
def tmux_set_pane_title_format(tmux_window_target)
|
354
|
+
command = set_window_option(tmux_window_target)
|
353
355
|
if pane_title_format?
|
354
|
-
"#{
|
356
|
+
"#{command} pane-border-format \"#{yaml['pane_title_format']}\""
|
355
357
|
else
|
356
|
-
"#{
|
358
|
+
"#{command} pane-border-format \"\#{pane_index}: \#{pane_title}\""
|
357
359
|
end
|
358
360
|
end
|
359
361
|
|
@@ -438,5 +440,9 @@ module Tmuxinator
|
|
438
440
|
msg = "WARNING: #{message}\n"
|
439
441
|
"printf \"#{yellow}#{msg}#{no_color}\""
|
440
442
|
end
|
443
|
+
|
444
|
+
def set_window_option(tmux_window_target)
|
445
|
+
"#{tmux} set-window-option -t #{tmux_window_target}"
|
446
|
+
end
|
441
447
|
end
|
442
448
|
end
|
data/lib/tmuxinator/version.rb
CHANGED
@@ -663,8 +663,8 @@ describe Tmuxinator::Project do
|
|
663
663
|
before { project.yaml["pane_title_position"] = nil }
|
664
664
|
|
665
665
|
it "configures a default position of top" do
|
666
|
-
expect(project.tmux_set_pane_title_position).to eq(
|
667
|
-
"tmux set pane-border-status top"
|
666
|
+
expect(project.tmux_set_pane_title_position("x")).to eq(
|
667
|
+
"tmux set-window-option -t x pane-border-status top"
|
668
668
|
)
|
669
669
|
end
|
670
670
|
end
|
@@ -673,8 +673,8 @@ describe Tmuxinator::Project do
|
|
673
673
|
before { project.yaml["pane_title_position"] = "bottom" }
|
674
674
|
|
675
675
|
it "configures a position of bottom" do
|
676
|
-
expect(project.tmux_set_pane_title_position).to eq(
|
677
|
-
"tmux set pane-border-status bottom"
|
676
|
+
expect(project.tmux_set_pane_title_position("x")).to eq(
|
677
|
+
"tmux set-window-option -t x pane-border-status bottom"
|
678
678
|
)
|
679
679
|
end
|
680
680
|
end
|
@@ -683,8 +683,8 @@ describe Tmuxinator::Project do
|
|
683
683
|
before { project.yaml["pane_title_position"] = "other" }
|
684
684
|
|
685
685
|
it "configures the default position" do
|
686
|
-
expect(project.tmux_set_pane_title_position).to eq(
|
687
|
-
"tmux set pane-border-status top"
|
686
|
+
expect(project.tmux_set_pane_title_position("x")).to eq(
|
687
|
+
"tmux set-window-option -t x pane-border-status top"
|
688
688
|
)
|
689
689
|
end
|
690
690
|
end
|
@@ -693,9 +693,10 @@ describe Tmuxinator::Project do
|
|
693
693
|
before { project.yaml["pane_title_format"] = nil }
|
694
694
|
|
695
695
|
it "configures a default format" do
|
696
|
-
|
697
|
-
"tmux set pane-border-format
|
698
|
-
|
696
|
+
resp = ""\
|
697
|
+
"tmux set-window-option -t x pane-border-format"\
|
698
|
+
" \"\#{pane_index}: \#{pane_title}\""
|
699
|
+
expect(project.tmux_set_pane_title_format("x")).to eq(resp)
|
699
700
|
end
|
700
701
|
end
|
701
702
|
|
@@ -703,8 +704,8 @@ describe Tmuxinator::Project do
|
|
703
704
|
before { project.yaml["pane_title_format"] = " [ #T ] " }
|
704
705
|
|
705
706
|
it "configures the provided format" do
|
706
|
-
expect(project.tmux_set_pane_title_format).to eq(
|
707
|
-
'tmux set pane-border-format " [ #T ] "'
|
707
|
+
expect(project.tmux_set_pane_title_format("x")).to eq(
|
708
|
+
'tmux set-window-option -t x pane-border-format " [ #T ] "'
|
708
709
|
)
|
709
710
|
end
|
710
711
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmuxinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Bargi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: erubi
|
@@ -302,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
302
|
- !ruby/object:Gem::Version
|
303
303
|
version: 1.8.23
|
304
304
|
requirements: []
|
305
|
-
rubygems_version: 3.
|
305
|
+
rubygems_version: 3.2.15
|
306
306
|
signing_key:
|
307
307
|
specification_version: 4
|
308
308
|
summary: Create and manage complex tmux sessions easily.
|