- Dunst
- Contents
- Installation
- Appearance
- Icon sets
- Shortcuts
- Rules
- Filtering
- Modifying
- Scripting
- Disable dunst temporarily
- Dunstify
- Replacing notifications
- Actions
- Tips and tricks
- Using dunstify as volume/brightness level indicator
- Overwrite previous notification
- Troubleshooting
- Dunst fails to start via systemd
- Dunst linux что это
- Features
- Bug reports
- Maintainers
- Author
- License
- Dunst, A Simple And Lightweight Notification Daemon
- Introduction
- Installation
- Utilization
- Dunst linux что это
- About
Dunst
Dunst is a lightweight replacement for the notification-daemons provided by most desktop environments.
Contents
Installation
An example configuration file is included at /etc/dunst/dunstrc . Copy this file to
/.config/dunst/dunstrc and edit it accordingly.
Launch /usr/bin/dunst and make sure your window manager or desktop environment starts it on startup/login.
Appearance
Dunst allows for the use of html markup in notifications. Some examples are bold, italics, strikethrough and underline. For a complete reference see [1]. HTML can be stripped from notifications if markup is set to none .
The formatting of the notification can be specified. Options are as follows:
These can be used in conjunction with HTML markup. For example the format can be set to %s\n%b for a bolded notification summary, a newline and the body unformatted.
Icon sets
Icons are set in the option icon_path . Status, devices and legacy icons are needed. By default, Dunst looks for the gnome-icon-theme icons. For example, to use adwaita-icon-theme (gnome-icon-theme’s successor), instead:
Shortcuts
Dunst can be controlled with dunstctl. You can update your keyboard shortcuts to call dunstctl.
For example, to close all notifications:
To show history:
Rules
You can create rules in your dunstrc file which match certain notifications and then perform an action on it such as executing a script.
Filtering
To create a new rule create a new section with a custom name in your config file. In that section you can now use the attributes appname, summary, body, icon, category, match_transient and msg_urgency to match the notification. Globbing is supported. See Scripting for an example. Start dunst with the -print option to find out useful information about a notification to write proper rules.
Modifying
When a notification is matched you can perform certain actions on it like modifying the format string, which is especially useful if you want to completely ignore certain notifications. In that case simply add the line format=»» to your rule.
Another useful feature is if you want to keep certain notifications out of your history for example if you use dunst as a Volume indicator. To achieve this simply add history_ignore=yes to your rule.
Scripting
Dunst can be configured to run scripts based on certain notification content. Here is an example using Dunst to run a script when someone from pidgin signs on:
The specified script will be passed the following parameters in that order: appname, summary, body, icon, urgency.
Disable dunst temporarily
To disable dunst temporarily there are two options.
Use dunstctl You can use dunstctl set-paused true/false/toggle to disable/reenable or toggle pausing notifications. Use dunstctl is-paused to check if dunst is currently running or paused. Use killall Use killall -SIGUSR1 dunst to disable and killall -SIGUSR2 dunst to reenable
Once paused dunst will hold back all notifications. After enabling dunst again all held back notifications will be displayed.
Dunstify
Dunstify is an alternative to the notify-send command which is completely compatible to notify-send and can be used alongside it, but offers some more features. Dunstify works only with the Dunst notification daemon.
Additionally to the options available in notify-send, dunstify offers some more features like IDs and actions.
Replacing notifications
You can assign an ID to a notification by calling dunstify with the -r ID option, where ID must be an integer. If a notification with that ID already exists it will be replaced with the new one. You may also close a notification with dunstify -C ID .
However, for most use cases, implementing tags is preferred over micromanaging IDs because the latter option has many hidden pitfalls [2]. Replacing IDs may be considered for debugging and for very complex notification senders instead of common practice [3].
Notifications with the same tag («test» in this example) are replaced without having to care for IDs.
Actions
You can define actions which can be invoked directly from the notification by specifying one or more —action=action,label parameters. For instance:
The user can then access the specified actions via Dunst’s context menu. The call to dunstify will block until either the notification disappears or an action is selected. In the former case dunstify will return 1 if the notification timed out and 2 if it was dismissed manually [4]. In the latter case it returns the action which was selected by the Dunst context menu.
In addition to invoking actions with the context menu, you may also define how mouse events invoke actions [5]. This allows Dunst to be used interactively, as was suggested in [6]. When a notification has only one action, or when an action is named «default», that action may be invoked by middle-clicking the notification (by default or when dunstrc defines mouse_middle_click = do_action ).
Tips and tricks
Using dunstify as volume/brightness level indicator
You can use the replace id feature to implement a simple volume or brightness indicator notification like in this picture [7].
To realize that volume indicator place the following script somewhere on your PATH .
Now simply bind changeVolume 2dB+ unmute etc. to some hotkey and you are done. You might also want to make dunst ignore these type of notifications in its history. See #Modifying.
Overwrite previous notification
For some notifications (for example sound or brightness), you might want to overwrite the previous notification. You can either use the Dunst method in #Replacing notifications or refer to Desktop notifications#Replace previous notification for a more general example.
Troubleshooting
Dunst fails to start via systemd
When using dunst without a Display Manager, the DISPLAY environment variable might not be correctly set.[8]
To fix this, add the following to your .xinitrc :
Источник
Dunst linux что это
Dunst is a lightweight replacement for the notification daemons provided by most desktop environments. It’s very customizable, isn’t dependent on any toolkits, and therefore fits into those window manager centric setups we all love to customize to perfection.
Features
Bug reports
Please use the issue tracker on GitHub to send us bug reports or feature requests. You can also join us at the #dunst IRC channel on Libera.
Maintainers
Author
License
Copyright (c) 2013, Sascha Kruse knopwob@gmail.com All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- 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.
- Neither the name of Sascha Kruse nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 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.
Источник
Dunst, A Simple And Lightweight Notification Daemon
Introduction
According to the Dunst website Dunst is a lightweight replacement for the notification daemons provided by most desktop environments. It’s very customizable, isn’t dependent on any toolkits, and therefore fits into those window manager centric setups we all love to customize to perfection.
When I installed Debian, I start from minimal install. So, I don’t have any notification by default. Then I choose Dunst. If you already have other notification daemon and want to try Dunst, Just simply add Dunst to your autostart. The default notification daemon should be overriden by Dunst.
Installation
Dunst is available in the official Debian repository
Then try to run it by dunst & command and then disown . Close the terminal. Open a new one, then test it by sending a notification message.
Of course the default look doesn’t look like that. It needs to be configured first. Here is my configurations. It’s placed in
Geometry is the size of the notification. 300×60-20+48 means, my notification box has 300px width & 60px height, placed on the right-top of the screen with 20px margin from the right & 48px margin from the top. Negative value in -20 means it’s drawed on the right. If you change the value to positive, the notification box would be drawed on the left of the screen. The positive value in +48 means it’s drawed on the top. If you change the value to negative, the notification box would be drawed on the bottom of the screen. Padding is the margin between the text and the box outline. Frame width is how thick your notification box outline. But I use Debian Jessie now, the Dunst version is too old and hasn’t been supporting frame yet. I will upgrade my Debian Jessie setup to Stretch soon. The font I use in the configurations above is custom and I haven’t uploaded it yet. So please change it with a font you have. format = %s\n%b , %s means summary (the title of the notification), and %b means body (the messages of the notification). \n is linebreak, without it, your notification messages would be drawed on the right side of the title. The format could be improved with markup. For example, make the title bold.
I have uploaded the fonts and write the description in this post
I didn’t enabled it because my bitmap font doesn’t support bold font. Creating bold bitmap font in 5px width of character is not very rational.
One of Dunst selling point is some actions could be controlled using keybind. Like Ctrl+Space to close the notification popup and Control+Backtick to see the previously closed notification. Dunst also could draw different outline color for each urgency level. In the configurations above I set the low urgency frame to green. The medium urgency frame to blue. And the critical urgency to orange. But again, my version of Dunst doesn’t support frame.
Utilization
Dunst by default handles every notification sent by any applications. But we could playing around with custom messages to send. This actually also works on any notification daemon, not only Dunst. But it looks even cooler if we did it on Dunst.
Источник
Dunst linux что это
A highly configurable and lightweight notification daemon.
Table of Contents
⚙️ Highly customizable
Customize fonts, icons, timeouts, and more. Are you unhappy with the default shortcuts and colors? No worries, you can change these all with a simple configuration file tweak.
click the images to see the dunstrc
Run custom scripts on notifications matching a specified pattern. Have espeak read out your notifications, or play a song when your significant other signs on in pidgin!
Change the look or behavior of notifications matching a specified pattern. You could use this to change the color of message notifications from your favorite jabber buddies, or to prevent important work email notifications from disappearing until you manually dismiss them.
If you want to take a break and not receive any notifications for a while, just pause dunst. All notifications will be saved for you to catch up later.
Catch an unread notification disappearing from the corner of your eye? Just tap a keyboard shortcut to replay the last notification, or continue tapping to see your notification history.
Most documentation can be found in dunst’s man pages. In dunst(1) contains some general instructions on how to run dunst and in dunst(5) all of dunst’s configuration options are explained.
On the dunst wiki you can find guides and installation instructions and on the dunst website there is a FAQ with common issues.
Dunst is available in many package repositories. If it’s not available in your distro’s repositories, don’t worry, it’s not hard to build it yourself.
- dbus (runtime)
- libxinerama
- libxrandr
- libxss
- glib
- pango/cairo
- libnotify (optional, for dunstify)
- wayland-client (can build without, see make parameters)
- wayland-protocols (optional, for recompiling protocols)
- xdg-utils (optional, xdg-open is the default ‘browser’ for opening URLs)
The names will be different depending on your distribution.
: Set the destination directory of the installation. (Default: / )
PREFIX=
: Set the prefix of the installation. (Default: /usr/local )
BINDIR=
: Set the dunst executable’s path (Default: $
DATADIR=
: Set the path for shared files. (Default: $
MANDIR=
: Set the prefix of the manpage. (Default: $
: The path to put the systemd user service file. Unused, if SYSTEMD=0 . (Default: $
SERVICEDIR_DBUS=
: The path to put the dbus service file. (Default: $ Make sure to run all make calls with the same parameter set. So when building with make PREFIX=/usr , you have to install it with make PREFIX=/usr install , too. Please use the issue tracker provided by GitHub to send us bug reports or feature requests. Written by Sascha Kruse dunst@knopwob.de Copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) Lightweight and customizable notification daemon Источник
About