Skip to content

Commit bf38e21

Browse files
committed
Initial commit
This is the basic functionality that re-enables vertical workspace layout for Gnome-shell 40. Turn on the extension or vertical workspaces and turn it off to go back to horizontal. Signed-off-by: Jon Nettleton <jon@solid-run.com>
0 parents  commit bf38e21

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

extension.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* extension.js
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*
16+
* SPDX-License-Identifier: GPL-2.0-or-later
17+
*/
18+
19+
/* exported init */
20+
const { Meta } = imports.gi;
21+
22+
class VerticalWS {
23+
constructor() {
24+
}
25+
26+
enable() {
27+
global.workspace_manager.override_workspace_layout(Meta.DisplayCorner.TOPLEFT,
28+
false, -1, 1);
29+
}
30+
31+
disable() {
32+
global.workspace_manager.override_workspace_layout(Meta.DisplayCorner.TOPLEFT,
33+
false, 1, -1);
34+
}
35+
}
36+
37+
function init() {
38+
return new VerticalWS();
39+
}

metadata.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Vertical Workspaces",
3+
"description": "Add Sane Gnome-shell behaviour and layouot back",
4+
"uuid": "vertical-workspaces@jon.nettleton.gmail.com",
5+
"shell-version": [
6+
"40.beta",
7+
"40"
8+
]
9+
}

stylesheet.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Add your custom extension styling here */

0 commit comments

Comments
 (0)