Skip to content

Commit

Permalink
update repo after renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthSidious007 committed Nov 26, 2024
1 parent 419e5a8 commit d361592
Show file tree
Hide file tree
Showing 15 changed files with 64 additions and 32 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y make zip jq
- name: Build extension
run: make
- name: Locate built ZIP file
id: find_zip
run: |
ZIP_FILE=$(ls *.zip | head -n 1)
if [ -z "$ZIP_FILE" ]; then
echo "No ZIP file found!"
exit 1
fi
echo "ZIP_FILE=$ZIP_FILE" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -40,6 +31,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.ZIP_FILE }}
asset_name: ${{ env.ZIP_FILE }}
asset_path: [email protected]
asset_name: [email protected]
asset_content_type: application/zip
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ all: $(ZIP_NAME)
$(ZIP_NAME):
rm -f schemas/gschemas.compiled
glib-compile-schemas ./schemas
zip -r $(ZIP_NAME) metadata.json icons/ schemas/ prefs.js extension.js
zip -r $(ZIP_NAME) metadata.json icons/ schemas/ prefs.js extension.js README.md LICENSE

install:
install: $(ZIP_NAME)
gnome-extensions install -f $(ZIP_NAME)

clean:
Expand Down
60 changes: 50 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
![License](https://img.shields.io/github/license/amnezia-vpn/toggle-awg-gnome-shell)
![License](https://img.shields.io/github/license/amnezia-vpn/amneziawg-gnome-extension?labelColor=303030&color=2dba4e)
[![GitHub release (latest)](https://img.shields.io/github/v/release/amnezia-vpn/amneziawg-gnome-extension?display_name=release&labelColor=303030&color=2dba4e)](https://github.com/amnezia-vpn/amneziawg-gnome-extension/releases/latest)
[![Download extension](https://img.shields.io/badge/Download-extensions.gnome.org-4a86cf?logo=gnome&logoColor=lightgrey&labelColor=303030)](https://extensions.gnome.org/extension/7586/amneziawg-toggle-button/)
[<img src="https://github.com/amnezia-vpn/amneziawg-gnome-extension/raw/master/images/get_it_on_gnome_extensions.png" height="100" align="right">](https://extensions.gnome.org/extension/7586/amneziawg-toggle-button/)
# AmneziaWG Gnome Shell Extension

# Toggle AWG Extension
<div align="center">
<a href="https://docs.amnezia.org/documentation/amnezia-wg/">
<img src="https://github.com/amnezia-vpn/amneziawg-gnome-extension/raw/master/icons/active-light.png" height="100">
</a>
</div>

A GNOME Shell extension that allows you to toggle the **AWG Quick Service** conveniently from the system status bar. The extension supports custom icons for light and dark themes, which can be manually configured through the preferences.
A GNOME Shell extension that allows you to toggle the **AmneziaWG** (via [email protected]) conveniently from the system status bar. The extension supports custom icons for light and dark themes, which can be manually configured through the preferences.

> [!IMPORTANT]
> Extension requires [AmneziaWG Kernel Module](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module) and [AmneziaWG Tools](https://github.com/amnezia-vpn/amneziawg-tools) to be installed
## Features

Expand All @@ -12,6 +23,16 @@ A GNOME Shell extension that allows you to toggle the **AWG Quick Service** conv
- Manual theme selection for icons (dark or light).
- Adjustable icon size.

## Screenshots

### Panel buton

![Screenshot](images/screenshot-panel.png)

### Settings window

![Screenshot](images/screenshot-prefs.png)

## Gnome Versions Support

- 43 - `master` branch, `v1` tag
Expand All @@ -21,31 +42,31 @@ A GNOME Shell extension that allows you to toggle the **AWG Quick Service** conv
### Get extension from GIT:

```bash
git clone https://github.com/amnezia-vpn/toggle-awg-gnome-shell.git ~/.local/share/gnome-shell/extensions/toggle-awg@amnezia-vpn
git clone https://github.com/amnezia-vpn/amneziawg-gnome-extension.git ~/.local/share/gnome-shell/extensions/amneziawg@amnezia-vpn
```
> add `--branch v<version tag>` if you need exact version
### Get extension from ZIP:
```bash
wget https://github.com/amnezia-vpn/toggle-awg-gnome-shell/releases/download/latest/toggle-awg@amnezia-vpn.shell-extension.zip
gnome-extensions install toggle-awg@amnezia-vpn.shell-extension.zip --force
wget https://github.com/amnezia-vpn/amneziawg-gnome-extension/releases/download/v1/amneziawg@amnezia-vpn.shell-extension.zip
gnome-extensions install amneziawg@amnezia-vpn.shell-extension.zip --force
```

> Replace `latest` in url with `v<version tag>` if you need exact version
> Replace `v1` in url with `v<version tag>` if you need exact version
### Apply extension

1. Restart GNOME Shell
- *For X11*: press `Alt + F2`, type `r`, and hit `Enter`.
- *For Wayland*: logout and login again

2. Enable the extension using GNOME Extensions app or with `gnome-extensions enable toggle-awg@amnezia-vpn` command
2. Enable the extension using GNOME Extensions app or with `gnome-extensions enable amneziawg@amnezia-vpn` command

## Configuration

Open the extension preferences through the GNOME Extensions app to configure the following:

- *Interface Name*: Specify the system interface name (default is awg1).
- *Interface Name*: Specify the system interface name (default is awg0).
- *Icon Size*: Adjust the size of the icons displayed in the system panel.
- *Icon Theme*: Choose between dark or light theme icons.

Expand All @@ -60,7 +81,26 @@ Ensure that the awg-quick service is properly configured on your system.

## AmneziaWG client setup

TODO
### Install AmneziaWG

You can use [this instructions](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/blob/master/README.md#installation) to install **AmneziaWG**

### Install configuration file

- Configuration Directory: `/etc/amnezia/amneziawg/`
- Configuration File Name Format: `*.conf`
- Configuration File Permissions: Any 'root' readable

> [!TIP]
> While the configuration file can have any name, it is recommended to name it `awg0.conf`, as this name is used by default by the application. However, you can choose any name and update the configuration in the extension settings accordingly.
### Sudoers

The command triggered by the extension button requires `sudo` permissions. To avoid entering your password each time you toggle the button, add a sudoers file with the following content:

```
io ALL=(ALL:ALL) NOPASSWD: /usr/bin/systemctl
```

## License

Expand Down
2 changes: 1 addition & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Extension {

enable() {
this._button = null;
this._settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.toggle-awg');
this._settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.amneziawg');
this._initializeDefaults();
const toggleAWG = new ToggleAWG(this._settings);
this._button = new ToggleAWGButton(toggleAWG, this._settings);
Expand Down
Binary file modified icons/active-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/active-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/inactive-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/inactive-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/get_it_on_gnome_extensions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshot-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshot-prefs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"uuid": "toggle-awg@amnezia-vpn",
"uuid": "amneziawg@amnezia-vpn",
"name": "AmneziaWG Toggle Button",
"description": "A button to toggle AmneziaWG service on/off",
"shell-version": ["43"],
"url": "https://github.com/amnezia-vpn/toggle-awg-gnome-shell",
"settings-schema": "org.gnome.shell.extensions.toggle-awg",
"version": 1
"url": "https://github.com/amnezia-vpn/amneziawg-gnome-extension",
"settings-schema": "org.gnome.shell.extensions.amneziawg",
"version": 2
}
3 changes: 2 additions & 1 deletion prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const ExtensionUtils = imports.misc.extensionUtils;
let settings;

function init() {
settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.toggle-awg');
settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.amneziawg');
}

/**
Expand Down Expand Up @@ -147,6 +147,7 @@ function buildPrefsWidget() {
});

saveButton.connect('clicked', () => {
settings.set_string('interface', interfaceEntry.text);
settings.sync(); // Ensure settings are saved immediately
});

Expand Down
Binary file modified schemas/gschemas.compiled
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="gnome-shell-extensions">
<schema
id="org.gnome.shell.extensions.toggle-awg"
path="/org/gnome/shell/extensions/toggle-awg/">
id="org.gnome.shell.extensions.amneziawg"
path="/org/gnome/shell/extensions/amneziawg/">

<key name="interface" type="s">
<default>"awg1"</default>
<default>"awg0"</default>
<summary>"Interface"</summary>
</key>
<key name="icon-size" type="i">
Expand Down

0 comments on commit d361592

Please sign in to comment.