11#ifndef DUNST_SETTING_DATA_H
12#define DUNST_SETTING_DATA_H
15#include <pango/pango-layout.h>
93 int (*
parser)(
const void* data,
const char *cfg_value,
void* ret);
146static const struct rule empty_rule = {
155 .match_dbus_timeout = -1,
157 .override_dbus_timeout = -1,
159 .markup = MARKUP_NULL,
160 .history_ignore = -1,
161 .match_transient = -1,
170 .default_icon = NULL,
178 .progress_bar_alignment = -1,
182 .override_pause_level = -1
186#ifndef ZWLR_LAYER_SHELL_V1_LAYER_ENUM
187#define ZWLR_LAYER_SHELL_V1_LAYER_ENUM
189const enum zwlr_layer_shell_v1_layer {
190 ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND = 0,
191 ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM = 1,
192 ZWLR_LAYER_SHELL_V1_LAYER_TOP = 2,
193 ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY = 3,
204#define ENUM_END {NULL, 0}
206 {
"critical", G_LOG_LEVEL_CRITICAL },
207 {
"crit", G_LOG_LEVEL_CRITICAL },
208 {
"warning", G_LOG_LEVEL_WARNING },
209 {
"warn", G_LOG_LEVEL_WARNING },
210 {
"message", G_LOG_LEVEL_MESSAGE },
211 {
"mesg", G_LOG_LEVEL_MESSAGE },
212 {
"info", G_LOG_LEVEL_INFO },
213 {
"debug", G_LOG_LEVEL_DEBUG },
214 {
"deb", G_LOG_LEVEL_DEBUG },
241 {
"True", SORT_TYPE_URGENCY_DESCENDING },
242 {
"true", SORT_TYPE_URGENCY_DESCENDING },
243 {
"On", SORT_TYPE_URGENCY_DESCENDING },
244 {
"on", SORT_TYPE_URGENCY_DESCENDING },
245 {
"Yes", SORT_TYPE_URGENCY_DESCENDING },
246 {
"yes", SORT_TYPE_URGENCY_DESCENDING },
247 {
"1", SORT_TYPE_URGENCY_DESCENDING },
248 {
"False", SORT_TYPE_ID },
249 {
"false", SORT_TYPE_ID },
250 {
"Off", SORT_TYPE_ID },
251 {
"off", SORT_TYPE_ID },
252 {
"No", SORT_TYPE_ID },
253 {
"no", SORT_TYPE_ID },
254 {
"0", SORT_TYPE_ID },
255 {
"n", SORT_TYPE_ID },
256 {
"y", SORT_TYPE_ID },
257 {
"N", SORT_TYPE_ID },
258 {
"Y", SORT_TYPE_URGENCY_DESCENDING },
259 {
"id", SORT_TYPE_ID},
260 {
"urgency_ascending", SORT_TYPE_URGENCY_ASCENDING },
261 {
"urgency_descending", SORT_TYPE_URGENCY_DESCENDING },
262 {
"update", SORT_TYPE_UPDATE },
267 {
"left", PANGO_ALIGN_LEFT },
268 {
"center", PANGO_ALIGN_CENTER },
269 {
"right", PANGO_ALIGN_RIGHT },
274 {
"start", PANGO_ELLIPSIZE_START },
275 {
"middle", PANGO_ELLIPSIZE_MIDDLE },
276 {
"end", PANGO_ELLIPSIZE_END },
281 {
"mouse", FOLLOW_MOUSE },
282 {
"keyboard", FOLLOW_KEYBOARD },
283 {
"none", FOLLOW_NONE },
295 {
"left", ICON_LEFT },
296 {
"right", ICON_RIGHT },
303 {
"top", VERTICAL_TOP },
304 {
"center", VERTICAL_CENTER },
305 {
"bottom", VERTICAL_BOTTOM },
310 {
"strip", MARKUP_STRIP },
312 {
"full", MARKUP_FULL },
313 {
"yes", MARKUP_FULL },
318 {
"none", MOUSE_NONE },
319 {
"do_action", MOUSE_DO_ACTION },
320 {
"close_current", MOUSE_CLOSE_CURRENT },
321 {
"close_all", MOUSE_CLOSE_ALL },
322 {
"context", MOUSE_CONTEXT },
323 {
"context_all", MOUSE_CONTEXT_ALL },
324 {
"open_url", MOUSE_OPEN_URL },
325 {
"remove_current", MOUSE_REMOVE_CURRENT },
331 {
"foreground", SEP_FOREGROUND },
332 {
"frame", SEP_FRAME },
344 {
"bottom", ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM },
345 {
"top", ZWLR_LAYER_SHELL_V1_LAYER_TOP },
346 {
"overlay", ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY },
351 {
"top-left", ORIGIN_TOP_LEFT },
352 {
"top-center", ORIGIN_TOP_CENTER },
353 {
"top-right", ORIGIN_TOP_RIGHT },
354 {
"bottom-left", ORIGIN_BOTTOM_LEFT },
355 {
"bottom-center", ORIGIN_BOTTOM_CENTER },
356 {
"bottom-right", ORIGIN_BOTTOM_RIGHT },
357 {
"left-center", ORIGIN_LEFT_CENTER },
358 {
"right-center", ORIGIN_RIGHT_CENTER },
359 {
"center", ORIGIN_CENTER },
364 {
"top-left", C_TOP_LEFT },
365 {
"top-right", C_TOP_RIGHT },
366 {
"bottom-left", C_BOT_LEFT },
367 {
"bottom-right", C_BOT_RIGHT },
369 {
"right", C_RIGHT },
377static const struct setting allowed_settings[] = {
381 .section =
"urgency_low",
382 .description =
"Icon for notifications with low urgency",
391 .section =
"urgency_normal",
392 .description =
"Icon for notifications with normal urgency",
401 .section =
"urgency_critical",
402 .description =
"Icon for notifications with critical urgency",
413 .description =
"The name of the application as reported by the client. Be aware that the name can often differ depending on the locale used.",
415 .default_value =
"*",
419 .rule_offset = offsetof(
struct rule, appname),
424 .description =
"The body of the notification",
426 .default_value =
"*",
430 .rule_offset = offsetof(
struct rule, body),
435 .description =
"The category of the notification as defined by the notification spec. See https://specifications.freedesktop.org/notification-spec/latest/ar01s06.html",
437 .default_value =
"*",
441 .rule_offset = offsetof(
struct rule, category),
444 .name =
"desktop_entry",
446 .description =
"GLib based applications export their desktop-entry name. In comparison to the appname, the desktop-entry won't get localized.",
448 .default_value =
"*",
452 .rule_offset = offsetof(
struct rule, desktop_entry),
457 .description =
"The icon of the notification in the form of a file path. Can be empty if no icon is available or a raw icon is used instead.",
459 .default_value =
"*",
463 .rule_offset = offsetof(
struct rule, icon),
466 .name =
"match_transient",
468 .description =
"Match if the notification has been declared as transient by the client or by some other rule.",
470 .default_value =
"*",
472 .parser = string_parse_enum,
473 .parser_data = boolean_enum_data,
474 .rule_offset = offsetof(
struct rule, match_transient),
477 .name =
"msg_urgency",
479 .description =
"Matches the urgency of the notification as set by the client or by some other rule.",
481 .default_value =
"*",
483 .parser = string_parse_enum,
484 .parser_data = urgency_enum_data,
485 .rule_offset = offsetof(
struct rule, msg_urgency),
488 .name =
"match_dbus_timeout",
490 .description =
"Matches the dbus_timeout of the notification",
492 .default_value =
"*",
496 .rule_offset = offsetof(
struct rule, match_dbus_timeout),
501 .description =
"Matches the stack tag of the notification as set by the client or by some other rule.",
503 .default_value =
"*",
507 .rule_offset = offsetof(
struct rule, stack_tag),
512 .description =
"summary text of the notification",
514 .default_value =
"*",
518 .rule_offset = offsetof(
struct rule, summary),
525 .description =
"script",
527 .default_value =
"*",
531 .rule_offset = offsetof(
struct rule, script),
534 .name =
"background",
536 .description =
"The background color of the notification.",
538 .default_value =
"*",
542 .rule_offset = offsetof(
struct rule, bg),
545 .name =
"action_name",
547 .description =
"Sets the name of the action to be invoked on do_action.",
549 .default_value =
"*",
553 .rule_offset = offsetof(
struct rule, action_name),
556 .name =
"foreground",
558 .description =
"The foreground color of the notification.",
560 .default_value =
"*",
564 .rule_offset = offsetof(
struct rule, fg),
569 .description =
"The highlight color of the notification.",
570 .type = TYPE_GRADIENT,
571 .default_value =
"*",
575 .rule_offset = offsetof(
struct rule, highlight),
578 .name =
"default_icon",
580 .description =
"The default icon that is used when no icon is passed",
582 .default_value =
"*",
586 .rule_offset = offsetof(
struct rule, default_icon),
591 .description =
"The format template for the notifications",
593 .default_value =
"<b>%s</b>\n%b",
597 .rule_offset = offsetof(
struct rule, format),
600 .name =
"fullscreen",
602 .description =
"This attribute specifies how notifications are handled if a fullscreen window is focused. One of show, delay, or pushback.",
604 .default_value =
"show",
606 .parser = string_parse_enum,
607 .parser_data = fullscreen_enum_data,
608 .rule_offset = offsetof(
struct rule, fullscreen),
613 .description =
"Updates the icon of the notification, it should be a path to a valid image.",
615 .default_value =
"*",
619 .rule_offset = offsetof(
struct rule, new_icon),
622 .name =
"set_stack_tag",
624 .description =
"Sets the stack tag for the notification, notifications with the same (non-empty) stack tag will replace each-other so only the newest one is visible.",
626 .default_value =
"*",
630 .rule_offset = offsetof(
struct rule, set_stack_tag),
633 .name =
"set_transient",
635 .description =
"Sets whether the notification is considered transient. Transient notifications will bypass the idle_threshold setting.",
637 .default_value =
"*",
639 .parser = string_parse_enum,
640 .parser_data = boolean_enum_data,
641 .rule_offset = offsetof(
struct rule, set_transient),
644 .name =
"set_category",
646 .description =
"The category of the notification as defined by the notification spec. See https://specifications.freedesktop.org/notification-spec/latest/ar01s06.html",
648 .default_value =
"*",
652 .rule_offset = offsetof(
struct rule, set_category),
657 .description =
"Don't timeout notifications if user is longer idle than threshold",
659 .default_value =
"*",
663 .rule_offset = offsetof(
struct rule, timeout),
666 .name =
"override_dbus_timeout",
668 .description =
"Replace the dbus timeout with this value.",
670 .default_value =
"*",
674 .rule_offset = offsetof(
struct rule, override_dbus_timeout),
679 .description =
"This sets the notification urgency.",
681 .default_value =
"*",
683 .parser = string_parse_enum,
684 .parser_data = urgency_enum_data,
688 .name =
"skip_display",
690 .description =
"Setting this to true will prevent the notification from being displayed initially but will be saved in history for later viewing.",
692 .default_value =
"*",
694 .parser = string_parse_enum,
695 .parser_data = boolean_enum_data,
696 .rule_offset = offsetof(
struct rule, skip_display),
699 .name =
"history_ignore",
701 .description =
"Setting this to true will display the notification initially, but stop it from being recalled via the history.",
703 .default_value =
"*",
705 .parser = string_parse_enum,
706 .parser_data = boolean_enum_data,
707 .rule_offset = offsetof(
struct rule, history_ignore),
712 .description =
"Wrap long lines of text",
714 .default_value =
"*",
716 .parser = string_parse_enum,
717 .parser_data = boolean_enum_data,
718 .rule_offset = offsetof(
struct rule, word_wrap),
723 .description =
"Ellipsize truncated lines on the start/middle/end",
725 .default_value =
"*",
727 .parser = string_parse_enum,
728 .parser_data = ellipsize_enum_data,
729 .rule_offset = offsetof(
struct rule, ellipsize),
734 .description =
"Text alignment left/center/right",
736 .default_value =
"*",
738 .parser = string_parse_enum,
739 .parser_data = horizontal_alignment_enum_data,
740 .rule_offset = offsetof(
struct rule, alignment),
745 .description =
"Skip rendering summary and body text in notification window (keeps icon and progress bar)",
747 .default_value =
"*",
749 .parser = string_parse_enum,
750 .parser_data = boolean_enum_data,
751 .rule_offset = offsetof(
struct rule, hide_text),
756 .description =
"Specify how markup should be handled",
758 .default_value =
"*",
760 .parser = string_parse_enum,
761 .parser_data = markup_mode_enum_data,
762 .rule_offset = offsetof(
struct rule, markup),
765 .name =
"icon_position",
767 .description =
"Align icons left/right/top/off",
769 .default_value =
"*",
771 .parser = string_parse_enum,
772 .parser_data = icon_position_enum_data,
773 .rule_offset = offsetof(
struct rule, icon_position),
778 .description =
"Enable or disable a rule",
780 .default_value =
"true",
782 .parser = string_parse_bool,
783 .parser_data = boolean_enum_data,
784 .rule_offset = offsetof(
struct rule, enabled),
789 .description =
"Select the corners to round",
791 .default_value =
"all",
793 .parser = string_parse_corners,
794 .parser_data = corners_enum_data,
797 .name =
"progress_bar_corners",
799 .description =
"Select the corners to round for the progress bar",
801 .default_value =
"all",
802 .value = &
settings.progress_bar_corners,
803 .parser = string_parse_corners,
804 .parser_data = corners_enum_data,
807 .name =
"icon_corners",
809 .description =
"Select the corners to round for the icon image",
811 .default_value =
"all",
813 .parser = string_parse_corners,
814 .parser_data = corners_enum_data,
817 .name =
"progress_bar_horizontal_alignment",
819 .description =
"Set the horizontal alignment of the progress bar",
821 .default_value =
"center",
823 .parser = string_parse_enum,
824 .parser_data = horizontal_alignment_enum_data,
825 .rule_offset = offsetof(
struct rule, progress_bar_alignment),
828 .name =
"min_icon_size",
830 .description =
"Scale smaller icons up to this size, set to 0 to disable. If max_icon_size also specified, that has the final say.",
832 .default_value =
"*",
836 .rule_offset = offsetof(
struct rule, min_icon_size),
839 .name =
"max_icon_size",
841 .description =
"Scale larger icons down to this size, set to 0 to disable",
843 .default_value =
"*",
847 .rule_offset = offsetof(
struct rule, max_icon_size),
850 .name =
"override_pause_level",
852 .description =
"TODO",
854 .default_value =
"-1",
858 .rule_offset = offsetof(
struct rule, override_pause_level),
864 .name =
"frame_color",
866 .description =
"Color of the frame around the window",
868 .default_value =
"#888888",
872 .rule_offset = offsetof(
struct rule, fc),
875 .name =
"per_monitor_dpi",
876 .section =
"experimental",
877 .description =
"Use a different DPI per monitor",
879 .default_value =
"false",
881 .parser = string_parse_bool,
882 .parser_data = boolean_enum_data,
885 .name =
"force_xinerama",
887 .description =
"Force the use of the Xinerama extension",
889 .default_value =
"false",
891 .parser = string_parse_bool,
892 .parser_data = boolean_enum_data,
895 .name =
"force_xwayland",
897 .description =
"Force the use of the xwayland output",
899 .default_value =
"false",
901 .parser = string_parse_bool,
902 .parser_data = boolean_enum_data,
907 .description =
"The font dunst should use.",
909 .default_value =
"Monospace 8",
917 .description =
"Sort type by id/urgency/update",
919 .default_value =
"true",
921 .parser = string_parse_enum,
922 .parser_data = sort_type_enum_data,
925 .name =
"indicate_hidden",
927 .description =
"Show how many notifications are hidden",
929 .default_value =
"true",
931 .parser = string_parse_enum,
932 .parser_data = boolean_enum_data,
935 .name =
"ignore_dbusclose",
937 .description =
"Ignore dbus CloseNotification events",
939 .default_value =
"false",
940 .value = &
settings.ignore_dbusclose,
941 .parser = string_parse_enum,
942 .parser_data = boolean_enum_data,
945 .name =
"ignore_newline",
947 .description =
"Ignore newline characters in notifications",
949 .default_value =
"false",
951 .parser = string_parse_enum,
952 .parser_data = boolean_enum_data,
955 .name =
"idle_threshold",
957 .description =
"Don't timeout notifications if user is longer idle than threshold",
959 .default_value =
"0",
967 .description =
"On which monitor should the notifications be displayed",
969 .default_value =
"0",
972 .parser_data = &
settings.monitor_num,
977 .description =
"Define the title of windows spawned by dunst.",
979 .default_value =
"Dunst",
987 .description =
"Define the class of windows spawned by dunst.",
989 .default_value =
"Dunst",
997 .description =
"Shrink window if it's smaller than the width",
999 .default_value =
"false",
1001 .parser = string_parse_enum,
1002 .parser_data = boolean_enum_data,
1005 .name =
"line_height",
1006 .section =
"global",
1007 .description =
"Add spacing between lines of text",
1009 .default_value =
"0",
1012 .parser_data = NULL,
1015 .name =
"show_age_threshold",
1016 .section =
"global",
1017 .description =
"When should the age of the notification be displayed?",
1019 .default_value =
"60",
1020 .value = &
settings.show_age_threshold,
1022 .parser_data = NULL,
1025 .name =
"hide_duplicate_count",
1026 .section =
"global",
1027 .description =
"Hide the count of stacked notifications with the same content",
1028 .type = TYPE_CUSTOM,
1029 .default_value =
"false",
1030 .value = &
settings.hide_duplicate_count,
1031 .parser = string_parse_bool,
1032 .parser_data = boolean_enum_data,
1035 .name =
"sticky_history",
1036 .section =
"global",
1037 .description =
"Don't timeout notifications popped up from history",
1038 .type = TYPE_CUSTOM,
1039 .default_value =
"true",
1041 .parser = string_parse_enum,
1042 .parser_data = boolean_enum_data,
1045 .name =
"history_length",
1046 .section =
"global",
1047 .description =
"Max amount of notifications kept in history",
1049 .default_value =
"20",
1052 .parser_data = NULL,
1055 .name =
"show_indicators",
1056 .section =
"global",
1057 .description =
"Show indicators for actions \"(A)\" and URLs \"(U)\"",
1058 .type = TYPE_CUSTOM,
1059 .default_value =
"true",
1060 .value = &
settings.show_indicators,
1061 .parser = string_parse_enum,
1062 .parser_data = boolean_enum_data,
1065 .name =
"separator_height",
1066 .section =
"global",
1067 .description =
"height of the separator line",
1069 .default_value =
"2",
1070 .value = &
settings.separator_height,
1072 .parser_data = NULL,
1076 .section =
"global",
1077 .description =
"Padding between text and separator",
1079 .default_value =
"8",
1082 .parser_data = NULL,
1085 .name =
"horizontal_padding",
1086 .section =
"global",
1087 .description =
"horizontal padding",
1089 .default_value =
"8",
1092 .parser_data = NULL,
1095 .name =
"text_icon_padding",
1096 .section =
"global",
1097 .description =
"Padding between text and icon",
1099 .default_value =
"0",
1100 .value = &
settings.text_icon_padding,
1102 .parser_data = NULL,
1105 .name =
"transparency",
1106 .section =
"global",
1107 .description =
"Transparency. Range 0-100",
1109 .default_value =
"0",
1112 .parser_data = NULL,
1115 .name =
"corner_radius",
1116 .section =
"global",
1117 .description =
"Window corner radius",
1119 .default_value =
"0",
1122 .parser_data = NULL,
1125 .name =
"progress_bar_height",
1126 .section =
"global",
1127 .description =
"Height of the progress bar",
1129 .default_value =
"10",
1130 .value = &
settings.progress_bar_height,
1132 .parser_data = NULL,
1135 .name =
"progress_bar_min_width",
1136 .section =
"global",
1137 .description =
"Minimum width of the progress bar",
1139 .default_value =
"150",
1140 .value = &
settings.progress_bar_min_width,
1142 .parser_data = NULL,
1145 .name =
"progress_bar_max_width",
1146 .section =
"global",
1147 .description =
"Maximum width of the progress bar",
1149 .default_value =
"300",
1150 .value = &
settings.progress_bar_max_width,
1152 .parser_data = NULL,
1155 .name =
"progress_bar_frame_width",
1156 .section =
"global",
1157 .description =
"Frame width of the progress bar",
1159 .default_value =
"1",
1160 .value = &
settings.progress_bar_frame_width,
1162 .parser_data = NULL,
1165 .name =
"progress_bar_corner_radius",
1166 .section =
"global",
1167 .description =
"Progress bar corner radius",
1169 .default_value =
"0",
1170 .value = &
settings.progress_bar_corner_radius,
1172 .parser_data = NULL,
1175 .name =
"icon_corner_radius",
1176 .section =
"global",
1177 .description =
"Icon corner radius",
1179 .default_value =
"0",
1180 .value = &
settings.icon_corner_radius,
1182 .parser_data = NULL,
1185 .name =
"progress_bar",
1186 .section =
"global",
1187 .description =
"Show the progress bar",
1188 .type = TYPE_CUSTOM,
1189 .default_value =
"true",
1191 .parser = string_parse_bool,
1192 .parser_data = boolean_enum_data,
1195 .name =
"stack_duplicates",
1196 .section =
"global",
1197 .description =
"Stack together notifications with the same content",
1198 .type = TYPE_CUSTOM,
1199 .default_value =
"true",
1200 .value = &
settings.stack_duplicates,
1201 .parser = string_parse_bool,
1202 .parser_data = boolean_enum_data,
1206 .section =
"global",
1207 .description =
"path to dmenu",
1209 .default_value =
"/usr/bin/dmenu -p dunst",
1212 .parser_data = &
settings.dmenu_cmd,
1216 .section =
"global",
1217 .description =
"path to browser",
1219 .default_value =
"/usr/bin/xdg-open",
1222 .parser_data = &
settings.browser_cmd,
1225 .name =
"always_run_script",
1226 .section =
"global",
1227 .description =
"Always run rule-defined scripts, even if the notification is suppressed with format = \"\".",
1228 .type = TYPE_CUSTOM,
1229 .default_value =
"true",
1230 .value = &
settings.always_run_script,
1231 .parser = string_parse_bool,
1232 .parser_data = boolean_enum_data,
1236 .section =
"global",
1237 .description =
"Size of gap between notifications",
1239 .default_value =
"0",
1242 .parser_data = NULL,
1245 .name =
"default_pause_level",
1246 .section =
"global",
1247 .description =
"Start dunst with a this pause level set.",
1249 .default_value =
"0",
1250 .value = &
settings.default_pause_level,
1252 .parser_data = NULL,
1255 .name =
"pause_on_mouse_over",
1256 .section =
"experimental",
1257 .description =
"Pause notification timeout when mouse is over the notification window. Only works on Wayland.",
1258 .type = TYPE_CUSTOM,
1259 .default_value =
"false",
1260 .value = &
settings.pause_on_mouse_over,
1261 .parser = string_parse_bool,
1262 .parser_data = boolean_enum_data,
1267 .section =
"global",
1268 .description =
"Follow mouse, keyboard or none?",
1269 .type = TYPE_CUSTOM,
1270 .default_value =
"none",
1272 .parser = string_parse_enum,
1273 .parser_data = follow_mode_enum_data,
1277 .section =
"global",
1278 .description =
"Scale factor, set to 0 to auto-detect, X11 only",
1279 .type = TYPE_DOUBLE,
1280 .default_value =
"0",
1283 .parser_data = NULL,
1286 .name =
"separator_color",
1287 .section =
"global",
1288 .description =
"Color of the separator line (or 'auto')",
1289 .type = TYPE_CUSTOM,
1290 .default_value =
"frame",
1292 .parser = string_parse_sepcolor,
1293 .parser_data = sep_color_enum_data,
1296 .name =
"vertical_alignment",
1297 .section =
"global",
1298 .description =
"Align icon and text top/center/bottom",
1299 .type = TYPE_CUSTOM,
1300 .default_value =
"center",
1301 .value = &
settings.vertical_alignment,
1302 .parser = string_parse_enum,
1303 .parser_data = vertical_alignment_enum_data,
1307 .section =
"global",
1308 .description =
"Select the layer where notifications should be placed",
1309 .type = TYPE_CUSTOM,
1310 .default_value =
"overlay",
1312 .parser = string_parse_enum,
1313 .parser_data = layer_enum_data,
1316 .name =
"mouse_left_click",
1317 .section =
"global",
1318 .description =
"Action of left click event",
1320 .default_value =
"close_current",
1321 .value = &
settings.mouse_left_click,
1323 .parser_data = GINT_TO_POINTER(MOUSE_LIST),
1326 .name =
"mouse_middle_click",
1327 .section =
"global",
1328 .description =
"Action of middle click event",
1330 .default_value =
"do_action, remove_current",
1331 .value = &
settings.mouse_middle_click,
1333 .parser_data = GINT_TO_POINTER(MOUSE_LIST),
1336 .name =
"mouse_right_click",
1337 .section =
"global",
1338 .description =
"Action of right click event",
1340 .default_value =
"close_all",
1341 .value = &
settings.mouse_right_click,
1343 .parser_data = GINT_TO_POINTER(MOUSE_LIST),
1346 .name =
"icon_theme",
1347 .section =
"global",
1348 .description =
"Name of the icon theme",
1350 .default_value =
"Adwaita",
1353 .parser_data = GINT_TO_POINTER(STRING_LIST),
1356 .name =
"icon_path",
1357 .section =
"global",
1358 .description =
"paths to default icons",
1359 .type = TYPE_STRING,
1360 .default_value =
"/usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/",
1363 .parser_data = NULL,
1366 .name =
"enable_recursive_icon_lookup",
1367 .section =
"global",
1368 .description =
"Name of the icon theme",
1369 .type = TYPE_CUSTOM,
1370 .default_value =
"false",
1371 .value = &
settings.enable_recursive_icon_lookup,
1372 .parser = string_parse_bool,
1373 .parser_data = boolean_enum_data,
1374 .different_default =
true,
1377 .name =
"enable_posix_regex",
1378 .section =
"global",
1379 .description =
"Enable POSIX regex for filtering rules",
1380 .type = TYPE_CUSTOM,
1381 .default_value =
"false",
1383 .parser = string_parse_bool,
1384 .parser_data = boolean_enum_data,
1387 .name =
"frame_width",
1388 .section =
"global",
1389 .description =
"Width of frame around the window",
1391 .default_value =
"3",
1394 .parser_data = NULL,
1401 .name =
"background",
1402 .section =
"urgency_low",
1403 .description =
"Background color for notifications with low urgency",
1405 .default_value =
"#222222",
1408 .parser_data = NULL,
1411 .name =
"foreground",
1412 .section =
"urgency_low",
1413 .description =
"Foreground color for notifications with low urgency",
1415 .default_value =
"#888888",
1418 .parser_data = NULL,
1421 .name =
"highlight",
1422 .section =
"urgency_low",
1423 .description =
"Highlight color for notifications with low urgency",
1424 .type = TYPE_GRADIENT,
1425 .default_value =
"#7f7fff",
1426 .value = &
settings.colors_low.highlight,
1428 .parser_data = NULL,
1431 .name =
"frame_color",
1432 .section =
"urgency_low",
1433 .description =
"Frame color for notifications with low urgency",
1435 .default_value =
"#888888",
1436 .value = &
settings.colors_low.frame,
1438 .parser_data = NULL,
1442 .section =
"urgency_low",
1443 .description =
"Timeout for notifications with low urgency",
1445 .default_value =
"10",
1448 .parser_data = NULL,
1451 .name =
"background",
1452 .section =
"urgency_normal",
1453 .description =
"Background color for notifications with normal urgency",
1455 .default_value =
"#285577",
1458 .parser_data = NULL,
1461 .name =
"foreground",
1462 .section =
"urgency_normal",
1463 .description =
"Foreground color for notifications with normal urgency",
1465 .default_value =
"#ffffff",
1468 .parser_data = NULL,
1471 .name =
"highlight",
1472 .section =
"urgency_normal",
1473 .description =
"Highlight color for notifications with normal urgency",
1474 .type = TYPE_GRADIENT,
1475 .default_value =
"#1745d1",
1476 .value = &
settings.colors_norm.highlight,
1478 .parser_data = NULL,
1481 .name =
"frame_color",
1482 .section =
"urgency_normal",
1483 .description =
"Frame color for notifications with normal urgency",
1485 .default_value =
"#888888",
1486 .value = &
settings.colors_norm.frame,
1488 .parser_data = NULL,
1492 .section =
"urgency_normal",
1493 .description =
"Timeout for notifications with normal urgency",
1495 .default_value =
"10",
1498 .parser_data = NULL,
1501 .name =
"background",
1502 .section =
"urgency_critical",
1503 .description =
"Background color for notifications with critical urgency",
1505 .default_value =
"#900000",
1508 .parser_data = NULL,
1511 .name =
"foreground",
1512 .section =
"urgency_critical",
1513 .description =
"Foreground color for notifications with ciritical urgency",
1515 .default_value =
"#ffffff",
1518 .parser_data = NULL,
1521 .name =
"highlight",
1522 .section =
"urgency_critical",
1523 .description =
"Highlight color for notifications with ciritical urgency",
1524 .type = TYPE_GRADIENT,
1525 .default_value =
"#ff6666",
1526 .value = &
settings.colors_crit.highlight,
1528 .parser_data = NULL,
1531 .name =
"frame_color",
1532 .section =
"urgency_critical",
1533 .description =
"Frame color for notifications with critical urgency",
1535 .default_value =
"#ff0000",
1536 .value = &
settings.colors_crit.frame,
1538 .parser_data = NULL,
1542 .section =
"urgency_critical",
1543 .description =
"Timeout for notifications with critical urgency",
1545 .default_value =
"0",
1548 .parser_data = NULL,
1552 .section =
"global",
1553 .description =
"Specifies the where the notification is positioned before offsetting.",
1554 .type = TYPE_CUSTOM,
1555 .default_value =
"top-right",
1557 .parser = string_parse_enum,
1558 .parser_data = origin_enum_data,
1562 .section =
"global",
1563 .description =
"The width of the notification, excluding the frame.",
1564 .type = TYPE_LENGTH,
1565 .default_value =
"300",
1568 .parser_data = NULL,
1572 .section =
"global",
1573 .description =
"The height of a notification, excluding the frame.",
1574 .type = TYPE_LENGTH,
1575 .default_value =
"(0, 300)",
1578 .parser_data = NULL,
1582 .section =
"global",
1583 .description =
"The offset of the notification from the origin.",
1584 .type = TYPE_LENGTH,
1585 .default_value =
"(10, 50)",
1588 .parser_data = NULL,
1591 .name =
"notification_limit",
1592 .section =
"global",
1593 .description =
"Maximum number of notifications allowed",
1595 .default_value =
"20",
1596 .value = &
settings.notification_limit,
1598 .parser_data = NULL,
1604 .section =
"global",
1605 .description =
"Shortcut for closing one notification",
1606 .type = TYPE_STRING,
1607 .default_value =
"none",
1610 .parser_data = NULL,
1613 .name =
"close_all",
1614 .section =
"global",
1615 .description =
"Shortcut for closing all notifications",
1616 .type = TYPE_STRING,
1617 .default_value =
"none",
1618 .value = &
settings.close_all_ks.str,
1620 .parser_data = NULL,
1624 .section =
"global",
1625 .description =
"Shortcut to pop the last notification from history",
1626 .type = TYPE_STRING,
1627 .default_value =
"none",
1630 .parser_data = NULL,
1634 .section =
"global",
1635 .description =
"Shortcut for context menu",
1636 .type = TYPE_STRING,
1637 .default_value =
"none",
1640 .parser_data = NULL,
urgency
Representing the urgencies according to the notification spec.
@ URG_NONE
Urgency not set (invalid)
@ URG_NORM
Normal urgency.
@ URG_CRIT
Critical urgency.
@ FS_SHOW
Show the message when in fullscreen mode.
@ FS_PUSHBACK
When entering fullscreen mode, push the notification back to waiting.
@ FS_DELAY
Delay the notification until leaving fullscreen mode.
int string_parse_maybe_int(const void *data, const char *s, void *ret)
Parse a string that may represent an integer value.
Parser for settings and cmdline arguments.
Rules managment and helpers.
Type definitions for settings.
void * value
(nullable) A pointer to the corresponding setting in the setting struct.
char * section
A string with the ini section where the variable is allowed.
char * name
A string with the setting key as found in the config file.
char * default_value
A string with the default value of the setting.
enum setting_type type
Enum of the setting type.
const void * parser_data
(nullable) A pointer to the data required for the parser to parse this setting.
size_t rule_offset
The offset of this setting in the rule struct, if it exists.
char * description
A string with a short description of the config variable.
bool different_default
True if a setting has a different default in the default dunstrc.
int(* parser)(const void *data, const char *cfg_value, void *ret)
(nullable) Function pointer for the parser - to be used in case of enums or other special settings.