dumon 0.2.8 → 0.2.9

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: 0c573b733f78dfc52576264eb8a6f7ed64957b46
4
- data.tar.gz: 2bd608cec4d1fbc8e0d04180415f66f8a7c44db2
3
+ metadata.gz: 1e1daac0755fa53c78fb91863a65d47d1c7be4cd
4
+ data.tar.gz: 499ac893d612c967dca12a9424222000d143af7e
5
5
  SHA512:
6
- metadata.gz: 6c6010aafb8bd533bcbca5e0c95966260deaefc67d7635a6575450800f17f231983600e2d9bc9bfddeda2b9cdac717d0f8028d6b3832b2b5cb1d081d3979d8ab
7
- data.tar.gz: ac948a72bdc893721380eef74f4e2aa085b65cf97fe1f71eda58043d5d1c33bbc6c89eb51ae3d29469b8a5289bb34d88515af61eef266109951802295fbab437
6
+ metadata.gz: 6ad46b641ac58fd2e61e84bd3bd87cc4fe46fedf8d39a97fddc8d128dd2b98e8088be80a4994ed57e10a6afac0c5a7357149523b2350b2fb68f9ab04a1c179ad
7
+ data.tar.gz: 9315d27aea0a9ef3425da388326e1bb1493475c0bfa26900526e523015c7395c060fc5dfebda4c12e2770295af59d0e7ce3894efe212fb0dff9c02a9962738b8
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  |____/ \__,_|_| |_| |_|\___/|_| |_|
6
6
 
7
7
 
8
- Dual monitor manager for Linux with GTK2 based user interface represented by system tray icon's context menu.
8
+ Dual monitor manager for Linux with GTK based user interface represented by system tray icon's context menu.
9
9
 
10
10
  ## SCREENSHOTS
11
11
 
@@ -18,6 +18,16 @@ Dual monitor manager for Linux with GTK2 based user interface represented by sys
18
18
  [![](https://raw.github.com/veny/dumon/master/screenshots/mirror_menu.png)](https://raw.github.com/veny/dumon/master/screenshots/mirror_menu.png)
19
19
 
20
20
 
21
+ ## FEATURES/PROBLEMS
22
+
23
+ * only for Linux
24
+ * dynamical detection of currently connected output devices
25
+ * support for storing profiles
26
+ * configurable shell command running after each switch of output
27
+ * currently supports only two output devices
28
+ * currently works only with 'xrandr' (command line interface to RandR extension)
29
+
30
+
21
31
  ## USAGE
22
32
  ### INSTALL
23
33
  > sudo gem install dumon
@@ -59,16 +69,20 @@ Dual monitor manager for Linux with GTK2 based user interface represented by sys
59
69
 
60
70
  > Dumon.logger.level = Logger::DEBUG
61
71
 
72
+ #### Post Switch Command
62
73
 
63
- ## FEATURES/PROBLEMS
74
+ * you can define a shell command that will be executed after each switch of output
75
+ * just insert _post_switch_ key into _$HOME/.config/dumon.conf_ like this
76
+
77
+ ```
78
+ {
79
+ "version": "0.2.8",
80
+ "post_switch": "feh --bg-scale /usr/share/archlinux/wallpaper/archlinux-firestarter.jpg; killall conky; conky"
81
+ }
82
+ ```
64
83
 
65
- * only for Linux
66
- * dynamical detection of currently connected output devices
67
- * support for storing profiles
68
- * currently supports only two output devices
69
- * currently works only with 'xrandr' (command line interface to RandR extension)
70
84
 
71
- ## REQUIREMENTS
85
+ ## REQUIREMENTS
72
86
 
73
87
  * Ruby 1.8.7 +
74
88
  * ruby-gtk2 1.2.x +
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.required_rubygems_version = Gem::Requirement.new('> 1.3.1') if s.respond_to? :required_rubygems_version=
12
12
  s.authors = ['Vaclav Sykora']
13
13
  s.date = Dumon::VERSION_HISTORY[0][1]
14
- s.description = %q{Dual monitor manager for Linux with GTK2 based user interface represented by system tray icon's context menu.}
14
+ s.description = %q{Dual monitor manager for Linux with GTK based user interface represented by system tray icon's context menu.}
15
15
  s.email = %q{vaclav.sykora@gmail.com}
16
16
 
17
17
  s.files = `git ls-files`.split("\n").select { |item| item unless item.start_with? 'screenshot' }
@@ -23,8 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.rdoc_options = ['--charset=UTF-8']
24
24
  s.rubygems_version = %q{1.3.7}
25
25
  s.summary = %q{Dual monitor manager for Linux.}
26
+ s.license = 'Apache License, v2.0'
26
27
 
27
- s.add_dependency(%q<gtk2>, ["~> 1.2.0"])
28
- # s.add_development_dependency(%q<json>, ["~> 1.5.1"])
29
-
28
+ s.add_runtime_dependency 'gtk2', '~> 1.2', '>= 1.2.0'
30
29
  end
@@ -82,7 +82,7 @@ module Dumon
82
82
 
83
83
  # there can be a hook if config version is old
84
84
 
85
- conf = verify_and_sanitize_options conf, {:version => VERSION, :profiles => {}}
85
+ conf = verify_and_sanitize_options conf, {:version => VERSION, :profiles => {}, :post_switch => :optional}
86
86
  conf
87
87
  end
88
88
 
@@ -73,6 +73,13 @@ module Dumon
73
73
  end
74
74
 
75
75
  Dumon::App.instance.current_profile = options
76
+
77
+ # post switch action
78
+ dumon_conf = Dumon::App.instance.read_config
79
+ if dumon_conf.include? :post_switch
80
+ job = fork { exec dumon_conf[:post_switch] }
81
+ Process.detach(job)
82
+ end
76
83
  end
77
84
 
78
85
  ###
@@ -2,6 +2,7 @@ module Dumon
2
2
 
3
3
  # Version history.
4
4
  VERSION_HISTORY = [
5
+ ['0.2.9', '2014-06-11', 'Added configurable shell command running after each switch of output'],
5
6
  ['0.2.8', '2013-07-10', 'BF #15: Problem with nvidia graphic driver'],
6
7
  ['0.2.7', '2013-05-08', 'BF #14: Failure if applied profile with unconnected output; Enh #7'],
7
8
  ['0.2.6', '2013-04-23', 'BF #13: Failure if no default resolution provided by output'],
metadata CHANGED
@@ -1,30 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dumon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vaclav Sykora
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-10 00:00:00.000000000 Z
11
+ date: 2014-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gtk2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: 1.2.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - ~>
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.2'
30
+ - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: 1.2.0
27
- description: Dual monitor manager for Linux with GTK2 based user interface represented
33
+ description: Dual monitor manager for Linux with GTK based user interface represented
28
34
  by system tray icon's context menu.
29
35
  email: vaclav.sykora@gmail.com
30
36
  executables:
@@ -34,7 +40,7 @@ extra_rdoc_files:
34
40
  - LICENSE
35
41
  - README.md
36
42
  files:
37
- - .gitignore
43
+ - ".gitignore"
38
44
  - Copyrights
39
45
  - LICENSE
40
46
  - README.md
@@ -53,26 +59,27 @@ files:
53
59
  - test/test_omanager.rb
54
60
  - test/test_rrutils_options.rb
55
61
  homepage: http://github.com/veny/dumon
56
- licenses: []
62
+ licenses:
63
+ - Apache License, v2.0
57
64
  metadata: {}
58
65
  post_install_message:
59
66
  rdoc_options:
60
- - --charset=UTF-8
67
+ - "--charset=UTF-8"
61
68
  require_paths:
62
69
  - lib
63
70
  required_ruby_version: !ruby/object:Gem::Requirement
64
71
  requirements:
65
- - - '>='
72
+ - - ">="
66
73
  - !ruby/object:Gem::Version
67
74
  version: '0'
68
75
  required_rubygems_version: !ruby/object:Gem::Requirement
69
76
  requirements:
70
- - - '>'
77
+ - - ">"
71
78
  - !ruby/object:Gem::Version
72
79
  version: 1.3.1
73
80
  requirements: []
74
81
  rubyforge_project:
75
- rubygems_version: 2.0.3
82
+ rubygems_version: 2.2.2
76
83
  signing_key:
77
84
  specification_version: 4
78
85
  summary: Dual monitor manager for Linux.