Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arcanediver/your-tray
Your own tray as a config
https://github.com/arcanediver/your-tray
appindicator go gtk
Last synced: about 4 hours ago
JSON representation
Your own tray as a config
- Host: GitHub
- URL: https://github.com/arcanediver/your-tray
- Owner: ArcaneDiver
- Created: 2021-02-13T17:43:11.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-16T11:04:12.000Z (almost 4 years ago)
- Last Synced: 2025-02-12T14:21:20.576Z (1 day ago)
- Topics: appindicator, go, gtk
- Language: Go
- Homepage:
- Size: 2.37 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Your Tray (WIP)
Add your own app indicator by just setting a yaml file## Install
```bash
wget https://github.com/ArcaneDiver/your-tray/releases/download/1.0.0/your-tray-v1.0.0-linux-amd64.tar.gz -O your-tray.tar.gz
tar -zxvf your-tray.tar.gz
sudo mv your-tray /usr/local/bin/your-tray
```## Dependencies
#### Build essential
```bash
sudo apt-get install build-essential
```#### GTK-3-dev
```bash
sudo apt-get install libgtk-3-dev
```#### Appindicator 3.0.1
```bash
sudo apt-get install libappindicator3-dev gir1.2-appindicator3-0.1
```## Service
Create a service:
```bash
sudo nano /etc/systemd/user/your-tray.service
```
Use this configuration:
```
[Unit]
Description=Your tray
After=default.target[Service]
Type=simple
ExecStart=[Install]
WantedBy=multi-user.target```
You can start the service with:
```
sudo systemctl --user start your-tray.service
```
and keep it running between reboots:
```
sudo systemctl --user enable your-tray.service
```## Usage
#### Cli arguments
```bash
-config string
Path to the configuration (default "/etc/your-tray/config.yaml")
-level string
Log levels: error, warn, info, debug (default "debug")
```
#### YAML Config
```yaml
tray:
name: My tray # Optional
tooltip: My wonderfull tray # Optional
items:
- text: "Ip: {{ .output }}" # .output is the output of the command
command: ifconfig | awk '/inet / {print $2}'
type: data
- text: Start
command: sudo systemctl start my-vpn.service
tooltip: Start the service
type: command
- text: Stop
command: sudo systemctl stop my-vpn.service
tooltip: Stop the service
type: command
icon: /etc/your-tray/my-icon.png # Icon path of the tray
updateRate: 1 # Update rate of type data items
```