summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProsperousPotato <ProsperousPotato@users.noreply.github.com>2024-09-12 12:05:07 +0100
committerProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-03-31 18:31:28 +0100
commit7ca56085bf44b87a334a468386701163bec54f3e (patch)
tree634cf899f0d3383cb9279c71de5a05937c82498b
parent67e5a35acb293b3621f7a5df653095070e7fd2d6 (diff)
Updated config
-rw-r--r--config.def.h36
-rw-r--r--config.h27
-rw-r--r--dwmbin76480 -> 76664 bytes
-rw-r--r--dwm.c16
-rw-r--r--util.obin2272 -> 2296 bytes
5 files changed, 46 insertions, 33 deletions
diff --git a/config.def.h b/config.def.h
index 0ee1625..2f62822 100644
--- a/config.def.h
+++ b/config.def.h
@@ -8,13 +8,13 @@
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 16; /* snap pixel */
-static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
-static const int showbar = 1; /* 0 means no bar */
+static const int swallowfloating = 1; /* 1 means swallow floating windows by default */
+static const int showbar = 0; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "cozette:size=12:autohint=true" };
static const char dmenufont[] = "cozette:size=12:autohint=true";
static const char col_gray1[] = "#000000"; // Colour of the background of the bar
-static const char col_gray2[] = "#444444"; // Colour of the border of the inactive window
+static const char col_gray2[] = "#000000"; // Colour of the border of the inactive window
static const char col_gray3[] = "#bbbbbb"; // Colour of the foreground of the bar
static const char col_gray4[] = "#000000"; // Colour of the wallpaper by default
static const char col_cyan[] = "#bbbbbb"; // Colour of the border of the active window
@@ -34,9 +34,12 @@ static const Rule rules[] = {
*/
/* class instance title tags mask isfloating isterminal noswallow monitor */
{ NULL, "steamwebhelper", NULL, 0, 1, 0, 0, -1 },
+ { "Virt-manager",NULL, NULL, 0, 1, 0, 0, -1 },
{ "qBittorrent", NULL, NULL, 0, 1, 0, -1, -1 },
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
{ "URxvt", NULL, NULL, 0, 1, 1, 0, -1 },
+ { "scrcpy", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "LibreWolf", "Alert", NULL, 0, 1, 0, 0, -1 },
{ "Nsxiv", NULL, NULL, 0, 1, 0, 0, -1 },
{ "mpv", NULL, NULL, 0, 1, 0, 0, -1 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 },
@@ -50,9 +53,9 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win
static const Layout layouts[] = {
/* symbol arrange function */
- { "[T]", tile }, /* first entry is default */
+ { "[M]", monocle }, /* first entry is default */
{ "[F]", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
+ { "[T]", tile },
};
/* key definitions */
@@ -70,7 +73,7 @@ static const Layout layouts[] = {
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 *termcmd[] = { TERMINAL, NULL };
-static const char *cmdprintscreen[] = { "scrot", "~/Pictures/%Y-%m.jpg", NULL };
+static const char *sutermcmd[] = { TERMINAL,"-e", "su", NULL };
static const char *volumeup[] = { "amixer", "sset", "Master", "5%+", NULL };
static const char *volumedown[] = { "amixer", "sset", "Master", "5%-", NULL };
static const char *volumetoggle[] = { "amixer", "sset", "Master", "toggle", NULL };
@@ -99,9 +102,9 @@ static const Key keys[] = {
{ Mod1Mask, XK_Tab, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
+ { MODKEY, XK_t, setlayout, {.v = &layouts[2]} },
{ MODKEY|ShiftMask, XK_Return, setlayout, {0} },
{ MODKEY, XK_Return, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
@@ -120,32 +123,33 @@ static const Key keys[] = {
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
+
/* Non-default commands i.e. commands added in by me and patches */
+ { MODKEY|ShiftMask, XK_space, spawn, {.v = sutermcmd } },
{ MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, rotatestack, {.i = -1 } },
+ { MODKEY, XK_g, spawn, SHCMD("~/.local/bin/./dmenu_games") },
{ MODKEY|ShiftMask, XK_m, spawn, {.v = (const char*[]){ TERMINAL, "-e", "neomutt", NULL } }},
- { ControlMask|ShiftMask, XK_Escape, spawn, {.v = (const char*[]){ TERMINAL, "-e", "btop", NULL } }},
- { ControlMask|ShiftMask, XK_Escape, spawn, {.v = (const char*[]){ TERMINAL, "-e", "lfcd", NULL } }},
- { MODKEY, XK_Print, spawn, {.v = cmdprintscreen } },
- { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volumeup } },
- { 0, XF86XK_AudioLowerVolume, spawn, {.v = volumedown } },
+ { MODKEY|ShiftMask, XK_n, spawn, {.v = (const char*[]){ TERMINAL, "-e", "nvim", NULL } }},
+ { MODKEY|ShiftMask, XK_h, spawn, {.v = (const char*[]){ TERMINAL, "-e", "htop", NULL } }},
+ { MODKEY|ShiftMask, XK_e, spawn, {.v = (const char*[]){ TERMINAL, "-e", "lfub", NULL } }},
+ { MODKEY, XK_Print, spawn, SHCMD("scrot -q 100 ~/Pictures/%Y-%m.jpg") },
{ MODKEY, XK_Up, spawn, {.v = volumeup } },
{ MODKEY, XK_Down, spawn, {.v = volumedown } },
{ MODKEY, XK_Right, spawn, {.v = fasterbrightnessup } },
{ MODKEY, XK_Left, spawn, {.v = fasterbrightnessdown } },
{ MODKEY|ControlMask, XK_Right, spawn, {.v = brightnessup } },
{ MODKEY|ControlMask, XK_Left, spawn, {.v = brightnessdown } },
+ { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volumeup } },
+ { 0, XF86XK_AudioLowerVolume, spawn, {.v = volumedown } },
{ 0, XF86XK_AudioMute, spawn, {.v = volumetoggle } },
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = fasterbrightnessup } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = fasterbrightnessdown } },
- { 0|ControlMask, XF86XK_MonBrightnessUp, spawn, {.v = brightnessup } },
- { 0|ControlMask, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdown } },
{ 0, XF86XK_AudioMicMute, spawn, {.v = mictoggle } },
{ MODKEY|ShiftMask, XK_w, spawn, {.v = browser } },
{ MODKEY|ShiftMask, XK_s, spawn, {.v = steam } },
{ MODKEY|ShiftMask, XK_d, spawn, {.v = discord } },
{ Mod1Mask|ControlMask, XK_Delete, spawn, {.v = slock } },
- { MODKEY|ShiftMask, XK_v, spawn, SHCMD("~/.local/bin/./bookmarkthis") },
{ MODKEY, XK_v, spawn, SHCMD("setxkbmap gb && xdotool type $(grep -v '^#' ~/.local/bin/bookmarksfile | dmenu -i -l 50)") },
};
diff --git a/config.h b/config.h
index a713e8c..2f62822 100644
--- a/config.h
+++ b/config.h
@@ -8,13 +8,13 @@
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 16; /* snap pixel */
-static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
-static const int showbar = 1; /* 0 means no bar */
+static const int swallowfloating = 1; /* 1 means swallow floating windows by default */
+static const int showbar = 0; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "cozette:size=12:autohint=true" };
static const char dmenufont[] = "cozette:size=12:autohint=true";
static const char col_gray1[] = "#000000"; // Colour of the background of the bar
-static const char col_gray2[] = "#444444"; // Colour of the border of the inactive window
+static const char col_gray2[] = "#000000"; // Colour of the border of the inactive window
static const char col_gray3[] = "#bbbbbb"; // Colour of the foreground of the bar
static const char col_gray4[] = "#000000"; // Colour of the wallpaper by default
static const char col_cyan[] = "#bbbbbb"; // Colour of the border of the active window
@@ -34,11 +34,12 @@ static const Rule rules[] = {
*/
/* class instance title tags mask isfloating isterminal noswallow monitor */
{ NULL, "steamwebhelper", NULL, 0, 1, 0, 0, -1 },
- { "VirtualBox Machine", NULL, NULL, 0, 1, 0, 0, -1 },
- { "Virt-manager", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "Virt-manager",NULL, NULL, 0, 1, 0, 0, -1 },
{ "qBittorrent", NULL, NULL, 0, 1, 0, -1, -1 },
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
{ "URxvt", NULL, NULL, 0, 1, 1, 0, -1 },
+ { "scrcpy", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "LibreWolf", "Alert", NULL, 0, 1, 0, 0, -1 },
{ "Nsxiv", NULL, NULL, 0, 1, 0, 0, -1 },
{ "mpv", NULL, NULL, 0, 1, 0, 0, -1 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 },
@@ -52,9 +53,9 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win
static const Layout layouts[] = {
/* symbol arrange function */
- { "[T]", tile }, /* first entry is default */
+ { "[M]", monocle }, /* first entry is default */
{ "[F]", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
+ { "[T]", tile },
};
/* key definitions */
@@ -72,6 +73,7 @@ static const Layout layouts[] = {
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 *termcmd[] = { TERMINAL, NULL };
+static const char *sutermcmd[] = { TERMINAL,"-e", "su", NULL };
static const char *volumeup[] = { "amixer", "sset", "Master", "5%+", NULL };
static const char *volumedown[] = { "amixer", "sset", "Master", "5%-", NULL };
static const char *volumetoggle[] = { "amixer", "sset", "Master", "toggle", NULL };
@@ -100,9 +102,9 @@ static const Key keys[] = {
{ Mod1Mask, XK_Tab, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
+ { MODKEY, XK_t, setlayout, {.v = &layouts[2]} },
{ MODKEY|ShiftMask, XK_Return, setlayout, {0} },
{ MODKEY, XK_Return, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
@@ -121,10 +123,14 @@ static const Key keys[] = {
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
+
/* Non-default commands i.e. commands added in by me and patches */
+ { MODKEY|ShiftMask, XK_space, spawn, {.v = sutermcmd } },
{ MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, rotatestack, {.i = -1 } },
+ { MODKEY, XK_g, spawn, SHCMD("~/.local/bin/./dmenu_games") },
{ MODKEY|ShiftMask, XK_m, spawn, {.v = (const char*[]){ TERMINAL, "-e", "neomutt", NULL } }},
+ { MODKEY|ShiftMask, XK_n, spawn, {.v = (const char*[]){ TERMINAL, "-e", "nvim", NULL } }},
{ MODKEY|ShiftMask, XK_h, spawn, {.v = (const char*[]){ TERMINAL, "-e", "htop", NULL } }},
{ MODKEY|ShiftMask, XK_e, spawn, {.v = (const char*[]){ TERMINAL, "-e", "lfub", NULL } }},
{ MODKEY, XK_Print, spawn, SHCMD("scrot -q 100 ~/Pictures/%Y-%m.jpg") },
@@ -139,14 +145,11 @@ static const Key keys[] = {
{ 0, XF86XK_AudioMute, spawn, {.v = volumetoggle } },
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = fasterbrightnessup } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = fasterbrightnessdown } },
- { 0|ControlMask, XF86XK_MonBrightnessUp, spawn, {.v = brightnessup } },
- { 0|ControlMask, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdown } },
{ 0, XF86XK_AudioMicMute, spawn, {.v = mictoggle } },
{ MODKEY|ShiftMask, XK_w, spawn, {.v = browser } },
{ MODKEY|ShiftMask, XK_s, spawn, {.v = steam } },
{ MODKEY|ShiftMask, XK_d, spawn, {.v = discord } },
{ Mod1Mask|ControlMask, XK_Delete, spawn, {.v = slock } },
- { MODKEY|ShiftMask, XK_v, spawn, SHCMD("~/.local/bin/./bookmarkthis") },
{ MODKEY, XK_v, spawn, SHCMD("setxkbmap gb && xdotool type $(grep -v '^#' ~/.local/bin/bookmarksfile | dmenu -i -l 50)") },
};
diff --git a/dwm b/dwm
index 6971ff1..ae1f745 100644
--- a/dwm
+++ b/dwm
Binary files differ
diff --git a/dwm.c b/dwm.c
index f559af3..ca29a4b 100644
--- a/dwm.c
+++ b/dwm.c
@@ -941,6 +941,8 @@ focusmon(const Arg *arg)
unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);
+ if (selmon->sel)
+ XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
}
void
@@ -966,6 +968,7 @@ focusstack(const Arg *arg)
if (c) {
focus(c);
restack(selmon);
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
}
}
@@ -1197,8 +1200,8 @@ manage(Window w, XWindowAttributes *wa)
c->mon->sel = c;
arrange(c->mon);
XMapWindow(dpy, c->win);
- if (term)
- swallow(term, c);
+ if (c && c->mon == selmon)
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
focus(NULL);
}
@@ -1981,9 +1984,12 @@ unmanage(Client *c, int destroyed)
free(c);
if (!s) {
- arrange(m);
- focus(NULL);
+ focus(NULL);
updateclientlist();
+ arrange(m);
+ if (m == selmon && m->sel)
+ XWarpPointer(dpy, None, m->sel->win, 0, 0, 0, 0,
+ m->sel->w/2, m->sel->h/2);
}
}
@@ -2192,7 +2198,7 @@ void
updatestatus(void)
{
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
- strcpy(stext, "dwm-"VERSION);
+ strcpy(stext, "");
drawbar(selmon);
}
diff --git a/util.o b/util.o
index c173bed..44e14f7 100644
--- a/util.o
+++ b/util.o
Binary files differ