removing random things
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
#define MODKEY Mod1Mask
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||
|
||||
|
||||
#include "X11/XF86keysym.h"
|
||||
|
||||
static const unsigned int borderpx = 2;
|
||||
static const unsigned int gappx = 5;
|
||||
static const int showbar = 1;
|
||||
static const int topbar = 1;
|
||||
|
||||
static const char *fonts[] = { "CaskaydiaCove NFM style:SemiBold:size=11" };
|
||||
static const char *fonts[] = { "Cascadia Mono:style:Medium:size=10:antialias=true:autohint=true" };
|
||||
static const char *colors[][3] = {
|
||||
[SchemeNorm] = { "#D3C6AA", "#272E33", "#83C092" },
|
||||
[SchemeSel] = { "#374145", "#DBBC7F", "#A7C080" },
|
||||
@@ -11,10 +21,10 @@ static const char *colors[][3] = {
|
||||
|
||||
static const char *tags[] = { "1", "2", "3" };
|
||||
static const Rule rules[] = {
|
||||
{ "st-256color", "st-256color", NULL, 1, 0 },
|
||||
{ "librewolf", "Navigator", NULL, 1 << 1, 0 },
|
||||
{ "PrismLauncher", "prismlauncher", NULL, 1 << 2, 0 },
|
||||
{ "steam", "steamwebhelper", NULL, 1 << 2, 0 },
|
||||
{ "st-256color", 1 },
|
||||
{ "librewolf", 1 << 1 },
|
||||
{ "PrismLauncher", 1 << 2 },
|
||||
{ "steam", 1 << 2 },
|
||||
};
|
||||
|
||||
static const float mfact = 0.55;
|
||||
@@ -23,19 +33,9 @@ static const int resizehints = 1;
|
||||
static const int lockfullscreen = 1;
|
||||
|
||||
static const Layout layouts[] = {
|
||||
{ "L: Tile", tile },
|
||||
{ "T", tile },
|
||||
};
|
||||
|
||||
#define MODKEY Mod1Mask
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
|
||||
#include "X11/XF86keysym.h"
|
||||
static const Key keys[] = {
|
||||
{ MODKEY, XK_Return, spawn, SHCMD("st") },
|
||||
{ MODKEY, XK_space, spawn, SHCMD("dmenu_run") },
|
||||
|
||||
@@ -104,10 +104,7 @@ struct Monitor {
|
||||
|
||||
typedef struct {
|
||||
const char *class;
|
||||
const char *instance;
|
||||
const char *title;
|
||||
unsigned int tags;
|
||||
int isfloating;
|
||||
} Rule;
|
||||
|
||||
/* function declarations */
|
||||
@@ -165,7 +162,6 @@ static void showhide(Client *c);
|
||||
static void spawn(const Arg *arg);
|
||||
static void tag(const Arg *arg);
|
||||
static void tile(Monitor *m);
|
||||
static void toggletag(const Arg *arg);
|
||||
static void toggleview(const Arg *arg);
|
||||
static void unfocus(Client *c, int setfocus);
|
||||
static void unmanage(Client *c, int destroyed);
|
||||
@@ -225,25 +221,18 @@ struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
|
||||
|
||||
/* function implementations */
|
||||
void applyrules(Client *c) {
|
||||
const char *class, *instance;
|
||||
unsigned int i;
|
||||
const char *class;
|
||||
const Rule *r;
|
||||
XClassHint ch = { NULL, NULL };
|
||||
|
||||
/* rule matching */
|
||||
c->isfloating = 0;
|
||||
c->tags = 0;
|
||||
XGetClassHint(dpy, c->win, &ch);
|
||||
class = ch.res_class ? ch.res_class : broken;
|
||||
instance = ch.res_name ? ch.res_name : broken;
|
||||
|
||||
for (i = 0; i < LENGTH(rules); i++) {
|
||||
for (unsigned int i = 0; i < LENGTH(rules); i++) {
|
||||
r = &rules[i];
|
||||
if ((!r->title || strstr(c->name, r->title))
|
||||
&& (!r->class || strstr(class, r->class))
|
||||
&& (!r->instance || strstr(instance, r->instance)))
|
||||
{
|
||||
c->isfloating = r->isfloating;
|
||||
if (!r->class || strstr(class, r->class)) {
|
||||
c->tags |= r->tags;
|
||||
}
|
||||
}
|
||||
@@ -1251,23 +1240,8 @@ void tile(Monitor *m) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void toggletag(const Arg *arg) {
|
||||
unsigned int newtags;
|
||||
|
||||
if (!selmon->sel)
|
||||
return;
|
||||
newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
|
||||
if (newtags) {
|
||||
selmon->sel->tags = newtags;
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
}
|
||||
}
|
||||
|
||||
void toggleview(const Arg *arg) {
|
||||
unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
|
||||
|
||||
if (newtagset) {
|
||||
selmon->tagset[selmon->seltags] = newtagset;
|
||||
focus(NULL);
|
||||
|
||||
Reference in New Issue
Block a user