tummy 1.1.2 → 1.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/Tmuxfile.erb +4 -0
- data/exe/tummy +14 -3
- data/lib/tummy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38652abbd388a1042e3080751b4a631ace7d77ab
|
4
|
+
data.tar.gz: d5910e51c1accb9c5c30f61d5cf556d87d5f5277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49139f09afc804bfb54eb17949a6f000164b06e8539b8fc0fdd560a4e1661e0cc2e19e22bf9190aafa7a87f2de60b5ed8a821d1c4181f132cca20fc6cb5dfac8
|
7
|
+
data.tar.gz: 2681153c1a16cf756dc74e5b74cbb09c053e8f7b56dc8e8c2646b52305f0fc821960f60404b616ddce94b976bdee373895875383ccf3d47479904b5aae96f53b
|
data/Tmuxfile.erb
CHANGED
@@ -18,4 +18,8 @@ window "play", [
|
|
18
18
|
pane("echo awesome", :vertical),
|
19
19
|
]
|
20
20
|
|
21
|
+
# if you comment this out it will focus the first window when the session is started
|
22
|
+
focus_window "server-iex"
|
23
|
+
# focus_window 0 # you can even focus a window by index starting at 0
|
24
|
+
|
21
25
|
# vim: filetype=ruby
|
data/exe/tummy
CHANGED
@@ -11,15 +11,15 @@ class Runner
|
|
11
11
|
attach_to_running_session
|
12
12
|
create_session
|
13
13
|
create_windows
|
14
|
-
|
14
|
+
focus_window
|
15
15
|
attach_to_running_session
|
16
16
|
end
|
17
17
|
|
18
18
|
def session; tmux.session_name end
|
19
19
|
def directory; tmux.directory_name end
|
20
20
|
|
21
|
-
def
|
22
|
-
run_cmd "tmux select-window -t #{session}
|
21
|
+
def focus_window
|
22
|
+
run_cmd "tmux select-window -t #{session}:#{tmux.focused_window}"
|
23
23
|
end
|
24
24
|
|
25
25
|
def create_session
|
@@ -74,6 +74,17 @@ class Tmux
|
|
74
74
|
Runner.new(self).run
|
75
75
|
end
|
76
76
|
|
77
|
+
def focus_window(window_name_or_index)
|
78
|
+
@focused_window = window_name_or_index
|
79
|
+
end
|
80
|
+
|
81
|
+
def focused_window
|
82
|
+
# try to find the window with the name
|
83
|
+
index = @windows.find_index{|w| w.name == @focused_window}
|
84
|
+
|
85
|
+
index || @focused_window.to_i
|
86
|
+
end
|
87
|
+
|
77
88
|
def session(name)
|
78
89
|
@session = name
|
79
90
|
end
|
data/lib/tummy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tummy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Khaja Minhajuddin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|