sesh 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9b86406a5da72abaef21548fc671547938682d3
4
- data.tar.gz: e9dc1a0e96b952d81f8e657e2949a027601118e5
3
+ metadata.gz: 1c1bef49d5e6f451dc54a69ced4686389444b924
4
+ data.tar.gz: 64aa0590655e071ca971b879b43491ae8bac003b
5
5
  SHA512:
6
- metadata.gz: 1fc49b1c47e4f9374f8607be20673efb7356aafe0c1e10e203aa5783b876efd9250487417ab05182b394ba8c683e719b2b1d84248bbeef86970707205503a6aa
7
- data.tar.gz: f68fa4999d3abe476f5a88489771238947c1d0b7a0811079351f2563ead3581279cd3de2d4ec3482e57000592bfc452770d1a55002d6ace51b93d942d2902c0c
6
+ metadata.gz: 30fdfbf7979f17ddc1af7ac36b3c32a9e58835140c21e9e41cdc3acfe045793285aa59b0a5ba397cc37913f50f37ed7f67cf1087f7ccaa81ee5cfdac6b9ff2fc
7
+ data.tar.gz: f417dec87b40588935f2363bdae6208eceee0f67cdc786f4e3771db2e595ee671f555529a7a25f4c7838e2b84f926c640cffecb945fcbcd2e4f82be182cda25b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sesh (0.3.2)
4
+ sesh (0.3.3)
5
5
  awesome_print (~> 1.6)
6
6
  colorize (~> 0.7.7)
7
7
  deep_merge (~> 1.0)
data/Session.vim CHANGED
@@ -270,13 +270,13 @@ badd +12 ~/Sites/polygallery/lib/polygallery/paperclip_integration.rb
270
270
  badd +172 lib/sesh/cli.rb
271
271
  badd +18 lib/sesh/inferences.rb
272
272
  badd +22 lib/sesh/assets/sample.yml
273
- badd +0 lib/sesh/tmux_control.rb
273
+ badd +74 lib/sesh/tmux_control.rb
274
274
  badd +15 lib/sesh/ssh_control.rb
275
275
  badd +0 lib/sesh.rb
276
276
  badd +32 sesh.gemspec
277
277
  argglobal
278
278
  silent! argdel *
279
- edit lib/sesh/tmux_control.rb
279
+ edit lib/sesh/version.rb
280
280
  set splitbelow splitright
281
281
  wincmd _ | wincmd |
282
282
  split
@@ -284,6 +284,10 @@ split
284
284
  wincmd _ | wincmd |
285
285
  vsplit
286
286
  1wincmd h
287
+ wincmd _ | wincmd |
288
+ split
289
+ 1wincmd k
290
+ wincmd w
287
291
  wincmd w
288
292
  wincmd _ | wincmd |
289
293
  split
@@ -298,16 +302,18 @@ set nosplitbelow
298
302
  set nosplitright
299
303
  wincmd t
300
304
  set winheight=1 winwidth=1
301
- exe '1resize ' . ((&lines * 39 + 31) / 62)
305
+ exe '1resize ' . ((&lines * 20 + 31) / 62)
302
306
  exe 'vert 1resize ' . ((&columns * 136 + 136) / 272)
303
307
  exe '2resize ' . ((&lines * 19 + 31) / 62)
304
- exe 'vert 2resize ' . ((&columns * 135 + 136) / 272)
305
- exe '3resize ' . ((&lines * 19 + 31) / 62)
308
+ exe 'vert 2resize ' . ((&columns * 136 + 136) / 272)
309
+ exe '3resize ' . ((&lines * 20 + 31) / 62)
306
310
  exe 'vert 3resize ' . ((&columns * 135 + 136) / 272)
307
- exe '4resize ' . ((&lines * 20 + 31) / 62)
308
- exe 'vert 4resize ' . ((&columns * 136 + 136) / 272)
309
- exe '5resize ' . ((&lines * 20 + 31) / 62)
310
- exe 'vert 5resize ' . ((&columns * 135 + 136) / 272)
311
+ exe '4resize ' . ((&lines * 19 + 31) / 62)
312
+ exe 'vert 4resize ' . ((&columns * 135 + 136) / 272)
313
+ exe '5resize ' . ((&lines * 19 + 31) / 62)
314
+ exe 'vert 5resize ' . ((&columns * 136 + 136) / 272)
315
+ exe '6resize ' . ((&lines * 19 + 31) / 62)
316
+ exe 'vert 6resize ' . ((&columns * 135 + 136) / 272)
311
317
  argglobal
312
318
  setlocal fdm=manual
313
319
  setlocal fde=0
@@ -318,12 +324,30 @@ setlocal fml=1
318
324
  setlocal fdn=20
319
325
  setlocal fen
320
326
  silent! normal! zE
321
- let s:l = 57 - ((19 * winheight(0) + 19) / 39)
327
+ let s:l = 1 - ((0 * winheight(0) + 10) / 20)
322
328
  if s:l < 1 | let s:l = 1 | endif
323
329
  exe s:l
324
330
  normal! zt
325
- 57
326
- normal! 058|
331
+ 1
332
+ normal! 0
333
+ wincmd w
334
+ argglobal
335
+ edit lib/sesh/tmux_control.rb
336
+ setlocal fdm=manual
337
+ setlocal fde=0
338
+ setlocal fmr={{{,}}}
339
+ setlocal fdi=#
340
+ setlocal fdl=0
341
+ setlocal fml=1
342
+ setlocal fdn=20
343
+ setlocal fen
344
+ silent! normal! zE
345
+ let s:l = 74 - ((6 * winheight(0) + 9) / 19)
346
+ if s:l < 1 | let s:l = 1 | endif
347
+ exe s:l
348
+ normal! zt
349
+ 74
350
+ normal! 033|
327
351
  wincmd w
328
352
  argglobal
329
353
  edit lib/sesh/ssh_control.rb
@@ -336,12 +360,12 @@ setlocal fml=1
336
360
  setlocal fdn=20
337
361
  setlocal fen
338
362
  silent! normal! zE
339
- let s:l = 14 - ((13 * winheight(0) + 9) / 19)
363
+ let s:l = 37 - ((15 * winheight(0) + 10) / 20)
340
364
  if s:l < 1 | let s:l = 1 | endif
341
365
  exe s:l
342
366
  normal! zt
343
- 14
344
- normal! 019|
367
+ 37
368
+ normal! 09|
345
369
  wincmd w
346
370
  argglobal
347
371
  edit lib/sesh/inferences.rb
@@ -372,7 +396,7 @@ setlocal fml=1
372
396
  setlocal fdn=20
373
397
  setlocal fen
374
398
  silent! normal! zE
375
- let s:l = 42 - ((7 * winheight(0) + 10) / 20)
399
+ let s:l = 42 - ((7 * winheight(0) + 9) / 19)
376
400
  if s:l < 1 | let s:l = 1 | endif
377
401
  exe s:l
378
402
  normal! zt
@@ -390,23 +414,25 @@ setlocal fml=1
390
414
  setlocal fdn=20
391
415
  setlocal fen
392
416
  silent! normal! zE
393
- let s:l = 44 - ((19 * winheight(0) + 10) / 20)
417
+ let s:l = 44 - ((18 * winheight(0) + 9) / 19)
394
418
  if s:l < 1 | let s:l = 1 | endif
395
419
  exe s:l
396
420
  normal! zt
397
421
  44
398
422
  normal! 025|
399
423
  wincmd w
400
- exe '1resize ' . ((&lines * 39 + 31) / 62)
424
+ exe '1resize ' . ((&lines * 20 + 31) / 62)
401
425
  exe 'vert 1resize ' . ((&columns * 136 + 136) / 272)
402
426
  exe '2resize ' . ((&lines * 19 + 31) / 62)
403
- exe 'vert 2resize ' . ((&columns * 135 + 136) / 272)
404
- exe '3resize ' . ((&lines * 19 + 31) / 62)
427
+ exe 'vert 2resize ' . ((&columns * 136 + 136) / 272)
428
+ exe '3resize ' . ((&lines * 20 + 31) / 62)
405
429
  exe 'vert 3resize ' . ((&columns * 135 + 136) / 272)
406
- exe '4resize ' . ((&lines * 20 + 31) / 62)
407
- exe 'vert 4resize ' . ((&columns * 136 + 136) / 272)
408
- exe '5resize ' . ((&lines * 20 + 31) / 62)
409
- exe 'vert 5resize ' . ((&columns * 135 + 136) / 272)
430
+ exe '4resize ' . ((&lines * 19 + 31) / 62)
431
+ exe 'vert 4resize ' . ((&columns * 135 + 136) / 272)
432
+ exe '5resize ' . ((&lines * 19 + 31) / 62)
433
+ exe 'vert 5resize ' . ((&columns * 136 + 136) / 272)
434
+ exe '6resize ' . ((&lines * 19 + 31) / 62)
435
+ exe 'vert 6resize ' . ((&columns * 135 + 136) / 272)
410
436
  tabnext 1
411
437
  if exists('s:wipebuf')
412
438
  silent exe 'bwipe ' . s:wipebuf
@@ -34,7 +34,6 @@ module Sesh
34
34
  # TODO: come up with a non-toggling way to ensure fullscreen
35
35
  cmd += %Q[ -e '#{tell_term_process} to keystroke return using command down']
36
36
  end
37
- puts "Command: #{cmd}"
38
37
  Sesh.format_command cmd
39
38
  when 'Terminal' then Sesh.format_command connection_command(addr)
40
39
  end
@@ -35,7 +35,7 @@ module Sesh
35
35
  Logger.warn "Tmux failed to start with the following error: #{output}"; false
36
36
  end
37
37
 
38
- def issue_stop_command!;
38
+ def issue_stop_command!
39
39
  `ps -ef | grep "[t]mux -u attach-session -t #{Regexp.escape(@project)}\\$" | grep -v grep | awk '{print $2}' | xargs kill -9`
40
40
  end
41
41
 
@@ -66,6 +66,8 @@ module Sesh
66
66
  end
67
67
 
68
68
  def kill_running_processes
69
+ pane_count = `tmux list-panes -s -F "\#{pane_pid} \#{pane_current_command}" -t "#{@project}" 2>/dev/null`.strip.lines.count
70
+ pane_count.times{|i| move_cursor_to_pane_and_interrupt! i; sleep 0.1 }
69
71
  obtain_pids_from_session.each{|pid| kill_process! pid }
70
72
  # if File.exists? @options[:pids_file]
71
73
  # File.readlines(@options[:pids_file]).each{|pid|
data/lib/sesh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sesh
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sesh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith