fusuma-plugin-wmctrl 1.4.0 → 1.4.2

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
  SHA256:
3
- metadata.gz: 0f71997270e34b8604038cf56d738cfdcf56d99c727042b595b35e39e72cd5a2
4
- data.tar.gz: 6836062464b71982a80abf152a258807bebe9ee911da23175c1c3f899e40b9b7
3
+ metadata.gz: 8a7e1ab3aaaadb8b8b981ce8fc176e85075084faa6e84094bdbee05f857471c0
4
+ data.tar.gz: 62c3f4221b77c5dddf6c65f28148421449dab29c6a1e7fe0c2841df6311c6a97
5
5
  SHA512:
6
- metadata.gz: 4a3958f82aba9d729f9c33ac3bbd03f400eeba382aebf69a32abf62a6d2ccdfdf1a1785fa6169f2f060d89537d4e0665a948c8676bb26c4c7d0e5b43dea506cc
7
- data.tar.gz: cd8f468211d2380e9aae329e9d4c86abbc4bca1ab75cc95fe7cccbba6b28a04061ac5dd1a191f87d41025d7c3813b1f0d55d12ed84e1928c31a1875a9f2b7147
6
+ metadata.gz: 86edca9ba2599aa46c911c0554b75a017d057ed17dbce7cef931a056502b4b62b3815863fd118466da982d852d7059153b0f159cfa1ab96908c9348bb881449c
7
+ data.tar.gz: bf5af43601ac4e641eba67add429ed04407ced19a10bb1d0e71d4ed567e0a63b8a1ad0cbf5aacb78b0e9ab74bea323a43fa39fdb75587227a6aa76de9a21dd2f
@@ -3,7 +3,7 @@
3
3
  module Fusuma
4
4
  module Plugin
5
5
  module Wmctrl
6
- VERSION = "1.4.0"
6
+ VERSION = "1.4.2"
7
7
  end
8
8
  end
9
9
  end
@@ -114,6 +114,9 @@ module Fusuma
114
114
  else
115
115
  raise "#{direction} is invalid key"
116
116
  end
117
+
118
+ workspace_num = 0 if workspace_num.negative?
119
+
117
120
  "wmctrl -s #{workspace_num}"
118
121
  end
119
122
 
@@ -131,6 +134,9 @@ module Fusuma
131
134
  else
132
135
  raise "#{direction} is invalid key"
133
136
  end
137
+
138
+ workspace_num = 0 if workspace_num.negative?
139
+
134
140
  "wmctrl -r :ACTIVE: -t #{workspace_num} ; wmctrl -s #{workspace_num}"
135
141
  end
136
142
 
@@ -153,7 +159,7 @@ module Fusuma
153
159
  # (_NET_CURRENT_DESKTOP or _WIN_WORKSPACE property)`
154
160
  return [0, 1] if current_line.nil?
155
161
 
156
- current_workspace_num = current_line[0].to_i
162
+ current_workspace_num = current_line[/^\d+(?=\s+\*)/].to_i
157
163
  total_workspace_num = wmctrl_output.length
158
164
 
159
165
  [current_workspace_num, total_workspace_num]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusuma-plugin-wmctrl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-14 00:00:00.000000000 Z
11
+ date: 2024-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fusuma