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 +4 -4
- data/lib/hexapic/desktop_environment.rb +13 -0
- data/lib/hexapic/version.rb +1 -1
- data/lib/hexapic/wallpaper_setter.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 950bf10786d34787e3ff6792af617189d0488808
|
4
|
+
data.tar.gz: 8bb93e2566e63621992045cd501821b7a8824cc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/hexapic/version.rb
CHANGED
@@ -3,7 +3,9 @@ module Hexapic
|
|
3
3
|
module WallpaperSetter
|
4
4
|
class XFCE4
|
5
5
|
def set(path)
|
6
|
-
|
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
|