[gnome-shell-extensions/wip/rstrode/heads-up-display: 34/62] classic: Add 'horizontal-workspaces' extension
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/wip/rstrode/heads-up-display: 34/62] classic: Add 'horizontal-workspaces' extension
- Date: Thu, 26 Aug 2021 19:31:31 +0000 (UTC)
commit c3e3cfdd9d4a91eac8936c342a6b8f2b563caf9e
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jun 5 03:31:16 2019 +0000
classic: Add 'horizontal-workspaces' extension
Vertical workspaces are another defining characteristics of GNOME 3,
and thus rather un-classic. That switch was driven by the overall
layout of the overview, and now that we disable the overview in
GNOME Classic, we can just return to the traditional workspace
layout as well.
Add a small extension that does just that.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/72
extensions/horizontal-workspaces/extension.js | 18 ++++++++++++++++++
extensions/horizontal-workspaces/meson.build | 5 +++++
extensions/horizontal-workspaces/metadata.json.in | 10 ++++++++++
extensions/horizontal-workspaces/stylesheet.css | 1 +
meson.build | 1 +
5 files changed, 35 insertions(+)
---
diff --git a/extensions/horizontal-workspaces/extension.js b/extensions/horizontal-workspaces/extension.js
new file mode 100644
index 0000000..b3937ce
--- /dev/null
+++ b/extensions/horizontal-workspaces/extension.js
@@ -0,0 +1,18 @@
+/* exported enable disable */
+const { Meta } = imports.gi;
+
+function enable() {
+ global.workspace_manager.override_workspace_layout(
+ Meta.DisplayCorner.TOPLEFT,
+ false,
+ 1,
+ -1);
+}
+
+function disable() {
+ global.workspace_manager.override_workspace_layout(
+ Meta.DisplayCorner.TOPLEFT,
+ false,
+ -1,
+ 1);
+}
diff --git a/extensions/horizontal-workspaces/meson.build b/extensions/horizontal-workspaces/meson.build
new file mode 100644
index 0000000..48504f6
--- /dev/null
+++ b/extensions/horizontal-workspaces/meson.build
@@ -0,0 +1,5 @@
+extension_data += configure_file(
+ input: metadata_name + '.in',
+ output: metadata_name,
+ configuration: metadata_conf
+)
diff --git a/extensions/horizontal-workspaces/metadata.json.in
b/extensions/horizontal-workspaces/metadata.json.in
new file mode 100644
index 0000000..f109e06
--- /dev/null
+++ b/extensions/horizontal-workspaces/metadata.json.in
@@ -0,0 +1,10 @@
+{
+"extension-id": "@extension_id@",
+"uuid": "@uuid@",
+"settings-schema": "@gschemaname@",
+"gettext-domain": "@gettext_domain@",
+"name": "Horizontal workspaces",
+"description": "Use a horizontal workspace layout",
+"shell-version": [ "@shell_current@" ],
+"url": "@url@"
+}
diff --git a/extensions/horizontal-workspaces/stylesheet.css b/extensions/horizontal-workspaces/stylesheet.css
new file mode 100644
index 0000000..25134b6
--- /dev/null
+++ b/extensions/horizontal-workspaces/stylesheet.css
@@ -0,0 +1 @@
+/* This extensions requires no special styling */
diff --git a/meson.build b/meson.build
index 32743ed..23bd5ad 100644
--- a/meson.build
+++ b/meson.build
@@ -34,6 +34,7 @@ uuid_suffix = '@gnome-shell-extensions.gcampax.github.com'
classic_extensions = [
'apps-menu',
'desktop-icons',
+ 'horizontal-workspaces',
'places-menu',
'launch-new-instance',
'top-icons',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]