uh-wm 0.0.6 → 0.0.7
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/uh/wm/actions_handler.rb +9 -0
- data/lib/uh/wm/cli.rb +1 -1
- data/lib/uh/wm/client.rb +14 -0
- data/lib/uh/wm/env.rb +3 -1
- data/lib/uh/wm/env_logging.rb +1 -1
- data/lib/uh/wm/launcher.rb +73 -0
- data/lib/uh/wm/run_control.rb +10 -0
- data/lib/uh/wm/runner.rb +26 -5
- data/lib/uh/wm/testing/acceptance_helpers.rb +36 -65
- data/lib/uh/wm/testing/x_client.rb +63 -0
- data/lib/uh/wm/version.rb +1 -1
- data/lib/uh/wm/workers/base.rb +1 -1
- data/lib/uh/wm/workers/mux.rb +3 -1
- data/lib/uh/wm.rb +5 -3
- metadata +9 -111
- data/.gitignore +0 -3
- data/.rspec +0 -1
- data/.travis.yml +0 -15
- data/Gemfile +0 -5
- data/Guardfile +0 -12
- data/LICENSE +0 -30
- data/Rakefile +0 -40
- data/config/cucumber.yaml +0 -1
- data/features/actions/execute.feature +0 -9
- data/features/actions/layout_delegation.feature +0 -31
- data/features/actions/quit.feature +0 -9
- data/features/cli/debug.feature +0 -5
- data/features/cli/layout.feature +0 -15
- data/features/cli/require.feature +0 -5
- data/features/cli/run_control.feature +0 -9
- data/features/cli/usage.feature +0 -11
- data/features/cli/verbose.feature +0 -5
- data/features/cli/version.feature +0 -6
- data/features/cli/worker.feature +0 -9
- data/features/layout/manage.feature +0 -12
- data/features/layout/protocol.feature +0 -56
- data/features/layout/unmanage.feature +0 -10
- data/features/manager/change.feature +0 -7
- data/features/manager/check_other_wm.feature +0 -8
- data/features/manager/expose.feature +0 -5
- data/features/manager/input_events.feature +0 -8
- data/features/manager/manage.feature +0 -14
- data/features/manager/unmanage.feature +0 -13
- data/features/manager/x_errors.feature +0 -17
- data/features/run_control/evaluation.feature +0 -18
- data/features/run_control/key.feature +0 -33
- data/features/run_control/layout.feature +0 -39
- data/features/run_control/modifier.feature +0 -10
- data/features/run_control/worker.feature +0 -9
- data/features/session/connection.feature +0 -5
- data/features/session/termination.feature +0 -12
- data/features/steps/filesystem_steps.rb +0 -3
- data/features/steps/output_steps.rb +0 -55
- data/features/steps/run_control_steps.rb +0 -3
- data/features/steps/run_steps.rb +0 -41
- data/features/steps/x_steps.rb +0 -58
- data/features/support/env.rb +0 -33
- data/features/workers/block.feature +0 -15
- data/features/workers/mux.feature +0 -15
- data/spec/spec_helper.rb +0 -30
- data/spec/support/exit_helpers.rb +0 -6
- data/spec/support/factories.rb +0 -27
- data/spec/support/filesystem_helpers.rb +0 -11
- data/spec/uh/wm/actions_handler_spec.rb +0 -35
- data/spec/uh/wm/cli_spec.rb +0 -214
- data/spec/uh/wm/client_spec.rb +0 -148
- data/spec/uh/wm/dispatcher_spec.rb +0 -76
- data/spec/uh/wm/env_spec.rb +0 -154
- data/spec/uh/wm/manager_spec.rb +0 -386
- data/spec/uh/wm/run_control_spec.rb +0 -126
- data/spec/uh/wm/runner_spec.rb +0 -196
- data/uh-wm.gemspec +0 -26
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uh-wm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
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-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uh
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.0.
|
19
|
+
version: 2.0.2
|
20
20
|
type: :runtime
|
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: 2.0.
|
26
|
+
version: 2.0.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: uh-layout
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,54 +113,11 @@ email: tj@a13.fr
|
|
113
113
|
executables:
|
114
114
|
- uhwm
|
115
115
|
extensions: []
|
116
|
-
extra_rdoc_files:
|
116
|
+
extra_rdoc_files:
|
117
|
+
- README.md
|
117
118
|
files:
|
118
|
-
- ".gitignore"
|
119
|
-
- ".rspec"
|
120
|
-
- ".travis.yml"
|
121
|
-
- Gemfile
|
122
|
-
- Guardfile
|
123
|
-
- LICENSE
|
124
119
|
- README.md
|
125
|
-
- Rakefile
|
126
120
|
- bin/uhwm
|
127
|
-
- config/cucumber.yaml
|
128
|
-
- features/actions/execute.feature
|
129
|
-
- features/actions/layout_delegation.feature
|
130
|
-
- features/actions/quit.feature
|
131
|
-
- features/cli/debug.feature
|
132
|
-
- features/cli/layout.feature
|
133
|
-
- features/cli/require.feature
|
134
|
-
- features/cli/run_control.feature
|
135
|
-
- features/cli/usage.feature
|
136
|
-
- features/cli/verbose.feature
|
137
|
-
- features/cli/version.feature
|
138
|
-
- features/cli/worker.feature
|
139
|
-
- features/layout/manage.feature
|
140
|
-
- features/layout/protocol.feature
|
141
|
-
- features/layout/unmanage.feature
|
142
|
-
- features/manager/change.feature
|
143
|
-
- features/manager/check_other_wm.feature
|
144
|
-
- features/manager/expose.feature
|
145
|
-
- features/manager/input_events.feature
|
146
|
-
- features/manager/manage.feature
|
147
|
-
- features/manager/unmanage.feature
|
148
|
-
- features/manager/x_errors.feature
|
149
|
-
- features/run_control/evaluation.feature
|
150
|
-
- features/run_control/key.feature
|
151
|
-
- features/run_control/layout.feature
|
152
|
-
- features/run_control/modifier.feature
|
153
|
-
- features/run_control/worker.feature
|
154
|
-
- features/session/connection.feature
|
155
|
-
- features/session/termination.feature
|
156
|
-
- features/steps/filesystem_steps.rb
|
157
|
-
- features/steps/output_steps.rb
|
158
|
-
- features/steps/run_control_steps.rb
|
159
|
-
- features/steps/run_steps.rb
|
160
|
-
- features/steps/x_steps.rb
|
161
|
-
- features/support/env.rb
|
162
|
-
- features/workers/block.feature
|
163
|
-
- features/workers/mux.feature
|
164
121
|
- lib/uh/wm.rb
|
165
122
|
- lib/uh/wm/actions_handler.rb
|
166
123
|
- lib/uh/wm/cli.rb
|
@@ -168,29 +125,18 @@ files:
|
|
168
125
|
- lib/uh/wm/dispatcher.rb
|
169
126
|
- lib/uh/wm/env.rb
|
170
127
|
- lib/uh/wm/env_logging.rb
|
128
|
+
- lib/uh/wm/launcher.rb
|
171
129
|
- lib/uh/wm/logger_formatter.rb
|
172
130
|
- lib/uh/wm/manager.rb
|
173
131
|
- lib/uh/wm/run_control.rb
|
174
132
|
- lib/uh/wm/runner.rb
|
175
133
|
- lib/uh/wm/testing/acceptance_helpers.rb
|
134
|
+
- lib/uh/wm/testing/x_client.rb
|
176
135
|
- lib/uh/wm/version.rb
|
177
136
|
- lib/uh/wm/workers.rb
|
178
137
|
- lib/uh/wm/workers/base.rb
|
179
138
|
- lib/uh/wm/workers/blocking.rb
|
180
139
|
- lib/uh/wm/workers/mux.rb
|
181
|
-
- spec/spec_helper.rb
|
182
|
-
- spec/support/exit_helpers.rb
|
183
|
-
- spec/support/factories.rb
|
184
|
-
- spec/support/filesystem_helpers.rb
|
185
|
-
- spec/uh/wm/actions_handler_spec.rb
|
186
|
-
- spec/uh/wm/cli_spec.rb
|
187
|
-
- spec/uh/wm/client_spec.rb
|
188
|
-
- spec/uh/wm/dispatcher_spec.rb
|
189
|
-
- spec/uh/wm/env_spec.rb
|
190
|
-
- spec/uh/wm/manager_spec.rb
|
191
|
-
- spec/uh/wm/run_control_spec.rb
|
192
|
-
- spec/uh/wm/runner_spec.rb
|
193
|
-
- uh-wm.gemspec
|
194
140
|
homepage: https://rubygems.org/gems/uh-wm
|
195
141
|
licenses:
|
196
142
|
- BSD-3-Clause
|
@@ -215,52 +161,4 @@ rubygems_version: 2.4.5
|
|
215
161
|
signing_key:
|
216
162
|
specification_version: 4
|
217
163
|
summary: minimalistic tiling and stacking window manager for X
|
218
|
-
test_files:
|
219
|
-
- features/actions/execute.feature
|
220
|
-
- features/actions/layout_delegation.feature
|
221
|
-
- features/actions/quit.feature
|
222
|
-
- features/cli/debug.feature
|
223
|
-
- features/cli/layout.feature
|
224
|
-
- features/cli/require.feature
|
225
|
-
- features/cli/run_control.feature
|
226
|
-
- features/cli/usage.feature
|
227
|
-
- features/cli/verbose.feature
|
228
|
-
- features/cli/version.feature
|
229
|
-
- features/cli/worker.feature
|
230
|
-
- features/layout/manage.feature
|
231
|
-
- features/layout/protocol.feature
|
232
|
-
- features/layout/unmanage.feature
|
233
|
-
- features/manager/change.feature
|
234
|
-
- features/manager/check_other_wm.feature
|
235
|
-
- features/manager/expose.feature
|
236
|
-
- features/manager/input_events.feature
|
237
|
-
- features/manager/manage.feature
|
238
|
-
- features/manager/unmanage.feature
|
239
|
-
- features/manager/x_errors.feature
|
240
|
-
- features/run_control/evaluation.feature
|
241
|
-
- features/run_control/key.feature
|
242
|
-
- features/run_control/layout.feature
|
243
|
-
- features/run_control/modifier.feature
|
244
|
-
- features/run_control/worker.feature
|
245
|
-
- features/session/connection.feature
|
246
|
-
- features/session/termination.feature
|
247
|
-
- features/steps/filesystem_steps.rb
|
248
|
-
- features/steps/output_steps.rb
|
249
|
-
- features/steps/run_control_steps.rb
|
250
|
-
- features/steps/run_steps.rb
|
251
|
-
- features/steps/x_steps.rb
|
252
|
-
- features/support/env.rb
|
253
|
-
- features/workers/block.feature
|
254
|
-
- features/workers/mux.feature
|
255
|
-
- spec/spec_helper.rb
|
256
|
-
- spec/support/exit_helpers.rb
|
257
|
-
- spec/support/factories.rb
|
258
|
-
- spec/support/filesystem_helpers.rb
|
259
|
-
- spec/uh/wm/actions_handler_spec.rb
|
260
|
-
- spec/uh/wm/cli_spec.rb
|
261
|
-
- spec/uh/wm/client_spec.rb
|
262
|
-
- spec/uh/wm/dispatcher_spec.rb
|
263
|
-
- spec/uh/wm/env_spec.rb
|
264
|
-
- spec/uh/wm/manager_spec.rb
|
265
|
-
- spec/uh/wm/run_control_spec.rb
|
266
|
-
- spec/uh/wm/runner_spec.rb
|
164
|
+
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--require spec_helper
|
data/.travis.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
rvm:
|
4
|
-
- 2.2
|
5
|
-
- ruby-head
|
6
|
-
- 2.1
|
7
|
-
before_install:
|
8
|
-
- travis_retry sudo apt-get update -qq
|
9
|
-
- travis_retry sudo apt-get install -qq twm x11-utils xdotool
|
10
|
-
matrix:
|
11
|
-
allow_failures:
|
12
|
-
- rvm: ruby-head
|
13
|
-
notifications:
|
14
|
-
email:
|
15
|
-
- tj+travis_uh_wm@a13.fr
|
data/Gemfile
DELETED
data/Guardfile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
directories %w[features lib spec]
|
2
|
-
|
3
|
-
guard :cucumber, cli: '--format pretty --quiet', all_on_start: false do
|
4
|
-
watch(%r{\Afeatures/.+\.feature\z})
|
5
|
-
end
|
6
|
-
|
7
|
-
guard :rspec, cmd: 'bundle exec rspec -f doc' do
|
8
|
-
watch(%r{\Aspec/.+_spec\.rb\z})
|
9
|
-
watch(%r{\Alib/(.+)\.rb\z}) { |m| "spec/#{m[1]}_spec.rb" }
|
10
|
-
watch('spec/spec_helper.rb') { 'spec' }
|
11
|
-
watch(%r{\Aspec/support/.+\.rb\z}) { 'spec' }
|
12
|
-
end
|
data/LICENSE
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
Copyright 2015 Thibault Jouan. All rights reserved.
|
2
|
-
|
3
|
-
Redistribution and use in source and binary forms, with or without
|
4
|
-
modification, are permitted provided that the following conditions are
|
5
|
-
met:
|
6
|
-
|
7
|
-
* Redistributions of source code must retain the above copyright
|
8
|
-
notice, this list of conditions and the following disclaimer.
|
9
|
-
|
10
|
-
* Redistributions in binary form must reproduce the above copyright
|
11
|
-
notice, this list of conditions and the following disclaimer in
|
12
|
-
the documentation and/or other materials provided with the
|
13
|
-
distribution.
|
14
|
-
|
15
|
-
* Neither the name of the software nor the names of its contributors
|
16
|
-
may be used to endorse or promote products derived from this
|
17
|
-
software without specific prior written permission.
|
18
|
-
|
19
|
-
|
20
|
-
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND
|
21
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
23
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS
|
24
|
-
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
25
|
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
26
|
-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
27
|
-
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
28
|
-
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
29
|
-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
30
|
-
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/Rakefile
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'tempfile'
|
2
|
-
require 'cucumber/rake/task'
|
3
|
-
require 'rspec/core/rake_task'
|
4
|
-
|
5
|
-
XEPHYR_DISPLAY = ':42'
|
6
|
-
XEPHYR_CMD = "$(command -v Xephyr) #{XEPHYR_DISPLAY} -ac -br -noreset".freeze
|
7
|
-
XEPHYR_SCREENS = '-screen 1436x400'.freeze
|
8
|
-
XEPHYR_SCREENS_XINERAMA =
|
9
|
-
'+xinerama -origin 0,0 -screen 1920x400 -origin 1920,0 -screen 1920x400'.freeze
|
10
|
-
|
11
|
-
task default: %i[features spec]
|
12
|
-
|
13
|
-
Cucumber::Rake::Task.new(:features)
|
14
|
-
|
15
|
-
RSpec::Core::RakeTask.new
|
16
|
-
|
17
|
-
desc 'Run uhwm in a Xephyr X server'
|
18
|
-
task :run do
|
19
|
-
uhwm_args = ARGV.include?('--') ?
|
20
|
-
ARGV.slice_after('--').to_a.last :
|
21
|
-
%w[-d]
|
22
|
-
Tempfile.create('uhwm_xinitrc') do |xinitrc|
|
23
|
-
xinitrc.write <<-eoh
|
24
|
-
[ -f $HOME/.Xdefaults ] && xrdb $HOME/.Xdefaults
|
25
|
-
#xkbcomp #{ENV['DISPLAY']} #{XEPHYR_DISPLAY}
|
26
|
-
xmodmap -display #{ENV['DISPLAY']} -pke | xmodmap -
|
27
|
-
xsetroot -solid SpringGreen
|
28
|
-
echo "######## UHWM START ########"
|
29
|
-
./bin/uhwm #{uhwm_args.join ' '}
|
30
|
-
echo "######## UHWM END ##########"
|
31
|
-
eoh
|
32
|
-
xinitrc.flush
|
33
|
-
sh "xinit #{xinitrc.path} -- %s" % [
|
34
|
-
XEPHYR_CMD,
|
35
|
-
ENV.key?('UHWM_XINERAMA') ?
|
36
|
-
XEPHYR_SCREENS_XINERAMA :
|
37
|
-
XEPHYR_SCREENS
|
38
|
-
].join(' ')
|
39
|
-
end
|
40
|
-
end
|
data/config/cucumber.yaml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
default: --require features/support --require features/steps
|
@@ -1,9 +0,0 @@
|
|
1
|
-
Feature: `execute' action keyword
|
2
|
-
|
3
|
-
Scenario: executes the given command in a shell with current standard output
|
4
|
-
Given uhwm is running with this run control file:
|
5
|
-
"""
|
6
|
-
key(:f) { execute 'echo etucexe_tset | rev' }
|
7
|
-
"""
|
8
|
-
When I press the alt+f keys
|
9
|
-
Then the output must contain "test_execute"
|
@@ -1,31 +0,0 @@
|
|
1
|
-
Feature: `layout_*' action keywords
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given a file named layout.rb with:
|
5
|
-
"""
|
6
|
-
class Layout
|
7
|
-
def register _; end
|
8
|
-
|
9
|
-
def handle_some_action arg
|
10
|
-
puts arg
|
11
|
-
end
|
12
|
-
end
|
13
|
-
"""
|
14
|
-
|
15
|
-
Scenario: delegates messages matching `layout_*' to `layout_handle_*'
|
16
|
-
Given a run control file with:
|
17
|
-
"""
|
18
|
-
key(:f) { layout_some_action :testing_some_action }
|
19
|
-
"""
|
20
|
-
And uhwm is running
|
21
|
-
When I press the alt+f keys
|
22
|
-
Then the output must contain ":testing_some_action"
|
23
|
-
|
24
|
-
Scenario: logs an error about unimplemented messages
|
25
|
-
Given a run control file with:
|
26
|
-
"""
|
27
|
-
key(:f) { layout_unknown_action }
|
28
|
-
"""
|
29
|
-
And uhwm is running
|
30
|
-
When I press the alt+f keys
|
31
|
-
Then the output must match /layout.+no.+implem.+handle_unknown_action/i
|
data/features/cli/debug.feature
DELETED
data/features/cli/layout.feature
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
Feature: layout CLI option
|
2
|
-
|
3
|
-
Scenario: specifies the layout class
|
4
|
-
Given a file named layout.rb with:
|
5
|
-
"""
|
6
|
-
class MyLayout
|
7
|
-
def register _; end
|
8
|
-
end
|
9
|
-
"""
|
10
|
-
When I run uhwm with option -v -r./layout -l MyLayout
|
11
|
-
Then the output must match /layout.+mylayout/i
|
12
|
-
|
13
|
-
Scenario: resolves layout class from the root namespace
|
14
|
-
When I run uhwm with option -v -l Layout
|
15
|
-
Then the output must contain "uninitialized constant Layout"
|
@@ -1,9 +0,0 @@
|
|
1
|
-
Feature: run control file path CLI option
|
2
|
-
|
3
|
-
Scenario: specifies run control file path
|
4
|
-
Given a file named uhwmrc.rb with:
|
5
|
-
"""
|
6
|
-
puts 'run control evaluation'
|
7
|
-
"""
|
8
|
-
When I run uhwm with option -f uhwmrc.rb
|
9
|
-
Then the output must contain "run control evaluation"
|
data/features/cli/usage.feature
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Feature: CLI usage
|
2
|
-
|
3
|
-
Scenario: prints the usage when unknown option switch is given
|
4
|
-
When I run uhwm with option --unknown-option
|
5
|
-
Then the exit status must be 64
|
6
|
-
And the output must contain exactly the usage
|
7
|
-
|
8
|
-
Scenario: prints the help when -h option is given
|
9
|
-
When I run uhwm with option -h
|
10
|
-
Then uhwm must terminate successfully
|
11
|
-
And the output must contain exactly the usage
|
data/features/cli/worker.feature
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
Feature: worker CLI option
|
2
|
-
|
3
|
-
Scenario: uses the blocking worker when `block' is given
|
4
|
-
When I run uhwm with option -v -w block
|
5
|
-
Then the output must match /work.+event.+block/i
|
6
|
-
|
7
|
-
Scenario: uses the multiplexing worker when `mux' is given
|
8
|
-
When I run uhwm with option -v -w mux
|
9
|
-
Then the output must match /work.+event.+mux/i
|
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: layout client management
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given uhwm is running
|
5
|
-
|
6
|
-
Scenario: maps new client window
|
7
|
-
When a window requests to be mapped
|
8
|
-
Then the window must be mapped
|
9
|
-
|
10
|
-
Scenario: focuses new client window
|
11
|
-
When a window is mapped
|
12
|
-
Then the window must be focused
|
@@ -1,56 +0,0 @@
|
|
1
|
-
Feature: layout protocol
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given a file named layout.rb with:
|
5
|
-
"""
|
6
|
-
class Layout
|
7
|
-
def register display
|
8
|
-
puts display
|
9
|
-
display.create_subwindow(Uh::Geo.new(0, 0, 640, 16)).tap do |o|
|
10
|
-
o.show
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def << client
|
15
|
-
puts "testing_#<<_#{client.name}"
|
16
|
-
client.show
|
17
|
-
end
|
18
|
-
|
19
|
-
def remove client
|
20
|
-
puts "testing_#remove_#{client.name}"
|
21
|
-
end
|
22
|
-
|
23
|
-
def update client
|
24
|
-
puts "testing_#update_#{client.name}"
|
25
|
-
end
|
26
|
-
|
27
|
-
def expose window
|
28
|
-
puts "testing_#expose_#{window.id}"
|
29
|
-
end
|
30
|
-
end
|
31
|
-
"""
|
32
|
-
|
33
|
-
Scenario: tells the layout to register with #register message
|
34
|
-
When I run uhwm with option -r./layout -l Layout
|
35
|
-
Then the output must contain current display
|
36
|
-
|
37
|
-
Scenario: tells the layout to manage a client with #<< message
|
38
|
-
Given uhwm is running with options -v -r./layout -l Layout
|
39
|
-
When a window requests to be mapped
|
40
|
-
Then the output must contain "testing_#<<_XClient/default"
|
41
|
-
|
42
|
-
Scenario: tells the layout to unmanage a client with #remove message
|
43
|
-
Given uhwm is running with options -v -r./layout -l Layout
|
44
|
-
And a window is mapped
|
45
|
-
When the window is unmapped
|
46
|
-
Then the output must contain "testing_#remove_XClient/default"
|
47
|
-
|
48
|
-
Scenario: tells the layout to update a changed client with #update message
|
49
|
-
Given uhwm is running with options -v -r./layout -l Layout
|
50
|
-
And a window is mapped
|
51
|
-
When the window name changes to "testing_new_name"
|
52
|
-
Then the output must contain "testing_#update_testing_new_name"
|
53
|
-
|
54
|
-
Scenario: tells the layout about an exposed window with #expose message
|
55
|
-
Given I run uhwm with options -r./layout -l Layout
|
56
|
-
Then the output must match /testing_#expose_\d+/
|
@@ -1,8 +0,0 @@
|
|
1
|
-
Feature: checking if another window manager is running
|
2
|
-
|
3
|
-
@other_wm_running
|
4
|
-
Scenario: fails when another window manager is running
|
5
|
-
Given another window manager is running
|
6
|
-
When I start uhwm
|
7
|
-
Then the exit status must be 70
|
8
|
-
And the output must match /error.+other.+window.+manager/i
|
@@ -1,8 +0,0 @@
|
|
1
|
-
Feature: input events selection
|
2
|
-
|
3
|
-
Scenario: selects the appropriate input event mask for a window manager
|
4
|
-
Given uhwm is running
|
5
|
-
Then the input event mask must include StructureNotifyMask
|
6
|
-
And the input event mask must include SubstructureNotifyMask
|
7
|
-
And the input event mask must include SubstructureRedirectMask
|
8
|
-
And the input event mask must include PropertyChangeMask
|
@@ -1,14 +0,0 @@
|
|
1
|
-
Feature: manager client management
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given uhwm is running
|
5
|
-
|
6
|
-
Scenario: logs when a new client is managed
|
7
|
-
When a window requests to be mapped
|
8
|
-
Then the output must match /manag.+xclient/i
|
9
|
-
|
10
|
-
Scenario: manages a given client only once
|
11
|
-
When a window requests to be mapped 2 times
|
12
|
-
And I quit uhwm
|
13
|
-
Then the output must not match /manag.*\n.*manag/mi
|
14
|
-
And the output must not match /xerror/i
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Feature: manager client unmanagement
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given uhwm is running
|
5
|
-
And a window is mapped
|
6
|
-
|
7
|
-
Scenario: logs when a new client is unmanaged
|
8
|
-
When the window is unmapped
|
9
|
-
Then the output must match /unmanag.+xclient/i
|
10
|
-
|
11
|
-
Scenario: unmanages client on destroy notify X events
|
12
|
-
When the window is destroyed
|
13
|
-
Then the output must match /unmanag.+xclient/i
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Feature: X errors logging
|
2
|
-
|
3
|
-
Scenario: logs error details
|
4
|
-
Given a file named layout.rb with:
|
5
|
-
"""
|
6
|
-
class Layout
|
7
|
-
def register _; end
|
8
|
-
|
9
|
-
# Focusing a client before mapping will force an error
|
10
|
-
def << client
|
11
|
-
client.focus
|
12
|
-
end
|
13
|
-
end
|
14
|
-
"""
|
15
|
-
And uhwm is running with options -v -r./layout -l Layout
|
16
|
-
When a window requests to be mapped
|
17
|
-
Then the output must match /x.*error.+x_setinputfocus.+/i
|
@@ -1,18 +0,0 @@
|
|
1
|
-
Feature: run control file evaluation
|
2
|
-
|
3
|
-
Scenario: evaluates the default run control file when present
|
4
|
-
Given a run control file with:
|
5
|
-
"""
|
6
|
-
puts 'run control evaluation'
|
7
|
-
"""
|
8
|
-
When I start uhwm
|
9
|
-
Then the output must contain "run control evaluation"
|
10
|
-
|
11
|
-
Scenario: reports run control code in backtrace on errors
|
12
|
-
Given a run control file with:
|
13
|
-
"""
|
14
|
-
'no error on first line'
|
15
|
-
fail 'fails on second line'
|
16
|
-
"""
|
17
|
-
When I start uhwm
|
18
|
-
Then the output must match /\.uhwmrc\.rb:2:.+fails on second line/
|
@@ -1,33 +0,0 @@
|
|
1
|
-
Feature: `key' run control keyword
|
2
|
-
|
3
|
-
Scenario: defines code to run when given key is pressed
|
4
|
-
Given uhwm is running with this run control file:
|
5
|
-
"""
|
6
|
-
key(:f) { puts 'trigger f key code' }
|
7
|
-
"""
|
8
|
-
When I press the alt+f keys
|
9
|
-
Then the output must contain "trigger f key code"
|
10
|
-
|
11
|
-
Scenario: defines code to run when given keys are pressed
|
12
|
-
Given uhwm is running with this run control file:
|
13
|
-
"""
|
14
|
-
key(:f, :shift) { puts 'trigger f key code' }
|
15
|
-
"""
|
16
|
-
When I press the alt+shift+f keys
|
17
|
-
Then the output must contain "trigger f key code"
|
18
|
-
|
19
|
-
Scenario: translates common key names to their X equivalent
|
20
|
-
Given uhwm is running with this run control file:
|
21
|
-
"""
|
22
|
-
key(:enter) { puts 'trigger return key code' }
|
23
|
-
"""
|
24
|
-
When I press the alt+Return keys
|
25
|
-
Then the output must contain "trigger return key code"
|
26
|
-
|
27
|
-
Scenario: translates upcased key names to combination with shift key
|
28
|
-
Given uhwm is running with this run control file:
|
29
|
-
"""
|
30
|
-
key(:F) { puts 'trigger shift+f key code' }
|
31
|
-
"""
|
32
|
-
When I press the alt+shift+f keys
|
33
|
-
Then the output must contain "trigger shift+f key code"
|