Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from tty2/feature/i26-middle-click-overview
Browse files Browse the repository at this point in the history
implement issue #26. Middle click calls overview
  • Loading branch information
tty2 authored Apr 20, 2022
2 parents 34b7490 + 727a5db commit f3f7d00
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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();
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit f3f7d00

Please sign in to comment.