Skip to content

A Python-based system tray application that lets users load and manage applications from a JSON configuration file

License

Notifications You must be signed in to change notification settings

luke7-404/appOrganizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

App Organizer

App Organizer is a Python-based system tray application that lets users load and manage applications from a JSON configuration file. It provides an intuitive interface for launching applications and customizing the tray icon.

Features

  • Load and dynamically populate the tray menu with applications from a JSON file.
  • Easily update the tray icon using an image file.
  • Save and reload configuration settings, including the JSON file and icon path.
  • Simple, user-friendly design with options to reload JSON, change the icon, or exit the application.

Requirements

To run this application, ensure you have the following:

  • Python: 3.6 or later
  • Required Python packages:
    • pystray
    • Pillow
    • tkinter

Installation

  1. Clone or download the repository.
  2. Install the required dependencies by running:
    pip install -r requirements.txt
  3. Run the application:
    python app.py

Build and use script (Windows instructions)

To make the script into a windows executable use pyinstaller.

  1. Install pyinstaller:
      pip install pyinstaller
  2. Create a .exe:
      pyinstaller -- onefile --noconsole app.py
      This generates an executable file in the dist/ folder.

How to make the script run on start up

  1. Create a shortcut for app.exe
  2. Add shortcut to startup folder:
    1. Run the command win + r
    2. In the window type shell:startup
    3. Add the app.exe shortcut to the folder that opened

Usage

Menu Options:

  1. 📂 Reload JSON:

    • Opens a file dialog to select a JSON file.
    • Updates the tray menu with the apps listed in the file.
  2. 🔄 Change Icon:

    • Opens a file dialog to select an image file (.png or .ico).
    • Updates the tray icon.
  3. ❌ Exit:

    • Stops the application.

JSON Configuration

The JSON file should be structured as follows:

{
  "AppName1": "Path/To/App1.exe",
  "AppName2": "Path/To/App2.exe",
  "AppName3": "Path/To/App3.exe"
}

Tray Icon

If no icon is specified, the app uses a default blue icon. To set a custom icon:

  1. Click on 🔄 Change Icon.
  2. Select an image file (.png or .ico).

Configuration File

The application saves configuration settings in config.json. This file includes:

  • Path to the JSON file.
  • Path to the selected icon.

Example config.json:

{
  "json_path": "path/to/apps.json",
  "icon_path": "path/to/icon.png"
}

Development

Code Structure

  • main(): Initializes the tray application.
  • Dynamic Menu Updates: Load apps and settings on the fly.
  • Helper Functions:
    • select_json_file(): Opens a dialog to choose the JSON file.
    • select_icon_file(): Opens a dialog to choose an icon.
    • update_menu(): Refreshes the tray menu dynamically.

Contribution

Feel free to fork the project and submit pull requests. Contributions are welcome!


Troubleshooting

Common Issues:

  • JSON Load Error: Ensure the JSON file is properly formatted.
  • App Launch Error: Verify the application paths in the JSON file.
  • Icon Load Error: Ensure the selected image file exists and is supported.

Debugging:

Run the app with Python to see detailed error messages in the console.


License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Python-based system tray application that lets users load and manage applications from a JSON configuration file

Topics

Resources

License

Stars

Watchers

Forks

Languages