uh-layout 0.4.1 → 0.4.2

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: 107a40b97e69793129c9dda9f1a545bb65575884
4
- data.tar.gz: e00a2106bed9315fd3f01de4e3155ae6dcea46ef
3
+ metadata.gz: a1876a272ea9eeeb4c061c9db38cccb886457f8e
4
+ data.tar.gz: 6bae74a66b41a1fee83178e7722ffa30fecd1f0b
5
5
  SHA512:
6
- metadata.gz: 34e2bfb33ebc482e4a7227079fdf6917066dfc3525b8da64881f6b0ba48ff41f1e1518c13d64b4187138c99f433d273fa4ddd89fcb6d36258db4ad0b09ef60df
7
- data.tar.gz: e1144c56b9e033375237a30db33f848a99e6df8dddaa93b8465d2151d4624f391b7427b802fccc09e06c4a87d2fa5eab6c1c54996dad2b312defe9dc094ca794
6
+ metadata.gz: 217057e3bff6a2a88d5e20d9a714df07df9cfa1680cb97d627fe6af23158d51ab29d81ab8e7a531502a5c4dbe989a0bc3eb36b655a32723ce355b2238e12e05e
7
+ data.tar.gz: 477c3abcc568c483ea2800e67891b1a02deafb4af8d731efeff5809a2c560531c468a73f7f3d32995b109798bc995d348336c27e404ce65758329e52cbf500b7
@@ -32,13 +32,14 @@ module Uh
32
32
  def_delegator :current_screen, :current_view
33
33
  def_delegator :current_view, :current_column
34
34
 
35
- attr_reader :screens, :widgets, :colors, :history
35
+ attr_reader :screens, :widgets, :colors, :history, :bar_status
36
36
 
37
37
  def initialize **options
38
- @screens = Container.new
39
- @widgets = []
40
- @colors = COLORS
41
- @history = History.new
38
+ @screens = Container.new
39
+ @widgets = []
40
+ @colors = COLORS
41
+ @history = History.new
42
+ @bar_status = options[:bar_status]
42
43
 
43
44
  @colors = @colors.merge options[:colors] if options.key? :colors
44
45
  end
@@ -88,8 +89,9 @@ module Uh
88
89
  update_widgets
89
90
  end
90
91
 
91
- def update(client)
92
- update_widgets unless client.hidden?
92
+ def update(client = nil)
93
+ return if client && client.hidden?
94
+ update_widgets
93
95
  end
94
96
 
95
97
  def expose(window)
@@ -169,10 +171,6 @@ module Uh
169
171
  handle_view_sel @history.last_view.id
170
172
  end
171
173
 
172
- def handle_kill_current
173
- current_client and current_client.kill
174
- end
175
-
176
174
 
177
175
  private
178
176
 
@@ -7,7 +7,10 @@ module Uh
7
7
  layout.screens << scr = Screen.new(screen.id, screen.geo)
8
8
  bar = Bar.new(display, scr, layout.colors).tap do |b|
9
9
  layout.widgets << b.show.focus
10
- b.on_update { bar.active = layout.current_screen? scr }
10
+ b.on_update do
11
+ bar.active = layout.current_screen? scr
12
+ bar.status = layout.bar_status.call if layout.bar_status
13
+ end
11
14
  end
12
15
  scr.height = scr.height - bar.height
13
16
  end
@@ -1,5 +1,5 @@
1
1
  module Uh
2
2
  class Layout
3
- VERSION = '0.4.1'.freeze
3
+ VERSION = '0.4.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uh-layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibault Jouan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-27 00:00:00.000000000 Z
11
+ date: 2015-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uh
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: uh-wm
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.6
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.6
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -99,3 +113,4 @@ signing_key:
99
113
  specification_version: 4
100
114
  summary: simple tiling and stacking layout for uh-wm
101
115
  test_files: []
116
+ has_rdoc: