parent
5c5e318ebe
commit
58d438314d
4 changed files with 7 additions and 128 deletions
|
@ -116,10 +116,6 @@ static const Key keys[] = {
|
|||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ControlMask, XK_l, movekeyboard_x, {.i = 20}},
|
||||
{ MODKEY|ControlMask, XK_h, movekeyboard_x, {.i = -20}},
|
||||
{ MODKEY|ControlMask, XK_j, movekeyboard_y, {.i = 20}},
|
||||
{ MODKEY|ControlMask, XK_k, movekeyboard_y, {.i = -20}},
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
{ MODKEY, XK_minus, setgaps, {.i = -1 } },
|
||||
{ MODKEY, XK_equal, setgaps, {.i = +1 } },
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/* includes */
|
||||
|
||||
#include <X11/XF86keysym.h>
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 2; /* border pixel of windows */
|
||||
static const unsigned int gappx = 15; /* gaps between windows */
|
||||
static const unsigned int gappx = 10; /* gaps between windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
|
||||
|
@ -15,14 +11,13 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display
|
|||
static const int showsystray = 1; /* 0 means no systray */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = { "JetBrainsMono NF:size=10" };
|
||||
static const char *fonts[] = { "monospace:size=10" };
|
||||
static const char dmenufont[] = "monospace:size=10";
|
||||
//static const char col_gray1[] = "#222222";
|
||||
static const char col_gray1[] = "#000000";
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
static const char col_gray3[] = "#cccccc";
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
static const char col_cyan[] = "#770000";
|
||||
static const char col_cyan[] = "#005577";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
|
@ -30,21 +25,18 @@ static const char *colors[][3] = {
|
|||
};
|
||||
|
||||
static const char *const autostart[] = {
|
||||
"xsetroot", "-cursor_name", "Catppuccin-Mocha-Dark", NULL,
|
||||
"xsetroot", "-cursor_name", "left_ptr", NULL,
|
||||
"feh", "--bg-scale", "/home/sako/.config/bspwm/background.png", NULL,
|
||||
"dwmblocks", NULL,
|
||||
"nm-applet", NULL,
|
||||
"blueman-applet", NULL,
|
||||
"keepassxc", NULL,
|
||||
"flameshot", NULL,
|
||||
"discord", NULL,
|
||||
"transmission-gtk", "-m", NULL,
|
||||
NULL /* terminate */
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
// static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
static const char *tags[] = { "web", "dev", "irc", "media", "game", "misc" };
|
||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6" };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
|
@ -54,8 +46,6 @@ static const Rule rules[] = {
|
|||
/* class instance title tags mask isfloating monitor */
|
||||
{ "Gimp", NULL, NULL, 0, 1, -1 },
|
||||
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
|
||||
{ "discord", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ ".blueman-manager-wrapped", NULL, NULL, 0, 1, -1},
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
|
@ -87,10 +77,6 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn()
|
|||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||
static const char *roficmd[] = { "rofi", "-show-icons", "-show", "drun", NULL };
|
||||
static const char *termcmd[] = { "kitty", NULL };
|
||||
// audio
|
||||
static const char *upvol[] = { "pactl", "set-sink-volume", "0", "+5%", NULL };
|
||||
static const char *downvol[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
|
||||
static const char *mutevol[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
|
@ -111,7 +97,6 @@ static const Key keys[] = {
|
|||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY, XK_p, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_p, togglefloating, {0} },
|
||||
{ MODKEY|ShiftMask, XK_f, togglefullscr, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
|
@ -120,10 +105,6 @@ static const Key keys[] = {
|
|||
{ MODKEY, XK_minus, setgaps, {.i = -1 } },
|
||||
{ MODKEY, XK_equal, setgaps, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } },
|
||||
// audio
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = mutevol } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } },
|
||||
TAGKEYS( XK_1, 0)
|
||||
TAGKEYS( XK_2, 1)
|
||||
TAGKEYS( XK_3, 2)
|
||||
|
|
|
@ -207,8 +207,6 @@ static void maprequest(XEvent *e);
|
|||
static void monocle(Monitor *m);
|
||||
static void motionnotify(XEvent *e);
|
||||
static void movemouse(const Arg *arg);
|
||||
static void movekeyboard_x(const Arg *arg);
|
||||
static void movekeyboard_y(const Arg *arg);
|
||||
static Client *nexttiled(Client *c);
|
||||
static void pop(Client *c);
|
||||
static void propertynotify(XEvent *e);
|
||||
|
@ -1365,92 +1363,6 @@ movemouse(const Arg *arg)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
movekeyboard_x(const Arg *arg){
|
||||
int ocx, ocy, nx, ny;
|
||||
Client *c;
|
||||
Monitor *m;
|
||||
|
||||
if (!(c = selmon->sel))
|
||||
return;
|
||||
|
||||
if (c->isfullscreen) /* no support moving fullscreen windows by mouse */
|
||||
return;
|
||||
|
||||
restack(selmon);
|
||||
|
||||
ocx = c->x;
|
||||
ocy = c->y;
|
||||
|
||||
nx = ocx + arg->i;
|
||||
ny = ocy;
|
||||
|
||||
if (abs(selmon->wx - nx) < snap)
|
||||
nx = selmon->wx;
|
||||
else if (abs((selmon->wx + selmon->ww) - (nx + WIDTH(c))) < snap)
|
||||
nx = selmon->wx + selmon->ww - WIDTH(c);
|
||||
|
||||
if (abs(selmon->wy - ny) < snap)
|
||||
ny = selmon->wy;
|
||||
else if (abs((selmon->wy + selmon->wh) - (ny + HEIGHT(c))) < snap)
|
||||
ny = selmon->wy + selmon->wh - HEIGHT(c);
|
||||
|
||||
if (!c->isfloating)
|
||||
togglefloating(NULL);
|
||||
|
||||
if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
|
||||
resize(c, nx, ny, c->w, c->h, 1);
|
||||
|
||||
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
|
||||
sendmon(c, m);
|
||||
selmon = m;
|
||||
focus(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
movekeyboard_y(const Arg *arg){
|
||||
int ocx, ocy, nx, ny;
|
||||
Client *c;
|
||||
Monitor *m;
|
||||
|
||||
if (!(c = selmon->sel))
|
||||
return;
|
||||
|
||||
if (c->isfullscreen) /* no support moving fullscreen windows by mouse */
|
||||
return;
|
||||
|
||||
restack(selmon);
|
||||
|
||||
ocx = c->x;
|
||||
ocy = c->y;
|
||||
|
||||
nx = ocx;
|
||||
ny = ocy + arg->i;
|
||||
|
||||
if (abs(selmon->wx - nx) < snap)
|
||||
nx = selmon->wx;
|
||||
else if (abs((selmon->wx + selmon->ww) - (nx + WIDTH(c))) < snap)
|
||||
nx = selmon->wx + selmon->ww - WIDTH(c);
|
||||
|
||||
if (abs(selmon->wy - ny) < snap)
|
||||
ny = selmon->wy;
|
||||
else if (abs((selmon->wy + selmon->wh) - (ny + HEIGHT(c))) < snap)
|
||||
ny = selmon->wy + selmon->wh - HEIGHT(c);
|
||||
|
||||
if (!c->isfloating)
|
||||
togglefloating(NULL);
|
||||
|
||||
if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
|
||||
resize(c, nx, ny, c->w, c->h, 1);
|
||||
|
||||
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
|
||||
sendmon(c, m);
|
||||
selmon = m;
|
||||
focus(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Client *
|
||||
nexttiled(Client *c)
|
||||
{
|
||||
|
|
|
@ -239,7 +239,6 @@ static void tagmon(const Arg *arg);
|
|||
static void tile(Monitor *m);
|
||||
static void togglebar(const Arg *arg);
|
||||
static void togglefloating(const Arg *arg);
|
||||
static void togglefullscr(const Arg *arg);
|
||||
static void toggletag(const Arg *arg);
|
||||
static void toggleview(const Arg *arg);
|
||||
static void unfocus(Client *c, int setfocus);
|
||||
|
@ -1220,8 +1219,6 @@ manage(Window w, XWindowAttributes *wa)
|
|||
updatewindowtype(c);
|
||||
updatesizehints(c);
|
||||
updatewmhints(c);
|
||||
c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2;
|
||||
c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2;
|
||||
XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
|
||||
grabbuttons(c, 0);
|
||||
if (!c->isfloating)
|
||||
|
@ -2015,13 +2012,6 @@ togglefloating(const Arg *arg)
|
|||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
togglefullscr(const Arg *arg)
|
||||
{
|
||||
if(selmon->sel)
|
||||
setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
|
||||
}
|
||||
|
||||
void
|
||||
toggletag(const Arg *arg)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue