lib/fusuma/plugin/wmctrl/workspace.rb in fusuma-plugin-wmctrl-1.4.0 vs lib/fusuma/plugin/wmctrl/workspace.rb in fusuma-plugin-wmctrl-1.4.1

- old
+ new

@@ -112,10 +112,13 @@ when "prev" next_workspace_num(step: -1) else raise "#{direction} is invalid key" end + + workspace_num = 0 if workspace_num.negative? + "wmctrl -s #{workspace_num}" end def move_command_for_matrix(direction:) workspace_num = next_workspace_num_for_matrix(direction: direction) @@ -129,9 +132,12 @@ when "prev" next_workspace_num(step: -1) else raise "#{direction} is invalid key" end + + workspace_num = 0 if workspace_num.negative? + "wmctrl -r :ACTIVE: -t #{workspace_num} ; wmctrl -s #{workspace_num}" end # @raise [MissingMatrixOption] def move_window_command_for_matrix(direction:)