Skip to content

Commit 7edbebd

Browse files
committed
Solve merge with master
2 parents 3b7898b + e1e772c commit 7edbebd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2060
-850
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- fedora
3333
- ubuntu-focal
3434
- ubuntu-jammy
35+
- ubuntu-noble
3536

3637
env:
3738
CC: ${{ matrix.CC }}
@@ -59,7 +60,7 @@ jobs:
5960
run: ./test/test-install.sh
6061

6162
- name: valgrind memleaks
62-
run: make -j clean test-valgrind
63+
run: make clean && make -j test-valgrind
6364

6465
runs-on: ubuntu-latest
6566
container:
@@ -83,7 +84,7 @@ jobs:
8384
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
8485

8586
- name: coverage
86-
run: make clean test-coverage
87+
run: make clean && make -j test-coverage
8788

8889
- name: Generate coverage report
8990
run: lcov -c -d . -o lcov.info

.valgrind.suppressions

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,18 @@
179179
fun:notification_load_icon_with_scaling
180180
...
181181
}
182+
183+
{
184+
# Something new on Ubuntu Noble Numbat
185+
rsvg_conditional_jump-ubuntu_focal
186+
Memcheck:Cond
187+
obj:/usr/lib/*/librsvg-2.so.2.50.0
188+
...
189+
fun:rsvg_handle_new
190+
obj:/usr/lib/*/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
191+
obj:/usr/lib/*/libgdk_pixbuf-2.0.so.0.4200.10
192+
fun:gdk_pixbuf_new_from_file
193+
fun:notification_setup_raw_image
194+
fun:notification_load_icon_with_scaling
195+
...
196+
}

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Dunst changelog
22

3+
## 1.12.0 -- 2024-11-30
4+
5+
### Added
6+
- Export rules via dbus with `dunstctl rules [--json]` (#1212)
7+
- Added checks and messages for missing DBUS\_SESSION\_BUS\_ADDRESS (#1389)
8+
- Add `-e/--exit` flag to `dunstctl is-paused` to exit with 1 when paused (#1378)
9+
- Add color gradients for the progress bar (by providing a list of colors instead of one) (#1370)
10+
- Use TESTDIR env var as the base for the test program (#1376)
11+
- Add `dunstctl reload` to hot reload the configuration (#1350)
12+
- Add an optional id to `dunstctl close` (#1351)
13+
- Print compile-time options in `dunst --version` (#1336)
14+
15+
### Changed
16+
- BREAKING: Implement dynamic height (changes the the `height` setting, see manual) (#1342)
17+
- Change the preferred syntax of `offset` from `NxN` to `(N,N)` (#1330)
18+
- Install the systemd service file in the session.slice (#1397)
19+
- Open url with `dunstctl action` if no action is present (#1345,#1395)
20+
- Remove default icons (now no icons are hard-coded) (#1365,#1358)
21+
- Various updates to documentation and test suite
22+
23+
### Fixed
24+
- Order of context menu was reversed (#1394,#1375)
25+
- Resolve ~ and $HOME in `icon_path` (#1383,#1371)
26+
- Fix broken link to freedesktop's notification specs in man page (#1381)
27+
- Remove the message about shortcuts deprecation (#1353)
28+
- Fix vertical padding behaviour (#1342)
29+
- Fix bash completion (#1347)
30+
- Fix file suffix for fish completions during installation (#1339)
31+
332
## 1.11.0 -- 2024-04-15
433

534
### Added

Makefile

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
include config.mk
55

6-
VERSION := "1.11.0-non-git"
6+
VERSION := "1.12.0-non-git"
77
ifneq ($(wildcard ./.git/),)
88
VERSION := $(shell ${GIT} describe --tags 2>/dev/null || echo ${VERSION})
99
endif
@@ -29,14 +29,20 @@ endif
2929

3030
SYSCONF_FORCE_NEW ?= $(shell [ -f ${DESTDIR}${SYSCONFFILE} ] || echo 1)
3131

32-
CFLAGS := ${DEFAULT_CPPFLAGS} ${CPPFLAGS} ${DEFAULT_CFLAGS} ${CFLAGS} ${INCS} -MMD -MP
33-
LDFLAGS := ${DEFAULT_LDFLAGS} ${LDFLAGS} ${LIBS}
32+
ifneq (0,${DUNSTIFY})
33+
DUNSTIFY_CFLAGS := ${DEFAULT_CFLAGS} ${CFLAGS} ${CPPFLAGS} $(shell $(PKG_CONFIG) --cflags libnotify)
34+
DUNSTIFY_LDFLAGS := ${DEFAULT_LDFLAGS} ${LDFLAGS} $(shell $(PKG_CONFIG) --libs libnotify)
35+
endif
36+
37+
CPPFLAGS := ${DEFAULT_CPPFLAGS} ${CPPFLAGS}
38+
CFLAGS := ${DEFAULT_CFLAGS} ${CFLAGS} ${INCS} -MMD -MP
39+
LDFLAGS := ${DEFAULT_LDFLAGS} ${LDFLAGS} ${LIBS}
3440

3541
SRC := $(sort $(shell ${FIND} src/ ! \( -path src/wayland -prune -o -path src/x11 -prune \) -name '*.c'))
3642

3743
ifneq (0,${WAYLAND})
3844
# with Wayland support
39-
CFLAGS += -DHAVE_WL_CURSOR_SHAPE -DHAVE_WL_EXT_IDLE_NOTIFY
45+
CPPFLAGS += -DHAVE_WL_CURSOR_SHAPE -DHAVE_WL_EXT_IDLE_NOTIFY
4046
SRC += $(sort $(shell ${FIND} src/wayland -name '*.c'))
4147
endif
4248

@@ -59,35 +65,39 @@ DEPS := ${SRC:.c=.d} ${TEST_SRC:.c=.d}
5965
.PHONY: all debug
6066
all: doc dunst service
6167

62-
debug: CFLAGS += ${CPPFLAGS_DEBUG} ${CFLAGS_DEBUG}
63-
debug: LDFLAGS += ${LDFLAGS_DEBUG}
6468
debug: CPPFLAGS += ${CPPFLAGS_DEBUG}
69+
debug: CFLAGS += ${CFLAGS_DEBUG}
70+
debug: LDFLAGS += ${LDFLAGS_DEBUG}
6571
debug: all
6672

6773
-include $(DEPS)
6874

6975
${OBJ} ${TEST_OBJ}: Makefile config.mk
7076

77+
src/dunst.o: src/dunst.c
78+
${CC} -o $@ -c $< ${CPPFLAGS} ${CFLAGS} \
79+
-D_CCDATE="$(shell date '+%Y-%m-%d')" -D_CFLAGS="$(filter-out $(filter -I%,${INCS}),${CFLAGS})" -D_LDFLAGS="${LDFLAGS}"
80+
7181
%.o: %.c
72-
${CC} -o $@ -c $< ${CFLAGS}
82+
${CC} -o $@ -c $< ${CPPFLAGS} ${CFLAGS}
7383

7484
dunst: ${OBJ} main.o
7585
${CC} -o ${@} ${OBJ} main.o ${CFLAGS} ${LDFLAGS}
7686

7787
ifneq (0,${DUNSTIFY})
7888
all: dunstify
7989
dunstify: dunstify.o
80-
${CC} -o ${@} dunstify.o ${CFLAGS} ${LDFLAGS}
90+
${CC} -o ${@} dunstify.o ${DUNSTIFY_CFLAGS} ${DUNSTIFY_LDFLAGS}
8191
endif
8292

83-
.PHONY: test test-valgrind test-coverage
93+
.PHONY: test test-valgrind test-coverage functional-tests
8494
test: test/test clean-coverage-run
8595
# Make sure an error code is returned when the test fails
8696
/usr/bin/env bash -c 'set -euo pipefail;\
87-
./test/test -v | ./test/greenest.awk '
97+
TESTDIR=./test ./test/test -v | ./test/greenest.awk '
8898

8999
test-valgrind: test/test
90-
${VALGRIND} \
100+
TESTDIR=./test ${VALGRIND} \
91101
--suppressions=.valgrind.suppressions \
92102
--track-origins=yes \
93103
--leak-check=full \
@@ -110,13 +120,16 @@ test-coverage-report: test-coverage
110120
-o docs/internal/coverage/index.html
111121

112122
test/%.o: test/%.c src/%.c
113-
${CC} -o $@ -c $< ${CFLAGS}
123+
${CC} -o $@ -c $< ${CFLAGS} ${CPPFLAGS}
114124

115125
test/test: ${OBJ} ${TEST_OBJ}
116126
${CC} -o ${@} ${TEST_OBJ} $(filter-out ${TEST_OBJ:test/%=src/%},${OBJ}) ${CFLAGS} ${LDFLAGS}
117127

128+
functional-tests: dunst dunstify
129+
PREFIX=. ./test/functional-tests/test.sh
130+
118131
.PHONY: doc doc-doxygen
119-
doc: docs/dunst.1 docs/dunst.5 docs/dunstctl.1
132+
doc: docs/dunst.1 docs/dunst.5 docs/dunstctl.1 docs/dunstify.1
120133

121134
# Can't dedup this as we need to explicitly provide the name and title text to
122135
# pod2man :(
@@ -126,6 +139,8 @@ docs/dunst.5: docs/dunst.5.pod
126139
${POD2MAN} --name=dunst -c "Dunst Reference" --section=5 --release=${VERSION} $< > $@
127140
docs/dunstctl.1: docs/dunstctl.pod
128141
${POD2MAN} --name=dunstctl -c "dunstctl reference" --section=1 --release=${VERSION} $< > $@
142+
docs/dunstify.1: docs/dunstify.pod
143+
${POD2MAN} --name=dunstify -c "dunstify reference" --section=1 --release=${VERSION} $< > $@
129144

130145
doc-doxygen:
131146
${DOXYGEN} docs/internal/Doxyfile
@@ -183,6 +198,7 @@ clean-doc:
183198
rm -f docs/dunst.1
184199
rm -f docs/dunst.5
185200
rm -f docs/dunstctl.1
201+
rm -f docs/dunstify.1
186202
rm -fr docs/internal/html
187203
rm -fr docs/internal/coverage
188204

@@ -204,14 +220,15 @@ clean-wayland-protocols:
204220
install-service install-service-dbus install-service-systemd \
205221
uninstall uninstall-dunstctl uninstall-dunstrc \
206222
uninstall-service uninstall-service-dbus uninstall-service-systemd \
207-
uninstall-keepconf uninstall-purge
223+
uninstall-keepconf uninstall-purge
208224
install: install-dunst install-dunstctl install-dunstrc install-service
209225

210226
install-dunst: dunst doc
211227
install -Dm755 dunst ${DESTDIR}${BINDIR}/dunst
212228
install -Dm644 docs/dunst.1 ${DESTDIR}${MANPREFIX}/man1/dunst.1
213229
install -Dm644 docs/dunst.5 ${DESTDIR}${MANPREFIX}/man5/dunst.5
214230
install -Dm644 docs/dunstctl.1 ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
231+
install -Dm644 docs/dunstify.1 ${DESTDIR}${MANPREFIX}/man1/dunstify.1
215232

216233
install-dunstctl: dunstctl
217234
install -Dm755 dunstctl ${DESTDIR}${BINDIR}/dunstctl
@@ -243,13 +260,13 @@ install-completions:
243260
install -Dm644 completions/dunstctl.bashcomp ${DESTDIR}${BASHCOMPLETIONDIR}/dunstctl
244261
install -Dm644 completions/_dunst.zshcomp ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunst
245262
install -Dm644 completions/_dunstctl.zshcomp ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunstctl
246-
install -Dm644 completions/dunst.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunst
247-
install -Dm644 completions/dunstctl.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstctl
263+
install -Dm644 completions/dunst.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunst.fish
264+
install -Dm644 completions/dunstctl.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstctl.fish
248265

249266
ifneq (0,${DUNSTIFY})
250267
install: install-completions-dunstify
251268
install-completions-dunstify:
252-
install -Dm644 completions/dunstify.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstify
269+
install -Dm644 completions/dunstify.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstify.fish
253270
endif
254271
endif
255272

@@ -261,6 +278,7 @@ uninstall-keepconf: uninstall-service uninstall-dunstctl uninstall-completions
261278
rm -f ${DESTDIR}${MANPREFIX}/man1/dunst.1
262279
rm -f ${DESTDIR}${MANPREFIX}/man5/dunst.5
263280
rm -f ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
281+
rm -f ${DESTDIR}${MANPREFIX}/man1/dunstify.1
264282

265283
uninstall-dunstrc:
266284
rm -f ${DESTDIR}${SYSCONFFILE}
@@ -284,6 +302,6 @@ uninstall-completions:
284302
rm -f ${DESTDIR}${BASHCOMPLETIONDIR}/dunstctl
285303
rm -f ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunst
286304
rm -f ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunstctl
287-
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunst
288-
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunstctl
289-
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunstify
305+
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunst.fish
306+
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunstctl.fish
307+
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunstify.fish

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,13 @@ distro's repositories, don't worry, it's not hard to build it yourself.
9090
- libxss
9191
- glib
9292
- pango/cairo
93+
- gdk-pixbuf
9394
- libnotify (can build without, for dunstify, see [make parameters](#make-parameters))
9495
- wayland-client (can build without, see [make parameters](#make-parameters))
9596
- wayland-protocols (optional, for recompiling protocols)
9697
- xdg-utils (optional, xdg-open is the default 'browser' for opening URLs)
98+
- jq (optional, for installed completions and tools in contrib)
99+
- busctl (optional, for dunstctl rules and dunstctl history)
97100

98101
The names will be different depending on your [distribution](https://github.com/dunst-project/dunst/wiki/Dependencies).
99102

RELEASE_NOTES

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
===================================================================================
2+
Release Notes For v1.12.0
3+
===================================================================================
4+
5+
There have been many important contributions in the last few months.
6+
Some notable changes are: adding hot-reload for the configuration, exporting
7+
rules via dunstctl, adding color gradients, removing default hard-coded icons.
8+
For detailed information consult the changelog.
9+
10+
Important notice for all users:
11+
12+
The behaviour of the setting `height` has been changed in a breaking way.
13+
Before you could specify a single value that would be used as the max height
14+
of a notification. In this release the dynamic height was implemented to make
15+
this settings behave more similarly to `width`.
16+
Now the values accepted are either a single number (for a *fixed height*) or
17+
a tuple of numbers (for a min/max range).
18+
19+
The way of specifying a maximum height before was:
20+
height = 300
21+
22+
The equivalent way now is:
23+
height = (0, 300)
24+
25+
Furthermore the preferred syntax for the `offset` settings has been changed
26+
from NxN to (N,N). The old syntax is supported nevertheless.
27+
28+
If you are a maintainer it would be helpful to include the message above when
29+
an user updates from an older version of dunst.
30+
31+
Take a look at the changelog for all the bug fixes and improvements.
32+
133
===================================================================================
234
Release Notes For v1.11.0
335
===================================================================================

completions/_dunstctl.zshcomp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
#compdef _dunstctl dunstctl
22

3-
# ZSH arguments completion script for the dunstctl commnd
3+
# ZSH arguments completion script for the dunstctl command
44
# Depends on: gAWK (rule), jq (history-pop)
55

66
local curcontext="$curcontext" ret=1
77
local -a state line subs
88

9-
local DUNSTRC="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
10-
119
_arguments -C \
1210
'1:cmd:->cmds' \
1311
'2:opt:->opts' \
@@ -19,19 +17,21 @@ case $state in
1917
local -a commands
2018
commands=(
2119
'action:Perform the default action, or open the context menu of the notification at the given position'
22-
'close:Close the last notification'
23-
'close-all:Close the all notifications'
20+
'close:Close the last notification or optionally the notification with given ID'
21+
'close-all:Close all the notifications'
2422
'context:Open context menu'
2523
'count:Show the number of notifications'
2624
'history:Display notification history (in JSON)'
27-
'history-pop:Pop the latest notification from history or optionally the notification with given ID.'
28-
'is-paused:Check if dunst is running or paused'
25+
'history-pop:Pop the latest notification from history or optionally the notification with given ID'
26+
'is-paused:Check if pause level is greater than 0'
2927
'set-paused:Set the pause status'
30-
'get-pause-level:Get current dunst's pause level'
31-
'set-pause-level:Set current dunst's pause level'
28+
'get-pause-level:Get the current pause level'
29+
'set-pause-level:Set the pause level'
3230
'rule:Enable or disable a rule by its name'
31+
'rules:Displays configured rules'
32+
'reload:Reload the settings of the running instance, optionally with specific configuration files'
3333
'debug:Print debugging information'
34-
'help:Show this help'
34+
'help:Show help'
3535
)
3636
_describe commands commands && ret=0
3737
;;
@@ -63,7 +63,7 @@ case $state in
6363
rule)
6464
local -a rules;
6565
rules=(
66-
`awk '/^\[.*\]/{ if ( match($0, /^\[global|urgency|experimental/) == 0 ) { print substr($0, 2, length($0)-2) } }' < "$DUNSTRC"`
66+
`dunstctl rules --json | jq -r '.data[][].name.data'`
6767
)
6868
_describe rules_opts rules && ret=0
6969
;;

completions/dunst.bashcomp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ _dunst() {
55
opts='-v -version --version -verbosity -conf -config -print --print -startup_notification --startup_notification -h -help --help'
66

77
case "$prev" in
8-
-verbosity) COMPREPLY=("crit" "warn" "mesg" "info" "debug")
8+
-verbosity) COMPREPLY=( $( compgen -W 'crit warn mesg info debug' -- "$cur") )
99
return ;;
1010
-conf|--config) _filedir
1111
return ;;

completions/dunstctl.bashcomp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
_dunstctl() {
2-
local opts cur prev split=false
3-
local DUNSTRC=${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc
2+
local opts cur prev
43
_get_comp_words_by_ref cur prev
54
COMPREPLY=()
6-
opts='action close close-all context count debug help history history-clear history-pop history-rm is-paused rule set-paused'
5+
opts='action close close-all context count debug help history history-clear history-pop history-rm is-paused rule rules set-paused get-pause-level set-pause-level reload'
76

87
case "$prev" in
9-
count) COMPREPLY=('displayed' 'history' 'waiting')
8+
count) COMPREPLY=( $( compgen -W 'displayed history waiting' -- "$cur" ) )
109
return ;;
11-
set-paused) COMPREPLY=('true' 'false' 'toggle')
10+
set-paused) COMPREPLY=( $( compgen -W 'true false toggle' -- "$cur" ) )
1211
return ;;
1312
history-pop|history-rm)
14-
COMPREPLY=( $(dunstctl history | grep -A2 '"id" :' |
15-
awk '/"data" :/{print $3}' | sort -u) )
13+
COMPREPLY=( $( compgen -W "$(dunstctl history | jq -r '.data[][].id.data')" -- "$cur" ) )
1614
return ;;
1715
rule)
18-
COMPREPLY=( $(awk \
19-
'/^\[.*\]/{ if ( match($0, /^\[global|experimental/) == 0 ) print substr($0, 2, length($0)-2) }' "$DUNSTRC" ) )
16+
COMPREPLY=( $( compgen -W "$(dunstctl rules --json | jq -r '.data[][].name.data')" -- "$cur" ) )
17+
return ;;
18+
rules)
19+
COMPREPLY=( $( compgen -W "--json" -- "$cur" ) )
2020
return ;;
2121
esac
2222

2323
case "${COMP_WORDS[1]}" in
24-
rule) COMPREPLY=('enabled' 'disable' 'toggle')
24+
rule) COMPREPLY=( $( compgen -W 'enable disable toggle' -- "$cur" ) )
2525
return ;;
2626
esac
2727

0 commit comments

Comments
 (0)