Trsnaqe / gamemode-shell-extension

Gnome shell extension that displays the status of GameMode, the number of active clients, and a list of these clients.
6 stars 0 forks source link

GameMode GNOME Shell Extension

Extension Page

Overview

This GNOME Shell extension provides a convenient indicator for Feral's GameMode. The extension displays the status of GameMode, the number of active clients, and a list of these clients.

Features

Screenshots

Extension Enabled

Figure 1: GameMode is enabled and showing active clients.

Extension Disabled

Figure 2: GameMode is disabled.

Extension Enabled Notification

Figure 3: GameMode enabled notification.

Extension Settings Menu

Figure 4: GameMode Settings Menu.

Installation

Through Gnome Extension Store

Extension Page

Install Feral GameMode:

If GameMode is not installed you will not be able to use the extension, to install GameMode please refer to: Feral GameMode Docs

  1. Clone the Repository:

    git clone https://github.com/trsnaqe/gamemode-shell-extension
    cd gamemodeshellextension
  2. Automatically Install Extension:

    ./makezip.sh install

    Manual Installation

  3. Clone the Repository:

    git clone https://github.com/trsnaqe/gamemode-shell-extension.git
    cd gamemode-shell-extension
  4. Build and Package the Extension:

    ./makezip.sh build
  5. Move and Extract Zip into Extensions:

    unzip gamemodeshellextension.zip -d ~/.local/share/gnome-shell/extensions/gamemodeshellextension@trsnaqe.com/
    
    1. Install and Compile the Schema: in settings folder run:

      sudo install -Dm644 settings/org.gnome.shell.extensions.gamemodeshellextension.gschema.xml /usr/share/glib-2.0/schemas/org.gnome.shell.extensions.gamemodeshellextension.gschema.xml
      sudo glib-compile-schemas /usr/share/glib-2.0/schemas
    2. Enable Extension:

      gnome-extensions enable gamemodeshellextension@trsnaqe.com
  6. Restart the Shell:

    • If you are using x11, alt+f2 then type
      r
    • If you are using wayland, restart the session Note: If makezip.sh does not work, you may need to give it executable permissions:
chmod +x ./makezip.sh

Makezip script

The makezip.sh script simplifies the build and installation process of the extension. It includes the following commands:

Usage

Once installed, the extension will appear in the GNOME Shell top panel.

Configuration

The extension includes settings to control notification preferences:

  1. GameMode Enabled Notification: Shows a notification when GameMode is turned on.
  2. GameMode Disabled Notification: Shows a notification when GameMode is turned off.

These settings can be accessed from the extension's menu.

Development

This extension was developed as a weekend project to learn more about DBus integration and GNOME Shell extension development.

Code Structure

Dependencies

Contributing

Contributions are welcome! If you have suggestions or improvements, feel free to open an issue or submit a pull request.

License

This project is licensed under the LGPL-2.1 License.

Acknowledgements

Special thanks to Feral Interactive for developing GameMode and the GNOME community for their excellent documentation and support.

Contact

For any questions or suggestions, please open an issue on the GitHub repository.