Giter VIP home page Giter VIP logo

linux-tray-icons's Introduction

Linux Tray Icons

This script allows add tray icons with submenus and options in Linux Wing Panel. The following will detail how to configure it to run on system boot.

Warning

These steps have been performed only on the Elementary OS 6.1 distribution. I do not know if it could give failures in other Linux distributions.

Note

This documentation uses python command to run and compile Python scripts. This command may be different on your system (e.g. python3). You should use whatever command is available to you.

Configuration

First of all, it's necessary install Wingpanel Ayatana-Compatibility Indicator on your system if it is not already installed. Afterwards, you can open the script with any code editor and modify it to add options according to your needs. The script is very short and simple and includes some commented features by default, so it will not be difficult for you to understand how it works.

Installation

Once configured to your liking, you can run the script directly using:

python linux-tray-icon.py

If you don't want to have to run this command every time you boot your system, you can tell your Linux distribution to run it for you. To do this, compile the script to generate a .pyc file using the command:

python -m your-tray-icon linux-tray-icon.py

Once the .pyc file is generated, you will need to make it executable using the following command (this is probably not necessary since the script includes the #!/usr/bin/python statement, but just in case):

chmod +x your-tray-icon.pyc

Next, move the .pyc file to the ~.local/bin/ directory on your system, and then create a .desktop file inside the ~.config/autostart/ directory with the following content:

[Desktop Entry]
Name=YourTrayIconName
GenericName=Your tray icon generic name
Comment=Your tray icon description
Exec=your-tray-icon.pyc
Terminal=false
Type=Application
Icon=your-tray-system-icon
Categories=Utility;
Keywords=shorcut;app;
StartupNotify=false
X-GNOME-Autostart-enabled=true

Obviously, the Name, GenericName, Comment, Exec, Icon, Category and Keywords sections must be configured according to your needs.

This should make the application recognized by the system and available to start at system boot.

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.