Even an everyday user may wish to install the latest version from GitHub. It's easy:
- Clone the repository to a folder of your choice.
git clone https://github.com/GnomeSnapExtensions/gSnap.git
-
Install dependencies.
You will need to install NodeJS on your system to run the build tool. After installing Node, install the build dependencies:
npm ci
-
Build and install Then, you can run the installation script to install to
$HOME/.local/share/gnome-shell/extensions/gSnap@micahosborne
.npm run install-extension
-
Log out and log back in. (If you don't want to log out, you can restart gnome shell, which keeps all your windows open. Type
Alt
+F2
, then typer
and hit enter.)
The build process involves two steps:
- The Typescript compiler transpiles .ts files into .js files
- Rollup bundles the compiled js files into "extension.js" and "prefs.js", which are the main required files for a Gnome Shell extension.
Both can be configured by editing tsconfig.json and rollup.config.js
Generally,
- Code
- Run
npm run gen-schemas
(if you modified the schema) - Run the
npm run install-extension
command to build and install the extension. - If 2 succeeded, hit
Alt
+F2
, typer
, and hit enter.
Every dependency is handled by npm. To add a new "dev" dependency:
npm add -D "<dependency>"
journalctl /usr/bin/gnome-shell -f -o cat
To obtain the ZIP archive for review, simply run;
npm run pack