This is a simple GNOME extension I wrote for fun, as an exercise.
CTRL+ALT+1
snaps the current focused window to the first third of the screen.CTRL+ALT+2
snaps the current focused window to the second third of the screen.CTRL+ALT+3
snaps the current focused window to the third third of the screen.
I later discovered an already existing extension which serves the same purpose, but is much more advanced: https://github.com/sunwxg/gnome-shell-extension-arrangeWindows
Useful links:
-
GJS guide: https://gjs.guide/extensions/
-
GJS API reference: https://gjs-docs.gnome.org/
-
GJS repository: https://gitlab.gnome.org/GNOME/gjs/
-
Some examples from which to take inspiration from: https://gitlab.gnome.org/GNOME/gnome-shell/-/tree/main/js/ui
-
Other examples: https://gitlab.com/justperfection.channel/how-to-create-a-gnome-shell-extension