GithubHelp home page GithubHelp logo

lxqt / lxqt-notificationd Goto Github PK

View Code? Open in Web Editor NEW
61.0 22.0 41.0 873 KB

The LXQt notification daemon

Home Page: https://lxqt.github.io

License: GNU Lesser General Public License v2.1

CMake 4.76% C++ 92.74% Shell 2.50%

lxqt-notificationd's Introduction

lxqt-notificationd

Overview

lxqt-notificationd is LXQt's implementation of a daemon according to the Desktop Notifications Specification.

This specification defines a way to display notifications in pop-up windows on desktops. Notifications like this are e. g. frequently used by chat or mail clients to inform about incoming messages, by media players to indicate the beginning of another track but also by the desktop environment itself to indicate volume changes or similar.

lxqt-notificationd is comprising binaries lxqt-notificationd and lxqt-config-notificationd. lxqt-notificationd is running in a daemon-like manner as so-called LXQt Module and doing the actual work. GUI "Desktop Notifications", binary lxqt-config-notificationd, is used to customize the notifications.

lxqt-notificationd is implementing version 1.2 of the said specification.

Installation

Compiling source code

Runtime dependencies are KWindowSystem, liblxqt, lxqt-session and layer-shell-qt. Additional build dependencies are CMake and optionally Git to pull latest VCS checkouts.

Code configuration is handled by CMake. CMake variable CMAKE_INSTALL_PREFIX has to be set to /usr on most operating systems.

To build run make, to install make install which accepts variable DESTDIR as usual.

Binary packages

Official binary packages are provided by all major Linux distributions like Arch Linux, Debian, Fedora and openSUSE. Just use your package manager to search for string lxqt-notificationd.

Configuration, Usage

As lxqt-notificationd is run as LXQt Module it can be adjusted from section "Basic Settings" in configuration dialogue LXQt Session Settings of lxqt-session.

Configuration dialogue "Desktop Notifications" (binary lxqt-config-notificationd) which is used to customize notifications can be opened from the panel's main menu - Preferences - LXQt Settings - Desktop Notifications and is provided by the Configuration Center of lxqt-config as well.

Translations

Translations can be done in LXQt-Weblate

Translation status

lxqt-notificationd's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lxqt-notificationd's Issues

notificationd regularly crashes on sway

Expected Behavior

No crashes

Current Behavior

When running the daemon for long enough, eventually it will segfault. Lots of notifications are sent to it on a normal day for me, not sure how to reproduce.

Context

Crashes under normal load regularly since I started using it

System Information
  • Distribution & Version: Gentoo Unstable
  • Kernel: 5.15.5-dist
  • Qt Version: 5.15.2
  • liblxqt Version: 1.0.0
  • lxqt-build-tools Version: 0.10.0
  • Package version: 1.0.0
  • Running Sway as my compositor
  • sway version: 1.7
  • wlroots version: 0.15.1

Here's an example of a time it does it. I've reran the daemon through time this time for next time it segfaults.
https://pastebin.com/jvfv8tF8
If you want me to rebuild with debug opts let me know.

Naming in code is confusing

After reordering the GUI years ago the names weren't touched. "BasicSettings" is about "Position", "AdvancedSettings" is really "GeneralSettings". This is confusing when touching the code.

Related: I don't find atm the old issue about "appearance" and reordering, but the "size and margins" section should go to the second page which should be renamed "Appearance", it's there where the preview is located - now users have to switch for and back to preview size and margins.

Making separate PRs.

  • Distribution & Version: latest git

Spotify Track Notifications Show Wrong Album Artwork

When I play music on Spotify, the first notification will display the correct album artwork, but every song after that will continue to show the album artwork of the first song I listened to. I'm not sure what other information to include, as this feels pretty self explanatory to me. What other information would be good?

I hope this is the right place to create this issue. If not, let me know and I'll make the necessary changes.

I'd like to try my hand at fixing this issue myself, but I have no experience with the lxqt project. Could someone point me in the right direction? I've read through the contributing guide but would appreciate specific guidance on where to dig around to debug this specific issue. Hope that's not too much to ask.

Thanks in advance! Here are some screenshots:

2018-12-19_11-29
2018-12-19_11-31

Notification preview pops up twice

When changing the position of the notification messages in lxqt-config-notificationd
for some seconds the preview pops first up at the previous position.

Expected Behavior

Preview notification pops up in selected position of the screen.

Current Behavior

Pops up twice, as described.

Possible Solution

Inserting a delay until new setting is applied?

  • Distribution & Version: Arch + latest git checkout, but is also present in official arch packages
  • Qt Version: 5.9.1-3

Toggle "Do not disturb" from tray

Actually we have "Basic Settings" and "advanced".
When clicking "Settings" in the tray icon (if unattended notifications is active) users arrive at the position setting, the have to switch to "advanced" to change settings.

  • Toggle settings' positions
  • rename Basic Settings > Position
  • rename Advanced Settings > General (Settings)
  • remove redundant title in "position"
  • change icon?
  • [x ] move spacing and width settings in "Position" "Appearance"
  • Toggle "do not disturb" from tray menu

schermata-12-14-09-02

[Feature request] Add "Do not disturb" mode

Sometimes it could be useful to postpone all notifications (work, movie ecc) for an amount of time (like ½h, 1h, 2h)
It could also be triggered somehow by "pause idleness watcher" with fullscreen or when lxqt/lxqt-powermanagement#260 is implemented. adding an checkbox "pause also notification".

Possible Solution
  • Allow 0 seconds (related #211) for timeout
  • toggle configuration from actual settings to 0 seconds and Save last 10
  • at the end show unattended notifications

(follow up of lxqt/lxqt-panel#1320)

Customize behaviour on multi-screen setups

As a laptop, multiscreen user, I would like to customize the behaviour of the notifications when I have more than one attached screen.

Expected Behavior

In some moments, I would like the notifications appearing in the screen with the mouse.

Or, maybe, showing the notifications in all the screens.

Current Behavior

Notifications always appear in the primary screen.

Possible Solution

Enhancing the notifications code, so its behaviour can be set up.

Steps to Reproduce (for bugs)
Context
System Information
  • Distribution & Version: Gentoo
  • Kernel: 5.7.7
  • Qt Version: 5.14.2
  • liblxqt Version: 0.14.1
  • lxqt-build-tools Version:
  • Package version:

Qt warning when launching lxqt-config-notificationd

Current Behavior

When launching lxqt-config-notificationd a Qt warning is printed:
QCoreApplication::postEvent: Unexpected null receiver

This is my notifications.conf, for sake of completeness:

[General]
__userfile__=true
doNotDisturb=false
placement=bottom-right
screenWithMouse=false
server_decides=10
spacing=8
unattendedMaxNum=0
width=640
Possible Solution
Context

The Qt stderr message shows up upon launching from a terminal, and shows up in journalctl.

System Information
  • Distribution & Version: Arch Linux
  • Kernel: Linux 6.2.9
  • Qt Version: 5.15.8
  • liblxqt Version: git latest
  • lxqt-build-tools Version: git latest
  • Package version: git latest

Visual artefact in notification popup

I noticed it by setting spacing to a higher value (20), without a compositor it is black, with compositor transparent.

schermata-12-17-19-02

schermata-12-17-19-15-01

Steps to Reproduce (for bugs)
  1. Select a theme with bright notification popup (silver, kde-plasma)
  2. set "spacing" in notification settings to 30
  3. execute notify-send test test
Context

I saw that I was unable to click nearby under the notification window.

System Information
  • Distribution & Version: arch/ manjaro with latest git; manjaro VM with LXQt 1.0.0
pacman -Qi lxqt-notificationd
Nome                      : lxqt-notificationd
Versione                  : 1.0.0-1

lxqt-notificationd doesn't stop after failed registering

If another daemon is running the terminal informs correctly but the notifications daemon doesn't stop,
If it's module is started it shows just "running", but in fact it's not.


$ dunst &
[1] 100957
stef@archlinux:~$ lxqt-notificationd                                                                                                                             
registerService failed: another service with 'org.freedesktop.Notifications' runs already

Expected Behavior

If a module doesn't work it should stop, also if there is no crash.

Possible Solution

Stop the daemon if it fails to register.

Steps to Reproduce (for bugs)
  1. Stop lxqt-notificationd module
  2. Start another daemon, dunst, mako
  3. Start the module, ti will show no error and "running".
System Information
  • Distribution & Version: git, all; arch

Texts of action buttons may be cut

Current Behavior

Why should I write tens of lines when I can show the problem with a screenshot? See the button at the middle:

notification

Possible Solution

I don't think we can use the trick that we used with panel's task buttons because we deal with push buttons here and most styles (if not all) don't consider the lack of space in their case. I'll add a patch to Kvantum for text eliding soon but all other styles will show cut texts.

EDIT: This would be ideal if possible (the screenshot is taken with the latest git Kvantum, after applying the above-mentioned patch, and the notification is made by dunstify):

elided

System Information

Latest git LXQt

set _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NOTIFICATION

Expected Behavior

notification show always stay on top

Current Behavior

when using qtile, while notifications do stay on top of terminal and pcmanfm-qt, firefox always stays on top of notifications.

Possible Solution

dunst doesn't face this problem, I noticed these xprop parameters on dunst notifications _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NOTIFICATION, _NET_WM_WINDOW_TYPE_UTILITY so maybe setting these will work for lxqt-notificationd as well

Steps to Reproduce (for bugs)
Context
System Information
  • Distribution & Version: NixOS 22.05 (Quokka)
  • Kernel: 5.15.55
  • Qt Version: 5.15.3
  • liblxqt Version: 1.1.0
  • lxqt-build-tools Version: 0.11.0
  • Package version: 1.1.0

Edit: I tried xprop -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_NOTIFICATION and restarted qtile but it still had the same problem so maybe that's not the solution

Qt bug: random crash under Wayland

To test some LXQt components (and a few other Qt apps) with Wayland, I worked under Wayfire for more than a week and used lxqt-notificationd there. The following crash happened three times:

#0  0x00007efca3e3660f in  () at /usr/lib/libQt5Widgets.so.5
#1  0x00007efca3d85b3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#2  0x00007efca330f978 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#3  0x00007efca3d81b2a in QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) ()
    at /usr/lib/libQt5Widgets.so.5
#4  0x00007efca3db61dd in QWidget::clearFocus() () at /usr/lib/libQt5Widgets.so.5
#5  0x00007efca3da8c71 in QWidget::~QWidget() () at /usr/lib/libQt5Widgets.so.5
#6  0x00007efca3f141ee in QPushButton::~QPushButton() () at /usr/lib/libQt5Widgets.so.5
#7  0x00007efca33362e5 in QObjectPrivate::deleteChildren() () at /usr/lib/libQt5Core.so.5
#8  0x00007efca3da8d95 in QWidget::~QWidget() () at /usr/lib/libQt5Widgets.so.5
#9  0x000055813259e0fd in  ()
#10 0x00007efca33362e5 in QObjectPrivate::deleteChildren() () at /usr/lib/libQt5Core.so.5
#11 0x00007efca3da8d95 in QWidget::~QWidget() () at /usr/lib/libQt5Widgets.so.5
#12 0x0000558132596b43 in  ()
#13 0x00007efca333311a in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
...

The problem isn't in lxqt-notificationd but in Qt itself, as the above backtrace shows.

However, QWidget::setFocus() is used by the code for some widgets inside the notification window. Since that window doesn't (and shouldn't) have focus, focusing widgets doesn't makes sense under X11 (although it's harmless) and is troublesome under Wayland. The above-mentioned crash disappeared after I prevented the widgets from being focused.

Will make a PR.

Summary should not be handled as markup

Expected Behavior

When sending a notification with the summary << test >>, that text should appear literally.

Current Behavior

The text is interpreted as markup and rendered as >

Possible Solution

Probably call setTextFormat(Qt::PlainText) or so on the summaryLabel

Steps to Reproduce (for bugs)
  • notify-send '<< test >>' (is displayed wrong)
  • notify-send '&lt;&lt; test &gt;&gt;' (is displayed as << test >>)
Context

See the notification spec (emphasis mine):

Body text may contain markup.

as well as:

"body-markup": Supports markup in the body text.

System Information

Qt 5.15.2 on Archlinux, latest git master.

Notification list has title and border on wayland with some compositors

On labwc the window can even be dragged around:

screen_area_dom_10:17:50_

Usually it opens also half out of screen if notification window rule is set to right side. It shouldn't follow window rules at all.
On kwin_wayland title and border are present too. Wayfire handles it correctly, hyprland ommits titles by default, couldn't test on sway on sway it has no border and title but can be dragged around.

Possible Solution

Probably some window flags or attributes can be set.

Context

It's one of the 2 issues left with top lxqt-panel on labwc.

System Information
  • Distribution & Version: latest git, arch

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.