hexapic 0.1.0 → 0.1.1

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: e084bbb05a28b2f06235d02848a338516fb6c1bb
4
- data.tar.gz: e291e4edd692bb7fada97295aa27d44d3e7c0a24
3
+ metadata.gz: 950bf10786d34787e3ff6792af617189d0488808
4
+ data.tar.gz: 8bb93e2566e63621992045cd501821b7a8824cc2
5
5
  SHA512:
6
- metadata.gz: 2fe9318a024056074e038b8c49336e43d8b6999775e579ac5072d87e84aea1a86282849919ad90c1069173ad618bae360e64d31c3d4aa21199937032bc5ffe38
7
- data.tar.gz: f33f86e1899247cbfb63c14efa6afe60514211b79bfdec5c2d035e88596d7f115f8fa98fd480d08c3cb240fcef8cb0b0d909297bc5ccd487d730454c86b495c8
6
+ metadata.gz: 0de2939b6620e798aaa9148af6eac158ebd1b5e3817c7aca2c8ea5e4b175f4fbfc1726aea784dfd1a319722cafd68006e7df80a4a6b10af4ca497290b4f14cc5
7
+ data.tar.gz: 9fdd954cae4370f51ee614be2589631a8641f1cb4d05a10d2b36440d957918a45a75b3a9b6db8be62563659331f4dba619267339e36f5d0ac0e0e74523ef1381
@@ -22,4 +22,17 @@ module Hexapic
22
22
  DE[wm_name]
23
23
  end
24
24
  end
25
+
26
+ def self.output
27
+ output_name = nil
28
+
29
+ Open3.popen3('xrandr' ,'| grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/"') do |inp, out, err|
30
+ inp.close
31
+ err.close
32
+ output_name = out.strip
33
+ out.close
34
+ end
35
+
36
+ output_name
37
+ end
25
38
  end
@@ -1,3 +1,3 @@
1
1
  module Hexapic
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -3,7 +3,9 @@ module Hexapic
3
3
  module WallpaperSetter
4
4
  class XFCE4
5
5
  def set(path)
6
- command = "xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorLVDS1/workspace1/last-image -s #{path}"
6
+ out = DesktopEnvironment.output
7
+ command = "xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor#{out}/workspace0/last-image -s #{path}"
8
+ command = "xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor#{out}/workspace1/last-image -s #{path}"
7
9
  system command
8
10
  end
9
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hexapic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Siganov