66
README.md
Normal file
66
README.md
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# NextDNS Linux Trayicon
|
||||||
|
|
||||||
|
This small Python script and .desktop file add a quick toggle to the desktop
|
||||||
|
environment's system tray.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
1. **NextDNS CLI**: The script controls the nextdns service. If you haven't installed it yet:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sh -c 'curl -sL https://nextdns.io/install | sh'
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Python 3 & PyQt6**: The interface is built using Python 3 and the Qt6
|
||||||
|
toolkit. (This is installed by default on (K)ubuntu.)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install python3 python3-pyqt6
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Polkit Agent**: The script uses pkexec to handle start/stop commands safely. Most desktop environments (KDE, GNOME, XFCE) come with this pre-installed.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. **Copy the files to your home directory:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create directories if they don't exist
|
||||||
|
mkdir -p ~/.local/bin ~/.local/share/applications ~/.local/share/icons
|
||||||
|
# Copy the specific files
|
||||||
|
cp home/.local/bin/nextdns_tray ~/.local/bin/
|
||||||
|
cp home/.local/share/applications/nextdns-tray.desktop ~/.local/share/applications/
|
||||||
|
cp home/.local/share/icons/nextdns.png ~/.local/share/icons/
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Make the script executable**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chmod +x ~/.local/bin/nextdns_tray
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **(Optional) Add to Autostart**: If you want the tray to start automatically when you log in:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.config/autostart
|
||||||
|
cp ~/.local/share/applications/nextdns-tray.desktop ~/.config/autostart/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Installation (one-liner)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sh -c 'curl -sL https://nextdns.io/install | sh'
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install python3 python3-pyqt6
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.local/bin ~/.local/share/applications ~/.local/share/icons
|
||||||
|
cp home/.local/bin/nextdns_tray ~/.local/bin/
|
||||||
|
cp home/.local/share/applications/nextdns-tray.desktop ~/.local/share/applications/
|
||||||
|
cp home/.local/share/icons/nextdns.png ~/.local/share/icons/
|
||||||
|
chmod +x ~/.local/bin/nextdns_tray
|
||||||
|
mkdir -p ~/.config/autostart
|
||||||
|
cp ~/.local/share/applications/nextdns-tray.desktop ~/.config/autostart/
|
||||||
|
```
|
||||||
133
home/bin/nextdns_tray.py
Normal file
133
home/bin/nextdns_tray.py
Normal file
File diff suppressed because one or more lines are too long
13
home/local/share/applications/nextdns-tray.desktop
Executable file
13
home/local/share/applications/nextdns-tray.desktop
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=NextDNS Tray
|
||||||
|
Comment=Manage NextDNS Service
|
||||||
|
# Ensure this path points to your actual script
|
||||||
|
Exec=python3 /home/hans/bin/nextdns_tray.py
|
||||||
|
# This is the icon that shows up in the menu/launcher
|
||||||
|
Icon=nextdns
|
||||||
|
Terminal=false
|
||||||
|
Categories=Network;System;
|
||||||
|
StartupNotify=false
|
||||||
|
# This prevents it from appearing as a blank window in the taskbar
|
||||||
|
X-KDE-StartupNotify=false
|
||||||
BIN
home/local/share/icons/nextdns.png
Normal file
BIN
home/local/share/icons/nextdns.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user