Skip to content

Fully configurable tray icon and menu

License

Notifications You must be signed in to change notification settings

aceberg/TrayPumpkin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrayPumpkin


Binary-release

Fully configurable tray icon and menu.

  • Icon: can be changed on command
  • Menu: shows a user-defined menu that allows to run custom scripts
  • Left click: runs a command
  • Second Left click (toggle): runs another command
  • Each command can change Icon and app Tooltip
Menu Tray User defined icon (Tux)
Screenshot1 Screenshot2 Screenshot2

Install

There are only packages for x86_64 arch right now.

AppImage

.AppImage can be downloaded from latest release.

DEB

.deb package can be downloaded from latest release or from my ppa repo.

RPM

.rpm package can be downloaded from latest release.

TAR.GZ

  1. Install dependencies. The app needs those packages:
qt5-qtbase, kf5-knotifications, yaml-cpp
  1. Download .tar.gz archive from latest release.
  2. Unpack
tar xvzf tray-pumpkin-*-x86_64.tar.gz
  1. Install
cd tray-pumpkin-*-x86_64
sudo ./install.sh

Run

tray-pumpkin

By default, the app will look in ~/.config/TrayPumpkin/config.yaml for config file. If there is none, it will copy default config example there.
To set another config path, run:

tray-pumpkin -c /my/path/config.yaml

Config

Each config item has name, cmd, icon and tooltip. You can skip some of them, as in the config.yaml example:

# app config
app:
  name: "Tray Pumpkin"              # App name
  tooltip: "Pumpkin tray utility"   # Dafault tooltip
  icon: "assets/pumpkin-green.png"  # Dafault icon
  cmd: "notify-send 'Tray Pumpkin Started'" # This cmd is optional and runs only at the start

# optional, runs on first left click
left_click:
  cmd: "sh ~/myscript.sh start && notify-send 'Start'"
  icon: "assets/pumpkin-orange.png"
  tooltip: "MyApp"

# optional, runs on second left click
left_click_toggle:
  cmd: "sh ~/myscript.sh stop && notify-send 'Stop'"
  icon: "assets/pumpkin-green.png"
  tooltip: "Pumpkin tray utility"

# optional, runs on quit
quit:
  cmd: "killall xpenguins && notify-send 'All stopped'"

# optional, right click menu
# name and cmd are required for every menu item except separator
menu:
  - name: "Edit config.yaml"
    cmd: "gedit config.yaml"

  - separator: true

  - name: "Start MyApp-1"
    cmd: "sh ~/myscript.sh start && notify-send 'Start'"
    icon: "assets/pumpkin-orange.png"
    tooltip: "MyApp"

  - name: "Stop MyApp-1"
    cmd: "sh ~/myscript.sh stop && notify-send 'Stop'"
    icon: "assets/pumpkin-line.png"
    tooltip: "Pumpkin tray utility"

  - separator: true

  - name: "Penguins Big"
    cmd: "xpenguins --theme 'Big Penguins' -a -b"
    icon: "assets/tux.png"

  - name: "Penguins Stop"
    cmd: "killall xpenguins"
    icon: "assets/pumpkin-green.png"

Build

  1. Install dependencies
apt install -y \
            cmake \
            build-essential \
            qtbase5-dev \
            libkf5notifications-dev \
            libyaml-cpp-dev
  1. Clone the repo and build
mkdir -p build
cmake -B build
cd build && make
  1. Run
./build/tray-pumpkin -c config.yaml

Icons

Pumpkin icons created by LAFS - Flaticon