Compare commits
164 Commits
07e03e9f5f
...
2b3504e439
Author | SHA1 | Date |
---|---|---|
Leonardo Hernández Hernández | 2b3504e439 | |
Leonardo Hernández Hernández | 5f7d396996 | |
Leonardo Hernández Hernández | 901d2e2d9d | |
Leonardo Hernández Hernández | 00e867d536 | |
Leonardo Hernández Hernández | 2e29189b92 | |
Leonardo Hernández Hernández | 43f31b8f1b | |
Leonardo Hernández Hernández | ff39cac355 | |
Leonardo Hernández Hernández | 2e4fdc1664 | |
Leonardo Hernández Hernández | b100b446b8 | |
Leonardo Hernández Hernández | 9cb1ece6cc | |
Leonardo Hernández Hernández | 01a237bd5c | |
Leonardo Hernández Hernández | a5e068b20a | |
Leonardo Hernández Hernández | 39f4ee564b | |
Leonardo Hernández Hernández | a353eee2ca | |
Leonardo Hernández Hernández | 66ec028b00 | |
Leonardo Hernández Hernández | 1f10e69b4c | |
Leonardo Hernández Hernández | 922e117fc5 | |
Leonardo Hernández Hernández | 2783e82bf8 | |
Squibid | 66ef4ecfec | |
Leonardo Hernández Hernández | d08e6a3a7e | |
Leonardo Hernández Hernández | f579dd8668 | |
Leonardo Hernández Hernández | 24576f1fdf | |
Leonardo Hernández Hernández | 7ac76219df | |
Leonardo Hernández Hernández | 6838f909bd | |
Leonardo Hernández Hernández | d2dd2f4986 | |
Leonardo Hernández Hernández | a0e79d8145 | |
Leonardo Hernández Hernández | 32e66f4582 | |
link2xt | b4da97446a | |
Leonardo Hernández Hernández | 2751a6195d | |
Leonardo Hernández Hernández | fcf324be6c | |
Leonardo Hernández Hernández | b8e933b9a9 | |
Leonardo Hernández Hernández | 1044a21555 | |
Leonardo Hernández Hernández | 6bcd5d8d87 | |
Leonardo Hernández Hernández | 7611dc91d7 | |
Leonardo Hernández Hernández | e95f14541a | |
Leonardo Hernández Hernández | bca1b779aa | |
Leonardo Hernández Hernández | 7bdbab0400 | |
Leonardo Hernández Hernández | dd25cdb56e | |
Leonardo Hernández Hernández | caac2d664d | |
Leonardo Hernández Hernández | b1740056d5 | |
Leonardo Hernández Hernández | 0067c76cab | |
Leonardo Hernández Hernández | 22d21676b0 | |
Leonardo Hernández Hernández | d6c102d9db | |
Leonardo Hernández Hernández | 0e897608a1 | |
Leonardo Hernández Hernández | 6d0ec595d3 | |
Leonardo Hernández Hernández | 4f4c540bb9 | |
Leonardo Hernández Hernández | 8e3f5364d3 | |
Leonardo Hernández Hernández | 2212363225 | |
Leonardo Hernández Hernández | 6f8a3f9374 | |
Leonardo Hernández Hernández | e1f3983bf8 | |
Leonardo Hernández Hernández | 31bf1cbaf6 | |
Leonardo Hernández Hernández | d6fabe3a15 | |
Leonardo Hernández Hernández | a4a83e95e6 | |
Leonardo Hernández Hernández | e45ded7eea | |
Leonardo Hernández Hernández | e5e74acfce | |
Leonardo Hernández Hernández | 892a4d3ec7 | |
Leonardo Hernández Hernández | ab87410023 | |
Leonardo Hernández Hernández | 7085057f6d | |
Ben Collerson | 8c79f8dc15 | |
Leonardo Hernández Hernández | 8781f4dbf5 | |
Leonardo Hernández Hernández | df131cdb78 | |
Leonardo Hernández Hernández | 887fde65a3 | |
Leonardo Hernández Hernández | b299e01e44 | |
Leonardo Hernández Hernández | 6d9a915fb6 | |
Leonardo Hernández Hernández | 935b852dc5 | |
Leonardo Hernández Hernández | a18c528300 | |
Leonardo Hernández Hernández | 72a7d78a1a | |
Leonardo Hernández Hernández | d63f4078c5 | |
Leonardo Hernández Hernández | f4031590cd | |
Leonardo Hernández Hernández | 0ab1ed6530 | |
Forrest Bushstone | f695674361 | |
Forrest Bushstone | aec21eca1f | |
Leonardo Hernández Hernández | 342850487a | |
Leonardo Hernández Hernández | 1333f8cc6e | |
Leonardo Hernández Hernández | 5baf195523 | |
Weiseguy | 773bd04764 | |
Angelo Antony | 755fcae2af | |
Leonardo Hernández Hernández | 960c32a7d8 | |
Leonardo Hernández Hernández | aea8dd6ae1 | |
Leonardo Hernández Hernández | c1d8b77f7f | |
Ben Collerson | e5367753bb | |
Ben Collerson | 9be85c1117 | |
Leonardo Hernández Hernández | 4b8c1bf31e | |
Devin J. Pohly | d7569870b6 | |
Devin J. Pohly | 4eb54b55f3 | |
Leonardo Hernández Hernández | d4f2c6bfd6 | |
Leonardo Hernández Hernández | 4567979b16 | |
Leonardo Hernández Hernández | 25db045392 | |
Leonardo Hernández Hernández | 78cf88670f | |
Leonardo Hernández Hernández | ce997c4a21 | |
Leonardo Hernández Hernández | 0e5405610e | |
Leonardo Hernández Hernández | 0bb1a1cc5c | |
Leonardo Hernández Hernández | aecff8cb26 | |
Leonardo Hernández Hernández | ca4a97b933 | |
Devin J. Pohly | 76ba2cdab0 | |
Devin J. Pohly | 4b15bbeb33 | |
Devin J. Pohly | 831fc36bc9 | |
Devin J. Pohly | 1841527871 | |
Leonardo Hernández Hernández | ff7c0e9508 | |
Devin J. Pohly | 33bcd2e4ca | |
Devin J. Pohly | fbd84aca4a | |
Devin J. Pohly | a01e402c5d | |
Leonardo Hernández Hernández | 9dd3f230c0 | |
Devin J. Pohly | eda0613cc4 | |
Leonardo Hernández Hernández | 733114f0ca | |
Leonardo Hernández Hernández | fdb66ccfa3 | |
Leonardo Hernández Hernández | 6095ff84d2 | |
Devin J. Pohly | 68a17f962e | |
Devin J. Pohly | 9c592da01f | |
Devin J. Pohly | df11b7a786 | |
Leonardo Hernández Hernández | 1e1811f953 | |
Leonardo Hernández Hernández | dfb6b97159 | |
Leonardo Hernández Hernández | 65f68e7643 | |
Leonardo Hernández Hernández | 96ab92cdb1 | |
Leonardo Hernández Hernández | 1eb8a82ac4 | |
Leonardo Hernández Hernández | 24a337e6ec | |
A Frederick Christensen | 5215712cab | |
Leonardo Hernández Hernández | f3d017077a | |
Leonardo Hernández Hernández | 06bc65549f | |
Leonardo Hernández Hernández | a8ccbe63f3 | |
Leonardo Hernández Hernández | 9b9b79b35e | |
Leonardo Hernández Hernández | 3d98907b98 | |
Nikita Ivanov | f8884ffc2b | |
Leonardo Hernández Hernández | a5e45924ed | |
Leonardo Hernández Hernández | 72adab621f | |
Micah Gorrell | 0729f18dce | |
Leonardo Hernández Hernández | 2d1a40caf2 | |
Leonardo Hernández Hernández | 733754bb06 | |
Leonardo Hernández Hernández | 797e0c74b2 | |
Leonardo Hernández Hernández | 3c760bcd4a | |
Ben Collerson | da77e34ee5 | |
Leonardo Hernández Hernández | 20f61a59af | |
Ben Collerson | 9d68554c59 | |
Yves Zoundi | bbdf2a913b | |
Palanix | 21930621ee | |
A Frederick Christensen | 6722a89532 | |
Leonardo Hernández Hernández | eaf6dd2cd2 | |
gan-of-culture | e4921fad28 | |
Leonardo Hernández Hernández | d1b36925c9 | |
godalming123 | c69a2bec3f | |
godalming123 | 737688a6b1 | |
Leonardo Hernández Hernández | fefcdbed4a | |
pino-desktop | f8373ccf25 | |
Ben Collerson | 7f9a212476 | |
Leonardo Hernández Hernández | ab8334bd8a | |
Leonardo Hernández Hernández | 23ede80f74 | |
Leonardo Hernández Hernández | 04fdf1a295 | |
Leonardo Hernández Hernández | fbe89a929f | |
Leonardo Hernández Hernández | e7f736ccc9 | |
Job79 | 7ae5039b4f | |
Leonardo Hernández Hernández | f7d6a34cd9 | |
Leonardo Hernández Hernández | cf9c5745e5 | |
Leonardo Hernández Hernández | b39d270b9f | |
Leonardo Hernández Hernández | 98c7adfb3d | |
Leonardo Hernández Hernández | b5229636a3 | |
Leonardo Hernández Hernández | 02c257e0b1 | |
Leonardo Hernández Hernández | 27ab9cf1b1 | |
Leonardo Hernández Hernández | 1b39bbf316 | |
Leonardo Hernández Hernández | ea1b2dda63 | |
Leonardo Hernández Hernández | 21ef004886 | |
Leonardo Hernández Hernández | dae00caadd | |
Leonardo Hernández Hernández | 5eb3529275 | |
Leonardo Hernández Hernández | 359e7edc52 | |
Leonardo Hernández Hernández | 25dfdcc433 |
|
@ -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
|
||||||
|
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
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
value: |
|
||||||
|
The steps you took to reproduce the problem.
|
||||||
|
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,22 +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
|
|
||||||
If the patch author doesn't respond within a reasonable time, email me:
|
|
||||||
|
|
||||||
Leonardo Hernández Hernández <leohdz172@protonmail.com>
|
|
||||||
|
|
||||||
but note that I'm NOT making any promises
|
|
||||||
-->
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
name: Enhancement idea
|
|
||||||
about: Suggest a feature or improvement
|
|
||||||
title: ''
|
|
||||||
labels: 'A: enhancement'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
* [Unreleased](#unreleased)
|
||||||
|
* [0.5](#0.5)
|
||||||
|
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
### Added
|
||||||
|
### Changed
|
||||||
|
### Deprecated
|
||||||
|
### Removed
|
||||||
|
### Fixed
|
||||||
|
### Security
|
||||||
|
### Contributors
|
||||||
|
|
||||||
|
|
||||||
|
## 0.5
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* Allow configure x and y position of outputs ([#301][301])
|
||||||
|
* Implement repeatable keybindings ([#368][368])
|
||||||
|
* Print app id in printstatus() output ([#381][381])
|
||||||
|
* Display client count in monocle symbol ([#387][387])
|
||||||
|
* Export XCURSOR_SIZE to fix apps using an older version of Qt ([#425][425])
|
||||||
|
* Support for wp-fractional-scale-v1 (through wlr_scene: [wlroots!3511][wlroots!3511])
|
||||||
|
* dwl now sends `wl_surface.preferred_buffer_scale` (through wlr_scene: [wlroots!4269][wlroots!4269])
|
||||||
|
* Add support for xdg-shell v6 ([#465][465])
|
||||||
|
* Add support for wp-cursor-shape-v1 ([#444][444])
|
||||||
|
* Add desktop file ([#484][484])
|
||||||
|
* Add macro to easily configure colors ([#466][466])
|
||||||
|
* Color of urgent clients are now red ([#494][494])
|
||||||
|
* New flag `-d` and option `log_level` to change the wlroots debug level
|
||||||
|
* Add CHANGELOG.md ([#501][501])
|
||||||
|
|
||||||
|
[301]: https://github.com/djpohly/dwl/pull/301
|
||||||
|
[368]: https://github.com/djpohly/dwl/pull/368
|
||||||
|
[381]: https://github.com/djpohly/dwl/pull/381
|
||||||
|
[387]: https://github.com/djpohly/dwl/issues/387
|
||||||
|
[425]: https://github.com/djpohly/dwl/pull/425
|
||||||
|
[wlroots!4269]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4269
|
||||||
|
[wlroots!3511]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3511
|
||||||
|
[465]: https://github.com/djpohly/dwl/pull/465
|
||||||
|
[444]: https://github.com/djpohly/dwl/pull/444
|
||||||
|
[484]: https://github.com/djpohly/dwl/pull/484
|
||||||
|
[466]: https://github.com/djpohly/dwl/issues/466
|
||||||
|
[494]: https://github.com/djpohly/dwl/pull/494
|
||||||
|
[501]: https://github.com/djpohly/dwl/pull/501
|
||||||
|
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* Replace `tags` with `TAGCOUNT` in config.def.h ([#403][403])
|
||||||
|
* Pop ups are now destroyed when focusing another client ([#408][408])
|
||||||
|
* dwl does not longer respect size hints, instead clip windows if they are
|
||||||
|
larger than they should be ([#455][455])
|
||||||
|
* The version of wlr-layer-shell-unstable-v1 was lowered to 3 (from 4)
|
||||||
|
* Use the same border color as dwm ([#494][494])
|
||||||
|
|
||||||
|
[403]: https://github.com/djpohly/dwl/pull/403
|
||||||
|
[408]: https://github.com/djpohly/dwl/pull/409
|
||||||
|
[455]: https://github.com/djpohly/dwl/pull/455
|
||||||
|
[494]: https://github.com/djpohly/dwl/pull/494
|
||||||
|
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
* Remove unused `rootcolor` option ([#401][401])
|
||||||
|
* Remove support for wlr-input-inhibitor-unstable-v1 ([#430][430])
|
||||||
|
* Remove support for KDE idle protocol ([#431][431])
|
||||||
|
|
||||||
|
[401]: https://github.com/djpohly/dwl/pull/401
|
||||||
|
[430]: https://github.com/djpohly/dwl/pull/430
|
||||||
|
[431]: https://github.com/djpohly/dwl/pull/431
|
||||||
|
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Fix crash when creating a layer surface with all outputs disabled
|
||||||
|
([#421][421])
|
||||||
|
* Fix other clients being shown as focused if the focused client have pop ups
|
||||||
|
open ([#408][408])
|
||||||
|
* Resize fullscreen clients when updating monitor mode
|
||||||
|
* dwl no longer crash at exit like sometimes did
|
||||||
|
* Fullscreen background appearing above clients ([#487][487])
|
||||||
|
* Fix a segfault when user provides invalid xkb_rules ([#518][518])
|
||||||
|
|
||||||
|
[421]: https://github.com/djpohly/dwl/pull/421
|
||||||
|
[408]: https://github.com/djpohly/dwl/issues/408
|
||||||
|
[487]: https://github.com/djpohly/dwl/issues/487
|
||||||
|
[518]: https://github.com/djpohly/dwl/pull/518
|
||||||
|
|
||||||
|
|
||||||
|
### Contributors
|
||||||
|
|
||||||
|
* A Frederick Christensen
|
||||||
|
* Angelo Antony
|
||||||
|
* Ben Collerson
|
||||||
|
* Devin J. Pohly
|
||||||
|
* Forrest Bushstone
|
||||||
|
* gan-of-culture
|
||||||
|
* godalming123
|
||||||
|
* Job79
|
||||||
|
* link2xt
|
||||||
|
* Micah Gorrell
|
||||||
|
* Nikita Ivanov
|
||||||
|
* Palanix
|
||||||
|
* pino-desktop
|
||||||
|
* Weiseguy
|
||||||
|
* Yves Zoundi
|
16
Makefile
16
Makefile
|
@ -5,7 +5,7 @@ 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 = -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 -Wno-sign-compare -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
|
||||||
|
|
||||||
# CFLAGS / LDFLAGS
|
# CFLAGS / LDFLAGS
|
||||||
|
@ -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 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 xdg-shell-protocol.h wlr-layer-shell-unstable-v1-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
|
||||||
|
@ -31,6 +31,9 @@ xdg-shell-protocol.h:
|
||||||
wlr-layer-shell-unstable-v1-protocol.h:
|
wlr-layer-shell-unstable-v1-protocol.h:
|
||||||
$(WAYLAND_SCANNER) server-header \
|
$(WAYLAND_SCANNER) server-header \
|
||||||
protocols/wlr-layer-shell-unstable-v1.xml $@
|
protocols/wlr-layer-shell-unstable-v1.xml $@
|
||||||
|
cursor-shape-v1-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) server-header \
|
||||||
|
$(WAYLAND_PROTOCOLS)/staging/cursor-shape/cursor-shape-v1.xml $@
|
||||||
|
|
||||||
config.h:
|
config.h:
|
||||||
cp config.def.h $@
|
cp config.def.h $@
|
||||||
|
@ -39,8 +42,8 @@ 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\
|
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)
|
||||||
rm -rf dwl-$(VERSION)
|
rm -rf dwl-$(VERSION)
|
||||||
|
@ -52,8 +55,11 @@ install: dwl
|
||||||
mkdir -p $(DESTDIR)$(MANDIR)/man1
|
mkdir -p $(DESTDIR)$(MANDIR)/man1
|
||||||
cp -f dwl.1 $(DESTDIR)$(MANDIR)/man1
|
cp -f dwl.1 $(DESTDIR)$(MANDIR)/man1
|
||||||
chmod 644 $(DESTDIR)$(MANDIR)/man1/dwl.1
|
chmod 644 $(DESTDIR)$(MANDIR)/man1/dwl.1
|
||||||
|
mkdir -p $(DESTDIR)$(DATADIR)/wayland-sessions
|
||||||
|
cp -f dwl.desktop $(DESTDIR)$(DATADIR)/wayland-sessions/dwl.desktop
|
||||||
|
chmod 644 $(DESTDIR)$(DATADIR)/wayland-sessions/dwl.desktop
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(PREFIX)/bin/dwl $(DESTDIR)$(MANDIR)/man1/dwl.1
|
rm -f $(DESTDIR)$(PREFIX)/bin/dwl $(DESTDIR)$(MANDIR)/man1/dwl.1 $(DESTDIR)$(DATADIR)/wayland-sessions/dwl.desktop
|
||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
.c.o:
|
.c.o:
|
||||||
|
|
40
README.md
40
README.md
|
@ -1,6 +1,7 @@
|
||||||
# dwl - dwm for Wayland
|
# dwl - dwm for Wayland
|
||||||
|
|
||||||
Join us on our [Discord server] or at [#dwl] on irc.libera.chat.
|
Join us on our IRC channel: [#dwl on Libera Chat]
|
||||||
|
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,
|
||||||
|
@ -26,7 +27,7 @@ given the base on which it is built. Implemented default features are:
|
||||||
monitoring
|
monitoring
|
||||||
- Provide information to external status bars via stdout/stdin
|
- Provide information to external status bars via stdout/stdin
|
||||||
- Urgency hints via xdg-activate protocol
|
- Urgency hints via xdg-activate protocol
|
||||||
- Support screen lockers via input-inhibitor protocol
|
- Support screen lockers via ext-session-lock-v1 protocol
|
||||||
- Various Wayland protocols
|
- Various Wayland protocols
|
||||||
- XWayland support as provided by wlroots (can be enabled in `config.mk`)
|
- XWayland support as provided by wlroots (can be enabled in `config.mk`)
|
||||||
- Zero flickering - Wayland users naturally expect that "every frame is perfect"
|
- Zero flickering - Wayland users naturally expect that "every frame is perfect"
|
||||||
|
@ -38,7 +39,7 @@ 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:
|
||||||
|
|
||||||
|
@ -49,14 +50,28 @@ Feature *non-goals* for the main codebase include:
|
||||||
|
|
||||||
## Building dwl
|
## Building dwl
|
||||||
|
|
||||||
dwl has only two dependencies: `wlroots` and `wayland-protocols`.
|
dwl has the following dependencies:
|
||||||
|
```
|
||||||
|
libinput
|
||||||
|
wayland
|
||||||
|
wlroots (compiled with the libinput backend)
|
||||||
|
xkbcommon
|
||||||
|
wayland-protocols (compile-time only)
|
||||||
|
pkg-config (compile-time only)
|
||||||
|
```
|
||||||
|
If you enable X11 support:
|
||||||
|
```
|
||||||
|
libxcb
|
||||||
|
libxcb-wm
|
||||||
|
wlroots (compiled with X11 support)
|
||||||
|
Xwayland (runtime only)
|
||||||
|
```
|
||||||
|
|
||||||
Simply install these (and their `-devel` versions if your distro has separate
|
Simply install these (and their `-devel` versions if your distro has separate
|
||||||
development packages) and run `make`. If you wish to build against a Git
|
development packages) and run `make`. If you wish to build against a Git
|
||||||
version of wlroots, check out the [wlroots-next branch].
|
version of wlroots, check out the [wlroots-next branch].
|
||||||
|
|
||||||
To enable XWayland, you should also install xorg-xwayland and uncomment its flag
|
To enable XWayland, you should uncomment its flags in `config.mk`.
|
||||||
in `config.mk`.
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -82,6 +97,7 @@ When dwl is run with no arguments, it will launch the server and begin handling
|
||||||
any shortcuts configured in `config.h`. There is no status bar or other
|
any shortcuts configured in `config.h`. There is no status bar or other
|
||||||
decoration initially; these are instead clients that can be run within
|
decoration initially; these are instead clients that can be run within
|
||||||
the Wayland session.
|
the Wayland session.
|
||||||
|
Do note that the background color is black.
|
||||||
|
|
||||||
If you would like to run a script or command automatically at startup, you can
|
If you would like to run a script or command automatically at startup, you can
|
||||||
specify the command using the `-s` option. This command will be executed as a
|
specify the command using the `-s` option. This command will be executed as a
|
||||||
|
@ -105,7 +121,7 @@ automatically, you will need to configure it prior to launching `dwl`, e.g.:
|
||||||
|
|
||||||
### Status information
|
### Status information
|
||||||
|
|
||||||
Information about selected layouts, current window title, and
|
Information about selected layouts, current window title, app-id, and
|
||||||
selected/occupied/urgent tags is written to the stdin of the `-s` command (see
|
selected/occupied/urgent tags is written to the stdin of the `-s` command (see
|
||||||
the `printstatus()` function for details). This information can be used to
|
the `printstatus()` function for details). This information can be used to
|
||||||
populate an external status bar with a script that parses the information.
|
populate an external status bar with a script that parses the information.
|
||||||
|
@ -143,15 +159,15 @@ inspiration, and to the various contributors to the project, including:
|
||||||
|
|
||||||
|
|
||||||
[Discord server]: https://discord.gg/jJxZnrGPWN
|
[Discord server]: https://discord.gg/jJxZnrGPWN
|
||||||
[#dwl]: 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 page on our wiki]: https://codeberg.org/dwl/dwl/wiki/Patches
|
||||||
[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
|
||||||
[`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
|
||||||
|
|
188
client.h
188
client.h
|
@ -11,34 +11,8 @@ client_is_x11(Client *c)
|
||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
return c->type == X11Managed || c->type == X11Unmanaged;
|
return c->type == X11Managed || c->type == X11Unmanaged;
|
||||||
#else
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
client_get_size_hints(Client *c, struct wlr_box *max, struct wlr_box *min)
|
|
||||||
{
|
|
||||||
struct wlr_xdg_toplevel *toplevel;
|
|
||||||
struct wlr_xdg_toplevel_state *state;
|
|
||||||
#ifdef XWAYLAND
|
|
||||||
if (client_is_x11(c)) {
|
|
||||||
xcb_size_hints_t *size_hints = c->surface.xwayland->size_hints;
|
|
||||||
if (size_hints) {
|
|
||||||
max->width = size_hints->max_width;
|
|
||||||
max->height = size_hints->max_height;
|
|
||||||
min->width = size_hints->min_width;
|
|
||||||
min->height = size_hints->min_height;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
toplevel = c->surface.xdg->toplevel;
|
|
||||||
state = &toplevel->current;
|
|
||||||
max->width = state->max_width;
|
|
||||||
max->height = state->max_height;
|
|
||||||
min->width = state->min_width;
|
|
||||||
min->height = state->min_height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct wlr_surface *
|
static inline struct wlr_surface *
|
||||||
|
@ -54,7 +28,7 @@ client_surface(Client *c)
|
||||||
static inline int
|
static inline int
|
||||||
toplevel_from_wlr_surface(struct wlr_surface *s, Client **pc, LayerSurface **pl)
|
toplevel_from_wlr_surface(struct wlr_surface *s, Client **pc, LayerSurface **pl)
|
||||||
{
|
{
|
||||||
struct wlr_xdg_surface *xdg_surface;
|
struct wlr_xdg_surface *xdg_surface, *tmp_xdg_surface;
|
||||||
struct wlr_surface *root_surface;
|
struct wlr_surface *root_surface;
|
||||||
struct wlr_layer_surface_v1 *layer_surface;
|
struct wlr_layer_surface_v1 *layer_surface;
|
||||||
Client *c = NULL;
|
Client *c = NULL;
|
||||||
|
@ -65,44 +39,44 @@ toplevel_from_wlr_surface(struct wlr_surface *s, Client **pc, LayerSurface **pl)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!s)
|
if (!s)
|
||||||
return type;
|
return -1;
|
||||||
root_surface = wlr_surface_get_root_surface(s);
|
root_surface = wlr_surface_get_root_surface(s);
|
||||||
|
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (wlr_surface_is_xwayland_surface(root_surface)
|
if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(root_surface))) {
|
||||||
&& (xsurface = wlr_xwayland_surface_from_wlr_surface(root_surface))) {
|
|
||||||
c = xsurface->data;
|
c = xsurface->data;
|
||||||
type = c->type;
|
type = c->type;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (wlr_surface_is_layer_surface(root_surface)
|
if ((layer_surface = wlr_layer_surface_v1_try_from_wlr_surface(root_surface))) {
|
||||||
&& (layer_surface = wlr_layer_surface_v1_from_wlr_surface(root_surface))) {
|
|
||||||
l = layer_surface->data;
|
l = layer_surface->data;
|
||||||
type = LayerShell;
|
type = LayerShell;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wlr_surface_is_xdg_surface(root_surface)
|
xdg_surface = wlr_xdg_surface_try_from_wlr_surface(root_surface);
|
||||||
&& (xdg_surface = wlr_xdg_surface_from_wlr_surface(root_surface))) {
|
while (xdg_surface) {
|
||||||
while (1) {
|
tmp_xdg_surface = NULL;
|
||||||
switch (xdg_surface->role) {
|
switch (xdg_surface->role) {
|
||||||
case WLR_XDG_SURFACE_ROLE_POPUP:
|
case WLR_XDG_SURFACE_ROLE_POPUP:
|
||||||
if (!xdg_surface->popup->parent)
|
if (!xdg_surface->popup || !xdg_surface->popup->parent)
|
||||||
return -1;
|
|
||||||
else if (!wlr_surface_is_xdg_surface(xdg_surface->popup->parent))
|
|
||||||
return toplevel_from_wlr_surface(xdg_surface->popup->parent, pc, pl);
|
|
||||||
|
|
||||||
xdg_surface = wlr_xdg_surface_from_wlr_surface(xdg_surface->popup->parent);
|
|
||||||
break;
|
|
||||||
case WLR_XDG_SURFACE_ROLE_TOPLEVEL:
|
|
||||||
c = xdg_surface->data;
|
|
||||||
type = c->type;
|
|
||||||
goto end;
|
|
||||||
case WLR_XDG_SURFACE_ROLE_NONE:
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
tmp_xdg_surface = wlr_xdg_surface_try_from_wlr_surface(xdg_surface->popup->parent);
|
||||||
|
|
||||||
|
if (!tmp_xdg_surface)
|
||||||
|
return toplevel_from_wlr_surface(xdg_surface->popup->parent, pc, pl);
|
||||||
|
|
||||||
|
xdg_surface = tmp_xdg_surface;
|
||||||
|
break;
|
||||||
|
case WLR_XDG_SURFACE_ROLE_TOPLEVEL:
|
||||||
|
c = xdg_surface->data;
|
||||||
|
type = c->type;
|
||||||
|
goto end;
|
||||||
|
case WLR_XDG_SURFACE_ROLE_NONE:
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,19 +92,16 @@ end:
|
||||||
static inline void
|
static inline void
|
||||||
client_activate_surface(struct wlr_surface *s, int activated)
|
client_activate_surface(struct wlr_surface *s, int activated)
|
||||||
{
|
{
|
||||||
struct wlr_xdg_surface *surface;
|
struct wlr_xdg_toplevel *toplevel;
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
struct wlr_xwayland_surface *xsurface;
|
struct wlr_xwayland_surface *xsurface;
|
||||||
if (wlr_surface_is_xwayland_surface(s)
|
if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(s))) {
|
||||||
&& (xsurface = wlr_xwayland_surface_from_wlr_surface(s))) {
|
|
||||||
wlr_xwayland_surface_activate(xsurface, activated);
|
wlr_xwayland_surface_activate(xsurface, activated);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (wlr_surface_is_xdg_surface(s)
|
if ((toplevel = wlr_xdg_toplevel_try_from_wlr_surface(s)))
|
||||||
&& (surface = wlr_xdg_surface_from_wlr_surface(s))
|
wlr_xdg_toplevel_set_activated(toplevel, activated);
|
||||||
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
|
||||||
wlr_xdg_toplevel_set_activated(surface->toplevel, activated);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
@ -140,23 +111,16 @@ client_set_bounds(Client *c, int32_t width, int32_t height)
|
||||||
if (client_is_x11(c))
|
if (client_is_x11(c))
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
if (c->surface.xdg->client->shell->version >=
|
if (wl_resource_get_version(c->surface.xdg->toplevel->resource) >=
|
||||||
XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION && width >= 0 && height >= 0)
|
XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION && width >= 0 && height >= 0
|
||||||
|
&& (c->bounds.width != width || c->bounds.height != height)) {
|
||||||
|
c->bounds.width = width;
|
||||||
|
c->bounds.height = height;
|
||||||
return wlr_xdg_toplevel_set_bounds(c->surface.xdg->toplevel, width, height);
|
return wlr_xdg_toplevel_set_bounds(c->surface.xdg->toplevel, width, height);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
|
||||||
client_for_each_surface(Client *c, wlr_surface_iterator_func_t fn, void *data)
|
|
||||||
{
|
|
||||||
wlr_surface_for_each_surface(client_surface(c), fn, data);
|
|
||||||
#ifdef XWAYLAND
|
|
||||||
if (client_is_x11(c))
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
wlr_xdg_surface_for_each_popup_surface(c->surface.xdg, fn, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline const char *
|
static inline const char *
|
||||||
client_get_appid(Client *c)
|
client_get_appid(Client *c)
|
||||||
{
|
{
|
||||||
|
@ -167,6 +131,27 @@ client_get_appid(Client *c)
|
||||||
return c->surface.xdg->toplevel->app_id;
|
return c->surface.xdg->toplevel->app_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
client_get_clip(Client *c, struct wlr_box *clip)
|
||||||
|
{
|
||||||
|
struct wlr_box xdg_geom = {0};
|
||||||
|
*clip = (struct wlr_box){
|
||||||
|
.x = 0,
|
||||||
|
.y = 0,
|
||||||
|
.width = c->geom.width - c->bw,
|
||||||
|
.height = c->geom.height - c->bw,
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef XWAYLAND
|
||||||
|
if (client_is_x11(c))
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
wlr_xdg_surface_get_geometry(c->surface.xdg, &xdg_geom);
|
||||||
|
clip->x = xdg_geom.x;
|
||||||
|
clip->y = xdg_geom.y;
|
||||||
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
client_get_geometry(Client *c, struct wlr_box *geom)
|
client_get_geometry(Client *c, struct wlr_box *geom)
|
||||||
{
|
{
|
||||||
|
@ -192,7 +177,6 @@ client_get_parent(Client *c)
|
||||||
#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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,35 +193,35 @@ client_get_title(Client *c)
|
||||||
static inline int
|
static inline int
|
||||||
client_is_float_type(Client *c)
|
client_is_float_type(Client *c)
|
||||||
{
|
{
|
||||||
struct wlr_box min = {0}, max = {0};
|
struct wlr_xdg_toplevel *toplevel;
|
||||||
client_get_size_hints(c, &max, &min);
|
struct wlr_xdg_toplevel_state state;
|
||||||
|
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c)) {
|
if (client_is_x11(c)) {
|
||||||
struct wlr_xwayland_surface *surface = c->surface.xwayland;
|
struct wlr_xwayland_surface *surface = c->surface.xwayland;
|
||||||
|
xcb_size_hints_t *size_hints = surface->size_hints;
|
||||||
|
size_t i;
|
||||||
if (surface->modal)
|
if (surface->modal)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
for (size_t i = 0; i < surface->window_type_len; i++)
|
for (i = 0; i < surface->window_type_len; i++)
|
||||||
if (surface->window_type[i] == netatom[NetWMWindowTypeDialog]
|
if (surface->window_type[i] == netatom[NetWMWindowTypeDialog]
|
||||||
|| surface->window_type[i] == netatom[NetWMWindowTypeSplash]
|
|| surface->window_type[i] == netatom[NetWMWindowTypeSplash]
|
||||||
|| surface->window_type[i] == netatom[NetWMWindowTypeToolbar]
|
|| surface->window_type[i] == netatom[NetWMWindowTypeToolbar]
|
||||||
|| surface->window_type[i] == netatom[NetWMWindowTypeUtility])
|
|| surface->window_type[i] == netatom[NetWMWindowTypeUtility])
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
return size_hints && size_hints->min_width > 0 && size_hints->min_height > 0
|
||||||
|
&& (size_hints->max_width == size_hints->min_width
|
||||||
|
|| size_hints->max_height == size_hints->min_height);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return ((min.width > 0 || min.height > 0 || max.width > 0 || max.height > 0)
|
|
||||||
&& (min.width == max.width || min.height == max.height));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int
|
toplevel = c->surface.xdg->toplevel;
|
||||||
client_is_mapped(Client *c)
|
state = toplevel->current;
|
||||||
{
|
return toplevel->parent || (state.min_width != 0 && state.min_height != 0
|
||||||
#ifdef XWAYLAND
|
&& (state.min_width == state.max_width
|
||||||
if (client_is_x11(c))
|
|| state.min_height == state.max_height));
|
||||||
return c->surface.xwayland->mapped;
|
|
||||||
#endif
|
|
||||||
return c->surface.xdg->mapped;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
@ -247,7 +231,8 @@ client_is_rendered_on_mon(Client *c, Monitor *m)
|
||||||
* but rather actual displaying of the pixels.
|
* but rather actual displaying of the pixels.
|
||||||
* Usually VISIBLEON suffices and is also faster. */
|
* Usually VISIBLEON suffices and is also faster. */
|
||||||
struct wlr_surface_output *s;
|
struct wlr_surface_output *s;
|
||||||
if (!c->scene->node.enabled)
|
int unused_lx, unused_ly;
|
||||||
|
if (!wlr_scene_node_coords(&c->scene->node, &unused_lx, &unused_ly))
|
||||||
return 0;
|
return 0;
|
||||||
wl_list_for_each(s, &client_surface(c)->current_outputs, link)
|
wl_list_for_each(s, &client_surface(c)->current_outputs, link)
|
||||||
if (s->output == m->wlr_output)
|
if (s->output == m->wlr_output)
|
||||||
|
@ -323,6 +308,14 @@ client_send_close(Client *c)
|
||||||
wlr_xdg_toplevel_send_close(c->surface.xdg->toplevel);
|
wlr_xdg_toplevel_send_close(c->surface.xdg->toplevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
client_set_border_color(Client *c, const float color[static 4])
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
wlr_scene_rect_set_color(c->border[i], color);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
client_set_fullscreen(Client *c, int fullscreen)
|
client_set_fullscreen(Client *c, int fullscreen)
|
||||||
{
|
{
|
||||||
|
@ -358,18 +351,25 @@ client_set_tiled(Client *c, uint32_t edges)
|
||||||
if (client_is_x11(c))
|
if (client_is_x11(c))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
|
if (wl_resource_get_version(c->surface.xdg->resource)
|
||||||
|
>= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) {
|
||||||
|
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
|
||||||
|
} else {
|
||||||
|
wlr_xdg_toplevel_set_maximized(c->surface.xdg->toplevel, edges != WLR_EDGE_NONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct wlr_surface *
|
static inline void
|
||||||
client_surface_at(Client *c, double cx, double cy, double *sx, double *sy)
|
client_set_suspended(Client *c, int suspended)
|
||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c))
|
if (client_is_x11(c)) {
|
||||||
return wlr_surface_surface_at(c->surface.xwayland->surface,
|
wlr_xwayland_surface_set_withdrawn(c->surface.xwayland, suspended);
|
||||||
cx, cy, sx, sy);
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return wlr_xdg_surface_surface_at(c->surface.xdg, cx, cy, sx, sy);
|
|
||||||
|
wlr_xdg_toplevel_set_suspended(c->surface.xdg->toplevel, suspended);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
|
35
config.def.h
35
config.def.h
|
@ -1,15 +1,23 @@
|
||||||
|
/* Taken from https://github.com/djpohly/dwl/issues/466 */
|
||||||
|
#define COLOR(hex) { ((hex >> 24) & 0xFF) / 255.0f, \
|
||||||
|
((hex >> 16) & 0xFF) / 255.0f, \
|
||||||
|
((hex >> 8) & 0xFF) / 255.0f, \
|
||||||
|
(hex & 0xFF) / 255.0f }
|
||||||
/* appearance */
|
/* appearance */
|
||||||
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 float rootcolor[] = {0.3, 0.3, 0.3, 1.0};
|
static const float bordercolor[] = COLOR(0x444444ff);
|
||||||
static const float bordercolor[] = {0.5, 0.5, 0.5, 1.0};
|
static const float focuscolor[] = COLOR(0x005577ff);
|
||||||
static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0};
|
static const float urgentcolor[] = COLOR(0xff0000ff);
|
||||||
/* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */
|
/* To conform 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};
|
static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can also use glsl colors */
|
||||||
|
|
||||||
/* tagging */
|
/* tagging - TAGCOUNT must be no greater than 31 */
|
||||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
#define TAGCOUNT (9)
|
||||||
|
|
||||||
|
/* logging */
|
||||||
|
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 */
|
||||||
|
@ -29,12 +37,12 @@ static const Layout layouts[] = {
|
||||||
|
|
||||||
/* monitors */
|
/* monitors */
|
||||||
static const MonitorRule monrules[] = {
|
static const MonitorRule monrules[] = {
|
||||||
/* name mfact nmaster scale layout rotate/reflect */
|
/* 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 },
|
{ "eDP-1", 0.5, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
*/
|
*/
|
||||||
/* defaults */
|
/* defaults */
|
||||||
{ NULL, 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL },
|
{ NULL, 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* keyboard */
|
/* keyboard */
|
||||||
|
@ -66,9 +74,9 @@ LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
|
||||||
static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
|
static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
|
||||||
|
|
||||||
/* You can choose between:
|
/* You can choose between:
|
||||||
LIBINPUT_CONFIG_CLICK_METHOD_NONE
|
LIBINPUT_CONFIG_CLICK_METHOD_NONE
|
||||||
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS
|
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS
|
||||||
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER
|
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER
|
||||||
*/
|
*/
|
||||||
static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
|
static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
|
||||||
|
|
||||||
|
@ -146,6 +154,9 @@ static const Key keys[] = {
|
||||||
|
|
||||||
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
||||||
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
|
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
|
||||||
|
/* Ctrl-Alt-Fx is used to switch to another VT, if you don't know what a VT is
|
||||||
|
* do not remove them.
|
||||||
|
*/
|
||||||
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_XF86Switch_VT_##n, chvt, {.ui = (n)} }
|
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_XF86Switch_VT_##n, chvt, {.ui = (n)} }
|
||||||
CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
|
CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
|
||||||
CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
|
CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
_VERSION = 0.4
|
_VERSION = 0.5
|
||||||
VERSION = `git describe --tags --dirty 2>/dev/null || echo $(_VERSION)`
|
VERSION = `git describe --tags --dirty 2>/dev/null || echo $(_VERSION)`
|
||||||
|
|
||||||
PKG_CONFIG = pkg-config
|
PKG_CONFIG = pkg-config
|
||||||
|
@ -6,6 +6,7 @@ PKG_CONFIG = pkg-config
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANDIR = $(PREFIX)/share/man
|
MANDIR = $(PREFIX)/share/man
|
||||||
|
DATADIR = $(PREFIX)/share
|
||||||
|
|
||||||
XWAYLAND =
|
XWAYLAND =
|
||||||
XLIBS =
|
XLIBS =
|
||||||
|
|
9
dwl.1
9
dwl.1
|
@ -7,6 +7,7 @@
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl v
|
.Op Fl v
|
||||||
|
.Op Fl d
|
||||||
.Op Fl s Ar startup command
|
.Op Fl s Ar startup command
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Nm
|
.Nm
|
||||||
|
@ -22,6 +23,12 @@ option,
|
||||||
writes its name and version to standard error and exits unsuccessfully.
|
writes its name and version to standard error and exits unsuccessfully.
|
||||||
.Pp
|
.Pp
|
||||||
When given the
|
When given the
|
||||||
|
.Fl d
|
||||||
|
option,
|
||||||
|
.Nm
|
||||||
|
enables full wlroots logging, including debug information.
|
||||||
|
.Pp
|
||||||
|
When given the
|
||||||
.Fl s
|
.Fl s
|
||||||
option,
|
option,
|
||||||
.Nm
|
.Nm
|
||||||
|
@ -101,7 +108,7 @@ These environment variables are used by
|
||||||
A directory where temporary user files, such as the Wayland socket,
|
A directory where temporary user files, such as the Wayland socket,
|
||||||
are stored.
|
are stored.
|
||||||
.It Ev XDG_CONFIG_DIR
|
.It Ev XDG_CONFIG_DIR
|
||||||
A directory containung configuration of various programs and
|
A directory containing configuration of various programs and
|
||||||
libraries, including libxkbcommon.
|
libraries, including libxkbcommon.
|
||||||
.It Ev DISPLAY , WAYLAND_DISPLAY , WAYLAND_SOCKET
|
.It Ev DISPLAY , WAYLAND_DISPLAY , WAYLAND_SOCKET
|
||||||
Tell how to connect to an underlying X11 or Wayland server.
|
Tell how to connect to an underlying X11 or Wayland server.
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=dwl
|
||||||
|
Comment=dwm for Wayland
|
||||||
|
Exec=dwl
|
||||||
|
Type=Application
|
Loading…
Reference in New Issue