dumon 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/dumon.gemspec +1 -1
- data/lib/dumon/omanager.rb +1 -1
- data/lib/dumon/ui.rb +13 -1
- data/lib/dumon/version.rb +1 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 698d5426fddbe57d8e19dc790593e35312cf33b4
|
4
|
+
data.tar.gz: f6222646686459f2397b2ec5871a7d1e10f05f5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c9dfcfd7bcccfd3a1ede8625d4179f7145f51314ca544e3c9691b86bcb36b446b4cff224cbea5a8797531c71abcd4236cb5f803df7519717601d2e473105f58
|
7
|
+
data.tar.gz: ec79e705f82be6d87513833a87492297898b14033dc113ef35e666cc674d8d21385a26721263d575ab02057efe87a07c16f117efb0abd1094f7edfa0fe96bb0c
|
data/README.md
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
|
8
8
|
Dual monitor manager for Linux with GTK based user interface represented by system tray icon's context menu.
|
9
9
|
|
10
|
+
[![Gem Version](https://badge.fury.io/rb/dumon.svg)](http://badge.fury.io/rb/dumon)
|
11
|
+
|
10
12
|
## SCREENSHOTS
|
11
13
|
|
12
14
|
[![](https://raw.github.com/veny/dumon/master/screenshots/tray_icon.png)](https://raw.github.com/veny/dumon/master/screenshots/tray_icon.png)
|
@@ -69,7 +71,7 @@ Dual monitor manager for Linux with GTK based user interface represented by syst
|
|
69
71
|
|
70
72
|
> Dumon.logger.level = Logger::DEBUG
|
71
73
|
|
72
|
-
|
74
|
+
#### Post Switch Command
|
73
75
|
|
74
76
|
* you can define a shell command that will be executed after each switch of output
|
75
77
|
* just insert _post_switch_ key into _$HOME/.config/dumon.conf_ like this
|
data/dumon.gemspec
CHANGED
data/lib/dumon/omanager.rb
CHANGED
@@ -189,6 +189,7 @@ module Dumon
|
|
189
189
|
output = nil
|
190
190
|
|
191
191
|
xrandr_out = `#{self.stool} -q`
|
192
|
+
xrandr_out.strip!
|
192
193
|
xrandr_out.each_line do |line|
|
193
194
|
if line =~ /^[\w-]+ connected /
|
194
195
|
output = line[/^[\w-]+/]
|
@@ -209,7 +210,6 @@ module Dumon
|
|
209
210
|
Dumon::logger.debug "Outputs found: #{rslt}"
|
210
211
|
|
211
212
|
# verify structure of readed infos
|
212
|
-
assert(!rslt.empty?, 'no outputs found')
|
213
213
|
rslt.each do |output,out_meta|
|
214
214
|
verify_options(out_meta, {:resolutions=>:mandatory, :default=>:mandatory, :current=>:optional})
|
215
215
|
assert(out_meta[:resolutions].size >= 1, "no resolution found, output=#{output}")
|
data/lib/dumon/ui.rb
CHANGED
@@ -117,7 +117,19 @@ module Dumon
|
|
117
117
|
###
|
118
118
|
# Reads info about currently usable outputs and construct corresponding structure of context menu.
|
119
119
|
def create_menu
|
120
|
-
|
120
|
+
begin
|
121
|
+
outputs = self.omanager.read
|
122
|
+
if outputs.empty?
|
123
|
+
md = Gtk::MessageDialog.new(nil,
|
124
|
+
Gtk::Dialog::DESTROY_WITH_PARENT, Gtk::MessageDialog::WARNING, Gtk::MessageDialog::BUTTONS_YES_NO,
|
125
|
+
"Failed to load display information.\nDo you want to reload?\n(Hit 'no' to terminate application)")
|
126
|
+
md.set_window_position :mouse
|
127
|
+
md.run do |r|
|
128
|
+
raise 'failed to load display information' if r == Gtk::Dialog::RESPONSE_NO
|
129
|
+
end
|
130
|
+
md.destroy
|
131
|
+
end
|
132
|
+
end while outputs.empty?
|
121
133
|
|
122
134
|
rslt = Gtk::Menu.new
|
123
135
|
|
data/lib/dumon/version.rb
CHANGED
@@ -2,6 +2,7 @@ module Dumon
|
|
2
2
|
|
3
3
|
# Version history.
|
4
4
|
VERSION_HISTORY = [
|
5
|
+
['0.3.0', '2015-03-04', 'Upgrade to Gtk v2.2+, BF #19'],
|
5
6
|
['0.2.9', '2014-06-11', 'Added configurable shell command running after each switch of output'],
|
6
7
|
['0.2.8', '2013-07-10', 'BF #15: Problem with nvidia graphic driver'],
|
7
8
|
['0.2.7', '2013-05-08', 'BF #14: Failure if applied profile with unconnected output; Enh #7'],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dumon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vaclav Sykora
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gtk2
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.2'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 2.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '2.2'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 2.2.0
|
33
33
|
description: Dual monitor manager for Linux with GTK based user interface represented
|
34
34
|
by system tray icon's context menu.
|
35
35
|
email: vaclav.sykora@gmail.com
|