myvxwm

[fork] my vxwm config (optimised for my T480)
git clone https://git.lukeonline.net/repos/myvxwm
Log | Files | Refs | README | LICENSE

commit 09fe97cd6d705b238bae1dfb7a2d18d4a497da7a
parent 0e81b5f296b5d30e29b419a8aac83daf6dd93be1
Author: Luke Jones <luke.jones.2567@gmail.com>
Date:   Tue, 13 Oct 2026 14:48:30 +0100

feat: keymaps + disable bar in place of tint

Diffstat:
Mconfig.def.h | 21+++++++++++++++++----
Mmodules.def.h | 4++--
Mvxwm.c | 1+
3 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -5,7 +5,7 @@ /* appearance */ static const unsigned int borderpx = 4; /* border pixel of windows */ static const unsigned int snap = 0; /* snap pixel */ -static const int showbar = 1; /* 0 means no bar */ +static const int showbar = 0; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = { "monospace:size=9" }; static const char dmenufont[] = "monospace:size=9"; @@ -68,7 +68,7 @@ static const char *occupiedtags[] = { "1+", "2+", "3+" }; #if MOVE_RESIZE_WITH_KEYBOARD #define MOVE_WITH_KEYBOARD_STEP 50 /* Defines by how many pixels windows will be resized with keyboard */ -#define RESIZE_WITH_KEYBOARD_STEP 50 /* Defines by how many pixels windows will be resized with keyboard */ +#define RESIZE_WITH_KEYBOARD_STEP 100 /* Defines by how many pixels windows will be resized with keyboard */ #endif #if AUTOSTART @@ -109,8 +109,8 @@ static const Layout layouts[] = { #define MODKEY Mod4Mask #define ALTERNATE_MODKEY Mod1Mask -#define SCROLL_UP Button4 -#define SCROLL_DOWN Button5 +#define SCROLL_UP Button5 +#define SCROLL_DOWN Button4 #define TAGKEYS(KEY,TAG) \ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ @@ -133,6 +133,14 @@ static const char *zoomout[] = { "vcompmgr", "-Z", "-0.15", NULL }; // zoom out static const char *zoomreset[] = { "vcompmgr", "-Z", "1", NULL }; // set zoom to 1 #endif +/* Volume controls per T480 Layout */ +static const char *volumeupcmd[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL }; +static const char *volumedowncmd[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL }; +static const char *volumemutecmd[] = { "pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL }; +static const char *brightnessupcmd[] = { "brightnessctl", "set", "+5%", NULL }; +static const char *brightnessdowncmd[] = { "brightnessctl", "set", "5%-", NULL }; + + static const Key keys[] = { /* modifier key function argument */ { MODKEY, XK_v, spawn, {.v = dmenucmd } }, @@ -212,6 +220,11 @@ static const Key keys[] = { { MODKEY, XK_equal, spawn, {.v = zoomin } }, { MODKEY, XK_minus, spawn, {.v = zoomout } }, #endif + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volumeupcmd } }, + { 0, XF86XK_AudioLowerVolume, spawn, {.v = volumedowncmd } }, + { 0, XF86XK_AudioMicMute, spawn, {.v = volumemutecmd } }, + { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightnessupcmd } }, + { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdowncmd } }, }; /* button definitions */ diff --git a/modules.def.h b/modules.def.h @@ -61,7 +61,7 @@ Even though this sounds complex, it is actually pretty lightweight, and is very #define ALT_CENTER_OF_BAR_COLOR 1 // changes center of bar color to a dark color. #define BAR_HEIGHT 1 // Support for changing bar height. #define BAR_PADDING 1 // Support for changing the bar padding. -#define OCCUPIED_TAGS_DECORATION 0 // This provides the ability to use an alternative text for tags which contain at least one window aka occupied tags. +#define OCCUPIED_TAGS_DECORATION 1 // This provides the ability to use an alternative text for tags which contain at least one window aka occupied tags. /* External */ #define EXTERNAL_BARS 1 // Support for external bars, essencial if you want to use external bars. @@ -82,7 +82,7 @@ Even though this sounds complex, it is actually pretty lightweight, and is very /* Misc */ -#define AUTOSTART 0 // Support for vxwm being able to start apps defined in config.h in startup. +#define AUTOSTART 1 // Support for vxwm being able to start apps defined in config.h in startup. #define FULLSCREEN 1 // Support for toggling fullscreen. #define MOVE_IN_TILED 1 // Support for moving windows in tiled mode. #define DIRECTIONAL_FOCUS 1 // yeah. diff --git a/vxwm.c b/vxwm.c @@ -28,6 +28,7 @@ From this moment, i'll try to comment the code and also make it more readable. #include <X11/Xlib.h> #include <X11/Xproto.h> #include <X11/Xutil.h> +#include <X11/XF86keysym.h> #ifdef XINERAMA #include <X11/extensions/Xinerama.h> #endif /* XINERAMA */