mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-06-21 14:42:44 +00:00
Compare commits
83 Commits
v0.5
..
f19301ef68
| Author | SHA1 | Date | |
|---|---|---|---|
| f19301ef68 | |||
| dd00d994ce | |||
| f7154d539d | |||
| 3a95d4ed03 | |||
| 2b171fd501 | |||
| ea33ce9ae6 | |||
| 8006e79200 | |||
| 5ae245beed | |||
| 089480e0b6 | |||
| 3c98c4c24d | |||
| 298949bbc4 | |||
| 17c5cbbf7b | |||
| 45e3694fc8 | |||
| 5c936efc42 | |||
| 9830a991ff | |||
| 863634a61c | |||
| ac6074f4fd | |||
| 433385f7f1 | |||
| 26d7c9689f | |||
| 6c8be38ec4 | |||
| 417e37f988 | |||
| a1f3e25c35 | |||
| 0151bd48dd | |||
| 337d6ba3fb | |||
| ec557f253b | |||
| fd263041a0 | |||
| a73afc66ab | |||
| f5b046ce9e | |||
| 6340989c8e | |||
| 25e34e4d0c | |||
| f3c4f72314 | |||
| 6cbf8e9b80 | |||
| d13015381b | |||
| e277d84c51 | |||
| 1f0afcfc28 | |||
| 23fd312409 | |||
| e39d931430 | |||
| 396840cdf2 | |||
| a71b368483 | |||
| 7afdc191fe | |||
| 023efce6eb | |||
| fa660fb61e | |||
| 9a84789ff1 | |||
| 49bfe92703 | |||
| c88960751d | |||
| 9c5bdcfbe8 | |||
| 1884a07646 | |||
| 79c51a4584 | |||
| f5d839844d | |||
| e03896b4d6 | |||
| e7e84b1083 | |||
| 9694477b2f | |||
| 6a15167754 | |||
| e5e2d1c28f | |||
| bdbfb45d66 | |||
| 50ea84c5f6 | |||
| 472a31b5a4 | |||
| a760757b82 | |||
| 80c9ad12ba | |||
| 7341d047da | |||
| be2a1dea26 | |||
| 393078d80c | |||
| 28ec843aee | |||
| 2b3504e439 | |||
| 5f7d396996 | |||
| 901d2e2d9d | |||
| 00e867d536 | |||
| 2e29189b92 | |||
| 43f31b8f1b | |||
| ff39cac355 | |||
| 2e4fdc1664 | |||
| b100b446b8 | |||
| 9cb1ece6cc | |||
| 01a237bd5c | |||
| a5e068b20a | |||
| 39f4ee564b | |||
| a353eee2ca | |||
| 66ec028b00 | |||
| 1f10e69b4c | |||
| 922e117fc5 | |||
| 2783e82bf8 | |||
| 66ef4ecfec | |||
| d08e6a3a7e |
@@ -0,0 +1,62 @@
|
|||||||
|
name: Bug Report
|
||||||
|
about: Something in dwl isn't working correctly
|
||||||
|
title:
|
||||||
|
labels:
|
||||||
|
- 'Kind/Bug'
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
- Only report bugs that can be reproduced on the main (or wlroots-next) branch without patches.
|
||||||
|
- Proprietary graphics drivers, including nvidia, are not supported. Please use the open source equivalents, such as nouveau, if you would like to use dwl.
|
||||||
|
- Report patch issues to their respective authors.
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: dwl_version
|
||||||
|
attributes:
|
||||||
|
label: 'dwl version:'
|
||||||
|
placeholder: '`dwl -v`'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: wlroots_version
|
||||||
|
attributes:
|
||||||
|
label: 'wlroots version:'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: distro
|
||||||
|
attributes:
|
||||||
|
label: What distro (and version) are you using?
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
value: |
|
||||||
|
The steps you took to reproduce the problem.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: debug_log
|
||||||
|
attributes:
|
||||||
|
label: Debug Log
|
||||||
|
value: |
|
||||||
|
Run `dwl -d 2> ~/dwl.log` from a TTY and attach the **full** (do not truncate it) file here, or upload it to a pastebin.
|
||||||
|
Please try to keep the reproduction as brief as possible and exit dwl.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: backtrace
|
||||||
|
attributes:
|
||||||
|
label: Stack Trace
|
||||||
|
value: |
|
||||||
|
- Only required if dwl crashes.
|
||||||
|
- If the lines mentioning dwl or wlroots have `??`. Please compile both dwl and wlroots from source (enabling debug symbols) and try to reproduce.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
name: Enhancement idea
|
||||||
|
about: Suggest a feature or improvement
|
||||||
|
title:
|
||||||
|
labels:
|
||||||
|
- 'Kind/Feature'
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Something in dwl isn't working correctly
|
|
||||||
title: ''
|
|
||||||
labels: 'A: bug'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Info
|
|
||||||
dwl version:
|
|
||||||
wlroots version:
|
|
||||||
## Description
|
|
||||||
<!--
|
|
||||||
Only report bugs that can be reproduced on the main line
|
|
||||||
Report patch issues to their respective authors
|
|
||||||
-->
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
name: Enhancement idea
|
|
||||||
about: Suggest a feature or improvement
|
|
||||||
title: ''
|
|
||||||
labels: 'A: enhancement'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
* [Unreleased](#unreleased)
|
||||||
* [0.5](#0.5)
|
* [0.5](#0.5)
|
||||||
|
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
### Added
|
||||||
|
### Changed
|
||||||
|
### Deprecated
|
||||||
|
### Removed
|
||||||
|
### Fixed
|
||||||
|
### Security
|
||||||
|
### Contributors
|
||||||
|
|
||||||
|
|
||||||
## 0.5
|
## 0.5
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ include config.mk
|
|||||||
|
|
||||||
# flags for compiling
|
# flags for compiling
|
||||||
DWLCPPFLAGS = -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XWAYLAND)
|
DWLCPPFLAGS = -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XWAYLAND)
|
||||||
DWLDEVCFLAGS = -g -pedantic -Wall -Wextra -Wdeclaration-after-statement -Wno-unused-parameter -Wno-sign-compare -Wshadow -Wunused-macros\
|
DWLDEVCFLAGS = -g -pedantic -Wall -Wextra -Wdeclaration-after-statement -Wno-unused-parameter -Wshadow -Wunused-macros\
|
||||||
-Werror=strict-prototypes -Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types
|
-Werror=strict-prototypes -Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types -Wfloat-conversion
|
||||||
|
|
||||||
# CFLAGS / LDFLAGS
|
# CFLAGS / LDFLAGS
|
||||||
PKGS = wlroots wayland-server xkbcommon libinput $(XLIBS)
|
PKGS = wlroots wayland-server xkbcommon libinput $(XLIBS)
|
||||||
@@ -16,7 +16,7 @@ LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS)
|
|||||||
all: dwl
|
all: dwl
|
||||||
dwl: dwl.o util.o
|
dwl: dwl.o util.o
|
||||||
$(CC) dwl.o util.o $(LDLIBS) $(LDFLAGS) $(DWLCFLAGS) -o $@
|
$(CC) dwl.o util.o $(LDLIBS) $(LDFLAGS) $(DWLCFLAGS) -o $@
|
||||||
dwl.o: dwl.c config.mk config.h client.h cursor-shape-v1-protocol.h xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
|
dwl.o: dwl.c config.mk config.h client.h cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h
|
||||||
util.o: util.c util.h
|
util.o: util.c util.h
|
||||||
|
|
||||||
# wayland-scanner is a tool which generates C headers and rigging for Wayland
|
# wayland-scanner is a tool which generates C headers and rigging for Wayland
|
||||||
@@ -25,15 +25,18 @@ util.o: util.c util.h
|
|||||||
WAYLAND_SCANNER = `$(PKG_CONFIG) --variable=wayland_scanner wayland-scanner`
|
WAYLAND_SCANNER = `$(PKG_CONFIG) --variable=wayland_scanner wayland-scanner`
|
||||||
WAYLAND_PROTOCOLS = `$(PKG_CONFIG) --variable=pkgdatadir wayland-protocols`
|
WAYLAND_PROTOCOLS = `$(PKG_CONFIG) --variable=pkgdatadir wayland-protocols`
|
||||||
|
|
||||||
xdg-shell-protocol.h:
|
|
||||||
$(WAYLAND_SCANNER) server-header \
|
|
||||||
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
|
|
||||||
wlr-layer-shell-unstable-v1-protocol.h:
|
|
||||||
$(WAYLAND_SCANNER) server-header \
|
|
||||||
protocols/wlr-layer-shell-unstable-v1.xml $@
|
|
||||||
cursor-shape-v1-protocol.h:
|
cursor-shape-v1-protocol.h:
|
||||||
$(WAYLAND_SCANNER) server-header \
|
$(WAYLAND_SCANNER) server-header \
|
||||||
$(WAYLAND_PROTOCOLS)/staging/cursor-shape/cursor-shape-v1.xml $@
|
$(WAYLAND_PROTOCOLS)/staging/cursor-shape/cursor-shape-v1.xml $@
|
||||||
|
pointer-constraints-unstable-v1-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) server-header \
|
||||||
|
$(WAYLAND_PROTOCOLS)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml $@
|
||||||
|
wlr-layer-shell-unstable-v1-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) server-header \
|
||||||
|
protocols/wlr-layer-shell-unstable-v1.xml $@
|
||||||
|
xdg-shell-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) server-header \
|
||||||
|
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
|
||||||
|
|
||||||
config.h:
|
config.h:
|
||||||
cp config.def.h $@
|
cp config.def.h $@
|
||||||
@@ -42,7 +45,7 @@ clean:
|
|||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
mkdir -p dwl-$(VERSION)
|
mkdir -p dwl-$(VERSION)
|
||||||
cp -R LICENSE* Makefile README.md client.h config.def.h\
|
cp -R LICENSE* Makefile CHANGELOG.md README.md client.h config.def.h\
|
||||||
config.mk protocols dwl.1 dwl.c util.c util.h dwl.desktop\
|
config.mk protocols dwl.1 dwl.c util.c util.h dwl.desktop\
|
||||||
dwl-$(VERSION)
|
dwl-$(VERSION)
|
||||||
tar -caf dwl-$(VERSION).tar.gz dwl-$(VERSION)
|
tar -caf dwl-$(VERSION).tar.gz dwl-$(VERSION)
|
||||||
|
|||||||
@@ -5,12 +5,11 @@ Or on our [Discord server].
|
|||||||
|
|
||||||
dwl is a compact, hackable compositor for [Wayland] based on [wlroots]. It is
|
dwl is a compact, hackable compositor for [Wayland] based on [wlroots]. It is
|
||||||
intended to fill the same space in the Wayland world that dwm does in X11,
|
intended to fill the same space in the Wayland world that dwm does in X11,
|
||||||
primarily in terms of philosophy, and secondarily in terms of functionality.
|
primarily in terms of functionality, and secondarily in terms of philosophy.
|
||||||
Like dwm, dwl is:
|
Like dwm, dwl is:
|
||||||
|
|
||||||
- Easy to understand, hack on, and extend with patches
|
- Easy to understand, hack on, and extend with patches
|
||||||
- One C source file (or a very small number) configurable via `config.h`
|
- One C source file (or a very small number) configurable via `config.h`
|
||||||
- Limited to 2200 SLOC to promote hackability
|
|
||||||
- Tied to as few external dependencies as possible
|
- Tied to as few external dependencies as possible
|
||||||
|
|
||||||
dwl is not meant to provide every feature under the sun. Instead, like dwm, it
|
dwl is not meant to provide every feature under the sun. Instead, like dwm, it
|
||||||
@@ -34,12 +33,18 @@ given the base on which it is built. Implemented default features are:
|
|||||||
- Layer shell popups (used by Waybar)
|
- Layer shell popups (used by Waybar)
|
||||||
- Damage tracking provided by scenegraph API
|
- Damage tracking provided by scenegraph API
|
||||||
|
|
||||||
|
Given the Wayland architecture, dwl has to implement features from dwm **and**
|
||||||
|
the xorg-server. Because of this, it is impossible to maintain the original
|
||||||
|
project goal of 2000 SLOC and have a reasonably complete compositor with
|
||||||
|
features comparable to dwm. However, this does not mean that the code will grow
|
||||||
|
indiscriminately. We will try to keep the code as small as possible.
|
||||||
|
|
||||||
Features under consideration (possibly as patches) are:
|
Features under consideration (possibly as patches) are:
|
||||||
|
|
||||||
- Protocols made trivial by wlroots
|
- Protocols made trivial by wlroots
|
||||||
- Implement the text-input and input-method protocols to support IME once ibus
|
- Implement the text-input and input-method protocols to support IME once ibus
|
||||||
implements input-method v2 (see https://github.com/ibus/ibus/pull/2256 and
|
implements input-method v2 (see https://github.com/ibus/ibus/pull/2256 and
|
||||||
https://github.com/djpohly/dwl/pull/235)
|
https://codeberg.org/dwl/dwl/pulls/235)
|
||||||
|
|
||||||
Feature *non-goals* for the main codebase include:
|
Feature *non-goals* for the main codebase include:
|
||||||
|
|
||||||
@@ -81,7 +86,7 @@ Wayland without restarting the entire display server, so any changes will take
|
|||||||
effect the next time dwl is executed.
|
effect the next time dwl is executed.
|
||||||
|
|
||||||
As in the dwm community, we encourage users to share patches they have created.
|
As in the dwm community, we encourage users to share patches they have created.
|
||||||
Check out the [patches page on our wiki]!
|
Check out the dwl [patches repository] and [patches wiki]!
|
||||||
|
|
||||||
## Running dwl
|
## Running dwl
|
||||||
|
|
||||||
@@ -105,7 +110,7 @@ shell command using `/bin/sh -c`. It serves a similar function to `.xinitrc`,
|
|||||||
but differs in that the display server will not shut down when this process
|
but differs in that the display server will not shut down when this process
|
||||||
terminates. Instead, dwl will send this process a SIGTERM at shutdown and wait
|
terminates. Instead, dwl will send this process a SIGTERM at shutdown and wait
|
||||||
for it to terminate (if it hasn't already). This makes it ideal for execing into
|
for it to terminate (if it hasn't already). This makes it ideal for execing into
|
||||||
a user service manager like [s6], [anopa], [runit], or [`systemd --user`].
|
a user service manager like [s6], [anopa], [runit], [dinit], or [`systemd --user`].
|
||||||
|
|
||||||
Note: The `-s` command is run as a *child process* of dwl, which means that it
|
Note: The `-s` command is run as a *child process* of dwl, which means that it
|
||||||
does not have the ability to affect the environment of dwl or of any processes
|
does not have the ability to affect the environment of dwl or of any processes
|
||||||
@@ -152,6 +157,7 @@ possible.
|
|||||||
Many thanks to suckless.org and the dwm developers and community for the
|
Many thanks to suckless.org and the dwm developers and community for the
|
||||||
inspiration, and to the various contributors to the project, including:
|
inspiration, and to the various contributors to the project, including:
|
||||||
|
|
||||||
|
- **Devin J. Pohly for creating and nurturing the fledgling project**
|
||||||
- Alexander Courtis for the XWayland implementation
|
- Alexander Courtis for the XWayland implementation
|
||||||
- Guido Cella for the layer-shell protocol implementation, patch maintenance,
|
- Guido Cella for the layer-shell protocol implementation, patch maintenance,
|
||||||
and for helping to keep the project running
|
and for helping to keep the project running
|
||||||
@@ -162,12 +168,14 @@ inspiration, and to the various contributors to the project, including:
|
|||||||
[#dwl on Libera Chat]: https://web.libera.chat/?channels=#dwl
|
[#dwl on Libera Chat]: https://web.libera.chat/?channels=#dwl
|
||||||
[Wayland]: https://wayland.freedesktop.org/
|
[Wayland]: https://wayland.freedesktop.org/
|
||||||
[wlroots]: https://gitlab.freedesktop.org/wlroots/wlroots/
|
[wlroots]: https://gitlab.freedesktop.org/wlroots/wlroots/
|
||||||
[wlroots-next branch]: https://github.com/djpohly/dwl/tree/wlroots-next
|
[wlroots-next branch]: https://codeberg.org/dwl/dwl/src/branch/wlroots-next
|
||||||
[patches page on our wiki]: https://github.com/djpohly/dwl/wiki/Patches
|
[patches repository]: https://codeberg.org/dwl/dwl-patches
|
||||||
|
[patches wiki]: https://codeberg.org/dwl/dwl-patches/wiki
|
||||||
[s6]: https://skarnet.org/software/s6/
|
[s6]: https://skarnet.org/software/s6/
|
||||||
[anopa]: https://jjacky.com/anopa/
|
[anopa]: https://jjacky.com/anopa/
|
||||||
[runit]: http://smarden.org/runit/faq.html#userservices
|
[runit]: http://smarden.org/runit/faq.html#userservices
|
||||||
|
[dinit]: https://davmac.org/projects/dinit/
|
||||||
[`systemd --user`]: https://wiki.archlinux.org/title/Systemd/User
|
[`systemd --user`]: https://wiki.archlinux.org/title/Systemd/User
|
||||||
[wiki]: https://github.com/djpohly/dwl/wiki#compatible-status-bars
|
[wiki]: https://codeberg.org/dwl/dwl/wiki/Home#compatible-status-bars
|
||||||
[list of useful resources on our wiki]:
|
[list of useful resources on our wiki]:
|
||||||
https://github.com/djpohly/dwl/wiki#migrating-from-x
|
https://codeberg.org/dwl/dwl/wiki/Home#migrating-from-x
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ static inline int
|
|||||||
client_is_x11(Client *c)
|
client_is_x11(Client *c)
|
||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
return c->type == X11Managed || c->type == X11Unmanaged;
|
return c->type == X11;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -172,14 +172,29 @@ client_get_parent(Client *c)
|
|||||||
{
|
{
|
||||||
Client *p = NULL;
|
Client *p = NULL;
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c) && c->surface.xwayland->parent)
|
if (client_is_x11(c)) {
|
||||||
|
if (c->surface.xwayland->parent)
|
||||||
toplevel_from_wlr_surface(c->surface.xwayland->parent->surface, &p, NULL);
|
toplevel_from_wlr_surface(c->surface.xwayland->parent->surface, &p, NULL);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (c->surface.xdg->toplevel->parent)
|
if (c->surface.xdg->toplevel->parent)
|
||||||
toplevel_from_wlr_surface(c->surface.xdg->toplevel->parent->base->surface, &p, NULL);
|
toplevel_from_wlr_surface(c->surface.xdg->toplevel->parent->base->surface, &p, NULL);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
client_has_children(Client *c)
|
||||||
|
{
|
||||||
|
#ifdef XWAYLAND
|
||||||
|
if (client_is_x11(c))
|
||||||
|
return !wl_list_empty(&c->surface.xwayland->children);
|
||||||
|
#endif
|
||||||
|
/* surface.xdg->link is never empty because it always contains at least the
|
||||||
|
* surface itself. */
|
||||||
|
return wl_list_length(&c->surface.xdg->link) > 1;
|
||||||
|
}
|
||||||
|
|
||||||
static inline const char *
|
static inline const char *
|
||||||
client_get_title(Client *c)
|
client_get_title(Client *c)
|
||||||
{
|
{
|
||||||
@@ -270,7 +285,8 @@ static inline int
|
|||||||
client_is_unmanaged(Client *c)
|
client_is_unmanaged(Client *c)
|
||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
return c->type == X11Unmanaged;
|
if (client_is_x11(c))
|
||||||
|
return c->surface.xwayland->override_redirect;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -338,10 +354,10 @@ client_set_size(Client *c, uint32_t width, uint32_t height)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (width == c->surface.xdg->toplevel->current.width
|
if ((int32_t)width == c->surface.xdg->toplevel->current.width
|
||||||
&& height ==c->surface.xdg->toplevel->current.height)
|
&& (int32_t)height == c->surface.xdg->toplevel->current.height)
|
||||||
return 0;
|
return 0;
|
||||||
return wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, width, height);
|
return wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, (int32_t)width, (int32_t)height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
@@ -351,7 +367,7 @@ client_set_tiled(Client *c, uint32_t edges)
|
|||||||
if (client_is_x11(c))
|
if (client_is_x11(c))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
if (wl_resource_get_version(c->surface.xdg->resource)
|
if (wl_resource_get_version(c->surface.xdg->toplevel->resource)
|
||||||
>= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) {
|
>= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) {
|
||||||
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
|
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
|
||||||
} else {
|
} else {
|
||||||
@@ -363,10 +379,8 @@ static inline void
|
|||||||
client_set_suspended(Client *c, int suspended)
|
client_set_suspended(Client *c, int suspended)
|
||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c)) {
|
if (client_is_x11(c))
|
||||||
wlr_xwayland_surface_set_withdrawn(c->surface.xwayland, suspended);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wlr_xdg_toplevel_set_suspended(c->surface.xdg->toplevel, suspended);
|
wlr_xdg_toplevel_set_suspended(c->surface.xdg->toplevel, suspended);
|
||||||
|
|||||||
+13
-10
@@ -7,11 +7,13 @@
|
|||||||
static const int sloppyfocus = 1; /* focus follows mouse */
|
static const int sloppyfocus = 1; /* focus follows mouse */
|
||||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
|
static const float rootcolor[] = COLOR(0x222222ff);
|
||||||
static const float bordercolor[] = COLOR(0x444444ff);
|
static const float bordercolor[] = COLOR(0x444444ff);
|
||||||
static const float focuscolor[] = COLOR(0x005577ff);
|
static const float focuscolor[] = COLOR(0x005577ff);
|
||||||
static const float urgentcolor[] = COLOR(0xff0000ff);
|
static const float urgentcolor[] = COLOR(0xff0000ff);
|
||||||
/* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */
|
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
|
||||||
static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can also use glsl colors */
|
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */
|
||||||
|
|
||||||
/* tagging - TAGCOUNT must be no greater than 31 */
|
/* tagging - TAGCOUNT must be no greater than 31 */
|
||||||
#define TAGCOUNT (9)
|
#define TAGCOUNT (9)
|
||||||
@@ -21,10 +23,9 @@ static int log_level = WLR_ERROR;
|
|||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* app_id title tags mask isfloating monitor */
|
/* app_id title tags mask isfloating monitor */
|
||||||
/* examples:
|
/* examples: */
|
||||||
{ "Gimp", NULL, 0, 1, -1 },
|
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
||||||
*/
|
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
|
||||||
{ "firefox", NULL, 1 << 8, 0, -1 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* layout(s) */
|
/* layout(s) */
|
||||||
@@ -36,13 +37,14 @@ static const Layout layouts[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* monitors */
|
/* monitors */
|
||||||
|
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
|
||||||
static const MonitorRule monrules[] = {
|
static const MonitorRule monrules[] = {
|
||||||
/* name mfact nmaster scale layout rotate/reflect x y */
|
/* name mfact nmaster scale layout rotate/reflect x y */
|
||||||
/* example of a HiDPI laptop monitor:
|
/* example of a HiDPI laptop monitor:
|
||||||
{ "eDP-1", 0.5, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
*/
|
*/
|
||||||
/* defaults */
|
/* defaults */
|
||||||
{ NULL, 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* keyboard */
|
/* keyboard */
|
||||||
@@ -93,6 +95,7 @@ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
|
|||||||
*/
|
*/
|
||||||
static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE;
|
static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE;
|
||||||
static const double accel_speed = 0.0;
|
static const double accel_speed = 0.0;
|
||||||
|
|
||||||
/* You can choose between:
|
/* You can choose between:
|
||||||
LIBINPUT_CONFIG_TAP_MAP_LRM -- 1/2/3 finger tap maps to left/right/middle
|
LIBINPUT_CONFIG_TAP_MAP_LRM -- 1/2/3 finger tap maps to left/right/middle
|
||||||
LIBINPUT_CONFIG_TAP_MAP_LMR -- 1/2/3 finger tap maps to left/middle/right
|
LIBINPUT_CONFIG_TAP_MAP_LMR -- 1/2/3 finger tap maps to left/middle/right
|
||||||
@@ -124,8 +127,8 @@ static const Key keys[] = {
|
|||||||
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
|
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
|
||||||
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
|
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
|
||||||
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
|
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
|
||||||
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05} },
|
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
|
||||||
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} },
|
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
|
||||||
{ MODKEY, XKB_KEY_Return, zoom, {0} },
|
{ MODKEY, XKB_KEY_Return, zoom, {0} },
|
||||||
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
||||||
|
|||||||
Reference in New Issue
Block a user