config.h (7679B)
1 /* See LICENSE file for copyright and license details. */ 2 3 /* appearance */ 4 static const unsigned int borderpx = 0; 5 static const unsigned int snap = 32; 6 static const int showbar = 0; 7 static const int topbar = 1; 8 static const char *fonts[] = { "Martian Mono Std Rg:pixelsize=16" }; 9 static const char dmenufont[] = "Martian Mono Std Rg:pixelsize=16"; 10 static const char col_black[] = "#000000"; 11 static const char col_gray1[] = "#222222"; 12 static const char col_gray2[] = "#444444"; 13 static const char col_ng1[] = "#504945"; 14 static const char col_gray3[] = "#777777"; 15 static const char col_red[] = "#ff0000"; 16 static const char col_green[] = "#00875f"; 17 static const char col_cyan[] = "#005577"; 18 static const char col_yellow[] = "#ffff00"; 19 static const char col_orange[] = "#fe8019"; 20 21 static const char *colors[][3] = { 22 /* fg bg border */ 23 [SchemeNorm] = { col_ng1, col_black, col_gray1 }, 24 [SchemeSel] = { col_gray3, col_black, col_gray2 }, 25 }; 26 27 /* tagging */ 28 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 29 30 static const Rule rules[] = { 31 { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, 32 }; 33 34 /* layout(s) */ 35 static const float mfact = 0.50; 36 static const int nmaster = 1; 37 static const int resizehints = 0; 38 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 39 static const Layout layouts[] = { { "", tile } }; 40 41 /* key definitions */ 42 #define MODKEY Mod1Mask 43 #define ALT Mod1Mask 44 #define META Mod4Mask 45 #define CTL ControlMask 46 #define SHIFT ShiftMask 47 #define TAGKEYS(KEY,TAG) \ 48 { META, KEY, view, {.ui = 1 << TAG} }, \ 49 { META|CTL, KEY, toggleview, {.ui = 1 << TAG} }, \ 50 { META|SHIFT, KEY, tag, {.ui = 1 << TAG} }, \ 51 { META|CTL|SHIFT, KEY, toggletag, {.ui = 1 << TAG} }, 52 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 53 #define SCRIPTS "/home/hassan/.scripts/" 54 55 /* commands */ 56 static char dmenumon[2] = "0"; 57 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL }; 58 static const char *termcmd[] = { "st", NULL }; 59 static const char *passmenu[] = { SCRIPTS "pass_manager", NULL }; 60 static const char *record_screen[] = { SCRIPTS "record_screen", NULL}; 61 62 static const char *call_bluetooth[] = { SCRIPTS "bluetooth_call", NULL }; 63 static const char *bluetooth_connect[] = { SCRIPTS "bluetooth_connect", NULL }; 64 static const char *rfkill[] = { SCRIPTS "rfkill", NULL }; 65 66 67 static const char *mount_drive[] = { SCRIPTS "mount_drives", NULL }; 68 static const char *unmount_drive[] = { SCRIPTS "unmount_drives", NULL }; 69 70 static const char *notify_azan[] = { SCRIPTS "notify_azan", NULL }; 71 static const char *notify_cpu[] = { SCRIPTS "notify_cpu", NULL }; 72 static const char *notify_disks[] = { SCRIPTS "notify_disks", NULL }; 73 static const char *notify_gpu[] = { SCRIPTS "notify_gpu", NULL }; 74 static const char *notify_network[] = { SCRIPTS "network", "notify", NULL }; 75 76 static const char *mute[] = { SCRIPTS "volume_control", "mute_t", NULL }; 77 static const char *volume_down[] = { SCRIPTS "volume_control", "dec", NULL }; 78 static const char *volume_up[] = { SCRIPTS "volume_control", "inc", NULL }; 79 80 static const char *play_music[] = { SCRIPTS "play_music", "start", NULL }; 81 static const char *play_pause[] = { SCRIPTS "play_music", "play-pause", NULL }; 82 static const char *next_song[] = { SCRIPTS "play_music", "next", NULL }; 83 static const char *prev_song[] = { SCRIPTS "play_music", "previous", NULL }; 84 85 static Key keys[] = { 86 { META, XK_space, spawn, {.v = dmenucmd } }, 87 88 { META, XK_Return, spawn, {.v = termcmd } }, 89 { META, XK_p, spawn, {.v = passmenu} }, 90 { META, XK_F2, spawn, {.v = record_screen } }, 91 92 { META|ALT, XK_g, spawn, {.v = call_bluetooth } }, 93 { META|SHIFT, XK_g, spawn, {.v = bluetooth_connect } }, 94 { META|ALT, XK_k, spawn, {.v = rfkill } }, 95 96 { META, XK_t, spawn, {.v = mount_drive } }, 97 { META, XK_s, spawn, {.v = unmount_drive } }, 98 99 { META|ALT, XK_a, spawn, {.v = notify_azan} }, 100 { META|ALT, XK_c, spawn, {.v = notify_cpu} }, 101 { META|ALT, XK_d, spawn, {.v = notify_disks} }, 102 { META|ALT, XK_x, spawn, {.v = notify_gpu} }, 103 { META|ALT, XK_z, spawn, {.v = notify_network} }, 104 105 { META, XK_F10, spawn, {.v = mute} }, 106 { META, XK_F12, spawn, {.v = volume_down} }, 107 { META, XK_F11, spawn, {.v = volume_up} }, 108 109 { META|ALT, XK_p, spawn, {.v = play_music } }, 110 { META, XK_F7, spawn, {.v = play_pause } }, 111 { META, XK_F9, spawn, {.v = next_song} }, 112 { META, XK_F8, spawn, {.v = prev_song} }, 113 114 { META|ALT, XK_l, spawn, SHCMD("pkill gpg-agent; slock") }, 115 { META|ALT, XK_e, spawn, SHCMD("notify-send 'Email' 'mbsync -a' && mbsync -a") }, 116 { META, XK_Tab, view, {0} }, 117 { META, XK_b, togglebar, {0} }, 118 { META, XK_q, killclient, {0} }, 119 { META|SHIFT, XK_j, focusstack, {.i = +1 } }, 120 { META|SHIFT, XK_k, focusstack, {.i = -1 } }, 121 { META, XK_h, setmfact, {.f = -0.01} }, 122 { META, XK_l, setmfact, {.f = +0.01} }, 123 { META, XK_comma, focusmon, {.i = -1 } }, 124 { META, XK_period, focusmon, {.i = +1 } }, 125 { META|SHIFT, XK_period, tagmon, {.i = +1 } }, 126 { META|SHIFT, XK_comma, tagmon, {.i = -1 } }, 127 //{ META|SHIFT, XK_j, movestack, {.i = +1 } }, 128 //{ META|SHIFT, XK_k, movestack, {.i = -1 } }, 129 { META|SHIFT, XK_Return, zoom, {0} }, 130 { META|SHIFT, XK_q, quit, {0} }, 131 TAGKEYS( XK_1, 0) 132 TAGKEYS( XK_2, 1) 133 TAGKEYS( XK_3, 2) 134 TAGKEYS( XK_4, 3) 135 TAGKEYS( XK_5, 4) 136 TAGKEYS( XK_6, 5) 137 TAGKEYS( XK_7, 6) 138 TAGKEYS( XK_8, 7) 139 TAGKEYS( XK_9, 8) 140 }; 141 142 /* button definitions */ 143 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 144 static Button buttons[] = { 145 /* click event mask button function argument */ 146 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 147 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 148 { ClkWinTitle, 0, Button2, zoom, {0} }, 149 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 150 { ClkClientWin, META, Button1, movemouse, {0} }, 151 { ClkClientWin, META, Button2, togglefloating, {0} }, 152 { ClkClientWin, META, Button3, resizemouse, {0} }, 153 { ClkTagBar, 0, Button1, view, {0} }, 154 { ClkTagBar, 0, Button3, toggleview, {0} }, 155 { ClkTagBar, META, Button1, tag, {0} }, 156 { ClkTagBar, META, Button3, toggletag, {0} }, 157 };