-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDunst.txt
88 lines (65 loc) · 2.72 KB
/
Dunst.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2016-12-25T02:24:05+01:00
====== Dunst ======
Created søndag 25 december 2016
**Dunst is a simple notification - It will catch notifications from **//libnotify //**and display them to the user.**
== Installation ==
$ pacman -S libnotify dunst
**# Start Dunst through your **xinitrc **file**
{{{code: lang="texinfo" linenumbers="True"
dunst &
}}}
== Configuration ==
**# Dunst reads its configuration from **//~/.config/dunst/dunstrc //**(Github)**
== Usage ==
**# Dunst will display **//normal//** and **//low//** urgency messages for 10sec.**
**# **//important//** messages will stick. **
**# mod4 = **//Super-key //
**# To close all notifications**
mod4+n
**# To close 1 notification**
mod4+Shift+n
**# Message History**
mod4+h
===== Create your own notifications! =====
**# You can send messages to **//libnotify//** with the **//notify-send //**command.**
$ notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information
**# The first string is the **//summary//**, the second is the **//body//**.**
**# This could be placed in a **//.sh//** script somewhere.**
== Urgency ==
**# You can also define the urgency of the message**
**# **//low, normal//** or**// critical//** - only **//critical//** will stay longer than 10sec**
**# append **//-u//** to define the urgency of the message**
$ notify-send 'Hello world!' 'This is an example notification.' -u critical
== Writing notifications as root ==
**# Get your UID - In my case, I had UID **//1000//
$ //id -u //
**# **//-u//** to define which user (**//stick//**)**
**# Also correct the **//UID//** (1000) in the **//path=/run/usr///** string if necessary.**
$ sudo -u stick DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send 'Hello world!' 'This is an example notification.'
== Csharp ==
**# Dunst also accepts other languages - like c#**
{{{code: lang="texinfo" linenumbers="True"
using Notifications;
public class HelloWorld {
static void Main() {
var Hello = new Notification();
Hello.Summary = "Hello world!";
Hello.Body = "This is an example notification.";
Hello.IconName = "dialog-information";
Hello.Show();
}
}
}}}
**# This requires a depedency though : **//pacman -S// //notify-sharp-3//
**# This could be placed in a **//.cs//** file somewhere^**
**# You've might noticed the **//IconName//** method**
**# Icons can be fount here : **https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
===== Tips and Tricks =====
**# A few tips for notifications**
== Laptop/ Battery ==
**# To easily get Battery notifications, also install **//Batify//
$ yaourt -S batify
**# And update the udev rules**
$ udevadm control --reload-rules