mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-06-21 06:32:40 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9bedb7908 | |||
| a92504d8bf | |||
| 5493e0bbf2 | |||
| f342b7d412 | |||
| cc9f4a3dc4 | |||
| 8841d17ec8 | |||
| 491fa291fa | |||
| 561acf650a | |||
| fe8280bf39 | |||
| fbd698479a | |||
| ac1aef7ead | |||
| 27bf627a97 | |||
| c86f2f73fd |
@@ -1,48 +1,19 @@
|
|||||||
.POSIX:
|
|
||||||
.SUFFIXES:
|
|
||||||
|
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
# flags for compiling
|
CFLAGS += -I. -DWLR_USE_UNSTABLE -std=c99 -pedantic -DVERSION=\"$(VERSION)\"
|
||||||
DWLCPPFLAGS = -I. -DWLR_USE_UNSTABLE -DVERSION=\"$(VERSION)\"
|
|
||||||
|
|
||||||
# Wayland utils
|
WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols)
|
||||||
WAYLAND_PROTOCOLS = `pkg-config --variable=pkgdatadir wayland-protocols`
|
WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner)
|
||||||
WAYLAND_SCANNER = `pkg-config --variable=wayland_scanner wayland-scanner`
|
|
||||||
|
|
||||||
# CFLAGS / LDFLAGS
|
PKGS = wlroots wayland-server xcb xkbcommon libinput
|
||||||
PKGS = wlroots wayland-server xkbcommon libinput $(XLIBS)
|
CFLAGS += $(foreach p,$(PKGS),$(shell pkg-config --cflags $(p)))
|
||||||
DWLCFLAGS = `pkg-config --cflags $(PKGS)` $(DWLCPPFLAGS) $(CFLAGS) $(XWAYLAND)
|
LDLIBS += $(foreach p,$(PKGS),$(shell pkg-config --libs $(p)))
|
||||||
LDLIBS = `pkg-config --libs $(PKGS)` $(LIBS)
|
|
||||||
|
|
||||||
# build rules
|
|
||||||
|
|
||||||
# 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
|
|
||||||
# to your build system yourself and provide them in the include path.
|
|
||||||
all: dwl
|
all: dwl
|
||||||
dwl: dwl.o util.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 idle-protocol.h
|
|
||||||
util.o: util.c util.h
|
|
||||||
|
|
||||||
# wayland scanner rules to generate .h / .c files
|
|
||||||
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 $@
|
|
||||||
idle-protocol.h:
|
|
||||||
$(WAYLAND_SCANNER) server-header \
|
|
||||||
protocols/idle.xml $@
|
|
||||||
|
|
||||||
config.h:
|
|
||||||
cp config.def.h $@
|
|
||||||
clean:
|
clean:
|
||||||
rm -f dwl *.o *-protocol.h
|
rm -f dwl *.o *-protocol.h *-protocol.c
|
||||||
|
|
||||||
# distribution archive
|
|
||||||
dist: clean
|
dist: clean
|
||||||
mkdir -p dwl-$(VERSION)
|
mkdir -p dwl-$(VERSION)
|
||||||
cp -R LICENSE* Makefile README.md generate-version.sh client.h\
|
cp -R LICENSE* Makefile README.md generate-version.sh client.h\
|
||||||
@@ -52,18 +23,51 @@ dist: clean
|
|||||||
tar -caf dwl-$(VERSION).tar.gz dwl-$(VERSION)
|
tar -caf dwl-$(VERSION).tar.gz dwl-$(VERSION)
|
||||||
rm -rf dwl-$(VERSION)
|
rm -rf dwl-$(VERSION)
|
||||||
|
|
||||||
# install rules
|
|
||||||
|
|
||||||
install: dwl
|
install: dwl
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
install -Dm755 dwl $(DESTDIR)$(PREFIX)/bin/dwl
|
||||||
cp -f dwl $(DESTDIR)$(PREFIX)/bin
|
install -Dm644 dwl.1 $(DESTDIR)$(MANDIR)/man1/dwl.1
|
||||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dwl
|
|
||||||
mkdir -p $(DESTDIR)$(MANDIR)/man1
|
|
||||||
cp -f dwl.1 $(DESTDIR)$(MANDIR)/man1
|
|
||||||
chmod 644 $(DESTDIR)$(MANDIR)/man1/dwl.1
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(PREFIX)/bin/dwl $(DESTDIR)$(MANDIR)/man1/dwl.1
|
rm -f $(DESTDIR)$(PREFIX)/bin/dwl $(DESTDIR)$(MANDIR)/man1/dwl.1
|
||||||
|
|
||||||
.SUFFIXES: .c .o
|
.PHONY: all clean dist install uninstall
|
||||||
.c.o:
|
|
||||||
$(CC) $(CPPFLAGS) $(DWLCFLAGS) -c $<
|
# 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
|
||||||
|
# to your build system yourself and provide them in the include path.
|
||||||
|
xdg-shell-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) server-header \
|
||||||
|
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
|
||||||
|
|
||||||
|
xdg-shell-protocol.c:
|
||||||
|
$(WAYLAND_SCANNER) private-code \
|
||||||
|
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
|
||||||
|
|
||||||
|
xdg-shell-protocol.o: xdg-shell-protocol.h
|
||||||
|
|
||||||
|
wlr-layer-shell-unstable-v1-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) server-header \
|
||||||
|
protocols/wlr-layer-shell-unstable-v1.xml $@
|
||||||
|
|
||||||
|
wlr-layer-shell-unstable-v1-protocol.c:
|
||||||
|
$(WAYLAND_SCANNER) private-code \
|
||||||
|
protocols/wlr-layer-shell-unstable-v1.xml $@
|
||||||
|
|
||||||
|
wlr-layer-shell-unstable-v1-protocol.o: wlr-layer-shell-unstable-v1-protocol.h
|
||||||
|
|
||||||
|
idle-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) server-header \
|
||||||
|
protocols/idle.xml $@
|
||||||
|
|
||||||
|
idle-protocol.c:
|
||||||
|
$(WAYLAND_SCANNER) private-code \
|
||||||
|
protocols/idle.xml $@
|
||||||
|
|
||||||
|
idle-protocol.o: idle-protocol.h
|
||||||
|
|
||||||
|
config.h: | config.def.h
|
||||||
|
cp config.def.h $@
|
||||||
|
|
||||||
|
dwl.o: config.mk config.h client.h xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h idle-protocol.h util.h
|
||||||
|
|
||||||
|
dwl: xdg-shell-protocol.o wlr-layer-shell-unstable-v1-protocol.o idle-protocol.o util.o
|
||||||
|
|||||||
@@ -37,9 +37,7 @@ Feature *non-goals* for the main codebase include:
|
|||||||
|
|
||||||
## Building dwl
|
## Building dwl
|
||||||
|
|
||||||
dwl has only two dependencies: `wlroots` and `wayland-protocols`.
|
dwl has only two dependencies: wlroots and wayland-protocols. 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 version of wlroots, check out the [wlroots-next branch](https://github.com/djpohly/dwl/tree/wlroots-next).
|
||||||
|
|
||||||
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 version of wlroots, check out the [wlroots-next branch](https://github.com/djpohly/dwl/tree/wlroots-next).
|
|
||||||
|
|
||||||
To enable XWayland, you should also install xorg-xwayland and uncomment its flag in `config.mk`.
|
To enable XWayland, you should also install xorg-xwayland and uncomment its flag in `config.mk`.
|
||||||
|
|
||||||
@@ -73,14 +71,6 @@ If your startup command is a shell script, you can achieve the same inside the s
|
|||||||
|
|
||||||
exec <&-
|
exec <&-
|
||||||
|
|
||||||
Existing dwl-specific status bars and dwl-specific scripts for other status bars include:
|
|
||||||
- [somebar](https://sr.ht/~raphi/somebar/) status bar designed for dwl
|
|
||||||
- [dtaobarv2.sh](https://cdn.discordapp.com/attachments/792078050024095745/862428883423723560/dtaobarv2.sh) for use with [dtao](https://github.com/djpohly/dtao) (See "Pinned Messages" on the "customizations" channel of the [dwl Discord server](https://discord.gg/jJxZnrGPWN) for details.)
|
|
||||||
- [dwlbar.sh](https://cdn.discordapp.com/attachments/792078050024095745/810926218529472592/dwlbar.sh) for use with [waybar](https://github.com/Alexays/Waybar) (See "Pinned Messages" on the "customizations" channel of the [dwl Discord server](https://discord.gg/jJxZnrGPWN) for details.)
|
|
||||||
- [waybar-dwl](https://codeberg.org/fauxmight/waybar-dwl.git) for use with [waybar](https://github.com/Alexays/Waybar)
|
|
||||||
- [dwl-tags.sh](https://codeberg.org/novakane/yambar/src/branch/master/examples/scripts/dwl-tags.sh) for use with [yambar](https://codeberg.org/dnkl/yambar)
|
|
||||||
- [waybar-dwl.sh](https://gitee.com/guyuming76/personal/tree/dwl/gentoo/waybar-dwl) for use with [waybar](https://github.com/Alexays/Waybar) (ACCESS TO THIS SCRIPT REQUIRES gitee.com LOGIN!)
|
|
||||||
|
|
||||||
## Replacements for X applications
|
## Replacements for X applications
|
||||||
|
|
||||||
You can find a [list of Wayland applications on the sway wiki](https://github.com/swaywm/sway/wiki/i3-Migration-Guide).
|
You can find a [list of Wayland applications on the sway wiki](https://github.com/swaywm/sway/wiki/i3-Migration-Guide).
|
||||||
|
|||||||
@@ -26,25 +26,6 @@ client_surface(Client *c)
|
|||||||
return c->surface.xdg->surface;
|
return c->surface.xdg->surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline Client *
|
|
||||||
client_from_wlr_surface(struct wlr_surface *s)
|
|
||||||
{
|
|
||||||
struct wlr_xdg_surface *surface;
|
|
||||||
|
|
||||||
#ifdef XWAYLAND
|
|
||||||
struct wlr_xwayland_surface *xsurface;
|
|
||||||
if (s && wlr_surface_is_xwayland_surface(s)
|
|
||||||
&& (xsurface = wlr_xwayland_surface_from_wlr_surface(s)))
|
|
||||||
return xsurface->data;
|
|
||||||
#endif
|
|
||||||
if (s && wlr_surface_is_xdg_surface(s)
|
|
||||||
&& (surface = wlr_xdg_surface_from_wlr_surface(s))
|
|
||||||
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
|
||||||
return surface->data;
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The others */
|
/* The others */
|
||||||
static inline void
|
static inline void
|
||||||
client_activate_surface(struct wlr_surface *s, int activated)
|
client_activate_surface(struct wlr_surface *s, int activated)
|
||||||
@@ -100,32 +81,6 @@ client_get_geometry(Client *c, struct wlr_box *geom)
|
|||||||
wlr_xdg_surface_get_geometry(c->surface.xdg, geom);
|
wlr_xdg_surface_get_geometry(c->surface.xdg, geom);
|
||||||
}
|
}
|
||||||
|
|
||||||
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)) {
|
|
||||||
struct wlr_xwayland_surface_size_hints *size_hints;
|
|
||||||
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 const char *
|
static inline const char *
|
||||||
client_get_title(Client *c)
|
client_get_title(Client *c)
|
||||||
{
|
{
|
||||||
@@ -136,48 +91,42 @@ client_get_title(Client *c)
|
|||||||
return c->surface.xdg->toplevel->title;
|
return c->surface.xdg->toplevel->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline Client *
|
|
||||||
client_get_parent(Client *c)
|
|
||||||
{
|
|
||||||
Client *p;
|
|
||||||
#ifdef XWAYLAND
|
|
||||||
if (client_is_x11(c) && c->surface.xwayland->parent)
|
|
||||||
return client_from_wlr_surface(c->surface.xwayland->parent->surface);
|
|
||||||
#endif
|
|
||||||
if (c->surface.xdg->toplevel->parent)
|
|
||||||
return client_from_wlr_surface(c->surface.xdg->toplevel->parent->surface);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
||||||
|
struct wlr_xwayland_surface_size_hints *size_hints;
|
||||||
if (surface->modal)
|
if (surface->modal)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
for (size_t i = 0; i < surface->window_type_len; i++)
|
for (size_t 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 ((min.width > 0 || min.height > 0 || max.width > 0 || max.height > 0)
|
size_hints = surface->size_hints;
|
||||||
&& (min.width == max.width || min.height == max.height))
|
if (size_hints && size_hints->min_width > 0 && size_hints->min_height > 0
|
||||||
|| c->surface.xwayland->parent;
|
&& (size_hints->max_width == size_hints->min_width ||
|
||||||
|
size_hints->max_height == size_hints->min_height))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ((min.width > 0 || min.height > 0 || max.width > 0 || max.height > 0)
|
toplevel = c->surface.xdg->toplevel;
|
||||||
&& (min.width == max.width || min.height == max.height))
|
state = toplevel->current;
|
||||||
|| c->surface.xdg->toplevel->parent;
|
return (state.min_width != 0 && state.min_height != 0
|
||||||
|
&& (state.min_width == state.max_width
|
||||||
|
|| state.min_height == state.max_height))
|
||||||
|
|| toplevel->parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
@@ -258,27 +207,46 @@ client_surface_at(Client *c, double cx, double cy, double *sx, double *sy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
client_restack_surface(Client *c)
|
client_min_size(Client *c, int *width, int *height)
|
||||||
{
|
{
|
||||||
|
struct wlr_xdg_toplevel *toplevel;
|
||||||
|
struct wlr_xdg_toplevel_state *state;
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c))
|
if (client_is_x11(c)) {
|
||||||
wlr_xwayland_surface_restack(c->surface.xwayland, NULL,
|
struct wlr_xwayland_surface_size_hints *size_hints;
|
||||||
XCB_STACK_MODE_ABOVE);
|
size_hints = c->surface.xwayland->size_hints;
|
||||||
|
if (size_hints) {
|
||||||
|
*width = size_hints->min_width;
|
||||||
|
*height = size_hints->min_height;
|
||||||
|
} else {
|
||||||
|
*width = 0;
|
||||||
|
*height = 0;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return;
|
toplevel = c->surface.xdg->toplevel;
|
||||||
|
state = &toplevel->current;
|
||||||
|
*width = state->min_width;
|
||||||
|
*height = state->min_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *
|
static inline Client *
|
||||||
toplevel_from_popup(struct wlr_xdg_popup *popup)
|
client_from_wlr_surface(struct wlr_surface *surface)
|
||||||
|
{
|
||||||
|
struct wlr_scene_node *n = surface->data;
|
||||||
|
return n ? n->data : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline Client *
|
||||||
|
client_from_popup(struct wlr_xdg_popup *popup)
|
||||||
{
|
{
|
||||||
struct wlr_xdg_surface *surface = popup->base;
|
struct wlr_xdg_surface *surface = popup->base;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (surface->role) {
|
switch (surface->role) {
|
||||||
case WLR_XDG_SURFACE_ROLE_POPUP:
|
case WLR_XDG_SURFACE_ROLE_POPUP:
|
||||||
if (wlr_surface_is_layer_surface(surface->popup->parent))
|
if (!wlr_surface_is_xdg_surface(surface->popup->parent))
|
||||||
return wlr_layer_surface_v1_from_wlr_surface(surface->popup->parent)->data;
|
|
||||||
else if (!wlr_surface_is_xdg_surface(surface->popup->parent))
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
surface = wlr_xdg_surface_from_wlr_surface(surface->popup->parent);
|
surface = wlr_xdg_surface_from_wlr_surface(surface->popup->parent);
|
||||||
|
|||||||
+18
-29
@@ -5,8 +5,6 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscree
|
|||||||
static const float rootcolor[] = {0.3, 0.3, 0.3, 1.0};
|
static const float rootcolor[] = {0.3, 0.3, 0.3, 1.0};
|
||||||
static const float bordercolor[] = {0.5, 0.5, 0.5, 1.0};
|
static const float bordercolor[] = {0.5, 0.5, 0.5, 1.0};
|
||||||
static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0};
|
static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0};
|
||||||
/* 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};
|
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||||
@@ -43,7 +41,7 @@ static const struct xkb_rule_names xkb_rules = {
|
|||||||
/* example:
|
/* example:
|
||||||
.options = "ctrl:nocaps",
|
.options = "ctrl:nocaps",
|
||||||
*/
|
*/
|
||||||
.options = NULL,
|
.options = "",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int repeat_rate = 25;
|
static const int repeat_rate = 25;
|
||||||
@@ -64,21 +62,12 @@ LIBINPUT_CONFIG_SCROLL_EDGE
|
|||||||
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
|
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:
|
|
||||||
LIBINPUT_CONFIG_CLICK_METHOD_NONE
|
|
||||||
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS
|
|
||||||
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER
|
|
||||||
*/
|
|
||||||
static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
|
|
||||||
|
|
||||||
/* You can choose between:
|
/* You can choose between:
|
||||||
LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
|
LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
|
||||||
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED
|
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED
|
||||||
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
|
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
|
||||||
*/
|
*/
|
||||||
static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
|
static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
|
||||||
|
|
||||||
/* You can choose between:
|
/* You can choose between:
|
||||||
LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
|
LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
|
||||||
LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
|
LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
|
||||||
@@ -88,11 +77,11 @@ 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
|
||||||
#define TAGKEYS(KEY,TAG) \
|
#define TAGKEYS(KEY,SKEY,TAG) \
|
||||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
{ MODKEY|WLR_MODIFIER_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \
|
{ MODKEY|WLR_MODIFIER_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, KEY, tag, {.ui = 1 << TAG} }, \
|
{ MODKEY|WLR_MODIFIER_SHIFT, SKEY, tag, {.ui = 1 << TAG} }, \
|
||||||
{ MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT,KEY,toggletag, {.ui = 1 << TAG} }
|
{ MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT,SKEY,toggletag, {.ui = 1 << TAG} }
|
||||||
|
|
||||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
@@ -114,7 +103,7 @@ static const Key keys[] = {
|
|||||||
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} },
|
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} },
|
||||||
{ 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} },
|
||||||
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
||||||
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
||||||
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
||||||
@@ -122,21 +111,21 @@ static const Key keys[] = {
|
|||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
|
||||||
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
|
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
|
||||||
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
|
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_0, tag, {.ui = ~0} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
|
||||||
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
|
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
|
||||||
{ MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
|
{ MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_comma, tagmon, {.i = WLR_DIRECTION_LEFT} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_less, tagmon, {.i = WLR_DIRECTION_LEFT} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_period, tagmon, {.i = WLR_DIRECTION_RIGHT} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_greater, tagmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||||
TAGKEYS( XKB_KEY_1, 0),
|
TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0),
|
||||||
TAGKEYS( XKB_KEY_2, 1),
|
TAGKEYS( XKB_KEY_2, XKB_KEY_at, 1),
|
||||||
TAGKEYS( XKB_KEY_3, 2),
|
TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2),
|
||||||
TAGKEYS( XKB_KEY_4, 3),
|
TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3),
|
||||||
TAGKEYS( XKB_KEY_5, 4),
|
TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4),
|
||||||
TAGKEYS( XKB_KEY_6, 5),
|
TAGKEYS( XKB_KEY_6, XKB_KEY_asciicircum, 5),
|
||||||
TAGKEYS( XKB_KEY_7, 6),
|
TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
|
||||||
TAGKEYS( XKB_KEY_8, 7),
|
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
|
||||||
TAGKEYS( XKB_KEY_9, 8),
|
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_q, quit, {0} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
|
||||||
|
|
||||||
/* 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} },
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
_VERSION = 0.3.1
|
_VERSION = 0.3.1
|
||||||
VERSION = `./generate-version.sh $(_VERSION)`
|
VERSION = $(shell ./generate-version.sh $(_VERSION))
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANDIR = $(PREFIX)/share/man
|
MANDIR = $(PREFIX)/share/man
|
||||||
|
|
||||||
# Compile flags that can be used
|
# Default compile flags (overridable by environment)
|
||||||
#CFLAGS = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement
|
CFLAGS ?= -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement
|
||||||
|
|
||||||
XWAYLAND =
|
|
||||||
XLIBS =
|
|
||||||
# Uncomment to build XWayland support
|
# Uncomment to build XWayland support
|
||||||
#XWAYLAND = -DXWAYLAND
|
#CFLAGS += -DXWAYLAND
|
||||||
#XLIBS = xcb
|
|
||||||
|
|||||||
Reference in New Issue
Block a user