### Example Full JSON File with Two Tiles Source: https://github.com/domferr/tilingshell/blob/main/doc/json-internal-documentation.md This example demonstrates a complete JSON file defining one Layout with two tiles, illustrating a common split-screen configuration. ```json { "id": "Equal split", "tiles": [ { "x": 0, "y": 0, "width": 0.5, "height": 1, "groups": [ 1 ] }, { "x": 0.5, "y": 0, "width": 0.5, "height": 1, "groups": [ 1 ] } ] } ``` -------------------------------- ### Example Layout Object JSON Structure Source: https://github.com/domferr/tilingshell/blob/main/doc/json-internal-documentation.md This is an example of the JSON structure for a single Layout object, which includes an identifier and a list of tiles. ```json { "id": "The identifier", "tiles": [ ... ] } ``` -------------------------------- ### Enable Tiling Shell Extension Source: https://github.com/domferr/tilingshell/blob/main/README.md Enables the Tiling Shell extension via the command line. This command is useful after manual installation or to ensure the extension is active. ```bash /usr/bin/gnome-extensions enable tilingshell@ferrarodomenico.com ``` -------------------------------- ### Example Tile Object JSON Structure Source: https://github.com/domferr/tilingshell/blob/main/doc/json-internal-documentation.md This JSON structure represents a single Tile object, defining its position, dimensions, and group affiliations. ```json { "x": 0, "y": 0, "width": 1, "height": 1, "groups": [ 1 ] } ``` -------------------------------- ### Follow GJS Logs for Preferences Source: https://github.com/domferr/tilingshell/blob/main/README.md Follows the logs of the GJS process, specifically for preferences. This is useful for debugging issues with the extension's preference window. ```bash journalctl -f -o cat /usr/bin/gjs ``` -------------------------------- ### Follow GNOME Shell Logs Source: https://github.com/domferr/tilingshell/blob/main/README.md Follows the logs of the GNOME Shell process in real-time. This is useful for debugging issues related to the shell or extensions. ```bash journalctl --follow /usr/bin/gnome-shell ``` -------------------------------- ### Listen to keybinding signal Source: https://github.com/domferr/tilingshell/blob/main/README.md In `extension.ts`, connect to the keybinding signal to execute custom logic when the keybinding is used. This allows for custom actions to be performed. ```typescript this._signals.connect( this._keybindings, 'highlight-current-window', (kb: KeyBindings, dp: Meta.Display) => { // handle the keybinding and perform the actions you want // to happen when the keybinding is used by the user ... }, ); ``` -------------------------------- ### Define new key in GSchema Source: https://github.com/domferr/tilingshell/blob/main/README.md Add a new key definition to the GSchema file. This defines the setting's name, type, default value, and a summary. ```xml Minimize all the other windows and show only the focused window ``` -------------------------------- ### Add keybinding to preferences UI Source: https://github.com/domferr/tilingshell/blob/main/README.md In `prefs.ts`, add a new entry to the `keybindings` array to allow users to configure the new keybinding through the extension's preferences UI. This includes its name, title, description, and visibility settings. ```typescript [ Settings.SETTING_HIGHLIGHT_CURRENT_WINDOW, _('Highlight focused window'), _('Minimize all the other windows and show only the focused window'), false, false, ], ``` -------------------------------- ### Disable Tiling Shell Extension Source: https://github.com/domferr/tilingshell/blob/main/README.md Disables the Tiling Shell extension via the command line. This is a necessary step before uninstalling the extension. ```bash /usr/bin/gnome-extensions disable tilingshell@ferrarodomenico.com ``` -------------------------------- ### Emit signal on keybinding activation Source: https://github.com/domferr/tilingshell/blob/main/README.md In `keybindings.ts`, add code to emit the newly declared signal when the associated keybinding is activated. Pass any necessary parameters, such as the display object. ```typescript Main.wm.addKeybinding( Settings.SETTING_HIGHLIGHT_CURRENT_WINDOW, extensionSettings, Meta.KeyBindingFlags.NONE, Shell.ActionMode.NORMAL, (display: Meta.Display) => { this.emit('highlight-current-window', display); }, ); ``` -------------------------------- ### Add static constant for setting key Source: https://github.com/domferr/tilingshell/blob/main/README.md Define a static constant in `settings.ts` that corresponds to the GSchema key name. This constant will be used throughout the extension to reference the setting. ```typescript static SETTING_HIGHLIGHT_CURRENT_WINDOW = 'highlight-current-window'; ``` -------------------------------- ### Declare new signal for keybinding Source: https://github.com/domferr/tilingshell/blob/main/README.md In `keybindings.ts`, declare a new signal that will be emitted when the keybinding is triggered. Specify the parameter types if the signal carries data. ```typescript 'highlight-current-window': { param_types: [Meta.Display.$gtype], }, ``` -------------------------------- ### Fix private key ownership for Vagrant SSH Source: https://github.com/domferr/tilingshell/blob/main/README.md Ensures the SSH private key used by Vagrant is owned by the user running Vagrant, a strict requirement for SSH. This involves moving the key and creating a symbolic link if necessary. ```bash mv /path/to/box/virtualbox/private_key $HOME/.ssh/vagrant_key ln -sr $HOME/.ssh/vagrant_key /path/to/box/virtualbox/private_key ``` -------------------------------- ### Remove keybinding on extension disable Source: https://github.com/domferr/tilingshell/blob/main/README.md In `keybindings.ts`, ensure the keybinding is removed when the extension is disabled to prevent errors and resource leaks. This is done using `removeKeybinding`. ```typescript Main.wm.removeKeybinding(Settings.SETTING_HIGHLIGHT_CURRENT_WINDOW); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.