mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-06-21 22:52:42 +00:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9bedb7908 | |||
| a92504d8bf | |||
| 5493e0bbf2 | |||
| f342b7d412 | |||
| 4dfa45659a | |||
| b91017e713 | |||
| 2623a96ebf | |||
| 52e0d00942 | |||
| 7018b9b65c | |||
| 48ec914f43 | |||
| 40449fa64f | |||
| ecbc2c61db | |||
| cc9f4a3dc4 | |||
| 8841d17ec8 | |||
| 491fa291fa | |||
| 561acf650a | |||
| fe8280bf39 | |||
| fbd698479a | |||
| 8870ba0bb8 | |||
| 5de68ba713 | |||
| 2f8736b986 | |||
| ac1aef7ead | |||
| 27bf627a97 | |||
| c86f2f73fd | |||
| 3c11ad9aa6 | |||
| 06d9230a96 | |||
| 22bd75226b | |||
| 063736f898 | |||
| d5a741c9b4 | |||
| 5d8084daa7 | |||
| 07d56c6d7b | |||
| e0d310fd84 | |||
| 3a4b7d104f | |||
| d071a899f3 | |||
| a48ce99e6a |
@@ -1,6 +1,6 @@
|
|||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
CFLAGS += -I. -DWLR_USE_UNSTABLE -std=c99 -pedantic
|
CFLAGS += -I. -DWLR_USE_UNSTABLE -std=c99 -pedantic -DVERSION=\"$(VERSION)\"
|
||||||
|
|
||||||
WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols)
|
WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols)
|
||||||
WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner)
|
WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner)
|
||||||
@@ -14,6 +14,15 @@ all: dwl
|
|||||||
clean:
|
clean:
|
||||||
rm -f dwl *.o *-protocol.h *-protocol.c
|
rm -f dwl *.o *-protocol.h *-protocol.c
|
||||||
|
|
||||||
|
dist: clean
|
||||||
|
mkdir -p dwl-$(VERSION)
|
||||||
|
cp -R LICENSE* Makefile README.md generate-version.sh client.h\
|
||||||
|
config.def.h config.mk protocols dwl.1 dwl.c util.c util.h\
|
||||||
|
dwl-$(VERSION)
|
||||||
|
echo "echo $(VERSION)" > dwl-$(VERSION)/generate-version.sh
|
||||||
|
tar -caf dwl-$(VERSION).tar.gz dwl-$(VERSION)
|
||||||
|
rm -rf dwl-$(VERSION)
|
||||||
|
|
||||||
install: dwl
|
install: dwl
|
||||||
install -Dm755 dwl $(DESTDIR)$(PREFIX)/bin/dwl
|
install -Dm755 dwl $(DESTDIR)$(PREFIX)/bin/dwl
|
||||||
install -Dm644 dwl.1 $(DESTDIR)$(MANDIR)/man1/dwl.1
|
install -Dm644 dwl.1 $(DESTDIR)$(MANDIR)/man1/dwl.1
|
||||||
@@ -21,7 +30,7 @@ install: dwl
|
|||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(PREFIX)/bin/dwl $(DESTDIR)$(MANDIR)/man1/dwl.1
|
rm -f $(DESTDIR)$(PREFIX)/bin/dwl $(DESTDIR)$(MANDIR)/man1/dwl.1
|
||||||
|
|
||||||
.PHONY: all clean install uninstall
|
.PHONY: all clean dist install uninstall
|
||||||
|
|
||||||
# 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
|
||||||
# protocols, which are specified in XML. wlroots requires you to rig these up
|
# protocols, which are specified in XML. wlroots requires you to rig these up
|
||||||
|
|||||||
@@ -30,16 +30,19 @@ client_surface(Client *c)
|
|||||||
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;
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (wlr_surface_is_xwayland_surface(s)) {
|
struct wlr_xwayland_surface *xsurface;
|
||||||
wlr_xwayland_surface_activate(
|
if (wlr_surface_is_xwayland_surface(s)
|
||||||
wlr_xwayland_surface_from_wlr_surface(s), activated);
|
&& (xsurface = wlr_xwayland_surface_from_wlr_surface(s))) {
|
||||||
|
wlr_xwayland_surface_activate(xsurface, activated);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (wlr_surface_is_xdg_surface(s))
|
if (wlr_surface_is_xdg_surface(s)
|
||||||
wlr_xdg_toplevel_set_activated(
|
&& (surface = wlr_xdg_surface_from_wlr_surface(s))
|
||||||
wlr_xdg_surface_from_wlr_surface(s), activated);
|
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
||||||
|
wlr_xdg_toplevel_set_activated(surface, activated);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
@@ -212,8 +215,13 @@ client_min_size(Client *c, int *width, int *height)
|
|||||||
if (client_is_x11(c)) {
|
if (client_is_x11(c)) {
|
||||||
struct wlr_xwayland_surface_size_hints *size_hints;
|
struct wlr_xwayland_surface_size_hints *size_hints;
|
||||||
size_hints = c->surface.xwayland->size_hints;
|
size_hints = c->surface.xwayland->size_hints;
|
||||||
|
if (size_hints) {
|
||||||
*width = size_hints->min_width;
|
*width = size_hints->min_width;
|
||||||
*height = size_hints->min_height;
|
*height = size_hints->min_height;
|
||||||
|
} else {
|
||||||
|
*width = 0;
|
||||||
|
*height = 0;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -223,6 +231,13 @@ client_min_size(Client *c, int *width, int *height)
|
|||||||
*height = state->min_height;
|
*height = state->min_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline Client *
|
||||||
|
client_from_wlr_surface(struct wlr_surface *surface)
|
||||||
|
{
|
||||||
|
struct wlr_scene_node *n = surface->data;
|
||||||
|
return n ? n->data : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static inline Client *
|
static inline Client *
|
||||||
client_from_popup(struct wlr_xdg_popup *popup)
|
client_from_popup(struct wlr_xdg_popup *popup)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,7 +49,31 @@ static const int repeat_delay = 600;
|
|||||||
|
|
||||||
/* Trackpad */
|
/* Trackpad */
|
||||||
static const int tap_to_click = 1;
|
static const int tap_to_click = 1;
|
||||||
|
static const int tap_and_drag = 1;
|
||||||
|
static const int drag_lock = 1;
|
||||||
static const int natural_scrolling = 0;
|
static const int natural_scrolling = 0;
|
||||||
|
static const int disable_while_typing = 1;
|
||||||
|
static const int left_handed = 0;
|
||||||
|
static const int middle_button_emulation = 0;
|
||||||
|
/* You can choose between:
|
||||||
|
LIBINPUT_CONFIG_SCROLL_NO_SCROLL
|
||||||
|
LIBINPUT_CONFIG_SCROLL_2FG
|
||||||
|
LIBINPUT_CONFIG_SCROLL_EDGE
|
||||||
|
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
|
||||||
|
*/
|
||||||
|
static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
|
||||||
|
/* You can choose between:
|
||||||
|
LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
|
||||||
|
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED
|
||||||
|
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
|
||||||
|
*/
|
||||||
|
static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
|
||||||
|
/* You can choose between:
|
||||||
|
LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
|
||||||
|
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;
|
||||||
|
|
||||||
/* If you want to use the windows key change this to WLR_MODIFIER_LOGO */
|
/* If you want to use the windows key change this to WLR_MODIFIER_LOGO */
|
||||||
#define MODKEY WLR_MODIFIER_ALT
|
#define MODKEY WLR_MODIFIER_ALT
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
_VERSION = 0.3.1
|
||||||
|
VERSION = $(shell ./generate-version.sh $(_VERSION))
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANDIR = $(PREFIX)/share/man
|
MANDIR = $(PREFIX)/share/man
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
.Nd dwm for Wayland
|
.Nd dwm for Wayland
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl s Ar command
|
.Op Fl v
|
||||||
|
.Op Fl s Ar startup command
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Nm
|
.Nm
|
||||||
is a Wayland compositor based on wlroots.
|
is a Wayland compositor based on wlroots.
|
||||||
@@ -15,6 +16,12 @@ It is intended to fill the same space in the Wayland world that
|
|||||||
does for X11.
|
does for X11.
|
||||||
.Pp
|
.Pp
|
||||||
When given the
|
When given the
|
||||||
|
.Fl v
|
||||||
|
option,
|
||||||
|
.Nm
|
||||||
|
writes its name and version to standard error and exits unsuccessfully.
|
||||||
|
.Pp
|
||||||
|
When given the
|
||||||
.Fl s
|
.Fl s
|
||||||
option,
|
option,
|
||||||
.Nm
|
.Nm
|
||||||
|
|||||||
Executable
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if git tag --contains HEAD | grep -q $1; then
|
||||||
|
echo $1
|
||||||
|
else
|
||||||
|
branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
commit="$(git rev-parse --short HEAD)"
|
||||||
|
if [ "${branch}" != "main" ]; then
|
||||||
|
echo $1-$branch-$commit
|
||||||
|
else
|
||||||
|
echo $1-$commit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user