config.h (10579B)
1 /* See LICENSE file for copyright and license details. */ 2 #include <gcolors.h> 3 #include <X11/XF86keysym.h> 4 5 /* appearance */ 6 static const unsigned int borderpx = 3; /* border pixel of windows */ 7 static const unsigned int gappx = 12; /* gaps between windows */ 8 static const unsigned int snap = 32; /* snap pixel */ 9 static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ 10 static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: pin systray to monitor X*/ 11 static const unsigned int systrayspacing = 2; /* systray spacing */ 12 static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ 13 static const int showsystray = 1; 14 static const int showbar = 1; /* 0 means no bar */ 15 static const int topbar = 1; /* 0 means bottom bar */ 16 static const char *fonts[] = { "mononoki Nerd Font Mono:size=10" }; // Previamente en monospace:size=10 17 static const char dmenufont[] = "mononoki Nerd Font Mono:size=10"; 18 static const char col_gray1[] = "#222222";//COL_BG_0; //"#222222"; 19 static const char col_gray2[] = "#444444";//COL_BG_1; //"#444444"; 20 static const char col_gray3[] = "#bbbbbb"; 21 static const char col_gray4[] = "#eeeeee"; 22 static const char col_fosc[] = COL_FOSC; //"#590c0a"; 23 static const char col_clar[] = COL_CLAR; //"#005577"; col_cyan 24 //static const char col_granate[] = "#590c0a"; 25 static const char col_black[] = COL_NEGRE; 26 static const char col_red[] = COL_VERMELL; 27 static const char col_yellow[] = COL_GROC; 28 static const char col_white[] = COL_BLANC; 29 static const char col_granate[] = "#663338"; 30 //{ 0, XF86XK_AudioLowerVolume, spawn, {.v = "amixer sset Master 1%- | pkill -RTMIN+10 dwmblocks" } }, 31 static const char *decvol[] = { "/bin/bash", "-c", "amixer sset Master 1%- | pkill -RTMIN+10 dwmblocks", NULL }; 32 static const char *upvol[] = { "/bin/bash", "-c", "amixer sset Master 1%+ | kill -44 $(pidof dwmblocks)", NULL }; 33 static const char *decbrillo[] = { "/bin/bash", "-c", "brightnessctl -d \"intel_backlight\" set 5%-", NULL }; 34 static const char *upbrillo[] = { "/bin/bash", "-c", "brightnessctl -d \"intel_backlight\" set 5%+", NULL }; 35 static const char *cambiarTeclado[] = { "/bin/bash", "-c", "layout | pkill -RTMIN+10 dwmblocks", NULL }; 36 37 static const char *colors[][3] = { 38 /* fg bg border */ 39 [SchemeStatus] = { col_gray3, col_gray1, col_gray2 }, 40 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 41 [SchemeSel] = { col_gray4, col_granate, col_granate }, 42 [SchemeTagsSel] = { col_clar, col_gray2, "#000000" }, // Tagbar selected 43 [SchemeTagsNorm] = { col_gray3, col_gray1, "#000000" }, // Tagbar selected 44 [SchemeInfoSel] = { col_gray4, col_fosc, "#000000" }, // Tagbar selected 45 [SchemeInfoNorm] = { col_gray3, col_gray1, "#000000" }, // Tagbar selected 46 }; 47 48 /* tagging */ 49 //static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 50 static const char *tags[] = { "1", "2", "3", "4", "5" }; 51 52 static const Rule rules[] = { 53 /* xprop(1): 54 * WM_CLASS(STRING) = instance, class 55 * WM_NAME(STRING) = title 56 */ 57 /* class instance title tags mask isfloating monitor */ 58 { "Gimp", NULL, NULL, 0, 1, -1 }, 59 { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, 60 }; 61 62 /* layout(s) */ 63 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 64 static const int nmaster = 1; /* number of clients in master area */ 65 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 66 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 67 68 static const Layout layouts[] = { 69 /* symbol arrange function */ 70 { "[]=", tile }, /* first entry is default */ 71 { "><>", NULL }, /* no layout function means floating behavior */ 72 { "[M]", monocle }, 73 }; 74 75 /* key definitions */ 76 #define MODKEY Mod4Mask 77 #define TAGKEYS(KEY,TAG) \ 78 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 79 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 80 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 81 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 82 83 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 84 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 85 86 /* commands */ 87 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 88 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_fosc, "-sf", col_gray4, NULL }; 89 static const char *termcmd[] = { "st", NULL }; 90 91 static Key keys[] = { 92 /* modifier key function argument */ 93 { MODKEY, XK_p, spawn, {.v = dmenucmd } }, 94 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, 95 { MODKEY, XK_b, togglebar, {0} }, 96 { MODKEY, XK_j, focusstack, {.i = +1 } }, 97 { MODKEY, XK_k, focusstack, {.i = -1 } }, 98 { MODKEY, XK_i, incnmaster, {.i = +1 } }, 99 { MODKEY, XK_d, incnmaster, {.i = -1 } }, 100 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 101 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 102 { MODKEY, XK_Return, zoom, {0} }, 103 { MODKEY, XK_q, zoom, {0} }, 104 { MODKEY, XK_Tab, view, {0} }, 105 { MODKEY|ShiftMask, XK_c, killclient, {0} }, 106 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 107 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 108 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 109 { MODKEY, XK_space, setlayout, {0} }, 110 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 111 { MODKEY, XK_s, togglesticky, {0} }, 112 { MODKEY, XK_Down, moveresize, {.v = "0x 25y 0w 0h"} }, 113 { MODKEY, XK_Up, moveresize, {.v = "0x -25y 0w 0h"} }, 114 { MODKEY, XK_Right, moveresize, {.v = "25x 0y 0w 0h"} }, 115 { MODKEY, XK_Left, moveresize, {.v = "-25x 0y 0w 0h"} }, 116 { MODKEY|ShiftMask, XK_Down, moveresize, {.v = "0x 0y 0w 25h"} }, 117 { MODKEY|ShiftMask, XK_Up, moveresize, {.v = "0x 0y 0w -25h"} }, 118 { MODKEY|ShiftMask, XK_Right, moveresize, {.v = "0x 0y 25w 0h"} }, 119 { MODKEY|ShiftMask, XK_Left, moveresize, {.v = "0x 0y -25w 0h"} }, 120 { MODKEY|ControlMask, XK_Up, moveresizeedge, {.v = "t"} }, 121 { MODKEY|ControlMask, XK_Down, moveresizeedge, {.v = "b"} }, 122 { MODKEY|ControlMask, XK_Left, moveresizeedge, {.v = "l"} }, 123 { MODKEY|ControlMask, XK_Right, moveresizeedge, {.v = "r"} }, 124 { MODKEY|ControlMask|ShiftMask, XK_Up, moveresizeedge, {.v = "T"} }, 125 { MODKEY|ControlMask|ShiftMask, XK_Down, moveresizeedge, {.v = "B"} }, 126 { MODKEY|ControlMask|ShiftMask, XK_Left, moveresizeedge, {.v = "L"} }, 127 { MODKEY|ControlMask|ShiftMask, XK_Right, moveresizeedge, {.v = "R"} }, 128 { MODKEY, XK_0, view, {.ui = ~0 } }, 129 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 130 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 131 { MODKEY, XK_period, focusmon, {.i = +1 } }, 132 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 133 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 134 { MODKEY, XK_minus, setgaps, {.i = -1 } }, 135 { MODKEY, XK_equal, setgaps, {.i = +1 } }, 136 { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, 137 { 0, XF86XK_AudioLowerVolume, spawn, {.v = decvol } }, 138 { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } }, 139 { 0, XF86XK_MonBrightnessDown, spawn, {.v = decbrillo } }, 140 { 0, XF86XK_MonBrightnessUp, spawn, {.v = upbrillo } }, 141 { MODKEY, XK_w, spawn, {.v = cambiarTeclado } }, 142 //{ 0, XF86XK_AudioLowerVolume, spawn, {.v = "amixer sset Master 1%- | pkill -RTMIN+10 dwmblocks" } }, 143 TAGKEYS( XK_1, 0) 144 TAGKEYS( XK_2, 1) 145 TAGKEYS( XK_3, 2) 146 TAGKEYS( XK_4, 3) 147 TAGKEYS( XK_5, 4) 148 TAGKEYS( XK_6, 5) 149 TAGKEYS( XK_7, 6) 150 TAGKEYS( XK_8, 7) 151 TAGKEYS( XK_9, 8) 152 { MODKEY|ShiftMask, XK_q, quit, {0} }, 153 }; 154 155 /* button definitions */ 156 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 157 static Button buttons[] = { 158 /* click event mask button function argument */ 159 { ClkTagBar, MODKEY, Button1, tag, {0} }, 160 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 161 { ClkWinTitle, 0, Button2, zoom, {0} }, 162 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 163 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 164 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 165 { ClkClientWin, MODKEY, Button2, resizemouse, {0} }, 166 { ClkTagBar, 0, Button1, view, {0} }, 167 { ClkTagBar, 0, Button3, toggleview, {0} }, 168 { ClkTagBar, MODKEY, Button1, tag, {0} }, 169 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 170 }; 171