Compare commits
No commits in common. "89d740ee891b6530f80840f7a38beafa418056a1" and "d436530ed30d8284a4c8321fab7c3b455d8be036" have entirely different histories.
89d740ee89
...
d436530ed3
2
Makefile
2
Makefile
|
|
@ -16,7 +16,7 @@ LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS)
|
||||||
all: dwl
|
all: dwl
|
||||||
dwl: dwl.o util.o dwl-ipc-unstable-v2-protocol.o
|
dwl: dwl.o util.o dwl-ipc-unstable-v2-protocol.o
|
||||||
$(CC) dwl.o util.o dwl-ipc-unstable-v2-protocol.o $(LDLIBS) $(LDFLAGS) $(DWLCFLAGS) -o $@
|
$(CC) dwl.o util.o dwl-ipc-unstable-v2-protocol.o $(LDLIBS) $(LDFLAGS) $(DWLCFLAGS) -o $@
|
||||||
dwl.o: dwl.c env.c config.mk config.h client.h xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h dwl-ipc-unstable-v2-protocol.h
|
dwl.o: dwl.c config.mk config.h client.h xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h dwl-ipc-unstable-v2-protocol.h
|
||||||
util.o: util.c util.h
|
util.o: util.c util.h
|
||||||
dwl-ipc-unstable-v2-protocol.o: dwl-ipc-unstable-v2-protocol.h
|
dwl-ipc-unstable-v2-protocol.o: dwl-ipc-unstable-v2-protocol.h
|
||||||
|
|
||||||
|
|
|
||||||
13
config.def.h
13
config.def.h
|
|
@ -1,11 +1,9 @@
|
||||||
/* 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 int smartborders = 1;
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
static unsigned int borderpx = 1; /* border pixel of windows */
|
static const float bordercolor[] = {0.5, 0.5, 0.5, 1.0};
|
||||||
static float rootcolor[] = {0.3, 0.3, 0.3, 1.0};
|
static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0};
|
||||||
static float bordercolor[] = {0.5, 0.5, 0.5, 1.0};
|
|
||||||
static 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 */
|
/* 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};
|
||||||
|
|
||||||
|
|
@ -19,8 +17,6 @@ static const char *const autostart[] = {
|
||||||
#define TAGCOUNT (9)
|
#define TAGCOUNT (9)
|
||||||
static const int tagcount = TAGCOUNT;
|
static const int tagcount = TAGCOUNT;
|
||||||
|
|
||||||
static const int hide_type = 1;
|
|
||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* app_id title tags mask isfloating monitor */
|
/* app_id title tags mask isfloating monitor */
|
||||||
/* examples:
|
/* examples:
|
||||||
|
|
@ -120,10 +116,11 @@ static const char *menucmd[] = { "bemenu-run", NULL };
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
|
|
||||||
|
|
||||||
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
|
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||||
{ MODKEY, XKB_KEY_b, togglebar, {0}},
|
{ MODKEY, XKB_KEY_b, togglebar, {0}},
|
||||||
{ MODKEY, XKB_KEY_r, regions, SHCMD("grim -g \"$(slurp)\"") },
|
|
||||||
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
|
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
|
||||||
{ 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} },
|
||||||
|
|
|
||||||
172
dwl.c
172
dwl.c
|
|
@ -95,7 +95,6 @@ typedef struct {
|
||||||
const Arg arg;
|
const Arg arg;
|
||||||
} Button;
|
} Button;
|
||||||
|
|
||||||
typedef struct Pertag Pertag;
|
|
||||||
typedef struct Monitor Monitor;
|
typedef struct Monitor Monitor;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* Must keep these three elements in this order */
|
/* Must keep these three elements in this order */
|
||||||
|
|
@ -194,7 +193,6 @@ struct Monitor {
|
||||||
struct wlr_box w; /* window area, layout-relative */
|
struct wlr_box w; /* window area, layout-relative */
|
||||||
struct wl_list layers[4]; /* LayerSurface::link */
|
struct wl_list layers[4]; /* LayerSurface::link */
|
||||||
const Layout *lt[2];
|
const Layout *lt[2];
|
||||||
Pertag *pertag;
|
|
||||||
unsigned int seltags;
|
unsigned int seltags;
|
||||||
unsigned int sellt;
|
unsigned int sellt;
|
||||||
uint32_t tagset[2];
|
uint32_t tagset[2];
|
||||||
|
|
@ -285,7 +283,6 @@ static Client *focustop(Monitor *m);
|
||||||
static void fullscreennotify(struct wl_listener *listener, void *data);
|
static void fullscreennotify(struct wl_listener *listener, void *data);
|
||||||
static void handlesig(int signo);
|
static void handlesig(int signo);
|
||||||
static size_t getunusedtag(void);
|
static size_t getunusedtag(void);
|
||||||
static void hidecursor(int hide);
|
|
||||||
static void incnmaster(const Arg *arg);
|
static void incnmaster(const Arg *arg);
|
||||||
static void inputdevice(struct wl_listener *listener, void *data);
|
static void inputdevice(struct wl_listener *listener, void *data);
|
||||||
static int keybinding(uint32_t mods, xkb_keysym_t sym);
|
static int keybinding(uint32_t mods, xkb_keysym_t sym);
|
||||||
|
|
@ -312,7 +309,7 @@ static void quit(const Arg *arg);
|
||||||
static void restartdwl(const Arg *arg);
|
static void restartdwl(const Arg *arg);
|
||||||
static void rendermon(struct wl_listener *listener, void *data);
|
static void rendermon(struct wl_listener *listener, void *data);
|
||||||
static void requeststartdrag(struct wl_listener *listener, void *data);
|
static void requeststartdrag(struct wl_listener *listener, void *data);
|
||||||
static void resize(Client *c, struct wlr_box geo, int interact, int draw_borders);
|
static void resize(Client *c, struct wlr_box geo, int interact);
|
||||||
static void run(char *startup_cmd);
|
static void run(char *startup_cmd);
|
||||||
static void setcursor(struct wl_listener *listener, void *data);
|
static void setcursor(struct wl_listener *listener, void *data);
|
||||||
static void setfloating(Client *c, int floating);
|
static void setfloating(Client *c, int floating);
|
||||||
|
|
@ -345,7 +342,6 @@ static Monitor *xytomon(double x, double y);
|
||||||
static void 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);
|
Client **pc, LayerSurface **pl, double *nx, double *ny);
|
||||||
static void zoom(const Arg *arg);
|
static void zoom(const Arg *arg);
|
||||||
static void regions(const Arg *arg);
|
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
static const char broken[] = "broken";
|
static const char broken[] = "broken";
|
||||||
|
|
@ -379,7 +375,6 @@ static struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;
|
||||||
|
|
||||||
static struct wlr_cursor *cursor;
|
static struct wlr_cursor *cursor;
|
||||||
static struct wlr_xcursor_manager *cursor_mgr;
|
static struct wlr_xcursor_manager *cursor_mgr;
|
||||||
static int cursor_hidden;
|
|
||||||
|
|
||||||
static struct wlr_session_lock_manager_v1 *session_lock_mgr;
|
static struct wlr_session_lock_manager_v1 *session_lock_mgr;
|
||||||
static struct wlr_scene_rect *locked_bg;
|
static struct wlr_scene_rect *locked_bg;
|
||||||
|
|
@ -444,19 +439,9 @@ static Atom netatom[NetLast];
|
||||||
/* attempt to encapsulate suck into one file */
|
/* attempt to encapsulate suck into one file */
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
||||||
#include "env.c"
|
|
||||||
|
|
||||||
static pid_t *autostart_pids;
|
static pid_t *autostart_pids;
|
||||||
static size_t autostart_len;
|
static size_t autostart_len;
|
||||||
|
|
||||||
struct Pertag {
|
|
||||||
unsigned int curtag, prevtag; /* current and previous tag */
|
|
||||||
int nmasters[TAGCOUNT + 1]; /* number of windows in master area */
|
|
||||||
float mfacts[TAGCOUNT + 1]; /* mfacts per tag */
|
|
||||||
unsigned int sellts[TAGCOUNT + 1]; /* selected layouts */
|
|
||||||
const Layout *ltidxs[TAGCOUNT + 1][2]; /* matrix of tags and layouts indexes */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* function implementations */
|
/* function implementations */
|
||||||
void
|
void
|
||||||
applybounds(Client *c, struct wlr_box *bbox)
|
applybounds(Client *c, struct wlr_box *bbox)
|
||||||
|
|
@ -634,8 +619,6 @@ axisnotify(struct wl_listener *listener, void *data)
|
||||||
* for example when you move the scroll wheel. */
|
* for example when you move the scroll wheel. */
|
||||||
struct wlr_pointer_axis_event *event = data;
|
struct wlr_pointer_axis_event *event = data;
|
||||||
IDLE_NOTIFY_ACTIVITY;
|
IDLE_NOTIFY_ACTIVITY;
|
||||||
if(cursor_hidden)
|
|
||||||
hidecursor(0);
|
|
||||||
/* TODO: allow usage of scroll whell for mousebindings, it can be implemented
|
/* TODO: allow usage of scroll whell for mousebindings, it can be implemented
|
||||||
* checking the event's orientation and the delta of the event */
|
* checking the event's orientation and the delta of the event */
|
||||||
/* Notify the client with pointer focus of the axis event. */
|
/* Notify the client with pointer focus of the axis event. */
|
||||||
|
|
@ -654,8 +637,6 @@ buttonpress(struct wl_listener *listener, void *data)
|
||||||
const Button *b;
|
const Button *b;
|
||||||
|
|
||||||
IDLE_NOTIFY_ACTIVITY;
|
IDLE_NOTIFY_ACTIVITY;
|
||||||
if(cursor_hidden)
|
|
||||||
hidecursor(0);
|
|
||||||
|
|
||||||
switch (event->state) {
|
switch (event->state) {
|
||||||
case WLR_BUTTON_PRESSED:
|
case WLR_BUTTON_PRESSED:
|
||||||
|
|
@ -667,6 +648,7 @@ buttonpress(struct wl_listener *listener, void *data)
|
||||||
xytonode(cursor->x, cursor->y, NULL, &c, NULL, NULL, NULL);
|
xytonode(cursor->x, cursor->y, NULL, &c, NULL, NULL, NULL);
|
||||||
if (c && (!client_is_unmanaged(c) || client_wants_focus(c)))
|
if (c && (!client_is_unmanaged(c) || client_wants_focus(c)))
|
||||||
focusclient(c, 1);
|
focusclient(c, 1);
|
||||||
|
|
||||||
keyboard = wlr_seat_get_keyboard(seat);
|
keyboard = wlr_seat_get_keyboard(seat);
|
||||||
mods = keyboard ? wlr_keyboard_get_modifiers(keyboard) : 0;
|
mods = keyboard ? wlr_keyboard_get_modifiers(keyboard) : 0;
|
||||||
for (b = buttons; b < END(buttons); b++) {
|
for (b = buttons; b < END(buttons); b++) {
|
||||||
|
|
@ -793,7 +775,6 @@ cleanupmon(struct wl_listener *listener, void *data)
|
||||||
wlr_scene_output_destroy(m->scene_output);
|
wlr_scene_output_destroy(m->scene_output);
|
||||||
wlr_scene_node_destroy(&m->fullscreen_bg->node);
|
wlr_scene_node_destroy(&m->fullscreen_bg->node);
|
||||||
|
|
||||||
free(m->pertag);
|
|
||||||
closemon(m);
|
closemon(m);
|
||||||
free(m);
|
free(m);
|
||||||
}
|
}
|
||||||
|
|
@ -816,7 +797,7 @@ closemon(Monitor *m)
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
if (c->isfloating && c->geom.x > m->m.width)
|
if (c->isfloating && c->geom.x > m->m.width)
|
||||||
resize(c, (struct wlr_box){.x = c->geom.x - m->w.width, .y = c->geom.y,
|
resize(c, (struct wlr_box){.x = c->geom.x - m->w.width, .y = c->geom.y,
|
||||||
.width = c->geom.width, .height = c->geom.height}, 0, 1);
|
.width = c->geom.width, .height = c->geom.height}, 0);
|
||||||
if (c->mon == m)
|
if (c->mon == m)
|
||||||
setmon(c, selmon, c->tags);
|
setmon(c, selmon, c->tags);
|
||||||
}
|
}
|
||||||
|
|
@ -1036,18 +1017,6 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
wl_list_insert(&mons, &m->link);
|
wl_list_insert(&mons, &m->link);
|
||||||
printstatus();
|
printstatus();
|
||||||
|
|
||||||
m->pertag = calloc(1, sizeof(Pertag));
|
|
||||||
m->pertag->curtag = m->pertag->prevtag = 1;
|
|
||||||
|
|
||||||
for (i = 0; i <= TAGCOUNT; i++) {
|
|
||||||
m->pertag->nmasters[i] = m->nmaster;
|
|
||||||
m->pertag->mfacts[i] = m->mfact;
|
|
||||||
|
|
||||||
m->pertag->ltidxs[i][0] = m->lt[0];
|
|
||||||
m->pertag->ltidxs[i][1] = m->lt[1];
|
|
||||||
m->pertag->sellts[i] = m->sellt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The xdg-protocol specifies:
|
/* The xdg-protocol specifies:
|
||||||
*
|
*
|
||||||
* If the fullscreened surface is not opaque, the compositor must make
|
* If the fullscreened surface is not opaque, the compositor must make
|
||||||
|
|
@ -1130,10 +1099,10 @@ createpointer(struct wlr_pointer *pointer)
|
||||||
libinput_device_config_tap_set_drag_enabled(libinput_device, tap_and_drag);
|
libinput_device_config_tap_set_drag_enabled(libinput_device, tap_and_drag);
|
||||||
libinput_device_config_tap_set_drag_lock_enabled(libinput_device, drag_lock);
|
libinput_device_config_tap_set_drag_lock_enabled(libinput_device, drag_lock);
|
||||||
libinput_device_config_tap_set_button_map(libinput_device, button_map);
|
libinput_device_config_tap_set_button_map(libinput_device, button_map);
|
||||||
|
}
|
||||||
|
|
||||||
if (libinput_device_config_scroll_has_natural_scroll(libinput_device))
|
if (libinput_device_config_scroll_has_natural_scroll(libinput_device))
|
||||||
libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, natural_scrolling);
|
libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, natural_scrolling);
|
||||||
}
|
|
||||||
|
|
||||||
if (libinput_device_config_dwt_is_available(libinput_device))
|
if (libinput_device_config_dwt_is_available(libinput_device))
|
||||||
libinput_device_config_dwt_set_enabled(libinput_device, disable_while_typing);
|
libinput_device_config_dwt_set_enabled(libinput_device, disable_while_typing);
|
||||||
|
|
@ -1157,8 +1126,6 @@ createpointer(struct wlr_pointer *pointer)
|
||||||
libinput_device_config_accel_set_profile(libinput_device, accel_profile);
|
libinput_device_config_accel_set_profile(libinput_device, accel_profile);
|
||||||
libinput_device_config_accel_set_speed(libinput_device, accel_speed);
|
libinput_device_config_accel_set_speed(libinput_device, accel_speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
inputconfig(libinput_device);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_cursor_attach_input_device(cursor, &pointer->base);
|
wlr_cursor_attach_input_device(cursor, &pointer->base);
|
||||||
|
|
@ -1635,20 +1602,6 @@ getunusedtag(void)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
hidecursor(int hide)
|
|
||||||
{
|
|
||||||
if (hide) {
|
|
||||||
wlr_cursor_set_image(cursor, NULL, 0, 0, 0, 0, 0, 0);
|
|
||||||
wlr_seat_pointer_notify_clear_focus(seat);
|
|
||||||
cursor_hidden = 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
wlr_xcursor_manager_set_cursor_image(cursor_mgr, "left_ptr", cursor);
|
|
||||||
cursor_hidden = false;
|
|
||||||
motionnotify(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
handlesig(int signo)
|
handlesig(int signo)
|
||||||
{
|
{
|
||||||
|
|
@ -1688,7 +1641,7 @@ incnmaster(const Arg *arg)
|
||||||
{
|
{
|
||||||
if (!arg || !selmon)
|
if (!arg || !selmon)
|
||||||
return;
|
return;
|
||||||
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0);
|
selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1787,8 +1740,6 @@ keypress(struct wl_listener *listener, void *data)
|
||||||
wlr_seat_set_keyboard(seat, kb->wlr_keyboard);
|
wlr_seat_set_keyboard(seat, kb->wlr_keyboard);
|
||||||
wlr_seat_keyboard_notify_key(seat, event->time_msec,
|
wlr_seat_keyboard_notify_key(seat, event->time_msec,
|
||||||
event->keycode, event->state);
|
event->keycode, event->state);
|
||||||
if(hide_type)
|
|
||||||
hidecursor(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1959,7 +1910,7 @@ monocle(Monitor *m)
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
||||||
continue;
|
continue;
|
||||||
resize(c, m->w, 0, !smartborders);
|
resize(c, m->w, 0);
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
if (n)
|
if (n)
|
||||||
|
|
@ -1994,8 +1945,6 @@ motionnotify(uint32_t time)
|
||||||
/* time is 0 in internal calls meant to restore pointer focus. */
|
/* time is 0 in internal calls meant to restore pointer focus. */
|
||||||
if (time) {
|
if (time) {
|
||||||
IDLE_NOTIFY_ACTIVITY;
|
IDLE_NOTIFY_ACTIVITY;
|
||||||
if(cursor_hidden)
|
|
||||||
hidecursor(0);
|
|
||||||
|
|
||||||
/* Update selmon (even while dragging a window) */
|
/* Update selmon (even while dragging a window) */
|
||||||
if (sloppyfocus)
|
if (sloppyfocus)
|
||||||
|
|
@ -2009,11 +1958,11 @@ motionnotify(uint32_t time)
|
||||||
if (cursor_mode == CurMove) {
|
if (cursor_mode == CurMove) {
|
||||||
/* Move the grabbed client to the new position. */
|
/* Move the grabbed client to the new position. */
|
||||||
resize(grabc, (struct wlr_box){.x = cursor->x - grabcx, .y = cursor->y - grabcy,
|
resize(grabc, (struct wlr_box){.x = cursor->x - grabcx, .y = cursor->y - grabcy,
|
||||||
.width = grabc->geom.width, .height = grabc->geom.height}, 1, 1);
|
.width = grabc->geom.width, .height = grabc->geom.height}, 1);
|
||||||
return;
|
return;
|
||||||
} else if (cursor_mode == CurResize) {
|
} else if (cursor_mode == CurResize) {
|
||||||
resize(grabc, (struct wlr_box){.x = grabc->geom.x, .y = grabc->geom.y,
|
resize(grabc, (struct wlr_box){.x = grabc->geom.x, .y = grabc->geom.y,
|
||||||
.width = cursor->x - grabc->geom.x, .height = cursor->y - grabc->geom.y}, 1, 1);
|
.width = cursor->x - grabc->geom.x, .height = cursor->y - grabc->geom.y}, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2271,12 +2220,11 @@ requeststartdrag(struct wl_listener *listener, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
resize(Client *c, struct wlr_box geo, int interact, int draw_borders)
|
resize(Client *c, struct wlr_box geo, int interact)
|
||||||
{
|
{
|
||||||
struct wlr_box *bbox = interact ? &sgeom : &c->mon->w;
|
struct wlr_box *bbox = interact ? &sgeom : &c->mon->w;
|
||||||
client_set_bounds(c, geo.width, geo.height);
|
client_set_bounds(c, geo.width, geo.height);
|
||||||
c->geom = geo;
|
c->geom = geo;
|
||||||
c->bw = draw_borders ? borderpx : 0;
|
|
||||||
applybounds(c, bbox);
|
applybounds(c, bbox);
|
||||||
|
|
||||||
/* Update scene-graph, including borders */
|
/* Update scene-graph, including borders */
|
||||||
|
|
@ -2376,8 +2324,6 @@ setfloating(Client *c, int floating)
|
||||||
if (!c->mon)
|
if (!c->mon)
|
||||||
return;
|
return;
|
||||||
wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]);
|
wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]);
|
||||||
if (c->isfloating && !c->bw)
|
|
||||||
resize(c, c->mon->m, 0, 1);
|
|
||||||
arrange(c->mon);
|
arrange(c->mon);
|
||||||
printstatus();
|
printstatus();
|
||||||
}
|
}
|
||||||
|
|
@ -2395,11 +2341,11 @@ setfullscreen(Client *c, int fullscreen)
|
||||||
|
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
c->prev = c->geom;
|
c->prev = c->geom;
|
||||||
resize(c, c->mon->m, 0, 0);
|
resize(c, c->mon->m, 0);
|
||||||
} else {
|
} else {
|
||||||
/* restore previous size instead of arrange for floating windows since
|
/* restore previous size instead of arrange for floating windows since
|
||||||
* client positions are set by the user and cannot be recalculated */
|
* client positions are set by the user and cannot be recalculated */
|
||||||
resize(c, c->prev, 0, 1);
|
resize(c, c->prev, 0);
|
||||||
}
|
}
|
||||||
arrange(c->mon);
|
arrange(c->mon);
|
||||||
printstatus();
|
printstatus();
|
||||||
|
|
@ -2411,16 +2357,10 @@ setlayout(const Arg *arg)
|
||||||
if (!selmon)
|
if (!selmon)
|
||||||
return;
|
return;
|
||||||
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
|
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
|
||||||
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag] ^= 1;
|
selmon->sellt ^= 1;
|
||||||
if (arg && arg->v)
|
if (arg && arg->v)
|
||||||
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v;
|
selmon->lt[selmon->sellt] = (Layout *)arg->v;
|
||||||
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, LENGTH(selmon->ltsymbol));
|
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, LENGTH(selmon->ltsymbol));
|
||||||
if (!selmon->lt[selmon->sellt]->arrange) {
|
|
||||||
/* floating layout, draw borders around all clients */
|
|
||||||
Client *c;
|
|
||||||
wl_list_for_each(c, &clients, link)
|
|
||||||
resize(c, c->mon->m, 0, 1);
|
|
||||||
}
|
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
printstatus();
|
printstatus();
|
||||||
}
|
}
|
||||||
|
|
@ -2436,7 +2376,7 @@ setmfact(const Arg *arg)
|
||||||
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
|
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
|
||||||
if (f < 0.1 || f > 0.9)
|
if (f < 0.1 || f > 0.9)
|
||||||
return;
|
return;
|
||||||
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f;
|
selmon->mfact = f;
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2455,7 +2395,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||||
arrange(oldmon);
|
arrange(oldmon);
|
||||||
if (m) {
|
if (m) {
|
||||||
/* Make sure window actually overlaps with the monitor */
|
/* Make sure window actually overlaps with the monitor */
|
||||||
resize(c, c->geom, 0, 1);
|
resize(c, c->geom, 0);
|
||||||
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
|
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||||
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
||||||
setfloating(c, c->isfloating);
|
setfloating(c, c->isfloating);
|
||||||
|
|
@ -2724,7 +2664,7 @@ tagmon(const Arg *arg)
|
||||||
void
|
void
|
||||||
tile(Monitor *m)
|
tile(Monitor *m)
|
||||||
{
|
{
|
||||||
unsigned int i, n = 0, mw, my, ty, draw_borders = 1;
|
unsigned int i, n = 0, mw, my, ty;
|
||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
wl_list_for_each(c, &clients, link)
|
wl_list_for_each(c, &clients, link)
|
||||||
|
|
@ -2733,9 +2673,6 @@ tile(Monitor *m)
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (n == smartborders)
|
|
||||||
draw_borders = 0;
|
|
||||||
|
|
||||||
if (n > m->nmaster)
|
if (n > m->nmaster)
|
||||||
mw = m->nmaster ? m->w.width * m->mfact : 0;
|
mw = m->nmaster ? m->w.width * m->mfact : 0;
|
||||||
else
|
else
|
||||||
|
|
@ -2746,11 +2683,11 @@ tile(Monitor *m)
|
||||||
continue;
|
continue;
|
||||||
if (i < m->nmaster) {
|
if (i < m->nmaster) {
|
||||||
resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + my, .width = mw,
|
resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + my, .width = mw,
|
||||||
.height = (m->w.height - my) / (MIN(n, m->nmaster) - i)}, 0, draw_borders);
|
.height = (m->w.height - my) / (MIN(n, m->nmaster) - i)}, 0);
|
||||||
my += c->geom.height;
|
my += c->geom.height;
|
||||||
} else {
|
} else {
|
||||||
resize(c, (struct wlr_box){.x = m->w.x + mw, .y = m->w.y + ty,
|
resize(c, (struct wlr_box){.x = m->w.x + mw, .y = m->w.y + ty,
|
||||||
.width = m->w.width - mw, .height = (m->w.height - ty) / (n - i)}, 0, draw_borders);
|
.width = m->w.width - mw, .height = (m->w.height - ty) / (n - i)}, 0);
|
||||||
ty += c->geom.height;
|
ty += c->geom.height;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
|
@ -2809,7 +2746,6 @@ toggleview(const Arg *arg)
|
||||||
{
|
{
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
uint32_t newtagset = selmon ? selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK) : 0;
|
uint32_t newtagset = selmon ? selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK) : 0;
|
||||||
size_t i;
|
|
||||||
|
|
||||||
if (!newtagset)
|
if (!newtagset)
|
||||||
return;
|
return;
|
||||||
|
|
@ -2818,25 +2754,6 @@ toggleview(const Arg *arg)
|
||||||
if (m !=selmon && newtagset & m->tagset[m->seltags])
|
if (m !=selmon && newtagset & m->tagset[m->seltags])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (newtagset == ~0) {
|
|
||||||
selmon->pertag->prevtag = selmon->pertag->curtag;
|
|
||||||
selmon->pertag->curtag = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* test if the user did not select the same tag */
|
|
||||||
if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) {
|
|
||||||
selmon->pertag->prevtag = selmon->pertag->curtag;
|
|
||||||
for (i = 0; !(newtagset & 1 << i); i++) ;
|
|
||||||
selmon->pertag->curtag = i + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* apply settings for this view */
|
|
||||||
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
|
|
||||||
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
|
|
||||||
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
|
|
||||||
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
|
|
||||||
selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
|
|
||||||
|
|
||||||
selmon->tagset[selmon->seltags] = newtagset;
|
selmon->tagset[selmon->seltags] = newtagset;
|
||||||
attachclients(selmon);
|
attachclients(selmon);
|
||||||
focusclient(focustop(selmon), 1);
|
focusclient(focustop(selmon), 1);
|
||||||
|
|
@ -3009,7 +2926,6 @@ view(const Arg *arg)
|
||||||
{
|
{
|
||||||
Monitor *m, *origm = selmon;
|
Monitor *m, *origm = selmon;
|
||||||
unsigned int newtags = selmon->tagset[selmon->seltags ^ 1];
|
unsigned int newtags = selmon->tagset[selmon->seltags ^ 1];
|
||||||
size_t i, tmptag;
|
|
||||||
|
|
||||||
if (!selmon || (arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
|
if (!selmon || (arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
|
||||||
return;
|
return;
|
||||||
|
|
@ -3033,28 +2949,8 @@ view(const Arg *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
origm->seltags ^= 1; /* toggle sel tagset */
|
origm->seltags ^= 1; /* toggle sel tagset */
|
||||||
if (arg->ui & TAGMASK) {
|
if (arg->ui & TAGMASK)
|
||||||
origm->tagset[origm->seltags] = arg->ui & TAGMASK;
|
origm->tagset[origm->seltags] = arg->ui & TAGMASK;
|
||||||
origm->pertag->prevtag = origm->pertag->curtag;
|
|
||||||
|
|
||||||
if (arg->ui == ~0)
|
|
||||||
origm->pertag->curtag = 0;
|
|
||||||
else {
|
|
||||||
for (i = 0; !(arg->ui & 1 << i); i++) ;
|
|
||||||
origm->pertag->curtag = i + 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tmptag = origm->pertag->prevtag;
|
|
||||||
origm->pertag->prevtag = origm->pertag->curtag;
|
|
||||||
origm->pertag->curtag = tmptag;
|
|
||||||
}
|
|
||||||
|
|
||||||
origm->nmaster = origm->pertag->nmasters[origm->pertag->curtag];
|
|
||||||
origm->mfact = origm->pertag->mfacts[origm->pertag->curtag];
|
|
||||||
origm->sellt = origm->pertag->sellts[origm->pertag->curtag];
|
|
||||||
origm->lt[origm->sellt] = origm->pertag->ltidxs[origm->pertag->curtag][origm->sellt];
|
|
||||||
origm->lt[origm->sellt^1] = origm->pertag->ltidxs[origm->pertag->curtag][origm->sellt^1];
|
|
||||||
|
|
||||||
attachclients(origm);
|
attachclients(origm);
|
||||||
focusclient(focustop(origm), 1);
|
focusclient(focustop(origm), 1);
|
||||||
arrange(origm);
|
arrange(origm);
|
||||||
|
|
@ -3138,33 +3034,6 @@ zoom(const Arg *arg)
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
regions(const Arg *arg)
|
|
||||||
{
|
|
||||||
int pipefd[2];
|
|
||||||
Client *c;
|
|
||||||
Monitor *m;
|
|
||||||
|
|
||||||
if (pipe(pipefd) == -1)
|
|
||||||
return;
|
|
||||||
if (fork() == 0) {
|
|
||||||
close(pipefd[1]);
|
|
||||||
dup2(pipefd[0], STDIN_FILENO);
|
|
||||||
close(pipefd[0]);
|
|
||||||
setsid();
|
|
||||||
execvp(((char **)arg->v)[0], (char **)arg->v);
|
|
||||||
die("dwl: execvp %s failed:", ((char **)arg->v)[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
close(pipefd[0]);
|
|
||||||
wl_list_for_each(m, &mons, link)
|
|
||||||
wl_list_for_each(c, &clients, link)
|
|
||||||
if (VISIBLEON(c, m))
|
|
||||||
dprintf(pipefd[1], "%d,%d %dx%d\n",
|
|
||||||
c->geom.x, c->geom.y, c->geom.width, c->geom.height);
|
|
||||||
close(pipefd[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
void
|
void
|
||||||
activatex11(struct wl_listener *listener, void *data)
|
activatex11(struct wl_listener *listener, void *data)
|
||||||
|
|
@ -3185,7 +3054,7 @@ configurex11(struct wl_listener *listener, void *data)
|
||||||
return;
|
return;
|
||||||
if (c->isfloating || c->type == X11Unmanaged)
|
if (c->isfloating || c->type == X11Unmanaged)
|
||||||
resize(c, (struct wlr_box){.x = event->x, .y = event->y,
|
resize(c, (struct wlr_box){.x = event->x, .y = event->y,
|
||||||
.width = event->width, .height = event->height}, 0, 1);
|
.width = event->width, .height = event->height}, 0);
|
||||||
else
|
else
|
||||||
arrange(c->mon);
|
arrange(c->mon);
|
||||||
}
|
}
|
||||||
|
|
@ -3289,7 +3158,6 @@ main(int argc, char *argv[])
|
||||||
/* Wayland requires XDG_RUNTIME_DIR for creating its communications socket */
|
/* Wayland requires XDG_RUNTIME_DIR for creating its communications socket */
|
||||||
if (!getenv("XDG_RUNTIME_DIR"))
|
if (!getenv("XDG_RUNTIME_DIR"))
|
||||||
die("XDG_RUNTIME_DIR must be set");
|
die("XDG_RUNTIME_DIR must be set");
|
||||||
loadtheme();
|
|
||||||
setup();
|
setup();
|
||||||
run(startup_cmd);
|
run(startup_cmd);
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
|
||||||
213
env.c
213
env.c
|
|
@ -1,213 +0,0 @@
|
||||||
static int
|
|
||||||
isenabled(const char *val, int def)
|
|
||||||
{
|
|
||||||
return ((def && (!val || !val[0] || (val[0] != '0'))) || (!def && (val && val[0] && (val[0] != '0'))));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
setclickmethod(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
long l;
|
|
||||||
char *end = NULL;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_CLICK_METHOD");
|
|
||||||
if (!val || !val[0])
|
|
||||||
return;
|
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
l = strtol(val, &end, 10);
|
|
||||||
if (errno || (end && *end))
|
|
||||||
return;
|
|
||||||
|
|
||||||
libinput_device_config_click_set_method(libinput_device,
|
|
||||||
(enum libinput_config_click_method)l);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
settap(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_TAP");
|
|
||||||
if (val) {
|
|
||||||
if (!val[0])
|
|
||||||
return;
|
|
||||||
|
|
||||||
libinput_device_config_tap_set_enabled(libinput_device,
|
|
||||||
isenabled(val, 1) ? LIBINPUT_CONFIG_TAP_ENABLED :
|
|
||||||
LIBINPUT_CONFIG_TAP_DISABLED);
|
|
||||||
} else if (tap_to_click && libinput_device_config_tap_get_finger_count(libinput_device))
|
|
||||||
libinput_device_config_tap_set_enabled(libinput_device,
|
|
||||||
LIBINPUT_CONFIG_TAP_ENABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
settapanddrag(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_DRAG");
|
|
||||||
if (val && val[0])
|
|
||||||
libinput_device_config_tap_set_drag_enabled(libinput_device,
|
|
||||||
isenabled(val, 1) ? LIBINPUT_CONFIG_DRAG_ENABLED :
|
|
||||||
LIBINPUT_CONFIG_DRAG_DISABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
setnaturalscroll(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_NATURAL_SCROLL");
|
|
||||||
if (val && val[0])
|
|
||||||
libinput_device_config_scroll_set_natural_scroll_enabled(
|
|
||||||
libinput_device, isenabled(val, 0));
|
|
||||||
else if (!val && libinput_device_config_scroll_has_natural_scroll(libinput_device))
|
|
||||||
libinput_device_config_scroll_set_natural_scroll_enabled(
|
|
||||||
libinput_device, natural_scrolling);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
setaccelprofile(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
double profile;
|
|
||||||
char *end = NULL;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_ACCELERATION_PROFILE");
|
|
||||||
if (!val || !val[0])
|
|
||||||
return;
|
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
profile = strtod(val, &end);
|
|
||||||
if (errno || (end && *end))
|
|
||||||
return;
|
|
||||||
|
|
||||||
libinput_device_config_accel_set_profile(libinput_device,
|
|
||||||
(enum libinput_config_accel_profile)profile);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
setaccelspeed(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
double accel = 0;
|
|
||||||
char *end = NULL;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_ACCELERATION");
|
|
||||||
if (!val || !val[0])
|
|
||||||
return;
|
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
accel = strtod(val, &end);
|
|
||||||
if (errno || (end && *end) || (accel < -1) || (accel > 1))
|
|
||||||
return;
|
|
||||||
|
|
||||||
libinput_device_config_accel_set_speed(libinput_device, accel);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
setscrollmethod(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
long l;
|
|
||||||
char *end = NULL;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_SCROLL_METHOD");
|
|
||||||
if (!val || !val[0])
|
|
||||||
return;
|
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
l = strtol(val, &end, 10);
|
|
||||||
if (errno || (end && *end))
|
|
||||||
return;
|
|
||||||
|
|
||||||
libinput_device_config_scroll_set_method(libinput_device,
|
|
||||||
(enum libinput_config_scroll_method)l);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
setdwt(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_DISABLE_WHILE_TYPING");
|
|
||||||
if (val && val[0])
|
|
||||||
libinput_device_config_dwt_set_enabled(libinput_device,
|
|
||||||
isenabled(val, false) ? LIBINPUT_CONFIG_DWT_ENABLED :
|
|
||||||
LIBINPUT_CONFIG_DWT_DISABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
setmiddleemul(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_MIDDLE_EMULATION");
|
|
||||||
if (val && val[0])
|
|
||||||
libinput_device_config_middle_emulation_set_enabled(libinput_device,
|
|
||||||
isenabled(val, false) ? LIBINPUT_CONFIG_MIDDLE_EMULATION_ENABLED :
|
|
||||||
LIBINPUT_CONFIG_MIDDLE_EMULATION_DISABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
setlefthanded(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
|
|
||||||
val = getenv("LIBINPUT_DEFAULT_LEFT_HANDED");
|
|
||||||
if (val && val[0])
|
|
||||||
libinput_device_config_left_handed_set(libinput_device,
|
|
||||||
isenabled(val, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
inputconfig(struct libinput_device *libinput_device)
|
|
||||||
{
|
|
||||||
setclickmethod(libinput_device);
|
|
||||||
settap(libinput_device);
|
|
||||||
settapanddrag(libinput_device);
|
|
||||||
setnaturalscroll(libinput_device);
|
|
||||||
setaccelprofile(libinput_device);
|
|
||||||
setaccelspeed(libinput_device);
|
|
||||||
setscrollmethod(libinput_device);
|
|
||||||
setdwt(libinput_device);
|
|
||||||
setmiddleemul(libinput_device);
|
|
||||||
setlefthanded(libinput_device);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
parsecolor(const char *val, float color[4])
|
|
||||||
{
|
|
||||||
uint8_t r, g, b;
|
|
||||||
if (sscanf(val, "#%02hhx%02hhx%02hhx", &r, &g, &b) == 3) {
|
|
||||||
color[0] = (float)r / 0xFF;
|
|
||||||
color[1] = (float)g / 0xFF;
|
|
||||||
color[2] = (float)b / 0xFF;
|
|
||||||
color[3] = 1.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
loadtheme(void)
|
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
unsigned int tmp;
|
|
||||||
|
|
||||||
val = getenv("DWL_ROOT_COLOR");
|
|
||||||
if (val)
|
|
||||||
parsecolor(val, rootcolor);
|
|
||||||
|
|
||||||
val = getenv("DWL_BORDER_COLOR");
|
|
||||||
if (val)
|
|
||||||
parsecolor(val, bordercolor);
|
|
||||||
|
|
||||||
val = getenv("DWL_FOCUS_COLOR");
|
|
||||||
if (val)
|
|
||||||
parsecolor(val, focuscolor);
|
|
||||||
|
|
||||||
val = getenv("DWL_BORDER");
|
|
||||||
if (val && sscanf(val, "%u", &tmp) == 1)
|
|
||||||
borderpx = tmp;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue