Skip to content

Commit

Permalink
settings: set the same defaults as before the refactor
Browse files Browse the repository at this point in the history
The only exception is not setting idle_threshold, since I don't think
many people want to use it and the docs say the default is 0.
  • Loading branch information
fwsmit committed Jun 6, 2021
1 parent 6f6b860 commit a7b65b2
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 114 deletions.
5 changes: 4 additions & 1 deletion docs/dunst.5.pod
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,14 @@ This is used mainly in order to have the shrinking benefit of dynamic width (see
geometry) while also having an upper bound on how long a notification can get
before wrapping.

=item B<transparency> (default: 0)
=item B<transparency> (default: 0) (X11 only)

A 0-100 range on how transparent the notification window should be, with 0
being fully opaque and 100 invisible.

To make windows transparent on wayland, set the transparency part of a color,
see COLORS.

This setting will only work if a compositor is running.

=item B<notification_height> (default: 0)
Expand Down
35 changes: 6 additions & 29 deletions dunstrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# See dunst(5) for all configuration options

[global]
### Display ###

Expand Down Expand Up @@ -31,7 +33,8 @@
# screen width minus the width defined in within the geometry option.
geometry = "300x5-30+20"

# Turn on the progess bar
# Turn on the progess bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true

# Set the progress bar height. This includes the frame, so make sure
Expand All @@ -57,7 +60,7 @@

# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
transparency = 0

# The height of the entire notification. If the height is smaller
Expand Down Expand Up @@ -102,7 +105,7 @@
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
idle_threshold = 120
# idle_threshold = 120

### Text ###

Expand Down Expand Up @@ -301,32 +304,6 @@
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false

# The internal keyboard shortcut support in dunst is now considered deprecated
# and should be replaced by dunstctl calls. You can use the configuration of your
# WM or DE to bind these to shortcuts of your choice.
# Check the dunstctl manual page for more info.
[shortcuts]

# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.

# Close notification. Equivalent dunstctl command:
# dunstctl close
# close = ctrl+space

# Close all notifications. Equivalent dunstctl command:
# dunstctl close-all
# close_all = ctrl+shift+space

# Redisplay last message(s). Equivalent dunstctl command:
# dunstctl history-pop
# history = ctrl+grave

# Context menu. Equivalent dunstctl command:
# dunstctl context
# context = ctrl+shift+period

[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
Expand Down
3 changes: 1 addition & 2 deletions src/option_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ int get_setting_id(const char *key, const char *section) {
}

if (error_code == -2) {
LOG_W("Setting %s is in the wrong section (%s, should be %s)", // TODO fix this warning
LOG_W("Setting %s is in the wrong section (%s, should be %s)",
key, section,
allowed_settings[partial_match_id].section);
// found, but in wrong section
Expand Down Expand Up @@ -352,7 +352,6 @@ bool set_setting(struct setting setting, char* value) {
LOG_D("Trying to set %s to %s", setting.name, value);
if (setting.value == NULL) {
// setting.value is NULL, so it must be only a rule
// TODO check this more thoroughly
return true;
}

Expand Down
1 change: 0 additions & 1 deletion src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ enum zwlr_layer_shell_v1_layer {
enum setting_type { TYPE_MIN = 0, TYPE_INT, TYPE_ENUM, TYPE_STRING, TYPE_BOOLEAN, TYPE_PATH,
TYPE_TIME, TYPE_GEOMETRY, TYPE_LIST, TYPE_SEP_COLOR,
TYPE_DEPRECATED, TYPE_MAX = TYPE_DEPRECATED + 1 }; // to be implemented
// TODO implement TYPE_MIN and TYPE_MAX properly

struct separator_color_data {
enum separator_color type;
Expand Down
Loading

0 comments on commit a7b65b2

Please sign in to comment.