diff --git a/README.md b/README.md index 01e204b..a9856b1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Horizontal workspace indicator shows the amount of opened workspaces and highlights the current one using unicode characters. -You can use it as an indicator only but widget is clickable. Left button click: move to left, right click: move right. +You can use it as an indicator only but widget is clickable. Left button click: move to left, right click: move right. Middle click calls overview. ## Compatibility diff --git a/extension.js b/extension.js index 5648811..cce1706 100644 --- a/extension.js +++ b/extension.js @@ -7,6 +7,7 @@ const ExtensionUtils = imports.misc.extensionUtils; const bullet = "●"; const circle = "○"; const leftButton = 1; +const middleButton = 2; const rightButton = 3; let WorkspaceIndicator = GObject.registerClass( @@ -66,6 +67,12 @@ let WorkspaceIndicator = GObject.registerClass( return } Main.wm.actionMoveWorkspace(workspaceManager.get_workspace_by_index(activeWorkspaceIndex+1)); + } else if (button == middleButton) { + if (Main.overview.visible) { + Main.overview.hide(); + } else { + Main.overview.show(); + } } } } diff --git a/metadata.json b/metadata.json index 4914df3..c392f8a 100644 --- a/metadata.json +++ b/metadata.json @@ -5,5 +5,5 @@ "shell-version": ["40", "41", "42"], "url": "https://github.com/tty2/horizontal-workspace-indicator", "uuid": "horizontal-workspace-indicator@tty2.io", - "version": "0.1.2" + "version": "0.2.0" }