Skip to content

Commit

Permalink
update main
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTitusTech committed Aug 29, 2024
1 parent 19ab1b7 commit cdccfe5
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 85 deletions.
164 changes: 79 additions & 85 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, dis
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 */
#define ICONSIZE 17 /* icon size */
#define ICONSPACING 5 /* space between icon and title */
#define SHOWWINICON 1 /* 0 means no winicon */
#define ICONSIZE 17 /* icon size */
#define ICONSPACING 5 /* space between icon and title */
#define SHOWWINICON 1 /* 0 means no winicon */
static const char *fonts[] = { "MesloLGS Nerd Font Mono:size=16", "NotoColorEmoji:pixelsize=16:antialias=true:autohint=true" };
static const char normbordercolor[] = "#3B4252";
static const char normbgcolor[] = "#2E3440";
Expand All @@ -31,41 +31,37 @@ static const char *colors[][3] = {
};

static const char *const autostart[] = {
"xset", "s", "off", NULL,
"xset", "s", "noblank", NULL,
"xset", "-dpms", NULL,
"dbus-update-activation-environment", "--systemd", "--all", NULL,
"/usr/lib/mate-polkit/polkit-mate-authentication-agent-1", NULL,
"flameshot", NULL,
"dunst", NULL,
"picom", "-b", NULL,
"sh", "-c", "feh --randomize --bg-fill ~/Pictures/backgrounds/*", NULL,
"synergy", NULL,
"slstatus", NULL,
NULL /* terminate */
"xset", "s", "off", NULL,
"xset", "s", "noblank", NULL,
"xset", "-dpms", NULL,
"dbus-update-activation-environment", "--systemd", "--all", NULL,
"/usr/lib/mate-polkit/polkit-mate-authentication-agent-1", NULL,
"flameshot", NULL,
"dunst", NULL,
"picom", "-b", NULL,
"sh", "-c", "feh --randomize --bg-fill ~/Pictures/backgrounds/*", NULL,
"synergy", NULL,
"slstatus", NULL,
NULL /* terminate */
};

/* tagging */
static const char *tags[] = { "", "", "", "", "" };
static const char *tags[] = { "", "", "", "", "" };

static const char ptagf[] = "[%s %s]"; /* format of a tag label */
static const char etagf[] = "[%s]"; /* format of an empty tag */
static const int lcaselbl = 0; /* 1 means make tag label lowercase */

static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating isterminal noswallow monitor */
{ "St", NULL, NULL, 0, 0, 1, 0, 0 },
{ "kitty", NULL, NULL, 0, 0, 1, 0, 0 },
{ "Alacritty", NULL, NULL, 0, 0, 1, 0, 0 },
{ "terminator", NULL, NULL, 0, 0, 1, 0, 0 },
{ "lutris", NULL, NULL, 0, 1, 0, 0, 0 },
{ "steam_app_default", NULL, NULL, 0, 1, 0, 0, 0 },
{ "thunar", NULL, NULL, 0, 1, 0, 0, 0 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
/* class instance title tags mask isfloating isterminal noswallow monitor */
{ "St", NULL, NULL, 0, 0, 1, 0, 0 },
{ "kitty", NULL, NULL, 0, 0, 1, 0, 0 },
{ "Alacritty", NULL, NULL, 0, 0, 1, 0, 0 },
{ "terminator", NULL, NULL, 0, 0, 1, 0, 0 },
{ "lutris", NULL, NULL, 0, 1, 0, 0, 0 },
{ "steam_app_default", NULL, NULL, 0, 1, 0, 0, 0 },
{ "thunar", NULL, NULL, 0, 1, 0, 0, 0 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
};

/* layout(s) */
Expand All @@ -76,9 +72,9 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win

static const Layout layouts[] = {
/* symbol arrange function */
{ "", tile }, /* first entry is default */
{ "", NULL }, /* no layout function means floating behavior */
{ "", monocle },
{ "", tile }, /* first entry is default */
{ "", NULL }, /* no layout function means floating behavior */
{ "", monocle },
};

/* key definitions */
Expand All @@ -97,59 +93,57 @@ static const char *launchercmd[] = { "rofi", "-show", "drun", NULL };
static const char *termcmd[] = { "alacritty", NULL };

static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_r, spawn, {.v = launchercmd} }, // spawn rofi for launching other programs
{ MODKEY|ControlMask, XK_r, spawn, SHCMD ("protonrestart")}, // restart protonvpn
{ MODKEY, XK_x, spawn, {.v = termcmd } }, // spawn a terminal
{ MODKEY, XK_b, spawn, SHCMD ("xdg-open https://")}, // open default browser
{ MODKEY, XK_p, spawn, SHCMD ("flameshot full -p /media/drive/Screenshots/")}, // capture full screen screenshot
{ MODKEY|ShiftMask, XK_p, spawn, SHCMD ("flameshot gui -p /media/drive/Screenshots/")}, // open flameshot gui for screenshot selection
{ MODKEY|ControlMask, XK_p, spawn, SHCMD ("flameshot gui --clipboard")}, // copy screenshot to clipboard
{ MODKEY, XK_e, spawn, SHCMD ("thunar")}, // open thunar file manager
{ MODKEY, XK_w, spawn, SHCMD ("looking-glass-client -F")}, // start Looking glass
{ MODKEY|ShiftMask, XK_w, spawn, SHCMD ("feh --randomize --bg-fill ~/Pictures/backgrounds/*")}, // start Looking glass
{ 0, 0x1008ff02, spawn, SHCMD ("xbacklight -inc 10")}, // increase backlight brightness
{ 0, 0x1008ff03, spawn, SHCMD ("xbacklight -dec 10")}, // decrease backlight brightness
{ 0, 0x1008ff1b, spawn, SHCMD ("xbacklight -inc 10")}, // increase backlight brightness
{ 0, 0x1008ff8e, spawn, SHCMD ("xbacklight -dec 10")}, // decrease backlight brightness
{ 0, 0x1008ff11, spawn, SHCMD ("amixer sset Master 5%- unmute")}, // unmute volume
{ 0, 0x1008ff12, spawn, SHCMD ("amixer sset Master $(amixer get Master | grep -q '\\[on\\]' && echo 'mute' || echo 'unmute')")}, // toggle mute/unmute
{ 0, 0x1008ff13, spawn, SHCMD ("amixer sset Master 5%+ unmute")}, // unmute volume
{ MODKEY|ShiftMask, XK_b, togglebar, {0} }, // toggle bar visibility
{ MODKEY, XK_j, focusstack, {.i = +1 } }, // focus on the next client in the stack
{ MODKEY, XK_k, focusstack, {.i = -1 } }, // focus on the previous client in the stack
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } }, // move stack up
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } }, // move stack down
{ MODKEY, XK_i, incnmaster, {.i = +1 } }, // decrease the number of clients in the master area
{ MODKEY, XK_d, incnmaster, {.i = -1 } }, // increase the number of clients in the master area
{ MODKEY, XK_h, setmfact, {.f = -0.05} }, // decrease the size of the master area compared to the stack area(s)
{ MODKEY, XK_l, setmfact, {.f = +0.05} }, // increase the size of the master area compared to the stack area(s)
{ MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.25} }, // increase size respective to other windows within the same area
{ MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.25} }, // decrease client size respective to other windows within the same area
{ MODKEY|ShiftMask, XK_o, setcfact, {.f = 0.00} }, // reset client area
{ MODKEY, XK_Return, zoom, {0} }, // moves the currently focused window to/from the master area (for tiled layouts)
{ MODKEY, XK_Tab, view, {0} }, // view last focused tag
{ MODKEY, XK_q, killclient, {0} }, // close the currently focused window
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, // set tile layout
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, // set floating layout
{ MODKEY, XK_m, fullscreen, {0} }, // toggles fullscreen for the currently selected client
{ MODKEY, XK_space, setlayout, {0} }, // toggles between current and previous layout
{ MODKEY|ShiftMask, XK_m, togglefloating, {0} }, // toggles between tiled and floating arrangement for the currently focused client
{ MODKEY|ShiftMask, XK_y, togglefakefullscreen, {0} }, // toggles "fake" fullscreen for the selected window
{ MODKEY, XK_0, view, {.ui = ~0 } }, // view all tags on the current monitor
{ MODKEY, XK_comma, focusmon, {.i = -1 } }, // focus on the previous monitor, if any
{ MODKEY, XK_period, focusmon, {.i = +1 } }, // focus on the next monitor, if any
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, // tag previous monitor
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, // tag next monitor
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
{ MODKEY|ShiftMask, XK_q, quit, {0} }, // exit dwm
{ MODKEY|ControlMask, XK_q, spawn, SHCMD("$HOME/.config/rofi/powermenu.sh")}, // exit dwm
{ MODKEY|ControlMask|ShiftMask, XK_r, spawn, SHCMD("systemctl reboot")}, // reboot system
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, SHCMD("systemctl suspend")}, // suspend system
/* modifier key function argument */
{ MODKEY, XK_r, spawn, {.v = launchercmd} },
{ MODKEY|ControlMask, XK_r, spawn, SHCMD ("protonrestart")},
{ MODKEY, XK_x, spawn, {.v = termcmd } },
{ MODKEY, XK_b, spawn, SHCMD ("xdg-open https://")},
{ MODKEY, XK_p, spawn, SHCMD ("flameshot full -p /media/drive/Screenshots/")},
{ MODKEY|ShiftMask, XK_p, spawn, SHCMD ("flameshot gui -p /media/drive/Screenshots/")},
{ MODKEY|ControlMask, XK_p, spawn, SHCMD ("flameshot gui --clipboard")},
{ MODKEY, XK_e, spawn, SHCMD ("thunar")},
{ MODKEY, XK_w, spawn, SHCMD ("looking-glass-client -F")},
{ MODKEY|ShiftMask, XK_w, spawn, SHCMD ("feh --randomize --bg-fill ~/Pictures/backgrounds/*")},
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD ("xbacklight -inc 10")},
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD ("xbacklight -dec 10")},
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD ("amixer sset Master 5%- unmute")},
{ 0, XF86XK_AudioMute, spawn, SHCMD ("amixer sset Master $(amixer get Master | grep -q '\\[on\\]' && echo 'mute' || echo 'unmute')")},
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD ("amixer sset Master 5%+ unmute")},
{ MODKEY|ShiftMask, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.25} },
{ MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.25} },
{ MODKEY|ShiftMask, XK_o, setcfact, {.f = 0.00} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, fullscreen, {0} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_m, togglefloating, {0} },
{ MODKEY|ShiftMask, XK_y, togglefakefullscreen, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY|ControlMask, XK_q, spawn, SHCMD("$HOME/.config/rofi/powermenu.sh")},
{ MODKEY|ControlMask|ShiftMask, XK_r, spawn, SHCMD("systemctl reboot")},
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, SHCMD("systemctl suspend")},
};

/* button definitions */
Expand Down
1 change: 1 addition & 0 deletions dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <sys/wait.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
#include <X11/XF86keysym.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xproto.h>
Expand Down
Binary file modified release/dwm
Binary file not shown.
Binary file modified release/dwm-6.5.tar.gz
Binary file not shown.

0 comments on commit cdccfe5

Please sign in to comment.