Compare commits
No commits in common. "82b596bfdf6fdfb38a48f8afc7799e87bb5e1a0e" and "e64fa9637706a21a71953e402086cec35ea6cbb5" have entirely different histories.
82b596bfdf
...
e64fa96377
@ -62,9 +62,9 @@ static const Layout layouts[] = {
|
|||||||
/* key definitions */
|
/* key definitions */
|
||||||
#define MODKEY Mod4Mask
|
#define MODKEY Mod4Mask
|
||||||
#define TAGKEYS(KEY,TAG) \
|
#define TAGKEYS(KEY,TAG) \
|
||||||
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||||
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
|
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
{ MODKEY|ControlMask|ShiftMask, KEY, 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 */
|
||||||
|
|||||||
43
dwm.c
43
dwm.c
@ -256,11 +256,6 @@ static int xerrorstart(Display *dpy, XErrorEvent *ee);
|
|||||||
static void xinitvisual();
|
static void xinitvisual();
|
||||||
static void zoom(const Arg *arg);
|
static void zoom(const Arg *arg);
|
||||||
|
|
||||||
static void keyrelease(XEvent *e);
|
|
||||||
static void combotag(const Arg *arg);
|
|
||||||
static void comboview(const Arg *arg);
|
|
||||||
|
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
static const char autostartblocksh[] = "autostart_blocking.sh";
|
static const char autostartblocksh[] = "autostart_blocking.sh";
|
||||||
static const char autostartsh[] = "autostart.sh";
|
static const char autostartsh[] = "autostart.sh";
|
||||||
@ -276,7 +271,6 @@ static int (*xerrorxlib)(Display *, XErrorEvent *);
|
|||||||
static unsigned int numlockmask = 0;
|
static unsigned int numlockmask = 0;
|
||||||
static void (*handler[LASTEvent]) (XEvent *) = {
|
static void (*handler[LASTEvent]) (XEvent *) = {
|
||||||
[ButtonPress] = buttonpress,
|
[ButtonPress] = buttonpress,
|
||||||
[ButtonRelease] = keyrelease,
|
|
||||||
[ClientMessage] = clientmessage,
|
[ClientMessage] = clientmessage,
|
||||||
[ConfigureRequest] = configurerequest,
|
[ConfigureRequest] = configurerequest,
|
||||||
[ConfigureNotify] = configurenotify,
|
[ConfigureNotify] = configurenotify,
|
||||||
@ -284,7 +278,6 @@ static void (*handler[LASTEvent]) (XEvent *) = {
|
|||||||
[EnterNotify] = enternotify,
|
[EnterNotify] = enternotify,
|
||||||
[Expose] = expose,
|
[Expose] = expose,
|
||||||
[FocusIn] = focusin,
|
[FocusIn] = focusin,
|
||||||
[KeyRelease] = keyrelease,
|
|
||||||
[KeyPress] = keypress,
|
[KeyPress] = keypress,
|
||||||
[MappingNotify] = mappingnotify,
|
[MappingNotify] = mappingnotify,
|
||||||
[MapRequest] = maprequest,
|
[MapRequest] = maprequest,
|
||||||
@ -325,42 +318,6 @@ struct Pertag {
|
|||||||
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
|
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
|
||||||
|
|
||||||
/* function implementations */
|
/* function implementations */
|
||||||
static int combo = 0;
|
|
||||||
|
|
||||||
void
|
|
||||||
keyrelease(XEvent *e) {
|
|
||||||
combo = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
combotag(const Arg *arg) {
|
|
||||||
if(selmon->sel && arg->ui & TAGMASK) {
|
|
||||||
if (combo) {
|
|
||||||
selmon->sel->tags |= arg->ui & TAGMASK;
|
|
||||||
} else {
|
|
||||||
combo = 1;
|
|
||||||
selmon->sel->tags = arg->ui & TAGMASK;
|
|
||||||
}
|
|
||||||
focus(NULL);
|
|
||||||
arrange(selmon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
comboview(const Arg *arg) {
|
|
||||||
unsigned newtags = arg->ui & TAGMASK;
|
|
||||||
if (combo) {
|
|
||||||
selmon->tagset[selmon->seltags] |= newtags;
|
|
||||||
} else {
|
|
||||||
selmon->seltags ^= 1; /*toggle tagset*/
|
|
||||||
combo = 1;
|
|
||||||
if (newtags)
|
|
||||||
selmon->tagset[selmon->seltags] = newtags;
|
|
||||||
}
|
|
||||||
focus(NULL);
|
|
||||||
arrange(selmon);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
applyrules(Client *c)
|
applyrules(Client *c)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user