Code Monkey home page Code Monkey logo

your-tray's Introduction

Your Tray (WIP)

Add your own app indicator by just setting a yaml file

Install

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

sudo apt-get install build-essential

GTK-3-dev

sudo apt-get install libgtk-3-dev

Appindicator 3.0.1

sudo apt-get install libappindicator3-dev gir1.2-appindicator3-0.1

Service

Create a service:

sudo nano /etc/systemd/user/your-tray.service

Use this configuration:

[Unit]
Description=Your tray
After=default.target

[Service]
Type=simple
ExecStart=<path to the bin>

[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

-config string
    Path to the configuration (default "/etc/your-tray/config.yaml")
-level string
    Log levels: error, warn, info, debug (default "debug")

YAML Config

tray:
  name: My tray # Optional
  tooltip: My wonderfull tray # Optional
  items:
    - text: "Ip: {{ .output }}" # .output is the output of the command
      command: ifconfig <my vpn interface name> | 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

your-tray's People

Contributors

arcanediver avatar

Watchers

 avatar  avatar

Forkers

mranv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.