Added option for forcing X11 on wayland.
Also added some more documentation.
This commit is contained in:
parent
836d044df8
commit
25e1d0c442
3
config.h
3
config.h
@ -48,6 +48,9 @@ struct settings defaults = {
|
|||||||
.notification_height = 0, /* if notification height < font height and padding, it will be raised */
|
.notification_height = 0, /* if notification height < font height and padding, it will be raised */
|
||||||
.corner_radius = 0,
|
.corner_radius = 0,
|
||||||
|
|
||||||
|
.force_xinerama = false,
|
||||||
|
.force_xwayland = false,
|
||||||
|
|
||||||
.separator_height = 2, /* height of the separator line between two notifications */
|
.separator_height = 2, /* height of the separator line between two notifications */
|
||||||
.padding = 0,
|
.padding = 0,
|
||||||
.h_padding = 0, /* horizontal padding */
|
.h_padding = 0, /* horizontal padding */
|
||||||
|
@ -82,6 +82,10 @@ starts at 0. See the B<follow> setting.
|
|||||||
Defines where the notifications should be placed in a multi-monitor setup. All
|
Defines where the notifications should be placed in a multi-monitor setup. All
|
||||||
values except I<none> override the B<monitor> setting.
|
values except I<none> override the B<monitor> setting.
|
||||||
|
|
||||||
|
On Wayland there is no difference between mouse and keyboard focus. When either
|
||||||
|
of the is used, the compositor will choose an output. This will generally be
|
||||||
|
the output last interacted with.
|
||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
|
||||||
=item B<none>
|
=item B<none>
|
||||||
@ -278,7 +282,7 @@ The bottom layer is below all windows and above the background.
|
|||||||
|
|
||||||
Default: top
|
Default: top
|
||||||
|
|
||||||
=item B<use_xwayland> (values: [true/false], default: false) (Wayland only)
|
=item B<force_xwayland> (values: [true/false], default: false) (Wayland only)
|
||||||
|
|
||||||
Force the use of X11 output, even on a wayland compositor. This setting
|
Force the use of X11 output, even on a wayland compositor. This setting
|
||||||
has no effect when not using a Wayland compositor.
|
has no effect when not using a Wayland compositor.
|
||||||
@ -569,7 +573,7 @@ the notification sent before the user defined timeout.
|
|||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Shortcut section B<DEPRECATED SEE DUNSTCTL>
|
=head2 Shortcut section B<DEPRECATED SEE DUNSTCTL> (X11 only)
|
||||||
|
|
||||||
Keyboard shortcuts are defined in the following format: "Modifier+key" where the
|
Keyboard shortcuts are defined in the following format: "Modifier+key" where the
|
||||||
modifier is one of ctrl,mod1,mod2,mod3,mod4 and key is any keyboard key.
|
modifier is one of ctrl,mod1,mod2,mod3,mod4 and key is any keyboard key.
|
||||||
@ -679,6 +683,29 @@ Past notifications are redisplayed in a first-in-last-out order, meaning that
|
|||||||
pressing the history key once will bring up the most recent notification that
|
pressing the history key once will bring up the most recent notification that
|
||||||
had been closed/timed out.
|
had been closed/timed out.
|
||||||
|
|
||||||
|
=head1 WAYLAND
|
||||||
|
|
||||||
|
Dunst has Wayland support since version 1.6.0. Because the Wayland protocol
|
||||||
|
is more focused on security, some things that are possible in X11 are not
|
||||||
|
possible in Wayland. Those differences are reflected in the configuration.
|
||||||
|
The main things that change are that dunst on Wayland cannot use global
|
||||||
|
hotkeys (they are deprecated anyways, use dunstctl) and it cannot detect
|
||||||
|
if an application is fullscreen. If you want to see notifications when in
|
||||||
|
fullscreen, set B<layer = overlay> in the global options.
|
||||||
|
|
||||||
|
Note that the same limitations exist when using xwayland.
|
||||||
|
If something doesn't quite work in Wayland, please file a bug report. In the
|
||||||
|
mean time, you can try if the X11 output does work on wayland. Use
|
||||||
|
B<force_xwayland = true> for that.
|
||||||
|
|
||||||
|
If you have your dunst notifications on the same side of your display as your
|
||||||
|
status bar, you might notice that your notifications appear a bit higher or
|
||||||
|
lower than on X11. This is because the notification cannot be placed on top of
|
||||||
|
your status bar. The notifications are placed relative to your status bar,
|
||||||
|
making them appear higher or lower by the height of your status bar. We cannot
|
||||||
|
do anything about that behavior, so you will need to change your B<geometry>
|
||||||
|
variable accordingly.
|
||||||
|
|
||||||
=head1 RULES
|
=head1 RULES
|
||||||
|
|
||||||
Rules allow the conditional modification of notifications. They are defined by
|
Rules allow the conditional modification of notifications. They are defined by
|
||||||
|
@ -48,7 +48,7 @@ PangoFontDescription *pango_fdesc;
|
|||||||
|
|
||||||
void draw_setup(void)
|
void draw_setup(void)
|
||||||
{
|
{
|
||||||
const struct output *out = output_create();
|
const struct output *out = output_create(settings.force_xwayland);
|
||||||
output = out;
|
output = out;
|
||||||
|
|
||||||
out->init();
|
out->init();
|
||||||
|
@ -55,9 +55,9 @@ const struct output output_wl = {
|
|||||||
wl_have_fullscreen_window
|
wl_have_fullscreen_window
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct output* output_create(void)
|
const struct output* output_create(bool force_xwayland)
|
||||||
{
|
{
|
||||||
if (is_running_wayland()) {
|
if (!force_xwayland && is_running_wayland()) {
|
||||||
LOG_I("Using Wayland output");
|
LOG_I("Using Wayland output");
|
||||||
return &output_wl;
|
return &output_wl;
|
||||||
} else {
|
} else {
|
||||||
|
@ -47,7 +47,7 @@ struct output {
|
|||||||
bool (*have_fullscreen_window)(void);
|
bool (*have_fullscreen_window)(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct output* output_create(void);
|
const struct output* output_create(bool force_xwayland);
|
||||||
|
|
||||||
const bool is_running_wayland(void);
|
const bool is_running_wayland(void);
|
||||||
|
|
||||||
|
@ -118,6 +118,12 @@ void load_settings(char *cmdline_config_path)
|
|||||||
"Force the use of the Xinerama extension"
|
"Force the use of the Xinerama extension"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
settings.force_xwayland = option_get_bool(
|
||||||
|
"global",
|
||||||
|
"force_xwayland", "-force_xwayland", false,
|
||||||
|
"Force the use of the xwayland output"
|
||||||
|
);
|
||||||
|
|
||||||
settings.font = option_get_string(
|
settings.font = option_get_string(
|
||||||
"global",
|
"global",
|
||||||
"font", "-font/-fn", defaults.font,
|
"font", "-font/-fn", defaults.font,
|
||||||
|
@ -90,6 +90,7 @@ struct settings {
|
|||||||
struct keyboard_shortcut history_ks;
|
struct keyboard_shortcut history_ks;
|
||||||
struct keyboard_shortcut context_ks;
|
struct keyboard_shortcut context_ks;
|
||||||
bool force_xinerama;
|
bool force_xinerama;
|
||||||
|
bool force_xwayland;
|
||||||
int corner_radius;
|
int corner_radius;
|
||||||
enum mouse_action *mouse_left_click;
|
enum mouse_action *mouse_left_click;
|
||||||
enum mouse_action *mouse_middle_click;
|
enum mouse_action *mouse_middle_click;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user