Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bc0021f
Import adapted QtTrayMenu class from upstream
Kishi85 May 7, 2026
ef3815c
Integrate upstream QtTrayMenu.h/cpp into tray_linux.cpp
Kishi85 May 7, 2026
71a51ce
doc: Add doxygen comments for public functions of QtTrayMenu
Kishi85 May 10, 2026
57fe695
fix: Add default initialized values and change running state tracking
Kishi85 May 10, 2026
abda3d6
Add support for spectacle screenshots on KDE
Kishi85 May 11, 2026
a0014d4
Revert example to non-notification variant
Kishi85 May 10, 2026
dca8a79
fix: Segfaults from unit tests
Kishi85 May 10, 2026
5598361
WIP - process events during exit
Kishi85 May 12, 2026
844df0c
Update test_tray.cpp
ReenigneArcher May 12, 2026
800c0e4
Provide default argv, hide menu, use popup
ReenigneArcher May 12, 2026
7736f4c
QApplication::quit() only for apps that we created.
Kishi85 May 12, 2026
3806cf4
Cleanup QtTrayMenu constructor
Kishi85 May 12, 2026
71aeba1
Add option to fire notification using QSystemTray::showMessage on ini…
Kishi85 May 12, 2026
e0df938
(Re-)Implement tray notifications using libnotify with fallback to ba…
Kishi85 May 12, 2026
2d4d90a
Refactor tray_linux.cpp notifications and add separate namespace for …
Kishi85 May 16, 2026
d6bb4b3
fix: Properly cleanup notificationCurrent and notificationCurrentCall…
Kishi85 May 16, 2026
dfaac3f
refactor - Use acknowledge_notification to also clear previous notifi…
Kishi85 May 16, 2026
0426265
fix: Allow using themed icons for tray icon
Kishi85 May 16, 2026
d98dc67
fix: Always use absolute paths for filesystem-based notification icons
Kishi85 May 16, 2026
1834002
fix: Add missing/fix docstrings and unify variable style for namespac…
Kishi85 May 17, 2026
35b5fab
fix: Remove Qt::DBus dependency
Kishi85 May 17, 2026
925a2cb
fix: Fix potential issues with QtTrayMenu
Kishi85 May 17, 2026
96cf063
fix: Re-init notify upon setting app_name
Kishi85 May 17, 2026
e24c656
fix: Process UI modifications using Qt event system
Kishi85 May 17, 2026
ed616c5
fix: Improve error handling on tray_init
Kishi85 May 18, 2026
71f8760
fix: Only fail tray init on libnotify failure if Qt does not support …
Kishi85 May 19, 2026
4d6b137
fix: Requested changes from review
Kishi85 May 19, 2026
5f5e43d
feat: run libnotify actions that use DBus asynchronously with timeout…
Kishi85 May 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
"build-essential"
"cmake"
"imagemagick"
"libnotify-dev"
"ninja-build"
"xvfb"
)
Expand Down
19 changes: 14 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,23 @@ else()
find_library(COCOA Cocoa REQUIRED)
list(APPEND TRAY_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/tray_darwin.m")
else()
find_package(Qt6 COMPONENTS Widgets DBus Svg)
find_package(LibNotify REQUIRED)
find_package(Qt6 COMPONENTS Widgets Svg)
if(Qt6_FOUND)
set(TRAY_QT_VERSION 6)
else()
find_package(Qt5 REQUIRED COMPONENTS Widgets DBus Svg)
find_package(Qt5 REQUIRED COMPONENTS Widgets Svg)
set(TRAY_QT_VERSION 5)
endif()
set(TRAY_QT_VERSION # cmake-lint: disable=C0103
"${TRAY_QT_VERSION}"
CACHE INTERNAL "Qt major version selected by tray"
)
set(CMAKE_AUTOMOC ON)
list(APPEND TRAY_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/tray_linux.cpp")
list(APPEND TRAY_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/src/tray_linux.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/QtTrayMenu.cpp"
)
endif()
endif()
endif()
Expand All @@ -110,10 +114,15 @@ else()
list(APPEND TRAY_EXTERNAL_LIBRARIES ${COCOA})
else()
if(TRAY_QT_VERSION EQUAL 6)
list(APPEND TRAY_EXTERNAL_LIBRARIES Qt6::Widgets Qt6::DBus Qt6::Svg)
list(APPEND TRAY_EXTERNAL_LIBRARIES Qt6::Widgets Qt6::Svg)
else()
list(APPEND TRAY_EXTERNAL_LIBRARIES Qt5::Widgets Qt5::DBus Qt5::Svg)
list(APPEND TRAY_EXTERNAL_LIBRARIES Qt5::Widgets Qt5::Svg)
endif()
list(APPEND TRAY_LIBNOTIFY=1)
list(APPEND TRAY_EXTERNAL_LIBRARIES ${LIBNOTIFY_LIBRARIES})

include_directories(SYSTEM ${LIBNOTIFY_INCLUDE_DIRS})
link_directories(${LIBNOTIFY_LIBRARY_DIRS})
endif()
endif()
endif()
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,35 @@ This fork adds the following features:

### Linux Dependencies

Install either Qt6 _or_ Qt5 development packages. The Linux backend requires
Qt Widgets, DBus, and Svg modules.
Install either Qt6 _or_ Qt5 as well as libnotify development packages. The Linux backend requires libnotify and Qt Widgets+Svg modules.

<div class="tabbed">

- <b class="tab-title">Arch</b>
```bash
# Qt6
sudo pacman -S qt6-base qt6-svg
sudo pacman -S qt6-base qt6-svg libnotify

# Qt5
sudo pacman -S qt5-base qt5-svg
sudo pacman -S qt5-base qt5-svg libnotify
```

- <b class="tab-title">Debian/Ubuntu</b>
```bash
# Qt6
sudo apt install qt6-base-dev qt6-svg-dev
sudo apt install qt6-base-dev qt6-svg-dev libnotify-dev

# Qt5
sudo apt install qtbase5-dev libqt5svg5-dev
sudo apt install qtbase5-dev libqt5svg5-dev libnotify-dev
```

- <b class="tab-title">Fedora</b>
```bash
# Qt6
sudo dnf install qt6-qtbase-devel qt6-qtsvg-devel
sudo dnf install qt6-qtbase-devel qt6-qtsvg-devel libnotify-devel

# Qt5
sudo dnf install qt5-qtbase-devel qt5-qtsvg-devel
sudo dnf install qt5-qtbase-devel qt5-qtsvg-devel libnotify-devel
```

</div>
Expand Down
55 changes: 55 additions & 0 deletions cmake/FindLibNotify.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# - Try to find LibNotify
# This module defines the following variables:
#
# LIBNOTIFY_FOUND - LibNotify was found
# LIBNOTIFY_INCLUDE_DIRS - the LibNotify include directories
# LIBNOTIFY_LIBRARIES - link these to use LibNotify
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
# Copyright (C) 2014 Collabora Ltd.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

find_package(PkgConfig)
pkg_check_modules(LIBNOTIFY QUIET libnotify)

find_path(LIBNOTIFY_INCLUDE_DIRS
NAMES notify.h
HINTS ${LIBNOTIFY_INCLUDEDIR}
${LIBNOTIFY_INCLUDE_DIRS}
PATH_SUFFIXES libnotify
)

find_library(LIBNOTIFY_LIBRARIES
NAMES notify
HINTS ${LIBNOTIFY_LIBDIR}
${LIBNOTIFY_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibNotify REQUIRED_VARS LIBNOTIFY_INCLUDE_DIRS LIBNOTIFY_LIBRARIES
VERSION_VAR LIBNOTIFY_VERSION)

mark_as_advanced(
LIBNOTIFY_INCLUDE_DIRS
LIBNOTIFY_LIBRARIES
)
Loading
Loading