[gnome-shell-extensions/wip/jimmac/duller-classic-mode: 1/19] classic: Add 'horizontal-workspaces' extension



commit be1bba30f2fa181ef341047bd15ee8ac8ad37fc2
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 1756fac..16a48cf 100644
--- a/meson.build
+++ b/meson.build
@@ -33,6 +33,7 @@ uuid_suffix = '@gnome-shell-extensions.gcampax.github.com'
 
 classic_extensions = [
   'apps-menu',
+  'horizontal-workspaces',
   'places-menu',
   'launch-new-instance',
   'window-list'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]