Kaynağa Gözat

[gnome] Update extensions

Colin Powell 1 yıl önce
ebeveyn
işleme
26aa549720
75 değiştirilmiş dosya ile 13078 ekleme ve 0 silme
  1. 28 0
      gnome/.local/share/gnome-shell/extensions/block-caribou-36@lxylxy123456.ercli.dev/extension.js
  2. 15 0
      gnome/.local/share/gnome-shell/extensions/block-caribou-36@lxylxy123456.ercli.dev/metadata.json
  3. 674 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/LICENSE
  4. 21 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/config/windows.json
  5. 103 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/extension.js
  6. 9 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/css/LICENSE
  7. 100 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/css/README.md
  8. 888 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/css/index.js
  9. 43 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/extension-theme-manager.js
  10. 121 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/indicator.js
  11. 493 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/keybindings.js
  12. 1612 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/tree.js
  13. 381 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/utils.js
  14. 2546 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/window.js
  15. 190 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/appearance.js
  16. 108 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/keyboard.js
  17. 2 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/metadata.js
  18. 13 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/prefs-theme-manager.js
  19. 147 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/settings.js
  20. 293 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/widgets.js
  21. 29 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/workspace.js
  22. 80 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/logger.js
  23. 155 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/settings.js
  24. 279 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/theme.js
  25. BIN
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/es/LC_MESSAGES/forge.mo
  26. BIN
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/fr/LC_MESSAGES/forge.mo
  27. BIN
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/it/LC_MESSAGES/forge.mo
  28. BIN
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/nl/LC_MESSAGES/forge.mo
  29. BIN
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/pt_BR/LC_MESSAGES/forge.mo
  30. 17 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/metadata.json
  31. 53 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/prefs.js
  32. 5 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/applications-science-symbolic.svg
  33. 1 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/appointment-soon-symbolic.svg
  34. 2 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/brush-symbolic.svg
  35. 2 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/bug-symbolic.svg
  36. 6 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/code-context-symbolic.svg
  37. 8 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/color-picker-symbolic.svg
  38. 8 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/color-select-symbolic.svg
  39. 8 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/colorfx-symbolic.svg
  40. 49 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/forge-logo-symbolic.svg
  41. 3 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/go-home-symbolic.svg
  42. 8 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/go-next-symbolic.svg
  43. 1 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/input-keyboard-symbolic.svg
  44. 5 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/larger-brush-symbolic.svg
  45. 4 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/preferences-desktop-apps-symbolic.svg
  46. 1 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/preferences-desktop-keyboard-symbolic.svg
  47. 1 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/preferences-desktop-wallpaper-symbolic.svg
  48. 2 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/settings-symbolic.svg
  49. 2 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/shell-overview-symbolic.svg
  50. 3 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/tab-new-symbolic.svg
  51. 3 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/tool-brush-symbolic.svg
  52. 3 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/tool-rectangle-symbolic.svg
  53. 45 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/utilities-tweak-tool-symbolic.svg
  54. 6 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/view-grid-symbolic.svg
  55. 8 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/window-symbolic.svg
  56. 4 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/panel/focus-windows-symbolic.svg
  57. 3 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/panel/view-dual-symbolic.svg
  58. 8 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/panel/window-duplicate-symbolic.svg
  59. BIN
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/gschemas.compiled
  60. 341 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/org.gnome.shell.extensions.forge.gschema.xml
  61. 132 0
      gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/stylesheet.css
  62. 1261 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/extension.js
  63. 2062 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/keycodes.json
  64. 13 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/metadata.json
  65. 325 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/prefs.js
  66. BIN
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/schemas/gschemas.compiled
  67. 60 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/schemas/org.gnome.shell.extensions.gjsosk.gschema.xml
  68. 76 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/stylesheet.css
  69. 45 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/close-dark.svg
  70. 45 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/close.svg
  71. 10 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/code-symbolic.svg
  72. 64 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/general-symbolic.svg
  73. 1 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/info-symbolic.svg
  74. 43 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/move-dark.svg
  75. 1 0
      gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/move.svg

+ 28 - 0
gnome/.local/share/gnome-shell/extensions/block-caribou-36@lxylxy123456.ercli.dev/extension.js

@@ -0,0 +1,28 @@
+import * as KeyboardUI from 'resource:///org/gnome/shell/ui/keyboard.js';
+
+function _modifiedLastDeviceIsTouchscreen() {
+    return false;
+}
+
+export default class BlockCaribou {
+    constructor() {
+        this._originalLastDeviceIsTouchscreen = null;
+    }
+
+    enable() {
+        this._originalLastDeviceIsTouchscreen = KeyboardUI.KeyboardManager.prototype._lastDeviceIsTouchscreen;
+        KeyboardUI.KeyboardManager.prototype._lastDeviceIsTouchscreen = _modifiedLastDeviceIsTouchscreen;
+    }
+
+    /*
+     * In the lock screen, the on-screen keyboard (Caribou) also pops up by
+     * default. So this extension requires the "unlock-dialog" session mode to
+     * block Caribou in lock screen.
+     */
+    disable() {
+        if (this._originalLastDeviceIsTouchscreen !== null) {
+            KeyboardUI.KeyboardManager.prototype._lastDeviceIsTouchscreen = this._originalLastDeviceIsTouchscreen;
+            this._originalLastDeviceIsTouchscreen = null;
+        }
+    }
+}

+ 15 - 0
gnome/.local/share/gnome-shell/extensions/block-caribou-36@lxylxy123456.ercli.dev/metadata.json

@@ -0,0 +1,15 @@
+{
+  "_generated": "Generated by SweetTooth, do not edit",
+  "description": "Blocks caribou (the on screen keyboard) from popping up when you use a touchscreen. Even if it's disabled in the accessibility services menu. Continuation of keringar's work. Tested on GNOME Shell version 3.36 - 45 on Fedora 32 - 39. For a higher version see https://github.com/lxylxy123456/cariboublocker#installing-on-high-gnome-shell-version .",
+  "name": "Block Caribou 36",
+  "session-modes": [
+    "unlock-dialog",
+    "user"
+  ],
+  "shell-version": [
+    "45"
+  ],
+  "url": "https://github.com/lxylxy123456/cariboublocker",
+  "uuid": "block-caribou-36@lxylxy123456.ercli.dev",
+  "version": 10
+}

+ 674 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/LICENSE

@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.

+ 21 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/config/windows.json

@@ -0,0 +1,21 @@
+{
+  "overrides": [
+    { "wmClass": "org.gnome.Shell.Extensions", "wmTitle": "Forge Settings", "mode": "float" },
+    { "wmClass": "jetbrains-toolbox", "mode": "float" },
+    { "wmClass": "jetbrains-goland", "wmTitle": "splash", "mode": "float" },
+    { "wmClass": "jetbrains-webstorm", "wmTitle": "splash", "mode": "float" },
+    { "wmClass": "jetbrains-phpstorm", "wmTitle": "splash", "mode": "float" },
+    { "wmClass": "jetbrains-datagrip", "wmTitle": "splash", "mode": "float" },
+    { "wmClass": "jetbrains-rubymine", "wmTitle": "splash", "mode": "float" },
+    { "wmClass": "jetbrains-idea", "wmTitle": "splash", "mode": "float" },
+    { "wmClass": "Com.github.amezin.ddterm", "mode": "float" },
+    { "wmClass": "Com.github.donadigo.eddy", "mode": "float" },
+    { "wmClass": "Conky", "mode": "float" },
+    { "wmClass": "Gnome-initial-setup", "mode": "float" },
+    { "wmClass": "org.gnome.Calculator", "mode": "float" },
+    { "wmClass": "gnome-terminal-server", "wmTitle": "Preferences – General", "mode": "float" },
+    { "wmClass": "gnome-terminal-preferences", "mode": "float" },
+    { "wmClass": "Guake", "mode": "float" },
+    { "wmClass": "zoom", "mode": "float" }
+  ]
+}

+ 103 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/extension.js

@@ -0,0 +1,103 @@
+/*
+ * This file is part of the Forge GNOME extension
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Gnome imports
+import * as Main from "resource:///org/gnome/shell/ui/main.js";
+import { Extension, gettext as _ } from "resource:///org/gnome/shell/extensions/extension.js";
+
+// Shared state
+import { Logger } from "./lib/shared/logger.js";
+import { ConfigManager } from "./lib/shared/settings.js";
+
+// Application imports
+import { Keybindings } from "./lib/extension/keybindings.js";
+import { WindowManager } from "./lib/extension/window.js";
+import { FeatureIndicator, FeatureMenuToggle } from "./lib/extension/indicator.js";
+import { ExtensionThemeManager } from "./lib/extension/extension-theme-manager.js";
+
+export default class ForgeExtension extends Extension {
+  enable() {
+    this.settings = this.getSettings();
+    this.kbdSettings = this.getSettings("org.gnome.shell.extensions.forge.keybindings");
+    Logger.init(this.settings);
+    Logger.info("enable");
+
+    this.configMgr = new ConfigManager(this);
+    this.theme = new ExtensionThemeManager(this);
+    this.extWm = new WindowManager(this);
+    this.keybindings = new Keybindings(this);
+
+    this._onSessionModeChanged(Main.sessionMode);
+    this._sessionId = Main.sessionMode.connect("updated", this._onSessionModeChanged.bind(this));
+
+    this.theme.patchCss();
+    this.theme.reloadStylesheet();
+    this.extWm.enable();
+    Logger.info(`enable: finalized vars`);
+  }
+
+  disable() {
+    Logger.info("disable");
+
+    // See session mode unlock-dialog explanation on _onSessionModeChanged()
+    if (this._sessionId) {
+      Main.sessionMode.disconnect(this._sessionId);
+      this._sessionId = null;
+    }
+
+    this._removeIndicator();
+    this.extWm?.disable();
+    this.keybindings?.disable();
+    this.keybindings = null;
+    this.extWm = null;
+    this.themeWm = null;
+    this.configMgr = null;
+    this.settings = null;
+    this.kbdSettings = null;
+  }
+
+  _onSessionModeChanged(session) {
+    if (session.currentMode === "user" || session.parentMode === "user") {
+      Logger.info("user on session change");
+      this._addIndicator();
+      this.keybindings?.enable();
+    } else if (session.currentMode === "unlock-dialog") {
+      // To the reviewer and maintainer: this extension needs to persist the window data structure in memory so it has to keep running on lock screen.
+      // This is previous feature but was removed during GNOME 45 update due to the session-mode rule review.
+      // The argument is that users will keep re-arranging windows when it times out or locks up.
+      // Intent to serialize/deserialize to disk but that will take a longer time or probably a longer argument during review.
+      // To keep following, added to only disable keybindings() and re-enable them during user session.
+      // https://gjs.guide/extensions/review-guidelines/review-guidelines.html#session-modes
+      Logger.info("lock-screen on session change");
+      this.keybindings?.disable();
+      this._removeIndicator();
+    }
+  }
+
+  _addIndicator() {
+    this.indicator ??= new FeatureIndicator(this);
+    this.indicator.quickSettingsItems.push(new FeatureMenuToggle(this));
+    Main.panel.statusArea.quickSettings.addExternalIndicator(this.indicator);
+  }
+
+  _removeIndicator() {
+    this.indicator?.quickSettingsItems.forEach((item) => item.destroy());
+    this.indicator?.destroy();
+    this.indicator = null;
+  }
+}

+ 9 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/css/LICENSE

@@ -0,0 +1,9 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 100 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/css/README.md

@@ -0,0 +1,100 @@
+# CSS module in Forge
+
+API to work with CSS code and files and update the extension's stylesheet.css
+
+## CSS Parser from ReworkCSS
+Credits: https://github.com/reworkcss/css
+Modified to work in GNOME-Shell by Forge
+
+### Usage
+
+```js
+import {
+  parse,
+  stringify,
+  write,
+  load,
+} from './css/index.js';
+
+// Raw APIs from ReworkCSS
+let obj = parse('body { font-size: 12px; }');
+let code = stringify(obj);
+
+// Convenience
+write(code, "/path/to/stylesheet.css");
+let ast = load("/path/to/stylesheet.css");
+
+// ... Do something with AST ...
+
+```
+
+### Example
+
+CSS:
+
+```css
+body {
+  background: #eee;
+  color: #888;
+}
+```
+
+Parse tree:
+
+```json
+{
+  "type": "stylesheet",
+  "stylesheet": {
+    "rules": [
+      {
+        "type": "rule",
+        "selectors": [
+          "body"
+        ],
+        "declarations": [
+          {
+            "type": "declaration",
+            "property": "background",
+            "value": "#eee",
+            "position": {
+              "start": {
+                "line": 2,
+                "column": 3
+              },
+              "end": {
+                "line": 2,
+                "column": 19
+              }
+            }
+          },
+          {
+            "type": "declaration",
+            "property": "color",
+            "value": "#888",
+            "position": {
+              "start": {
+                "line": 3,
+                "column": 3
+              },
+              "end": {
+                "line": 3,
+                "column": 14
+              }
+            }
+          }
+        ],
+        "position": {
+          "start": {
+            "line": 1,
+            "column": 1
+          },
+          "end": {
+            "line": 4,
+            "column": 2
+          }
+        }
+      }
+    ]
+  }
+}
+```

+ 888 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/css/index.js

@@ -0,0 +1,888 @@
+// Credits: https://github.com/reworkcss/css/tree/master/lib/parse
+// Licensed under MIT
+// Forge: modified while{} loop declarations on some lines to reduce errors on logging
+
+// http://www.w3.org/TR/CSS21/grammar.html
+// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
+const commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
+
+export function parse(css, options) {
+  options = options || {};
+
+  /**
+   * Positional.
+   */
+
+  var lineno = 1;
+  var column = 1;
+
+  /**
+   * Update lineno and column based on `str`.
+   */
+
+  function updatePosition(str) {
+    var lines = str.match(/\n/g);
+    if (lines) lineno += lines.length;
+    var i = str.lastIndexOf("\n");
+    column = ~i ? str.length - i : column + str.length;
+  }
+
+  /**
+   * Mark position and patch `node.position`.
+   */
+
+  function position() {
+    var start = { line: lineno, column: column };
+    return function (node) {
+      node.position = new Position(start);
+      whitespace();
+      return node;
+    };
+  }
+
+  /**
+   * Store position information for a node
+   */
+
+  class Position {
+    /**
+     * Non-enumerable source string
+     */
+    content = css;
+
+    constructor(start) {
+      this.start = start;
+      this.end = { line: lineno, column: column };
+      this.source = options.source;
+    }
+  }
+
+  /**
+   * Error `msg`.
+   */
+
+  var errorsList = [];
+
+  function error(msg) {
+    var err = new Error(options.source + ":" + lineno + ":" + column + ": " + msg);
+    err.reason = msg;
+    err.filename = options.source;
+    err.line = lineno;
+    err.column = column;
+    err.source = css;
+
+    if (options.silent) {
+      errorsList.push(err);
+    } else {
+      throw err;
+    }
+  }
+
+  /**
+   * Parse stylesheet.
+   */
+
+  function stylesheet() {
+    var rulesList = rules();
+
+    return {
+      type: "stylesheet",
+      stylesheet: {
+        source: options.source,
+        rules: rulesList,
+        parsingErrors: errorsList,
+      },
+    };
+  }
+
+  /**
+   * Opening brace.
+   */
+
+  function open() {
+    return match(/^{\s*/);
+  }
+
+  /**
+   * Closing brace.
+   */
+
+  function close() {
+    return match(/^}/);
+  }
+
+  /**
+   * Parse ruleset.
+   */
+
+  function rules() {
+    var node;
+    var rules = [];
+    whitespace();
+    comments(rules);
+    while (css.length && css.charAt(0) != "}" && (node = atrule() || rule())) {
+      if (node !== false) {
+        rules.push(node);
+        comments(rules);
+      }
+    }
+    return rules;
+  }
+
+  /**
+   * Match `re` and return captures.
+   */
+
+  function match(re) {
+    var m = re.exec(css);
+    if (!m) return;
+    var str = m[0];
+    updatePosition(str);
+    css = css.slice(str.length);
+    return m;
+  }
+
+  /**
+   * Parse whitespace.
+   */
+
+  function whitespace() {
+    match(/^\s*/);
+  }
+
+  /**
+   * Parse comments;
+   */
+
+  function comments(rules) {
+    rules = rules || [];
+    for (var c; (c = comment()); ) {
+      if (c !== false) {
+        rules.push(c);
+      }
+    }
+    return rules;
+  }
+
+  /**
+   * Parse comment.
+   */
+
+  function comment() {
+    var pos = position();
+    if ("/" != css.charAt(0) || "*" != css.charAt(1)) return;
+
+    var i = 2;
+    while ("" != css.charAt(i) && ("*" != css.charAt(i) || "/" != css.charAt(i + 1))) ++i;
+    i += 2;
+
+    if ("" === css.charAt(i - 1)) {
+      return error("End of comment missing");
+    }
+
+    var str = css.slice(2, i - 2);
+    column += 2;
+    updatePosition(str);
+    css = css.slice(i);
+    column += 2;
+
+    return pos({
+      type: "comment",
+      comment: str,
+    });
+  }
+
+  /**
+   * Parse selector.
+   */
+
+  function selector() {
+    var m = match(/^([^{]+)/);
+    if (!m) return;
+    /* @fix Remove all comments from selectors
+     * http://ostermiller.org/findcomment.html */
+    return trim(m[0])
+      .replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "")
+      .replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function (m) {
+        return m.replace(/,/g, "\u200C");
+      })
+      .split(/\s*(?![^(]*\)),\s*/)
+      .map(function (s) {
+        return s.replace(/\u200C/g, ",");
+      });
+  }
+
+  /**
+   * Parse declaration.
+   */
+
+  function declaration() {
+    var pos = position();
+
+    // prop
+    var prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
+    if (!prop) return;
+    prop = trim(prop[0]);
+
+    // :
+    if (!match(/^:\s*/)) return error("property missing ':'");
+
+    // val
+    var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);
+
+    var ret = pos({
+      type: "declaration",
+      property: prop.replace(commentre, ""),
+      value: val ? trim(val[0]).replace(commentre, "") : "",
+    });
+
+    // ;
+    match(/^[;\s]*/);
+
+    return ret;
+  }
+
+  /**
+   * Parse declarations.
+   */
+
+  function declarations() {
+    var decls = [];
+
+    if (!open()) return error("missing '{'");
+    comments(decls);
+
+    // declarations
+    for (var decl; (decl = declaration()); ) {
+      if (decl !== false) {
+        decls.push(decl);
+        comments(decls);
+      }
+    }
+
+    if (!close()) return error("missing '}'");
+    return decls;
+  }
+
+  /**
+   * Parse keyframe.
+   */
+
+  function keyframe() {
+    var vals = [];
+    var pos = position();
+
+    for (var m; (m = match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)); ) {
+      vals.push(m[1]);
+      match(/^,\s*/);
+    }
+
+    if (!vals.length) return;
+
+    return pos({
+      type: "keyframe",
+      values: vals,
+      declarations: declarations(),
+    });
+  }
+
+  /**
+   * Parse keyframes.
+   */
+
+  function atkeyframes() {
+    var pos = position();
+    var m = match(/^@([-\w]+)?keyframes\s*/);
+
+    if (!m) return;
+    var vendor = m[1];
+
+    // identifier
+    var m = match(/^([-\w]+)\s*/);
+    if (!m) return error("@keyframes missing name");
+    var name = m[1];
+
+    if (!open()) return error("@keyframes missing '{'");
+
+    var frames = comments();
+    for (var frame; (frame = keyframe()); ) {
+      frames.push(frame);
+      frames = frames.concat(comments());
+    }
+
+    if (!close()) return error("@keyframes missing '}'");
+
+    return pos({
+      type: "keyframes",
+      name: name,
+      vendor: vendor,
+      keyframes: frames,
+    });
+  }
+
+  /**
+   * Parse supports.
+   */
+
+  function atsupports() {
+    var pos = position();
+    var m = match(/^@supports *([^{]+)/);
+
+    if (!m) return;
+    var supports = trim(m[1]);
+
+    if (!open()) return error("@supports missing '{'");
+
+    var style = comments().concat(rules());
+
+    if (!close()) return error("@supports missing '}'");
+
+    return pos({
+      type: "supports",
+      supports: supports,
+      rules: style,
+    });
+  }
+
+  /**
+   * Parse host.
+   */
+
+  function athost() {
+    var pos = position();
+    var m = match(/^@host\s*/);
+
+    if (!m) return;
+
+    if (!open()) return error("@host missing '{'");
+
+    var style = comments().concat(rules());
+
+    if (!close()) return error("@host missing '}'");
+
+    return pos({
+      type: "host",
+      rules: style,
+    });
+  }
+
+  /**
+   * Parse media.
+   */
+
+  function atmedia() {
+    var pos = position();
+    var m = match(/^@media *([^{]+)/);
+
+    if (!m) return;
+    var media = trim(m[1]);
+
+    if (!open()) return error("@media missing '{'");
+
+    var style = comments().concat(rules());
+
+    if (!close()) return error("@media missing '}'");
+
+    return pos({
+      type: "media",
+      media: media,
+      rules: style,
+    });
+  }
+
+  /**
+   * Parse custom-media.
+   */
+
+  function atcustommedia() {
+    var pos = position();
+    var m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
+    if (!m) return;
+
+    return pos({
+      type: "custom-media",
+      name: trim(m[1]),
+      media: trim(m[2]),
+    });
+  }
+
+  /**
+   * Parse paged media.
+   */
+
+  function atpage() {
+    var pos = position();
+    var m = match(/^@page */);
+    if (!m) return;
+
+    var sel = selector() || [];
+
+    if (!open()) return error("@page missing '{'");
+    var decls = comments();
+
+    // declarations
+    for (var decl; (decl = declaration()); ) {
+      decls.push(decl);
+      decls = decls.concat(comments());
+    }
+
+    if (!close()) return error("@page missing '}'");
+
+    return pos({
+      type: "page",
+      selectors: sel,
+      declarations: decls,
+    });
+  }
+
+  /**
+   * Parse document.
+   */
+
+  function atdocument() {
+    var pos = position();
+    var m = match(/^@([-\w]+)?document *([^{]+)/);
+    if (!m) return;
+
+    var vendor = trim(m[1]);
+    var doc = trim(m[2]);
+
+    if (!open()) return error("@document missing '{'");
+
+    var style = comments().concat(rules());
+
+    if (!close()) return error("@document missing '}'");
+
+    return pos({
+      type: "document",
+      document: doc,
+      vendor: vendor,
+      rules: style,
+    });
+  }
+
+  /**
+   * Parse font-face.
+   */
+
+  function atfontface() {
+    var pos = position();
+    var m = match(/^@font-face\s*/);
+    if (!m) return;
+
+    if (!open()) return error("@font-face missing '{'");
+    var decls = comments();
+
+    // declarations
+    for (var decl; (decl = declaration()); ) {
+      decls.push(decl);
+      decls = decls.concat(comments());
+    }
+
+    if (!close()) return error("@font-face missing '}'");
+
+    return pos({
+      type: "font-face",
+      declarations: decls,
+    });
+  }
+
+  /**
+   * Parse import
+   */
+
+  var atimport = _compileAtrule("import");
+
+  /**
+   * Parse charset
+   */
+
+  var atcharset = _compileAtrule("charset");
+
+  /**
+   * Parse namespace
+   */
+
+  var atnamespace = _compileAtrule("namespace");
+
+  /**
+   * Parse non-block at-rules
+   */
+
+  function _compileAtrule(name) {
+    var re = new RegExp("^@" + name + "\\s*([^;]+);");
+    return function () {
+      var pos = position();
+      var m = match(re);
+      if (!m) return;
+      var ret = { type: name };
+      ret[name] = m[1].trim();
+      return pos(ret);
+    };
+  }
+
+  /**
+   * Parse at rule.
+   */
+
+  function atrule() {
+    if (css[0] != "@") return;
+
+    return (
+      atkeyframes() ||
+      atmedia() ||
+      atcustommedia() ||
+      atsupports() ||
+      atimport() ||
+      atcharset() ||
+      atnamespace() ||
+      atdocument() ||
+      atpage() ||
+      athost() ||
+      atfontface()
+    );
+  }
+
+  /**
+   * Parse rule.
+   */
+
+  function rule() {
+    var pos = position();
+    var sel = selector();
+
+    if (!sel) return error("selector missing");
+    comments();
+
+    return pos({
+      type: "rule",
+      selectors: sel,
+      declarations: declarations(),
+    });
+  }
+
+  return addParent(stylesheet());
+}
+
+/**
+ * Trim `str`.
+ */
+
+export function trim(str) {
+  return str ? str.replace(/^\s+|\s+$/g, "") : "";
+}
+
+/**
+ * Adds non-enumerable parent node reference to each node.
+ */
+
+export function addParent(obj, parent) {
+  var isNode = obj && typeof obj.type === "string";
+  var childParent = isNode ? obj : parent;
+
+  for (var k in obj) {
+    var value = obj[k];
+    if (Array.isArray(value)) {
+      value.forEach(function (v) {
+        addParent(v, childParent);
+      });
+    } else if (value && typeof value === "object") {
+      addParent(value, childParent);
+    }
+  }
+
+  if (isNode) {
+    Object.defineProperty(obj, "parent", {
+      configurable: true,
+      writable: true,
+      enumerable: false,
+      value: parent || null,
+    });
+  }
+
+  return obj;
+}
+
+// Credits: https://github.com/reworkcss/css/blob/master/lib/stringify
+// Forge: derived the identity.js module only
+
+export class Compiler {
+  constructor(options) {
+    options ||= {};
+    this.indentation = typeof options.indent === "string" ? options.indent : "  ";
+  }
+
+  /**
+   * Emit `str`
+   */
+
+  emit(str) {
+    return str;
+  }
+
+  /**
+   * Visit `node`.
+   */
+
+  visit(node) {
+    return this[node.type](node);
+  }
+
+  /**
+   * Map visit over array of `nodes`, optionally using a `delim`
+   */
+
+  mapVisit(nodes, delim) {
+    var buf = "";
+    delim = delim || "";
+
+    for (var i = 0, length = nodes.length; i < length; i++) {
+      buf += this.visit(nodes[i]);
+      if (delim && i < length - 1) buf += this.emit(delim);
+    }
+
+    return buf;
+  }
+
+  /**
+   * Compile `node`.
+   */
+
+  compile(node) {
+    return this.stylesheet(node);
+  }
+
+  /**
+   * Visit stylesheet node.
+   */
+
+  stylesheet(node) {
+    return this.mapVisit(node.stylesheet.rules, "\n\n");
+  }
+
+  /**
+   * Visit comment node.
+   */
+
+  comment(node) {
+    return this.emit(this.indent() + "/*" + node.comment + "*/", node.position);
+  }
+
+  /**
+   * Visit import node.
+   */
+
+  import(node) {
+    return this.emit("@import " + node.import + ";", node.position);
+  }
+
+  /**
+   * Visit media node.
+   */
+
+  media(node) {
+    return (
+      this.emit("@media " + node.media, node.position) +
+      this.emit(" {\n" + this.indent(1)) +
+      this.mapVisit(node.rules, "\n\n") +
+      this.emit(this.indent(-1) + "\n}")
+    );
+  }
+
+  /**
+   * Visit document node.
+   */
+
+  document(node) {
+    var doc = "@" + (node.vendor || "") + "document " + node.document;
+
+    return (
+      this.emit(doc, node.position) +
+      this.emit(" " + " {\n" + this.indent(1)) +
+      this.mapVisit(node.rules, "\n\n") +
+      this.emit(this.indent(-1) + "\n}")
+    );
+  }
+
+  /**
+   * Visit charset node.
+   */
+  charset(node) {
+    return this.emit("@charset " + node.charset + ";", node.position);
+  }
+
+  /**
+   * Visit namespace node.
+   */
+  namespace(node) {
+    return this.emit("@namespace " + node.namespace + ";", node.position);
+  }
+
+  /**
+   * Visit supports node.
+   */
+
+  supports(node) {
+    return (
+      this.emit("@supports " + node.supports, node.position) +
+      this.emit(" {\n" + this.indent(1)) +
+      this.mapVisit(node.rules, "\n\n") +
+      this.emit(this.indent(-1) + "\n}")
+    );
+  }
+
+  /**
+   * Visit keyframes node.
+   */
+
+  keyframes(node) {
+    return (
+      this.emit("@" + (node.vendor || "") + "keyframes " + node.name, node.position) +
+      this.emit(" {\n" + this.indent(1)) +
+      this.mapVisit(node.keyframes, "\n") +
+      this.emit(this.indent(-1) + "}")
+    );
+  }
+
+  /**
+   * Visit keyframe node.
+   */
+
+  keyframe(node) {
+    var decls = node.declarations;
+
+    return (
+      this.emit(this.indent()) +
+      this.emit(node.values.join(", "), node.position) +
+      this.emit(" {\n" + this.indent(1)) +
+      this.mapVisit(decls, "\n") +
+      this.emit(this.indent(-1) + "\n" + this.indent() + "}\n")
+    );
+  }
+
+  /**
+   * Visit page node.
+   */
+
+  page(node) {
+    var sel = node.selectors.length ? node.selectors.join(", ") + " " : "";
+
+    return (
+      this.emit("@page " + sel, node.position) +
+      this.emit("{\n") +
+      this.emit(this.indent(1)) +
+      this.mapVisit(node.declarations, "\n") +
+      this.emit(this.indent(-1)) +
+      this.emit("\n}")
+    );
+  }
+
+  /**
+   * Visit font-face node.
+   */
+
+  ["font-face"] = function (node) {
+    return (
+      this.emit("@font-face ", node.position) +
+      this.emit("{\n") +
+      this.emit(this.indent(1)) +
+      this.mapVisit(node.declarations, "\n") +
+      this.emit(this.indent(-1)) +
+      this.emit("\n}")
+    );
+  };
+
+  /**
+   * Visit host node.
+   */
+
+  host(node) {
+    return (
+      this.emit("@host", node.position) +
+      this.emit(" {\n" + this.indent(1)) +
+      this.mapVisit(node.rules, "\n\n") +
+      this.emit(this.indent(-1) + "\n}")
+    );
+  }
+
+  /**
+   * Visit custom-media node.
+   */
+
+  ["custom-media"] = function (node) {
+    return this.emit("@custom-media " + node.name + " " + node.media + ";", node.position);
+  };
+
+  /**
+   * Visit rule node.
+   */
+
+  rule(node) {
+    var indent = this.indent();
+    var decls = node.declarations;
+    if (!decls.length) return "";
+
+    return (
+      this.emit(
+        node.selectors
+          .map(function (s) {
+            return indent + s;
+          })
+          .join(",\n"),
+        node.position
+      ) +
+      this.emit(" {\n") +
+      this.emit(this.indent(1)) +
+      this.mapVisit(decls, "\n") +
+      this.emit(this.indent(-1)) +
+      this.emit("\n" + this.indent() + "}")
+    );
+  }
+
+  /**
+   * Visit declaration node.
+   */
+
+  declaration(node) {
+    return (
+      this.emit(this.indent()) +
+      this.emit(node.property + ": " + node.value, node.position) +
+      this.emit(";")
+    );
+  }
+
+  /**
+   * Increase, decrease or return current indentation.
+   */
+
+  indent(level) {
+    this.level = this.level || 1;
+
+    if (null != level) {
+      this.level += level;
+      return "";
+    }
+
+    return Array(this.level).join(this.indentation);
+  }
+}
+
+// Credits: https://github.com/reworkcss/css/tree/master/lib/stringify
+// Licensed under MIT
+// Forge: removed unused options
+
+/**
+ * Stringfy the given AST `node`.
+ *
+ * @param {Object} node
+ * @param {Object} [_options]
+ * @return {String}
+ * @api public
+ */
+
+export function stringify(node, _options) {
+  _options ||= {};
+  var compiler = new Compiler(_options);
+  var code = compiler.compile(node);
+  return code;
+}

+ 43 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/extension-theme-manager.js

@@ -0,0 +1,43 @@
+import GObject from "gi://GObject";
+
+import St from "gi://St";
+
+import { ThemeManagerBase } from "../shared/theme.js";
+import { Logger } from "../shared/logger.js";
+import { production } from "../shared/settings.js";
+
+export class ExtensionThemeManager extends ThemeManagerBase {
+  static {
+    GObject.registerClass(this);
+  }
+
+  /**
+   * @param {import("../../extension.js").default} extension
+   */
+  constructor(extension) {
+    super(extension);
+    this.metadata = extension.metadata;
+  }
+
+  reloadStylesheet() {
+    const uuid = this.metadata.uuid;
+    const stylesheetFile = this.configMgr.stylesheetFile;
+    const defaultStylesheetFile = this.configMgr.defaultStylesheetFile;
+    let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
+
+    try {
+      theme.unload_stylesheet(defaultStylesheetFile);
+      theme.unload_stylesheet(stylesheetFile);
+      if (production) {
+        theme.load_stylesheet(stylesheetFile);
+        this.stylesheet = stylesheetFile;
+      } else {
+        theme.load_stylesheet(defaultStylesheetFile);
+        this.stylesheet = defaultStylesheetFile;
+      }
+    } catch (e) {
+      Logger.error(`${uuid} - ${e}`);
+      return;
+    }
+  }
+}

+ 121 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/indicator.js

@@ -0,0 +1,121 @@
+import GObject from "gi://GObject";
+import Gio from "gi://Gio";
+
+import * as Main from "resource:///org/gnome/shell/ui/main.js";
+import { gettext as _ } from "resource:///org/gnome/shell/extensions/extension.js";
+import { QuickMenuToggle, SystemIndicator } from "resource:///org/gnome/shell/ui/quickSettings.js";
+import {
+  PopupSwitchMenuItem,
+  PopupSeparatorMenuItem,
+} from "resource:///org/gnome/shell/ui/popupMenu.js";
+
+import * as Utils from "./utils.js";
+import { Logger } from "../shared/logger.js";
+
+const iconName = "view-grid-symbolic";
+
+/** @typedef {import('../../extension.js').default} ForgeExtension */
+
+class SettingsPopupSwitch extends PopupSwitchMenuItem {
+  static {
+    GObject.registerClass(this);
+  }
+
+  /** @type {ForgeExtension} extension */
+  extension;
+
+  /**
+   * @param {string} title
+   * @param {ForgeExtension} extension
+   * @param {string} bind
+   */
+  constructor(title, extension, bind) {
+    const active = !!extension.settings.get_boolean(bind);
+    super(title, active);
+    this.extension = extension;
+    Logger.info(bind, active);
+    this.connect("toggled", (item) => this.extension.settings.set_boolean(bind, item.state));
+  }
+}
+
+export class FeatureMenuToggle extends QuickMenuToggle {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor(extension) {
+    const title = _("Tiling");
+    const initSettings = Utils.isGnomeGTE(45)
+      ? { title, iconName, toggleMode: true }
+      : { label: title, iconName, toggleMode: true };
+    super(initSettings);
+    this.extension = extension;
+    this.extension.settings.bind(
+      "tiling-mode-enabled",
+      this,
+      "checked",
+      Gio.SettingsBindFlags.DEFAULT
+    );
+    this.extension.settings.bind(
+      "quick-settings-enabled",
+      this,
+      "visible",
+      Gio.SettingsBindFlags.DEFAULT
+    );
+
+    this.menu.setHeader(iconName, _("Forge"), _("Tiling Window Management"));
+
+    this.menu.addMenuItem(
+      (this._singleSwitch = new SettingsPopupSwitch(
+        _("Gaps Hidden when Single"),
+        this.extension,
+        "window-gap-hidden-on-single"
+      ))
+    );
+
+    this.menu.addMenuItem(
+      (this._focusHintSwitch = new SettingsPopupSwitch(
+        _("Show Focus Hint Border"),
+        this.extension,
+        "focus-border-toggle"
+      ))
+    );
+
+    // Add an entry-point for more settings
+    this.menu.addMenuItem(new PopupSeparatorMenuItem());
+    const settingsItem = this.menu.addAction(_("Settings"), () => this.extension.openPreferences());
+
+    // Ensure the settings are unavailable when the screen is locked
+    settingsItem.visible = Main.sessionMode.allowSettings;
+    this.menu._settingsActions[this.extension.uuid] = settingsItem;
+  }
+}
+
+export class FeatureIndicator extends SystemIndicator {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor(extension) {
+    super();
+
+    this.extension = extension;
+
+    // Create the icon for the indicator
+    this._indicator = this._addIndicator();
+    this._indicator.icon_name = iconName;
+
+    const tilingModeEnabled = this.extension.settings.get_boolean("tiling-mode-enabled");
+    const quickSettingsEnabled = this.extension.settings.get_boolean("quick-settings-enabled");
+
+    this._indicator.visible = tilingModeEnabled && quickSettingsEnabled;
+
+    this.extension.settings.connect("changed", (_, name) => {
+      switch (name) {
+        case "tiling-mode-enabled":
+        case "quick-settings-enabled":
+          this._indicator.visible = this.extension.settings.get_boolean(name);
+      }
+    });
+  }
+}

+ 493 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/keybindings.js

@@ -0,0 +1,493 @@
+/*
+ * This file is part of the Forge extension for GNOME
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Gnome imports
+import GObject from "gi://GObject";
+import Meta from "gi://Meta";
+import Shell from "gi://Shell";
+
+// Gnome Shell imports
+import * as Main from "resource:///org/gnome/shell/ui/main.js";
+
+// Shared state
+import { Logger } from "../shared/logger.js";
+
+export class Keybindings extends GObject.Object {
+  static {
+    GObject.registerClass(this);
+  }
+
+  /** @type {import('./extension.js').default} */
+  ext;
+
+  constructor(ext) {
+    super();
+    Logger.debug(`created keybindings`);
+    this._grabbers = new Map();
+    // this._bindSignals();
+    this.ext = ext;
+    this.extWm = ext.extWm;
+    this.kbdSettings = ext.kbdSettings;
+    this.settings = ext.settings;
+    this.buildBindingDefinitions();
+  }
+
+  // @deprecated
+  _acceleratorActivate(action) {
+    let grabber = this._grabbers.get(action);
+    if (grabber) {
+      Logger.debug(`Firing accelerator ${grabber.accelerator} : ${grabber.name}`);
+      grabber.callback();
+    } else {
+      Logger.error(`No listeners [action={${action}}]`);
+    }
+  }
+
+  // @deprecated
+  _bindSignals() {
+    global.display.connect("accelerator-activated", (_display, action, _deviceId, _timestamp) => {
+      this._acceleratorActivate(action);
+    });
+  }
+
+  enable() {
+    let keybindings = this._bindings;
+
+    for (const key in keybindings) {
+      Main.wm.addKeybinding(
+        key,
+        this.kbdSettings,
+        Meta.KeyBindingFlags.NONE,
+        Shell.ActionMode.NORMAL,
+        keybindings[key]
+      );
+    }
+
+    Logger.debug(`keybindings:enable`);
+  }
+
+  disable() {
+    let keybindings = this._bindings;
+
+    for (const key in keybindings) {
+      Main.wm.removeKeybinding(key);
+    }
+
+    Logger.debug(`keybindings:disable`);
+  }
+
+  // @deprecated
+  enableListenForBindings() {
+    windowConfig.forEach((config) => {
+      config.shortcut.forEach((shortcut) => {
+        this.listenFor(shortcut, () => {
+          config.actions.forEach((action) => {
+            this.extWm.command(action);
+          });
+        });
+      });
+    });
+  }
+
+  // @deprecated
+  disableListenForBindings() {
+    // The existing grabber items are from the custom config by
+    // this extension.
+    this._grabbers.forEach((grabber) => {
+      global.display.ungrab_accelerator(grabber.action);
+      Main.wm.allowKeybinding(grabber.name, Shell.ActionMode.NONE);
+    });
+
+    this._grabbers.clear();
+  }
+
+  /**
+   * API for quick binding of keys to function. This is going to be useful with SpaceMode
+   *
+   * @param {String} accelerator - keybinding combinations
+   * @param {Function} callback - function to call when the accelerator is invoked
+   *
+   * Credits:
+   *  - https://superuser.com/a/1182899
+   *  - Adapted based on current Gnome-shell API or syntax
+   */
+  listenFor(accelerator, callback) {
+    let grabFlags = Meta.KeyBindingFlags.NONE;
+    let action = global.display.grab_accelerator(accelerator, grabFlags);
+
+    if (action == Meta.KeyBindingAction.NONE) {
+      Logger.error(`Unable to grab accelerator [binding={${accelerator}}]`);
+      // TODO - check the gnome keybindings for conflicts and notify the user
+    } else {
+      let name = Meta.external_binding_name_for_action(action);
+
+      Logger.debug(`Requesting WM to allow binding [name={${name}}]`);
+      Main.wm.allowKeybinding(name, Shell.ActionMode.ALL);
+
+      this._grabbers.set(action, {
+        name: name,
+        accelerator: accelerator,
+        callback: callback,
+        action: action,
+      });
+    }
+  }
+
+  get modifierState() {
+    const [_x, _y, state] = this.extWm.getPointer();
+    return state;
+  }
+
+  allowDragDropTile() {
+    const tileModifier = this.kbdSettings.get_string("mod-mask-mouse-tile");
+    const modState = this.modifierState;
+    // Using Clutter.ModifierType values and also testing for pointer
+    // being grabbed (256). E.g. grabbed + pressing Super = 256 + 64 = 320
+    // See window.js#_handleMoving() - an overlay preview is shown.
+    // See window.js#_handleGrabOpEnd() - when the drag has been dropped
+    switch (tileModifier) {
+      case "Super":
+        return modState === 64 || modState === 320;
+      case "Alt":
+        return modState === 8 || modState === 264;
+      case "Ctrl":
+        return modState === 4 || modState === 260;
+      case "None":
+        return true;
+    }
+    return false;
+  }
+
+  buildBindingDefinitions() {
+    this._bindings = {
+      "window-toggle-float": () => {
+        let actions = [
+          {
+            name: "FloatToggle",
+            mode: "float",
+            x: "center",
+            y: "center",
+            width: 0.65,
+            height: 0.75,
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-toggle-always-float": () => {
+        let action = {
+          name: "FloatClassToggle",
+          mode: "float",
+          x: "center",
+          y: "center",
+          width: 0.65,
+          height: 0.75,
+        };
+        this.extWm.command(action);
+      },
+      "window-focus-left": () => {
+        let actions = [
+          {
+            name: "Focus",
+            direction: "Left",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-focus-down": () => {
+        let actions = [
+          {
+            name: "Focus",
+            direction: "Down",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-focus-up": () => {
+        let actions = [
+          {
+            name: "Focus",
+            direction: "Up",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-focus-right": () => {
+        let actions = [
+          {
+            name: "Focus",
+            direction: "Right",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-swap-left": () => {
+        let actions = [
+          {
+            name: "Swap",
+            direction: "Left",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-swap-down": () => {
+        let actions = [
+          {
+            name: "Swap",
+            direction: "Down",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-swap-up": () => {
+        let actions = [
+          {
+            name: "Swap",
+            direction: "Up",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-swap-right": () => {
+        let actions = [
+          {
+            name: "Swap",
+            direction: "Right",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-move-left": () => {
+        let actions = [
+          {
+            name: "Move",
+            direction: "Left",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-move-down": () => {
+        let actions = [
+          {
+            name: "Move",
+            direction: "Down",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-move-up": () => {
+        let actions = [
+          {
+            name: "Move",
+            direction: "Up",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "window-move-right": () => {
+        let actions = [
+          {
+            name: "Move",
+            direction: "Right",
+          },
+        ];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "con-split-layout-toggle": () => {
+        let actions = [{ name: "LayoutToggle" }];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "con-split-vertical": () => {
+        let actions = [{ name: "Split", orientation: "vertical" }];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "con-split-horizontal": () => {
+        let actions = [{ name: "Split", orientation: "horizontal" }];
+        actions.forEach((action) => {
+          this.extWm.command(action);
+        });
+      },
+      "con-stacked-layout-toggle": () => {
+        let action = { name: "LayoutStackedToggle" };
+        this.extWm.command(action);
+      },
+      "con-tabbed-layout-toggle": () => {
+        let action = { name: "LayoutTabbedToggle" };
+        this.extWm.command(action);
+      },
+      "con-tabbed-showtab-decoration-toggle": () => {
+        let action = { name: "ShowTabDecorationToggle" };
+        this.extWm.command(action);
+      },
+      "focus-border-toggle": () => {
+        let action = { name: "FocusBorderToggle" };
+        this.extWm.command(action);
+      },
+      "prefs-tiling-toggle": () => {
+        let action = { name: "TilingModeToggle" };
+        this.extWm.command(action);
+      },
+      "window-gap-size-increase": () => {
+        let action = { name: "GapSize", amount: 1 };
+        this.extWm.command(action);
+      },
+      "window-gap-size-decrease": () => {
+        let action = { name: "GapSize", amount: -1 };
+        this.extWm.command(action);
+      },
+      "workspace-active-tile-toggle": () => {
+        let action = { name: "WorkspaceActiveTileToggle" };
+        this.extWm.command(action);
+      },
+      "prefs-open": () => {
+        let action = { name: "PrefsOpen" };
+        this.extWm.command(action);
+      },
+      "window-swap-last-active": () => {
+        let action = {
+          name: "WindowSwapLastActive",
+        };
+        this.extWm.command(action);
+      },
+      "window-snap-one-third-right": () => {
+        let action = {
+          name: "SnapLayoutMove",
+          direction: "Right",
+          amount: 1 / 3,
+        };
+        this.extWm.command(action);
+      },
+      "window-snap-two-third-right": () => {
+        let action = {
+          name: "SnapLayoutMove",
+          direction: "Right",
+          amount: 2 / 3,
+        };
+        this.extWm.command(action);
+      },
+      "window-snap-one-third-left": () => {
+        let action = {
+          name: "SnapLayoutMove",
+          direction: "Left",
+          amount: 1 / 3,
+        };
+        this.extWm.command(action);
+      },
+      "window-snap-two-third-left": () => {
+        let action = {
+          name: "SnapLayoutMove",
+          direction: "Left",
+          amount: 2 / 3,
+        };
+        this.extWm.command(action);
+      },
+      "window-snap-center": () => {
+        let action = {
+          name: "SnapLayoutMove",
+          direction: "Center",
+        };
+        this.extWm.command(action);
+      },
+      "window-resize-top-increase": () => {
+        let action = {
+          name: "WindowResizeTop",
+          amount: this.settings.get_uint("resize-amount"),
+        };
+        this.extWm.command(action);
+      },
+      "window-resize-top-decrease": () => {
+        let action = {
+          name: "WindowResizeTop",
+          amount: -1 * this.settings.get_uint("resize-amount"),
+        };
+        this.extWm.command(action);
+      },
+      "window-resize-bottom-increase": () => {
+        let action = {
+          name: "WindowResizeBottom",
+          amount: this.settings.get_uint("resize-amount"),
+        };
+        this.extWm.command(action);
+      },
+      "window-resize-bottom-decrease": () => {
+        let action = {
+          name: "WindowResizeBottom",
+          amount: -1 * this.settings.get_uint("resize-amount"),
+        };
+        this.extWm.command(action);
+      },
+      "window-resize-left-increase": () => {
+        let action = {
+          name: "WindowResizeLeft",
+          amount: this.settings.get_uint("resize-amount"),
+        };
+        this.extWm.command(action);
+      },
+      "window-resize-left-decrease": () => {
+        let action = {
+          name: "WindowResizeLeft",
+          amount: -1 * this.settings.get_uint("resize-amount"),
+        };
+        this.extWm.command(action);
+      },
+      "window-resize-right-increase": () => {
+        let action = {
+          name: "WindowResizeRight",
+          amount: this.settings.get_uint("resize-amount"),
+        };
+        this.extWm.command(action);
+      },
+      "window-resize-right-decrease": () => {
+        let action = {
+          name: "WindowResizeRight",
+          amount: -1 * this.settings.get_uint("resize-amount"),
+        };
+        this.extWm.command(action);
+      },
+    };
+  }
+}

+ 1612 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/tree.js

@@ -0,0 +1,1612 @@
+/*
+ * This file is part of the Forge extension for GNOME
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Gnome imports
+import GObject from "gi://GObject";
+import Meta from "gi://Meta";
+import Shell from "gi://Shell";
+import St from "gi://St";
+
+// Shared state
+import { Logger } from "../shared/logger.js";
+
+// App imports
+import * as Utils from "./utils.js";
+import * as Window from "./window.js";
+
+export const NODE_TYPES = Utils.createEnum([
+  "ROOT",
+  "MONITOR", //Output in i3
+  "CON", //Container in i3
+  "WINDOW",
+  "WORKSPACE",
+]);
+
+export const LAYOUT_TYPES = Utils.createEnum([
+  "STACKED",
+  "TABBED",
+  "ROOT",
+  "HSPLIT",
+  "VSPLIT",
+  "PRESET",
+]);
+
+export const ORIENTATION_TYPES = Utils.createEnum(["NONE", "HORIZONTAL", "VERTICAL"]);
+
+export const POSITION = Utils.createEnum(["BEFORE", "AFTER", "UNKNOWN"]);
+
+/**
+ * The Node data representation of the following elements in the user's display:
+ *
+ * Monitor,
+ * Window,
+ * Container (generic),
+ * Workspace
+ *
+ */
+export class Node extends GObject.Object {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor(type, data) {
+    super();
+    // TODO - move to GObject property definitions?
+    this._type = type; // see NODE_TYPES
+    // _data: Meta.Window, unique id strings (Monitor,
+    // Workspace or St.Bin - a representation of Container)
+    this._data = data;
+    this._parent = null;
+    this._nodes = []; // Child elements of this node
+    this.mode = Window.WINDOW_MODES.DEFAULT;
+    this.percent = 0.0;
+    this._rect = null;
+    this.tab = null;
+    this.decoration = null;
+    this.app = null;
+
+    if (this.isWindow()) {
+      // When destroy() is called on Meta.Window, it might not be
+      // available so we store it immediately
+      this._initMetaWindow();
+      this._actor = this._data.get_compositor_private();
+      this._createWindowTab();
+    }
+
+    if (this.isCon()) {
+      this._createDecoration();
+    }
+  }
+
+  get windowActor() {
+    return this._actor;
+  }
+
+  get actor() {
+    switch (this.nodeType) {
+      case NODE_TYPES.WINDOW:
+        // A Meta.Window was assigned during creation
+        // But obtain the Clutter.Actor
+        return this._actor;
+      case NODE_TYPES.CON:
+      case NODE_TYPES.ROOT:
+        // A St.Bin was assigned during creation
+        return this.nodeValue;
+      case NODE_TYPES.MONITOR:
+      case NODE_TYPES.WORKSPACE:
+        // A separate St.Bin was assigned on another attribute during creation
+        return this.actorBin;
+    }
+  }
+
+  set rect(rect) {
+    this._rect = rect;
+    switch (this.nodeType) {
+      case NODE_TYPES.WINDOW:
+        break;
+      case NODE_TYPES.CON:
+      case NODE_TYPES.MONITOR:
+      case NODE_TYPES.ROOT:
+      case NODE_TYPES.WORKSPACE:
+        if (this.actor) {
+          this.actor.set_size(rect.width, rect.height);
+          this.actor.set_position(rect.x, rect.y);
+        }
+        break;
+    }
+  }
+
+  get rect() {
+    return this._rect;
+  }
+
+  get childNodes() {
+    return this._nodes;
+  }
+
+  set childNodes(nodes) {
+    this._nodes = nodes;
+  }
+
+  get firstChild() {
+    if (this._nodes && this._nodes.length >= 1) {
+      return this._nodes[0];
+    }
+    return null;
+  }
+
+  get level() {
+    let _level = 0;
+    let refNode = this.parentNode;
+    while (refNode) {
+      _level += 1;
+      refNode = refNode.parentNode;
+    }
+
+    return _level;
+  }
+
+  /**
+   * Find the index of this relative to the siblings
+   */
+  get index() {
+    if (this.parentNode) {
+      let childNodes = this.parentNode.childNodes;
+      for (let i = 0; i < childNodes.length; i++) {
+        if (childNodes[i] === this) {
+          return i;
+        }
+      }
+    }
+    return null;
+  }
+
+  get lastChild() {
+    if (this._nodes && this._nodes.length >= 1) {
+      return this._nodes[this._nodes.length - 1];
+    }
+    return null;
+  }
+
+  get nextSibling() {
+    if (this.parentNode) {
+      if (this.parentNode.lastChild !== this) {
+        return this.parentNode.childNodes[this.index + 1];
+      }
+    }
+    return null;
+  }
+
+  get nodeType() {
+    return this._type;
+  }
+
+  get nodeValue() {
+    return this._data;
+  }
+
+  get parentNode() {
+    return this._parent;
+  }
+
+  set parentNode(node) {
+    this._parent = node;
+  }
+
+  get previousSibling() {
+    if (this.parentNode) {
+      if (this.parentNode.firstChild !== this) {
+        return this.parentNode.childNodes[this.index - 1];
+      }
+    }
+    return null;
+  }
+
+  appendChild(node) {
+    if (!node) return null;
+    if (node.parentNode) node.parentNode.removeChild(node);
+    this.childNodes.push(node);
+    node.parentNode = this;
+    return node;
+  }
+
+  /**
+   * Checks if node is a descendant of this,
+   * or a descendant of its childNodes, etc
+   */
+  contains(node) {
+    if (!node) return false;
+    let searchNode = this.getNodeByValue(node.nodeValue);
+    return searchNode ? true : false;
+  }
+
+  getNodeByLayout(layout) {
+    let results = this._search(layout, "LAYOUT");
+    return results;
+  }
+
+  getNodeByMode(mode) {
+    let results = this._search(mode, "MODE");
+    return results;
+  }
+
+  getNodeByValue(value) {
+    let results = this._search(value, "VALUE");
+    return results && results.length >= 1 ? results[0] : null;
+  }
+
+  getNodeByType(type) {
+    let results = this._search(type, "TYPE");
+    return results;
+  }
+
+  /**
+   * @param childNode - is a child of this
+   */
+  insertBefore(newNode, childNode) {
+    if (!newNode) return null;
+    if (newNode === childNode) return null;
+    if (!childNode) {
+      this.appendChild(newNode);
+      return newNode;
+    }
+    if (childNode.parentNode !== this) return null;
+    if (newNode.parentNode) newNode.parentNode.removeChild(newNode);
+    let index = childNode.index;
+
+    if (childNode.index === 0) {
+      this.childNodes.unshift(newNode);
+    } else if (childNode.index > 0) {
+      this.childNodes.splice(index, 0, newNode);
+    }
+    newNode.parentNode = this;
+
+    return newNode;
+  }
+
+  isLayout(name) {
+    let layout = this.layout;
+    if (!layout) return false;
+
+    return name === layout;
+  }
+
+  isHSplit() {
+    return this.isLayout(LAYOUT_TYPES.HSPLIT);
+  }
+
+  isVSplit() {
+    return this.isLayout(LAYOUT_TYPES.VSPLIT);
+  }
+
+  isStacked() {
+    return this.isLayout(LAYOUT_TYPES.STACKED);
+  }
+
+  isTabbed() {
+    return this.isLayout(LAYOUT_TYPES.TABBED);
+  }
+
+  isType(name) {
+    const type = this.nodeType;
+    if (!type) return false;
+
+    return name === type;
+  }
+
+  isWindow() {
+    return this.isType(NODE_TYPES.WINDOW);
+  }
+
+  isCon() {
+    return this.isType(NODE_TYPES.CON);
+  }
+
+  isMonitor() {
+    return this.isType(NODE_TYPES.MONITOR);
+  }
+
+  isWorkspace() {
+    return this.isType(NODE_TYPES.WORKSPACE);
+  }
+
+  isRoot() {
+    return this.isType(NODE_TYPES.ROOT);
+  }
+
+  isMode(name) {
+    const mode = this.mode;
+    if (!name) return false;
+
+    return name === mode;
+  }
+
+  isFloat() {
+    return this.isMode(Window.WINDOW_MODES.FLOAT);
+  }
+
+  isTile() {
+    return this.isMode(Window.WINDOW_MODES.TILE);
+  }
+
+  isGrabTile() {
+    return this.isMode(Window.WINDOW_MODES.GRAB_TILE);
+  }
+
+  removeChild(node) {
+    if (node.isTabbed() && node.decoration) {
+      node.decoration.hide();
+      node.decoration.destroy_all_children();
+      node.decoration.destroy();
+      node.decoration = null;
+    }
+
+    let refNode;
+    if (this.contains(node)) {
+      // Since contains() tries to find node on all descendants,
+      // detach only from the immediate parent
+      let parentNode = node.parentNode;
+      refNode = parentNode.childNodes.splice(node.index, 1);
+      refNode.parentNode = null;
+    }
+    if (!refNode) {
+      throw `NodeNotFound ${node}`;
+    }
+    return refNode;
+  }
+
+  /**
+   * Backend for getNodeBy[attribute]. It is similar to DOM.getElementBy functions
+   */
+  _search(term, criteria) {
+    let results = [];
+    let searchFn = (candidate) => {
+      if (criteria) {
+        switch (criteria) {
+          case "VALUE":
+            if (candidate.nodeValue === term) {
+              results.push(candidate);
+            }
+            break;
+          case "TYPE":
+            if (candidate.nodeType === term) {
+              results.push(candidate);
+            }
+            break;
+          case "MODE":
+            if (candidate.mode === term) {
+              results.push(candidate);
+            }
+          case "LAYOUT":
+            if (candidate.layout && candidate.layout === term) {
+              results.push(candidate);
+            }
+        }
+      } else {
+        if (candidate === term) {
+          results.push(candidate);
+        }
+      }
+    };
+
+    this._walk(searchFn, this._traverseBreadthFirst);
+    return results;
+  }
+
+  // start walking from root and all child nodes
+  _traverseBreadthFirst(callback) {
+    let queue = new Queue();
+    queue.enqueue(this);
+
+    let currentNode = queue.dequeue();
+
+    while (currentNode) {
+      for (let i = 0, length = currentNode.childNodes.length; i < length; i++) {
+        queue.enqueue(currentNode.childNodes[i]);
+      }
+
+      callback(currentNode);
+      currentNode = queue.dequeue();
+    }
+  }
+
+  // start walking from bottom to root
+  _traverseDepthFirst(callback) {
+    let recurse = (currentNode) => {
+      for (let i = 0, length = currentNode.childNodes.length; i < length; i++) {
+        recurse(currentNode.childNodes[i]);
+      }
+
+      callback(currentNode);
+    };
+    recurse(this);
+  }
+
+  _walk(callback, traversal) {
+    traversal.call(this, callback);
+  }
+
+  _initMetaWindow() {
+    if (this.isWindow()) {
+      let windowTracker = Shell.WindowTracker.get_default();
+      let metaWin = this.nodeValue;
+      let app = windowTracker.get_window_app(metaWin);
+      this.app = app;
+    }
+  }
+
+  _createWindowTab() {
+    if (this.tab || !this.isWindow()) return;
+
+    let tabContents = new St.BoxLayout({
+      style_class: "window-tabbed-tab",
+      x_expand: true,
+    });
+    let app = this.app;
+    let labelText = this._getTitle();
+    let metaWin = this.nodeValue;
+    let titleButton = new St.Button({
+      x_expand: true,
+      label: `${labelText}`,
+    });
+    let iconBin = new St.Button({
+      style_class: "window-tabbed-tab-icon",
+    });
+    let icon = app.create_icon_texture(24 * Utils.dpi());
+    iconBin.child = icon;
+    let closeButton = new St.Button({
+      style_class: "window-tabbed-tab-close",
+      child: new St.Icon({ icon_name: "window-close-symbolic" }),
+    });
+
+    tabContents.add(iconBin);
+    tabContents.add(titleButton);
+    tabContents.add(closeButton);
+
+    let clickFn = () => {
+      this.parentNode.childNodes.forEach((c) => {
+        if (c.tab) {
+          c.tab.remove_style_class_name("window-tabbed-tab-active");
+          c.render();
+        }
+      });
+      tabContents.add_style_class_name("window-tabbed-tab-active");
+      metaWin.activate(global.display.get_current_time());
+    };
+
+    iconBin.connect("clicked", clickFn);
+    titleButton.connect("clicked", clickFn);
+    closeButton.connect("clicked", () => {
+      metaWin.delete(global.get_current_time());
+    });
+
+    if (metaWin === global.display.get_focus_window()) {
+      tabContents.add_style_class_name("window-tabbed-tab-active");
+    }
+    this.tab = tabContents;
+  }
+
+  _createDecoration() {
+    if (this.decoration) return;
+    let decoration = new St.BoxLayout();
+    decoration.type = "forge-deco";
+    decoration.parentNode = this;
+    let globalWinGrp = global.window_group;
+    decoration.style_class = "window-tabbed-bg";
+
+    if (!globalWinGrp.contains(decoration)) {
+      globalWinGrp.add_child(decoration);
+    }
+
+    decoration.hide();
+    this.decoration = decoration;
+  }
+
+  _getTitle() {
+    if (this.isWindow()) {
+      return this.nodeValue.title ? this.nodeValue.title : this.app.get_name();
+    }
+    return null;
+  }
+
+  render() {
+    // Always update the title for the tab
+    if (this.tab !== null && this.tab !== undefined) {
+      let titleLabel = this.tab.get_child_at_index(1);
+      if (titleLabel) titleLabel.label = this._getTitle();
+    }
+  }
+
+  set float(value) {
+    if (this.isWindow()) {
+      let metaWindow = this.nodeValue;
+      let floatAlwaysOnTop = this.settings.get_boolean("float-always-on-top-enabled");
+      if (value) {
+        this.mode = Window.WINDOW_MODES.FLOAT;
+        if (!metaWindow.is_above()) {
+          floatAlwaysOnTop && metaWindow.make_above();
+        }
+      } else {
+        this.mode = Window.WINDOW_MODES.TILE;
+        if (metaWindow.is_above()) {
+          metaWindow.unmake_above();
+        }
+      }
+    }
+  }
+
+  set tile(value) {
+    this.float = !value;
+  }
+}
+
+/**
+ * An implementation of Queue using arrays
+ */
+export class Queue extends GObject.Object {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor() {
+    super();
+    this._elements = [];
+  }
+
+  get length() {
+    return this._elements.length;
+  }
+
+  enqueue(item) {
+    this._elements.push(item);
+  }
+
+  dequeue() {
+    return this._elements.shift();
+  }
+}
+
+export class Tree extends Node {
+  static {
+    GObject.registerClass(this);
+  }
+
+  /** @param {Window.WindowManager} extWm */
+  constructor(extWm) {
+    let rootBin = new St.Bin();
+    super(NODE_TYPES.ROOT, rootBin);
+    this._extWm = extWm;
+    this.defaultStackHeight = 35;
+    this.settings = this.extWm.ext.settings;
+    this.layout = LAYOUT_TYPES.ROOT;
+    if (!global.window_group.contains(rootBin)) global.window_group.add_child(rootBin);
+
+    this._initWorkspaces();
+  }
+
+  /** @type {Window.WindowManager} */
+  get extWm() {
+    return this._extWm;
+  }
+
+  /**
+   * Handles new and existing workspaces in the tree
+   */
+  _initWorkspaces() {
+    let wsManager = global.display.get_workspace_manager();
+    let workspaces = wsManager.get_n_workspaces();
+    for (let i = 0; i < workspaces; i++) {
+      this.addWorkspace(i);
+    }
+  }
+
+  // TODO move to monitor.js
+  addMonitor(wsIndex) {
+    let monitors = global.display.get_n_monitors();
+    for (let mi = 0; mi < monitors; mi++) {
+      let monitorWsNode = this.createNode(
+        `ws${wsIndex}`,
+        NODE_TYPES.MONITOR,
+        `mo${mi}ws${wsIndex}`
+      );
+      monitorWsNode.layout = this.extWm.determineSplitLayout();
+      monitorWsNode.actorBin = new St.Bin();
+      if (!global.window_group.contains(monitorWsNode.actorBin))
+        global.window_group.add_child(monitorWsNode.actorBin);
+    }
+  }
+
+  // TODO move to workspace.js
+  addWorkspace(wsIndex) {
+    let wsManager = global.display.get_workspace_manager();
+    let workspaceNodeValue = `ws${wsIndex}`;
+
+    let existingWsNode = this.findNode(workspaceNodeValue);
+    if (existingWsNode) {
+      return false;
+    }
+
+    let newWsNode = this.createNode(this.nodeValue, NODE_TYPES.WORKSPACE, workspaceNodeValue);
+
+    let workspace = wsManager.get_workspace_by_index(wsIndex);
+    newWsNode.layout = LAYOUT_TYPES.HSPLIT;
+    newWsNode.actorBin = new St.Bin({ style_class: "workspace-actor-bg" });
+
+    if (!global.window_group.contains(newWsNode.actorBin))
+      global.window_group.add_child(newWsNode.actorBin);
+
+    this.extWm.bindWorkspaceSignals(workspace);
+    this.addMonitor(wsIndex);
+
+    return true;
+  }
+
+  // TODO move to workspace.js
+  removeWorkspace(wsIndex) {
+    let workspaceNodeData = `ws${wsIndex}`;
+    let existingWsNode = this.findNode(workspaceNodeData);
+    if (!existingWsNode) {
+      return false;
+    }
+
+    if (global.window_group.contains(existingWsNode.actorBin))
+      global.window_group.remove_child(existingWsNode.actorBin);
+
+    this.removeChild(existingWsNode);
+    return true;
+  }
+
+  get nodeWorkpaces() {
+    let nodeWorkspaces = this.getNodeByType(NODE_TYPES.WORKSPACE);
+    return nodeWorkspaces;
+  }
+
+  get nodeWindows() {
+    let nodeWindows = this.getNodeByType(NODE_TYPES.WINDOW);
+    return nodeWindows;
+  }
+
+  /**
+   * Creates a new Node and attaches it to a parent toData.
+   * Parent can be MONITOR or CON types only.
+   */
+  createNode(parentObj, type, value, mode = Window.WINDOW_MODES.TILE) {
+    let parentNode = this.findNode(parentObj);
+    let child;
+
+    if (parentNode) {
+      child = new Node(type, value);
+      child.settings = this.settings;
+
+      if (child.isWindow()) child.mode = mode;
+
+      // Append after a window
+      if (parentNode.isWindow()) {
+        const grandParentNode = parentNode.parentNode;
+        grandParentNode.insertBefore(child, parentNode.nextSibling);
+        Logger.debug(
+          `Parent is a window, attaching to this window's parent ${grandParentNode.nodeType}`
+        );
+      } else {
+        // Append as the last item of the container
+        parentNode.appendChild(child);
+      }
+    }
+    return child;
+  }
+
+  /**
+   * Finds any Node in the tree using data
+   * Data types can be in the form of Meta.Window or unique id strings
+   * for Workspace, Monitor and Container
+   *
+   * Workspace id strings takes the form `ws{n}`.
+   * Monitor id strings takes the form `mo{m}ws{n}`
+   * Container id strings takes the form `mo{m}ws{n}c{x}`
+   *
+   */
+  findNode(data) {
+    let searchNode = this.getNodeByValue(data);
+    return searchNode;
+  }
+
+  /**
+   * Find the NodeWindow using the Meta.WindowActor
+   */
+  findNodeByActor(windowActor) {
+    let searchNode;
+    let criteriaMatchFn = (node) => {
+      if (node.isWindow() && node.actor === windowActor) {
+        searchNode = node;
+      }
+    };
+
+    this._walk(criteriaMatchFn, this._traverseDepthFirst);
+
+    return searchNode;
+  }
+
+  /**
+   * Focuses on the next node, if metaWindow and tiled, raise it
+   */
+  focus(node, direction) {
+    if (!node) return null;
+    let next = this.next(node, direction);
+
+    if (!next) return null;
+
+    let type = next.nodeType;
+    let position = Utils.positionFromDirection(direction);
+    const previous = position === POSITION.BEFORE;
+
+    switch (type) {
+      case NODE_TYPES.WINDOW:
+        break;
+      case NODE_TYPES.CON:
+        const tiledConWindows = next.getNodeByType(NODE_TYPES.WINDOW).filter((w) => w.isTile());
+        if (next.layout === LAYOUT_TYPES.STACKED) {
+          next = next.lastChild;
+        } else {
+          if (tiledConWindows.length > 1) {
+            if (previous) {
+              next = tiledConWindows[tiledConWindows.length - 1];
+            } else {
+              next = tiledConWindows[0];
+            }
+          } else {
+            next = tiledConWindows[0];
+          }
+        }
+        break;
+      case NODE_TYPES.MONITOR:
+        if (next.layout === LAYOUT_TYPES.STACKED) {
+          next = next.lastChild;
+        } else {
+          if (previous) {
+            next = next.lastChild;
+          } else {
+            next = next.firstChild;
+          }
+        }
+
+        if (next && next.nodeType === NODE_TYPES.CON) {
+          const tiledConWindows = next.getNodeByType(NODE_TYPES.WINDOW).filter((w) => w.isTile());
+          if (next.layout === LAYOUT_TYPES.STACKED) {
+            next = next.lastChild;
+          } else {
+            if (tiledConWindows.length > 1) {
+              if (previous) {
+                next = tiledConWindows[tiledConWindows.length - 1];
+              } else {
+                next = tiledConWindows[0];
+              }
+            } else {
+              next = tiledConWindows[0];
+            }
+          }
+        }
+        break;
+    }
+
+    if (!next) return null;
+
+    let metaWindow = next.nodeValue;
+    if (!metaWindow) return null;
+    if (metaWindow.minimized) {
+      next = this.focus(next, direction);
+    } else {
+      metaWindow.raise();
+      metaWindow.focus(global.display.get_current_time());
+      metaWindow.activate(global.display.get_current_time());
+
+      if (this.settings.get_boolean("move-pointer-focus-enabled")) {
+        this.extWm.movePointerWith(next);
+      } else {
+        let monitorArea = metaWindow.get_work_area_current_monitor();
+        let ptr = this.extWm.getPointer();
+        if (!Utils.rectContainsPoint(monitorArea, [ptr[0], ptr[1]])) {
+          this.extWm.movePointerWith(next);
+        }
+      }
+    }
+    return next;
+  }
+
+  /**
+   * Obtains the non-floating, non-minimized list of nodes
+   * Useful for calculating the rect areas
+   */
+  getTiledChildren(items) {
+    let filterFn = (node) => {
+      if (node.isWindow()) {
+        let floating = node.isFloat();
+        let grabTiling = node.isGrabTile();
+        // A Node[Window]._data is a Meta.Window
+        if (!node.nodeValue.minimized && !(floating || grabTiling)) {
+          return true;
+        }
+      }
+      // handle split containers
+      if (node.isCon()) {
+        return this.getTiledChildren(node.childNodes).length > 0;
+      }
+      return false;
+    };
+
+    return items ? items.filter(filterFn) : [];
+  }
+
+  /**
+   * Move a given node into a direction
+   *
+   * TODO, handle minimized or floating windows
+   *
+   */
+  move(node, direction) {
+    let next = this.next(node, direction);
+    let position = Utils.positionFromDirection(direction);
+
+    if (!next || next === -1) {
+      if (next === -1) {
+        // TODO - update appending or prepending on the same monitor
+        const currMonWsNode = this.extWm.currentMonWsNode;
+        if (currMonWsNode) {
+          if (position === POSITION.AFTER) {
+            currMonWsNode.appendChild(node);
+          } else {
+            currMonWsNode.insertBefore(node, next.firstChild);
+          }
+          return true;
+        }
+      }
+      return false;
+    }
+
+    let parentNode = node.parentNode;
+    let parentTarget;
+
+    switch (next.nodeType) {
+      case NODE_TYPES.WINDOW:
+        // If same parent, swap
+        if (next === node.previousSibling || next === node.nextSibling) {
+          parentTarget = next.parentNode;
+          this.swapPairs(node, next);
+          if (this.settings.get_boolean("move-pointer-focus-enabled")) {
+            this.extWm.movePointerWith(node);
+          }
+          // do not reset percent when swapped
+          return true;
+        } else {
+          parentTarget = next.parentNode;
+          if (parentTarget) {
+            if (position === POSITION.AFTER) {
+              parentTarget.insertBefore(node, next);
+            } else {
+              parentTarget.insertBefore(node, next.nextSibling);
+            }
+          }
+        }
+        break;
+      case NODE_TYPES.CON:
+        parentTarget = next;
+
+        if (next.isStacked()) {
+          next.appendChild(node);
+        } else {
+          if (position === POSITION.AFTER) {
+            next.insertBefore(node, next.firstChild);
+          } else {
+            next.appendChild(node);
+          }
+        }
+        break;
+      case NODE_TYPES.MONITOR:
+        parentTarget = next;
+        const currMonWsNode = this.extWm.currentMonWsNode;
+
+        if (
+          !next.contains(node) &&
+          (node === currMonWsNode.firstChild || node === currMonWsNode.lastChild)
+        ) {
+          let targetMonRect = this.extWm.rectForMonitor(node, Utils.monitorIndex(next.nodeValue));
+          if (!targetMonRect) return false;
+          if (position === POSITION.AFTER) {
+            next.insertBefore(node, next.firstChild);
+          } else {
+            next.appendChild(node);
+          }
+          let rect = targetMonRect;
+          this.extWm.move(node.nodeValue, rect);
+          this.extWm.movePointerWith(node);
+        } else {
+          if (position === POSITION.AFTER) {
+            currMonWsNode.appendChild(node);
+          } else {
+            currMonWsNode.insertBefore(node, currMonWsNode.firstChild);
+          }
+        }
+        break;
+      default:
+        break;
+    }
+    this.resetSiblingPercent(parentNode);
+    this.resetSiblingPercent(parentTarget);
+    return true;
+  }
+
+  /**
+   * Give the next sibling/parent/descendant on the tree based
+   * on a given Meta.MotionDirection
+   *
+   * @param {Tree.Node} node
+   * @param {Meta.MotionDirection} direction
+   *
+   * Credits: borrowed logic from tree.c of i3
+   */
+  next(node, direction) {
+    if (!node) return null;
+    let orientation = Utils.orientationFromDirection(direction);
+    let position = Utils.positionFromDirection(direction);
+    let previous = position === POSITION.BEFORE;
+
+    const type = node.nodeType;
+
+    switch (type) {
+      case NODE_TYPES.ROOT:
+        // Root is the top of the tree
+        if (node.childNodes.length > 1) {
+          if (previous) {
+            return node.firstChild;
+          } else {
+            return node.lastChild;
+          }
+        } else {
+          return node.firstChild;
+        }
+      case NODE_TYPES.WORKSPACE:
+        // Let gnome-shell handle this?
+        break;
+      case NODE_TYPES.MONITOR:
+        // Find the next monitor
+        const nodeWindow = this.findFirstNodeWindowFrom(node);
+        return this.nextMonitor(nodeWindow, position, orientation);
+    }
+
+    while (node.nodeType !== NODE_TYPES.WORKSPACE) {
+      if (node.nodeType === NODE_TYPES.MONITOR) {
+        return this.next(node, direction);
+      }
+      const parentNode = node.parentNode;
+      const parentOrientation = Utils.orientationFromLayout(parentNode.layout);
+
+      if (parentNode.childNodes.length > 1 && orientation === parentOrientation) {
+        const next = previous ? node.previousSibling : node.nextSibling;
+        if (next) {
+          return next;
+        }
+      }
+      node = node.parentNode;
+    }
+  }
+
+  nextMonitor(nodeWindow, position, orientation) {
+    if (!nodeWindow) return null;
+    // Use the built in logic to determine adjacent monitors
+    let monitorNode = null;
+    let monitorDirection = Utils.directionFrom(position, orientation);
+    let targetMonitor = -1;
+    targetMonitor = global.display.get_monitor_neighbor_index(
+      nodeWindow.nodeValue.get_monitor(),
+      monitorDirection
+    );
+    if (targetMonitor < 0) return targetMonitor;
+    let monWs = `mo${targetMonitor}ws${nodeWindow.nodeValue.get_workspace().index()}`;
+    monitorNode = this.findNode(monWs);
+    return monitorNode;
+  }
+
+  findAncestorMonitor(node) {
+    return this.findAncestor(node, NODE_TYPES.MONITOR);
+  }
+
+  findAncestor(node, ancestorType) {
+    let ancestorNode;
+
+    while (node && ancestorType && !node.isRoot()) {
+      if (node.isType(ancestorType)) {
+        ancestorNode = node;
+        break;
+      } else {
+        node = node.parentNode;
+      }
+    }
+
+    return ancestorNode;
+  }
+
+  nextVisible(node, direction) {
+    if (!node) return null;
+    let next = this.next(node, direction);
+    if (next && next.nodeType === NODE_TYPES.WINDOW && next.nodeValue && next.nodeValue.minimized) {
+      next = this.nextVisible(next, direction);
+    }
+    return next;
+  }
+
+  /**
+   * Credits: i3-like split
+   */
+  split(node, orientation, forceSplit = false) {
+    if (!node) return;
+    let type = node.nodeType;
+
+    if (type === NODE_TYPES.WINDOW && node.mode === Window.WINDOW_MODES.FLOAT) {
+      return;
+    }
+
+    if (!(type === NODE_TYPES.MONITOR || type === NODE_TYPES.CON || type === NODE_TYPES.WINDOW)) {
+      return;
+    }
+
+    let parentNode = node.parentNode;
+    let numChildren = parentNode.childNodes.length;
+
+    // toggle the split
+    if (
+      !forceSplit &&
+      numChildren === 1 &&
+      (parentNode.layout === LAYOUT_TYPES.HSPLIT || parentNode.layout === LAYOUT_TYPES.VSPLIT)
+    ) {
+      parentNode.layout =
+        orientation === ORIENTATION_TYPES.HORIZONTAL ? LAYOUT_TYPES.HSPLIT : LAYOUT_TYPES.VSPLIT;
+      this.attachNode = parentNode;
+      return;
+    }
+
+    // Push down the Meta.Window into a new Container
+    let currentIndex = node.index;
+    let container = new St.Bin();
+    let newConNode = new Node(NODE_TYPES.CON, container);
+    newConNode.settings = this.settings;
+
+    // Take the direction of the parent
+    newConNode.layout =
+      orientation === ORIENTATION_TYPES.HORIZONTAL ? LAYOUT_TYPES.HSPLIT : LAYOUT_TYPES.VSPLIT;
+    newConNode.rect = node.rect;
+    newConNode.percent = node.percent;
+    newConNode.parentNode = parentNode;
+    parentNode.childNodes[currentIndex] = newConNode;
+    this.createNode(container, node.nodeType, node.nodeValue);
+    node.parentNode = newConNode;
+    this.attachNode = newConNode;
+  }
+
+  swap(node, direction) {
+    let nextSwapNode = this.next(node, direction);
+    if (!nextSwapNode) {
+      return;
+    }
+    let nodeSwapType = nextSwapNode.nodeType;
+
+    switch (nodeSwapType) {
+      case NODE_TYPES.WINDOW:
+        break;
+      case NODE_TYPES.CON:
+      case NODE_TYPES.MONITOR:
+        let childWindowNodes = nextSwapNode
+          .getNodeByMode(Window.WINDOW_MODES.TILE)
+          .filter((t) => t.nodeType === NODE_TYPES.WINDOW);
+        if (nextSwapNode.layout === LAYOUT_TYPES.STACKED) {
+          nextSwapNode = childWindowNodes[childWindowNodes.length - 1];
+        } else {
+          nextSwapNode = childWindowNodes[0];
+        }
+        break;
+    }
+
+    let isNextNodeWin =
+      nextSwapNode && nextSwapNode.nodeValue && nextSwapNode.nodeType === NODE_TYPES.WINDOW;
+    if (isNextNodeWin) {
+      if (!this.extWm.sameParentMonitor(node, nextSwapNode)) {
+        // TODO, there is a freeze bug if there are not in same monitor.
+        return;
+      }
+      this.swapPairs(node, nextSwapNode);
+    }
+    return nextSwapNode;
+  }
+
+  swapPairs(fromNode, toNode, focus = true) {
+    if (!(this._swappable(fromNode) && this._swappable(toNode))) return;
+    // Swap the items in the array
+    let parentForFrom = fromNode ? fromNode.parentNode : undefined;
+    let parentForTo = toNode.parentNode;
+    if (parentForTo && parentForFrom) {
+      let nextIndex = toNode.index;
+      let focusIndex = fromNode.index;
+
+      let transferMode = fromNode.mode;
+      fromNode.mode = toNode.mode;
+      toNode.mode = transferMode;
+
+      let transferRect = fromNode.nodeValue.get_frame_rect();
+      let transferToRect = toNode.nodeValue.get_frame_rect();
+      let transferPercent = fromNode.percent;
+
+      fromNode.percent = toNode.percent;
+      toNode.percent = transferPercent;
+
+      parentForTo.childNodes[nextIndex] = fromNode;
+      fromNode.parentNode = parentForTo;
+      parentForFrom.childNodes[focusIndex] = toNode;
+      toNode.parentNode = parentForFrom;
+
+      this.extWm.move(fromNode.nodeValue, transferToRect);
+      this.extWm.move(toNode.nodeValue, transferRect);
+
+      if (focus) {
+        // The fromNode is now on the parent-target
+        fromNode.nodeValue.raise();
+        fromNode.nodeValue.focus(global.get_current_time());
+      }
+    }
+  }
+
+  _swappable(node) {
+    if (!node) return false;
+    if (node.nodeType === NODE_TYPES.WINDOW && !node.nodeValue.minimized) {
+      return true;
+    }
+    return false;
+  }
+
+  /**
+   * Performs cleanup of dangling parents in addition to removing the
+   * node from the parent.
+   */
+  removeNode(node) {
+    let oldChild;
+
+    let cleanUpParent = (existParent) => {
+      if (this.getTiledChildren(existParent.childNodes).length === 0) {
+        existParent.percent = 0.0;
+        this.resetSiblingPercent(existParent.parentNode);
+      }
+      this.resetSiblingPercent(existParent);
+    };
+
+    let parentNode = node.parentNode;
+    // If parent has only this window, remove the parent instead
+    if (parentNode.childNodes.length === 1 && parentNode.nodeType !== NODE_TYPES.MONITOR) {
+      let existParent = parentNode.parentNode;
+      oldChild = existParent.removeChild(parentNode);
+      cleanUpParent(existParent);
+    } else {
+      let existParent = node.parentNode;
+      oldChild = existParent.removeChild(node);
+      if (!this.extWm.floatingWindow(node)) cleanUpParent(existParent);
+    }
+
+    if (node === this.attachNode) {
+      this.attachNode = null;
+    } else {
+      // Find the next focus node as attachNode
+      this.attachNode = this.findNode(this.extWm.focusMetaWindow);
+    }
+
+    return oldChild ? true : false;
+  }
+
+  render(from) {
+    Logger.debug(`render tree ${from ? "from " + from : ""}`);
+    this.processNode(this);
+    this.apply(this);
+    this.cleanTree();
+    let debugMode = true;
+    if (debugMode) {
+      this.debugTree();
+    }
+    Logger.debug(`*********************************************`);
+  }
+
+  apply(node) {
+    if (!node) return;
+    let tiledChildren = node
+      .getNodeByMode(Window.WINDOW_MODES.TILE)
+      .filter((t) => t.nodeType === NODE_TYPES.WINDOW);
+    tiledChildren.forEach((w) => {
+      if (w.renderRect) {
+        if (w.renderRect.width > 0 && w.renderRect.height > 0) {
+          let metaWin = w.nodeValue;
+          this.extWm.move(metaWin, w.renderRect);
+        } else {
+          Logger.debug(`ignoring apply for ${w.renderRect.width}x${w.renderRect.height}`);
+        }
+      }
+
+      if (w.nodeValue.firstRender) w.nodeValue.firstRender = false;
+    });
+  }
+
+  cleanTree() {
+    // Phase 1: remove any cons with empty children
+    const orphanCons = this.getNodeByType(NODE_TYPES.CON).filter((c) => c.childNodes.length === 0);
+    const hasOrphanCons = orphanCons.length > 0;
+
+    orphanCons.forEach((o) => {
+      this.removeNode(o);
+    });
+
+    const invalidWindows = this.getNodeByType(NODE_TYPES.WINDOW).filter((w) => {
+      const metaWindow = w.nodeValue;
+      const title = metaWindow.title;
+      const wmClass = metaWindow.wm_class;
+      return wmClass === "gjs";
+    });
+
+    invalidWindows.forEach((w) => {
+      this.removeNode(w);
+    });
+
+    // Phase 2: remove any empty parent cons up to the single intermediate parent-window level
+    // Basically, flatten them?
+    // [con[con[con[con[window]]]]] --> [con[window]]
+    // TODO: help :)
+    const grandParentCons = this.getNodeByType(NODE_TYPES.CON).filter(
+      (c) => c.childNodes.length === 1 && c.childNodes[0].nodeType === NODE_TYPES.CON
+    );
+
+    grandParentCons.forEach((c) => {
+      c.layout = LAYOUT_TYPES.HSPLIT;
+    });
+
+    if (hasOrphanCons || invalidWindows.length > 0) {
+      this.processNode(this);
+      this.apply(this);
+    }
+  }
+
+  /**
+   *
+   * Credits: Do the i3-like calculations
+   *
+   */
+  processNode(node) {
+    if (!node) return;
+
+    // Render the Root, Workspace and Monitor
+    // For now, we let them render their children recursively
+    if (node.nodeType === NODE_TYPES.ROOT) {
+      node.childNodes.forEach((child) => {
+        this.processNode(child);
+      });
+    }
+
+    if (node.nodeType === NODE_TYPES.WORKSPACE) {
+      node.childNodes.forEach((child) => {
+        this.processNode(child);
+      });
+    }
+
+    let params = {};
+
+    if (node.nodeType === NODE_TYPES.MONITOR || node.nodeType === NODE_TYPES.CON) {
+      // The workarea from Meta.Window's assigned monitor
+      // is important so it computes to `remove` the panel size
+      // really well. However, this type of workarea would only
+      // appear if there is window present on the monitor.
+      if (node.childNodes.length === 0) {
+        return;
+      }
+
+      // If monitor, get the workarea
+      if (node.nodeType === NODE_TYPES.MONITOR) {
+        let monitorIndex = Utils.monitorIndex(node.nodeValue);
+        let monitorArea = global.display
+          .get_workspace_manager()
+          .get_active_workspace()
+          .get_work_area_for_monitor(monitorIndex);
+        if (!monitorArea) return; // there is no visible child window
+        node.rect = monitorArea;
+        node.rect = this.processGap(node);
+      }
+
+      let tiledChildren = this.getTiledChildren(node.childNodes);
+      let sizes = this.computeSizes(node, tiledChildren);
+
+      params.sizes = sizes;
+      let showTabs = this.settings.get_boolean("showtab-decoration-enabled");
+      params.stackedHeight = showTabs ? this.defaultStackHeight * Utils.dpi() : 0;
+      params.tiledChildren = tiledChildren;
+
+      let decoration = node.decoration;
+
+      if (decoration) {
+        let decoChildren = decoration.get_children();
+        decoChildren.forEach((decoChild) => {
+          decoration.remove_child(decoChild);
+        });
+      }
+
+      tiledChildren.forEach((child, index) => {
+        // A monitor can contain a window or container child
+        if (node.layout === LAYOUT_TYPES.HSPLIT || node.layout === LAYOUT_TYPES.VSPLIT) {
+          this.processSplit(node, child, params, index);
+        } else if (node.layout === LAYOUT_TYPES.STACKED) {
+          this.processStacked(node, child, params, index);
+        } else if (node.layout === LAYOUT_TYPES.TABBED) {
+          this.processTabbed(node, child, params, index);
+        }
+        this.processNode(child);
+      });
+    }
+
+    if (node.isWindow()) {
+      if (!node.rect) node.rect = node.nodeValue.get_work_area_current_monitor();
+      node.renderRect = this.processGap(node);
+    }
+  }
+
+  /**
+   * Forge processes both non-Window and Window gaps
+   */
+  processGap(node) {
+    let nodeWidth = node.rect.width;
+    let nodeHeight = node.rect.height;
+    let nodeX = node.rect.x;
+    let nodeY = node.rect.y;
+    let gap = this.extWm.calculateGaps(node);
+
+    if (nodeWidth > gap * 2 && nodeHeight > gap * 2) {
+      nodeX += gap;
+      nodeY += gap;
+
+      // TODO - detect inbetween windows and adjust accordingly
+      // Also adjust depending on display scaling
+      nodeWidth -= gap * 2;
+      nodeHeight -= gap * 2;
+    }
+    return { x: nodeX, y: nodeY, width: nodeWidth, height: nodeHeight };
+  }
+
+  processSplit(node, child, params, index) {
+    let layout = node.layout;
+    let nodeRect = node.rect;
+    let nodeWidth;
+    let nodeHeight;
+    let nodeX;
+    let nodeY;
+
+    if (layout === LAYOUT_TYPES.HSPLIT) {
+      // Divide the parent container's width
+      // depending on number of children. And use this
+      // to setup each child window's width.
+      nodeWidth = params.sizes[index];
+      nodeHeight = nodeRect.height;
+      nodeX = nodeRect.x;
+      if (index != 0) {
+        let i = 1;
+        while (i <= index) {
+          nodeX += params.sizes[i - 1];
+          i++;
+        }
+      }
+      nodeY = nodeRect.y;
+    } else if (layout === LAYOUT_TYPES.VSPLIT) {
+      // split vertically
+      // Conversely for vertical split, divide the parent container's height
+      // depending on number of children. And use this
+      // to setup each child window's height.
+      nodeWidth = nodeRect.width;
+      nodeHeight = params.sizes[index];
+      nodeX = nodeRect.x;
+      nodeY = nodeRect.y;
+      if (index != 0) {
+        let i = 1;
+        while (i <= index) {
+          nodeY += params.sizes[i - 1];
+          i++;
+        }
+      }
+    }
+
+    child.rect = {
+      x: nodeX,
+      y: nodeY,
+      width: nodeWidth,
+      height: nodeHeight,
+    };
+  }
+
+  /**
+   * Process the child node here for the dimensions of the child stack/window,
+   * It will be moved to the Node class in the future as Node.render()
+   *
+   */
+  processStacked(node, child, params, index) {
+    let layout = node.layout;
+    let nodeWidth = node.rect.width;
+    let nodeHeight = node.rect.height;
+    let nodeX = node.rect.x;
+    let nodeY = node.rect.y;
+    let stackHeight = this.defaultStackHeight;
+
+    if (layout === LAYOUT_TYPES.STACKED) {
+      if (node.childNodes.length > 1) {
+        nodeY += stackHeight * index;
+        nodeHeight -= stackHeight * index;
+      }
+
+      child.rect = {
+        x: nodeX,
+        y: nodeY,
+        width: nodeWidth,
+        height: nodeHeight,
+      };
+    }
+  }
+
+  /**
+   * Process the child node here for the dimensions of the child tab/window,
+   * It will be moved to the Node class in the future as Node.render()
+   *
+   */
+  processTabbed(node, child, params, _index) {
+    let layout = node.layout;
+    let nodeRect = node.rect;
+    let nodeWidth;
+    let nodeHeight;
+    let nodeX;
+    let nodeY;
+
+    if (layout === LAYOUT_TYPES.TABBED) {
+      nodeWidth = nodeRect.width;
+      nodeX = nodeRect.x;
+      nodeY = nodeRect.y;
+      nodeHeight = nodeRect.height;
+
+      let alwaysShowDecorationTab = true;
+
+      if (node.childNodes.length > 1 || alwaysShowDecorationTab) {
+        nodeY = nodeRect.y + params.stackedHeight;
+        nodeHeight = nodeRect.height - params.stackedHeight;
+        if (node.decoration && child.isWindow()) {
+          let gap = this.extWm.calculateGaps(node);
+          let renderRect = this.processGap(node);
+          let borderWidth = child.actor.border.get_theme_node().get_border_width(St.Side.TOP);
+
+          // Make adjustments to the gaps
+          let adjust = 4 * Utils.dpi();
+          let adjustWidth = renderRect.width + (borderWidth * 2 + gap) / adjust;
+          let adjustX = renderRect.x - (gap + borderWidth * 2) / (adjust * 2);
+          let adjustY = renderRect.y - adjust;
+
+          if (gap === 0) {
+            adjustY = renderRect.y;
+            nodeY = renderRect.y + params.stackedHeight + adjust / 4;
+          }
+
+          let decoration = node.decoration;
+
+          if (decoration !== null && decoration !== undefined) {
+            decoration.set_size(adjustWidth, params.stackedHeight);
+            decoration.set_position(adjustX, adjustY);
+            if (params.tiledChildren.length > 0 && params.stackedHeight !== 0) {
+              decoration.show();
+            } else {
+              decoration.hide();
+            }
+            if (!decoration.contains(child.tab)) decoration.add(child.tab);
+          }
+
+          child.render();
+        }
+      }
+
+      child.rect = {
+        x: nodeX,
+        y: nodeY,
+        width: nodeWidth,
+        height: nodeHeight,
+      };
+    }
+  }
+
+  computeSizes(node, childItems) {
+    let sizes = [];
+    let orientation = Utils.orientationFromLayout(node.layout);
+    let totalSize =
+      orientation === ORIENTATION_TYPES.HORIZONTAL ? node.rect.width : node.rect.height;
+    let grabTiled = node.getNodeByMode(Window.WINDOW_MODES.GRAB_TILE).length > 0;
+    childItems.forEach((childNode, index) => {
+      let percent =
+        childNode.percent && childNode.percent > 0.0 && !grabTiled
+          ? childNode.percent
+          : 1.0 / childItems.length;
+      sizes[index] = Math.floor(percent * totalSize);
+    });
+    // TODO - make sure the totalSize = the sizes total
+    return sizes;
+  }
+
+  findFirstNodeWindowFrom(node) {
+    let results = node.getNodeByType(NODE_TYPES.WINDOW);
+    if (results.length > 0) {
+      return results[0];
+    }
+    return null;
+  }
+
+  resetSiblingPercent(parentNode) {
+    if (!parentNode) return;
+    let children = parentNode.childNodes;
+    children.forEach((n) => {
+      n.percent = 0.0;
+    });
+  }
+
+  debugTree() {
+    this.debugNode(this);
+  }
+
+  debugNode(node) {
+    let spacing = "";
+    let dashes = "-->";
+    let level = node.level;
+    for (let i = 0; i < level; i++) {
+      let parentSpacing = i === 0 ? " " : "|";
+      spacing += `${parentSpacing}   `;
+    }
+    let rootSpacing = level === 0 ? "#" : "*";
+
+    let attributes = "";
+
+    if (node.isWindow()) {
+      let metaWindow = node.nodeValue;
+      attributes += `class:'${metaWindow.get_wm_class()}',title:'${
+        metaWindow.title
+      }',string:'${metaWindow}'${metaWindow === this.extWm.focusMetaWindow ? " FOCUS" : ""}`;
+    } else if (node.isCon() || node.isMonitor() || node.isWorkspace()) {
+      attributes += `${node.nodeValue}`;
+      if (node.isCon() || node.isMonitor()) {
+        attributes += `,layout:${node.layout}`;
+      }
+    }
+
+    if (node.rect) {
+      attributes += `,rect:${node.rect.width}x${node.rect.height}+${node.rect.x}+${node.rect.y}`;
+    }
+
+    if (level !== 0) Logger.debug(`${spacing}|`);
+    Logger.debug(
+      `${spacing}${rootSpacing}${dashes} ${node.nodeType}#${
+        node.index !== null ? node.index : "-"
+      } @${attributes}`
+    );
+
+    node.childNodes.forEach((child) => {
+      this.debugNode(child);
+    });
+  }
+
+  findParent(childNode, parentNodeType) {
+    let parents = this.getNodeByType(parentNodeType);
+    // Only get the first parent
+    return parents.filter((p) => p.contains(childNode))[0];
+  }
+}

+ 381 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/utils.js

@@ -0,0 +1,381 @@
+/*
+ * This file is part of the Forge extension for GNOME
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Credits:
+ * This file has some code from Dash-To-Panel extension: convenience.js
+ * Some code was also adapted from the upstream Gnome Shell source code.
+ */
+
+// Gnome imports
+import Meta from "gi://Meta";
+import St from "gi://St";
+
+// Gnome-shell imports
+import { PACKAGE_VERSION } from "resource:///org/gnome/shell/misc/config.js";
+
+// App imports
+import { ORIENTATION_TYPES, LAYOUT_TYPES, POSITION } from "./tree.js";
+import { GRAB_TYPES } from "./window.js";
+
+const [major] = PACKAGE_VERSION.split(".").map((s) => Number(s));
+
+/**
+ *
+ * Turns an array into an immutable enum-like object
+ *
+ */
+export function createEnum(anArray) {
+  const enumObj = {};
+  for (const val of anArray) {
+    enumObj[val] = val;
+  }
+  return Object.freeze(enumObj);
+}
+
+export function resolveX(rectRequest, metaWindow) {
+  let metaRect = metaWindow.get_frame_rect();
+  let monitorRect = metaWindow.get_work_area_current_monitor();
+  let val = metaRect.x;
+  let x = rectRequest.x;
+  switch (typeof x) {
+    case "string": //center,
+      switch (x) {
+        case "center":
+          val = monitorRect.width * 0.5 - this.resolveWidth(rectRequest, metaWindow) * 0.5;
+          break;
+        case "left":
+          val = 0;
+          break;
+        case "right":
+          val = monitorRect.width - this.resolveWidth(rectRequest, metaWindow);
+          break;
+        default:
+          break;
+      }
+      break;
+    case "number":
+      val = x;
+      break;
+    default:
+      break;
+  }
+  val = monitorRect.x + val;
+  return val;
+}
+
+export function resolveY(rectRequest, metaWindow) {
+  let metaRect = metaWindow.get_frame_rect();
+  let monitorRect = metaWindow.get_work_area_current_monitor();
+  let val = metaRect.y;
+  let y = rectRequest.y;
+  switch (typeof y) {
+    case "string": //center,
+      switch (y) {
+        case "center":
+          val = monitorRect.height * 0.5 - this.resolveHeight(rectRequest, metaWindow) * 0.5;
+          break;
+        case "top":
+          val = 0;
+          break;
+        case "bottom": // inverse of y=0
+          val = monitorRect.height - this.resolveHeight(rectRequest, metaWindow);
+          break;
+        default:
+          break;
+      }
+      break;
+    case "number":
+      val = y;
+      break;
+    default:
+      break;
+  }
+  val = monitorRect.y + val;
+  return val;
+}
+
+export function resolveWidth(rectRequest, metaWindow) {
+  let metaRect = metaWindow.get_frame_rect();
+  let monitorRect = metaWindow.get_work_area_current_monitor();
+  let val = metaRect.width;
+  let width = rectRequest.width;
+  switch (typeof width) {
+    case "number":
+      if (Number.isInteger(width) && width != 1) {
+        val = width;
+      } else {
+        let monitorWidth = monitorRect.width;
+        val = monitorWidth * width;
+      }
+      break;
+    default:
+      break;
+  }
+  return val;
+}
+
+export function resolveHeight(rectRequest, metaWindow) {
+  let metaRect = metaWindow.get_frame_rect();
+  let monitorRect = metaWindow.get_work_area_current_monitor();
+  let val = metaRect.height;
+  let height = rectRequest.height;
+  switch (typeof height) {
+    case "number":
+      if (Number.isInteger(height) && height != 1) {
+        val = height;
+      } else {
+        let monitorHeight = monitorRect.height;
+        val = monitorHeight * height;
+      }
+      break;
+    default:
+      break;
+  }
+  return val;
+}
+
+export function orientationFromDirection(direction) {
+  return direction === Meta.MotionDirection.LEFT || direction === Meta.MotionDirection.RIGHT
+    ? ORIENTATION_TYPES.HORIZONTAL
+    : ORIENTATION_TYPES.VERTICAL;
+}
+
+export function orientationFromLayout(layout) {
+  switch (layout) {
+    case LAYOUT_TYPES.HSPLIT:
+    case LAYOUT_TYPES.TABBED:
+      return ORIENTATION_TYPES.HORIZONTAL;
+    case LAYOUT_TYPES.VSPLIT:
+    case LAYOUT_TYPES.STACKED:
+      return ORIENTATION_TYPES.VERTICAL;
+    default:
+      break;
+  }
+}
+
+export function positionFromDirection(direction) {
+  return direction === Meta.MotionDirection.LEFT || direction === Meta.MotionDirection.UP
+    ? POSITION.BEFORE
+    : POSITION.AFTER;
+}
+
+export function resolveDirection(directionString) {
+  if (directionString) {
+    directionString = directionString.toUpperCase();
+
+    if (directionString === "LEFT") {
+      return Meta.MotionDirection.LEFT;
+    }
+
+    if (directionString === "RIGHT") {
+      return Meta.MotionDirection.RIGHT;
+    }
+
+    if (directionString === "UP") {
+      return Meta.MotionDirection.UP;
+    }
+
+    if (directionString === "DOWN") {
+      return Meta.MotionDirection.DOWN;
+    }
+  }
+
+  return null;
+}
+
+export function directionFrom(position, orientation) {
+  if (position === POSITION.AFTER) {
+    if (orientation === ORIENTATION_TYPES.HORIZONTAL) {
+      return Meta.DisplayDirection.RIGHT;
+    } else {
+      return Meta.DisplayDirection.DOWN;
+    }
+  } else if (position === POSITION.BEFORE) {
+    if (orientation === ORIENTATION_TYPES.HORIZONTAL) {
+      return Meta.DisplayDirection.LEFT;
+    } else {
+      return Meta.DisplayDirection.UP;
+    }
+  }
+}
+
+export function rectContainsPoint(rect, pointP) {
+  if (!(rect && pointP)) return false;
+  return (
+    rect.x <= pointP[0] &&
+    pointP[0] <= rect.x + rect.width &&
+    rect.y <= pointP[1] &&
+    pointP[1] <= rect.y + rect.height
+  );
+}
+
+export function orientationFromGrab(grabOp) {
+  if (
+    grabOp === Meta.GrabOp.RESIZING_N ||
+    grabOp === Meta.GrabOp.RESIZING_S ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_N ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_S
+  ) {
+    return ORIENTATION_TYPES.VERTICAL;
+  } else if (
+    grabOp === Meta.GrabOp.RESIZING_E ||
+    grabOp === Meta.GrabOp.RESIZING_W ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_E ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_W
+  ) {
+    return ORIENTATION_TYPES.HORIZONTAL;
+  }
+  return ORIENTATION_TYPES.NONE;
+}
+
+export function positionFromGrabOp(grabOp) {
+  if (
+    grabOp === Meta.GrabOp.RESIZING_W ||
+    grabOp === Meta.GrabOp.RESIZING_N ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_W ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_N
+  ) {
+    return POSITION.BEFORE;
+  } else if (
+    grabOp === Meta.GrabOp.RESIZING_E ||
+    grabOp === Meta.GrabOp.RESIZING_S ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_E ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_S
+  ) {
+    return POSITION.AFTER;
+  }
+  return POSITION.UNKNOWN;
+}
+
+export function allowResizeGrabOp(grabOp) {
+  return (
+    grabOp === Meta.GrabOp.RESIZING_N ||
+    grabOp === Meta.GrabOp.RESIZING_E ||
+    grabOp === Meta.GrabOp.RESIZING_W ||
+    grabOp === Meta.GrabOp.RESIZING_S ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_N ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_E ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_W ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_S ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_UNKNOWN
+  );
+}
+
+export function grabMode(grabOp) {
+  if (
+    grabOp === Meta.GrabOp.RESIZING_N ||
+    grabOp === Meta.GrabOp.RESIZING_E ||
+    grabOp === Meta.GrabOp.RESIZING_W ||
+    grabOp === Meta.GrabOp.RESIZING_S ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_N ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_E ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_W ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_S ||
+    grabOp === Meta.GrabOp.KEYBOARD_RESIZING_UNKNOWN
+  ) {
+    return GRAB_TYPES.RESIZING;
+  } else if (
+    grabOp === Meta.GrabOp.KEYBOARD_MOVING ||
+    grabOp === Meta.GrabOp.MOVING ||
+    grabOp === Meta.GrabOp.MOVING_UNCONSTRAINED
+  ) {
+    return GRAB_TYPES.MOVING;
+  }
+  return GRAB_TYPES.UNKNOWN;
+}
+
+export function directionFromGrab(grabOp) {
+  if (grabOp === Meta.GrabOp.RESIZING_E || grabOp === Meta.GrabOp.KEYBOARD_RESIZING_E) {
+    return Meta.MotionDirection.RIGHT;
+  } else if (grabOp === Meta.GrabOp.RESIZING_W || grabOp === Meta.GrabOp.KEYBOARD_RESIZING_W) {
+    return Meta.MotionDirection.LEFT;
+  } else if (grabOp === Meta.GrabOp.RESIZING_N || grabOp === Meta.GrabOp.KEYBOARD_RESIZING_N) {
+    return Meta.MotionDirection.UP;
+  } else if (grabOp === Meta.GrabOp.RESIZING_S || grabOp === Meta.GrabOp.KEYBOARD_RESIZING_S) {
+    return Meta.MotionDirection.DOWN;
+  }
+}
+
+export function removeGapOnRect(rectWithGap, gap) {
+  rectWithGap.x = rectWithGap.x -= gap;
+  rectWithGap.y = rectWithGap.y -= gap;
+  rectWithGap.width = rectWithGap.width += gap * 2;
+  rectWithGap.height = rectWithGap.height += gap * 2;
+  return rectWithGap;
+}
+
+// Credits: PopShell
+export function findWindowWith(title) {
+  let display = global.display;
+  let type = Meta.TabList.NORMAL_ALL;
+  let workspaceMgr = display.get_workspace_manager();
+  let workspaces = workspaceMgr.get_n_workspaces();
+
+  for (let wsId = 1; wsId <= workspaces; wsId++) {
+    let workspace = workspaceMgr.get_workspace_by_index(wsId);
+    for (const metaWindow of display.get_tab_list(type, workspace)) {
+      if (
+        metaWindow.title &&
+        title &&
+        (metaWindow.title === title || metaWindow.title.includes(title))
+      ) {
+        return metaWindow;
+      }
+    }
+  }
+
+  return undefined;
+}
+
+export function oppositeDirectionOf(direction) {
+  if (direction === Meta.MotionDirection.LEFT) {
+    return Meta.MotionDirection.RIGHT;
+  } else if (direction === Meta.MotionDirection.RIGHT) {
+    return Meta.MotionDirection.LEFT;
+  } else if (direction === Meta.MotionDirection.UP) {
+    return Meta.MotionDirection.DOWN;
+  } else if (direction === Meta.MotionDirection.DOWN) {
+    return Meta.MotionDirection.UP;
+  }
+}
+
+export function monitorIndex(monitorValue) {
+  if (!monitorValue) return -1;
+  let wsIndex = monitorValue.indexOf("ws");
+  let indexVal = monitorValue.slice(0, wsIndex);
+  indexVal = indexVal.replace("mo", "");
+  return parseInt(indexVal);
+}
+
+export function _disableDecorations() {
+  let decos = global.window_group.get_children().filter((a) => a.type != null);
+  decos.forEach((d) => {
+    global.window_group.remove_child(d);
+    d.destroy();
+  });
+}
+
+export function dpi() {
+  return St.ThemeContext.get_for_stage(global.stage).scale_factor;
+}
+
+export function isGnome(majorVersion) {
+  return major == majorVersion;
+}
+
+export function isGnomeGTE(majorVersion) {
+  return major >= majorVersion;
+}

+ 2546 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/window.js

@@ -0,0 +1,2546 @@
+/*
+ * This file is part of the Forge extension for GNOME
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Gnome imports
+import GLib from "gi://GLib";
+import Clutter from "gi://Clutter";
+import GObject from "gi://GObject";
+import Meta from "gi://Meta";
+import St from "gi://St";
+
+// Gnome Shell imports
+import { gettext as _ } from "resource:///org/gnome/shell/extensions/extension.js";
+import * as Main from "resource:///org/gnome/shell/ui/main.js";
+import { PACKAGE_VERSION } from "resource:///org/gnome/shell/misc/config.js";
+
+// Shared state
+import { Logger } from "../shared/logger.js";
+
+// App imports
+import * as Utils from "./utils.js";
+import { Keybindings } from "./keybindings.js";
+import {
+  Tree,
+  Queue,
+  Node,
+  POSITION,
+  LAYOUT_TYPES,
+  ORIENTATION_TYPES,
+  NODE_TYPES,
+} from "./tree.js";
+import { production } from "../shared/settings.js";
+
+/** @typedef {import('../../extension.js').default} ForgeExtension */
+
+export const WINDOW_MODES = Utils.createEnum(["FLOAT", "TILE", "GRAB_TILE", "DEFAULT"]);
+
+// Simplify the grab modes
+export const GRAB_TYPES = Utils.createEnum(["RESIZING", "MOVING", "UNKNOWN"]);
+
+export class WindowManager extends GObject.Object {
+  static {
+    GObject.registerClass(this);
+  }
+
+  /** @type {ForgeExtension} */
+  ext;
+
+  /** @param {ForgeExtension} ext */
+  constructor(ext) {
+    super();
+    this.ext = ext;
+    this.prefsTitle = `Forge ${_("Settings")} - ${
+      !production ? "DEV" : `${PACKAGE_VERSION}-${ext.metadata.version}`
+    }`;
+    this.windowProps = this.ext.configMgr.windowProps;
+    this._kbd = this.ext.keybindings;
+    this._tree = new Tree(this);
+    this.eventQueue = new Queue();
+    this.theme = this.ext.theme;
+    Logger.info("forge initialized");
+  }
+
+  addFloatOverride(metaWindow, byClass = true) {
+    let overrides = this.windowProps.overrides;
+    let wmTitle = metaWindow.get_title();
+    let wmClass = metaWindow.get_wm_class();
+
+    for (let override in overrides) {
+      if (!byClass) {
+        if (override.wmClass === wmClass && override.wmTitle === wmTitle) return;
+      } else {
+        if (override.wmClass === wmClass && !override.wmTitle) return;
+      }
+    }
+    overrides.push({
+      wmClass: wmClass,
+      wmTitle: !byClass ? wmTitle : undefined,
+      mode: "float",
+    });
+    this.windowProps.overrides = overrides;
+    this.ext.configMgr.windowProps = this.windowProps;
+  }
+
+  removeFloatOverride(metaWindow, byClass = true) {
+    let overrides = this.windowProps.overrides;
+    let wmTitle = metaWindow.get_title();
+    let wmClass = metaWindow.get_wm_class();
+
+    if (byClass) {
+      // remove purely wmClass - by checking also if override title exists
+      overrides = overrides.filter(
+        (override) => !(override.wmClass === wmClass) && !override.wmTitle
+      );
+    } else {
+      overrides = overrides.filter(
+        (override) => !(override.wmClass === wmClass && override.wmTitle === wmTitle)
+      );
+    }
+
+    this.windowProps.overrides = overrides;
+    this.ext.configMgr.windowProps = this.windowProps;
+  }
+
+  toggleFloatingMode(action, metaWindow) {
+    let nodeWindow = this.findNodeWindow(metaWindow);
+    if (!nodeWindow || !(action || action.mode)) return;
+    if (nodeWindow.nodeType !== NODE_TYPES.WINDOW) return;
+
+    let floatToggle = action.name === "FloatToggle";
+    let floatClassToggle = action.name === "FloatClassToggle";
+    let floatingExempt = this.isFloatingExempt(metaWindow);
+
+    if (floatingExempt) {
+      if (floatClassToggle) {
+        this.removeFloatOverride(metaWindow);
+      } else if (floatToggle) {
+        this.removeFloatOverride(metaWindow, false);
+      }
+      nodeWindow.mode = WINDOW_MODES.TILE;
+      if (!this.isActiveWindowWorkspaceTiled(metaWindow)) {
+        nodeWindow.mode = WINDOW_MODES.FLOAT;
+      }
+    } else {
+      if (floatClassToggle) {
+        this.addFloatOverride(metaWindow);
+      } else if (floatToggle) {
+        this.addFloatOverride(metaWindow, false);
+      }
+      nodeWindow.mode = WINDOW_MODES.FLOAT;
+    }
+  }
+
+  queueEvent(eventObj, interval = 220) {
+    this.eventQueue.enqueue(eventObj);
+
+    if (!this._queueSourceId) {
+      this._queueSourceId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, interval, () => {
+        const currEventObj = this.eventQueue.dequeue();
+        if (currEventObj) {
+          currEventObj.callback();
+        }
+        const result = this.eventQueue.length !== 0;
+        if (!result) {
+          this._queueSourceId = 0;
+        }
+        return result;
+      });
+    }
+  }
+
+  /**
+   * This is the central place to bind all the non-window signals.
+   */
+  _bindSignals() {
+    if (this._signalsBound) return;
+
+    const display = global.display;
+    const shellWm = global.window_manager;
+
+    this._displaySignals = [
+      display.connect("window-created", this.trackWindow.bind(this)),
+      display.connect("grab-op-begin", this._handleGrabOpBegin.bind(this)),
+      display.connect("window-entered-monitor", (_, monitor, metaWindow) => {
+        this.updateMetaWorkspaceMonitor("window-entered-monitor", monitor, metaWindow);
+        this.trackCurrentMonWs();
+      }),
+      display.connect("grab-op-end", this._handleGrabOpEnd.bind(this)),
+      display.connect("showing-desktop-changed", () => {
+        this.hideWindowBorders();
+        this.updateDecorationLayout();
+      }),
+      display.connect("in-fullscreen-changed", () => {
+        this.renderTree("full-screen-changed");
+      }),
+      display.connect("workareas-changed", (_display) => {
+        if (global.display.get_n_monitors() == 0) {
+          Logger.debug(`workareas-changed: no monitors, ignoring signal`);
+          return;
+        }
+        if (this.tree.getNodeByType("WINDOW").length > 0) {
+          let workspaceReload = this.workspaceAdded || this.workspaceRemoved;
+          if (workspaceReload) {
+            this.trackCurrentWindows();
+            this.workspaceRemoved = false;
+            this.workspaceAdded = false;
+          } else {
+            this.renderTree("workareas-changed");
+          }
+        }
+      }),
+    ];
+
+    this._windowManagerSignals = [
+      shellWm.connect("minimize", () => {
+        this.hideWindowBorders();
+        let focusNodeWindow = this.tree.findNode(this.focusMetaWindow);
+        if (focusNodeWindow) {
+          if (this.tree.getTiledChildren(focusNodeWindow.parentNode.childNodes).length === 0) {
+            this.tree.resetSiblingPercent(focusNodeWindow.parentNode.parentNode);
+          }
+          this.tree.resetSiblingPercent(focusNodeWindow.parentNode);
+        }
+
+        let prevFrozen = this._freezeRender;
+        if (prevFrozen) this.unfreezeRender();
+        this.renderTree("minimize");
+        if (prevFrozen) this.freezeRender();
+      }),
+      shellWm.connect("unminimize", () => {
+        let focusNodeWindow = this.tree.findNode(this.focusMetaWindow);
+        if (focusNodeWindow) {
+          this.tree.resetSiblingPercent(focusNodeWindow.parentNode);
+        }
+
+        let prevFrozen = this._freezeRender;
+        if (prevFrozen) this.unfreezeRender();
+        this.renderTree("unminimize");
+        if (prevFrozen) this.freezeRender();
+      }),
+      shellWm.connect("show-tile-preview", (_, _metaWindow, _rect, _num) => {
+        // Empty
+      }),
+    ];
+
+    const globalWsm = global.workspace_manager;
+
+    this._workspaceManagerSignals = [
+      globalWsm.connect("showing-desktop-changed", () => {
+        this.hideWindowBorders();
+        this.updateDecorationLayout();
+      }),
+      globalWsm.connect("workspace-added", (_, wsIndex) => {
+        this.tree.addWorkspace(wsIndex);
+        this.trackCurrentMonWs();
+        this.workspaceAdded = true;
+        this.renderTree("workspace-added");
+      }),
+      globalWsm.connect("workspace-removed", (_, wsIndex) => {
+        this.tree.removeWorkspace(wsIndex);
+        this.trackCurrentMonWs();
+        this.workspaceRemoved = true;
+        this.updateDecorationLayout();
+        this.renderTree("workspace-removed");
+      }),
+      globalWsm.connect("active-workspace-changed", () => {
+        this.hideWindowBorders();
+        this.trackCurrentMonWs();
+        this.updateDecorationLayout();
+        this.renderTree("active-workspace-changed");
+      }),
+    ];
+
+    let numberOfWorkspaces = globalWsm.get_n_workspaces();
+
+    for (let i = 0; i < numberOfWorkspaces; i++) {
+      let workspace = globalWsm.get_workspace_by_index(i);
+      this.bindWorkspaceSignals(workspace);
+    }
+
+    let settings = this.ext.settings;
+
+    settings.connect("changed", (_, settingName) => {
+      switch (settingName) {
+        case "focus-border-toggle":
+          this.renderTree(settingName);
+          break;
+        case "tiling-mode-enabled":
+          this.renderTree(settingName);
+          break;
+        case "window-gap-size-increment":
+        case "window-gap-size":
+        case "window-gap-hidden-on-single":
+        case "workspace-skip-tile":
+          this.renderTree(settingName, true);
+          break;
+        case "stacked-tiling-mode-enabled":
+          if (!settings.get_boolean(settingName)) {
+            let stackedNodes = this.tree.getNodeByLayout(LAYOUT_TYPES.STACKED);
+            stackedNodes.forEach((node) => {
+              node.prevLayout = node.layout;
+              node.layout = this.determineSplitLayout();
+            });
+          } else {
+            let hSplitNodes = this.tree.getNodeByLayout(LAYOUT_TYPES.HSPLIT);
+            let vSplitNodes = this.tree.getNodeByLayout(LAYOUT_TYPES.VSPLIT);
+            Array.prototype.push.apply(hSplitNodes, vSplitNodes);
+            hSplitNodes.forEach((node) => {
+              if (node.prevLayout && node.prevLayout === LAYOUT_TYPES.STACKED) {
+                node.layout = LAYOUT_TYPES.STACKED;
+              }
+            });
+          }
+          this.renderTree(settingName);
+          break;
+        case "tabbed-tiling-mode-enabled":
+          if (!settings.get_boolean(settingName)) {
+            let tabbedNodes = this.tree.getNodeByLayout(LAYOUT_TYPES.TABBED);
+            tabbedNodes.forEach((node) => {
+              node.prevLayout = node.layout;
+              node.layout = this.determineSplitLayout();
+            });
+          } else {
+            let hSplitNodes = this.tree.getNodeByLayout(LAYOUT_TYPES.HSPLIT);
+            let vSplitNodes = this.tree.getNodeByLayout(LAYOUT_TYPES.VSPLIT);
+            Array.prototype.push.apply(hSplitNodes, vSplitNodes);
+            hSplitNodes.forEach((node) => {
+              if (node.prevLayout && node.prevLayout === LAYOUT_TYPES.TABBED) {
+                node.layout = LAYOUT_TYPES.TABBED;
+              }
+            });
+          }
+          this.renderTree(settingName);
+          break;
+        case "css-updated":
+          this.theme.reloadStylesheet();
+          break;
+        case "float-always-on-top-enabled":
+          if (!settings.get_boolean(settingName)) {
+            this.cleanupAlwaysFloat();
+          } else {
+            this.restoreAlwaysFloat();
+          }
+          break;
+        default:
+          break;
+      }
+    });
+
+    this._overviewSignals = [
+      Main.overview.connect("hiding", () => {
+        this.fromOverview = true;
+        const eventObj = {
+          name: "focus-after-overview",
+          callback: () => {
+            const focusNodeWindow = this.tree.findNode(this.focusMetaWindow);
+            this.updateStackedFocus(focusNodeWindow);
+            this.updateTabbedFocus(focusNodeWindow);
+          },
+        };
+        this.queueEvent(eventObj);
+      }),
+      Main.overview.connect("showing", () => {
+        this.toOverview = true;
+      }),
+    ];
+
+    this._signalsBound = true;
+  }
+
+  cleanupAlwaysFloat() {
+    // remove the setting for each node window
+    this.allNodeWindows.forEach((w) => {
+      if (w.mode === WINDOW_MODES.FLOAT) {
+        w.nodeValue.is_above() && w.nodeValue.unmake_above();
+      }
+    });
+  }
+
+  restoreAlwaysFloat() {
+    this.allNodeWindows.forEach((w) => {
+      if (w.mode === WINDOW_MODES.FLOAT) {
+        !w.nodeValue.is_above() && w.nodeValue.make_above();
+      }
+    });
+  }
+
+  trackCurrentMonWs() {
+    let metaWindow = this.focusMetaWindow;
+    if (!metaWindow) return;
+    const currentMonitor = global.display.get_current_monitor();
+    const currentWorkspace = global.display.get_workspace_manager().get_active_workspace_index();
+
+    let currentMonWs = `mo${currentMonitor}ws${currentWorkspace}`;
+    let activeMetaMonWs = `mo${metaWindow.get_monitor()}ws${metaWindow.get_workspace().index()}`;
+    let currentWsNode = this.tree.findNode(`ws${currentWorkspace}`);
+
+    if (!currentWsNode) {
+      return;
+    }
+
+    // Search for all the valid windows on the workspace
+    const monWindows = currentWsNode.getNodeByType(NODE_TYPES.WORKSPACE).flatMap((ws) => {
+      return ws
+        .getNodeByType(NODE_TYPES.WINDOW)
+        .filter(
+          (w) =>
+            !w.nodeValue.minimized &&
+            w.isTile() &&
+            w.nodeValue !== metaWindow &&
+            // The searched window should be on the same monitor workspace
+            // This ensures that Forge already updated the workspace node tree:
+            currentMonWs === activeMetaMonWs
+        )
+        .map((w) => w.nodeValue);
+    });
+
+    this.sortedWindows = global.display.sort_windows_by_stacking(monWindows).reverse();
+  }
+
+  // TODO move this to workspace.js
+  bindWorkspaceSignals(metaWorkspace) {
+    if (metaWorkspace) {
+      if (!metaWorkspace.workspaceSignals) {
+        let workspaceSignals = [
+          metaWorkspace.connect("window-added", (_, metaWindow) => {
+            if (!this._wsWindowAddSrcId) {
+              this._wsWindowAddSrcId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 200, () => {
+                this.updateMetaWorkspaceMonitor(
+                  "window-added",
+                  metaWindow.get_monitor(),
+                  metaWindow
+                );
+                this._wsWindowAddSrcId = 0;
+                return false;
+              });
+            }
+          }),
+        ];
+        metaWorkspace.workspaceSignals = workspaceSignals;
+      }
+    }
+  }
+
+  // TODO move this in command.js
+  command(action) {
+    let focusWindow = this.focusMetaWindow;
+    // Do not check if the node window is null, some of the commands do not need the focus window
+    let focusNodeWindow = this.findNodeWindow(focusWindow);
+    let currentLayout;
+
+    switch (action.name) {
+      case "FloatToggle":
+      case "FloatClassToggle":
+        this.toggleFloatingMode(action, focusWindow);
+
+        const rectRequest = {
+          x: action.x,
+          y: action.y,
+          width: action.width,
+          height: action.height,
+        };
+
+        let moveRect = {
+          x: Utils.resolveX(rectRequest, focusWindow),
+          y: Utils.resolveY(rectRequest, focusWindow),
+          width: Utils.resolveWidth(rectRequest, focusWindow),
+          height: Utils.resolveHeight(rectRequest, focusWindow),
+        };
+
+        this.move(focusWindow, moveRect);
+
+        let existParent = focusNodeWindow.parentNode;
+
+        if (this.tree.getTiledChildren(existParent.childNodes).length <= 1) {
+          existParent.percent = 0.0;
+          this.tree.resetSiblingPercent(existParent.parentNode);
+        }
+
+        this.tree.resetSiblingPercent(existParent);
+        this.renderTree("float-toggle", true);
+        break;
+      case "Move":
+        this.unfreezeRender();
+        let moveDirection = Utils.resolveDirection(action.direction);
+        let prev = focusNodeWindow;
+        let moved = this.tree.move(focusNodeWindow, moveDirection);
+        if (!focusNodeWindow) {
+          focusNodeWindow = this.findNodeWindow(this.focusMetaWindow);
+        }
+        this.queueEvent({
+          name: "move",
+          callback: () => {
+            if (this.eventQueue.length <= 0) {
+              this.unfreezeRender();
+              if (focusNodeWindow.parentNode.layout === LAYOUT_TYPES.STACKED) {
+                focusNodeWindow.parentNode.appendChild(focusNodeWindow);
+                focusNodeWindow.nodeValue.raise();
+                focusNodeWindow.nodeValue.activate(global.display.get_current_time());
+                this.renderTree("move-stacked-queue");
+              }
+              if (focusNodeWindow.parentNode.layout === LAYOUT_TYPES.TABBED) {
+                focusNodeWindow.nodeValue.raise();
+                focusNodeWindow.nodeValue.activate(global.display.get_current_time());
+                if (prev) prev.parentNode.lastTabFocus = prev.nodeValue;
+                this.renderTree("move-tabbed-queue");
+              }
+            }
+          },
+        });
+        if (moved) {
+          if (prev) prev.parentNode.lastTabFocus = prev.nodeValue;
+          this.renderTree("move-window");
+        }
+
+        break;
+      case "Focus":
+        let focusDirection = Utils.resolveDirection(action.direction);
+        focusNodeWindow = this.tree.focus(focusNodeWindow, focusDirection);
+        if (!focusNodeWindow) {
+          focusNodeWindow = this.findNodeWindow(this.focusMetaWindow);
+        }
+        break;
+      case "Swap":
+        if (!focusNodeWindow) return;
+        this.unfreezeRender();
+        let swapDirection = Utils.resolveDirection(action.direction);
+        this.tree.swap(focusNodeWindow, swapDirection);
+        focusNodeWindow.nodeValue.raise();
+        this.updateTabbedFocus(focusNodeWindow);
+        this.updateStackedFocus(focusNodeWindow);
+        this.renderTree("swap", true);
+        break;
+      case "Split":
+        if (!focusNodeWindow) return;
+        currentLayout = focusNodeWindow.parentNode.layout;
+        if (currentLayout === LAYOUT_TYPES.STACKED || currentLayout === LAYOUT_TYPES.TABBED) {
+          return;
+        }
+        let orientation = action.orientation
+          ? action.orientation.toUpperCase()
+          : ORIENTATION_TYPES.NONE;
+        this.tree.split(focusNodeWindow, orientation);
+        this.renderTree("split");
+        break;
+      case "LayoutToggle":
+        if (!focusNodeWindow) return;
+        currentLayout = focusNodeWindow.parentNode.layout;
+        if (currentLayout === LAYOUT_TYPES.HSPLIT) {
+          focusNodeWindow.parentNode.layout = LAYOUT_TYPES.VSPLIT;
+        } else if (currentLayout === LAYOUT_TYPES.VSPLIT) {
+          focusNodeWindow.parentNode.layout = LAYOUT_TYPES.HSPLIT;
+        }
+        this.tree.attachNode = focusNodeWindow.parentNode;
+        this.renderTree("layout-split-toggle");
+        break;
+      case "FocusBorderToggle":
+        let focusBorderEnabled = this.ext.settings.get_boolean("focus-border-toggle");
+        this.ext.settings.set_boolean("focus-border-toggle", !focusBorderEnabled);
+        break;
+      case "TilingModeToggle":
+        // FIXME, not sure if this toggle is still needed from a use case
+        // perspective, since Extension.disable also should do the same thing.
+        let tilingModeEnabled = this.ext.settings.get_boolean("tiling-mode-enabled");
+        this.ext.settings.set_boolean("tiling-mode-enabled", !tilingModeEnabled);
+        if (tilingModeEnabled) {
+          this.floatAllWindows();
+        } else {
+          this.unfloatAllWindows();
+        }
+        this.renderTree(`tiling-mode-toggle ${!tilingModeEnabled}`);
+        break;
+      case "GapSize":
+        let gapIncrement = this.ext.settings.get_uint("window-gap-size-increment");
+        let amount = action.amount;
+        gapIncrement = gapIncrement + amount;
+        if (gapIncrement < 0) gapIncrement = 0;
+        if (gapIncrement > 8) gapIncrement = 8;
+        this.ext.settings.set_uint("window-gap-size-increment", gapIncrement);
+        break;
+      case "WorkspaceActiveTileToggle":
+        let activeWorkspace = global.workspace_manager.get_active_workspace_index();
+        let skippedWorkspaces = this.ext.settings.get_string("workspace-skip-tile");
+        let workspaceSkipped = false;
+        let skippedArr = [];
+        if (skippedWorkspaces.length === 0) {
+          skippedArr.push(`${activeWorkspace}`);
+          this.floatWorkspace(activeWorkspace);
+        } else {
+          skippedArr = skippedWorkspaces.split(",");
+
+          for (let i = 0; i < skippedArr.length; i++) {
+            if (`${skippedArr[i]}` === `${activeWorkspace}`) {
+              workspaceSkipped = true;
+              break;
+            }
+          }
+
+          if (workspaceSkipped) {
+            // tile this workspace
+            let indexWs = skippedArr.indexOf(`${activeWorkspace}`);
+            skippedArr.splice(indexWs, 1);
+            this.unfloatWorkspace(activeWorkspace);
+          } else {
+            // skip tiling workspace
+            skippedArr.push(`${activeWorkspace}`);
+            this.floatWorkspace(activeWorkspace);
+          }
+        }
+        this.ext.settings.set_string("workspace-skip-tile", skippedArr.toString());
+        this.renderTree("workspace-toggle");
+        break;
+      case "LayoutStackedToggle":
+        if (!focusNodeWindow) return;
+        if (!this.ext.settings.get_boolean("stacked-tiling-mode-enabled")) return;
+
+        if (focusNodeWindow.parentNode.isMonitor()) {
+          this.tree.split(focusNodeWindow, ORIENTATION_TYPES.HORIZONTAL, true);
+        }
+
+        currentLayout = focusNodeWindow.parentNode.layout;
+
+        if (currentLayout === LAYOUT_TYPES.STACKED) {
+          focusNodeWindow.parentNode.layout = this.determineSplitLayout();
+          this.tree.resetSiblingPercent(focusNodeWindow.parentNode);
+        } else {
+          if (currentLayout === LAYOUT_TYPES.TABBED) {
+            focusNodeWindow.parentNode.lastTabFocus = null;
+          }
+          focusNodeWindow.parentNode.layout = LAYOUT_TYPES.STACKED;
+          let lastChild = focusNodeWindow.parentNode.lastChild;
+          if (lastChild.nodeType === NODE_TYPES.WINDOW) {
+            lastChild.nodeValue.activate(global.display.get_current_time());
+          }
+        }
+        this.unfreezeRender();
+        this.tree.attachNode = focusNodeWindow.parentNode;
+        this.renderTree("layout-stacked-toggle");
+        break;
+      case "LayoutTabbedToggle":
+        if (!focusNodeWindow) return;
+        if (!this.ext.settings.get_boolean("tabbed-tiling-mode-enabled")) return;
+
+        if (focusNodeWindow.parentNode.isMonitor()) {
+          this.tree.split(focusNodeWindow, ORIENTATION_TYPES.HORIZONTAL, true);
+        }
+
+        currentLayout = focusNodeWindow.parentNode.layout;
+
+        if (currentLayout === LAYOUT_TYPES.TABBED) {
+          focusNodeWindow.parentNode.layout = this.determineSplitLayout();
+          this.tree.resetSiblingPercent(focusNodeWindow.parentNode);
+          focusNodeWindow.parentNode.lastTabFocus = null;
+        } else {
+          focusNodeWindow.parentNode.layout = LAYOUT_TYPES.TABBED;
+          focusNodeWindow.parentNode.lastTabFocus = focusNodeWindow.nodeValue;
+        }
+        this.unfreezeRender();
+        this.tree.attachNode = focusNodeWindow.parentNode;
+        this.renderTree("layout-tabbed-toggle");
+        break;
+      case "CancelOperation":
+        if (focusNodeWindow.mode === WINDOW_MODES.GRAB_TILE) {
+          this.cancelGrab = true;
+        }
+        break;
+      case "PrefsOpen":
+        let existWindow = Utils.findWindowWith(this.prefsTitle);
+        if (existWindow && existWindow.get_workspace()) {
+          existWindow
+            .get_workspace()
+            .activate_with_focus(existWindow, global.display.get_current_time());
+          this.moveCenter(existWindow);
+        } else {
+          this.ext.openPreferences();
+        }
+        break;
+      case "WindowSwapLastActive":
+        if (focusNodeWindow) {
+          let lastActiveWindow = global.display.get_tab_next(
+            Meta.TabList.NORMAL,
+            global.display.get_workspace_manager().get_active_workspace(),
+            focusNodeWindow.nodeValue,
+            false
+          );
+          let lastActiveNodeWindow = this.tree.findNode(lastActiveWindow);
+          this.tree.swapPairs(lastActiveNodeWindow, focusNodeWindow);
+          this.renderTree("swap-last-active");
+        }
+        break;
+      case "SnapLayoutMove":
+        if (focusNodeWindow) {
+          let workareaRect = focusNodeWindow.nodeValue.get_work_area_current_monitor();
+          let layoutAmount = action.amount;
+          let layoutDirection = action.direction.toUpperCase();
+          let layout = {};
+          let processGap = false;
+
+          switch (layoutDirection) {
+            case "LEFT":
+              layout.width = layoutAmount * workareaRect.width;
+              layout.height = workareaRect.height;
+              layout.x = workareaRect.x;
+              layout.y = workareaRect.y;
+              processGap = true;
+              break;
+            case "RIGHT":
+              layout.width = layoutAmount * workareaRect.width;
+              layout.height = workareaRect.height;
+              layout.x = workareaRect.x + (workareaRect.width - layout.width);
+              layout.y = workareaRect.y;
+              processGap = true;
+              break;
+            case "CENTER":
+              let metaRect = this.focusMetaWindow.get_frame_rect();
+              layout.x = "center";
+              layout.y = "center";
+              layout = {
+                x: Utils.resolveX(layout, this.focusMetaWindow),
+                y: Utils.resolveY(layout, this.focusMetaWindow),
+                width: metaRect.width,
+                height: metaRect.height,
+              };
+              break;
+            default:
+              break;
+          }
+          focusNodeWindow.rect = layout;
+          if (processGap) {
+            focusNodeWindow.rect = this.tree.processGap(focusNodeWindow);
+          }
+          if (!focusNodeWindow.isFloat()) {
+            this.addFloatOverride(focusNodeWindow.nodeValue, false);
+          }
+          this.move(focusNodeWindow.nodeValue, focusNodeWindow.rect);
+          this.queueEvent({
+            name: "snap-layout-move",
+            callback: () => {
+              this.renderTree("snap-layout-move");
+            },
+          });
+          break;
+        }
+
+      case "ShowTabDecorationToggle":
+        if (!focusNodeWindow) return;
+        if (!this.ext.settings.get_boolean("tabbed-tiling-mode-enabled")) return;
+
+        let showTabs = this.ext.settings.get_boolean("showtab-decoration-enabled");
+        this.ext.settings.set_boolean("showtab-decoration-enabled", !showTabs);
+
+        this.unfreezeRender();
+        this.tree.attachNode = focusNodeWindow.parentNode;
+        this.renderTree("showtab-decoration-enabled");
+        break;
+
+      case "WindowResizeRight":
+        this.resize(Meta.GrabOp.KEYBOARD_RESIZING_E, action.amount);
+        break;
+
+      case "WindowResizeLeft":
+        this.resize(Meta.GrabOp.KEYBOARD_RESIZING_W, action.amount);
+        break;
+
+      case "WindowResizeTop":
+        this.resize(Meta.GrabOp.KEYBOARD_RESIZING_N, action.amount);
+        break;
+
+      case "WindowResizeBottom":
+        this.resize(Meta.GrabOp.KEYBOARD_RESIZING_S, action.amount);
+        break;
+
+      default:
+        break;
+    }
+  }
+
+  resize(grabOp, amount) {
+    let metaWindow = this.focusMetaWindow;
+    let display = global.display;
+
+    this._handleGrabOpBegin(display, metaWindow, grabOp);
+
+    let rect = metaWindow.get_frame_rect();
+    let direction = Utils.directionFromGrab(grabOp);
+
+    switch (direction) {
+      case Meta.MotionDirection.RIGHT:
+        rect.width = rect.width + amount;
+        break;
+      case Meta.MotionDirection.LEFT:
+        rect.width = rect.width + amount;
+        rect.x = rect.x - amount;
+        break;
+      case Meta.MotionDirection.UP:
+        rect.height = rect.height + amount;
+        break;
+      case Meta.MotionDirection.DOWN:
+        rect.height = rect.height + amount;
+        rect.y = rect.y - amount;
+        break;
+    }
+    this.move(metaWindow, rect);
+    this.queueEvent(
+      {
+        name: "manual-resize",
+        callback: () => {
+          if (this.eventQueue.length === 0) {
+            this._handleGrabOpEnd(display, metaWindow, grabOp);
+          }
+        },
+      },
+      50
+    );
+  }
+
+  disable() {
+    Utils._disableDecorations();
+    this._removeSignals();
+    this.disabled = true;
+    Logger.debug(`extension:disable`);
+  }
+
+  enable() {
+    this._bindSignals();
+    this.reloadTree("enable");
+    Logger.debug(`extension:enable`);
+  }
+
+  findNodeWindow(metaWindow) {
+    return this.tree.findNode(metaWindow);
+  }
+
+  get focusMetaWindow() {
+    return global.display.get_focus_window();
+  }
+
+  get tree() {
+    if (!this._tree) {
+      this._tree = new Tree(this);
+    }
+    return this._tree;
+  }
+
+  get kbd() {
+    if (!this._kbd) {
+      this._kbd = new Keybindings(this.ext);
+      this.ext.keybindings = this._kbd;
+    }
+
+    return this._kbd;
+  }
+
+  get windowsActiveWorkspace() {
+    let wsManager = global.workspace_manager;
+    return global.display.get_tab_list(Meta.TabList.NORMAL_ALL, wsManager.get_active_workspace());
+  }
+
+  get windowsAllWorkspaces() {
+    let wsManager = global.workspace_manager;
+    let windowsAll = [];
+
+    for (let i = 0; i < wsManager.get_n_workspaces(); i++) {
+      Array.prototype.push.apply(
+        windowsAll,
+        global.display.get_tab_list(Meta.TabList.NORMAL_ALL, wsManager.get_workspace_by_index(i))
+      );
+    }
+    windowsAll.sort((w1, w2) => {
+      return w1.get_stable_sequence() - w2.get_stable_sequence();
+    });
+    return windowsAll;
+  }
+
+  getWindowsOnWorkspace(workspaceIndex) {
+    const workspaceNode = this.tree.findNode(`ws${workspaceIndex}`);
+    const workspaceWindows = workspaceNode.getNodeByType(NODE_TYPES.WINDOW);
+    return workspaceWindows;
+  }
+
+  determineSplitLayout() {
+    // if the monitor width is less than height, the monitor could be vertical orientation;
+    let monitorRect = global.display.get_monitor_geometry(global.display.get_current_monitor());
+    if (monitorRect.width < monitorRect.height) {
+      return LAYOUT_TYPES.VSPLIT;
+    }
+    return LAYOUT_TYPES.HSPLIT;
+  }
+
+  floatWorkspace(workspaceIndex) {
+    const workspaceWindows = this.getWindowsOnWorkspace(workspaceIndex);
+    if (!workspaceWindows) return;
+    workspaceWindows.forEach((w) => {
+      w.float = true;
+    });
+  }
+
+  unfloatWorkspace(workspaceIndex) {
+    const workspaceWindows = this.getWindowsOnWorkspace(workspaceIndex);
+    if (!workspaceWindows) return;
+    workspaceWindows.forEach((w) => {
+      w.tile = true;
+    });
+  }
+
+  hideWindowBorders() {
+    this.tree.nodeWindows.forEach((nodeWindow) => {
+      let actor = nodeWindow.windowActor;
+      if (actor) {
+        if (actor.border) {
+          actor.border.hide();
+        }
+        if (actor.splitBorder) {
+          actor.splitBorder.hide();
+        }
+      }
+      if (nodeWindow.parentNode.isTabbed()) {
+        if (nodeWindow.tab) {
+          // TODO: review the cleanup of the tab:St.Widget variable
+          try {
+            nodeWindow.tab.remove_style_class_name("window-tabbed-tab-active");
+          } catch (e) {
+            Logger.warn(e);
+          }
+        }
+      }
+    });
+  }
+
+  // Window movement API
+  move(metaWindow, rect) {
+    if (!metaWindow) return;
+    if (metaWindow.grabbed) return;
+    metaWindow.unmaximize(Meta.MaximizeFlags.HORIZONTAL);
+    metaWindow.unmaximize(Meta.MaximizeFlags.VERTICAL);
+    metaWindow.unmaximize(Meta.MaximizeFlags.BOTH);
+
+    let windowActor = metaWindow.get_compositor_private();
+    if (!windowActor) return;
+    windowActor.remove_all_transitions();
+
+    metaWindow.move_frame(true, rect.x, rect.y);
+    metaWindow.move_resize_frame(true, rect.x, rect.y, rect.width, rect.height);
+  }
+
+  moveCenter(metaWindow) {
+    if (!metaWindow) return;
+    let frameRect = metaWindow.get_frame_rect();
+    const rectRequest = {
+      x: "center",
+      y: "center",
+      width: frameRect.width,
+      height: frameRect.height,
+    };
+
+    let moveRect = {
+      x: Utils.resolveX(rectRequest, metaWindow),
+      y: Utils.resolveY(rectRequest, metaWindow),
+      width: Utils.resolveWidth(rectRequest, metaWindow),
+      height: Utils.resolveHeight(rectRequest, metaWindow),
+    };
+    this.move(metaWindow, moveRect);
+  }
+
+  rectForMonitor(node, targetMonitor) {
+    if (!node || (node && node.nodeType !== NODE_TYPES.WINDOW)) return null;
+    if (targetMonitor < 0) return null;
+    let currentWorkArea = node.nodeValue.get_work_area_current_monitor();
+    let nextWorkArea = node.nodeValue.get_work_area_for_monitor(targetMonitor);
+
+    if (currentWorkArea && nextWorkArea) {
+      let rect = node.rect;
+      if (!rect && node.mode === WINDOW_MODES.FLOAT) {
+        rect = node.nodeValue.get_frame_rect();
+      }
+      let hRatio = 1;
+      let wRatio = 1;
+
+      hRatio = nextWorkArea.height / currentWorkArea.height;
+      wRatio = nextWorkArea.width / currentWorkArea.width;
+      rect.height *= hRatio;
+      rect.width *= wRatio;
+
+      if (nextWorkArea.y < currentWorkArea.y) {
+        rect.y =
+          ((nextWorkArea.y + rect.y - currentWorkArea.y) / currentWorkArea.height) *
+          nextWorkArea.height;
+      } else if (nextWorkArea.y > currentWorkArea.y) {
+        rect.y = (rect.y / currentWorkArea.height) * nextWorkArea.height + nextWorkArea.y;
+      }
+
+      if (nextWorkArea.x < currentWorkArea.x) {
+        rect.x =
+          ((nextWorkArea.x + rect.x - currentWorkArea.x) / currentWorkArea.width) *
+          nextWorkArea.width;
+      } else if (nextWorkArea.x > currentWorkArea.x) {
+        rect.x = (rect.x / currentWorkArea.width) * nextWorkArea.width + nextWorkArea.x;
+      }
+      return rect;
+    }
+    return null;
+  }
+
+  _removeSignals() {
+    if (!this._signalsBound) return;
+
+    if (this._displaySignals) {
+      for (const displaySignal of this._displaySignals) {
+        global.display.disconnect(displaySignal);
+      }
+      this._displaySignals.length = 0;
+      this._displaySignals = undefined;
+    }
+
+    if (this._windowManagerSignals) {
+      for (const windowManagerSignal of this._windowManagerSignals) {
+        global.window_manager.disconnect(windowManagerSignal);
+      }
+      this._windowManagerSignals.length = 0;
+      this._windowManagerSignals = undefined;
+    }
+
+    const globalWsm = global.workspace_manager;
+
+    if (this._workspaceManagerSignals) {
+      for (const workspaceManagerSignal of this._workspaceManagerSignals) {
+        globalWsm.disconnect(workspaceManagerSignal);
+      }
+      this._workspaceManagerSignals.length = 0;
+      this._workspaceManagerSignals = undefined;
+    }
+
+    let numberOfWorkspaces = globalWsm.get_n_workspaces();
+
+    for (let i = 0; i < numberOfWorkspaces; i++) {
+      let workspace = globalWsm.get_workspace_by_index(i);
+      if (workspace.workspaceSignals) {
+        for (const workspaceSignal of workspace.workspaceSignals) {
+          workspace.disconnect(workspaceSignal);
+        }
+        workspace.workspaceSignals.length = 0;
+        workspace.workspaceSignals = undefined;
+      }
+    }
+
+    let allWindows = this.windowsAllWorkspaces;
+
+    if (allWindows) {
+      for (let metaWindow of allWindows) {
+        if (metaWindow.windowSignals !== undefined) {
+          for (const windowSignal of metaWindow.windowSignals) {
+            metaWindow.disconnect(windowSignal);
+          }
+          metaWindow.windowSignals.length = 0;
+          metaWindow.windowSignals = undefined;
+        }
+
+        let windowActor = metaWindow.get_compositor_private();
+        if (windowActor && windowActor.actorSignals) {
+          for (const actorSignal of windowActor.actorSignals) {
+            windowActor.disconnect(actorSignal);
+          }
+          windowActor.actorSignals.length = 0;
+          windowActor.actorSignals = undefined;
+        }
+
+        if (windowActor && windowActor.border) {
+          windowActor.border.hide();
+          if (global.window_group) {
+            global.window_group.remove_child(windowActor.border);
+          }
+          windowActor.border = undefined;
+        }
+
+        if (windowActor && windowActor.splitBorder) {
+          windowActor.splitBorder.hide();
+          if (global.window_group) {
+            global.window_group.remove_child(windowActor.splitBorder);
+          }
+          windowActor.splitBorder = undefined;
+        }
+      }
+    }
+
+    if (this._renderTreeSrcId) {
+      GLib.Source.remove(this._renderTreeSrcId);
+      this._renderTreeSrcId = 0;
+    }
+
+    if (this._reloadTreeSrcId) {
+      GLib.Source.remove(this._reloadTreeSrcId);
+      this._reloadTreeSrcId = 0;
+    }
+
+    if (this._wsWindowAddSrcId) {
+      GLib.Source.remove(this._wsWindowAddSrcId);
+      this._wsWindowAddSrcId = 0;
+    }
+
+    if (this._queueSourceId) {
+      GLib.Source.remove(this._queueSourceId);
+      this._queueSourceId = 0;
+    }
+
+    if (this._prefsOpenSrcId) {
+      GLib.Source.remove(this._prefsOpenSrcId);
+      this._prefsOpenSrcId = 0;
+    }
+
+    if (this._overviewSignals) {
+      for (const overviewSignal of this._overviewSignals) {
+        Main.overview.disconnect(overviewSignal);
+      }
+      this._overviewSignals.length = 0;
+      this._overviewSignals = null;
+    }
+
+    this._signalsBound = false;
+  }
+
+  renderTree(from, force = false) {
+    let wasFrozen = this._freezeRender;
+    if (force && wasFrozen) this.unfreezeRender();
+    if (this._freezeRender || !this.ext.settings.get_boolean("tiling-mode-enabled")) {
+      this.updateDecorationLayout();
+      this.updateBorderLayout();
+    } else {
+      if (!this._renderTreeSrcId) {
+        this._renderTreeSrcId = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
+          this.processFloats();
+          this.tree.render(from);
+          this._renderTreeSrcId = 0;
+          this.updateDecorationLayout();
+          this.updateBorderLayout();
+          if (wasFrozen) this.freezeRender();
+          return false;
+        });
+      }
+    }
+  }
+
+  processFloats() {
+    this.allNodeWindows.forEach((nodeWindow) => {
+      let metaWindow = nodeWindow.nodeValue;
+      if (this.isFloatingExempt(metaWindow) || !this.isActiveWindowWorkspaceTiled(metaWindow)) {
+        nodeWindow.float = true;
+      } else {
+        nodeWindow.float = false;
+      }
+    });
+  }
+
+  get allNodeWindows() {
+    return this.tree.getNodeByType(NODE_TYPES.WINDOW);
+  }
+
+  /**
+   * Reloads the tree. This is an expensive operation.
+   * Useful when using dynamic workspaces in GNOME-shell.
+   *
+   * TODO: add support to reload the tree from a JSON dump file.
+   * TODO: move this to tree.js
+   */
+  reloadTree(from) {
+    if (!this._reloadTreeSrcId) {
+      this._reloadTreeSrcId = GLib.idle_add(GLib.PRIORITY_LOW, () => {
+        Utils._disableDecorations();
+        let treeWorkspaces = this.tree.nodeWorkpaces;
+        let wsManager = global.workspace_manager;
+        let globalWsNum = wsManager.get_n_workspaces();
+        // empty out the root children nodes
+        this.tree.childNodes.length = 0;
+        this.tree.attachNode = undefined;
+        // initialize the workspaces and monitors id strings
+        this.tree._initWorkspaces();
+        this.trackCurrentWindows();
+        this.renderTree(from);
+        this._reloadTreeSrcId = 0;
+        return false;
+      });
+    }
+  }
+
+  sameParentMonitor(firstNode, secondNode) {
+    if (!firstNode || !secondNode) return false;
+    if (!firstNode.nodeValue || !secondNode.nodeValue) return false;
+    if (!firstNode.nodeValue.get_workspace()) return false;
+    if (!secondNode.nodeValue.get_workspace()) return false;
+    let firstMonWs = `mo${firstNode.nodeValue.get_monitor()}ws${firstNode.nodeValue
+      .get_workspace()
+      .index()}`;
+    let secondMonWs = `mo${secondNode.nodeValue.get_monitor()}ws${secondNode.nodeValue
+      .get_workspace()
+      .index()}`;
+    return firstMonWs === secondMonWs;
+  }
+
+  showWindowBorders() {
+    let metaWindow = this.focusMetaWindow;
+    if (!metaWindow) return;
+    let windowActor = metaWindow.get_compositor_private();
+    if (!windowActor) return;
+    let nodeWindow = this.findNodeWindow(metaWindow);
+    if (!nodeWindow) return;
+    if (metaWindow.get_wm_class() === null) return;
+
+    let borders = [];
+    let focusBorderEnabled = this.ext.settings.get_boolean("focus-border-toggle");
+    let splitBorderEnabled = this.ext.settings.get_boolean("split-border-toggle");
+    let tilingModeEnabled = this.ext.settings.get_boolean("tiling-mode-enabled");
+    let gap = this.calculateGaps(nodeWindow);
+    let maximized = () => {
+      return metaWindow.get_maximized() === 3 || metaWindow.is_fullscreen() || gap === 0;
+    };
+    let monitorCount = global.display.get_n_monitors();
+    let tiledChildren = this.tree.getTiledChildren(nodeWindow.parentNode.childNodes);
+    let inset = 3;
+    let parentNode = nodeWindow.parentNode;
+
+    const floatingWindow = nodeWindow.isFloat();
+    const tiledBorder = windowActor.border;
+
+    if (parentNode.isTabbed()) {
+      if (nodeWindow.tab) {
+        nodeWindow.tab.add_style_class_name("window-tabbed-tab-active");
+      }
+    }
+
+    if (tiledBorder && focusBorderEnabled) {
+      if (
+        !maximized() ||
+        (gap === 0 && tiledChildren.length === 1 && monitorCount > 1) ||
+        (gap === 0 && tiledChildren.length > 1)
+      ) {
+        if (tilingModeEnabled) {
+          if (parentNode.isStacked()) {
+            if (!floatingWindow) {
+              tiledBorder.set_style_class_name("window-stacked-border");
+            } else {
+              tiledBorder.set_style_class_name("window-floated-border");
+            }
+          } else if (parentNode.isTabbed()) {
+            if (!floatingWindow) {
+              tiledBorder.set_style_class_name("window-tabbed-border");
+              if (nodeWindow.backgroundTab) {
+                tiledBorder.add_style_class_name("window-tabbed-bg");
+              }
+            } else {
+              tiledBorder.set_style_class_name("window-floated-border");
+            }
+          } else {
+            if (!floatingWindow) {
+              tiledBorder.set_style_class_name("window-tiled-border");
+            } else {
+              tiledBorder.set_style_class_name("window-floated-border");
+            }
+          }
+        } else {
+          tiledBorder.set_style_class_name("window-floated-border");
+        }
+        borders.push(tiledBorder);
+      }
+    }
+
+    if (gap === 0 || metaWindow.get_maximized() === 1 || metaWindow.get_maximized() === 2) {
+      inset = 0;
+    }
+
+    // handle the split border
+    // It should only show when V or H-Split and with single child CONs
+    if (
+      splitBorderEnabled &&
+      focusBorderEnabled &&
+      tilingModeEnabled &&
+      !nodeWindow.isFloat() &&
+      !maximized &&
+      parentNode.childNodes.length === 1 &&
+      (parentNode.isCon() || parentNode.isMonitor()) &&
+      !(parentNode.isTabbed() || parentNode.isStacked())
+    ) {
+      if (!windowActor.splitBorder) {
+        let splitBorder = new St.Bin({ style_class: "window-split-border" });
+        global.window_group.add_child(splitBorder);
+        windowActor.splitBorder = splitBorder;
+      }
+
+      let splitBorder = windowActor.splitBorder;
+      splitBorder.remove_style_class_name("window-split-vertical");
+      splitBorder.remove_style_class_name("window-split-horizontal");
+
+      if (parentNode.isVSplit()) {
+        splitBorder.add_style_class_name("window-split-vertical");
+      } else if (parentNode.isHSplit()) {
+        splitBorder.add_style_class_name("window-split-horizontal");
+      }
+      borders.push(splitBorder);
+    }
+
+    let rect = metaWindow.get_frame_rect();
+
+    borders.forEach((border) => {
+      border.set_size(rect.width + inset * 2, rect.height + inset * 2);
+      border.set_position(rect.x - inset, rect.y - inset);
+      if (metaWindow.appears_focused && !metaWindow.minimized) {
+        border.show();
+      }
+      if (global.window_group && global.window_group.contains(border)) {
+        // TODO - sort the borders with split border being on top
+        global.window_group.remove_child(border);
+        // Add the border just above the focused window
+        global.window_group.insert_child_above(border, metaWindow.get_compositor_private());
+      }
+    });
+  }
+
+  updateBorderLayout() {
+    this.hideWindowBorders();
+    this.showWindowBorders();
+  }
+
+  calculateGaps(node) {
+    if (!node) return 0;
+
+    let settings = this.ext.settings;
+    let gapSize = settings.get_uint("window-gap-size");
+    let gapIncrement = settings.get_uint("window-gap-size-increment");
+    let gap = gapSize * gapIncrement;
+
+    if (!node.isRoot()) {
+      let hideGapWhenSingle = settings.get_boolean("window-gap-hidden-on-single");
+      let parentNode = this.tree.findParent(node, NODE_TYPES.MONITOR);
+      if (parentNode) {
+        let tiled = parentNode
+          .getNodeByMode(WINDOW_MODES.TILE)
+          .filter((t) => t.isWindow() && !t.nodeValue.minimized);
+        if (tiled.length == 1 && hideGapWhenSingle) gap = 0;
+      }
+    }
+
+    return gap;
+  }
+
+  /**
+   * Track meta/mutter windows and append them to the tree.
+   * Windows can be attached on any of the following Node Types:
+   * MONITOR, CONTAINER
+   *
+   */
+  trackWindow(_display, metaWindow) {
+    let autoSplit = this.ext.settings.get_boolean("auto-split-enabled");
+    if (autoSplit && this.focusMetaWindow) {
+      let currentFocusNode = this.tree.findNode(this.focusMetaWindow);
+      if (currentFocusNode) {
+        let currentParentFocusNode = currentFocusNode.parentNode;
+        let layout = currentParentFocusNode.layout;
+        if (layout === LAYOUT_TYPES.HSPLIT || layout === LAYOUT_TYPES.VSPLIT) {
+          let frameRect = this.focusMetaWindow.get_frame_rect();
+          let splitHorizontal = frameRect.width > frameRect.height;
+          let orientation = splitHorizontal ? "horizontal" : "vertical";
+          this.command({ name: "Split", orientation: orientation });
+        }
+      }
+    }
+    // Make window types configurable
+    if (this._validWindow(metaWindow)) {
+      let existNodeWindow = this.tree.findNode(metaWindow);
+      Logger.debug(`Meta Window ${metaWindow.get_title()} ${metaWindow.get_window_type()}`);
+      if (!existNodeWindow) {
+        let attachTarget;
+
+        const activeMonitor = global.display.get_current_monitor();
+        const activeWorkspace = global.display.get_workspace_manager().get_active_workspace_index();
+        let metaMonWs = `mo${activeMonitor}ws${activeWorkspace}`;
+
+        // Check if the active monitor / workspace has windows
+        let metaMonWsNode = this.tree.findNode(metaMonWs);
+        if (!metaMonWsNode) {
+          // Reload the tree as a last resort
+          this.reloadTree("no-meta-monws");
+          return;
+        }
+
+        let windowNodes = metaMonWsNode.getNodeByType(NODE_TYPES.WINDOW);
+        let hasWindows = windowNodes.length > 0;
+
+        attachTarget = this.tree.attachNode;
+        attachTarget = attachTarget ? this.tree.findNode(attachTarget.nodeValue) : null;
+
+        if (!attachTarget) {
+          attachTarget = metaMonWsNode;
+        } else {
+          if (hasWindows) {
+            if (attachTarget && metaMonWsNode.contains(attachTarget)) {
+              // Use the attach target
+            } else {
+              // Find the first window
+              attachTarget = windowNodes[0];
+            }
+          } else {
+            attachTarget = metaMonWsNode;
+          }
+        }
+
+        let nodeWindow = this.tree.createNode(
+          attachTarget.nodeValue,
+          NODE_TYPES.WINDOW,
+          metaWindow,
+          WINDOW_MODES.FLOAT
+        );
+
+        metaWindow.firstRender = true;
+
+        let windowActor = metaWindow.get_compositor_private();
+
+        if (!metaWindow.windowSignals) {
+          let windowSignals = [
+            metaWindow.connect("position-changed", (_metaWindow) => {
+              let from = "position-changed";
+              this.updateMetaPositionSize(_metaWindow, from);
+            }),
+            metaWindow.connect("size-changed", (_metaWindow) => {
+              let from = "size-changed";
+              this.updateMetaPositionSize(_metaWindow, from);
+            }),
+            metaWindow.connect("focus", (_metaWindowFocus) => {
+              this.queueEvent({
+                name: "focus-update",
+                callback: () => {
+                  this.unfreezeRender();
+                  this.updateBorderLayout();
+                  this.updateDecorationLayout();
+                  this.updateStackedFocus();
+                  this.updateTabbedFocus();
+                },
+              });
+              let focusNodeWindow = this.tree.findNode(this.focusMetaWindow);
+              if (focusNodeWindow) {
+                // handle the attach node
+                this.tree.attachNode = focusNodeWindow._parent;
+                if (this.floatingWindow(focusNodeWindow)) {
+                  this.queueEvent({
+                    name: "raise-float",
+                    callback: () => {
+                      this.renderTree("raise-float-queue");
+                    },
+                  });
+                }
+                this.tree.attachNode = focusNodeWindow;
+              }
+              this.renderTree("focus", true);
+            }),
+            metaWindow.connect("workspace-changed", (_metaWindow) => {
+              this.updateMetaWorkspaceMonitor("metawindow-workspace-changed", null, _metaWindow);
+              this.trackCurrentMonWs();
+            }),
+          ];
+          metaWindow.windowSignals = windowSignals;
+        }
+
+        if (!windowActor.actorSignals) {
+          let actorSignals = [windowActor.connect("destroy", this.windowDestroy.bind(this))];
+          windowActor.actorSignals = actorSignals;
+        }
+
+        if (!windowActor.border) {
+          let border = new St.Bin({ style_class: "window-tiled-border" });
+
+          if (global.window_group) global.window_group.add_child(border);
+
+          windowActor.border = border;
+          border.show();
+        }
+
+        this.postProcessWindow(nodeWindow);
+        this.queueEvent(
+          {
+            name: "window-create-queue",
+            callback: () => {
+              metaWindow.unmaximize(Meta.MaximizeFlags.HORIZONTAL);
+              metaWindow.unmaximize(Meta.MaximizeFlags.VERTICAL);
+              metaWindow.unmaximize(Meta.MaximizeFlags.BOTH);
+              this.renderTree("window-create", true);
+            },
+          },
+          200
+        );
+
+        let childNodes = this.tree.getTiledChildren(nodeWindow.parentNode.childNodes);
+        childNodes.forEach((n) => {
+          n.percent = 0.0;
+        });
+      }
+    }
+  }
+
+  postProcessWindow(nodeWindow) {
+    let metaWindow = nodeWindow.nodeValue;
+    if (metaWindow) {
+      if (metaWindow.get_title() === this.prefsTitle) {
+        metaWindow
+          .get_workspace()
+          .activate_with_focus(metaWindow, global.display.get_current_time());
+        this.moveCenter(metaWindow);
+      }
+    }
+  }
+
+  updateStackedFocus(focusNodeWindow) {
+    if (!focusNodeWindow) return;
+    const parentNode = focusNodeWindow.parentNode;
+    if (parentNode.layout === LAYOUT_TYPES.STACKED && !this._freezeRender) {
+      parentNode.appendChild(focusNodeWindow);
+      parentNode.childNodes
+        .filter((child) => child.isWindow())
+        .forEach((child) => child.nodeValue.raise());
+      this.queueEvent({
+        name: "render-focus-stack",
+        callback: () => {
+          this.renderTree("focus-stacked");
+        },
+      });
+    }
+  }
+
+  updateTabbedFocus(focusNodeWindow) {
+    if (!focusNodeWindow) return;
+    if (focusNodeWindow.parentNode.layout === LAYOUT_TYPES.TABBED && !this._freezeRender) {
+      const metaWindow = focusNodeWindow.nodeValue;
+      metaWindow.raise();
+    }
+  }
+
+  /**
+   * Check if a Meta Window's workspace is skipped for tiling.
+   */
+  isActiveWindowWorkspaceTiled(metaWindow) {
+    if (!metaWindow) return true;
+    let skipWs = this.ext.settings.get_string("workspace-skip-tile");
+    let skipArr = skipWs.split(",");
+    let skipThisWs = false;
+
+    for (let i = 0; i < skipArr.length; i++) {
+      let activeWorkspaceForWin = metaWindow.get_workspace();
+      if (activeWorkspaceForWin) {
+        let wsIndex = activeWorkspaceForWin.index();
+        if (skipArr[i].trim() === `${wsIndex}`) {
+          skipThisWs = true;
+          break;
+        }
+      }
+    }
+    return !skipThisWs;
+  }
+
+  /**
+   * Check the current active workspace's tiling mode
+   */
+  isCurrentWorkspaceTiled() {
+    let skipWs = this.ext.settings.get_string("workspace-skip-tile");
+    let skipArr = skipWs.split(",");
+    let skipThisWs = false;
+    let wsMgr = global.workspace_manager;
+    let wsIndex = wsMgr.get_active_workspace_index();
+
+    for (let i = 0; i < skipArr.length; i++) {
+      if (skipArr[i].trim() === `${wsIndex}`) {
+        skipThisWs = true;
+        break;
+      }
+    }
+    return !skipThisWs;
+  }
+
+  trackCurrentWindows() {
+    this.tree.attachNode = null;
+    let windowsAll = this.windowsAllWorkspaces;
+    for (let i = 0; i < windowsAll.length; i++) {
+      let metaWindow = windowsAll[i];
+      this.trackWindow(global.display, metaWindow);
+      // This updates and handles dynamic workspaces
+      this.updateMetaWorkspaceMonitor(
+        "track-current-windows",
+        metaWindow.get_monitor(),
+        metaWindow
+      );
+    }
+    this.updateDecorationLayout();
+  }
+
+  _validWindow(metaWindow) {
+    let windowType = metaWindow.get_window_type();
+    return (
+      windowType === Meta.WindowType.NORMAL ||
+      windowType === Meta.WindowType.MODAL_DIALOG ||
+      windowType === Meta.WindowType.DIALOG
+    );
+  }
+
+  windowDestroy(actor) {
+    // Release any resources on the window
+    let border = actor.border;
+    if (border) {
+      if (global.window_group) {
+        global.window_group.remove_child(border);
+        border.hide();
+        border = null;
+      }
+    }
+
+    let splitBorder = actor.splitBorder;
+    if (splitBorder) {
+      if (global.window_group) {
+        global.window_group.remove_child(splitBorder);
+        splitBorder.hide();
+        splitBorder = null;
+      }
+    }
+
+    let nodeWindow;
+    nodeWindow = this.tree.findNodeByActor(actor);
+
+    if (nodeWindow) {
+      this.tree.removeNode(nodeWindow);
+      this.renderTree("window-destroy-quick", true);
+    }
+
+    // find the next attachNode here
+    let focusNodeWindow = this.tree.findNode(this.focusMetaWindow);
+    if (focusNodeWindow) {
+      this.tree.attachNode = focusNodeWindow.parentNode;
+    }
+
+    this.queueEvent({
+      name: "window-destroy",
+      callback: () => {
+        this.renderTree("window-destroy", true);
+      },
+    });
+  }
+
+  /**
+   * Handles any workspace/monitor update for the Meta.Window.
+   */
+  updateMetaWorkspaceMonitor(from, _monitor, metaWindow) {
+    if (this._validWindow(metaWindow)) {
+      if (metaWindow.get_workspace() === null) return;
+      let existNodeWindow = this.tree.findNode(metaWindow);
+      let metaMonWs = `mo${metaWindow.get_monitor()}ws${metaWindow.get_workspace().index()}`;
+      let metaMonWsNode = this.tree.findNode(metaMonWs);
+      if (existNodeWindow) {
+        if (existNodeWindow.parentNode && metaMonWsNode) {
+          // Uses the existing workspace, monitor that the metaWindow
+          // belongs to.
+          let containsWindow = metaMonWsNode.contains(existNodeWindow);
+          if (!containsWindow) {
+            // handle cleanup of resize percentages
+            let existParent = existNodeWindow.parentNode;
+            this.tree.resetSiblingPercent(existParent);
+            metaMonWsNode.appendChild(existNodeWindow);
+
+            // Ensure that the workspace tiling is honored
+            if (this.isActiveWindowWorkspaceTiled(metaWindow)) {
+              if (!this.grabOp === Meta.GrabOp.WINDOW_BASE) this.updateTabbedFocus(existNodeWindow);
+              this.updateStackedFocus(existNodeWindow);
+            } else {
+              if (this.floatingWindow(existNodeWindow)) {
+                existNodeWindow.nodeValue.raise();
+              }
+            }
+          }
+        }
+      }
+      this.renderTree(from);
+    }
+  }
+
+  /**
+   * Handle any updates to the current focused window's position.
+   * Useful for updating the active window border, etc.
+   */
+  updateMetaPositionSize(_metaWindow, from) {
+    let focusMetaWindow = this.focusMetaWindow;
+    if (!focusMetaWindow) return;
+
+    let focusNodeWindow = this.findNodeWindow(focusMetaWindow);
+    if (!focusNodeWindow) return;
+
+    let tilingModeEnabled = this.ext.settings.get_boolean("tiling-mode-enabled");
+
+    if (focusNodeWindow.grabMode && tilingModeEnabled) {
+      if (focusNodeWindow.grabMode === GRAB_TYPES.RESIZING) {
+        this._handleResizing(focusNodeWindow);
+      } else if (focusNodeWindow.grabMode === GRAB_TYPES.MOVING) {
+        this._handleMoving(focusNodeWindow);
+      }
+    } else {
+      if (focusMetaWindow.get_maximized() === 0) {
+        this.renderTree(from);
+      }
+    }
+    this.updateBorderLayout();
+    this.updateDecorationLayout();
+  }
+
+  updateDecorationLayout() {
+    if (this._freezeRender) return;
+    let activeWsNode = this.currentWsNode;
+    let allCons = this.tree.getNodeByType(NODE_TYPES.CON);
+
+    // First, hide all decorations:
+    allCons.forEach((con) => {
+      if (con.decoration) {
+        con.decoration.hide();
+      }
+    });
+
+    // Next, handle showing-desktop usually by Super + D
+    if (!activeWsNode) return;
+    let allWindows = activeWsNode.getNodeByType(NODE_TYPES.WINDOW);
+    let allHiddenWindows = allWindows.filter((w) => {
+      let metaWindow = w.nodeValue;
+      return !metaWindow.showing_on_its_workspace() || metaWindow.minimized;
+    });
+
+    // Then if all hidden, do not proceed showing the decorations at all;
+    if (allWindows.length === allHiddenWindows.length) return;
+
+    // Show the decoration where on all monitors of active workspace
+    // But not on the monitor where there is a maximized or fullscreen window
+    // Note, that when multi-display, user can have multi maximized windows,
+    // So it needs to be fully filtered:
+    let monWsNoMaxWindows = activeWsNode.getNodeByType(NODE_TYPES.MONITOR).filter((monitor) => {
+      return (
+        monitor.getNodeByType(NODE_TYPES.WINDOW).filter((w) => {
+          return (
+            w.nodeValue.get_maximized() === Meta.MaximizeFlags.BOTH || w.nodeValue.is_fullscreen()
+          );
+        }).length === 0
+      );
+    });
+
+    monWsNoMaxWindows.forEach((monitorWs) => {
+      let activeMonWsCons = monitorWs.getNodeByType(NODE_TYPES.CON);
+      activeMonWsCons.forEach((con) => {
+        let tiled = this.tree.getTiledChildren(con.childNodes);
+        let showTabs = this.ext.settings.get_boolean("showtab-decoration-enabled");
+        if (con.decoration && tiled.length > 0 && showTabs) {
+          con.decoration.show();
+          if (global.window_group.contains(con.decoration) && this.focusMetaWindow) {
+            global.window_group.remove_child(con.decoration);
+            // Show it below the focused window
+            global.window_group.insert_child_below(
+              con.decoration,
+              this.focusMetaWindow.get_compositor_private()
+            );
+          }
+          con.childNodes.forEach((cn) => {
+            cn.render();
+          });
+        }
+      });
+    });
+  }
+
+  freezeRender() {
+    this._freezeRender = true;
+  }
+
+  unfreezeRender() {
+    this._freezeRender = false;
+  }
+
+  floatingWindow(node) {
+    if (!node) return false;
+    return node.nodeType === NODE_TYPES.WINDOW && node.mode === WINDOW_MODES.FLOAT;
+  }
+
+  /**
+   * Moves the pointer along with the nodeWindow's meta
+   *
+   * This is useful for making sure that Forge calculates the attachNode
+   * properly
+   */
+  movePointerWith(nodeWindow) {
+    if (!nodeWindow || !nodeWindow._data) return;
+    let rect = nodeWindow._data.get_frame_rect();
+    global.get_pointer();
+    const seat = Clutter.get_default_backend().get_default_seat();
+    seat.warp_pointer(rect.x, rect.y);
+  }
+
+  getPointer() {
+    return global.get_pointer();
+  }
+
+  minimizedWindow(node) {
+    if (!node) return false;
+    return node._type === NODE_TYPES.WINDOW && node._data && node._data.minimized;
+  }
+
+  swapWindowsUnderPointer(focusNodeWindow) {
+    if (this.cancelGrab) {
+      return;
+    }
+    let nodeWinAtPointer = this.findNodeWindowAtPointer(focusNodeWindow);
+    if (nodeWinAtPointer) this.tree.swapPairs(focusNodeWindow, nodeWinAtPointer);
+  }
+
+  /**
+   *
+   * Handle previewing and applying where a drag-drop window is going to be tiled
+   *
+   */
+  moveWindowToPointer(focusNodeWindow, preview = false) {
+    if (this.cancelGrab) {
+      return;
+    }
+    if (!focusNodeWindow || focusNodeWindow.mode !== WINDOW_MODES.GRAB_TILE) return;
+
+    let nodeWinAtPointer = this.nodeWinAtPointer;
+
+    if (nodeWinAtPointer) {
+      const targetRect = nodeWinAtPointer.nodeValue.get_frame_rect();
+      const parentNodeTarget = nodeWinAtPointer.parentNode;
+      const currPointer = this.getPointer();
+      const horizontal = parentNodeTarget.isHSplit() || parentNodeTarget.isTabbed();
+      const isMonParent = parentNodeTarget.nodeType === NODE_TYPES.MONITOR;
+      const isConParent = parentNodeTarget.nodeType === NODE_TYPES.CON;
+      const stacked = parentNodeTarget.isStacked();
+      const tabbed = parentNodeTarget.isTabbed();
+      const stackedOrTabbed = stacked || tabbed;
+      const updatePreview = (focusNodeWindow, previewParams) => {
+        let previewHint = focusNodeWindow.previewHint;
+        let previewHintEnabled = this.ext.settings.get_boolean("preview-hint-enabled");
+        const previewRect = previewParams.targetRect;
+        if (previewHint && previewHintEnabled) {
+          if (!previewRect) {
+            previewHint.hide();
+            return;
+          }
+          previewHint.set_style_class_name(previewParams.className);
+          previewHint.set_position(previewRect.x, previewRect.y);
+          previewHint.set_size(previewRect.width, previewRect.height);
+          previewHint.show();
+        }
+      };
+      const regions = (targetRect, regionWidth) => {
+        leftRegion = {
+          x: targetRect.x,
+          y: targetRect.y,
+          width: targetRect.width * regionWidth,
+          height: targetRect.height,
+        };
+
+        rightRegion = {
+          x: targetRect.x + targetRect.width * (1 - regionWidth),
+          y: targetRect.y,
+          width: targetRect.width * regionWidth,
+          height: targetRect.height,
+        };
+
+        topRegion = {
+          x: targetRect.x,
+          y: targetRect.y,
+          width: targetRect.width,
+          height: targetRect.height * regionWidth,
+        };
+
+        bottomRegion = {
+          x: targetRect.x,
+          y: targetRect.y + targetRect.height * (1 - regionWidth),
+          width: targetRect.width,
+          height: targetRect.height * regionWidth,
+        };
+
+        centerRegion = {
+          x: targetRect.x + targetRect.width * regionWidth,
+          y: targetRect.y + targetRect.height * regionWidth,
+          width: targetRect.width - targetRect.width * regionWidth * 2,
+          height: targetRect.height - targetRect.height * regionWidth * 2,
+        };
+
+        return {
+          left: leftRegion,
+          right: rightRegion,
+          top: topRegion,
+          bottom: bottomRegion,
+          center: centerRegion,
+        };
+      };
+      let referenceNode = null;
+      let containerNode;
+      let childNode = focusNodeWindow;
+      let previewParams = {
+        className: "",
+        targetRect: null,
+      };
+      let leftRegion;
+      let rightRegion;
+      let topRegion;
+      let bottomRegion;
+      let centerRegion;
+      let previewWidth = 0.5;
+      let hoverWidth = 0.3;
+
+      // Hover region detects where the pointer is on the target drop window
+      const hoverRegions = regions(targetRect, hoverWidth);
+
+      // Preview region interprets the hover intersect where the focus window
+      // would go when dropped
+      const previewRegions = regions(targetRect, previewWidth);
+
+      leftRegion = hoverRegions.left;
+      rightRegion = hoverRegions.right;
+      topRegion = hoverRegions.top;
+      bottomRegion = hoverRegions.bottom;
+      centerRegion = hoverRegions.center;
+
+      const isLeft = Utils.rectContainsPoint(leftRegion, currPointer);
+      const isRight = Utils.rectContainsPoint(rightRegion, currPointer);
+      const isTop = Utils.rectContainsPoint(topRegion, currPointer);
+      const isBottom = Utils.rectContainsPoint(bottomRegion, currPointer);
+      const isCenter = Utils.rectContainsPoint(centerRegion, currPointer);
+
+      if (isCenter) {
+        if (stackedOrTabbed) {
+          containerNode = parentNodeTarget;
+          referenceNode = null;
+          previewParams = {
+            className: stacked ? "window-tilepreview-stacked" : "window-tilepreview-tabbed",
+            targetRect: targetRect,
+          };
+        } else {
+          if (isMonParent) {
+            childNode.createCon = true;
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer;
+            previewParams = {
+              targetRect: targetRect,
+            };
+          } else {
+            containerNode = parentNodeTarget;
+            referenceNode = null;
+            const parentTargetRect = this.tree.processGap(parentNodeTarget);
+            previewParams = {
+              targetRect: parentTargetRect,
+            };
+          }
+        }
+      } else if (isLeft) {
+        previewParams = {
+          targetRect: previewRegions.left,
+        };
+
+        if (stackedOrTabbed) {
+          // treat any windows on stacked or tabbed layouts to be
+          // a single node unit: the con itself and then
+          // split left, top, right or bottom accordingly (subsequent if conditions):
+          childNode.detachWindow = true;
+          if (!isMonParent) {
+            referenceNode = parentNodeTarget;
+            containerNode = parentNodeTarget.parentNode;
+          } else {
+            // It is a monitor that's a stack/tab
+            // TODO: update the stacked/tabbed toggles to not
+            // change layout if the parent is a monitor?
+          }
+        } else {
+          if (horizontal) {
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer;
+          } else {
+            // vertical orientation
+            childNode.createCon = true;
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer;
+          }
+        }
+      } else if (isRight) {
+        previewParams = {
+          targetRect: previewRegions.right,
+        };
+        if (stackedOrTabbed) {
+          // treat any windows on stacked or tabbed layouts to be
+          // a single node unit: the con itself and then
+          // split left, top, right or bottom accordingly (subsequent if conditions):
+          childNode.detachWindow = true;
+          if (!isMonParent) {
+            referenceNode = parentNodeTarget.nextSibling;
+            containerNode = parentNodeTarget.parentNode;
+          } else {
+            // It is a monitor that's a stack/tab
+            // TODO: update the stacked/tabbed toggles to not
+            // change layout if the parent is a monitor?
+          }
+        } else {
+          if (horizontal) {
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer.nextSibling;
+          } else {
+            childNode.createCon = true;
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer.nextSibling;
+          }
+        }
+      } else if (isTop) {
+        previewParams = {
+          targetRect: previewRegions.top,
+        };
+        if (stackedOrTabbed) {
+          // treat any windows on stacked or tabbed layouts to be
+          // a single node unit: the con itself and then
+          // split left, top, right or bottom accordingly (subsequent if conditions):
+          if (!isMonParent) {
+            containerNode = parentNodeTarget;
+            referenceNode = null;
+            previewParams = {
+              className: stacked ? "window-tilepreview-stacked" : "window-tilepreview-tabbed",
+              targetRect: targetRect,
+            };
+          } else {
+            // It is a monitor that's a stack/tab
+            // TODO: update the stacked/tabbed toggles to not
+            // change layout if the parent is a monitor?
+          }
+        } else {
+          if (horizontal) {
+            childNode.createCon = true;
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer;
+          } else {
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer;
+          }
+        }
+      } else if (isBottom) {
+        previewParams = {
+          targetRect: previewRegions.bottom,
+        };
+        if (stackedOrTabbed) {
+          // treat any windows on stacked or tabbed layouts to be
+          // a single node unit: the con itself and then
+          // split left, top, right or bottom accordingly (subsequent if conditions):
+          if (!isMonParent) {
+            containerNode = parentNodeTarget;
+            referenceNode = null;
+            previewParams = {
+              className: stacked ? "window-tilepreview-stacked" : "window-tilepreview-tabbed",
+              targetRect: targetRect,
+            };
+          } else {
+            // It is a monitor that's a stack/tab
+            // TODO: update the stacked/tabbed toggles to not
+            // change layout if the parent is a monitor?
+          }
+        } else {
+          if (horizontal) {
+            childNode = focusNodeWindow;
+            childNode.createCon = true;
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer.nextSibling;
+          } else {
+            childNode = focusNodeWindow;
+            containerNode = parentNodeTarget;
+            referenceNode = nodeWinAtPointer.nextSibling;
+          }
+        }
+      }
+
+      if (!isCenter) {
+        if (stackedOrTabbed) {
+          if (isLeft || isRight) {
+            previewParams.className = "window-tilepreview-tiled";
+          } else if (isTop || isBottom) {
+            previewParams.className = stacked
+              ? "window-tilepreview-stacked"
+              : "window-tilepreview-tabbed";
+          }
+        } else {
+          previewParams.className = "window-tilepreview-tiled";
+        }
+      } else if (isCenter) {
+        if (!stackedOrTabbed) previewParams.className = this._getDragDropCenterPreviewStyle();
+      }
+
+      if (!preview) {
+        const previousParent = focusNodeWindow.parentNode;
+        this.tree.resetSiblingPercent(containerNode);
+        this.tree.resetSiblingPercent(previousParent);
+
+        if (focusNodeWindow.tab) {
+          let decoParent = focusNodeWindow.tab.get_parent();
+          if (decoParent) decoParent.remove_child(focusNodeWindow.tab);
+        }
+
+        if (childNode.createCon) {
+          const numWin = parentNodeTarget.childNodes.filter(
+            (c) => c.nodeType === NODE_TYPES.WINDOW
+          ).length;
+          const numChild = parentNodeTarget.childNodes.length;
+          const sameNumChild = numWin === numChild;
+          // Child Node will still be created
+          if (
+            !isCenter &&
+            ((isConParent && numWin === 1 && sameNumChild) ||
+              (isMonParent && numWin == 2 && sameNumChild))
+          ) {
+            childNode = parentNodeTarget;
+          } else {
+            childNode = new Node(NODE_TYPES.CON, new St.Bin());
+            containerNode.insertBefore(childNode, referenceNode);
+            childNode.appendChild(nodeWinAtPointer);
+          }
+
+          if (isLeft || isTop) {
+            childNode.insertBefore(focusNodeWindow, nodeWinAtPointer);
+          } else if (isRight || isBottom || isCenter) {
+            childNode.insertBefore(focusNodeWindow, null);
+          }
+
+          if (isLeft || isRight) {
+            childNode.layout = LAYOUT_TYPES.HSPLIT;
+          } else if (isTop || isBottom) {
+            childNode.layout = LAYOUT_TYPES.VSPLIT;
+          } else if (isCenter) {
+            const centerLayout = this.ext.settings.get_string("dnd-center-layout").toUpperCase();
+            childNode.layout = LAYOUT_TYPES[centerLayout];
+          }
+        } else if (childNode.detachWindow) {
+          const orientation =
+            isLeft || isRight ? ORIENTATION_TYPES.HORIZONTAL : ORIENTATION_TYPES.VERTICAL;
+          this.tree.split(childNode, orientation);
+          containerNode.insertBefore(childNode.parentNode, referenceNode);
+        } else {
+          // Child Node is a WINDOW
+          containerNode.insertBefore(childNode, referenceNode);
+          if (isLeft || isRight) {
+            containerNode.layout = LAYOUT_TYPES.HSPLIT;
+          } else if (isTop || isBottom) {
+            if (!stackedOrTabbed) containerNode.layout = LAYOUT_TYPES.VSPLIT;
+          } else if (isCenter) {
+            if (containerNode.isHSplit() || containerNode.isVSplit()) {
+              const centerLayout = this.ext.settings.get_string("dnd-center-layout").toUpperCase();
+              containerNode.layout = LAYOUT_TYPES[centerLayout];
+            }
+          }
+        }
+      } else {
+        updatePreview(focusNodeWindow, previewParams);
+      }
+      childNode.createCon = false;
+      childNode.detachWindow = false;
+    }
+  }
+
+  findNodeWindowAtPointer(focusNodeWindow) {
+    let pointerCoord = global.get_pointer();
+
+    let nodeWinAtPointer = this._findNodeWindowAtPointer(focusNodeWindow.nodeValue, pointerCoord);
+    return nodeWinAtPointer;
+  }
+
+  /**
+   * Finds the NodeWindow under the Meta.Window and the
+   * current pointer coordinates;
+   */
+  _findNodeWindowAtPointer(metaWindow, pointer) {
+    if (!metaWindow) return undefined;
+
+    let sortedWindows = this.sortedWindows;
+
+    if (!sortedWindows) {
+      Logger.warn("No sorted windows");
+      return;
+    }
+
+    for (let i = 0, n = sortedWindows.length; i < n; i++) {
+      const w = sortedWindows[i];
+      const metaRect = w.get_frame_rect();
+      const atPointer = Utils.rectContainsPoint(metaRect, pointer);
+      if (atPointer) return this.tree.getNodeByValue(w);
+    }
+
+    return null;
+  }
+
+  _handleGrabOpBegin(_display, _metaWindow, grabOp) {
+    this.grabOp = grabOp;
+    this.trackCurrentMonWs();
+    let focusMetaWindow = this.focusMetaWindow;
+
+    if (focusMetaWindow) {
+      let focusNodeWindow = this.findNodeWindow(focusMetaWindow);
+      if (!focusNodeWindow) return;
+
+      const frameRect = focusMetaWindow.get_frame_rect();
+      const gaps = this.calculateGaps(focusNodeWindow);
+
+      focusNodeWindow.grabMode = Utils.grabMode(grabOp);
+      if (
+        focusNodeWindow.grabMode === GRAB_TYPES.MOVING &&
+        focusNodeWindow.mode === WINDOW_MODES.TILE
+      ) {
+        this.freezeRender();
+        focusNodeWindow.mode = WINDOW_MODES.GRAB_TILE;
+      }
+
+      focusNodeWindow.initGrabOp = grabOp;
+      focusNodeWindow.initRect = Utils.removeGapOnRect(frameRect, gaps);
+    }
+  }
+
+  _handleGrabOpEnd(_display, _metaWindow, grabOp) {
+    this.unfreezeRender();
+    let focusMetaWindow = this.focusMetaWindow;
+    if (!focusMetaWindow) return;
+    let focusNodeWindow = this.findNodeWindow(focusMetaWindow);
+
+    if (focusNodeWindow && !this.cancelGrab) {
+      // WINDOW_BASE is when grabbing the window decoration
+      // COMPOSITOR is when something like Overview requesting a grab, especially when Super is pressed.
+      if (
+        grabOp === Meta.GrabOp.WINDOW_BASE ||
+        grabOp === Meta.GrabOp.COMPOSITOR ||
+        grabOp === Meta.GrabOp.MOVING_UNCONSTRAINED
+      ) {
+        if (this.allowDragDropTile()) {
+          this.moveWindowToPointer(focusNodeWindow);
+        }
+      }
+    }
+    this._grabCleanup(focusNodeWindow);
+
+    if (focusMetaWindow.get_maximized() === 0) {
+      this.renderTree("grab-op-end");
+    }
+
+    this.updateStackedFocus(focusNodeWindow);
+    this.updateTabbedFocus(focusNodeWindow);
+    this.nodeWinAtPointer = null;
+  }
+
+  _grabCleanup(focusNodeWindow) {
+    this.cancelGrab = false;
+    if (!focusNodeWindow) return;
+    focusNodeWindow.initRect = null;
+    focusNodeWindow.grabMode = null;
+    focusNodeWindow.initGrabOp = null;
+
+    if (focusNodeWindow.previewHint) {
+      focusNodeWindow.previewHint.hide();
+      global.window_group.remove_child(focusNodeWindow.previewHint);
+      focusNodeWindow.previewHint.destroy();
+      focusNodeWindow.previewHint = null;
+    }
+
+    if (focusNodeWindow.mode === WINDOW_MODES.GRAB_TILE) {
+      focusNodeWindow.mode = WINDOW_MODES.TILE;
+    }
+  }
+
+  allowDragDropTile() {
+    return this.kbd.allowDragDropTile();
+  }
+
+  _handleResizing(focusNodeWindow) {
+    if (!focusNodeWindow || focusNodeWindow.isFloat()) return;
+    let grabOp = this.grabOp;
+    let initGrabOp = focusNodeWindow.initGrabOp;
+    let direction = Utils.directionFromGrab(grabOp);
+    let orientation = Utils.orientationFromGrab(grabOp);
+    let parentNodeForFocus = focusNodeWindow.parentNode;
+    let position = Utils.positionFromGrabOp(grabOp);
+    // normalize the rect without gaps
+    let frameRect = this.focusMetaWindow.get_frame_rect();
+    let gaps = this.calculateGaps(focusNodeWindow);
+    let currentRect = Utils.removeGapOnRect(frameRect, gaps);
+    let firstRect;
+    let secondRect;
+    let parentRect;
+    let resizePairForWindow;
+
+    if (initGrabOp === Meta.GrabOp.RESIZING_UNKNOWN) {
+      // the direction is null so do not process yet below.
+      return;
+    } else {
+      resizePairForWindow = this.tree.nextVisible(focusNodeWindow, direction);
+    }
+
+    let sameParent = resizePairForWindow
+      ? resizePairForWindow.parentNode === focusNodeWindow.parentNode
+      : false;
+
+    if (orientation === ORIENTATION_TYPES.HORIZONTAL) {
+      if (sameParent) {
+        // use the window or con pairs
+        if (this.tree.getTiledChildren(parentNodeForFocus.childNodes).length <= 1) {
+          return;
+        }
+
+        firstRect = focusNodeWindow.initRect;
+        if (resizePairForWindow) {
+          if (
+            !this.floatingWindow(resizePairForWindow) &&
+            !this.minimizedWindow(resizePairForWindow)
+          ) {
+            secondRect = resizePairForWindow.rect;
+          } else {
+            // TODO try to get the next resize pair?
+          }
+        }
+
+        if (!firstRect || !secondRect) {
+          return;
+        }
+
+        parentRect = parentNodeForFocus.rect;
+        let changePx = currentRect.width - firstRect.width;
+        let firstPercent = (firstRect.width + changePx) / parentRect.width;
+        let secondPercent = (secondRect.width - changePx) / parentRect.width;
+        focusNodeWindow.percent = firstPercent;
+        resizePairForWindow.percent = secondPercent;
+      } else {
+        // use the parent pairs (con to another con or window)
+        if (resizePairForWindow && resizePairForWindow.parentNode) {
+          if (this.tree.getTiledChildren(resizePairForWindow.parentNode.childNodes).length <= 1) {
+            return;
+          }
+          let firstWindowRect = focusNodeWindow.initRect;
+          let index = resizePairForWindow.index;
+          if (position === POSITION.BEFORE) {
+            // Find the opposite node
+            index = index + 1;
+          } else {
+            index = index - 1;
+          }
+          parentNodeForFocus = resizePairForWindow.parentNode.childNodes[index];
+          firstRect = parentNodeForFocus.rect;
+          secondRect = resizePairForWindow.rect;
+          if (!firstRect || !secondRect) {
+            return;
+          }
+
+          parentRect = parentNodeForFocus.parentNode.rect;
+          let changePx = currentRect.width - firstWindowRect.width;
+          let firstPercent = (firstRect.width + changePx) / parentRect.width;
+          let secondPercent = (secondRect.width - changePx) / parentRect.width;
+          parentNodeForFocus.percent = firstPercent;
+          resizePairForWindow.percent = secondPercent;
+        }
+      }
+    } else if (orientation === ORIENTATION_TYPES.VERTICAL) {
+      if (sameParent) {
+        // use the window or con pairs
+        if (this.tree.getTiledChildren(parentNodeForFocus.childNodes).length <= 1) {
+          return;
+        }
+        firstRect = focusNodeWindow.initRect;
+        if (resizePairForWindow) {
+          if (
+            !this.floatingWindow(resizePairForWindow) &&
+            !this.minimizedWindow(resizePairForWindow)
+          ) {
+            secondRect = resizePairForWindow.rect;
+          } else {
+            // TODO try to get the next resize pair?
+          }
+        }
+        if (!firstRect || !secondRect) {
+          return;
+        }
+        parentRect = parentNodeForFocus.rect;
+        let changePx = currentRect.height - firstRect.height;
+        let firstPercent = (firstRect.height + changePx) / parentRect.height;
+        let secondPercent = (secondRect.height - changePx) / parentRect.height;
+        focusNodeWindow.percent = firstPercent;
+        resizePairForWindow.percent = secondPercent;
+      } else {
+        // use the parent pairs (con to another con or window)
+        if (resizePairForWindow && resizePairForWindow.parentNode) {
+          if (this.tree.getTiledChildren(resizePairForWindow.parentNode.childNodes).length <= 1) {
+            return;
+          }
+          let firstWindowRect = focusNodeWindow.initRect;
+          let index = resizePairForWindow.index;
+          if (position === POSITION.BEFORE) {
+            // Find the opposite node
+            index = index + 1;
+          } else {
+            index = index - 1;
+          }
+          parentNodeForFocus = resizePairForWindow.parentNode.childNodes[index];
+          firstRect = parentNodeForFocus.rect;
+          secondRect = resizePairForWindow.rect;
+          if (!firstRect || !secondRect) {
+            return;
+          }
+
+          parentRect = parentNodeForFocus.parentNode.rect;
+          let changePx = currentRect.height - firstWindowRect.height;
+          let firstPercent = (firstRect.height + changePx) / parentRect.height;
+          let secondPercent = (secondRect.height - changePx) / parentRect.height;
+          parentNodeForFocus.percent = firstPercent;
+          resizePairForWindow.percent = secondPercent;
+        }
+      }
+    }
+  }
+
+  _handleMoving(focusNodeWindow) {
+    if (!focusNodeWindow || focusNodeWindow.mode !== WINDOW_MODES.GRAB_TILE) return;
+
+    const nodeWinAtPointer = this.findNodeWindowAtPointer(focusNodeWindow);
+    this.nodeWinAtPointer = nodeWinAtPointer;
+
+    const hidePreview = () => {
+      if (focusNodeWindow.previewHint) {
+        focusNodeWindow.previewHint.hide();
+      }
+    };
+
+    if (nodeWinAtPointer) {
+      if (!focusNodeWindow.previewHint) {
+        let previewHint = new St.Bin();
+        global.window_group.add_child(previewHint);
+        focusNodeWindow.previewHint = previewHint;
+      }
+
+      if (this.allowDragDropTile()) {
+        this.moveWindowToPointer(focusNodeWindow, true);
+      } else {
+        hidePreview();
+      }
+    } else {
+      hidePreview();
+    }
+  }
+
+  isFloatingExempt(metaWindow) {
+    if (!metaWindow) return true;
+    let windowTitle = metaWindow.get_title();
+    let windowType = metaWindow.get_window_type();
+
+    let floatByType =
+      windowType === Meta.WindowType.DIALOG ||
+      windowType === Meta.WindowType.MODAL_DIALOG ||
+      metaWindow.get_transient_for() !== null ||
+      metaWindow.get_wm_class() === null ||
+      windowTitle === null ||
+      windowTitle === "" ||
+      windowTitle.length === 0 ||
+      !metaWindow.allows_resize();
+
+    const knownFloats = this.windowProps.overrides.filter((wprop) => wprop.mode === "float");
+
+    let floatOverride =
+      knownFloats.filter((kf) => {
+        let matchTitle = false;
+        let matchClass = false;
+
+        if (kf.wmTitle) {
+          if (kf.wmTitle === " ") {
+            matchTitle = kf.wmTitle === windowTitle;
+          } else {
+            let titles = kf.wmTitle.split(",");
+            matchTitle = titles.filter((t) => {
+              if (windowTitle) {
+                if (t.startsWith('!')) {
+                  return !windowTitle.includes(t.slice(1))
+                } else {
+                  return windowTitle.includes(t)
+                }
+              }
+              return false
+            }).length > 0;
+          }
+        }
+        if (kf.wmClass) {
+          matchClass = kf.wmClass.includes(metaWindow.get_wm_class());
+        }
+
+        if (kf.wmClass && kf.wmTitle) {
+          return matchTitle && matchClass;
+        } else {
+          if (kf.wmTitle) {
+            return matchTitle;
+          } else {
+            return matchClass;
+          }
+        }
+      }).length > 0;
+
+    return floatByType || floatOverride;
+  }
+
+  _getDragDropCenterPreviewStyle() {
+    const centerLayout = this.ext.settings.get_string("dnd-center-layout");
+    return `window-tilepreview-${centerLayout}`;
+  }
+
+  get currentMonWsNode() {
+    const monWs = this.currentMonWs;
+    if (monWs) {
+      return this.tree.findNode(monWs);
+    }
+    return null;
+  }
+
+  get currentWsNode() {
+    const ws = this.currentWs;
+    if (ws) {
+      return this.tree.findNode(ws);
+    }
+    return null;
+  }
+
+  get currentMonWs() {
+    const monWs = `${this.currentMon}${this.currentWs}`;
+    return monWs;
+  }
+
+  get currentWs() {
+    const display = global.display;
+    const wsMgr = display.get_workspace_manager();
+    return `ws${wsMgr.get_active_workspace_index()}`;
+  }
+
+  get currentMon() {
+    const display = global.display;
+    return `mo${display.get_current_monitor()}`;
+  }
+
+  floatAllWindows() {
+    this.tree.getNodeByType(NODE_TYPES.WINDOW).forEach((w) => {
+      if (w.isFloat()) {
+        w.prevFloat = true;
+      }
+      w.mode = WINDOW_MODES.FLOAT;
+    });
+  }
+
+  unfloatAllWindows() {
+    this.tree.getNodeByType(NODE_TYPES.WINDOW).forEach((w) => {
+      if (!w.prevFloat) {
+        w.mode = WINDOW_MODES.TILE;
+      } else {
+        // Reset the float marker
+        w.prevFloat = false;
+      }
+    });
+  }
+}

+ 190 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/appearance.js

@@ -0,0 +1,190 @@
+// Gnome imports
+import Adw from "gi://Adw";
+import GObject from "gi://GObject";
+import Gdk from "gi://Gdk";
+
+// Extension imports
+import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js";
+
+// Shared state
+import { ConfigManager } from "../shared/settings.js";
+
+import { PrefsThemeManager } from "./prefs-theme-manager.js";
+
+// Prefs UI
+import { ColorRow, PreferencesPage, ResetButton, SpinButtonRow, SwitchRow } from "./widgets.js";
+import { Logger } from "../shared/logger.js";
+
+export class AppearancePage extends PreferencesPage {
+  static {
+    GObject.registerClass(this);
+  }
+
+  /**
+   * @param {string} selector
+   */
+  static getCssSelectorAsMessage(selector) {
+    switch (selector) {
+      case ".window-tiled-border":
+        return _("Tiled Focus Hint and Preview");
+      case ".window-floated-border":
+        return _("Floated Focus Hint");
+      case ".window-split-border":
+        return _("Split Direction Hint");
+      case ".window-stacked-border":
+        return _("Stacked Focus Hint and Preview");
+      case ".window-tabbed-border":
+        return _("Tabbed Focus Hint and Preview");
+    }
+  }
+
+  constructor({ settings, dir }) {
+    super({ title: _("Appearance"), icon_name: "brush-symbolic" });
+    this.settings = settings;
+    this.configMgr = new ConfigManager({ dir });
+    this.themeMgr = new PrefsThemeManager(this);
+    this.add_group({
+      title: _("Gaps"),
+      children: [
+        // Gaps size
+        new SpinButtonRow({
+          title: _("Gaps Size"),
+          range: [0, 32, 1],
+          settings,
+          bind: "window-gap-size",
+        }),
+        // Gaps size multiplier
+        new SpinButtonRow({
+          title: _("Gaps Size Multiplier"),
+          range: [0, 8, 1],
+          settings,
+          bind: "window-gap-size-increment",
+        }),
+        // Gap Hidden when Single Window
+        new SwitchRow({
+          title: _("Gaps Hidden when Single"),
+          settings,
+          bind: "window-gap-hidden-on-single",
+        }),
+      ],
+    });
+
+    this.add_group({
+      title: _("Color"),
+      children: [
+        "window-tiled-border",
+        "window-tabbed-border",
+        "window-stacked-border",
+        "window-floated-border",
+        "window-split-border",
+      ].map((x) => this._createColorOptionWidget(x)),
+    });
+  }
+
+  /**
+   * @param {string} prefix
+   */
+  _createColorOptionWidget(prefix) {
+    const selector = `.${prefix}`;
+    const theme = this.themeMgr;
+    const title = AppearancePage.getCssSelectorAsMessage(selector);
+    const colorScheme = theme.getColorSchemeBySelector(selector);
+    const row = new Adw.ExpanderRow({ title });
+
+    const borderSizeRow = new SpinButtonRow({
+      title: _("Border Size"),
+      range: [1, 6, 1],
+      // subtitle: 'Properties of the focus hint',
+      max_width_chars: 1,
+      max_length: 1,
+      width_chars: 2,
+      xalign: 1,
+      init: theme.removePx(theme.getCssProperty(selector, "border-width").value),
+      onChange: (value) => {
+        const px = theme.addPx(value);
+        Logger.debug(`Setting border width for selector: ${selector} ${px}`);
+        theme.setCssProperty(selector, "border-width", px);
+      },
+    });
+
+    borderSizeRow.add_suffix(
+      new ResetButton({
+        onReset: () => {
+          const borderDefault = theme.defaultPalette[colorScheme]["border-width"];
+          theme.setCssProperty(selector, "border-width", theme.addPx(borderDefault));
+          borderSizeRow.activatable_widget.value = borderDefault;
+        },
+      })
+    );
+
+    const updateCssColors = (rgbaString) => {
+      const rgba = new Gdk.RGBA();
+
+      if (rgba.parse(rgbaString)) {
+        Logger.debug(`Setting color for selector: ${selector} ${rgbaString}`);
+        const previewBorderRgba = rgba.copy();
+        const previewBackgroundRgba = rgba.copy();
+        const overviewBackgroundRgba = rgba.copy();
+
+        previewBorderRgba.alpha = 0.3;
+        previewBackgroundRgba.alpha = 0.2;
+        overviewBackgroundRgba.alpha = 0.5;
+
+        // The primary color updates the focus hint:
+        theme.setCssProperty(selector, "border-color", rgba.to_string());
+
+        // Only apply below on the tabbed scheme
+        if (colorScheme === "tabbed") {
+          const tabBorderRgba = rgba.copy();
+          const tabActiveBackgroundRgba = rgba.copy();
+          tabBorderRgba.alpha = 0.6;
+          theme.setCssProperty(
+            `.window-${colorScheme}-tab`,
+            "border-color",
+            tabBorderRgba.to_string()
+          );
+          theme.setCssProperty(
+            `.window-${colorScheme}-tab-active`,
+            "background-color",
+            tabActiveBackgroundRgba.to_string()
+          );
+        }
+        // And then finally the preview when doing drag/drop tiling:
+        theme.setCssProperty(
+          `.window-tilepreview-${colorScheme}`,
+          "border-color",
+          previewBorderRgba.to_string()
+        );
+        theme.setCssProperty(
+          `.window-tilepreview-${colorScheme}`,
+          "background-color",
+          previewBackgroundRgba.to_string()
+        );
+      }
+    };
+
+    const borderColorRow = new ColorRow({
+      title: _("Border Color"),
+      init: theme.getCssProperty(selector, "border-color").value,
+      onChange: updateCssColors,
+    });
+
+    borderColorRow.add_suffix(
+      new ResetButton({
+        onReset: () => {
+          const selectorColor = theme.defaultPalette[colorScheme].color;
+          updateCssColors(selectorColor);
+          const rgba = new Gdk.RGBA();
+          if (rgba.parse(selectorColor)) {
+            borderColorRow.colorButton.set_rgba(rgba);
+          }
+        },
+      })
+    );
+
+    row.add_row(borderColorRow);
+    row.add_row(borderSizeRow);
+
+    return row;
+  }
+}

+ 108 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/keyboard.js

@@ -0,0 +1,108 @@
+// Gnome imports
+import Adw from "gi://Adw";
+import GObject from "gi://GObject";
+import Gtk from "gi://Gtk";
+
+// Extension Imports
+import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js";
+
+// Prefs UI
+import { EntryRow, PreferencesPage, RadioRow } from "./widgets.js";
+import { Logger } from "../shared/logger.js";
+
+export class KeyboardPage extends PreferencesPage {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({ kbdSettings }) {
+    super({ title: _("Keyboard"), icon_name: "input-keyboard-symbolic" });
+
+    const description = `${_("Syntax")}: &lt;Super&gt;h, &lt;Shift&gt;g, &lt;Shift&gt;&lt;Super&gt;h
+    ${_("Legend")}: &lt;Super&gt; - ${_("Windows  key")}, &lt;Primary&gt; - ${_("Control key")}
+    ${_("Delete text to unset. Press Return key to accept. Focus out to ignore.")} <i>${_(
+      "Resets"
+    )}</i> ${_("to previous value when invalid")}`;
+
+    this.add_group({
+      title: _("Update Shortcuts"),
+      description,
+      children: Object.entries({
+        window: "Window Shortcuts",
+        workspace: "Workspace Shortcuts",
+        con: "Container Shortcuts",
+        focus: "Focus Shortcuts",
+        prefs: "Other Shortcuts",
+      }).map(([prefix, gettextKey]) =>
+        KeyboardPage.makeKeygroupExpander(prefix, gettextKey, kbdSettings)
+      ),
+    });
+
+    this.add_group({
+      title: _("Drag-Drop Tiling Modifier Key Options"),
+      description: `<i>${_(
+        "Change the modifier for <b>tiling</b> windows via mouse/drag-drop"
+      )}</i> ${_("Select <i>None</i> to <u>always tile immediately</u> by default")}`,
+      children: [
+        new RadioRow({
+          title: _("Tile Modifier"),
+          settings: kbdSettings,
+          bind: "mod-mask-mouse-tile",
+          options: {
+            Super: _("Super"),
+            Ctrl: _("Ctrl"),
+            Alt: _("Alt"),
+            None: _("None"),
+          },
+        }),
+      ],
+    });
+  }
+
+  static makeKeygroupExpander(prefix, gettextKey, settings) {
+    const expander = new Adw.ExpanderRow({ title: _(gettextKey) });
+    KeyboardPage.createKeyList(settings, prefix).forEach((key) =>
+      expander.add_row(
+        new EntryRow({
+          title: key,
+          settings,
+          bind: key,
+          map: {
+            from(settings, bind) {
+              return settings.get_strv(bind).join(",");
+            },
+            to(settings, bind, value) {
+              if (!!value) {
+                const mappings = value.split(",").map((x) => {
+                  const [, key, mods] = Gtk.accelerator_parse(x);
+                  return Gtk.accelerator_valid(key, mods) && Gtk.accelerator_name(key, mods);
+                });
+                if (mappings.every((x) => !!x)) {
+                  Logger.info("setting", bind, "to", mappings);
+                  settings.set_strv(bind, mappings);
+                }
+              } else {
+                // If value deleted, unset the mapping
+                settings.set_strv(bind, []);
+              }
+            },
+          },
+        })
+      )
+    );
+    return expander;
+  }
+
+  static createKeyList(settings, categoryName) {
+    return settings
+      .list_keys()
+      .filter((keyName) => !!keyName && !!categoryName && keyName.startsWith(categoryName))
+      .sort((a, b) => {
+        const aUp = a.toUpperCase();
+        const bUp = b.toUpperCase();
+        if (aUp < bUp) return -1;
+        if (aUp > bUp) return 1;
+        return 0;
+      });
+  }
+}

+ 2 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/metadata.js

@@ -0,0 +1,2 @@
+export const developers = Object.entries([
+].reduce((acc, x) => ({ ...acc, [x.email]: acc[x.email] ?? x.name }), {})).map(([email, name]) => name + ' <' + email + '>')

+ 13 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/prefs-theme-manager.js

@@ -0,0 +1,13 @@
+import GObject from "gi://GObject";
+
+import { ThemeManagerBase } from "../shared/theme.js";
+
+export class PrefsThemeManager extends ThemeManagerBase {
+  static {
+    GObject.registerClass(this);
+  }
+
+  reloadStylesheet() {
+    this.settings.set_string("css-updated", Date.now().toString());
+  }
+}

+ 147 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/settings.js

@@ -0,0 +1,147 @@
+// Gnome imports
+import Adw from "gi://Adw";
+import Gtk from "gi://Gtk";
+import GObject from "gi://GObject";
+
+// Shared state
+import { Logger } from "../shared/logger.js";
+import { production } from "../shared/settings.js";
+
+// Prefs UI
+import { DropDownRow, SwitchRow, PreferencesPage } from "./widgets.js";
+
+// Extension imports
+import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js";
+import { PACKAGE_VERSION } from "resource:///org/gnome/Shell/Extensions/js/misc/config.js";
+
+import { developers } from "./metadata.js";
+
+function showAboutWindow(parent, { version, description: comments }) {
+  const abt = new Adw.AboutWindow({
+    ...(parent && { transient_for: parent }),
+    // TODO: fetch these from github at build time
+    application_name: _("Forge"),
+    application_icon: "forge-logo-symbolic",
+    version: `${PACKAGE_VERSION}-${version.toString()}`,
+    copyright: `© 2021-${new Date().getFullYear()} jmmaranan`,
+    issue_url: "https://github.com/forge-ext/forge/issues/new",
+    license_type: Gtk.License.GPL_3_0,
+    website: "https://github.com/forge-ext/forge",
+    developers,
+    comments,
+    designers: [],
+    translator_credits: _("translator-credits"),
+  });
+  abt.present();
+}
+
+function makeAboutButton(parent, metadata) {
+  const button = new Gtk.Button({
+    icon_name: "help-about-symbolic",
+    tooltip_text: _("About"),
+    valign: Gtk.Align.CENTER,
+  });
+  button.connect("clicked", () => showAboutWindow(parent, metadata));
+  return button;
+}
+
+export class SettingsPage extends PreferencesPage {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({ settings, window, metadata }) {
+    super({ title: _("Settings"), icon_name: "settings-symbolic" });
+    this.add_group({
+      title: _("Settings"),
+      description: _("Toggle Forge's high-level features"),
+      header_suffix: makeAboutButton(window, metadata),
+      children: [
+        new SwitchRow({
+          title: _("Stacked Tiling Mode"),
+          subtitle: _("Stack windows on top of each other while still being tiled"),
+          experimental: true,
+          settings,
+          bind: "stacked-tiling-mode-enabled",
+        }),
+        new SwitchRow({
+          title: _("Tabbed Tiling Mode"),
+          subtitle: _("Group tiles windows as tabs"),
+          experimental: true,
+          settings,
+          bind: "tabbed-tiling-mode-enabled",
+        }),
+      ],
+    });
+
+    this.add_group({
+      title: _("Tiling"),
+      children: [
+        new SwitchRow({
+          title: _("Preview Hint Toggle"),
+          experimental: true,
+          settings,
+          bind: "preview-hint-enabled",
+        }),
+        new SwitchRow({
+          title: _("Show Focus Hint Border"),
+          subtitle: _("Display a colored border around the focused window"),
+          settings,
+          bind: "focus-border-toggle",
+        }),
+        new SwitchRow({
+          title: _("Show Window Split Hint Border"),
+          subtitle: _("Show split direction border on focused window"),
+          settings,
+          bind: "split-border-toggle",
+        }),
+        new DropDownRow({
+          title: _("Default Drag-and-Drop Center Layout"),
+          settings,
+          type: "s",
+          bind: "dnd-center-layout",
+          items: [
+            { id: "tabbed", name: _("Tabbed") },
+            { id: "stacked", name: _("Stacked") },
+          ],
+        }),
+        new SwitchRow({
+          title: _("Auto Split"),
+          subtitle: _("Quarter Tiling"),
+          experimental: true,
+          settings,
+          bind: "auto-split-enabled",
+        }),
+        new SwitchRow({
+          title: _("Float Mode Always On Top"),
+          subtitle: _("Floating windows always above tiling windows"),
+          experimental: true,
+          settings,
+          bind: "float-always-on-top-enabled",
+        }),
+        new SwitchRow({
+          title: _("Show Tiling Quick Settings"),
+          subtitle: _("Toggle showing Forge on quick settings"),
+          experimental: true,
+          settings,
+          bind: "quick-settings-enabled",
+        }),
+      ],
+    });
+
+    if (!production) {
+      this.add_group({
+        title: _("Logger"),
+        children: [
+          new DropDownRow({
+            title: _("Logger Level"),
+            settings,
+            bind: "log-level",
+            items: Object.entries(Logger.LOG_LEVELS).map(([name, id]) => ({ id, name })),
+            type: "u",
+          }),
+        ],
+      });
+    }
+  }
+}

+ 293 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/widgets.js

@@ -0,0 +1,293 @@
+/** @license (c) aylur. GPL v3 */
+
+import Adw from "gi://Adw";
+import Gio from "gi://Gio";
+import Gdk from "gi://Gdk";
+import Gtk from "gi://Gtk";
+import GObject from "gi://GObject";
+
+// GNOME imports
+import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js";
+
+// Shared state
+import { Logger } from "../shared/logger.js";
+
+export class PreferencesPage extends Adw.PreferencesPage {
+  static {
+    GObject.registerClass(this);
+  }
+
+  add_group({ title, description = "", children, header_suffix = "" }) {
+    const group = new Adw.PreferencesGroup({ title, description });
+    for (const child of children) group.add(child);
+    if (header_suffix) group.set_header_suffix(header_suffix);
+    this.add(group);
+  }
+}
+
+export class SwitchRow extends Adw.ActionRow {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({ title, settings, bind, subtitle = "", experimental = false }) {
+    super({ title, subtitle });
+    const gswitch = new Gtk.Switch({
+      active: settings.get_boolean(bind),
+      valign: Gtk.Align.CENTER,
+    });
+    settings.bind(bind, gswitch, "active", Gio.SettingsBindFlags.DEFAULT);
+    if (experimental) {
+      const icon = new Gtk.Image({ icon_name: "bug-symbolic" });
+      icon.set_tooltip_markup(
+        _("<b>CAUTION</b>: Enabling this setting can lead to bugs or cause the shell to crash")
+      );
+      this.add_suffix(icon);
+    }
+    this.add_suffix(gswitch);
+    this.activatable_widget = gswitch;
+  }
+}
+
+export class ColorRow extends Adw.ActionRow {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({ title, init, onChange, subtitle = "" }) {
+    super({ title, subtitle });
+    let rgba = new Gdk.RGBA();
+    rgba.parse(init);
+    this.colorButton = new Gtk.ColorButton({ rgba, use_alpha: true, valign: Gtk.Align.CENTER });
+    this.colorButton.connect("color-set", () => {
+      onChange(this.colorButton.get_rgba().to_string());
+    });
+    this.add_suffix(this.colorButton);
+    this.activatable_widget = this.colorButton;
+  }
+}
+
+export class SpinButtonRow extends Adw.ActionRow {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({
+    title,
+    range: [low, high, step],
+    subtitle = "",
+    init = undefined,
+    onChange = undefined,
+    max_width_chars = undefined,
+    max_length = undefined,
+    width_chars = undefined,
+    xalign = undefined,
+    settings = undefined,
+    bind = undefined,
+  }) {
+    super({ title, subtitle });
+    const gspin = Gtk.SpinButton.new_with_range(low, high, step);
+    gspin.valign = Gtk.Align.CENTER;
+    if (bind && settings) {
+      settings.bind(bind, gspin, "value", Gio.SettingsBindFlags.DEFAULT);
+    } else if (init) {
+      gspin.value = init;
+      gspin.connect("value-changed", (widget) => {
+        onChange?.(widget.value);
+      });
+    }
+    this.add_suffix(gspin);
+    this.activatable_widget = gspin;
+  }
+}
+
+export class DropDownRow extends Adw.ActionRow {
+  static {
+    GObject.registerClass(this);
+  }
+
+  /**
+   * @type {string}
+   * Name of the gsetting key to bind to
+   */
+  bind;
+
+  /**
+   * @type {'b'|'y'|'n'|'q'|'i'|'u'|'x'|'t'|'h'|'d'|'s'|'o'|'g'|'?'|'a'|'m'}
+   * - b: the type string of G_VARIANT_TYPE_BOOLEAN; a boolean value.
+   * - y: the type string of G_VARIANT_TYPE_BYTE; a byte.
+   * - n: the type string of G_VARIANT_TYPE_INT16; a signed 16 bit integer.
+   * - q: the type string of G_VARIANT_TYPE_UINT16; an unsigned 16 bit integer.
+   * - i: the type string of G_VARIANT_TYPE_INT32; a signed 32 bit integer.
+   * - u: the type string of G_VARIANT_TYPE_UINT32; an unsigned 32 bit integer.
+   * - x: the type string of G_VARIANT_TYPE_INT64; a signed 64 bit integer.
+   * - t: the type string of G_VARIANT_TYPE_UINT64; an unsigned 64 bit integer.
+   * - h: the type string of G_VARIANT_TYPE_HANDLE; a signed 32 bit value that, by convention, is used as an index into an array of file descriptors that are sent alongside a D-Bus message.
+   * - d: the type string of G_VARIANT_TYPE_DOUBLE; a double precision floating point value.
+   * - s: the type string of G_VARIANT_TYPE_STRING; a string.
+   * - o: the type string of G_VARIANT_TYPE_OBJECT_PATH; a string in the form of a D-Bus object path.
+   * - g: the type string of G_VARIANT_TYPE_SIGNATURE; a string in the form of a D-Bus type signature.
+   * - ?: the type string of G_VARIANT_TYPE_BASIC; an indefinite type that is a supertype of any of the basic types.
+   * - v: the type string of G_VARIANT_TYPE_VARIANT; a container type that contain any other type of value.
+   * - a: used as a prefix on another type string to mean an array of that type; the type string “ai”, for example, is the type of an array of signed 32-bit integers.
+   * - m: used as a prefix on another type string to mean a “maybe”, or “nullable”, version of that type; the type string “ms”, for example, is the type of a value that maybe contains a string, or maybe contains nothing.
+   */
+  type;
+
+  selected = 0;
+
+  /** @type {{name: string; id: string}[]} */
+  items;
+
+  model = new Gtk.StringList();
+
+  /** @type {Gtk.DropDown} */
+  dropdown;
+
+  constructor({ title, settings, bind, items, subtitle = "", type }) {
+    super({ title, subtitle });
+    this.settings = settings;
+    this.items = items;
+    this.bind = bind;
+    this.type = type ?? this.settings.get_value(bind)?.get_type() ?? "?";
+    this.#build();
+    this.add_suffix(this.dropdown);
+    this.add_suffix(new ResetButton({ settings, bind, onReset: () => this.reset() }));
+  }
+
+  reset() {
+    this.dropdown.selected = 0;
+    this.selected = 0;
+  }
+
+  #build() {
+    for (const { name, id } of this.items) {
+      this.model.append(name);
+      if (this.#get() === id) this.selected = this.items.findIndex((x) => x.id === id);
+    }
+    const { model, selected } = this;
+    this.dropdown = new Gtk.DropDown({ valign: Gtk.Align.CENTER, model, selected });
+    this.dropdown.connect("notify::selected", () => this.#onSelected());
+    this.activatable_widget = this.dropdown;
+  }
+
+  #onSelected() {
+    this.selected = this.dropdown.selected;
+    const { id } = this.items[this.selected];
+    Logger.debug("setting", id, this.selected);
+    this.#set(this.bind, id);
+  }
+
+  static #settingsTypes = {
+    b: "boolean",
+    y: "byte",
+    n: "int16",
+    q: "uint16",
+    i: "int32",
+    u: "uint",
+    x: "int64",
+    t: "uint64",
+    d: "double",
+    s: "string",
+    o: "objv",
+  };
+
+  /**
+   * @param {string} x
+   */
+  #get(x = this.bind) {
+    const methodName = `get_${DropDownRow.#settingsTypes[this.type] ?? "value"}`;
+    return this.settings[methodName]?.(x);
+  }
+
+  /**
+   * @param {string} x
+   * @param {unknown} y
+   */
+  #set(x, y) {
+    const methodName = `set_${DropDownRow.#settingsTypes[this.type] ?? "value"}`;
+    Logger.log(`${methodName}(${x}, ${y})`);
+    return this.settings[methodName]?.(x, y);
+  }
+}
+
+export class ResetButton extends Gtk.Button {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({ settings = undefined, bind = undefined, onReset }) {
+    super({
+      icon_name: "edit-clear-symbolic",
+      tooltip_text: _("Reset"),
+      valign: Gtk.Align.CENTER,
+    });
+    this.connect("clicked", () => {
+      settings?.reset(bind);
+      onReset?.();
+    });
+  }
+}
+
+export class EntryRow extends Adw.EntryRow {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({ title, settings, bind, map }) {
+    super({ title });
+    this.connect("changed", () => {
+      const text = this.get_text();
+      if (typeof text === "string")
+        if (map) {
+          map.to(settings, bind, text);
+        } else {
+          settings.set_string(bind, text);
+        }
+    });
+    const current = map ? map.from(settings, bind) : settings.get_string(bind);
+    this.set_text(current ?? "");
+    this.add_suffix(
+      new ResetButton({
+        settings,
+        bind,
+        onReset: () => {
+          this.set_text((map ? map.from(settings, bind) : settings.get_string(bind)) ?? "");
+        },
+      })
+    );
+  }
+}
+
+export class RadioRow extends Adw.ActionRow {
+  static {
+    GObject.registerClass(this);
+  }
+
+  static orientation = Gtk.Orientation.HORIZONTAL;
+
+  static spacing = 10;
+
+  static valign = Gtk.Align.CENTER;
+
+  constructor({ title, subtitle = "", settings, bind, options }) {
+    super({ title, subtitle });
+    const current = settings.get_string(bind);
+    const labels = Object.fromEntries(Object.entries(options).map(([k, v]) => [v, k]));
+    const { orientation, spacing, valign } = RadioRow;
+    const hbox = new Gtk.Box({ orientation, spacing, valign });
+    let group;
+    for (const [key, label] of Object.entries(options)) {
+      const toggle = new Gtk.ToggleButton({ label, ...(group && { group }) });
+      group ||= toggle;
+      toggle.active = key === current;
+      toggle.connect("clicked", () => {
+        if (toggle.active) {
+          settings.set_string(bind, labels[toggle.label]);
+        }
+      });
+      hbox.append(toggle);
+    }
+    this.add_suffix(hbox);
+  }
+}

+ 29 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/workspace.js

@@ -0,0 +1,29 @@
+// Gnome imports
+import GObject from "gi://GObject";
+
+import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js";
+
+import { EntryRow, PreferencesPage } from "./widgets.js";
+
+export class WorkspacePage extends PreferencesPage {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({ settings }) {
+    super({ title: _("Workspace"), icon_name: "shell-overview-symbolic" });
+    this.add_group({
+      title: _("Update Workspace Settings"),
+      description: _(
+        "Provide workspace indices to skip. E.g. 0,1. Empty text to disable. Enter to accept"
+      ),
+      children: [
+        new EntryRow({
+          title: _("Skip Workspace Tiling"),
+          settings,
+          bind: "workspace-skip-tile",
+        }),
+      ],
+    });
+  }
+}

+ 80 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/logger.js

@@ -0,0 +1,80 @@
+/*
+ * This file is part of the Forge extension for GNOME
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+import { production } from "./settings.js";
+
+export class Logger {
+  static #settings;
+
+  static LOG_LEVELS = {
+    OFF: 0,
+    FATAL: 1,
+    ERROR: 2,
+    WARN: 3,
+    INFO: 4,
+    DEBUG: 5,
+    TRACE: 6,
+    ALL: 7,
+  };
+
+  static init(settings) {
+    this.#settings = settings;
+  }
+
+  static get #level() {
+    if (this.#settings?.get_boolean?.("logging-enabled")) {
+      return production
+        ? Logger.LOG_LEVELS.OFF
+        : this.#settings?.get_uint?.("log-level") ?? Logger.LOG_LEVELS.OFF;
+    }
+    return Logger.LOG_LEVELS.OFF;
+  }
+
+  // TODO: use console.* methods
+  static format(msg, ...params) {
+    return params.reduce((acc, val) => acc.replace("{}", val), msg);
+  }
+
+  static fatal(...args) {
+    if (this.#level > Logger.LOG_LEVELS.OFF) log(`[Forge] [FATAL]`, ...args);
+  }
+
+  static error(...args) {
+    if (this.#level > Logger.LOG_LEVELS.FATAL) log(`[Forge] [ERROR]`, ...args);
+  }
+
+  static warn(...args) {
+    if (this.#level > Logger.LOG_LEVELS.ERROR) log(`[Forge] [WARN]`, ...args);
+  }
+
+  static info(...args) {
+    if (this.#level > Logger.LOG_LEVELS.WARN) log(`[Forge] [INFO]`, ...args);
+  }
+
+  static debug(...args) {
+    if (this.#level > Logger.LOG_LEVELS.INFO) log(`[Forge] [DEBUG]`, ...args);
+  }
+
+  static trace(...args) {
+    if (this.#level > Logger.LOG_LEVELS.DEBUG) log(`[Forge] [TRACE]`, ...args);
+  }
+
+  static log(...args) {
+    if (this.#level > Logger.LOG_LEVELS.OFF) log(`[Forge] [LOG]`, ...args);
+  }
+}

+ 155 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/settings.js

@@ -0,0 +1,155 @@
+/*
+ * This file is part of the Forge Window Manager extension for Gnome 3
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Gnome imports
+import Gio from "gi://Gio";
+import GLib from "gi://GLib";
+import GObject from "gi://GObject";
+
+import { Logger } from "./logger.js";
+
+// Dev or Prod mode, see Makefile:debug
+export const production = true;
+
+export class ConfigManager extends GObject.Object {
+  static {
+    GObject.registerClass(this);
+  }
+
+  #confDir = GLib.get_user_config_dir();
+
+  constructor({ dir }) {
+    super();
+    this.extensionPath = dir.get_path();
+  }
+
+  get confDir() {
+    return `${this.#confDir}/forge`;
+  }
+
+  get defaultStylesheetFile() {
+    const defaultStylesheet = GLib.build_filenamev([this.extensionPath, `stylesheet.css`]);
+
+    Logger.trace(`default-stylesheet: ${defaultStylesheet}`);
+
+    const defaultStylesheetFile = Gio.File.new_for_path(defaultStylesheet);
+    if (defaultStylesheetFile.query_exists(null)) {
+      return defaultStylesheetFile;
+    }
+
+    return null;
+  }
+
+  get stylesheetFile() {
+    const profileSettingPath = `${this.confDir}/stylesheet/forge`;
+    const settingFile = "stylesheet.css";
+    const defaultSettingFile = this.defaultStylesheetFile;
+    return this.loadFile(profileSettingPath, settingFile, defaultSettingFile);
+  }
+
+  get defaultWindowConfigFile() {
+    const defaultWindowConfig = GLib.build_filenamev([
+      this.extensionPath,
+      `config`,
+      `windows.json`,
+    ]);
+
+    Logger.trace(`default-window-config: ${defaultWindowConfig}`);
+    const defaultWindowConfigFile = Gio.File.new_for_path(defaultWindowConfig);
+
+    if (defaultWindowConfigFile.query_exists(null)) {
+      return defaultWindowConfigFile;
+    }
+
+    return null;
+  }
+
+  get windowConfigFile() {
+    const profileSettingPath = `${this.confDir}/config`;
+    const settingFile = "windows.json";
+    const defaultSettingFile = this.defaultWindowConfigFile;
+    return this.loadFile(profileSettingPath, settingFile, defaultSettingFile);
+  }
+
+  loadFile(path, file, defaultFile) {
+    const customSetting = GLib.build_filenamev([path, file]);
+    Logger.trace(`custom-setting-file: ${customSetting}`);
+
+    const customSettingFile = Gio.File.new_for_path(customSetting);
+    if (customSettingFile.query_exists(null)) {
+      return customSettingFile;
+    } else {
+      const profileCustomSettingDir = Gio.File.new_for_path(path);
+      if (!profileCustomSettingDir.query_exists(null)) {
+        if (profileCustomSettingDir.make_directory_with_parents(null)) {
+          const createdStream = customSettingFile.create(Gio.FileCreateFlags.NONE, null);
+          const defaultContents = this.loadFileContents(defaultFile);
+          Logger.trace(defaultContents);
+          createdStream.write_all(defaultContents, null);
+        }
+      }
+    }
+
+    return null;
+  }
+
+  loadFileContents(configFile) {
+    let [success, contents] = configFile.load_contents(null);
+    if (success) {
+      const stringContents = imports.byteArray.toString(contents);
+      return stringContents;
+    }
+  }
+
+  get windowProps() {
+    let windowConfigFile = this.windowConfigFile;
+    let windowProps = null;
+    if (!windowConfigFile || !production) {
+      windowConfigFile = this.defaultWindowConfigFile;
+    }
+
+    let [success, contents] = windowConfigFile.load_contents(null);
+    if (success) {
+      const windowConfigContents = imports.byteArray.toString(contents);
+      Logger.trace(`${windowConfigContents}`);
+      windowProps = JSON.parse(windowConfigContents);
+    }
+    return windowProps;
+  }
+
+  set windowProps(props) {
+    let windowConfigFile = this.windowConfigFile;
+    if (!windowConfigFile || !production) {
+      windowConfigFile = this.defaultWindowConfigFile;
+    }
+
+    let windowConfigContents = JSON.stringify(props, null, 4);
+
+    const PERMISSIONS_MODE = 0o744;
+
+    if (GLib.mkdir_with_parents(windowConfigFile.get_parent().get_path(), PERMISSIONS_MODE) === 0) {
+      let [_, _tag] = windowConfigFile.replace_contents(
+        windowConfigContents,
+        null,
+        false,
+        Gio.FileCreateFlags.REPLACE_DESTINATION,
+        null
+      );
+    }
+  }
+}

+ 279 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/theme.js

@@ -0,0 +1,279 @@
+/*
+ * This file is part of the Forge extension for GNOME
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Gnome imports
+import Gio from "gi://Gio";
+import GLib from "gi://GLib";
+import GObject from "gi://GObject";
+
+// Application imports
+import { stringify, parse } from "../css/index.js";
+import { production } from "./settings.js";
+
+export class ThemeManagerBase extends GObject.Object {
+  static {
+    GObject.registerClass(this);
+  }
+
+  constructor({ configMgr, settings }) {
+    super();
+    this.configMgr = configMgr;
+    this.settings = settings;
+    this._importCss();
+    this.defaultPalette = this.getDefaultPalette();
+
+    // A random number to denote an update on the css, usually the possible next version
+    // in extensions.gnome.org
+    // TODO: need to research the most effective way to bring in CSS updates
+    //  since the schema css-last-update might be triggered when there is a
+    //  code change on the schema unrelated to css updates.
+    //  For now tagging works. See @this.patchCss() and @this._needUpdate().
+    this.cssTag = 37;
+
+    // TODO: should the patchCss() call be done here?
+  }
+
+  /**
+   * @param {string} value
+   */
+  addPx(value) {
+    return `${value}px`;
+  }
+
+  /**
+   * @param {string} value
+   */
+  removePx(value) {
+    return value.replace("px", "");
+  }
+
+  getDefaultPalette() {
+    return {
+      tiled: this.getDefaults("tiled"),
+      split: this.getDefaults("split"),
+      floated: this.getDefaults("floated"),
+      stacked: this.getDefaults("stacked"),
+      tabbed: this.getDefaults("tabbed"),
+    };
+  }
+
+  /**
+   * The scheme name is in between the CSS selector name
+   * E.g. window-tiled-color should return `tiled`
+   * @param {string} selector
+   */
+  getColorSchemeBySelector(selector) {
+    if (!selector.includes("-")) return null;
+    let firstDash = selector.indexOf("-");
+    let secondDash = selector.indexOf("-", firstDash + 1);
+    const scheme = selector.substr(firstDash + 1, secondDash - firstDash - 1);
+    return scheme;
+  }
+
+  /**
+   * @param {string} color
+   */
+  getDefaults(color) {
+    return {
+      color: this.getCssProperty(`.${color}`, "color").value,
+      "border-width": this.removePx(this.getCssProperty(`.${color}`, "border-width").value),
+      opacity: this.getCssProperty(`.${color}`, "opacity").value,
+    };
+  }
+
+  /**
+   * @param {any} selector
+   */
+  getCssRule(selector) {
+    if (this.cssAst) {
+      const rules = this.cssAst.stylesheet.rules;
+      // return only the first match, Forge CSS authors should make sure class names are unique :)
+      const matchRules = rules.filter((r) => r.selectors.filter((s) => s === selector).length > 0);
+      return matchRules.length > 0 ? matchRules[0] : {};
+    }
+    return {};
+  }
+
+  /**
+   * @param {string} selector
+   * @param {string} propertyName
+   */
+  getCssProperty(selector, propertyName) {
+    const cssRule = this.getCssRule(selector);
+
+    if (cssRule) {
+      const matchDeclarations = cssRule.declarations.filter((d) => d.property === propertyName);
+      return matchDeclarations.length > 0 ? matchDeclarations[0] : {};
+    }
+
+    return {};
+  }
+
+  /**
+   * @param {string} selector
+   * @param {string} propertyName
+   * @param {string} propertyValue
+   */
+  setCssProperty(selector, propertyName, propertyValue) {
+    const cssProperty = this.getCssProperty(selector, propertyName);
+    if (cssProperty) {
+      cssProperty.value = propertyValue;
+      this._updateCss();
+      return true;
+    }
+    return false;
+  }
+
+  /**
+   * Returns the AST for stylesheet.css
+   */
+  _importCss() {
+    let cssFile = this.configMgr.stylesheetFile;
+    if (!cssFile || !production) {
+      cssFile = this.configMgr.defaultStylesheetFile;
+    }
+
+    let [success, contents] = cssFile.load_contents(null);
+    if (success) {
+      const cssContents = new TextDecoder().decode(contents);
+      this.cssAst = parse(cssContents);
+    }
+  }
+
+  /**
+   * Writes the AST back to stylesheet.css and reloads the theme
+   */
+  _updateCss() {
+    if (!this.cssAst) {
+      return;
+    }
+
+    let cssFile = this.configMgr.stylesheetFile;
+    if (!cssFile || !production) {
+      cssFile = this.configMgr.defaultStylesheetFile;
+    }
+
+    const cssContents = stringify(this.cssAst);
+    const PERMISSIONS_MODE = 0o744;
+
+    if (GLib.mkdir_with_parents(cssFile.get_parent().get_path(), PERMISSIONS_MODE) === 0) {
+      let [success, _tag] = cssFile.replace_contents(
+        cssContents,
+        null,
+        false,
+        Gio.FileCreateFlags.REPLACE_DESTINATION,
+        null
+      );
+      if (success) {
+        this.reloadStylesheet();
+      }
+    }
+  }
+
+  /**
+   * BREAKING: Patches the CSS by overriding the $HOME/.config stylesheet
+   * at the moment.
+   *
+   * TODO: work needed to consolidate the existing config stylesheet and
+   * when the extension default stylesheet gets an update.
+   */
+  patchCss() {
+    if (this._needUpdate()) {
+      let originalCss = this.configMgr.defaultStylesheetFile;
+      let configCss = this.configMgr.stylesheetFile;
+      let copyConfigCss = Gio.File.new_for_path(this.configMgr.stylesheetFileName + ".bak");
+      let backupFine = configCss.copy(copyConfigCss, Gio.FileCopyFlags.OVERWRITE, null, null);
+      let copyFine = originalCss.copy(configCss, Gio.FileCopyFlags.OVERWRITE, null, null);
+      if (backupFine && copyFine) {
+        this.settings.set_uint("css-last-update", this.cssTag);
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Credits: ExtensionSystem.js:_callExtensionEnable()
+   */
+  reloadStylesheet() {
+    throw new Error("Must implement reloadStylesheet");
+  }
+
+  _needUpdate() {
+    let cssTag = this.cssTag;
+    return this.settings.get_uint("css-last-update") !== cssTag;
+  }
+}
+
+/**
+ * Credits: Color Space conversion functions from CSS Tricks
+ * https://css-tricks.com/converting-color-spaces-in-javascript/
+ */
+export function RGBAToHexA(rgba) {
+  let sep = rgba.indexOf(",") > -1 ? "," : " ";
+  rgba = rgba.substr(5).split(")")[0].split(sep);
+
+  // Strip the slash if using space-separated syntax
+  if (rgba.indexOf("/") > -1) rgba.splice(3, 1);
+
+  for (let R in rgba) {
+    let r = rgba[R];
+    if (r.indexOf("%") > -1) {
+      let p = r.substr(0, r.length - 1) / 100;
+
+      if (R < 3) {
+        rgba[R] = Math.round(p * 255);
+      } else {
+        rgba[R] = p;
+      }
+    }
+  }
+  let r = (+rgba[0]).toString(16),
+    g = (+rgba[1]).toString(16),
+    b = (+rgba[2]).toString(16),
+    a = Math.round(+rgba[3] * 255).toString(16);
+
+  if (r.length == 1) r = "0" + r;
+  if (g.length == 1) g = "0" + g;
+  if (b.length == 1) b = "0" + b;
+  if (a.length == 1) a = "0" + a;
+
+  return "#" + r + g + b + a;
+}
+
+export function hexAToRGBA(h) {
+  let r = 0,
+    g = 0,
+    b = 0,
+    a = 1;
+
+  if (h.length == 5) {
+    r = "0x" + h[1] + h[1];
+    g = "0x" + h[2] + h[2];
+    b = "0x" + h[3] + h[3];
+    a = "0x" + h[4] + h[4];
+  } else if (h.length == 9) {
+    r = "0x" + h[1] + h[2];
+    g = "0x" + h[3] + h[4];
+    b = "0x" + h[5] + h[6];
+    a = "0x" + h[7] + h[8];
+  }
+  a = +(a / 255).toFixed(3);
+
+  return "rgba(" + +r + "," + +g + "," + +b + "," + a + ")";
+}

BIN
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/es/LC_MESSAGES/forge.mo


BIN
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/fr/LC_MESSAGES/forge.mo


BIN
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/it/LC_MESSAGES/forge.mo


BIN
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/nl/LC_MESSAGES/forge.mo


BIN
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/pt_BR/LC_MESSAGES/forge.mo


+ 17 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/metadata.json

@@ -0,0 +1,17 @@
+{
+  "_generated": "Generated by SweetTooth, do not edit",
+  "description": "Tiling and window manager for GNOME\n\nPlease report bugs/issues on https://github.com/forge-ext/forge/issues",
+  "gettext-domain": "forge",
+  "name": "Forge",
+  "session-modes": [
+    "unlock-dialog",
+    "user"
+  ],
+  "settings-schema": "org.gnome.shell.extensions.forge",
+  "shell-version": [
+    "45"
+  ],
+  "url": "https://github.com/forge-ext/forge",
+  "uuid": "forge@jmmaranan.com",
+  "version": 77
+}

+ 53 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/prefs.js

@@ -0,0 +1,53 @@
+/*
+ * This file is part of the Forge GNOME extension
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Gnome imports
+import Gdk from "gi://Gdk";
+import Gtk from "gi://Gtk";
+
+import { ExtensionPreferences } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js";
+
+import { KeyboardPage } from "./lib/prefs/keyboard.js";
+import { AppearancePage } from "./lib/prefs/appearance.js";
+import { WorkspacePage } from "./lib/prefs/workspace.js";
+import { SettingsPage } from "./lib/prefs/settings.js";
+
+export default class ForgeExtensionPreferences extends ExtensionPreferences {
+  settings = this.getSettings();
+
+  kbdSettings = this.getSettings("org.gnome.shell.extensions.forge.keybindings");
+
+  constructor(...args) {
+    super(...args);
+    const iconPath = this.dir.get_child("resources").get_child("icons").get_path();
+    const iconTheme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default());
+    iconTheme.add_search_path(iconPath);
+  }
+
+  fillPreferencesWindow(window) {
+    this.window = window;
+    window._settings = this.settings;
+    window._kbdSettings = this.kbdSettings;
+    window.add(new SettingsPage(this));
+    window.add(new AppearancePage(this));
+    window.add(new WorkspacePage(this));
+    window.add(new KeyboardPage(this));
+    window.search_enabled = true;
+    window.can_navigate_back = true;
+  }
+}

+ 5 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/applications-science-symbolic.svg

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
+    <path d="m 4.996094 0 c -1.03125 0.00390625 -1.386719 1.371094 -0.484375 1.871094 l 0.488281 0.273437 v 2.683594 c -0.128906 0.207031 -0.25 0.390625 -0.441406 0.714844 c -0.269532 0.472656 -0.601563 1.0625 -0.964844 1.707031 c -0.722656 1.296875 -1.554688 2.910156 -2.203125 4.09375 c -0.574219 1.046875 -0.550781 2.453125 0.300781 3.511719 c 0.671875 0.902343 1.738282 1.140625 2.617188 1.140625 h 7.351562 c 0.878906 0 1.949219 -0.238282 2.621094 -1.140625 c 0.851562 -1.058594 0.867188 -2.464844 0.296875 -3.511719 c -1.164063 -2.371094 -2.472656 -4.316406 -3.5625 -6.496094 v -2.699218 l 0.488281 -0.277344 c 0.902344 -0.5 0.546875 -1.871094 -0.484375 -1.871094 z m 2.003906 2 h 2.015625 v 3.105469 c 0 0.152343 0.035156 0.304687 0.101563 0.441406 c 1.203124 2.457031 2.574218 4.441406 3.6875 6.714844 c 0.003906 0.011719 0.011718 0.027343 0.015624 0.039062 c 0.242188 0.441407 0.257813 0.882813 -0.097656 1.316407 c -0.011718 0.011718 -0.023437 0.027343 -0.035156 0.042968 c -0.144531 0.199219 -0.488281 0.335938 -1.027344 0.335938 h -7.351562 c -0.539063 0 -0.882813 -0.136719 -1.027344 -0.335938 c -0.011719 -0.015625 -0.023438 -0.027344 -0.035156 -0.042968 c -0.351563 -0.433594 -0.339844 -0.875 -0.097656 -1.316407 c 0.644531 -1.179687 1.472656 -2.789062 2.191406 -4.070312 c 0.359375 -0.644531 0.6875 -1.230469 0.953125 -1.683594 c 0.261719 -0.453125 0.488281 -0.8125 0.515625 -0.847656 c 0.125 -0.171875 0.191406 -0.378907 0.191406 -0.589844 z m 0 0" fill="#2e3436"/>
+    <path d="m 6.21875 9 l -2.21875 4 h 8 l -2.21875 -4 z m 0 0" fill="#2e3434" fill-opacity="0.34902"/>
+</svg>

+ 1 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/appointment-soon-symbolic.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M8 1a7 7 0 0 0-7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0-7-7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5z" fill="#555555"/><path d="M10.49 4.996a.5.5 0 0 0-.344.15L8 7.293 6.354 5.646a.5.5 0 1 0-.708.708l2 2a.5.5 0 0 0 .708 0l2.5-2.5a.5.5 0 0 0-.364-.858z" fill="#555555"/></svg>

+ 2 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/brush-symbolic.svg

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 6.78125 6.9375 c 0.066406 0.257812 0.230469 0.476562 0.460938 0.613281 c 0.476562 0.277344 1.089843 0.121094 1.371093 -0.355469 l 3.3125 -5.625 c 0.277344 -0.476562 0.121094 -1.089843 -0.355469 -1.371093 c -0.476562 -0.277344 -1.089843 -0.121094 -1.371093 0.355469 l -3.3125 5.625 c -0.132813 0.226562 -0.171875 0.5 -0.105469 0.757812 z m 0 0"/><path d="m 5.21875 5.09375 l 4.949219 3.054688 c 0.601562 0.3125 0.816406 1.113281 0.164062 1.597656 l -0.625 0.214844 l -6.015625 -3.519532 l 0.015625 -0.910156 c 0.289063 -0.585938 0.753907 -0.816406 1.511719 -0.4375 z m 0 0"/><path d="m 3.054688 7.488281 l 5.988281 3.476563 l -1.042969 1.539062 c -0.222656 0.246094 -0.132812 0.574219 0.085938 0.707032 l 0.953124 0.820312 h -5.371093 c -2.191407 0 -3.195313 -2.066406 -2.144531 -3.890625 z m 0 0"/></svg>

+ 2 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/bug-symbolic.svg

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 5 0 c -0.550781 0 -1 0.449219 -1 1 c 0 0.691406 0.390625 1.285156 0.800781 1.605469 c -0.503906 0.671875 -0.800781 1.5 -0.800781 2.394531 h -1 v -1 h -2 v 1 c 0 0.832031 0.5625 1.523438 1.050781 1.769531 c 0.492188 0.246094 0.949219 0.230469 0.949219 0.230469 h 1 v 1 h -3 v 2 h 3 v 1 h -1 s -0.457031 -0.015625 -0.949219 0.230469 c -0.488281 0.246093 -1.050781 0.9375 -1.050781 1.769531 v 3 h 2 v -3 h 1.128906 c 0.449219 1.71875 2.015625 3 3.871094 3 s 3.421875 -1.28125 3.871094 -3 h 1.128906 v 3 h 2 v -3 c 0 -0.832031 -0.5625 -1.523438 -1.050781 -1.769531 c -0.492188 -0.246094 -0.949219 -0.230469 -0.949219 -0.230469 h -1 v -1 h 3 v -2 h -3 v -1 h 1 s 0.457031 0.015625 0.949219 -0.230469 c 0.488281 -0.246093 1.050781 -0.9375 1.050781 -1.769531 v -1 h -2 v 1 h -1 c 0 -0.894531 -0.296875 -1.722656 -0.800781 -2.394531 c 0.410156 -0.320313 0.800781 -0.914063 0.800781 -1.605469 c 0 -0.550781 -0.449219 -1 -1 -1 s -1 0.449219 -1 1 c -0.238281 0 -0.464844 0.085938 -0.644531 0.238281 c -0.425781 -0.152343 -0.882813 -0.238281 -1.355469 -0.238281 s -0.929688 0.085938 -1.355469 0.238281 c -0.179687 -0.152343 -0.40625 -0.238281 -0.644531 -0.238281 c 0 -0.550781 -0.449219 -1 -1 -1 z m 2.96875 5.03125 h 0.0625 c 0.535156 0 0.96875 0.433594 0.96875 0.96875 v 3.0625 c 0 0.535156 -0.433594 0.96875 -0.96875 0.96875 h -0.0625 c -0.535156 0 -0.96875 -0.433594 -0.96875 -0.96875 v -3.0625 c 0 -0.535156 0.433594 -0.96875 0.96875 -0.96875 z m 0 6 h 0.0625 c 0.535156 0 0.96875 0.433594 0.96875 0.96875 v 0.0625 c 0 0.535156 -0.433594 0.96875 -0.96875 0.96875 h -0.0625 c -0.535156 0 -0.96875 -0.433594 -0.96875 -0.96875 v -0.0625 c 0 -0.535156 0.433594 -0.96875 0.96875 -0.96875 z m 0 0"/></svg>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 6 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/code-context-symbolic.svg


+ 8 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/color-picker-symbolic.svg

@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+ <defs>
+  <style id="current-color-scheme" type="text/css">
+   .ColorScheme-Text { color:#565656; } .ColorScheme-Highlight { color:#5294e2; }
+  </style>
+ </defs>
+ <path style="fill:currentColor" class="ColorScheme-Text" d="M 8 1 C 7.79297 1.66364 7.5132275 2.3110656 7.2109375 2.9472656 C 5.6704375 6.0974656 3.2599437 8.2540875 3.0273438 10.242188 C 3.0213438 10.271888 3.0052 10.304384 3 10.333984 L 3.0195312 10.339844 C 3.0145313 10.408244 3 10.476722 3 10.544922 C 3 13.005122 5.2386 15 8 15 C 10.7614 15 13 13.005122 13 10.544922 C 13 10.476722 12.985469 10.408214 12.980469 10.339844 L 13 10.333984 C 12.995 10.304484 12.978956 10.271887 12.972656 10.242188 C 12.740106 8.2539875 10.329662 6.0973656 8.7890625 2.9472656 C 8.4867825 2.3110456 8.20702 1.6636 8 1 z"/>
+</svg>

+ 8 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/color-select-symbolic.svg

@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
+ <defs>
+  <style id="current-color-scheme" type="text/css">
+   .ColorScheme-Text { color:#565656; } .ColorScheme-Highlight { color:#5294e2; }
+  </style>
+ </defs>
+ <path style="fill:currentColor" class="ColorScheme-Text" d="m 13.456086,1.0006868 c -0.38886,0.011288 -0.758096,0.1736868 -1.029397,0.4526607 l -2.353186,2.3550062 -0.0039,-0.00585 L 8.1355916,1.8669891 6.7240702,3.2796026 8.1609366,4.7175807 1.0000001,11.884057 v 3.115944 h 3.115479 L 11.274466,7.8354729 12.713282,9.273451 14.124804,7.8608375 12.190786,5.9272739 14.543971,3.5722677 C 15.521581,2.6194252 14.82011,0.96132714 13.456086,1.0006868 Z M 8.9973154,5.5468049 10.408838,6.9594183 3.5325442,13.841031 2.1210229,12.428418 Z"/>
+</svg>

+ 8 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/colorfx-symbolic.svg

@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
+ <defs>
+  <style id="current-color-scheme" type="text/css">
+   .ColorScheme-Text { color:#565656; } .ColorScheme-Highlight { color:#5294e2; }
+  </style>
+ </defs>
+ <path style="fill:currentColor" class="ColorScheme-Text" d="M 7 0 L 7 2 L 9 2 L 9 0 L 8.5 0 L 7.5 0 L 7 0 z M 3.0507812 1.6367188 L 2.703125 1.984375 L 2.6875 1.96875 L 1.96875 2.6875 L 1.984375 2.703125 L 1.6367188 3.0507812 L 3.0507812 4.4648438 L 4.4648438 3.0507812 L 3.0507812 1.6367188 z M 12.949219 1.6367188 L 11.535156 3.0507812 L 12.949219 4.4648438 L 14.363281 3.0507812 L 14.015625 2.703125 L 14.03125 2.6875 L 13.3125 1.96875 L 13.296875 1.984375 L 12.949219 1.6367188 z M 8 3 C 5.2386 3 3 5.2386 3 8 C 3 10.7614 5.2386 13 8 13 C 10.7614 13 13 10.7614 13 8 C 13 5.2386 10.7614 3 8 3 z M 0 7 L 0 7.5 L 0 8.5 L 0 9 L 2 9 L 2 7 L 0 7 z M 14 7 L 14 9 L 16 9 L 16 8.5 L 16 7.5 L 16 7 L 14 7 z M 3.0507812 11.535156 L 1.6367188 12.949219 L 1.984375 13.296875 L 1.96875 13.3125 L 2.6875 14.03125 L 2.703125 14.015625 L 3.0507812 14.363281 L 4.4648438 12.949219 L 3.0507812 11.535156 z M 12.949219 11.535156 L 11.535156 12.949219 L 12.949219 14.363281 L 13.296875 14.015625 L 13.3125 14.03125 L 14.03125 13.3125 L 14.015625 13.296875 L 14.363281 12.949219 L 12.949219 11.535156 z M 7 14 L 7 16 L 7.5 16 L 8.5 16 L 9 16 L 9 14 L 7 14 z"/>
+</svg>

+ 49 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/forge-logo-symbolic.svg

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   width="16"
+   height="16"
+   viewBox="0 0 16 16"
+   version="1.1"
+   id="svg432"
+   sodipodi:docname="forge-logo-symbolic.svg"
+   inkscape:version="1.1 (c68e22c387, 2021-05-23)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview434"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     showgrid="true"
+     inkscape:zoom="32"
+     inkscape:cx="20.5625"
+     inkscape:cy="3.421875"
+     inkscape:window-width="3440"
+     inkscape:window-height="1376"
+     inkscape:window-x="0"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg432">
+    <inkscape:grid
+       type="xygrid"
+       id="grid537" />
+  </sodipodi:namedview>
+  <defs
+     id="defs428">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+   .ColorScheme-Text { color:#565656; } .ColorScheme-Highlight { color:#5294e2; }
+  </style>
+  </defs>
+  <path
+     id="path430"
+     style="fill:#b3b3b3"
+     d="m 3,1 c 0,0 -0.075642,0.00414 -0.1816406,0.023437 -0.204,0.0302 -0.3586563,0.103425 -0.4726563,0.203125 -0.022,0.016899 -0.043453,0.035087 -0.064453,0.054687 -0.019,0.021 -0.037688,0.042353 -0.054687,0.064453 -0.099999,0.114 -0.172125,0.2684563 -0.203125,0.4726563 C 2.0043975,1.923759 2,2 2,2 v 12 l 4,1 v -4 h 5 L 12,7 H 6 V 5 h 7 l 1,-4 z"
+     sodipodi:nodetypes="ccccccccccccccccc" />
+</svg>

+ 3 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/go-home-symbolic.svg

@@ -0,0 +1,3 @@
+<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path class="ColorScheme-Text" d="m8.5 1.4141c-0.25562 0-0.51116 0.0971-0.70703 0.29297l-5.6562 5.6562c-0.39174 0.39174-0.39174 1.0223 0 1.4141 0.23669 0.23669 0.55752 0.313 0.86328 0.26367v4.959h2v-6.6719l3.5-3.5 3.5 3.5v6.6719h2v-4.959c0.30576 0.04933 0.62659-0.026981 0.86328-0.26367 0.39174-0.39174 0.39174-1.0223 0-1.4141l-5.6562-5.6562c-0.19587-0.19587-0.45141-0.29297-0.70703-0.29297zm0 7.5859c-0.831 0-1.5 0.669-1.5 1.5v3.5h3v-3.5c0-0.831-0.669-1.5-1.5-1.5z" color="#aaaaaa" fill="currentColor"/>
+</svg>

+ 8 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/go-next-symbolic.svg

@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
+ <defs>
+  <style id="current-color-scheme" type="text/css">
+   .ColorScheme-Text { color:#555555; } .ColorScheme-Highlight { color:#5294e2; }
+  </style>
+ </defs>
+ <path class="ColorScheme-Text" style="fill:currentColor" d="M 2,9 H 10 L 6.5,12.5 8,14 14,8 8,2 6.5,3.5 10,7 H 2 Z"/>
+</svg>

+ 1 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/input-keyboard-symbolic.svg

@@ -0,0 +1 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg" enable-background="new"><defs><filter id="a" color-interpolation-filters="sRGB"><feBlend in2="BackgroundImage" mode="darken"/></filter></defs><path d="M2 2.003s-2 0-2 2v8c0 2 2 2 2 2h11s2 0 2-2v-8c0-2-2-2-2-2H2zm.25 2h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25zm3 0h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25zm3 0h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25zm3 0h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25zm-9 3h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25zm3 0h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25zm3 0h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25zm3 0h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25zm-7 3h6.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-6.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25z" fill="#555"/></svg>

+ 5 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/larger-brush-symbolic.svg

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px">
+  <path fill="#2e3436" d="m 7.996094 0 c -1.109375 0 -2 0.890625 -2 2 v 3.003906 c 0 0.632813 -0.480469 0.996094 -1 0.996094 h -1 c -1.109375 0 -2 0.890625 -2 2 v 1 h 12 v -1 c 0 -1.109375 -0.894532 -2 -2 -2 h -0.976563 c -0.53125 0 -1.023437 -0.359375 -1.023437 -1 v -3 c 0 -1.109375 -0.894532 -2 -2 -2 z m 0 1.40625 c 0.324218 0 0.59375 0.265625 0.59375 0.59375 s -0.269532 0.59375 -0.59375 0.59375 c -0.328125 0 -0.59375 -0.265625 -0.59375 -0.59375 s 0.265625 -0.59375 0.59375 -0.59375 z m 0 0"/>
+  <path fill="#2e3436" d="m 2 10 h 12 l -0.800781 5.003906 c -0.199219 0.820313 -0.699219 0.996094 -1.246094 0.996094 h -1.953125 v -3 l -1.125 3 h -1.847656 l -0.027344 -3 l -1.035156 3 h -0.964844 v -1.5 l -1 1.5 h -3 l 0.210938 -1.046875 z m 0 0"/>
+</svg>

+ 4 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/preferences-desktop-apps-symbolic.svg

@@ -0,0 +1,4 @@
+<svg width="16.006" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="m1 0c-0.554 0-1 0.446-1 1v5c0 0.554 0.446 1 1 1h5c0.554 0 1-0.446 1-1v-5c0-0.554-0.446-1-1-1z" fill="#555555" style="paint-order:stroke fill markers"/>
+ <path d="m9 0c-0.554 0-1 0.446-1 1v5c0 0.554 0.446 1 1 1h5c0.554 0 1-0.446 1-1v-5c0-0.554-0.446-1-1-1zm1 2h3v3h-3zm-9 6c-0.554 0-1 0.446-1 1v5c0 0.554 0.446 1 1 1h5c0.554 0 1-0.446 1-1v-5c0-0.554-0.446-1-1-1zm8 0c-0.554 0-1 0.446-1 1v5c0 0.554 0.446 1 1 1h5c0.554 0 1-0.446 1-1v-5c0-0.554-0.446-1-1-1zm-7 2h3v3h-3zm8 0h3v3h-3z" fill="#555555" opacity=".5" style="paint-order:stroke fill markers"/>
+</svg>

+ 1 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/preferences-desktop-keyboard-symbolic.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M.5 1h6c.277 0 .5.223.5.5v5c0 .277-.223.5-.5.5h-6a.499.499 0 0 1-.5-.5v-5c0-.277.223-.5.5-.5z" opacity=".3" fill="none"/><path d="M9.5 0C8.669 0 8 .67 8 1.5v4C8 6.33 8.669 7 9.5 7h4c.831 0 1.5-.67 1.5-1.5v-4c0-.83-.669-1.5-1.5-1.5zm.06 1c1.291.13 2.589.12 3.88 0 .3-.03.56.26.56.56v2.88c0 .3-.26.52-.56.56-1.261.15-2.539.18-3.88 0-.3-.04-.56-.26-.56-.56V1.56c0-.3.26-.59.56-.56zM1.5 1C.669 1 0 1.67 0 2.5v3C0 6.33.669 7 1.5 7h4C6.33 7 7 6.33 7 5.5v-3C7 1.67 6.33 1 5.5 1zm.06 1c1.692.2 2.849.13 3.88 0 .3-.04.56.26.56.56v2.88c0 .3-.26.52-.56.56-1.221.16-2.499.18-3.88 0-.3-.04-.56-.26-.56-.56V2.56c0-.3.26-.6.56-.56zM1.49 8C.659 8 0 8.67 0 9.5v4c0 .83.659 1.5 1.49 1.5h9.01c.831 0 1.5-.67 1.5-1.5v-4c0-.995-.669-1.5-1.5-1.5zm.06 1c3.183.27 6.116.23 8.89 0 .3-.03.56.26.56.56v2.88c0 .3-.26.53-.56.56-3.004.34-5.967.33-8.89 0-.3-.03-.55-.26-.55-.56V9.56c0-.3.25-.59.55-.56z" fill="#555555"/></svg>

+ 1 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/preferences-desktop-wallpaper-symbolic.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M7 3v5H3v2h10V3z" opacity=".3" fill="#555555"/><path d="M6 3L3 7h3z" fill="#555555"/><path d="M2 0C0 0 0 2 0 2v9s0 2 2 2h12s2 0 2-2V2s0-2-2-2zm0 2h12v9H2zm1 13v1h10v-1c0-1-1-1-1-1H4s-1 0-1 1z" fill="#555555"/></svg>

+ 2 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/settings-symbolic.svg

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 7.5 1.019531 c -0.550781 0 -0.996094 0.445313 -0.996094 0.996094 v 0.453125 c -0.472656 0.128906 -0.929687 0.320312 -1.355468 0.566406 l -0.324219 -0.324218 c -0.390625 -0.390626 -1.019531 -0.390626 -1.410157 0 l -0.703124 0.707031 c -0.390626 0.390625 -0.390626 1.019531 0 1.410156 l 0.320312 0.320313 c -0.246094 0.425781 -0.433594 0.882812 -0.5625 1.355468 h -0.453125 c -0.550781 0 -0.996094 0.445313 -0.996094 0.996094 v 1 c 0 0.550781 0.445313 0.996094 0.996094 0.996094 h 0.449219 c 0.132812 0.472656 0.320312 0.929687 0.566406 1.355468 l -0.320312 0.320313 c -0.390626 0.390625 -0.390626 1.019531 0 1.410156 l 0.703124 0.707031 c 0.390626 0.390626 1.019532 0.390626 1.410157 0 l 0.320312 -0.320312 c 0.429688 0.242188 0.882813 0.433594 1.359375 0.558594 v 0.457031 c 0 0.550781 0.445313 0.996094 0.996094 0.996094 h 0.996094 c 0.554687 0 1 -0.445313 1 -0.996094 v -0.453125 c 0.472656 -0.128906 0.929687 -0.320312 1.355468 -0.566406 l 0.320313 0.324218 c 0.390625 0.390626 1.019531 0.390626 1.410156 0 l 0.707031 -0.707031 c 0.390626 -0.390625 0.390626 -1.019531 0 -1.410156 l -0.320312 -0.320313 c 0.242188 -0.425781 0.433594 -0.882812 0.558594 -1.355468 h 0.453125 c 0.554687 0 1 -0.445313 1 -0.996094 v -1 c 0 -0.550781 -0.445313 -0.996094 -1 -0.996094 h -0.449219 c -0.128906 -0.472656 -0.320312 -0.929687 -0.566406 -1.355468 l 0.324218 -0.320313 c 0.390626 -0.390625 0.390626 -1.019531 0 -1.410156 l -0.707031 -0.707031 c -0.390625 -0.390626 -1.019531 -0.390626 -1.410156 0 l -0.320313 0.320312 c -0.425781 -0.242188 -0.882812 -0.429688 -1.355468 -0.558594 v -0.457031 c 0 -0.550781 -0.445313 -0.996094 -1 -0.996094 z m 0.515625 3.976563 c 1.660156 0 3 1.34375 3 3 s -1.339844 3 -3 3 c -1.65625 0 -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 z m 0 0"/></svg>

+ 2 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/shell-overview-symbolic.svg

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 3 1 c -1.644531 0 -3 1.355469 -3 3 v 5 c 0 1.644531 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355469 3 -3 v -5 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 2 h 10 c 0.570312 0 1 0.429688 1 1 v 5 c 0 0.570312 -0.429688 1 -1 1 h -10 c -0.570312 0 -1 -0.429688 -1 -1 v -5 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/><path d="m 5.503906 14.503906 c 0 0.832032 -0.671875 1.503906 -1.503906 1.503906 s -1.503906 -0.671874 -1.503906 -1.503906 c 0 -0.832031 0.671875 -1.503906 1.503906 -1.503906 s 1.503906 0.671875 1.503906 1.503906 z m 0 0"/><path d="m 9.503906 14.503906 c 0 0.832032 -0.671875 1.503906 -1.503906 1.503906 s -1.503906 -0.671874 -1.503906 -1.503906 c 0 -0.832031 0.671875 -1.503906 1.503906 -1.503906 s 1.503906 0.671875 1.503906 1.503906 z m 0 0"/><path d="m 13.503906 14.503906 c 0 0.832032 -0.671875 1.503906 -1.503906 1.503906 s -1.503906 -0.671874 -1.503906 -1.503906 c 0 -0.832031 0.671875 -1.503906 1.503906 -1.503906 s 1.503906 0.671875 1.503906 1.503906 z m 0 0"/></svg>

+ 3 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/tab-new-symbolic.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
+ <path style="fill:#555555" d="M 4,2 C 4,2 2,2 2,4 V 11 C 2,12 1,12 1,12 H 0 V 14 H 16 V 12 H 15 C 15,12 14,12 14,11 V 4 C 14,4 14,2 12,2 Z M 7,5 H 9 V 7 H 11 V 9 H 9 V 11 H 7 V 9 H 5 V 7 H 7 Z"/>
+</svg>

+ 3 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/tool-brush-symbolic.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
+ <path style="fill:#555555" d="M 8,1 C 7,1 7,2 7,2 V 6 C 7,6 5,6 5,7 V 9 H 12 V 7 C 12,6 10,6 10,6 V 2 C 10,2 10,1 9,1 Z M 5,10 C 5,12.761 4.1046,15 3,15 H 10 C 11.105,15 12,12.761 12,10 Z"/>
+</svg>

+ 3 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/tool-rectangle-symbolic.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
+ <path style="fill:#555555" d="M 1,1 V 15 H 15 V 1 Z M 3,3 H 13 V 13 H 3 Z"/>
+</svg>

+ 45 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/utilities-tweak-tool-symbolic.svg

@@ -0,0 +1,45 @@
+<?xml version='1.0' encoding='UTF-8' standalone='no'?>
+<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' height='16.003357' id='svg7384' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' style='enable-background:new' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
+  <metadata id='metadata90'>
+    <rdf:RDF>
+      <cc:Work rdf:about=''>
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
+        <dc:title>Pop Symbolic Icon Theme</dc:title>
+        <cc:license rdf:resource='http://creativecommons.org/licenses/by-sa/4.0/'/>
+      </cc:Work>
+      <cc:License rdf:about='http://creativecommons.org/licenses/by-sa/4.0/'>
+        <cc:permits rdf:resource='http://creativecommons.org/ns#Reproduction'/>
+        <cc:permits rdf:resource='http://creativecommons.org/ns#Distribution'/>
+        <cc:requires rdf:resource='http://creativecommons.org/ns#Notice'/>
+        <cc:requires rdf:resource='http://creativecommons.org/ns#Attribution'/>
+        <cc:permits rdf:resource='http://creativecommons.org/ns#DerivativeWorks'/>
+        <cc:requires rdf:resource='http://creativecommons.org/ns#ShareAlike'/>
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <title id='title8473'>Pop Symbolic Icon Theme</title>
+  <defs id='defs7386'>
+    <linearGradient id='linearGradient6882' osb:paint='solid'>
+      <stop id='stop6884' offset='0' style='stop-color:#555555;stop-opacity:1;'/>
+    </linearGradient>
+    <linearGradient id='linearGradient5606' osb:paint='solid'>
+      <stop id='stop5608' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
+    </linearGradient>
+    <filter id='filter7554' style='color-interpolation-filters:sRGB'>
+      <feBlend id='feBlend7556' in2='BackgroundImage' mode='darken'/>
+    </filter>
+  </defs>
+  <g id='layer9' style='display:inline' transform='translate(-1185.0317,635.00336)'/>
+  <g id='layer10' style='display:inline;filter:url(#filter7554)' transform='translate(-1185.0317,635.00336)'/>
+  <g id='layer1' style='display:inline' transform='translate(-944.03145,18.003357)'/>
+  <g id='layer14' style='display:inline' transform='translate(-1185.0317,635.00336)'/>
+  <g id='layer15' style='display:inline' transform='translate(-1185.0317,635.00336)'/>
+  <g id='g71291' style='display:inline' transform='translate(-1185.0317,635.00336)'/>
+  <g id='layer2' style='display:inline' transform='translate(-944.03145,168.00336)'/>
+  <g id='layer3' transform='translate(-944.03145,-91.996643)'>
+    <path d='m 946.03145,92 c 0,0 -2,-0.0034 -2,2 v 12 c 0,1.99664 2,2 2,2 h 12 c 0.0948,-0.003 2,-0.003 2,-2 V 94 c 0,0 0,-2 -2,-2 z m 2.90625,3 h 6.1875 c 1.05606,0 1.90625,0.85019 1.90625,1.90625 v 0.1875 c 0,1.05606 -0.85019,1.90625 -1.90625,1.90625 h -6.1875 c -1.05606,0 -1.90625,-0.85019 -1.90625,-1.90625 v -0.1875 C 947.03145,95.85019 947.88164,95 948.9377,95 Z m 0.0937,1 c -0.55228,0 -1,0.447715 -1,1 0,0.552285 0.44772,1 1,1 0.55228,0 1,-0.447715 1,-1 0,-0.552285 -0.44772,-1 -1,-1 z m -0.0566,5 h 6.11328 c 1.07668,0 1.94336,0.86668 1.94336,1.94336 v 0.11328 c 0,1.07668 -0.86668,1.94336 -1.94336,1.94336 h -6.11328 c -1.07668,0 -1.94336,-0.86668 -1.94336,-1.94336 v -0.11328 C 947.03145,101.86668 947.89813,101 948.9748,101 Z m 6.05664,1 c -0.55228,0 -1,0.44772 -1,1 0,0.55228 0.44772,1 1,1 0.55228,0 1,-0.44772 1,-1 0,-0.55228 -0.44772,-1 -1,-1 z' id='rect4265-3' style='display:inline;fill:#4c5263;fill-opacity:1;stroke:none;enable-background:new'/>
+    
+  </g>
+  <g id='layer12' style='display:inline' transform='translate(-1185.0317,635.00336)'/>
+</svg>

+ 6 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/view-grid-symbolic.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
+ <path style="fill:#555555" d="M 3.25,3 H 6.75 C 6.8885,3 7,3.1115 7,3.25 V 6.75 C 7,6.8885 6.8885,7 6.75,7 H 3.25 C 3.1115,7 3,6.8885 3,6.75 V 3.25 C 3,3.1115 3.1115,3 3.25,3 Z"/>
+ <path style="fill:#555555" d="M 9.25,3 H 12.75 C 12.889,3 13,3.1115 13,3.25 V 6.75 C 13,6.8885 12.889,7 12.75,7 H 9.25 C 9.1115,7 9,6.8885 9,6.75 V 3.25 C 9,3.1115 9.1115,3 9.25,3 Z"/>
+ <path style="fill:#555555" d="M 3.25,9 H 6.75 C 6.8885,9 7,9.1115 7,9.25 V 12.75 C 7,12.889 6.8885,13 6.75,13 H 3.25 C 3.1115,13 3,12.889 3,12.75 V 9.25 C 3,9.1115 3.1115,9 3.25,9 Z"/>
+ <path style="fill:#555555" d="M 9.25,9 H 12.75 C 12.889,9 13,9.1115 13,9.25 V 12.75 C 13,12.889 12.889,13 12.75,13 H 9.25 C 9.1115,13 9,12.889 9,12.75 V 9.25 C 9,9.1115 9.1115,9 9.25,9 Z"/>
+</svg>

+ 8 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/actions/window-symbolic.svg

@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+ <defs>
+  <style id="current-color-scheme" type="text/css">
+   .ColorScheme-Text { color:#565656; } .ColorScheme-Highlight { color:#5294e2; }
+  </style>
+ </defs>
+ <path style="fill:currentColor" class="ColorScheme-Text" d="M 2 1 C 2 1 1.9237594 1.0041375 1.8183594 1.0234375 C 1.6141594 1.0536375 1.4597031 1.1268625 1.3457031 1.2265625 C 1.3237031 1.2434625 1.30225 1.26165 1.28125 1.28125 C 1.26165 1.30225 1.2434625 1.3236031 1.2265625 1.3457031 C 1.1268625 1.4597031 1.0535375 1.6141594 1.0234375 1.8183594 C 1.0040375 1.9237594 1 2 1 2 L 1 14 C 1 15 2 15 2 15 L 14 15 C 14 15 15 15 15 14 L 15 2 C 15 2 14.995563 1.9237594 14.976562 1.8183594 C 14.945562 1.6141594 14.873437 1.4597031 14.773438 1.3457031 C 14.756438 1.3236031 14.73775 1.30225 14.71875 1.28125 C 14.69775 1.26165 14.676297 1.2434625 14.654297 1.2265625 C 14.540297 1.1268625 14.385641 1.0536375 14.181641 1.0234375 C 14.075641 1.0041375 14 1 14 1 L 2 1 z M 3 6 L 13 6 L 13 13 L 3 13 L 3 6 z"/>
+</svg>

+ 4 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/panel/focus-windows-symbolic.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
+ <path style="fill:#555555" d="M 1,14.5 V 6.5 C 1,6 1.52,6 1.52,6 H 5 V 9 H 3 V 13 H 9 V 11 H 11 V 14.5 C 11,14.98 10.5,15 10.5,15 H 1.5 C 1.5,15 1,15 1,14.5 Z"/>
+ <path style="fill:#555555" d="M 6.5,1 C 6,1 6,1.5 6,1.5 V 9.5 C 6,10 6.5,10 6.5,10 H 15.5 C 15.5,10 16,10 16,9.5 V 1.5 C 16,1 15.5,1 15.5,1 Z M 8,4 H 14 V 8 H 8 Z"/>
+</svg>

+ 3 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/panel/view-dual-symbolic.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
+ <path style="fill:#555555" d="M 0,1 V 15 H 16 V 1 Z M 2,3 H 7 V 13 H 2 Z M 9,3 H 14 V 13 H 9 Z"/>
+</svg>

+ 8 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/resources/icons/hicolor/scalable/panel/window-duplicate-symbolic.svg

@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+ <defs>
+  <style id="current-color-scheme" type="text/css">
+   .ColorScheme-Text { color:#565656; } .ColorScheme-Highlight { color:#5294e2; }
+  </style>
+ </defs>
+ <path style="fill:currentColor" class="ColorScheme-Text" d="M 2 1 C 2 1 1.9237594 1.0041375 1.8183594 1.0234375 C 1.6141594 1.0536375 1.4597031 1.1268625 1.3457031 1.2265625 C 1.3236031 1.2434625 1.30225 1.26165 1.28125 1.28125 C 1.26165 1.30225 1.2434625 1.3236031 1.2265625 1.3457031 C 1.1268625 1.4597031 1.0536375 1.6141594 1.0234375 1.8183594 C 1.0041375 1.9237594 1 2 1 2 L 1 14 C 1 15 2 15 2 15 L 8 15 L 8 13 L 3 13 L 3 6 L 13 6 L 13 8 L 15 8 L 15 2 C 15 2 14.995563 1.9237594 14.976562 1.8183594 C 14.945562 1.6141594 14.873437 1.4597031 14.773438 1.3457031 C 14.756438 1.3236031 14.73775 1.30225 14.71875 1.28125 C 14.69775 1.26165 14.676297 1.2434625 14.654297 1.2265625 C 14.540297 1.1268625 14.385641 1.0536375 14.181641 1.0234375 C 14.075641 1.0041375 14 1 14 1 L 2 1 z M 9.5 9 C 9.5 9 9.4628562 9.0020187 9.4101562 9.0117188 C 9.3080562 9.0268188 9.2308281 9.0634812 9.1738281 9.1132812 C 9.1627281 9.1217812 9.151125 9.130825 9.140625 9.140625 C 9.130625 9.151125 9.1217813 9.1628281 9.1132812 9.1738281 C 9.0634813 9.2308281 9.0268187 9.3080562 9.0117188 9.4101562 C 9.0017188 9.4628562 9 9.5 9 9.5 L 9 15.5 C 9 16 9.5 16 9.5 16 L 15.5 16 C 15.5 16 16 16 16 15.5 L 16 9.5 C 16 9.5 15.998281 9.4628562 15.988281 9.4101562 C 15.973281 9.3080562 15.936719 9.2308281 15.886719 9.1738281 C 15.878719 9.1628281 15.869375 9.151125 15.859375 9.140625 C 15.849375 9.130825 15.837172 9.1217813 15.826172 9.1132812 C 15.769172 9.0634813 15.691844 9.0268187 15.589844 9.0117188 C 15.536844 9.0020187 15.5 9 15.5 9 L 9.5 9 z M 10 12 L 15 12 L 15 15 L 10 15 L 10 12 z"/>
+</svg>

BIN
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/gschemas.compiled


+ 341 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/org.gnome.shell.extensions.forge.gschema.xml

@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+    <schema id="org.gnome.shell.extensions.forge" path="/org/gnome/shell/extensions/forge/">
+        <!-- Main Settings -->
+        <key type="b" name="focus-border-toggle">
+            <default>true</default>
+            <summary>Show window border on focused window</summary>
+        </key>
+
+        <key type="u" name="focus-border-size">
+            <default>3</default>
+            <summary>The focused border's current thickness</summary>
+        </key>
+
+        <key type="s" name="focus-border-color">
+            <default>'rgba(236, 94, 94, 1)'</default>
+            <summary>The focused border's current color</summary>
+        </key>
+
+        <key type="b" name="split-border-toggle">
+            <default>true</default>
+            <summary>Show split direction border on focused window</summary>
+        </key>
+
+        <key type="s" name="split-border-color">
+            <default>'rgba(255, 246, 108, 1)'</default>
+            <summary>The focused border's current color</summary>
+        </key>
+
+        <key type="u" name="window-gap-size">
+            <default>4</default>
+            <summary>
+                The size of the gap between windows in the workarea
+            </summary>
+        </key>
+
+        <key type="u" name="resize-amount">
+            <default>15</default>
+            <summary>
+                The size of the gap between windows in the workarea
+            </summary>
+        </key>
+
+        <key type="u" name="window-gap-size-increment">
+            <default>1</default>
+            <summary>
+                The size increment of the gaps. size-increment * gap-size
+            </summary>
+        </key>
+
+        <key type="b" name="window-gap-hidden-on-single">
+            <default>false</default>
+            <summary>Hide gap when single window toggle</summary>
+        </key>
+
+        <key type="s" name="primary-layout-mode">
+            <default>'tiling'</default>
+            <summary>Layout modes: stacking, tiling</summary>
+        </key>
+
+        <key type="b" name="tiling-mode-enabled">
+            <default>true</default>
+            <summary>Tiling mode on/off</summary>
+        </key>
+
+        <key type="b" name="quick-settings-enabled">
+            <default>true</default>
+            <summary>Forge quick settings toggle</summary>
+        </key>
+
+        <key type="s" name="workspace-skip-tile">
+            <default>''</default>
+            <summary>Skips tiling on the provided workspace indices</summary>
+        </key>
+
+        <key type="b" name="stacked-tiling-mode-enabled">
+            <default>true</default>
+            <summary>Stacked tiling mode on/off</summary>
+        </key>
+
+        <key type="b" name="tabbed-tiling-mode-enabled">
+            <default>true</default>
+            <summary>Tabbed tiling mode on/off</summary>
+        </key>
+
+        <!-- Development Settings -->
+        <key type="u" name="log-level">
+            <default>0</default>
+            <summary>
+                Provide log4j-like logging levels:
+                0 - OFF
+                1 - FATAL
+                2 - ERROR
+                3 - WARN
+                4 - INFO
+                5 - DEBUG
+                6 - TRACE
+                7 - ALL
+            </summary>
+        </key>
+        <key type="b" name="logging-enabled">
+            <default>false</default>
+            <summary>Enable logging</summary>
+        </key>
+
+        <key type="s" name="css-updated">
+            <default>''</default>
+            <summary>Timestamp when css is last updated. Also triggers reload of St</summary>
+        </key>
+
+        <key type="u" name="css-last-update">
+            <default>1</default>
+        </key>
+
+        <key type="s" name="dnd-center-layout">
+            <default>'tabbed'</default>
+            <summary>
+                The default center layout when dragging/dropping a window.
+                The values are `tabbed` and `stacked`.
+            </summary>
+        </key>
+        <key type="b" name="move-pointer-focus-enabled">
+            <default>true</default>
+            <summary>Move the pointer when focusing or swapping via kbd</summary>
+        </key>
+        <key type="b" name="float-always-on-top-enabled">
+            <default>true</default>
+            <summary>Floating windows toggle always-on-top</summary>
+        </key>
+        <key type="b" name="auto-split-enabled">
+            <default>true</default>
+            <summary>Enable auto split or quarter-tiling based based on smaller side</summary>
+        </key>
+        <key type="b" name="preview-hint-enabled">
+            <default>true</default>
+            <summary>Whether to show preview hint DND</summary>
+        </key>
+        <key type="b" name="showtab-decoration-enabled">
+            <default>true</default>
+            <summary>Whether to show the tab decoration or not</summary>
+        </key>
+
+    </schema>
+    <schema id="org.gnome.shell.extensions.forge.keybindings" path="/org/gnome/shell/extensions/forge/keybindings/">
+        <!-- Keybinding Settings -->
+        <key type="as" name="focus-border-toggle">
+            <default><![CDATA[['<Super>x']]]></default>
+            <summary>Toggle the focused window's border</summary>
+        </key>
+
+        <key type="as" name="window-gap-size-increase">
+            <default><![CDATA[['<Ctrl><Super>plus']]]></default>
+            <summary>Increase the size of gaps between windows/cons</summary>
+        </key>
+
+        <key type="as" name="window-gap-size-decrease">
+            <default><![CDATA[['<Ctrl><Super>minus']]]></default>
+            <summary>Decrease the size of gaps between windows/cons</summary>
+        </key>
+
+        <key type="as" name="con-split-layout-toggle">
+            <default><![CDATA[['<Super>g']]]></default>
+            <summary>Toggle split layout: horizontal or vertical</summary>
+        </key>
+
+        <key type="as" name="con-split-horizontal">
+            <default><![CDATA[['<Super>z']]]></default>
+            <summary>Split a container horizontally</summary>
+        </key>
+
+        <key type="as" name="con-split-vertical">
+            <default><![CDATA[['<Super>v']]]></default>
+            <summary>Split a container vertically</summary>
+        </key>
+
+        <key type="as" name="con-stacked-layout-toggle">
+            <default><![CDATA[['<Shift><Super>s']]]></default>
+            <summary>Toggle stacked layout</summary>
+        </key>
+
+        <key type="as" name="con-tabbed-layout-toggle">
+            <default><![CDATA[['<Shift><Super>t']]]></default>
+            <summary>Toggle tabbed layout</summary>
+        </key>
+
+        <key type="as" name="con-tabbed-showtab-decoration-toggle">
+            <default><![CDATA[['<Ctrl><Alt>y']]]></default>
+            <summary>Toggle showing the tab decoration layout</summary>
+        </key>
+
+        <key type="as" name="window-swap-left">
+            <default><![CDATA[['<Ctrl><Super>h']]]></default>
+            <summary>Swap window left</summary>
+        </key>
+
+        <key type="as" name="window-swap-down">
+            <default><![CDATA[['<Ctrl><Super>j']]]></default>
+            <summary>Swap window down</summary>
+        </key>
+
+        <key type="as" name="window-swap-up">
+            <default><![CDATA[['<Ctrl><Super>k']]]></default>
+            <summary>Swap window up</summary>
+        </key>
+
+        <key type="as" name="window-swap-right">
+            <default><![CDATA[['<Ctrl><Super>l']]]></default>
+            <summary>Swap window right</summary>
+        </key>
+
+        <key type="as" name="window-move-left">
+            <default><![CDATA[['<Shift><Super>h']]]></default>
+            <summary>Move window left</summary>
+        </key>
+
+        <key type="as" name="window-move-down">
+            <default><![CDATA[['<Shift><Super>j']]]></default>
+            <summary>Move window down</summary>
+        </key>
+
+        <key type="as" name="window-move-up">
+            <default><![CDATA[['<Shift><Super>k']]]></default>
+            <summary>Move window up</summary>
+        </key>
+
+        <key type="as" name="window-move-right">
+            <default><![CDATA[['<Shift><Super>l']]]></default>
+            <summary>Move window right</summary>
+        </key>
+
+        <key type="as" name="window-focus-left">
+            <default><![CDATA[['<Super>h']]]></default>
+            <summary>Move window left</summary>
+        </key>
+
+        <key type="as" name="window-focus-down">
+            <default><![CDATA[['<Super>j']]]></default>
+            <summary>Move window down</summary>
+        </key>
+
+        <key type="as" name="window-focus-up">
+            <default><![CDATA[['<Super>k']]]></default>
+            <summary>Move window up</summary>
+        </key>
+
+        <key type="as" name="window-focus-right">
+            <default><![CDATA[['<Super>l']]]></default>
+            <summary>Move window right</summary>
+        </key>
+
+        <key type="as" name="window-toggle-float">
+          <default><![CDATA[['<Super>c']]]></default>
+            <summary>Toggle window float</summary>
+        </key>
+
+        <key type="as" name="window-toggle-always-float">
+            <default><![CDATA[['<Shift><Super>c']]]></default>
+
+        </key>
+
+        <key type="as" name="workspace-active-tile-toggle">
+            <default><![CDATA[['<Shift><Super>w']]]></default>
+            <summary>Toggle active workspace tiling</summary>
+        </key>
+
+        <key type="as" name="prefs-open">
+            <default><![CDATA[['<Super>Period']]]></default>
+            <summary>Open the extension's preferences</summary>
+        </key>
+
+        <key type="as" name="prefs-tiling-toggle">
+            <default><![CDATA[['<Super>w']]]></default>
+                <summary>Toggle tiling mode on/off</summary>
+        </key>
+
+        <key type="s" name="mod-mask-mouse-tile">
+            <default>'None'</default>
+            <summary>
+                Mod mask to allow window tiling via drag-drop. None means it will tile immediately.
+                Options are Super, Ctrl, Shift, Alt, and None
+            </summary>
+        </key>
+
+        <key type="as" name="window-swap-last-active">
+            <default><![CDATA[['<Super>Return']]]></default>
+            <summary>Swap the last active window with the current one</summary>
+        </key>
+
+        <key type="as" name="window-snap-one-third-right">
+          <default><![CDATA[['<Ctrl><Alt>g']]]></default>
+        </key>
+
+        <key type="as" name="window-snap-two-third-right">
+          <default><![CDATA[['<Ctrl><Alt>t']]]></default>
+        </key>
+
+        <key type="as" name="window-snap-one-third-left">
+          <default><![CDATA[['<Ctrl><Alt>d']]]></default>
+        </key>
+
+        <key type="as" name="window-snap-two-third-left">
+          <default><![CDATA[['<Ctrl><Alt>e']]]></default>
+        </key>
+
+        <key type="as" name="window-snap-center">
+          <default><![CDATA[['<Ctrl><Alt>c']]]></default>
+        </key>
+
+        <key type="as" name="window-resize-left-increase">
+          <default><![CDATA[['<Ctrl><Super>y']]]></default>
+        </key>
+
+        <key type="as" name="window-resize-left-decrease">
+            <default><![CDATA[['<Ctrl><Shift><Super>o']]]></default>
+        </key>
+
+        <key type="as" name="window-resize-bottom-increase">
+          <default><![CDATA[['<Ctrl><Super>u']]]></default>
+        </key>
+
+        <key type="as" name="window-resize-bottom-decrease">
+            <default><![CDATA[['<Ctrl><Shift><Super>i']]]></default>
+        </key>
+
+        <key type="as" name="window-resize-top-increase">
+          <default><![CDATA[['<Ctrl><Super>i']]]></default>
+        </key>
+
+        <key type="as" name="window-resize-top-decrease">
+            <default><![CDATA[['<Ctrl><Shift><Super>u']]]></default>
+        </key>
+
+        <key type="as" name="window-resize-right-increase">
+          <default><![CDATA[['<Ctrl><Super>o']]]></default>
+        </key>
+
+        <key type="as" name="window-resize-right-decrease">
+            <default><![CDATA[['<Ctrl><Shift><Super>y']]]></default>
+        </key>
+    </schema>
+</schemalist>

+ 132 - 0
gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/stylesheet.css

@@ -0,0 +1,132 @@
+.tiled {
+  color: rgba(236, 94, 94, 1);
+  opacity: 1;
+  border-width: 3px;
+}
+
+.split {
+  color: rgba(255, 246, 108, 1);
+  opacity: 1;
+  border-width: 3px;
+}
+
+.stacked {
+  color: rgba(247, 162, 43, 1);
+  opacity: 1;
+  border-width: 3px;
+}
+
+.tabbed {
+  color: rgba(17, 199, 224, 1);
+  opacity: 1;
+  border-width: 3px;
+}
+
+.floated {
+  color: rgba(180, 167, 214, 1);
+  border-width: 3px;
+  opacity: 1;
+}
+
+.window-tiled-border {
+  border-width: 3px;
+  border-color: rgba(236, 94, 94, 1);
+  border-style: solid;
+  border-radius: 14px;
+}
+
+.window-split-border {
+  border-width: 3px;
+  border-color: rgba(255, 246, 108, 1);
+  border-style: solid;
+  border-radius: 14px;
+}
+
+.window-split-horizontal {
+  border-left-width: 0;
+  border-top-width: 0;
+  border-bottom-width: 0;
+}
+
+.window-split-vertical {
+  border-left-width: 0;
+  border-top-width: 0;
+  border-right-width: 0;
+}
+
+.window-stacked-border {
+  border-width: 3px;
+  border-color: rgba(247, 162, 43, 1);
+  border-style: solid;
+  border-radius: 14px;
+}
+
+.window-tabbed-border {
+  border-width: 3px;
+  border-color: rgba(17, 199, 224, 1);
+  border-style: solid;
+  border-radius: 14px;
+}
+
+.window-tabbed-bg {
+  border-radius: 8px;
+}
+
+.window-tabbed-tab {
+  background-color: rgba(54, 47, 45, 1);
+  border-color: rgba(17, 199, 224, 0.6);
+  border-width: 1px;
+  border-radius: 8px;
+  color: white;
+  margin: 1px;
+  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
+}
+
+.window-tabbed-tab-active {
+  background-color: rgba(17, 199, 224, 1);
+  color: black;
+  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
+}
+
+.window-tabbed-tab-close {
+  padding: 3px;
+  margin: 4px;
+  border-radius: 16px;
+  width: 16px;
+  background-color: #e06666;
+}
+
+.window-tabbed-tab-icon {
+  margin: 3px;
+}
+
+.window-floated-border {
+  border-width: 3px;
+  border-color: rgba(180, 167, 214, 1);
+  border-style: solid;
+  border-radius: 14px;
+}
+
+.window-tilepreview-tiled {
+  border-width: 1px;
+  border-color: rgba(236, 94, 94, 0.4);
+  border-style: solid;
+  border-radius: 14px;
+  background-color: rgba(236, 94, 94, 0.3);
+}
+
+.window-tilepreview-stacked {
+  border-width: 1px;
+  border-color: rgba(247, 162, 43, 0.4);
+  border-style: solid;
+  border-radius: 14px;
+  background-color: rgba(247, 162, 43, 0.3);
+}
+
+.window-tilepreview-tabbed {
+  border-width: 1px;
+  border-color: rgba(18, 199, 224, 0.4);
+  border-style: solid;
+  border-radius: 14px;
+  background-color: rgba(17, 199, 224, 0.3);
+}

+ 1261 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/extension.js

@@ -0,0 +1,1261 @@
+import Clutter from 'gi://Clutter';
+import Gio from 'gi://Gio';
+import GLib from 'gi://GLib';
+import GObject from 'gi://GObject';
+import St from 'gi://St';
+
+import * as Main from 'resource:///org/gnome/shell/ui/main.js';
+import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js';
+import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
+import * as QuickSettings from 'resource:///org/gnome/shell/ui/quickSettings.js';
+import * as KeyboardManager from 'resource:///org/gnome/shell/misc/keyboardManager.js';
+import { Dialog } from 'resource:///org/gnome/shell/ui/dialog.js';
+
+import { Extension, gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js';
+
+
+class KeyboardMenuToggle extends QuickSettings.QuickMenuToggle {
+	static {
+		GObject.registerClass(this);
+	}
+
+	constructor(extensionObject) {
+		super({
+			title: _('Screen Keyboard'),
+			iconName: 'input-keyboard-symbolic',
+			toggleMode: true,
+		});
+
+		this.extensionObject = extensionObject;
+		this.settings = extensionObject.getSettings();
+		
+		this.menu.setHeader('input-keyboard-symbolic', _('Screen Keyboard'), _('Opening Mode'));
+		this._itemsSection = new PopupMenu.PopupMenuSection();
+		this._itemsSection.addMenuItem(new PopupMenu.PopupImageMenuItem(_('Never'), this.settings.get_int("enable-tap-gesture") == 0 ? 'emblem-ok-symbolic' : null));
+		this._itemsSection.addMenuItem(new PopupMenu.PopupImageMenuItem(_("Only on Touch"), this.settings.get_int("enable-tap-gesture")  == 1 ? 'emblem-ok-symbolic' : null));
+		this._itemsSection.addMenuItem(new PopupMenu.PopupImageMenuItem(_("Always"), this.settings.get_int("enable-tap-gesture")  == 2 ? 'emblem-ok-symbolic' : null));
+		for (var i in this._itemsSection._getMenuItems()){
+			const item = this._itemsSection._getMenuItems()[i]
+			const num = i
+			item.connect('activate', () => this.settings.set_int("enable-tap-gesture", num))
+		}
+
+		this.menu.addMenuItem(this._itemsSection);
+		this.settings.bind('indicator-enabled',
+			this, 'checked',
+			Gio.SettingsBindFlags.DEFAULT);
+		this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+		const settingsItem = this.menu.addAction(_('More Settings'),
+			() => this.extensionObject.openPreferences());
+		settingsItem.visible = Main.sessionMode.allowSettings;
+		this.menu._settingsActions[this.extensionObject.uuid] = settingsItem;
+	}
+
+	_refresh() {
+		for (var i in this._itemsSection._getMenuItems()){
+			this._itemsSection._getMenuItems()[i].setIcon(this.settings.get_int("enable-tap-gesture") == i ? 'emblem-ok-symbolic' : null)
+		}
+	}
+};
+
+
+let keycodes;
+
+export default class GjsOskExtension extends Extension {
+	_openKeyboard() {
+		if (this.Keyboard.state == "closed") {
+			this.Keyboard.opened = true;
+			this.Keyboard.open();
+		}
+	}
+
+	_closeKeyboard() {
+		if (this.Keyboard.state == "opened") {
+			this.Keyboard.opened = false;
+			this.Keyboard.close();
+		}
+	}
+
+	_toggleKeyboard() {
+		if (!this.Keyboard.opened) {
+			this._openKeyboard();
+			this.Keyboard.openedFromButton = true;
+			this.Keyboard.closedFromButton = false
+		} else {
+			this._closeKeyboard();
+			this.Keyboard.openedFromButton = false;
+			this.Keyboard.closedFromButton = true;
+		}
+	}
+
+	open_interval() {
+		global.stage.disconnect(this.tapConnect)
+		if (this.openInterval !== null) {
+			clearInterval(this.openInterval);
+			this.openInterval = null;
+		}
+		this.openInterval = setInterval(() => {
+			this.Keyboard.get_parent().set_child_at_index(this.Keyboard, this.Keyboard.get_parent().get_n_children() - 1);
+			this.Keyboard.set_child_at_index(this.Keyboard.box, this.Keyboard.get_n_children() - 1);
+			if (!this.Keyboard.openedFromButton && this.lastInputMethod) {	
+				if (Main.inputMethod.currentFocus != null && Main.inputMethod.currentFocus.is_focused() && !this.Keyboard.closedFromButton) {
+					this._openKeyboard();
+				} else if (!this.Keyboard.closedFromButton) {
+					this._closeKeyboard();
+					this.Keyboard.closedFromButton = false
+				} else if (Main.inputMethod.currentFocus == null) {
+					this.Keyboard.closedFromButton = false
+				}
+			}
+		}, 300);
+		this.tapConnect = global.stage.connect("event", (_actor, event) => {
+			if (event.type() !== 4 && event.type() !== 5) {
+				this.lastInputMethod = [false, event.type() >= 9 && event.type() <= 12, true][this.settings.get_int("enable-tap-gesture")]
+			}
+		})
+	}
+
+	enable() {
+		this.settings = this.getSettings();
+		this.openBit = this.settings.get_child("indicator");
+		let [ok, contents] = GLib.file_get_contents(this.path + '/keycodes.json');
+		if (ok) {
+			keycodes = JSON.parse(contents)[['qwerty', 'azerty', 'dvorak', "qwertz"][this.settings.get_int("lang")]];
+		}
+		this.Keyboard = new Keyboard(this.settings);
+		this._indicator = null;
+		this.openInterval = null;
+		if (this.settings.get_boolean("indicator-enabled")) {
+			this._indicator = new PanelMenu.Button(0.0, "GJS OSK Indicator", false);
+			let icon = new St.Icon({
+				gicon: new Gio.ThemedIcon({
+					name: 'input-keyboard-symbolic'
+				}),
+				style_class: 'system-status-icon'
+			});
+			this._indicator.add_child(icon);
+
+			this._indicator.connect("button-press-event", () => this._toggleKeyboard());
+			this._indicator.connect("touch-event", (_actor, event) => {
+				if (event.type() == 11) this._toggleKeyboard()
+			});
+			Main.panel.addToStatusArea("GJS OSK Indicator", this._indicator);
+		}
+
+		this._toggle = new KeyboardMenuToggle(this);
+		this._quick_settings_indicator = new QuickSettings.SystemIndicator();
+		this._quick_settings_indicator.quickSettingsItems.push(this._toggle);
+		Main.panel.statusArea.quickSettings.addExternalIndicator(this._quick_settings_indicator);
+
+		if (this.settings.get_int("enable-tap-gesture") > 0) {
+			this.open_interval();
+		}
+		this.openFromCommandHandler = this.openBit.connect("changed", () => {
+            this.openBit.set_boolean("opened", false)
+            this._toggleKeyboard();
+        })
+		this.settingsHandler = this.settings.connect("changed", key => {
+			this.Keyboard.openedFromButton = false;
+			let [ok, contents] = GLib.file_get_contents(this.path + '/keycodes.json');
+			if (ok) {
+				keycodes = JSON.parse(contents)[["qwerty", "azerty", "dvorak", "qwertz"][this.settings.get_int("lang")]];
+			}
+			this.Keyboard.refresh();
+			this._toggle._refresh();
+			if (this.settings.get_boolean("indicator-enabled")) {
+				if (this._indicator != null) {
+					this._indicator.destroy();
+					this._indicator = null;
+				}
+				this._indicator = new PanelMenu.Button(0.0, "GJS OSK Indicator", false);
+				let icon = new St.Icon({
+					gicon: new Gio.ThemedIcon({
+						name: 'input-keyboard-symbolic'
+					}),
+					style_class: 'system-status-icon'
+				});
+				this._indicator.add_child(icon);
+				
+				this._indicator.connect("button-press-event", () => this._toggleKeyboard());
+				this._indicator.connect("touch-event", (_actor, event) => {
+					if (event.type() == 11) this._toggleKeyboard()
+				});
+				Main.panel.addToStatusArea("GJS OSK Indicator", this._indicator);
+			} else {
+				if (this._indicator != null) {
+					this._indicator.destroy();
+					this._indicator = null;
+				}
+			}
+			global.stage.disconnect(this.tapConnect)
+			if (this.openInterval !== null) {
+				clearInterval(this.openInterval);
+				this.openInterval = null;
+			}
+			if (this.settings.get_int("enable-tap-gesture") > 0) {
+				this.open_interval();
+			}
+		});
+	}
+
+	disable() {
+		this._quick_settings_indicator.quickSettingsItems.forEach(item => item.destroy());
+		this._quick_settings_indicator.destroy();
+		this._quick_settings_indicator = null;
+
+		if (this._indicator !== null) {
+			this._indicator.destroy();
+			this._indicator = null;
+		}
+		this.Keyboard.destroy();
+		this.settings.disconnect(this.settingsHandler);
+		this.settings = null;
+		this.openBit.disconnect(this.openFromCommandHandler);
+		this.openBit = null;
+		global.stage.disconnect(this.tapConnect)
+		if (this.openInterval !== null) {
+			clearInterval(this.openInterval);
+			this.openInterval = null;
+		}
+		this._toggle.destroy()
+		this._toggle = null
+		this.settings = null
+		this.Keyboard = null
+		keycodes = null
+	}
+}
+
+
+class Keyboard extends Dialog {
+	static [GObject.signals] = {
+		'drag-begin': {},
+		'drag-end': {}
+	};
+
+	static {
+		GObject.registerClass(this);
+	}
+
+	_init(settings) {
+		this.startupInterval = setInterval(() => {
+			this.init = KeyboardManager.getKeyboardManager()._current.id;
+			this.initLay = Object.keys(KeyboardManager.getKeyboardManager()._layoutInfos);
+			if (this.initLay == undefined || this.init == undefined) { 
+				return;
+			}
+			this.settings = settings;
+			let monitor = Main.layoutManager.primaryMonitor;
+			super._init(Main.layoutManager.uiGroup, 'db-keyboard-content');
+			this.box = new St.BoxLayout({
+				vertical: true
+			});
+			this.widthPercent = (monitor.width > monitor.height) ? settings.get_int("landscape-width-percent") / 100 : settings.get_int("portrait-width-percent") / 100;
+			this.heightPercent = (monitor.width > monitor.height) ? settings.get_int("landscape-height-percent") / 100 : settings.get_int("portrait-height-percent") / 100;
+			this.buildUI();
+			this.draggable = false;
+			this.add_child(this.box);
+			this.close();
+			this.box.set_name("osk-gjs")
+			this.mod = [];
+			this.modBtns = [];
+			this.capsL = false;
+			this.shift = false;
+			this.alt = false;
+			this.box.add_style_class_name("boxLay");
+			this.box.set_style("background-color: rgb(" + settings.get_double("background-r") + "," + settings.get_double("background-g") + "," + settings.get_double("background-b") + ");")
+			this.opened = false;
+			this.state = "closed";
+			this.delta = [];
+			this.checkMonitor();
+			this._dragging = false;
+			this.inputDevice = Clutter.get_default_backend().get_default_seat().create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
+			clearInterval(this.startupInterval);
+		}, 200); 
+	}
+
+	destroy() {
+		if (this.startupInterval !== null) {
+			clearInterval(this.startupInterval);
+			this.startupInterval = null;
+		}
+		if (this.startupTimeout !== null) {
+			clearInterval(this.startupTimeout);
+			this.startupTimeout = null;
+		}
+		if (this.monitorChecker !== null) {
+			clearInterval(this.monitorChecker);
+			this.monitorChecker = null;
+		}
+		if (this.textboxChecker !== null) {
+			clearInterval(this.textboxChecker);
+			this.textboxChecker = null;
+		}
+		if (this.stateTimeout !== null ) {
+			clearTimeout(this.stateTimeout);
+			this.stateTimeout = null;
+		}
+		if (this.keyTimeout !== null) {
+			clearTimeout(this.keyTimeout);
+			this.keyTimeout = null;
+		}
+		super.destroy();
+	}
+
+	vfunc_button_press_event() {
+		this.delta = [Clutter.get_current_event().get_coords()[0] - this.translation_x, Clutter.get_current_event().get_coords()[1] - this.translation_y];
+		return this.startDragging(Clutter.get_current_event(), this.delta)
+	}
+
+	startDragging(event, delta) {
+		if (this.draggable) {
+			if (this._dragging)
+				return Clutter.EVENT_PROPAGATE;
+			this._dragging = true;
+			this.box.set_opacity(255);
+			this.box.ease({
+				opacity: 200,
+				duration: 100,
+				mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+				onComplete: () => {}
+			});
+			let device = event.get_device();
+			let sequence = event.get_event_sequence();
+			this._grab = global.stage.grab(this);
+			this._grabbedDevice = device;
+			this._grabbedSequence = sequence;
+			this.emit('drag-begin');
+			let [absX, absY] = event.get_coords();
+			this.snapMovement(absX - delta[0], absY - delta[1]);
+			return Clutter.EVENT_STOP;
+		} else {
+			return Clutter.EVENT_PROPAGATE;
+		}
+	}
+
+	vfunc_button_release_event() {
+		if (this._dragging && !this._grabbedSequence) {
+			return this.endDragging();
+		}
+		return Clutter.EVENT_PROPAGATE;
+	}
+
+	endDragging() {
+		if (this.draggable) {
+			if (this._dragging) {
+				if (this._releaseId) {
+					this.disconnect(this._releaseId);
+					this._releaseId = 0;
+				}
+				if (this._grab) {
+					this._grab.dismiss();
+					this._grab = null;
+				}
+
+				this.box.set_opacity(200);
+				this.box.ease({
+					opacity: 255,
+					duration: 100,
+					mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+					onComplete: () => {}
+				});
+				this._grabbedSequence = null;
+				this._grabbedDevice = null;
+				this._dragging = false;
+				this.delta = [];
+				this.emit('drag-end');
+				this._dragging = false;
+			}
+			return Clutter.EVENT_STOP;
+		} else {
+			return Clutter.EVENT_STOP;
+		}
+	}
+
+	vfunc_motion_event() {
+		let event = Clutter.get_current_event();
+		if (this._dragging && !this._grabbedSequence) {
+			this.motionEvent(event);
+		}
+		return Clutter.EVENT_PROPAGATE;
+	}
+
+	motionEvent(event) {
+		if (this.draggable) {
+			let [absX, absY] = event.get_coords();
+			this.snapMovement(absX - this.delta[0], absY - this.delta[1]);
+			return Clutter.EVENT_STOP
+		} else {
+			return Clutter.EVENT_STOP
+		}
+	}
+
+	vfunc_touch_event() {
+		let event = Clutter.get_current_event();
+		let sequence = event.get_event_sequence();
+
+		if (!this._dragging && event.type() == Clutter.EventType.TOUCH_BEGIN) {
+			this.delta = [event.get_coords()[0] - this.translation_x, event.get_coords()[1] - this.translation_y];
+			this.startDragging(event);
+			return Clutter.EVENT_STOP;
+		} else if (this._grabbedSequence && sequence.get_slot() === this._grabbedSequence.get_slot()) {
+			if (event.type() == Clutter.EventType.TOUCH_UPDATE) {
+				return this.motionEvent(event);
+			} else if (event.type() == Clutter.EventType.TOUCH_END) {
+				return this.endDragging();
+			}
+		}
+
+		return Clutter.EVENT_PROPAGATE;
+	}
+
+	snapMovement(xPos, yPos) {
+		let monitor = Main.layoutManager.primaryMonitor
+		if (Math.abs(xPos - ((monitor.width * .5) - ((this.width * .5)))) <= 50) {
+			xPos = ((monitor.width * .5) - ((this.width * .5)));
+		} else if (Math.abs(xPos - 25) <= 50) {
+			xPos = 25;
+		} else if (Math.abs(xPos - (monitor.width - this.width - 25)) <= 50) {
+			xPos = monitor.width - this.width - 25
+		}
+		if (Math.abs(yPos - (monitor.height - this.height - 25)) <= 50) {
+			yPos = monitor.height - this.height - 25;
+		} else if (Math.abs(yPos - 25) <= 50) {
+			yPos = 25;
+		} else if (Math.abs(yPos - ((monitor.height * .5) - (this.height * .5))) <= 50) {
+			yPos = (monitor.height * .5) - (this.height * .5);
+		}
+		this.set_translation(xPos, yPos, 0);
+	}
+
+	checkMonitor() {
+		let monitor = Main.layoutManager.primaryMonitor;
+		let oldMonitorDimensions = [monitor.width, monitor.height];
+		this.monitorChecker = setInterval(() => {
+			monitor = Main.layoutManager.primaryMonitor;
+			if (oldMonitorDimensions[0] != monitor.width || oldMonitorDimensions[1] != monitor.height) {
+				this.refresh()
+				oldMonitorDimensions = [monitor.width, monitor.height];
+			}
+		}, 200);
+	}
+
+	refresh() {
+		let monitor = Main.layoutManager.primaryMonitor;
+		this.box.remove_all_children();
+                this.box.set_style_class_name("boxLay")
+		this.widthPercent = (monitor.width > monitor.height) ? this.settings.get_int("landscape-width-percent") / 100 : this.settings.get_int("portrait-width-percent") / 100;
+		this.heightPercent = (monitor.width > monitor.height) ? this.settings.get_int("landscape-height-percent") / 100 : this.settings.get_int("portrait-height-percent") / 100;
+		this.buildUI();
+		this.draggable = false;
+		this.keys.forEach(keyholder => {
+			if (!keyholder.has_style_class_name("move_btn")) {
+				keyholder.set_opacity(0);
+				keyholder.ease({
+					opacity: 255,
+					duration: 100,
+					mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+					onComplete: () => {
+						keyholder.set_z_position(0);
+						this.box.remove_style_pseudo_class("dragging");
+					}
+				});
+			}
+		});
+		if (this.startupTimeout !== null) {
+			clearInterval(this.startupTimeout);
+			this.startupTimeout = null;
+		}
+		this.startupTimeout = setTimeout(() => {
+			this.init = KeyboardManager.getKeyboardManager()._current.id;
+			this.initLay = Object.keys(KeyboardManager.getKeyboardManager()._layoutInfos);
+			if (this.initLay == undefined || this.init == undefined) { 
+				this.refresh();
+				return;
+			}
+			this.close();
+		}, 200); 
+		this.mod = [];
+		this.modBtns = [];
+		this.capsL = false;
+		this.shift = false;
+		this.alt = false;
+		this.box.set_style("background-color: rgb(" + this.settings.get_double("background-r") + "," + this.settings.get_double("background-g") + "," + this.settings.get_double("background-b") + ");")
+		this.opened = false;
+		this.state = "closed";
+		this.delta = [];
+		this.dragging = false;
+	}
+
+	open() {
+		this.inputDevice = Clutter.get_default_backend().get_default_seat().create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
+		if (this.startupTimeout !== null) {
+			clearInterval(this.startupTimeout);
+			this.startupTimeout = null;
+		}
+		this.startupTimeout = setTimeout(() => {
+			this.init = KeyboardManager.getKeyboardManager()._current.id;
+			this.initLay = Object.keys(KeyboardManager.getKeyboardManager()._layoutInfos);
+			if (this.initLay == undefined || this.init == undefined) { 
+				this.open();
+				return;
+			}
+			let newLay = this.initLay;
+			if (!newLay.includes(["us", "fr+azerty", "us+dvorak", "de+dsb_qwertz"][this.settings.get_int("lang")])) {
+				newLay.push(["us", "fr+azerty", "us+dvorak", "de+dsb_qwertz"][this.settings.get_int("lang")]);
+				KeyboardManager.getKeyboardManager().setUserLayouts(newLay);
+			}
+			KeyboardManager.getKeyboardManager().apply(["us", "fr+azerty", "us+dvorak", "de+dsb_qwertz"][this.settings.get_int("lang")]);
+			KeyboardManager.getKeyboardManager().reapply();
+			this.state = "opening"
+			this.box.opacity = 0;
+			this.show();
+			this.box.ease({
+				opacity: 255,
+				duration: 100,
+				mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+				onComplete: () => {
+					if (this.stateTimeout !== null) {
+						clearTimeout(this.stateTimeout);
+						this.stateTimeout = null;
+					}
+					this.stateTimeout = setTimeout(() => {
+						this.state = "opened"
+					}, 500);
+					let monitor = Main.layoutManager.primaryMonitor;
+					let posX = [25, ((monitor.width * .5) - ((this.width * .5))), monitor.width - this.width - 25][(this.settings.get_int("default-snap") % 3)];
+					let posY = [25, ((monitor.height * .5) - ((this.height * .5))), monitor.height - this.height - 25][Math.floor((this.settings.get_int("default-snap") / 3))];
+					this.set_translation(posX, posY, 0);
+				}
+			});
+			this.opened = true;
+		}, 200); 
+	}
+
+	close() {
+		if (this.initLay !== undefined && this.init !== undefined) {
+			KeyboardManager.getKeyboardManager().setUserLayouts(this.initLay);
+			KeyboardManager.getKeyboardManager().apply(this.init);
+		}
+		let monitor = Main.layoutManager.primaryMonitor;
+		let posX = [25, ((monitor.width * .5) - ((this.width * .5))), monitor.width - this.width - 25][(this.settings.get_int("default-snap") % 3)];
+		let posY = [25, ((monitor.height * .5) - ((this.height * .5))), monitor.height - this.height - 25][Math.floor((this.settings.get_int("default-snap") / 3))];
+		this.state = "closing"
+		this.box.ease({
+			opacity: 0,
+			duration: 100,
+			mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+			onComplete: () => {
+				this.set_translation(0, 0, 0);
+				this.set_translation(posX, posY, 0);
+				this.opened = false;
+				this.hide();
+				if (this.stateTimeout !== null) {
+					clearTimeout(this.stateTimeout);
+					this.stateTimeout = null;
+				}
+				this.stateTimeout = setTimeout(() => {
+					this.state = "closed"
+				}, 500);
+			},
+		});
+		this.openedFromButton = false
+	}
+
+	buildUI() {
+		this.keys = [];
+		let monitor = Main.layoutManager.primaryMonitor
+		var topRowWidth = Math.round(((monitor.width - 90) * this.widthPercent) / 15);
+		var topRowHeight = Math.round(((monitor.height - 190) * this.heightPercent) / 6);
+
+		let row1 = new St.BoxLayout({
+			pack_start: true
+		});
+		for (var num in keycodes.row1) {
+			const i = keycodes.row1[num]
+			var w = topRowWidth;
+			row1.add_child(new St.Button({
+				label: i.lowerName,
+				height: topRowHeight,
+				width: w
+			}));
+			var isMod = false;
+			for (var j of [42, 54, 29, 125, 56, 100, 97, 58]) {
+				if (i.code == j) {
+					isMod = true;
+					break;
+				}
+			}
+			row1.get_children()[num].char = i;
+			if (!isMod) {
+				row1.get_children()[num].connect("clicked", () => this.decideMod(i))
+			} else {
+				const modButton = row1.get_children()[num];
+				row1.get_children()[num].connect("clicked", () => this.decideMod(i, modButton))
+			}
+		}
+		this.keys.push.apply(this.keys, row1.get_children());
+		row1.add_style_class_name("keysHolder");
+		let row2 = new St.BoxLayout({
+			pack_start: true
+		});
+		for (var num in keycodes.row2) {
+			const i = keycodes.row2[num]
+			var w;
+			if (num == 0) {
+				w = ((row1.width - ((keycodes.row2.length - 2) * ((topRowWidth) + 5))) / 2) * 0.5;
+			} else if (num == keycodes.row2.length - 1) {
+				w = ((row1.width - ((keycodes.row2.length - 2) * ((topRowWidth) + 5))) / 2) * 1.5;
+			} else {
+				w = (topRowWidth) + 5;
+			}
+			row2.add_child(new St.Button({
+				label: i.lowerName,
+				height: topRowHeight + 20,
+				width: w
+			}));
+			var isMod = false;
+			for (var j of [42, 54, 29, 125, 56, 100, 97, 58]) {
+				if (i.code == j) {
+					isMod = true;
+					break;
+				}
+			}
+			row2.get_children()[num].char = i;
+			if (!isMod) {
+				row2.get_children()[num].connect("clicked", () => this.decideMod(i))
+			} else {
+				const modButton = row2.get_children()[num];
+				row2.get_children()[num].connect("clicked", () => this.decideMod(i, modButton))
+			}
+		}
+		this.keys.push.apply(this.keys, row2.get_children());
+		row2.add_style_class_name("keysHolder");
+		let row3 = new St.BoxLayout({
+			pack_start: true
+		});
+		for (var num in keycodes.row3) {
+			const i = keycodes.row3[num]
+			var w;
+			if (num == 0) {
+				w = ((row1.width - ((keycodes.row3.length - 2) * ((topRowWidth) + 5))) / 2) * 1.1;
+			} else if (num == keycodes.row3.length - 1) {
+				w = ((row1.width - ((keycodes.row3.length - 2) * ((topRowWidth) + 5))) / 2) * 0.9;
+			} else {
+				w = (topRowWidth) + 5;
+			}
+			row3.add_child(new St.Button({
+				label: i.lowerName,
+				height: topRowHeight + 20,
+				width: w
+			}));
+			var isMod = false;
+			for (var j of [42, 54, 29, 125, 56, 100, 97, 58]) {
+				if (i.code == j) {
+					isMod = true;
+					break;
+				}
+			}
+			row3.get_children()[num].char = i;
+			if (!isMod) {
+				row3.get_children()[num].connect("clicked", () => this.decideMod(i))
+			} else {
+				const modButton = row3.get_children()[num];
+				row3.get_children()[num].connect("clicked", () => this.decideMod(i, modButton))
+			}
+		}
+		this.keys.push.apply(this.keys, row3.get_children());
+		row3.add_style_class_name("keysHolder");
+		let row4 = new St.BoxLayout({
+			pack_start: true
+		});
+		for (var num in keycodes.row4) {
+			const i = keycodes.row4[num]
+			var w;
+			if (num == 0 || num == keycodes.row4.length - 1) {
+				w = ((row1.width - ((keycodes.row4.length - 2) * ((topRowWidth) + 5))) / 2);
+			} else {
+				w = (topRowWidth) + 5;
+			}
+			row4.add_child(new St.Button({
+				label: i.lowerName,
+				height: topRowHeight + 20,
+				width: w
+			}));
+			var isMod = false;
+			for (var j of [42, 54, 29, 125, 56, 100, 97, 58]) {
+				if (i.code == j) {
+					isMod = true;
+					break;
+				}
+			}
+			row4.get_children()[num].char = i;
+			if (!isMod) {
+				row4.get_children()[num].connect("clicked", () => this.decideMod(i))
+			} else {
+				const modButton = row4.get_children()[num];
+				row4.get_children()[num].connect("clicked", () => this.decideMod(i, modButton))
+			}
+		}
+		this.keys.push.apply(this.keys, row4.get_children());
+		row4.add_style_class_name("keysHolder");
+		let row5 = new St.BoxLayout({
+			pack_start: true
+		});
+		for (var num in keycodes.row5) {
+			const i = keycodes.row5[num]
+			var w;
+			if (num == 0 || num == keycodes.row5.length - 1) {
+				w = ((row1.width - ((keycodes.row5.length - 2) * ((topRowWidth) + 5))) / 2);
+			} else {
+				w = (topRowWidth) + 5;
+			}
+			row5.add_child(new St.Button({
+				label: i.lowerName,
+				height: topRowHeight + 20,
+				width: w
+			}));
+			var isMod = false;
+			for (var j of [42, 54, 29, 125, 56, 100, 97, 58]) {
+				if (i.code == j) {
+					isMod = true;
+					break;
+				}
+			}
+			row5.get_children()[num].char = i;
+			if (!isMod) {
+				row5.get_children()[num].connect("clicked", () => this.decideMod(i))
+			} else {
+				const modButton = row5.get_children()[num];
+				row5.get_children()[num].connect("clicked", () => this.decideMod(i, modButton))
+			}
+		}
+		this.keys.push.apply(this.keys, row5.get_children());
+		row5.add_style_class_name("keysHolder");
+		let row6 = new St.BoxLayout({
+			pack_start: true
+		});
+		for (var num in keycodes.row6) {
+			const i = keycodes.row6[num]
+			var w;
+			if (num == 3) {
+				w = ((row1.width - ((keycodes.row6.length + 1) * ((topRowWidth) + 5))));
+				row6.add_child(new St.Button({
+					label: i.lowerName,
+					height: topRowHeight + 20,
+					width: w
+				}));
+				var isMod = false;
+				for (var j of [42, 54, 29, 125, 56, 100, 97, 58]) {
+					if (i.code == j) {
+						isMod = true;
+						break;
+					}
+				}
+				row6.get_children()[num].char = i;
+				this.keys.push(row6.get_children()[num]);
+				if (!isMod) {
+					row6.get_children()[num].connect("clicked", () => this.decideMod(i))
+				} else {
+					const modButton = row6.get_children()[num];
+					row6.get_children()[num].connect("clicked", () => this.decideMod(i, modButton))
+				}
+			} else if (num == keycodes.row6.length - 1) {
+				var gbox = new St.BoxLayout({
+					pack_start: true
+				});
+				var btn1 = new St.Button({
+					label: (keycodes.row6[keycodes.row6.length - 1])[0].lowerName
+				});
+				gbox.add_child(btn1);
+				var vbox = new St.BoxLayout({
+					vertical: true
+				});
+				var btn2 = new St.Button({
+					label: (keycodes.row6[keycodes.row6.length - 1])[1].lowerName
+				});
+				var btn3 = new St.Button({
+					label: (keycodes.row6[keycodes.row6.length - 1])[2].lowerName
+				});
+				vbox.add_child(btn2);
+				vbox.add_child(btn3);
+				gbox.add_child(vbox);
+				var btn4 = new St.Button({
+					label: (keycodes.row6[keycodes.row6.length - 1])[3].lowerName
+				});
+				gbox.add_child(btn4);
+				var btn5 = new St.Button();
+				btn5.add_style_class_name("move_btn")
+				var btn6 = new St.Button();
+				btn6.add_style_class_name("close_btn")
+				if (this.settings.get_boolean("enable-drag")) {
+					gbox.add_child(btn5);
+				}
+				gbox.add_child(btn6);
+				btn1.connect("clicked", () => this.decideMod((keycodes.row6[keycodes.row6.length - 1])[0]))
+				btn2.connect("clicked", () => this.decideMod((keycodes.row6[keycodes.row6.length - 1])[1]))
+				btn3.connect("clicked", () => this.decideMod((keycodes.row6[keycodes.row6.length - 1])[2]))
+				btn4.connect("clicked", () => this.decideMod((keycodes.row6[keycodes.row6.length - 1])[3]))
+				btn5.connect("clicked", () => {
+					if (this.settings.get_boolean("enable-drag")) {
+						this.draggable = !this.draggable;
+						this.keys.forEach(keyholder => {
+							if (!keyholder.has_style_class_name("move_btn")) {
+								keyholder.set_opacity(this.draggable ? 255 : 0);
+								keyholder.ease({
+									opacity: this.draggable ? 0 : 255,
+									duration: 100,
+									mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+									onComplete: () => {
+										keyholder.set_z_position(this.draggable ? -10000000000000000000000000000 : 0);
+										if (this.draggable) {
+											this.box.add_style_pseudo_class("dragging");
+										} else {
+											this.box.remove_style_pseudo_class("dragging");
+										}
+									}
+								});
+							}
+						});
+						btn5.ease({
+							width: btn5.width * (this.draggable ? 2 : 0.5),
+							duration: 100,
+							mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+							onComplete: () => {}
+						})
+						btn6.ease({
+							width: this.draggable ? 0 : btn5.width / 2,
+							duration: 100,
+							mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+							onComplete: () => {}
+						})
+					}
+				})
+				btn6.connect("clicked", () => { this.close(); this.closedFromButton = true; });
+				btn1.char = (keycodes.row6[keycodes.row6.length - 1])[0]
+				btn2.char = (keycodes.row6[keycodes.row6.length - 1])[1]
+				btn3.char = (keycodes.row6[keycodes.row6.length - 1])[2]
+				btn4.char = (keycodes.row6[keycodes.row6.length - 1])[3]
+				btn1.width = Math.round((((topRowWidth) + 5)) * (2 / 3));
+				btn1.height = topRowHeight + 20;
+				btn2.width = Math.round((((topRowWidth) + 5)) * (2 / 3));
+				btn3.width = Math.round((((topRowWidth) + 5)) * (2 / 3));
+				btn4.width = Math.round((((topRowWidth) + 5)) * (2 / 3));
+				btn4.height = topRowHeight + 20;
+				btn2.height = (topRowHeight + 20) / 2;
+				btn3.height = (topRowHeight + 20) / 2;
+				btn5.width = Math.round((topRowWidth / 2) + 2);
+				btn6.width = this.settings.get_boolean("enable-drag") ? Math.round((topRowWidth / 2) + 2) : Math.round((topRowWidth) + 4);
+				btn5.height = topRowHeight + 20;
+				btn6.height = topRowHeight + 20;
+				btn1.add_style_class_name('dr-b');
+				btn2.add_style_class_name('dr-b');
+				btn3.add_style_class_name('dr-b');
+				btn4.add_style_class_name('dr-b');
+				btn5.add_style_class_name('dr-b');
+				btn6.add_style_class_name('dr-b');
+				this.keys.push.apply(this.keys, [btn1, btn2, btn3, btn4, btn5, btn6]);
+				gbox.add_style_class_name('keyActionBtns');
+				row6.add_child(gbox);
+			} else {
+				w = (topRowWidth) + 5;
+				row6.add_child(new St.Button({
+					label: i.lowerName,
+					height: topRowHeight + 20,
+					width: w
+				}));
+
+				var isMod = false;
+				for (var j of [42, 54, 29, 125, 56, 100, 97, 58]) {
+					if (i.code == j) {
+						isMod = true;
+						break;
+					}
+				}
+				row6.get_children()[num].char = i;
+				this.keys.push(row6.get_children()[num]);
+				if (!isMod) {
+					row6.get_children()[num].connect("clicked", () => this.decideMod(i))
+				} else {
+					const modButton = row6.get_children()[num];
+					row6.get_children()[num].connect("clicked", () => this.decideMod(i, modButton))
+				}
+			}
+		}
+		row6.add_style_class_name("keysHolder");
+
+		this.box.add_child(row1);
+		this.box.add_child(row2);
+		this.box.add_child(row3);
+		this.box.add_child(row4);
+		this.box.add_child(row5);
+		this.box.add_child(row6);
+		var containers_ = this.box.get_children();
+                if (this.lightOrDark(this.settings.get_double("background-r"), this.settings.get_double("background-g"), this.settings.get_double("background-b"))) {
+			this.box.add_style_class_name("inverted");
+		} else {
+			this.box.add_style_class_name("regular");
+		}
+		this.keys.forEach(item => {
+			item.width -= this.settings.get_int("border-spacing-px") * 2;
+			item.height -= this.settings.get_int("border-spacing-px") * 2;
+			item.set_style("margin: " + this.settings.get_int("border-spacing-px") + "px; font-size: " + this.settings.get_int("font-size-px") + "px; border-radius: " + (this.settings.get_boolean("round-key-corners") ? "5px;" : "0;") + "background-size: " + this.settings.get_int("font-size-px") + "px;");
+			if (this.lightOrDark(this.settings.get_double("background-r"), this.settings.get_double("background-g"), this.settings.get_double("background-b"))) {
+				item.add_style_class_name("inverted");
+			} else {
+				item.add_style_class_name("regular");
+			}
+			let isMod = false
+			for (var j of [42, 54, 29, 125, 56, 100, 97, 58]) {
+				try {
+					if (item.char.code == j) {
+						isMod = true;
+						break;
+					}
+				} catch {
+					print(item)
+				}
+			}
+			item.set_pivot_point(0.5, 0.5)
+			item.connect("destroy", () => {
+				if (item.button_pressed !== null){
+					clearTimeout(item.button_pressed)
+					item.button_pressed == null
+				}
+				if (item.button_repeat !== null){
+					clearInterval(item.button_repeat)
+					item.button_repeat == null
+				}
+				if (item.tap_pressed !== null){
+						clearTimeout(item.tap_pressed)
+						item.tap_pressed == null
+				}
+				if (item.tap_repeat !== null){
+					clearInterval(item.tap_repeat)
+					item.tap_repeat == null
+				}
+			})
+			item.connect("button-press-event", () => {
+				item.set_scale(1.2, 1.2)
+				let player
+				if (this.settings.get_boolean("play-sound")) {
+					player = global.display.get_sound_player();
+					player.play_from_theme("dialog-information", "tap", null)
+				}
+				item.button_pressed = setTimeout(() => {
+					if (!isMod) {
+						const oldModBtns = this.modBtns
+						item.button_repeat = setInterval(() => {
+							if (this.settings.get_boolean("play-sound")) {
+								player.play_from_theme("dialog-information", "tap", null)
+							}
+							this.decideMod(item.char)
+							
+							for (var i of oldModBtns) {
+								this.decideMod(i.char, i)
+							}
+						}, 100);
+						
+					}
+				}, 750);
+			})
+			item.connect("button-release-event", () => {
+				item.ease({
+					scale_x: 1,
+					scale_y: 1,
+					duration: 100,
+					mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+					onComplete: () => {item.set_scale(1, 1)}
+				})
+				if (item.button_pressed !== null){
+					clearTimeout(item.button_pressed)
+					item.button_pressed == null
+				}
+				if (item.button_repeat !== null){
+					clearInterval(item.button_repeat)
+					item.button_repeat == null
+				}
+			})
+			item.connect("touch-event", () => {
+				if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN) {
+					item.set_scale(1.2, 1.2)
+					let player
+					if (this.settings.get_boolean("play-sound")) {
+						player = global.display.get_sound_player();
+						player.play_from_theme("dialog-information", "tap", null)
+					}
+					
+					item.tap_pressed = setTimeout(() => {
+						
+						
+						if (!isMod) {
+							const oldModBtns = this.modBtns
+							item.tap_repeat = setInterval(() => {
+								
+								if (this.settings.get_boolean("play-sound")) {
+									player.play_from_theme("dialog-information", "tap", null)
+								}
+								this.decideMod(item.char)
+								
+								for (var i of oldModBtns) {
+									this.decideMod(i.char, i)
+								}
+							}, 100);
+							
+						}
+					}, 750);
+				} else if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_END) {	
+					item.ease({
+						scale_x: 1,
+						scale_y: 1,
+						duration: 100,
+						mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+						onComplete: () => {item.set_scale(1, 1)}
+					})
+					if (item.tap_pressed !== null){
+						clearTimeout(item.tap_pressed)
+						item.tap_pressed == null
+					}
+					if (item.tap_repeat !== null){
+						clearInterval(item.tap_repeat)
+						item.tap_repeat == null
+					}
+				}
+			})
+		});
+	}
+
+	lightOrDark(r, g, b) {
+		var hsp;
+		hsp = Math.sqrt(
+			0.299 * (r * r) +
+			0.587 * (g * g) +
+			0.114 * (b * b)
+		);
+		if (hsp > 127.5) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	sendKey(keys) {
+		try {
+			for (var i = 0; i < keys.length; i++) {
+				this.inputDevice.notify_key(Clutter.get_current_event_time(), keys[i], Clutter.KeyState.PRESSED);
+			}
+			if (this.keyTimeout !== null) {
+				clearTimeout(this.keyTimeout);
+				this.keyTimeout = null;
+			}
+			this.keyTimeout = setTimeout(() => {
+				for (var j = keys.length - 1; j >= 0; j--) {
+					this.inputDevice.notify_key(Clutter.get_current_event_time(), keys[j], Clutter.KeyState.RELEASED);
+				}
+			}, 100);
+		} catch (err) {
+			let source = new imports.ui.messageTray.SystemNotificationSource();
+			source.connect('destroy', () => {
+				source = null;
+			})
+			Main.messageTray.add(source);
+			let notification = new imports.ui.messageTray.Notification(source, "GJS-OSK: An unknown error occured", "Please report this bug to the Issues page:\n\n" + err + "\n\nKeys Pressed: " + keys)
+			notification.setTransient(false);
+			notification.setResident(false);
+			source.showNotification(notification);
+			notification.connect("activated", () => {
+				sendCommand("xdg-open https://github.com/Vishram1123/gjs-osk/issues");
+			});
+		}
+	}
+
+	sendCommand(command_line) {
+		try {
+			let [success, argv] = GLib.shell_parse_argv(command_line);
+			trySpawn(argv);
+		} catch (err) {
+			let source = new imports.ui.messageTray.SystemNotificationSource();
+			source.connect('destroy', () => {
+				source = null;
+			})
+			Main.messageTray.add(source);
+			let notification = new imports.ui.messageTray.Notification(source, "GJS-OSK: An unknown error occured", "Please report this bug to the Issues page:\n\n" + err)
+			notification.setTransient(false);
+			notification.setResident(false);
+			source.showNotification(notification);
+		}
+	}
+
+	decideMod(i, mBtn) {
+		if (i.code == 29 || i.code == 97 || i.code == 125) {
+			this.setNormMod(mBtn);
+		} else if (i.code == 56 || i.code == 100) {
+			this.setAlt(mBtn);
+		} else if (i.code == 42 || i.code == 54) {
+			this.setShift(mBtn);
+		} else if (i.code == 58) {
+			this.setCapsLock(mBtn);
+		} else {
+			this.mod.push(i.code);
+			this.sendKey(this.mod);
+			this.mod = [];
+			this.modBtns.forEach(button => {
+				button.remove_style_class_name("selected");
+			});
+			this.resetAllMod();
+			this.modBtns = [];
+		}
+	}
+
+	setCapsLock(button) {
+		if (!this.capsL) {
+			button.add_style_class_name("selected");
+			this.capsL = true;
+			this.keys.forEach(key => {
+				if (this.shift && key.char != undefined) {
+					if (key.char.letter == "primary") {
+						key.label = key.label.toLowerCase();
+					} else if (key.char.letter == "pseudo") {
+						key.label = key.char.upperName;
+					} else if (key.char.letter == undefined) {
+						key.label = key.char.upperName;
+					}
+				} else if (key.char != undefined && key.char.letter != undefined) {
+					key.label = key.label.toUpperCase();
+				}
+			});
+		} else {
+			button.remove_style_class_name("selected");
+			this.capsL = false;
+			this.keys.forEach(key => {
+				if (this.shift && key.char != undefined) {
+					if (key.char.letter == "primary") {
+						key.label = key.label.toUpperCase();
+					} else if (key.char.letter == "pseudo") {
+						key.label = key.char.upperName;
+					} else if (key.char.letter == undefined) {
+						key.label = key.char.upperName;
+					}
+				} else if (key.char != undefined && key.char.letter != undefined) {
+					key.label = key.label.toLowerCase();
+				}
+			});
+		}
+		this.sendKey([button.char.code]);
+	}
+
+	setAlt(button) {
+		if (!this.alt) {
+			this.alt = true;
+			this.keys.forEach(key => {
+				if (!this.shift && key.char != undefined) {
+					if (key.char.altName != "") {
+						key.label = key.char.altName;
+					}
+				}
+			});
+		} else {
+			this.alt = false;
+			this.keys.forEach(key => {
+				if (!this.shift && key.char != undefined) {
+					if (key.char.altName != "" && this.capsL && (key.char.letter == "primary" || key.char.letter == "pseudo")) {
+						key.label = key.char.lowerName.toUpperCase();
+					} else if (key.char.altName != "" && this.capsL) {
+						key.label = key.char.lowerName;
+					} else if (key.char.altName != "" && !this.capsL) {
+						key.label = key.char.lowerName;
+					}
+				}
+			});
+			this.sendKey([button.char.code]);
+		}
+		this.setNormMod(button);
+	}
+
+	setShift(button) {
+		if (!this.shift) {
+			this.shift = true;
+			this.keys.forEach(key => {
+				if (this.capsL && key.char != undefined) {
+					if (key.char.letter == "primary") {
+						key.label = key.char.lowerName.toLowerCase();
+					} else if (key.char.letter == "pseudo" || key.char.letter == undefined) {
+						key.label = key.char.upperName;
+					}
+				} else if (key.char != undefined) {
+					key.label = key.char.upperName;
+				}
+			});
+		} else {
+			this.shift = false;
+			this.keys.forEach(key => {
+				if (this.capsL && key.char != undefined) {
+					if (this.alt && key.char.altName != "") {
+						key.label = key.char.altName;
+					} else if (key.char.letter != undefined) {
+						key.label = key.char.lowerName.toUpperCase();
+					} else if (key.char.letter == undefined) {
+						key.label = key.char.lowerName;
+					}
+				} else if (key.char != undefined) {
+					if (this.alt && key.char.altName != "") {
+						key.label = key.char.altName;
+					} else {
+						key.label = key.char.lowerName;
+					}
+				}
+			});
+			this.sendKey([button.char.code]);
+		}
+		this.setNormMod(button);
+	}
+
+	setNormMod(button) {
+		if (this.mod.includes(button.char.code)) {
+			this.mod.splice(this.mod.indexOf(button.char.code), this.mod.indexOf(button.char.code) + 1);
+			button.remove_style_class_name("selected");
+			this.modBtns.splice(this.modBtns.indexOf(button), this.modBtns.indexOf(button) + 1);
+			this.sendKey([button.char.code]);
+		} else {
+			button.add_style_class_name("selected");
+			this.mod.push(button.char.code);
+			this.modBtns.push(button);
+		}
+	}
+
+	resetAllMod() {
+		if (this.shift) {
+			this.shift = false;
+			this.keys.forEach(key => {
+				if (this.capsL && key.char != undefined) {
+					if (this.alt && key.char.altName != "") {
+						key.label = key.char.altName;
+					} else if (key.char.letter != undefined) {
+						key.label = key.char.lowerName.toUpperCase();
+					} else if (key.char.letter == undefined) {
+						key.label = key.char.lowerName;
+					}
+				} else if (key.char != undefined) {
+					if (this.alt && key.char.altName != "") {
+						key.label = key.char.altName;
+					} else {
+						key.label = key.char.lowerName;
+					}
+				}
+			});
+		}
+		if (this.alt) {
+			this.alt = false;
+			this.keys.forEach(key => {
+				if (!this.shift && key.char != undefined) {
+					if (key.char.altName != "" && this.capsL && (key.char.letter == "primary" || key.char.letter == "pseudo")) {
+						key.label = key.char.lowerName.toUpperCase();
+					} else if (key.char.altName != "" && this.capsL) {
+						key.label = key.char.lowerName;
+					} else if (key.char.altName != "" && !this.capsL) {
+						key.label = key.char.lowerName;
+					}
+				}
+			});
+		}
+	}
+};

+ 2062 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/keycodes.json

@@ -0,0 +1,2062 @@
+{
+  "qwerty": {
+    "row1": [
+      {
+        "code": 1,
+        "lowerName": "esc",
+        "upperName": "esc",
+        "altName": ""
+      },
+      {
+        "code": 59,
+        "lowerName": "F1",
+        "upperName": "F1",
+        "altName": ""
+      },
+      {
+        "code": 60,
+        "lowerName": "F2",
+        "upperName": "F2",
+        "altName": ""
+      },
+      {
+        "code": 61,
+        "lowerName": "F3",
+        "upperName": "F3",
+        "altName": ""
+      },
+      {
+        "code": 62,
+        "lowerName": "F4",
+        "upperName": "F4",
+        "altName": ""
+      },
+      {
+        "code": 63,
+        "lowerName": "F5",
+        "upperName": "F5",
+        "altName": ""
+      },
+      {
+        "code": 64,
+        "lowerName": "F6",
+        "upperName": "F6",
+        "altName": ""
+      },
+      {
+        "code": 65,
+        "lowerName": "F7",
+        "upperName": "F7",
+        "altName": ""
+      },
+      {
+        "code": 66,
+        "lowerName": "F8",
+        "upperName": "F8",
+        "altName": ""
+      },
+      {
+        "code": 67,
+        "lowerName": "F9",
+        "upperName": "F9",
+        "altName": ""
+      },
+      {
+        "code": 68,
+        "lowerName": "F10",
+        "upperName": "F10",
+        "altName": ""
+      },
+      {
+        "code": 87,
+        "lowerName": "F11",
+        "upperName": "F11",
+        "altName": ""
+      },
+      {
+        "code": 88,
+        "lowerName": "F12",
+        "upperName": "F12",
+        "altName": ""
+      },
+      {
+        "code": 210,
+        "lowerName": "PrtSc",
+        "upperName": "PrtSc",
+        "altName": ""
+      },
+      {
+        "code": 111,
+        "lowerName": "⌦",
+        "upperName": "⌦",
+        "altName": ""
+      }
+    ],
+    "row2": [
+      {
+        "code": 41,
+        "lowerName": "`",
+        "upperName": "~",
+        "altName": ""
+      },
+      {
+        "code": 2,
+        "lowerName": "1",
+        "upperName": "!",
+        "altName": ""
+      },
+      {
+        "code": 3,
+        "lowerName": "2",
+        "upperName": "@",
+        "altName": ""
+      },
+      {
+        "code": 4,
+        "lowerName": "3",
+        "upperName": "#",
+        "altName": ""
+      },
+      {
+        "code": 5,
+        "lowerName": "4",
+        "upperName": "$",
+        "altName": ""
+      },
+      {
+        "code": 6,
+        "lowerName": "5",
+        "upperName": "%",
+        "altName": ""
+      },
+      {
+        "code": 7,
+        "lowerName": "6",
+        "upperName": "^",
+        "altName": ""
+      },
+      {
+        "code": 8,
+        "lowerName": "7",
+        "upperName": "&",
+        "altName": ""
+      },
+      {
+        "code": 9,
+        "lowerName": "8",
+        "upperName": "*",
+        "altName": ""
+      },
+      {
+        "code": 10,
+        "lowerName": "9",
+        "upperName": "(",
+        "altName": ""
+      },
+      {
+        "code": 11,
+        "lowerName": "0",
+        "upperName": ")",
+        "altName": ""
+      },
+      {
+        "code": 12,
+        "lowerName": "-",
+        "upperName": "_",
+        "altName": ""
+      },
+      {
+        "code": 13,
+        "lowerName": "=",
+        "upperName": "+",
+        "altName": ""
+      },
+      {
+        "code": 14,
+        "lowerName": "⌫",
+        "upperName": "⌫",
+        "altName": ""
+      }
+    ],
+    "row3": [
+      {
+        "code": 15,
+        "lowerName": "⇥",
+        "upperName": "⇥",
+        "altName": ""
+      },
+      {
+        "code": 16,
+        "lowerName": "q",
+        "letter": "primary",
+        "upperName": "Q",
+        "altName": ""
+      },
+      {
+        "code": 17,
+        "lowerName": "w",
+        "letter": "primary",
+        "upperName": "W",
+        "altName": ""
+      },
+      {
+        "code": 18,
+        "lowerName": "e",
+        "letter": "primary",
+        "upperName": "E",
+        "altName": ""
+      },
+      {
+        "code": 19,
+        "lowerName": "r",
+        "letter": "primary",
+        "upperName": "R",
+        "altName": ""
+      },
+      {
+        "code": 20,
+        "lowerName": "t",
+        "letter": "primary",
+        "upperName": "T",
+        "altName": ""
+      },
+      {
+        "code": 21,
+        "lowerName": "y",
+        "letter": "primary",
+        "upperName": "Y",
+        "altName": ""
+      },
+      {
+        "code": 22,
+        "lowerName": "u",
+        "letter": "primary",
+        "upperName": "U",
+        "altName": ""
+      },
+      {
+        "code": 23,
+        "lowerName": "i",
+        "letter": "primary",
+        "upperName": "I",
+        "altName": ""
+      },
+      {
+        "code": 24,
+        "lowerName": "o",
+        "letter": "primary",
+        "upperName": "O",
+        "altName": ""
+      },
+      {
+        "code": 25,
+        "lowerName": "p",
+        "letter": "primary",
+        "upperName": "P",
+        "altName": ""
+      },
+      {
+        "code": 26,
+        "lowerName": "[",
+        "upperName": "{",
+        "altName": ""
+      },
+      {
+        "code": 27,
+        "lowerName": "]",
+        "upperName": "}",
+        "altName": ""
+      },
+      {
+        "code": 43,
+        "lowerName": "\\",
+        "upperName": "|",
+        "altName": ""
+      }
+    ],
+    "row4": [
+      {
+        "code": 58,
+        "lowerName": "⇪",
+        "upperName": "⇪",
+        "altName": ""
+      },
+      {
+        "code": 30,
+        "lowerName": "a",
+        "letter": "primary",
+        "upperName": "A",
+        "altName": ""
+      },
+      {
+        "code": 31,
+        "lowerName": "s",
+        "letter": "primary",
+        "upperName": "S",
+        "altName": ""
+      },
+      {
+        "code": 32,
+        "lowerName": "d",
+        "letter": "primary",
+        "upperName": "D",
+        "altName": ""
+      },
+      {
+        "code": 33,
+        "lowerName": "f",
+        "letter": "primary",
+        "upperName": "F",
+        "altName": ""
+      },
+      {
+        "code": 34,
+        "lowerName": "g",
+        "letter": "primary",
+        "upperName": "G",
+        "altName": ""
+      },
+      {
+        "code": 35,
+        "lowerName": "h",
+        "letter": "primary",
+        "upperName": "H",
+        "altName": ""
+      },
+      {
+        "code": 36,
+        "lowerName": "j",
+        "letter": "primary",
+        "upperName": "J",
+        "altName": ""
+      },
+      {
+        "code": 37,
+        "lowerName": "k",
+        "letter": "primary",
+        "upperName": "K",
+        "altName": ""
+      },
+      {
+        "code": 38,
+        "lowerName": "l",
+        "letter": "primary",
+        "upperName": "L",
+        "altName": ""
+      },
+      {
+        "code": 39,
+        "lowerName": ";",
+        "upperName": ":",
+        "altName": ""
+      },
+      {
+        "code": 40,
+        "lowerName": "'",
+        "upperName": "\"",
+        "altName": ""
+      },
+      {
+        "code": 28,
+        "lowerName": "⏎",
+        "upperName": "⏎",
+        "altName": ""
+      }
+    ],
+    "row5": [
+      {
+        "code": 42,
+        "lowerName": "⇧",
+        "upperName": "⇧",
+        "altName": ""
+      },
+      {
+        "code": 44,
+        "lowerName": "z",
+        "letter": "primary",
+        "upperName": "Z",
+        "altName": ""
+      },
+      {
+        "code": 45,
+        "lowerName": "x",
+        "letter": "primary",
+        "upperName": "X",
+        "altName": ""
+      },
+      {
+        "code": 46,
+        "lowerName": "c",
+        "letter": "primary",
+        "upperName": "C",
+        "altName": ""
+      },
+      {
+        "code": 47,
+        "lowerName": "v",
+        "letter": "primary",
+        "upperName": "V",
+        "altName": ""
+      },
+      {
+        "code": 48,
+        "lowerName": "b",
+        "letter": "primary",
+        "upperName": "B",
+        "altName": ""
+      },
+      {
+        "code": 49,
+        "lowerName": "n",
+        "letter": "primary",
+        "upperName": "N",
+        "altName": ""
+      },
+      {
+        "code": 50,
+        "lowerName": "m",
+        "letter": "primary",
+        "upperName": "M",
+        "altName": ""
+      },
+      {
+        "code": 51,
+        "lowerName": ",",
+        "upperName": "<",
+        "altName": ""
+      },
+      {
+        "code": 52,
+        "lowerName": ".",
+        "upperName": ">",
+        "altName": ""
+      },
+      {
+        "code": 53,
+        "lowerName": "/",
+        "upperName": "?",
+        "altName": ""
+      },
+      {
+        "code": 54,
+        "lowerName": "⇧",
+        "upperName": "⇧",
+        "altName": ""
+      }
+    ],
+    "row6": [
+      {
+        "code": 29,
+        "lowerName": "⌃",
+        "upperName": "⌃",
+        "altName": ""
+      },
+      {
+        "code": 125,
+        "lowerName": "❖",
+        "upperName": "❖",
+        "altName": ""
+      },
+      {
+        "code": 56,
+        "lowerName": "⌥",
+        "upperName": "⌥",
+        "altName": ""
+      },
+      {
+        "code": 57,
+        "lowerName": "␣",
+        "upperName": "␣",
+        "altName": ""
+      },
+      {
+        "code": 100,
+        "lowerName": "⌥",
+        "upperName": "⌥",
+        "altName": ""
+      },
+      {
+        "code": 97,
+        "lowerName": "⌃",
+        "upperName": "⌃",
+        "altName": ""
+      },
+      [
+        {
+          "code": 105,
+          "lowerName": "←",
+          "upperName": "←",
+          "altName": ""
+        },
+        {
+          "code": 103,
+          "lowerName": "↑",
+          "upperName": "↑",
+          "altName": ""
+        },
+        {
+          "code": 108,
+          "lowerName": "↓",
+          "upperName": "↓",
+          "altName": ""
+        },
+        {
+          "code": 106,
+          "lowerName": "→",
+          "upperName": "→",
+          "altName": ""
+        }
+      ]
+    ]
+  },
+  "azerty": {
+    "row1": [
+      {
+        "code": 1,
+        "lowerName": "esc",
+        "upperName": "esc",
+        "altName": ""
+      },
+      {
+        "code": 59,
+        "lowerName": "F1",
+        "upperName": "F1",
+        "altName": ""
+      },
+      {
+        "code": 60,
+        "lowerName": "F2",
+        "upperName": "F2",
+        "altName": ""
+      },
+      {
+        "code": 61,
+        "lowerName": "F3",
+        "upperName": "F3",
+        "altName": ""
+      },
+      {
+        "code": 62,
+        "lowerName": "F4",
+        "upperName": "F4",
+        "altName": ""
+      },
+      {
+        "code": 63,
+        "lowerName": "F5",
+        "upperName": "F5",
+        "altName": ""
+      },
+      {
+        "code": 64,
+        "lowerName": "F6",
+        "upperName": "F6",
+        "altName": ""
+      },
+      {
+        "code": 65,
+        "lowerName": "F7",
+        "upperName": "F7",
+        "altName": ""
+      },
+      {
+        "code": 66,
+        "lowerName": "F8",
+        "upperName": "F8",
+        "altName": ""
+      },
+      {
+        "code": 67,
+        "lowerName": "F9",
+        "upperName": "F9",
+        "altName": ""
+      },
+      {
+        "code": 68,
+        "lowerName": "F10",
+        "upperName": "F10",
+        "altName": ""
+      },
+      {
+        "code": 87,
+        "lowerName": "F11",
+        "upperName": "F11",
+        "altName": ""
+      },
+      {
+        "code": 88,
+        "lowerName": "F12",
+        "upperName": "F12",
+        "altName": ""
+      },
+      {
+        "code": 210,
+        "lowerName": "PrtSc",
+        "upperName": "PrtSc",
+        "altName": ""
+      },
+      {
+        "code": 111,
+        "lowerName": "⌦",
+        "upperName": "⌦",
+        "altName": ""
+      }
+    ],
+    "row2": [
+      {
+        "code": 41,
+        "lowerName": "²",
+        "upperName": "²",
+        "altName": ""
+      },
+      {
+        "code": 2,
+        "lowerName": "&",
+        "upperName": "1",
+        "altName": ""
+      },
+      {
+        "code": 3,
+        "lowerName": "é",
+        "letter": "pseudo",
+        "upperName": "2",
+        "altName": "~"
+      },
+      {
+        "code": 4,
+        "lowerName": "\"",
+        "upperName": "3",
+        "altName": "#"
+      },
+      {
+        "code": 5,
+        "lowerName": "'",
+        "upperName": "4",
+        "altName": "{"
+      },
+      {
+        "code": 6,
+        "lowerName": "(",
+        "upperName": "5",
+        "altName": "["
+      },
+      {
+        "code": 7,
+        "lowerName": "-",
+        "upperName": "6",
+        "altName": "|"
+      },
+      {
+        "code": 8,
+        "lowerName": "è",
+        "letter": "pseudo",
+        "upperName": "7",
+        "altName": "`"
+      },
+      {
+        "code": 9,
+        "lowerName": "_",
+        "upperName": "8",
+        "altName": "\""
+      },
+      {
+        "code": 10,
+        "lowerName": "ç",
+        "letter": "pseudo",
+        "upperName": "9",
+        "altName": "^"
+      },
+      {
+        "code": 11,
+        "lowerName": "à",
+        "letter": "pseudo",
+        "upperName": "0",
+        "altName": "@"
+      },
+      {
+        "code": 12,
+        "lowerName": ")",
+        "upperName": "°",
+        "altName": "]"
+      },
+      {
+        "code": 13,
+        "lowerName": "=",
+        "upperName": "+",
+        "altName": "}"
+      },
+      {
+        "code": 14,
+        "lowerName": "⌫",
+        "upperName": "⌫",
+        "altName": ""
+      }
+    ],
+    "row3": [
+      {
+        "code": 15,
+        "lowerName": "⇥",
+        "upperName": "⇥",
+        "altName": ""
+      },
+      {
+        "code": 16,
+        "lowerName": "a",
+        "letter": "primary",
+        "upperName": "A",
+        "altName": ""
+      },
+      {
+        "code": 17,
+        "lowerName": "z",
+        "letter": "primary",
+        "upperName": "Z",
+        "altName": ""
+      },
+      {
+        "code": 18,
+        "lowerName": "e",
+        "letter": "primary",
+        "upperName": "E",
+        "altName": "€"
+      },
+      {
+        "code": 19,
+        "lowerName": "r",
+        "letter": "primary",
+        "upperName": "R",
+        "altName": ""
+      },
+      {
+        "code": 20,
+        "lowerName": "t",
+        "letter": "primary",
+        "upperName": "T",
+        "altName": ""
+      },
+      {
+        "code": 21,
+        "lowerName": "y",
+        "letter": "primary",
+        "upperName": "Y",
+        "altName": ""
+      },
+      {
+        "code": 22,
+        "lowerName": "u",
+        "letter": "primary",
+        "upperName": "U",
+        "altName": ""
+      },
+      {
+        "code": 23,
+        "lowerName": "i",
+        "letter": "primary",
+        "upperName": "I",
+        "altName": ""
+      },
+      {
+        "code": 24,
+        "lowerName": "o",
+        "letter": "primary",
+        "upperName": "O",
+        "altName": ""
+      },
+      {
+        "code": 25,
+        "lowerName": "p",
+        "letter": "primary",
+        "upperName": "P",
+        "altName": ""
+      },
+      {
+        "code": 26,
+        "lowerName": "^",
+        "upperName": "¨",
+        "altName": ""
+      },
+      {
+        "code": 27,
+        "lowerName": "$",
+        "upperName": "£",
+        "altName": "¤"
+      },
+      {
+        "code": 43,
+        "lowerName": "*",
+        "upperName": "µ",
+        "altName": ""
+      }
+    ],
+    "row4": [
+      {
+        "code": 58,
+        "lowerName": "⇪",
+        "upperName": "⇪",
+        "altName": ""
+      },
+      {
+        "code": 30,
+        "lowerName": "q",
+        "letter": "primary",
+        "upperName": "Q",
+        "altName": ""
+      },
+      {
+        "code": 31,
+        "lowerName": "s",
+        "letter": "primary",
+        "upperName": "S",
+        "altName": ""
+      },
+      {
+        "code": 32,
+        "lowerName": "d",
+        "letter": "primary",
+        "upperName": "D",
+        "altName": ""
+      },
+      {
+        "code": 33,
+        "lowerName": "f",
+        "letter": "primary",
+        "upperName": "F",
+        "altName": ""
+      },
+      {
+        "code": 34,
+        "lowerName": "g",
+        "letter": "primary",
+        "upperName": "G",
+        "altName": ""
+      },
+      {
+        "code": 35,
+        "lowerName": "h",
+        "letter": "primary",
+        "upperName": "H",
+        "altName": ""
+      },
+      {
+        "code": 36,
+        "lowerName": "j",
+        "letter": "primary",
+        "upperName": "J",
+        "altName": ""
+      },
+      {
+        "code": 37,
+        "lowerName": "k",
+        "letter": "primary",
+        "upperName": "K",
+        "altName": ""
+      },
+      {
+        "code": 38,
+        "lowerName": "l",
+        "letter": "primary",
+        "upperName": "L",
+        "altName": ""
+      },
+      {
+        "code": 39,
+        "lowerName": "m",
+        "letter": "primary",
+        "upperName": "M",
+        "altName": ""
+      },
+      {
+        "code": 40,
+        "lowerName": "ù",
+        "letter": "pseudo",
+        "upperName": "%",
+        "altName": ""
+      },
+      {
+        "code": 28,
+        "lowerName": "⏎",
+        "upperName": "⏎",
+        "altName": ""
+      }
+    ],
+    "row5": [
+      {
+        "code": 42,
+        "lowerName": "⇧",
+        "upperName": "⇧",
+        "altName": ""
+      },
+      {
+        "code": 86,
+        "lowerName": "<",
+        "upperName": ">",
+        "altName": ""
+      },
+      {
+        "code": 44,
+        "lowerName": "w",
+        "letter": "primary",
+        "upperName": "W",
+        "altName": ""
+      },
+      {
+        "code": 45,
+        "lowerName": "x",
+        "letter": "primary",
+        "upperName": "X",
+        "altName": ""
+      },
+      {
+        "code": 46,
+        "lowerName": "c",
+        "letter": "primary",
+        "upperName": "C",
+        "altName": ""
+      },
+      {
+        "code": 47,
+        "lowerName": "v",
+        "letter": "primary",
+        "upperName": "V",
+        "altName": ""
+      },
+      {
+        "code": 48,
+        "lowerName": "b",
+        "letter": "primary",
+        "upperName": "B",
+        "altName": ""
+      },
+      {
+        "code": 49,
+        "lowerName": "n",
+        "letter": "primary",
+        "upperName": "N",
+        "altName": ""
+      },
+      {
+        "code": 50,
+        "lowerName": ",",
+        "upperName": "?",
+        "altName": ""
+      },
+      {
+        "code": 51,
+        "lowerName": ";",
+        "upperName": ".",
+        "altName": ""
+      },
+      {
+        "code": 52,
+        "lowerName": ":",
+        "upperName": "/",
+        "altName": ""
+      },
+      {
+        "code": 53,
+        "lowerName": "!",
+        "upperName": "§",
+        "altName": ""
+      },
+      {
+        "code": 54,
+        "lowerName": "⇧",
+        "upperName": "⇧",
+        "altName": ""
+      }
+    ],
+    "row6": [
+      {
+        "code": 29,
+        "lowerName": "⌃",
+        "upperName": "⌃",
+        "altName": ""
+      },
+      {
+        "code": 125,
+        "lowerName": "❖",
+        "upperName": "❖",
+        "altName": ""
+      },
+      {
+        "code": 56,
+        "lowerName": "⌥",
+        "upperName": "⌥",
+        "altName": ""
+      },
+      {
+        "code": 57,
+        "lowerName": "␣",
+        "upperName": "␣",
+        "altName": ""
+      },
+      {
+        "code": 100,
+        "lowerName": "⌥",
+        "upperName": "⌥",
+        "altName": ""
+      },
+      {
+        "code": 97,
+        "lowerName": "⌃",
+        "upperName": "⌃",
+        "altName": ""
+      },
+      [
+        {
+          "code": 105,
+          "lowerName": "←",
+          "upperName": "←",
+          "altName": ""
+        },
+        {
+          "code": 103,
+          "lowerName": "↑",
+          "upperName": "↑",
+          "altName": ""
+        },
+        {
+          "code": 108,
+          "lowerName": "↓",
+          "upperName": "↓",
+          "altName": ""
+        },
+        {
+          "code": 106,
+          "lowerName": "→",
+          "upperName": "→",
+          "altName": ""
+        }
+      ]
+    ]
+  },
+  "dvorak": {
+    "row1": [
+      {
+        "code": 1,
+        "lowerName": "esc",
+        "upperName": "esc",
+        "altName": ""
+      },
+      {
+        "code": 59,
+        "lowerName": "F1",
+        "upperName": "F1",
+        "altName": ""
+      },
+      {
+        "code": 60,
+        "lowerName": "F2",
+        "upperName": "F2",
+        "altName": ""
+      },
+      {
+        "code": 61,
+        "lowerName": "F3",
+        "upperName": "F3",
+        "altName": ""
+      },
+      {
+        "code": 62,
+        "lowerName": "F4",
+        "upperName": "F4",
+        "altName": ""
+      },
+      {
+        "code": 63,
+        "lowerName": "F5",
+        "upperName": "F5",
+        "altName": ""
+      },
+      {
+        "code": 64,
+        "lowerName": "F6",
+        "upperName": "F6",
+        "altName": ""
+      },
+      {
+        "code": 65,
+        "lowerName": "F7",
+        "upperName": "F7",
+        "altName": ""
+      },
+      {
+        "code": 66,
+        "lowerName": "F8",
+        "upperName": "F8",
+        "altName": ""
+      },
+      {
+        "code": 67,
+        "lowerName": "F9",
+        "upperName": "F9",
+        "altName": ""
+      },
+      {
+        "code": 68,
+        "lowerName": "F10",
+        "upperName": "F10",
+        "altName": ""
+      },
+      {
+        "code": 87,
+        "lowerName": "F11",
+        "upperName": "F11",
+        "altName": ""
+      },
+      {
+        "code": 88,
+        "lowerName": "F12",
+        "upperName": "F12",
+        "altName": ""
+      },
+      {
+        "code": 210,
+        "lowerName": "PrtSc",
+        "upperName": "PrtSc",
+        "altName": ""
+      },
+      {
+        "code": 111,
+        "lowerName": "⌦",
+        "upperName": "⌦",
+        "altName": ""
+      }
+    ],
+    "row2": [
+      {
+        "code": 41,
+        "lowerName": "`",
+        "upperName": "~",
+        "altName": ""
+      },
+      {
+        "code": 2,
+        "lowerName": "1",
+        "upperName": "!",
+        "altName": ""
+      },
+      {
+        "code": 3,
+        "lowerName": "2",
+        "upperName": "@",
+        "altName": ""
+      },
+      {
+        "code": 4,
+        "lowerName": "3",
+        "upperName": "#",
+        "altName": ""
+      },
+      {
+        "code": 5,
+        "lowerName": "4",
+        "upperName": "$",
+        "altName": ""
+      },
+      {
+        "code": 6,
+        "lowerName": "5",
+        "upperName": "%",
+        "altName": ""
+      },
+      {
+        "code": 7,
+        "lowerName": "6",
+        "upperName": "^",
+        "altName": ""
+      },
+      {
+        "code": 8,
+        "lowerName": "7",
+        "upperName": "&",
+        "altName": ""
+      },
+      {
+        "code": 9,
+        "lowerName": "8",
+        "upperName": "*",
+        "altName": ""
+      },
+      {
+        "code": 10,
+        "lowerName": "9",
+        "upperName": "(",
+        "altName": ""
+      },
+      {
+        "code": 11,
+        "lowerName": "0",
+        "upperName": ")",
+        "altName": ""
+      },
+      {
+        "code": 12,
+        "lowerName": "[",
+        "upperName": "{",
+        "altName": ""
+      },
+      {
+        "code": 13,
+        "lowerName": "]",
+        "upperName": "}",
+        "altName": ""
+      },
+      {
+        "code": 14,
+        "lowerName": "⌫",
+        "upperName": "⌫",
+        "altName": ""
+      }
+    ],
+    "row3": [
+      {
+        "code": 15,
+        "lowerName": "⇥",
+        "upperName": "⇥",
+        "altName": ""
+      },
+      {
+        "code": 16,
+        "lowerName": "'",
+        "upperName": "\"",
+        "altName": ""
+      },
+      {
+        "code": 17,
+        "lowerName": ",",
+        "upperName": "<",
+        "altName": ""
+      },
+      {
+        "code": 18,
+        "lowerName": ".",
+        "upperName": ">",
+        "altName": ""
+      },
+      {
+        "code": 19,
+        "lowerName": "p",
+        "letter": "primary",
+        "upperName": "P",
+        "altName": ""
+      },
+      {
+        "code": 20,
+        "lowerName": "y",
+        "letter": "primary",
+        "upperName": "Y",
+        "altName": ""
+      },
+      {
+        "code": 21,
+        "lowerName": "f",
+        "letter": "primary",
+        "upperName": "F",
+        "altName": ""
+      },
+      {
+        "code": 22,
+        "lowerName": "g",
+        "letter": "primary",
+        "upperName": "G",
+        "altName": ""
+      },
+      {
+        "code": 23,
+        "lowerName": "c",
+        "letter": "primary",
+        "upperName": "C",
+        "altName": ""
+      },
+      {
+        "code": 24,
+        "lowerName": "r",
+        "letter": "primary",
+        "upperName": "R",
+        "altName": ""
+      },
+      {
+        "code": 25,
+        "lowerName": "l",
+        "letter": "primary",
+        "upperName": "L",
+        "altName": ""
+      },
+      {
+        "code": 26,
+        "lowerName": "/",
+        "upperName": "?",
+        "altName": ""
+      },
+      {
+        "code": 27,
+        "lowerName": "=",
+        "upperName": "+",
+        "altName": ""
+      },
+      {
+        "code": 43,
+        "lowerName": "\\",
+        "upperName": "|",
+        "altName": ""
+      }
+    ],
+    "row4": [
+      {
+        "code": 58,
+        "lowerName": "⇪",
+        "upperName": "⇪",
+        "altName": ""
+      },
+      {
+        "code": 30,
+        "lowerName": "a",
+        "letter": "primary",
+        "upperName": "A",
+        "altName": ""
+      },
+      {
+        "code": 31,
+        "lowerName": "o",
+        "letter": "primary",
+        "upperName": "O",
+        "altName": ""
+      },
+      {
+        "code": 32,
+        "lowerName": "e",
+        "letter": "primary",
+        "upperName": "E",
+        "altName": ""
+      },
+      {
+        "code": 33,
+        "lowerName": "u",
+        "letter": "primary",
+        "upperName": "U",
+        "altName": ""
+      },
+      {
+        "code": 34,
+        "lowerName": "i",
+        "letter": "primary",
+        "upperName": "I",
+        "altName": ""
+      },
+      {
+        "code": 35,
+        "lowerName": "d",
+        "letter": "primary",
+        "upperName": "D",
+        "altName": ""
+      },
+      {
+        "code": 36,
+        "lowerName": "h",
+        "letter": "primary",
+        "upperName": "H",
+        "altName": ""
+      },
+      {
+        "code": 37,
+        "lowerName": "t",
+        "letter": "primary",
+        "upperName": "T",
+        "altName": ""
+      },
+      {
+        "code": 38,
+        "lowerName": "n",
+        "letter": "primary",
+        "upperName": "N",
+        "altName": ""
+      },
+      {
+        "code": 39,
+        "lowerName": "s",
+        "letter": "primary",
+        "upperName": "S",
+        "altName": ""
+      },
+      {
+        "code": 40,
+        "lowerName": "-",
+        "upperName": "_",
+        "altName": ""
+      },
+      {
+        "code": 28,
+        "lowerName": "⏎",
+        "upperName": "⏎",
+        "altName": ""
+      }
+    ],
+    "row5": [
+      {
+        "code": 42,
+        "lowerName": "⇧",
+        "upperName": "⇧",
+        "altName": ""
+      },
+      {
+        "code": 44,
+        "lowerName": ";",
+        "upperName": ":",
+        "altName": ""
+      },
+      {
+        "code": 45,
+        "lowerName": "q",
+        "letter": "primary",
+        "upperName": "Q",
+        "altName": ""
+      },
+      {
+        "code": 46,
+        "lowerName": "j",
+        "letter": "primary",
+        "upperName": "J",
+        "altName": ""
+      },
+      {
+        "code": 47,
+        "lowerName": "k",
+        "letter": "primary",
+        "upperName": "K",
+        "altName": ""
+      },
+      {
+        "code": 48,
+        "lowerName": "x",
+        "letter": "primary",
+        "upperName": "X",
+        "altName": ""
+      },
+      {
+        "code": 49,
+        "lowerName": "b",
+        "letter": "primary",
+        "upperName": "B",
+        "altName": ""
+      },
+      {
+        "code": 50,
+        "lowerName": "m",
+        "letter": "primary",
+        "upperName": "M",
+        "altName": ""
+      },
+      {
+        "code": 51,
+        "lowerName": "w",
+        "letter": "primary",
+        "upperName": "W",
+        "altName": ""
+      },
+      {
+        "code": 52,
+        "lowerName": "v",
+        "letter": "primary",
+        "upperName": "V",
+        "altName": ""
+      },
+      {
+        "code": 53,
+        "lowerName": "z",
+        "letter": "primary",
+        "upperName": "Z",
+        "altName": ""
+      },
+      {
+        "code": 54,
+        "lowerName": "⇧",
+        "upperName": "⇧",
+        "altName": ""
+      }
+    ],
+    "row6": [
+      {
+        "code": 29,
+        "lowerName": "⌃",
+        "upperName": "⌃",
+        "altName": ""
+      },
+      {
+        "code": 125,
+        "lowerName": "❖",
+        "upperName": "❖",
+        "altName": ""
+      },
+      {
+        "code": 56,
+        "lowerName": "⌥",
+        "upperName": "⌥",
+        "altName": ""
+      },
+      {
+        "code": 57,
+        "lowerName": "␣",
+        "upperName": "␣",
+        "altName": ""
+      },
+      {
+        "code": 100,
+        "lowerName": "⌥",
+        "upperName": "⌥",
+        "altName": ""
+      },
+      {
+        "code": 97,
+        "lowerName": "⌃",
+        "upperName": "⌃",
+        "altName": ""
+      },
+      [
+        {
+          "code": 105,
+          "lowerName": "←",
+          "upperName": "←",
+          "altName": ""
+        },
+        {
+          "code": 103,
+          "lowerName": "↑",
+          "upperName": "↑",
+          "altName": ""
+        },
+        {
+          "code": 108,
+          "lowerName": "↓",
+          "upperName": "↓",
+          "altName": ""
+        },
+        {
+          "code": 106,
+          "lowerName": "→",
+          "upperName": "→",
+          "altName": ""
+        }
+      ]
+    ]
+  },
+  "qwertz": {
+    "row1": [
+      {
+        "code": 1,
+        "lowerName": "esc",
+        "upperName": "esc",
+        "altName": ""
+      },
+      {
+        "code": 59,
+        "lowerName": "F1",
+        "upperName": "F1",
+        "altName": ""
+      },
+      {
+        "code": 60,
+        "lowerName": "F2",
+        "upperName": "F2",
+        "altName": ""
+      },
+      {
+        "code": 61,
+        "lowerName": "F3",
+        "upperName": "F3",
+        "altName": ""
+      },
+      {
+        "code": 62,
+        "lowerName": "F4",
+        "upperName": "F4",
+        "altName": ""
+      },
+      {
+        "code": 63,
+        "lowerName": "F5",
+        "upperName": "F5",
+        "altName": ""
+      },
+      {
+        "code": 64,
+        "lowerName": "F6",
+        "upperName": "F6",
+        "altName": ""
+      },
+      {
+        "code": 65,
+        "lowerName": "F7",
+        "upperName": "F7",
+        "altName": ""
+      },
+      {
+        "code": 66,
+        "lowerName": "F8",
+        "upperName": "F8",
+        "altName": ""
+      },
+      {
+        "code": 67,
+        "lowerName": "F9",
+        "upperName": "F9",
+        "altName": ""
+      },
+      {
+        "code": 68,
+        "lowerName": "F10",
+        "upperName": "F10",
+        "altName": ""
+      },
+      {
+        "code": 87,
+        "lowerName": "F11",
+        "upperName": "F11",
+        "altName": ""
+      },
+      {
+        "code": 88,
+        "lowerName": "F12",
+        "upperName": "F12",
+        "altName": ""
+      },
+      {
+        "code": 210,
+        "lowerName": "PrtSc",
+        "upperName": "PrtSc",
+        "altName": ""
+      },
+      {
+        "code": 111,
+        "lowerName": "⌦",
+        "upperName": "⌦",
+        "altName": ""
+      }
+    ],
+    "row2": [
+      {
+        "code": 41,
+        "lowerName": "^",
+        "upperName": "°",
+        "altName": "′"
+      },
+      {
+        "code": 2,
+        "lowerName": "1",
+        "upperName": "!",
+        "altName": "¹"
+      },
+      {
+        "code": 3,
+        "lowerName": "2",
+        "upperName": "\"",
+        "altName": "²"
+      },
+      {
+        "code": 4,
+        "lowerName": "3",
+        "upperName": "§",
+        "altName": "³"
+      },
+      {
+        "code": 5,
+        "lowerName": "4",
+        "upperName": "$",
+        "altName": "¼"
+      },
+      {
+        "code": 6,
+        "lowerName": "5",
+        "upperName": "%",
+        "altName": "½"
+      },
+      {
+        "code": 7,
+        "lowerName": "6",
+        "upperName": "&",
+        "altName": "¬"
+      },
+      {
+        "code": 8,
+        "lowerName": "7",
+        "upperName": "/",
+        "altName": "{"
+      },
+      {
+        "code": 9,
+        "lowerName": "8",
+        "upperName": "(",
+        "altName": "["
+      },
+      {
+        "code": 10,
+        "lowerName": "9",
+        "upperName": ")",
+        "altName": "]"
+      },
+      {
+        "code": 11,
+        "lowerName": "0",
+        "upperName": "=",
+        "altName": "}"
+      },
+      {
+        "code": 12,
+        "lowerName": "ß",
+        "upperName": "?",
+        "altName": "\\"
+      },
+      {
+        "code": 13,
+        "lowerName": "´",
+        "upperName": "`",
+        "altName": "¸"
+      },
+      {
+        "code": 14,
+        "lowerName": "⌫",
+        "upperName": "⌫",
+        "altName": ""
+      }
+    ],
+    "row3": [
+      {
+        "code": 15,
+        "lowerName": "⇥",
+        "upperName": "⇥",
+        "altName": ""
+      },
+      {
+        "code": 16,
+        "lowerName": "q",
+        "letter": "primary",
+        "upperName": "Q",
+        "altName": "@"
+      },
+      {
+        "code": 17,
+        "lowerName": "w",
+        "letter": "primary",
+        "upperName": "W",
+        "altName": "ſ"
+      },
+      {
+        "code": 18,
+        "lowerName": "e",
+        "letter": "primary",
+        "upperName": "E",
+        "altName": "ě"
+      },
+      {
+        "code": 19,
+        "lowerName": "r",
+        "letter": "primary",
+        "upperName": "R",
+        "altName": "ŕ"
+      },
+      {
+        "code": 20,
+        "lowerName": "t",
+        "letter": "primary",
+        "upperName": "T",
+        "altName": "₵"
+      },
+      {
+        "code": 21,
+        "lowerName": "z",
+        "letter": "primary",
+        "upperName": "Z",
+        "altName": "ž"
+      },
+      {
+        "code": 22,
+        "lowerName": "u",
+        "letter": "primary",
+        "upperName": "U",
+        "altName": "ź"
+      },
+      {
+        "code": 23,
+        "lowerName": "i",
+        "letter": "primary",
+        "upperName": "I",
+        "altName": "→"
+      },
+      {
+        "code": 24,
+        "lowerName": "o",
+        "letter": "primary",
+        "upperName": "O",
+        "altName": "ó"
+      },
+      {
+        "code": 25,
+        "lowerName": "p",
+        "letter": "primary",
+        "upperName": "P",
+        "altName": "þ"
+      },
+      {
+        "code": 26,
+        "lowerName": "ü",
+        "letter": "primary",
+        "upperName": "Ü",
+        "altName": "¨"
+      },
+      {
+        "code": 27,
+        "lowerName": "+",
+        "upperName": "*",
+        "altName": "~"
+      },
+      {
+        "code": 43,
+        "lowerName": "#",
+        "upperName": "'",
+        "altName": "’"
+      }
+    ],
+    "row4": [
+      {
+        "code": 58,
+        "lowerName": "⇪",
+        "upperName": "⇪",
+        "altName": ""
+      },
+      {
+        "code": 30,
+        "lowerName": "a",
+        "letter": "primary",
+        "upperName": "A",
+        "altName": "æ"
+      },
+      {
+        "code": 31,
+        "lowerName": "s",
+        "letter": "primary",
+        "upperName": "S",
+        "altName": "ś"
+      },
+      {
+        "code": 32,
+        "lowerName": "d",
+        "letter": "primary",
+        "upperName": "D",
+        "altName": "š"
+      },
+      {
+        "code": 33,
+        "lowerName": "f",
+        "letter": "primary",
+        "upperName": "F",
+        "altName": "đ"
+      },
+      {
+        "code": 34,
+        "lowerName": "g",
+        "letter": "primary",
+        "upperName": "G",
+        "altName": "ŋ"
+      },
+      {
+        "code": 35,
+        "lowerName": "h",
+        "letter": "primary",
+        "upperName": "H",
+        "altName": "ħ"
+      },
+      {
+        "code": 36,
+        "lowerName": "j",
+        "letter": "primary",
+        "upperName": "J",
+        "altName": "."
+      },
+      {
+        "code": 37,
+        "lowerName": "k",
+        "letter": "primary",
+        "upperName": "K",
+        "altName": "ĸ"
+      },
+      {
+        "code": 38,
+        "lowerName": "l",
+        "letter": "primary",
+        "upperName": "L",
+        "altName": "ł"
+      },
+      {
+        "code": 39,
+        "lowerName": "ö",
+        "letter": "primary",
+        "upperName": "Ö",
+        "altName": "˝"
+      },
+      {
+        "code": 40,
+        "lowerName": "ä",
+        "letter": "primary",
+        "upperName": "Ä",
+        "altName": "^"
+      },
+      {
+        "code": 28,
+        "lowerName": "⏎",
+        "upperName": "⏎",
+        "altName": ""
+      }
+    ],
+    "row5": [
+      {
+        "code": 42,
+        "lowerName": "⇧",
+        "upperName": "⇧",
+        "altName": ""
+      },
+      {
+        "code": 86,
+        "lowerName": "<",
+        "upperName": ">",
+        "altName": ""
+      },
+      {
+        "code": 44,
+        "lowerName": "y",
+        "letter": "primary",
+        "upperName": "Y",
+        "altName": "»"
+      },
+      {
+        "code": 45,
+        "lowerName": "x",
+        "letter": "primary",
+        "upperName": "X",
+        "altName": "«"
+      },
+      {
+        "code": 46,
+        "lowerName": "c",
+        "letter": "primary",
+        "upperName": "C",
+        "altName": "ć"
+      },
+      {
+        "code": 47,
+        "lowerName": "v",
+        "letter": "primary",
+        "upperName": "V",
+        "altName": "č"
+      },
+      {
+        "code": 48,
+        "lowerName": "b",
+        "letter": "primary",
+        "upperName": "B",
+        "altName": "“"
+      },
+      {
+        "code": 49,
+        "lowerName": "n",
+        "letter": "primary",
+        "upperName": "N",
+        "altName": "ń"
+      },
+      {
+        "code": 50,
+        "lowerName": "m",
+        "letter": "primary",
+        "upperName": "M",
+        "altName": "µ"
+      },
+      {
+        "code": 51,
+        "lowerName": ",",
+        "upperName": ";",
+        "altName": "·"
+      },
+      {
+        "code": 52,
+        "lowerName": ".",
+        "upperName": ":",
+        "altName": "…"
+      },
+      {
+        "code": 53,
+        "lowerName": "-",
+        "upperName": "_",
+        "altName": "–"
+      },
+      {
+        "code": 54,
+        "lowerName": "⇧",
+        "upperName": "⇧",
+        "altName": ""
+      }
+    ],
+    "row6": [
+      {
+        "code": 29,
+        "lowerName": "⌃",
+        "upperName": "⌃",
+        "altName": ""
+      },
+      {
+        "code": 125,
+        "lowerName": "❖",
+        "upperName": "❖",
+        "altName": ""
+      },
+      {
+        "code": 56,
+        "lowerName": "⌥",
+        "upperName": "⌥",
+        "altName": ""
+      },
+      {
+        "code": 57,
+        "lowerName": "␣",
+        "upperName": "␣",
+        "altName": ""
+      },
+      {
+        "code": 100,
+        "lowerName": "⌥",
+        "upperName": "⌥",
+        "altName": ""
+      },
+      {
+        "code": 97,
+        "lowerName": "⌃",
+        "upperName": "⌃",
+        "altName": ""
+      },
+      [
+        {
+          "code": 105,
+          "lowerName": "←",
+          "upperName": "←",
+          "altName": ""
+        },
+        {
+          "code": 103,
+          "lowerName": "↑",
+          "upperName": "↑",
+          "altName": ""
+        },
+        {
+          "code": 108,
+          "lowerName": "↓",
+          "upperName": "↓",
+          "altName": ""
+        },
+        {
+          "code": 106,
+          "lowerName": "→",
+          "upperName": "→",
+          "altName": ""
+        }
+      ]
+    ]
+  }
+}

+ 13 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/metadata.json

@@ -0,0 +1,13 @@
+{
+  "_generated": "Generated by SweetTooth, do not edit",
+  "description": "A new Onscreen Keyboard built using GNOME JS",
+  "gettext-domain": "gjsosk@vishram1123.com",
+  "name": "GJS OSK",
+  "settings-schema": "org.gnome.shell.extensions.gjsosk",
+  "shell-version": [
+    "45"
+  ],
+  "url": "https://github.com/Vishram1123/gjs-osk",
+  "uuid": "gjsosk@vishram1123.com",
+  "version": 10
+}

+ 325 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/prefs.js

@@ -0,0 +1,325 @@
+'use strict';
+
+import Adw from 'gi://Adw';
+import Gtk from 'gi://Gtk';
+import Gdk from 'gi://Gdk';
+
+import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
+
+
+export default class GjsOskPreferences extends ExtensionPreferences {
+	fillPreferencesWindow(window) {
+		const UIFolderPath = this.dir.get_child('ui').get_path();
+
+		let iconTheme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default());
+		iconTheme.add_search_path(UIFolderPath + `/icons`);
+		const settings = this.getSettings('org.gnome.shell.extensions.gjsosk');
+
+		const page1 = new Adw.PreferencesPage({
+			title: _("General"),
+			icon_name: "general-symbolic"
+		});
+
+		const group0 = new Adw.PreferencesGroup();
+		page1.add(group0)
+
+		const apply = Gtk.Button.new_with_label(_("Apply Changes"));
+		apply.connect("clicked", () => {
+			settings.set_int("lang", langDrop.selected);
+			settings.set_boolean("enable-drag", dragToggle.active);
+			settings.set_int("enable-tap-gesture", dragOpt.selected);
+			settings.set_boolean("indicator-enabled", indEnabled.active);
+			settings.set_int("portrait-width-percent", numChanger_pW.value);
+			settings.set_int("portrait-height-percent", numChanger_pH.value);
+			settings.set_int("landscape-width-percent", numChanger_lW.value);
+			settings.set_int("landscape-height-percent", numChanger_lH.value);
+			let [r, g, b] = colorButton.get_rgba().to_string().replace("rgb(", "").replace(")", "").split(",")
+			settings.set_double("background-r", r);
+			settings.set_double("background-g", g);
+			settings.set_double("background-b", b);
+			settings.set_int("font-size-px", numChanger_font.value);
+			settings.set_int("border-spacing-px", numChanger_bord.value);
+			settings.set_boolean("round-key-corners", dragToggle2.active);
+			settings.set_boolean("play-sound", dragToggle3.active);
+			settings.set_int("default-snap", dropDown.selected);
+		});
+		group0.add(apply)
+
+		const group1 = new Adw.PreferencesGroup({
+			title: _("Behavior")
+		});
+		page1.add(group1);
+
+		const row0 = new Adw.ActionRow({
+			title: _('Language')
+		});
+		group1.add(row0);
+
+		let langList = ["QWERTY", "AZERTY", "Dvorak", "QWERTZ"];
+		let langDrop = Gtk.DropDown.new_from_strings(langList);
+		langDrop.valign = Gtk.Align.CENTER;
+		langDrop.selected = settings.get_int("lang");
+
+		row0.add_suffix(langDrop);
+		row0.activatable_widget = langDrop;
+
+		const row1 = new Adw.ActionRow({
+			title: _('Enable Dragging')
+		});
+		group1.add(row1);
+
+		const dragToggle = new Gtk.Switch({
+			active: settings.get_boolean('enable-drag'),
+			valign: Gtk.Align.CENTER,
+		});
+
+		row1.add_suffix(dragToggle);
+		row1.activatable_widget = dragToggle;
+
+		const row1t3 = new Adw.ActionRow({
+			title: _('Enable Panel Indicator')
+		});
+		group1.add(row1t3);
+
+		const indEnabled = new Gtk.Switch({
+			active: settings.get_boolean("indicator-enabled"),
+			valign: Gtk.Align.CENTER,
+		});
+
+		row1t3.add_suffix(indEnabled);
+		row1t3.activatable_widget = indEnabled;
+
+		const row1t5 = new Adw.ActionRow({
+			title: _('Open upon clicking in a text field')
+		});
+		group1.add(row1t5);
+
+
+		let dragOptList = [_("Never"), _("Only on Touch"), _("Always")];
+		let dragOpt = Gtk.DropDown.new_from_strings(dragOptList);
+		dragOpt.valign = Gtk.Align.CENTER;
+		dragOpt.selected = settings.get_int("enable-tap-gesture");
+
+		row1t5.add_suffix(dragOpt);
+		row1t5.activatable_widget = dragOpt;
+
+		const row2 = new Adw.ExpanderRow({
+			title: _('Portrait Sizing')
+		});
+		group1.add(row2);
+
+		let pW = new Adw.ActionRow({
+			title: _('Width (%)')
+		})
+		let pH = new Adw.ActionRow({
+			title: _('Height (%)')
+		})
+
+		let numChanger_pW = Gtk.SpinButton.new_with_range(0, 100, 5);
+		numChanger_pW.value = settings.get_int('portrait-width-percent');
+		numChanger_pW.valign = Gtk.Align.CENTER;
+		pW.add_suffix(numChanger_pW);
+		pW.activatable_widget = numChanger_pW;
+
+		let numChanger_pH = Gtk.SpinButton.new_with_range(0, 100, 5);
+		numChanger_pH.value = settings.get_int('portrait-height-percent');
+		numChanger_pH.valign = Gtk.Align.CENTER;
+		pH.add_suffix(numChanger_pH);
+		pH.activatable_widget = numChanger_pH;
+
+		row2.add_row(pW);
+		row2.add_row(pH);
+
+		const row3 = new Adw.ExpanderRow({
+			title: _('Landscape Sizing')
+		});
+		group1.add(row3);
+
+		let lW = new Adw.ActionRow({
+			title: _('Width (%)')
+		});
+		let lH = new Adw.ActionRow({
+			title: _('Height (%)')
+		});
+
+		let numChanger_lW = Gtk.SpinButton.new_with_range(0, 100, 5);
+		numChanger_lW.value = settings.get_int('landscape-width-percent');
+		numChanger_lW.valign = Gtk.Align.CENTER;
+		lW.add_suffix(numChanger_lW);
+		lW.activatable_widget = numChanger_lW;
+
+		let numChanger_lH = Gtk.SpinButton.new_with_range(0, 100, 5);
+		numChanger_lH.value = settings.get_int('landscape-height-percent');
+		numChanger_lH.valign = Gtk.Align.CENTER;
+		lH.add_suffix(numChanger_lH);
+		lH.activatable_widget = numChanger_lH;
+
+		row3.add_row(lW);
+		row3.add_row(lH);
+
+		const row4 = new Adw.ActionRow({
+			title: _('Default Position')
+		});
+		group1.add(row4);
+
+		let posList = [
+		    _("Top Left"), _("Top Center"), _("Top Right"),
+		    _("Center Left"), _("Center"), _("Center Right"),
+		    _("Bottom Left"), _("Bottom Center"), _("Bottom Right")
+		];
+		let dropDown = Gtk.DropDown.new_from_strings(posList);
+		dropDown.valign = Gtk.Align.CENTER;
+		dropDown.selected = settings.get_int("default-snap");
+
+		row4.add_suffix(dropDown);
+		row4.activatable_widget = dropDown;
+
+		const group2 = new Adw.PreferencesGroup({
+			title: _("Appearance")
+		});
+		page1.add(group2);
+
+		const row5 = new Adw.ActionRow({
+			title: _('Color')
+		});
+		group2.add(row5);settings.set_boolean("enable-tap-gesture", dragOpt.selected);
+
+		let rgba = new Gdk.RGBA();
+		rgba.parse("rgba(" + settings.get_double("background-r") + ", " + settings.get_double("background-g") + ", " + settings.get_double("background-b") + ", 1)");
+		let colorButton = new Gtk.ColorButton({
+			rgba,
+			use_alpha: false,
+			valign: Gtk.Align.CENTER
+		});
+		row5.add_suffix(colorButton);
+		row5.activatable_widget = colorButton;
+
+		let row6 = new Adw.ActionRow({
+			title: _('Font Size (px)')
+		});
+		group2.add(row6);
+
+		let numChanger_font = Gtk.SpinButton.new_with_range(0, 100, 1);
+		numChanger_font.value = settings.get_int('font-size-px');
+		numChanger_font.valign = Gtk.Align.CENTER;
+		row6.add_suffix(numChanger_font);
+		row6.activatable_widget = numChanger_font;
+
+		let row7 = new Adw.ActionRow({
+			title: _('Border Spacing (px)')
+		});
+		group2.add(row7);
+
+		let numChanger_bord = Gtk.SpinButton.new_with_range(0, 10, 1);
+		numChanger_bord.value = settings.get_int('border-spacing-px');
+		numChanger_bord.valign = Gtk.Align.CENTER;
+		row7.add_suffix(numChanger_bord);
+		row7.activatable_widget = numChanger_bord;
+
+		const row8 = new Adw.ActionRow({
+			title: _('Round Corners')
+		});
+		group2.add(row8);
+
+		const dragToggle2 = new Gtk.Switch({
+			active: settings.get_boolean('round-key-corners'),
+			valign: Gtk.Align.CENTER,
+		});
+
+		row8.add_suffix(dragToggle2);
+		row8.activatable_widget = dragToggle2;
+		
+		const row9 = new Adw.ActionRow({
+			title: _('Play sound')
+		});
+		group2.add(row9);
+
+		const dragToggle3 = new Gtk.Switch({
+			active: settings.get_boolean('play-sound'),
+			valign: Gtk.Align.CENTER,
+		});
+
+		row9.add_suffix(dragToggle3);
+		row9.activatable_widget = dragToggle3;
+
+		window.add(page1);
+
+		let page2 = new Adw.PreferencesPage({
+			title: _("About"),
+			icon_name: 'info-symbolic',
+		});
+
+		let contribute_icon_pref_group = new Adw.PreferencesGroup();
+		let icon_box = new Gtk.Box({
+			orientation: Gtk.Orientation.VERTICAL,
+			margin_top: 24,
+			margin_bottom: 24,
+			spacing: 18,
+		});
+
+		let icon_image = new Gtk.Image({
+			icon_name: "input-keyboard-symbolic",
+			pixel_size: 128,
+		});
+
+		let label_box = new Gtk.Box({
+			orientation: Gtk.Orientation.VERTICAL,
+			spacing: 6,
+		});
+
+		let label = new Gtk.Label({
+			label: "GJS OSK",
+			wrap: true,
+		});
+		let context = label.get_style_context();
+		context.add_class("title-1");
+
+		let another_label = new Gtk.Label({
+			label: _("Version ") + this.metadata.version
+		});
+
+		let links_pref_group = new Adw.PreferencesGroup();
+		let code_row = new Adw.ActionRow({
+			icon_name: "code-symbolic",
+			title: _("More Information, submit feedback, and get help")
+		});
+		let github_link = new Gtk.LinkButton({
+			label: "Github",
+			uri: "https://github.com/Vishram1123/gjs-osk",
+		});
+
+		code_row.add_suffix(github_link);
+		code_row.set_activatable_widget(github_link);
+		links_pref_group.add(code_row);
+
+		label_box.append(label);
+		label_box.append(another_label);
+		icon_box.append(icon_image);
+		icon_box.append(label_box);
+		contribute_icon_pref_group.add(icon_box);
+
+		page2.add(contribute_icon_pref_group);
+		page2.add(links_pref_group);
+
+		window.add(page2);
+		window.connect("close-request", () => {
+			settings.set_int("lang", langDrop.selected);
+			settings.set_boolean("enable-drag", dragToggle.active);
+			settings.set_int("enable-tap-gesture", dragOpt.selected);
+			settings.set_boolean("indicator-enabled", indEnabled.active);
+			settings.set_int("portrait-width-percent", numChanger_pW.value);
+			settings.set_int("portrait-height-percent", numChanger_pH.value);
+			settings.set_int("landscape-width-percent", numChanger_lW.value);
+			settings.set_int("landscape-height-percent", numChanger_lH.value);
+			let [r, g, b] = colorButton.get_rgba().to_string().replace("rgb(", "").replace(")", "").split(",")
+			settings.set_double("background-r", r);
+			settings.set_double("background-g", g);
+			settings.set_double("background-b", b);
+			settings.set_int("font-size-px", numChanger_font.value);
+			settings.set_int("border-spacing-px", numChanger_bord.value);
+			settings.set_boolean("round-key-corners", dragToggle2.active);
+			settings.set_boolean("play-sound", dragToggle3.active);
+			settings.set_int("default-snap", dropDown.selected);
+		});
+	}
+};

BIN
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/schemas/gschemas.compiled


+ 60 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/schemas/org.gnome.shell.extensions.gjsosk.gschema.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+  <schema id="org.gnome.shell.extensions.gjsosk" path="/org/gnome/shell/extensions/gjsosk/">
+    <key name="portrait-width-percent" type="i">
+      <default>100</default>
+    </key>
+    <key name="portrait-height-percent" type="i">
+      <default>20</default>
+    </key>
+    <key name="landscape-width-percent" type="i">
+      <default>70</default>
+    </key>
+    <key name="landscape-height-percent" type="i">
+      <default>30</default>
+    </key>
+    <key name="enable-drag" type="b">
+      <default>true</default>
+    </key>
+    <key name="background-r" type="d">
+      <default>50</default>
+    </key>
+    <key name="background-g" type="d">
+      <default>50</default>
+    </key>
+    <key name="background-b" type="d">
+      <default>50</default>
+    </key>
+    <key name="font-size-px" type="i">
+      <default>14</default>
+    </key>
+    <key name="border-spacing-px" type="i">
+      <default>2</default>
+    </key>
+    <key name="round-key-corners" type="b">
+      <default>false</default>
+    </key>
+    <key name="default-snap" type="i">
+      <default>7</default>
+    </key>
+	<key name="lang" type="i">
+      <default>0</default>
+    </key>
+    <key name="enable-tap-gesture" type="i">
+		<default>1</default>
+    </key>
+    <key name="indicator-enabled" type="b">
+      <default>true</default>
+    </key>   
+    <key name="play-sound" type="b">
+		<default>true</default>
+    </key>
+    <child name="indicator" schema="org.gnome.shell.extensions.gjsosk.indicator"/>
+	
+  </schema>
+  <schema id="org.gnome.shell.extensions.gjsosk.indicator" path="/org/gnome/shell/extensions/gjsosk/indicator/">
+  <key name="opened" type="b">
+		<default>false</default>
+	</key>
+	</schema>
+</schemalist>

+ 76 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/stylesheet.css

@@ -0,0 +1,76 @@
+.regular:active {
+     background-color: rgba(255, 255, 255, 0.2);
+     color: white;
+}
+ .inverted:active {
+     background-color: rgba(0, 0, 0, 0.2);
+     color: black;
+}
+ .regular {
+     background-color: rgba(255, 255, 255, 0.05);
+     color: white;
+}
+ .inverted {
+     background-color: rgba(0, 0, 0, 0.05);
+     color: black;
+}
+ .keysHolder>* {
+     border: 0;
+     background-clip: padding-box;
+     box-sizing: border-box;
+}
+ .dr-b {
+     border: 0;
+     background-clip: padding-box;
+     margin: inherit;
+     box-sizing: border-box;
+}
+ .boxLay.regular:dragging {
+     background-image: url(ui/icons/hicolor/scalable/actions/move.svg);
+     background-size: 100px;
+}
+.boxLay.inverted:dragging {
+     background-image: url(ui/icons/hicolor/scalable/actions/move-dark.svg);
+     background-size: 100px;
+}
+.close_btn, .move_btn {
+     background-repeat: no-repeat;
+     background-position: center;
+}
+.close_btn.regular {
+	 background-image: url(ui/icons/hicolor/scalable/actions/close.svg);
+}
+.close_btn.inverted {
+	 background-image: url(ui/icons/hicolor/scalable/actions/close-dark.svg);
+}
+.move_btn.regular {
+	 background-image: url(ui/icons/hicolor/scalable/actions/move.svg);
+}
+.move_btn.inverted {
+	 background-image: url(ui/icons/hicolor/scalable/actions/move-dark.svg);
+}
+ .keyActionBtns {
+     background-color: rgba(255, 255, 255, 0.00);
+     border: 0;
+     border-radius: 0px;
+     background-clip: padding-box;
+     margin: 0px !important;
+     box-sizing: border-box;
+}
+ .selected.regular {
+     background-color: rgba(255, 255, 255, 0.7);
+     color: black;
+}
+ .selected.inverted {
+     background-color: rgba(0, 0, 0, 0.7);
+     color: white;
+}
+ .db-keyboard-content {
+     background-color: rgba(0, 0, 0, 0);
+     border: 0;
+}
+ .boxLay {
+     padding: 20px;
+     border-radius: 10px;
+}
+ 

+ 45 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/close-dark.svg

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   viewBox="0 0 24 24"
+   width="240"
+   height="240"
+   version="1.1"
+   id="svg6"
+   sodipodi:docname="close.svg"
+   inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <defs
+     id="defs10" />
+  <sodipodi:namedview
+     id="namedview8"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     showgrid="false"
+     inkscape:zoom="3.5291667"
+     inkscape:cx="61.912632"
+     inkscape:cy="120"
+     inkscape:window-width="1550"
+     inkscape:window-height="1056"
+     inkscape:window-x="10"
+     inkscape:window-y="7"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg6"
+     inkscape:snap-global="false" />
+  <path
+     fill="none"
+     d="M0 0h24v24H0z"
+     id="path2" />
+  <path
+     d="m 20.909545,18.363961 v 0 l -2.545584,2.545584 v 0 0 L 12,14.545584 5.6360389,20.909545 v 0 L 3.0904546,18.363961 v 0 0 L 9.4544157,12 3.0904546,5.6360389 v 0 L 5.6360389,3.0904546 v 0 0 L 12,9.4544157 18.363961,3.0904546 v 0 0 l 2.545584,2.5455843 v 0 L 14.545584,12 Z"
+     fill="rgba(255,255,255,1)"
+     id="path4"
+     style="fill:#000400;fill-opacity:1;stroke-width:1.79999"
+     sodipodi:nodetypes="ccccccccccccccccccccccccc" />
+</svg>

+ 45 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/close.svg

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   viewBox="0 0 24 24"
+   width="240"
+   height="240"
+   version="1.1"
+   id="svg6"
+   sodipodi:docname="close.svg"
+   inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <defs
+     id="defs10" />
+  <sodipodi:namedview
+     id="namedview8"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     showgrid="false"
+     inkscape:zoom="3.5291667"
+     inkscape:cx="61.770956"
+     inkscape:cy="120"
+     inkscape:window-width="1550"
+     inkscape:window-height="1034"
+     inkscape:window-x="10"
+     inkscape:window-y="7"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg6"
+     inkscape:snap-global="false" />
+  <path
+     fill="none"
+     d="M0 0h24v24H0z"
+     id="path2" />
+  <path
+     d="m 20.909545,18.363961 v 0 l -2.545584,2.545584 v 0 0 L 12,14.545584 5.6360389,20.909545 v 0 L 3.0904546,18.363961 v 0 0 L 9.4544157,12 3.0904546,5.6360389 v 0 L 5.6360389,3.0904546 v 0 0 L 12,9.4544157 18.363961,3.0904546 v 0 0 l 2.545584,2.5455843 v 0 L 14.545584,12 Z"
+     fill="rgba(255,255,255,1)"
+     id="path4"
+     style="fill:#ffffff;fill-opacity:1;stroke-width:1.79999"
+     sodipodi:nodetypes="ccccccccccccccccccccccccc" />
+</svg>

+ 10 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/code-symbolic.svg

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
+SPDX-License-Identifier: CC-BY-SA-4.0
+-->
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+ <path d="m3.7578 2.0293a1 1 0 0 0-0.61523 0.45703l-3 5a1.0001 1.0001 0 0 0 0 1.0273l3 5a1 1 0 0 0 1.3711 0.34375 1 1 0 0 0 0.34375-1.3711l-2.6914-4.4863 2.6914-4.4863a1 1 0 0 0-0.34375-1.3711 1 1 0 0 0-0.75586-0.11328z"/>
+ <path d="m12.242 2.0293a1 1 0 0 0-0.75586 0.11328 1 1 0 0 0-0.34375 1.3711l2.6914 4.4863-2.6914 4.4863a1 1 0 0 0 0.34375 1.3711 1 1 0 0 0 1.3711-0.34375l3-5a1.0001 1.0001 0 0 0 0-1.0273l-3-5a1 1 0 0 0-0.61523-0.45703z"/>
+ <path d="m9.1953 2.0195a1 1 0 0 0-1.1758 0.78516l-2 10a1 1 0 0 0 0.78516 1.1758 1 1 0 0 0 1.1758-0.78516l2-10a1 1 0 0 0-0.78516-1.1758z"/>
+</svg>

+ 64 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/general-symbolic.svg

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   width="16"
+   height="16"
+   enable-background="new"
+   version="1.1"
+   id="svg16"
+   sodipodi:docname="general-symbolic.svg"
+   inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <defs
+     id="defs20" />
+  <sodipodi:namedview
+     id="namedview18"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     showgrid="false"
+     inkscape:zoom="24.174578"
+     inkscape:cx="13.98163"
+     inkscape:cy="8.3765683"
+     inkscape:window-width="1500"
+     inkscape:window-height="963"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="g14" />
+  <g
+     fill="#363636"
+     id="g14"
+     transform="rotate(90,7.75,8.25)">
+    <path
+       d="m 2.9500144,1 c -0.277,0 -0.5,0.223 -0.5,0.5 v 6.5547 a 2.5,2.5 0 0 1 0.5,-0.054688 2.5,2.5 0 0 1 0.5,0.050781 v -6.5508 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 z m 0.5,11.945 a 2.5,2.5 0 0 1 -0.5,0.05469 2.5,2.5 0 0 1 -0.5,-0.05078 v 1.5508 c 0,0.277 0.223,0.5 0.5,0.5 0.277,0 0.5,-0.223 0.5,-0.5 v -1.5547 z"
+       id="path2" />
+    <path
+       d="M 7.5,1 C 7.223,1 7,1.223 7,1.5 V 3.0547 A 2.5,2.5 0 0 1 7.5,3.000012 2.5,2.5 0 0 1 8,3.050793 v -1.5508 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 z M 8,7.9453 A 2.5,2.5 0 0 1 7.5,7.999988 2.5,2.5 0 0 1 7,7.949207 v 6.5508 c 0,0.277 0.223,0.5 0.5,0.5 0.277,0 0.5,-0.223 0.5,-0.5 v -6.5547 z"
+       id="path4" />
+    <path
+       d="m 12.049986,1.0001482 c -0.277,0 -0.5,0.223 -0.5,0.5 v 6.5547 a 2.5,2.5 0 0 1 0.5,-0.054688 2.5,2.5 0 0 1 0.5,0.050781 v -6.5508 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 z m 0.5,11.9450008 a 2.5,2.5 0 0 1 -0.5,0.05469 2.5,2.5 0 0 1 -0.5,-0.05078 v 1.5508 c 0,0.276999 0.223,0.5 0.5,0.5 0.277,0 0.5,-0.223001 0.5,-0.5 v -1.5547 z"
+       id="path6" />
+    <circle
+       cx="2.9500144"
+       cy="10.5"
+       id="circle8"
+       r="1.5" />
+    <circle
+       cx="7.5"
+       cy="5.5"
+       r="1.5"
+       id="circle10" />
+    <circle
+       cx="12.049986"
+       cy="10.500149"
+       id="circle12"
+       r="1.5" />
+  </g>
+</svg>

+ 1 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/info-symbolic.svg

@@ -0,0 +1 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.906 1A7.002 7.002 0 0 0 1 8c0 3.867 3.133 7 7 7s7-3.133 7-7-3.133-7-7-7h-.094zM7.5 4h1c.277 0 .5.223.5.5v1c0 .277-.223.5-.5.5h-1a.498.498 0 0 1-.5-.5v-1c0-.277.223-.5.5-.5zM7 7h2v5H7zm0 0" fill="#2e3436"/></svg>

+ 43 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/move-dark.svg

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   viewBox="0 0 24 24"
+   width="240"
+   height="240"
+   version="1.1"
+   id="svg6"
+   sodipodi:docname="move-dark.svg"
+   inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <defs
+     id="defs10" />
+  <sodipodi:namedview
+     id="namedview8"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     showgrid="false"
+     inkscape:zoom="3.5291667"
+     inkscape:cx="63.612751"
+     inkscape:cy="120"
+     inkscape:window-width="1550"
+     inkscape:window-height="1056"
+     inkscape:window-x="0"
+     inkscape:window-y="1"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg6" />
+  <path
+     fill="none"
+     d="M0 0h24v24H0z"
+     id="path2" />
+  <path
+     d="M18 11V8l4 4-4 4v-3h-5v5h3l-4 4-4-4h3v-5H6v3l-4-4 4-4v3h5V6H8l4-4 4 4h-3v5z"
+     fill="rgba(255,255,255,1)"
+     id="path4"
+     style="fill:#000400;fill-opacity:1" />
+</svg>

+ 1 - 0
gnome/.local/share/gnome-shell/extensions/gjsosk@vishram1123.com/ui/icons/hicolor/scalable/actions/move.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="240" height="240"><path fill="none" d="M0 0h24v24H0z"/><path d="M18 11V8l4 4-4 4v-3h-5v5h3l-4 4-4-4h3v-5H6v3l-4-4 4-4v3h5V6H8l4-4 4 4h-3v5z" fill="rgba(255,255,255,1)"/></svg>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor