diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2024-08-17 10:59:19 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2024-08-17 10:59:19 +0400 |
commit | 73d4b0815c4004dcaff4e9d02c23b7b980314407 (patch) | |
tree | bf0901985b4f128d46e47d3a874a83f1ae0af702 | |
parent | d84cbce0449da46a36c60bfccae5021930d3e1c3 (diff) |
volume, brightness keybinds added and other keybinds changed
-rw-r--r-- | config.h | 57 |
1 files changed, 38 insertions, 19 deletions
@@ -1,9 +1,18 @@ /* See LICENSE file for copyright and license details. */ +#include <X11/XF86keysym.h> + /* appearance */ -static const unsigned int borderpx = 1; /* border pixel of windows */ +static const unsigned int borderpx = 2; /* border pixel of windows */ +static const int startwithgaps = 1; /* 1 means gaps are used by default */ +static const unsigned int gappx = 16; /* default gap between windows in pixels */ static const unsigned int snap = 32; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ +static const int showtitle = 0; /* 0 means no title */ +static const int showtags = 1; /* 0 means no tags */ +static const int showlayout = 1; /* 0 means no layout indicator */ +static const int showstatus = 1; /* 0 means no status bar */ +static const int showfloating = 1; /* 0 means no floating indicator */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = { "monospace:size=10" }; static const char dmenufont[] = "monospace:size=10"; @@ -12,10 +21,12 @@ static const char col_gray2[] = "#444444"; static const char col_gray3[] = "#bbbbbb"; static const char col_gray4[] = "#eeeeee"; static const char col_cyan[] = "#005577"; +static const char col_brown[] = "#282828"; +static const char col_green[] = "#689d6a"; static const char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, - [SchemeSel] = { col_gray4, col_cyan, col_cyan }, + [SchemeSel] = { col_gray4, col_brown, col_green }, }; /* tagging */ @@ -35,13 +46,11 @@ static const Rule rules[] = { static const float mfact = 0.55; /* 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 */ { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, }; /* key definitions */ @@ -61,32 +70,42 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, static const char *termcmd[] = { "st", NULL }; static const char *browsercmd[] = { "qutebrowser", NULL }; +static const char + *light_up[] = {"slight", "-i", "5", NULL}, + *light_down[] = {"slight", "-d", "5", NULL}, + *vol_up[] = {"svol", "-i", "5", NULL}, + *vol_down[] = {"svol", "-d", "5", NULL}, + *vol_toggle[] = {"svol", "-t", NULL}; + + static const Key keys[] = { /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY, XK_Return, spawn, {.v = termcmd } }, + { MODKEY, XK_Return, spawn, {.v = termcmd } }, + { MODKEY|ShiftMask, XK_Return, spawn, {.v = browsercmd } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, - { MODKEY, XK_d, incnmaster, {.i = -1 } }, + { MODKEY|ShiftMask, XK_m, incnmaster, {.i = +1 } }, + { MODKEY, XK_m, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, - { MODKEY, XK_n, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY|ShiftMask, XK_c, killclient, {0} }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = browsercmd} }, - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_space, zoom, {0} }, + { MODKEY|ShiftMask, XK_o, killclient, {0} }, + { MODKEY|ShiftMask, XK_f, togglefloating, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.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 } }, + + { 0 , XF86XK_MonBrightnessUp , spawn , {.v = light_up}}, + { 0 , XF86XK_MonBrightnessDown, spawn , {.v = light_down}}, + { 0 , XF86XK_AudioLowerVolume, spawn , {.v = vol_down}}, + { 0 , XF86XK_AudioRaiseVolume, spawn , {.v = vol_up}}, + { 0 , XF86XK_AudioMute, spawn , {.v = vol_toggle}}, + TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) @@ -96,7 +115,8 @@ static const Key keys[] = { TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_q, quit, {0} }, + + { Mod4Mask|ShiftMask, XK_0, quit, {0} }, }; /* button definitions */ @@ -115,4 +135,3 @@ static const Button buttons[] = { { ClkTagBar, MODKEY, Button1, tag, {0} }, { ClkTagBar, MODKEY, Button3, toggletag, {0} }, }; - |