summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProsperousPotato <ProsperousPotato@users.noreply.github.com>2024-10-08 13:45:16 +0000
committerProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-03-31 18:31:28 +0100
commitec25d5fda43c218ff91623a53488bb6df00c0903 (patch)
tree580908123862f1c09358dd0ba2b062c99c0053ab
parent7ca56085bf44b87a334a468386701163bec54f3e (diff)
Add files via upload
-rw-r--r--config.def.h42
-rw-r--r--config.h42
-rw-r--r--dwm.146
3 files changed, 76 insertions, 54 deletions
diff --git a/config.def.h b/config.def.h
index 2f62822..896de98 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,15 +1,15 @@
#include <X11/XF86keysym.h>
/* See LICENSE file for copyright and license details. */
-/* Constants */
+/* Definitions */
#define TERMINAL "urxvtc"
-#define BROWSER "librewolf-bin"
+#define BROWSER "librewolf"
/* appearance */
-static const unsigned int borderpx = 1; /* border pixel of windows */
+static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 16; /* snap pixel */
static const int swallowfloating = 1; /* 1 means swallow floating windows by default */
-static const int showbar = 0; /* 0 means no bar */
+static const int showbar = 1; /* 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";
@@ -33,11 +33,16 @@ static const Rule rules[] = {
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating isterminal noswallow monitor */
+ { NULL, NULL, NULL, 0, 0, 0, 0, -1 },
+ { "discord", "discord", NULL, 0, 1, 0, 0, -1 },
{ 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 },
+ { NULL, "steamwebhelper", "Steam", 0, 0, 0, 0, -1 },
+ { "qemu-system-x86_64","qemu-system-x86_64",NULL, 0, 1, 0, 0, -1 },
+ { "Virt-manager",NULL, NULL, 0, 0, 0, 0, -1 },
+ { "qBittorrent", NULL, NULL, 0, 1, 0, 0, -1 },
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
- { "URxvt", NULL, NULL, 0, 1, 1, 0, -1 },
+ { "URxvt", NULL, NULL, 0, 0, 1, 0, -1 },
+ { "Nvidia-settings", "nvidia-settings",NULL, 0, 1, 0, 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 },
@@ -49,13 +54,13 @@ static const Rule rules[] = {
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
-static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
+static const int lockfullscreen = 0; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
- { "[M]", monocle }, /* first entry is default */
+ { "[T]", tile }, /* first entry is default */
{ "[F]", NULL }, /* no layout function means floating behavior */
- { "[T]", tile },
+ { "[M]", monocle },
};
/* key definitions */
@@ -85,7 +90,6 @@ static const char *fasterbrightnessdown[] = { "xbacklight", "-dec", "10", NULL }
static const char *slock[] = { "slock", NULL };
static const char *browser[] = { BROWSER, NULL };
static const char *steam[] = { "steam", NULL };
-static const char *discord[] = { "discord", NULL };
static const Key keys[] = {
@@ -102,9 +106,9 @@ static const Key keys[] = {
{ Mod1Mask, XK_Tab, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
- { MODKEY, XK_m, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_t, setlayout, {.v = &layouts[2]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY|ShiftMask, XK_Return, setlayout, {0} },
{ MODKEY, XK_Return, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
@@ -122,7 +126,7 @@ static const Key keys[] = {
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
- { MODKEY|ShiftMask, XK_q, quit, {0} },
+ { MODKEY|ShiftMask, XK_r, quit, {0} },
/* Non-default commands i.e. commands added in by me and patches */
{ MODKEY|ShiftMask, XK_space, spawn, {.v = sutermcmd } },
@@ -132,7 +136,7 @@ static const Key keys[] = {
{ 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_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 } },
@@ -146,11 +150,11 @@ static const Key keys[] = {
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = fasterbrightnessup } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = fasterbrightnessdown } },
{ 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 } },
+ { MODKEY, XK_w, spawn, {.v = browser } },
+ { MODKEY, XK_s, spawn, {.v = steam } },
{ Mod1Mask|ControlMask, XK_Delete, spawn, {.v = slock } },
- { MODKEY, XK_v, spawn, SHCMD("setxkbmap gb && xdotool type $(grep -v '^#' ~/.local/bin/bookmarksfile | dmenu -i -l 50)") },
+ { MODKEY, XK_v, spawn, SHCMD("xdotool type $(grep -v '^#' ~/.local/bin/bookmarksfile | dmenu -i -l 50)") },
+ { MODKEY|ShiftMask, XK_End, spawn, SHCMD("pkill X") },
};
/* button definitions */
diff --git a/config.h b/config.h
index 2f62822..896de98 100644
--- a/config.h
+++ b/config.h
@@ -1,15 +1,15 @@
#include <X11/XF86keysym.h>
/* See LICENSE file for copyright and license details. */
-/* Constants */
+/* Definitions */
#define TERMINAL "urxvtc"
-#define BROWSER "librewolf-bin"
+#define BROWSER "librewolf"
/* appearance */
-static const unsigned int borderpx = 1; /* border pixel of windows */
+static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 16; /* snap pixel */
static const int swallowfloating = 1; /* 1 means swallow floating windows by default */
-static const int showbar = 0; /* 0 means no bar */
+static const int showbar = 1; /* 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";
@@ -33,11 +33,16 @@ static const Rule rules[] = {
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating isterminal noswallow monitor */
+ { NULL, NULL, NULL, 0, 0, 0, 0, -1 },
+ { "discord", "discord", NULL, 0, 1, 0, 0, -1 },
{ 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 },
+ { NULL, "steamwebhelper", "Steam", 0, 0, 0, 0, -1 },
+ { "qemu-system-x86_64","qemu-system-x86_64",NULL, 0, 1, 0, 0, -1 },
+ { "Virt-manager",NULL, NULL, 0, 0, 0, 0, -1 },
+ { "qBittorrent", NULL, NULL, 0, 1, 0, 0, -1 },
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
- { "URxvt", NULL, NULL, 0, 1, 1, 0, -1 },
+ { "URxvt", NULL, NULL, 0, 0, 1, 0, -1 },
+ { "Nvidia-settings", "nvidia-settings",NULL, 0, 1, 0, 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 },
@@ -49,13 +54,13 @@ static const Rule rules[] = {
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
-static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
+static const int lockfullscreen = 0; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
- { "[M]", monocle }, /* first entry is default */
+ { "[T]", tile }, /* first entry is default */
{ "[F]", NULL }, /* no layout function means floating behavior */
- { "[T]", tile },
+ { "[M]", monocle },
};
/* key definitions */
@@ -85,7 +90,6 @@ static const char *fasterbrightnessdown[] = { "xbacklight", "-dec", "10", NULL }
static const char *slock[] = { "slock", NULL };
static const char *browser[] = { BROWSER, NULL };
static const char *steam[] = { "steam", NULL };
-static const char *discord[] = { "discord", NULL };
static const Key keys[] = {
@@ -102,9 +106,9 @@ static const Key keys[] = {
{ Mod1Mask, XK_Tab, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
- { MODKEY, XK_m, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_t, setlayout, {.v = &layouts[2]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY|ShiftMask, XK_Return, setlayout, {0} },
{ MODKEY, XK_Return, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
@@ -122,7 +126,7 @@ static const Key keys[] = {
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
- { MODKEY|ShiftMask, XK_q, quit, {0} },
+ { MODKEY|ShiftMask, XK_r, quit, {0} },
/* Non-default commands i.e. commands added in by me and patches */
{ MODKEY|ShiftMask, XK_space, spawn, {.v = sutermcmd } },
@@ -132,7 +136,7 @@ static const Key keys[] = {
{ 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_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 } },
@@ -146,11 +150,11 @@ static const Key keys[] = {
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = fasterbrightnessup } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = fasterbrightnessdown } },
{ 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 } },
+ { MODKEY, XK_w, spawn, {.v = browser } },
+ { MODKEY, XK_s, spawn, {.v = steam } },
{ Mod1Mask|ControlMask, XK_Delete, spawn, {.v = slock } },
- { MODKEY, XK_v, spawn, SHCMD("setxkbmap gb && xdotool type $(grep -v '^#' ~/.local/bin/bookmarksfile | dmenu -i -l 50)") },
+ { MODKEY, XK_v, spawn, SHCMD("xdotool type $(grep -v '^#' ~/.local/bin/bookmarksfile | dmenu -i -l 50)") },
+ { MODKEY|ShiftMask, XK_End, spawn, SHCMD("pkill X") },
};
/* button definitions */
diff --git a/dwm.1 b/dwm.1
index bf0d3c3..acf1ac8 100644
--- a/dwm.1
+++ b/dwm.1
@@ -54,13 +54,21 @@ Button3 - Right Click
.SS Keyboard commands
.TP
.B Super\-Space
-Start the terminal defined by the TERMINAL variable in config.h, by default it is set to urxvt
+Start the terminal defined by the TERMINAL definition in config.h, by default it is set to urxvt
+.TP
+.B Super\-Shift\-Space
+Start the terminal as root.
.TP
.B Super\-d
Spawn
.BR dmenu(1)
for launching other programs.
.TP
+.B Super\-g
+Spawn
+.BR dmenu(1)
+for launching applications from ~/.local/games/ directory.
+.TP
.B Super\-,
Focus previous monitor, if any.
.TP
@@ -142,20 +150,29 @@ View all windows with any tag.
.B Super\-Control\-[1..n]
Add/remove all windows with nth tag to/from the view.
.TP
-.B Super\-Shift\-q
-Quit dwm.
+.B Super\-Shift\-r
+Restart dwm.
.TP
-.B Super\-Shift\-w
+.B Super\-Shift\-End
+Exit dwm.
+.TP
+.B Super\-w
Opens web browser defined by BROWSER in config.h.
.TP
-.B Super\-Shift\-e
+.B Super\-e
Opens lf (file manager) in a urxvt instance.
.TP
-.B Super\-Shift\-s
-Opens Steam, it's pretty easy to change
+.B Super\-s
+Opens Steam.
+.TP
+.B Super\-Shift\-h
+Opens a terminal instance running htop.
.TP
-.B Super\-Shift\-d
-Opens Discord, also pretty easy to change.
+.B Super\-Shift\-n
+Opens a terminal instance running neovim.
+.TP
+.B Super\-Shift\-m
+Opens a terminal instance running neomutt.
.TP
.B Control\-Alt\-Delete
Locks the screen using slock, requires slock to be installed to work.
@@ -164,19 +181,16 @@ Locks the screen using slock, requires slock to be installed to work.
Takes a screenshot using scrot.
.TP
.B Super\-v
-Allows you to pick a string of text to paste from a bookmarks file using a dmenu prompt, default path is ~/.local/share/bookmarks/bookmarksfile, requires xclip
-.TP
-.B Super\-Shift\-v
-Takes the last copied text from your clipboard and pastes it to the bookmarksfile.
+Allows you to pick a string of text to paste from a bookmarks file using a dmenu prompt, default path is ~/.local/share/bookmarks/bookmarksfile, requires xclip.
.SS Mouse commands
.TP
-.B Super\-Button1
+.B Super\-LMB
Move focused window while dragging. Tiled windows will be toggled to the floating state.
.TP
-.B Super\-Button2
+.B Super\-MMB
Toggles focused window between floating and tiled state.
.TP
-.B Super\-Button3
+.B Super\-RMB
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
.SH CUSTOMIZATION
dwm is customized by creating a custom config.h and (re)compiling the source