Compare commits

...

10 Commits

Author SHA1 Message Date
Leonardo Hernández Hernández 342850487a
include dwl.desktop in the tarbal 2023-09-24 14:43:30 -06:00
Leonardo Hernández Hernández 5baf195523
allow specify DATADIR (to install desktop file) 2023-09-24 11:24:39 -06:00
Weiseguy 773bd04764 Add desktop entry file 2023-09-22 19:49:18 -06:00
Angelo Antony 755fcae2af fix typo 2023-09-10 10:42:33 -06:00
Leonardo Hernández Hernández 960c32a7d8
call setfloating in setmon
since in the previous commit we may not applying floating in clients
this is to make sure we do
2023-09-06 22:23:37 -06:00
Leonardo Hernández Hernández aea8dd6ae1
return early if the client doesn't have monitor in setfloating
there is still a bug, but for now this prevents a segfault

Bug: https://github.com/djpohly/dwl/issues/472
2023-09-06 22:22:21 -06:00
Leonardo Hernández Hernández c1d8b77f7f
prefer IRC over Discord
I regularly check the discord server, but it is much more likely that I will be
online on IRC, and djpohly does not seem to be active on either.
2023-08-23 00:32:15 -06:00
Ben Collerson e5367753bb just add define 2023-08-22 22:20:39 -06:00
Ben Collerson 9be85c1117 tagcount should have been a #define 2023-08-22 22:20:39 -06:00
Leonardo Hernández Hernández 4b8c1bf31e
return nothing in xytonode()
we do not use the node
2023-08-22 14:48:29 -06:00
7 changed files with 22 additions and 9 deletions

View File

@ -40,7 +40,7 @@ clean:
dist: clean
mkdir -p dwl-$(VERSION)
cp -R LICENSE* Makefile 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)
tar -caf dwl-$(VERSION).tar.gz dwl-$(VERSION)
rm -rf dwl-$(VERSION)
@ -52,8 +52,11 @@ install: dwl
mkdir -p $(DESTDIR)$(MANDIR)/man1
cp -f dwl.1 $(DESTDIR)$(MANDIR)/man1
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:
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
.c.o:

View File

@ -1,6 +1,7 @@
# 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
intended to fill the same space in the Wayland world that dwm does in X11,
@ -143,7 +144,7 @@ inspiration, and to the various contributors to the project, including:
[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/
[wlroots]: https://gitlab.freedesktop.org/wlroots/wlroots/
[wlroots-next branch]: https://github.com/djpohly/dwl/tree/wlroots-next

View File

@ -8,7 +8,8 @@ static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0};
static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0};
/* tagging - tagcount must be no greater than 31 */
static const int tagcount = 9;
#define TAGCOUNT (9)
static const int tagcount = TAGCOUNT;
static const Rule rules[] = {
/* app_id title tags mask isfloating monitor */

View File

@ -6,6 +6,7 @@ PKG_CONFIG = pkg-config
# paths
PREFIX = /usr/local
MANDIR = $(PREFIX)/share/man
DATADIR = $(PREFIX)/share
XWAYLAND =
XLIBS =

2
dwl.1
View File

@ -101,7 +101,7 @@ These environment variables are used by
A directory where temporary user files, such as the Wayland socket,
are stored.
.It Ev XDG_CONFIG_DIR
A directory containung configuration of various programs and
A directory containing configuration of various programs and
libraries, including libxkbcommon.
.It Ev DISPLAY , WAYLAND_DISPLAY , WAYLAND_SOCKET
Tell how to connect to an underlying X11 or Wayland server.

8
dwl.c
View File

@ -315,7 +315,7 @@ static void urgent(struct wl_listener *listener, void *data);
static void view(const Arg *arg);
static void virtualkeyboard(struct wl_listener *listener, void *data);
static Monitor *xytomon(double x, double y);
static struct wlr_scene_node *xytonode(double x, double y, struct wlr_surface **psurface,
static void xytonode(double x, double y, struct wlr_surface **psurface,
Client **pc, LayerSurface **pl, double *nx, double *ny);
static void zoom(const Arg *arg);
@ -2026,6 +2026,8 @@ void
setfloating(Client *c, int floating)
{
c->isfloating = floating;
if (!c->mon)
return;
wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]);
arrange(c->mon);
printstatus();
@ -2101,6 +2103,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
resize(c, c->geom, 0);
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
setfloating(c, c->isfloating);
}
focusclient(focustop(selmon), 1);
}
@ -2620,7 +2623,7 @@ xytomon(double x, double y)
return o ? o->data : NULL;
}
struct wlr_scene_node *
void
xytonode(double x, double y, struct wlr_surface **psurface,
Client **pc, LayerSurface **pl, double *nx, double *ny)
{
@ -2649,7 +2652,6 @@ xytonode(double x, double y, struct wlr_surface **psurface,
if (psurface) *psurface = surface;
if (pc) *pc = c;
if (pl) *pl = l;
return node;
}
void

5
dwl.desktop Normal file
View File

@ -0,0 +1,5 @@
[Desktop Entry]
Name=dwl
Comment=dwm for Wayland
Exec=dwl
Type=Application