Skip to content

Commit d179f3c

Browse files
Sven PüschelSven Püschel
Sven Püschel
authored and
Sven Püschel
committed
improve indentations
dunst has a mix of indentation styles. Try to improve it by making it consistent in files with mixed tab/space indentation styles. While this also changes the generated manpages slightly, it makes it more consistent accross the man page and probably won't be noticed by the reader.
1 parent 834069a commit d179f3c

File tree

10 files changed

+66
-66
lines changed

10 files changed

+66
-66
lines changed

HACKING.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ documentation for this can be found at https://github.com/dunst-project/docker-i
7777
# Comments
7878

7979
- Comment system is held similar to JavaDoc
80-
- Use `@param` to describe all input parameters
81-
- Use `@return` to describe the output value
82-
- Use `@retval` to describe special return values (like `NULL`)
83-
- Documentation comments should start with a double star (`/**`)
84-
- Append `()` to function names and prepend variables with `#` to properly reference them in the docs
80+
- Use `@param` to describe all input parameters
81+
- Use `@return` to describe the output value
82+
- Use `@retval` to describe special return values (like `NULL`)
83+
- Documentation comments should start with a double star (`/**`)
84+
- Append `()` to function names and prepend variables with `#` to properly reference them in the docs
8585
- Add comments to all functions and methods
8686
- Markdown inside the comments is allowed and also desired
8787
- Add the comments to the prototype. Doxygen will merge the protoype and implementation documentation anyways.
@@ -104,21 +104,21 @@ documentation for this can be found at https://github.com/dunst-project/docker-i
104104
For logging, there are printf-like macros `LOG_(E|C|W|M|I|D)`.
105105

106106
- `LOG_E` (ERROR):
107-
- All messages, which lead to immediate abort and are caused by a programming error. The program needs patching and the error is not user recoverable.
108-
- e.g.: Switching over an enum, `LOG_E` would go into the default case.
107+
- All messages, which lead to immediate abort and are caused by a programming error. The program needs patching and the error is not user recoverable.
108+
- e.g.: Switching over an enum, `LOG_E` would go into the default case.
109109
- `LOG_C` (CRITICAL):
110-
- The program cannot continue to work. It is used in the wrong manner or some outer conditions are not met.
111-
- e.g.: `-config` parameter value is unreadable file
110+
- The program cannot continue to work. It is used in the wrong manner or some outer conditions are not met.
111+
- e.g.: `-config` parameter value is unreadable file
112112
- `DIE` (CRITICAL):
113-
- A shorthand for `LOG_C` and terminating the program after. This does not dump the core (unlike `LOG_E`).
113+
- A shorthand for `LOG_C` and terminating the program after. This does not dump the core (unlike `LOG_E`).
114114
- `LOG_W` (WARNING):
115-
- Something is not in shape, but it's recoverable.
116-
- e.g.: A value is not parsable in the config file, which will default.
115+
- Something is not in shape, but it's recoverable.
116+
- e.g.: A value is not parsable in the config file, which will default.
117117
- `LOG_M` (MESSAGE):
118-
- Important info, which informs about the state.
119-
- e.g.: An empty notification does get removed immediately.
118+
- Important info, which informs about the state.
119+
- e.g.: An empty notification does get removed immediately.
120120
- `LOG_I` (INFO):
121-
- Mostly unneccessary info, but important to debug (as the user) some use cases.
122-
- e.g.: print the notification contents after arriving
121+
- Mostly unneccessary info, but important to debug (as the user) some use cases.
122+
- e.g.: print the notification contents after arriving
123123
- `LOG_D` (DEBUG):
124-
- Only important during development or tracing some bugs (as the developer).
124+
- Only important during development or tracing some bugs (as the developer).

Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ ${OBJ} ${TEST_OBJ}: Makefile config.mk
7676

7777
DATE_FMT = +%Y-%m-%d
7878
ifdef SOURCE_DATE_EPOCH
79-
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
79+
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
8080
else
81-
BUILD_DATE ?= $(shell date "$(DATE_FMT)")
81+
BUILD_DATE ?= $(shell date "$(DATE_FMT)")
8282
endif
8383
src/dunst.o: src/dunst.c
8484
${CC} -o $@ -c $< ${CPPFLAGS} ${CFLAGS} \
@@ -224,10 +224,10 @@ clean-wayland-protocols:
224224
rm -f src/wayland/protocols/*.h
225225

226226
.PHONY: install install-dunst install-dunstctl install-dunstrc \
227-
install-service install-service-dbus install-service-systemd \
228-
uninstall uninstall-dunstctl uninstall-dunstrc \
229-
uninstall-service uninstall-service-dbus uninstall-service-systemd \
230-
uninstall-keepconf uninstall-purge
227+
install-service install-service-dbus install-service-systemd \
228+
uninstall uninstall-dunstctl uninstall-dunstrc \
229+
uninstall-service uninstall-service-dbus uninstall-service-systemd \
230+
uninstall-keepconf uninstall-purge
231231
install: install-dunst install-dunstctl install-dunstrc install-service
232232

233233
install-dunst: dunst doc

completions/_dunstctl.zshcomp

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ case $state in
7171
;;
7272

7373
history-pop)
74-
local -a history_ids;
75-
history_ids=(
76-
`dunstctl history | jq -M '.data[0][].id.data'`
77-
)
74+
local -a history_ids;
75+
history_ids=(
76+
`dunstctl history | jq -M '.data[0][].id.data'`
77+
)
7878
_describe history_ids history_ids && ret=0
7979
;;
8080

docs/dunst.1.pod.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ See dunst(5) for the list of accepted hints.
111111

112112
Some examples:
113113

114-
notify-send -h string:fgcolor:#ff4444
114+
notify-send -h string:fgcolor:#ff4444
115115

116-
notify-send -h string:bgcolor:#4444ff -h string:fgcolor:#ff4444 -h string:frcolor:#44ff44
116+
notify-send -h string:bgcolor:#4444ff -h string:fgcolor:#ff4444 -h string:frcolor:#44ff44
117117

118-
notify-send -h int:value:42 "Working ..."
118+
notify-send -h int:value:42 "Working ..."
119119

120120
=head1 MISCELLANEOUS
121121

docs/dunst.5.pod

+4-4
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ You may also specify a transparency component by using the format #RGBA or #RRGG
11221122
B<NOTE>: '#' is interpreted as a comment, to use it the entire value needs to be quoted.
11231123
For example:
11241124

1125-
separator_color="#123456"
1125+
separator_color="#123456"
11261126

11271127
=head1 NOTIFY-SEND HINTS
11281128

@@ -1183,11 +1183,11 @@ The transient value.
11831183

11841184
Some examples:
11851185

1186-
notify-send -h string:fgcolor:#ff4444
1186+
notify-send -h string:fgcolor:#ff4444
11871187

1188-
notify-send -h string:bgcolor:#4444ff -h string:fgcolor:#ff4444 -h string:frcolor:#44ff44
1188+
notify-send -h string:bgcolor:#4444ff -h string:fgcolor:#ff4444 -h string:frcolor:#44ff44
11891189

1190-
notify-send -h int:value:42 "Working ..."
1190+
notify-send -h int:value:42 "Working ..."
11911191

11921192
=head1 ACTIONS
11931193

src/settings.h

+20-20
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,32 @@ enum mouse_action { MOUSE_NONE, MOUSE_DO_ACTION, MOUSE_CLOSE_CURRENT,
4040
#define ZWLR_LAYER_SHELL_V1_LAYER_ENUM
4141
// Needed for compiling without wayland dependency
4242
enum zwlr_layer_shell_v1_layer {
43-
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND = 0,
44-
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM = 1,
45-
ZWLR_LAYER_SHELL_V1_LAYER_TOP = 2,
46-
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY = 3,
43+
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND = 0,
44+
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM = 1,
45+
ZWLR_LAYER_SHELL_V1_LAYER_TOP = 2,
46+
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY = 3,
4747
};
4848
#endif /* ZWLR_LAYER_SHELL_V1_LAYER_ENUM */
4949

5050
#ifndef ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM
5151
#define ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM
5252
enum zwlr_layer_surface_v1_anchor {
53-
/**
54-
* the top edge of the anchor rectangle
55-
*/
56-
ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP = 1,
57-
/**
58-
* the bottom edge of the anchor rectangle
59-
*/
60-
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM = 2,
61-
/**
62-
* the left edge of the anchor rectangle
63-
*/
64-
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT = 4,
65-
/**
66-
* the right edge of the anchor rectangle
67-
*/
68-
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT = 8,
53+
/**
54+
* the top edge of the anchor rectangle
55+
*/
56+
ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP = 1,
57+
/**
58+
* the bottom edge of the anchor rectangle
59+
*/
60+
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM = 2,
61+
/**
62+
* the left edge of the anchor rectangle
63+
*/
64+
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT = 4,
65+
/**
66+
* the right edge of the anchor rectangle
67+
*/
68+
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT = 8,
6969
};
7070
#endif /* ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM */
7171

src/wayland/wl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ bool wl_have_fullscreen_window(void) {
684684
output_name = current_output->global_name;
685685

686686
struct toplevel_v1 *toplevel;
687-
wl_list_for_each(toplevel, &toplevel_list, link) {
687+
wl_list_for_each(toplevel, &toplevel_list, link) {
688688
if (!(toplevel->current.state & TOPLEVEL_STATE_FULLSCREEN &&
689689
toplevel->current.state &
690690
TOPLEVEL_STATE_ACTIVATED))

test/draw.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ struct length get_small_max_height(void)
7777
// by notification content
7878
// future tests targeting dynamic sizing logic could be added
7979
// to address this limitation
80-
struct length height = { 0, 10 };
81-
return height;
80+
struct length height = { 0, 10 };
81+
return height;
8282
}
8383

8484
int get_expected_dimension_height(int layout_count, int height)
@@ -293,7 +293,7 @@ TEST test_calculate_dimensions_height_min(void)
293293
{
294294
struct length original_height = settings.height;
295295
bool orginal_gap_size = settings.gap_size;
296-
// NOTE: Should be big enough to fit the notification nicely
296+
// NOTE: Should be big enough to fit the notification nicely
297297
settings.height.min = 100;
298298
settings.height.max = 200;
299299
settings.gap_size = 0;

test/functional-tests/test.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ function keypress {
1616
}
1717

1818
function tmp_dunstrc {
19-
cp "$TESTDIR/$1" "$TESTDIR/dunstrc.tmp"
20-
echo -e "\n$2" >> "$TESTDIR/dunstrc.tmp"
19+
cp "$TESTDIR/$1" "$TESTDIR/dunstrc.tmp"
20+
echo -e "\n$2" >> "$TESTDIR/dunstrc.tmp"
2121
}
2222

2323
function tmp_clean {
2424
rm "$TESTDIR/dunstrc.tmp"
2525
}
2626

2727
function start_dunst {
28-
killall dunst 2>/dev/null
29-
$DUNST -config "$TESTDIR/$1" &
30-
sleep 0.05
28+
killall dunst 2>/dev/null
29+
$DUNST -config "$TESTDIR/$1" &
30+
sleep 0.05
3131
}
3232

3333
function basic_notifications {

test/test-install.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ export SERVICEDIR_SYSTEMD="/systemd"
1414
export SERVICEDIR_DBUS="/dbus"
1515

1616
do_make() { # for convenience/conciseness
17-
make -C "${BASE}" "$@"
17+
make -C "${BASE}" "$@"
1818
}
1919

2020
check_dest() {
21-
# Check file list given on stdin and see if all are actually present
22-
diff -u <(find "${DESTDIR}" -type f -printf "%P\n" | sort) <(sort -)
21+
# Check file list given on stdin and see if all are actually present
22+
diff -u <(find "${DESTDIR}" -type f -printf "%P\n" | sort) <(sort -)
2323
}
2424

2525
do_make install

0 commit comments

Comments
 (0)