dotfiles

Configuration dotfiles
git clone git://git.wimdupont.com/dotfiles.git
Log | Files | Refs | README | LICENSE

dwm-config.diff (10472B)


      1 diff --git a/config.def.h b/config.def.h
      2 index cfc6891..bd4d7f5 100644
      3 --- a/config.def.h
      4 +++ b/config.def.h
      5 @@ -1,14 +1,14 @@
      6  /* See LICENSE file for copyright and license details. */
      7  
      8  /* appearance */
      9 -static const unsigned int borderpx  = 1;        /* border pixel of windows */
     10 +static const unsigned int borderpx  = 7;        /* border pixel of windows */
     11  static const unsigned int snap      = 32;       /* snap pixel */
     12  static const int showbar            = 1;        /* 0 means no bar */
     13  static const int topbar             = 1;        /* 0 means bottom bar */
     14  static const int horizpadbar        = 2;        /* horizontal padding for statusbar */
     15  static const int vertpadbar         = 0;        /* vertical padding for statusbar */
     16 -static const char *fonts[]          = { "monospace:size=10" };
     17 -static const char dmenufont[]       = "monospace:size=10";
     18 +static const char *fonts[]          = { "monospace:size=20" };
     19 +static const char dmenufont[]       = "monospace:size=20";
     20  static const char col_gray1[]       = "#222222";
     21  static const char col_gray2[]       = "#444444";
     22  static const char col_gray3[]       = "#bbbbbb";
     23 @@ -46,8 +46,13 @@ static const Layout layouts[] = {
     24  	{ "[M]",      monocle },
     25  };
     26  
     27 +
     28 +#include <X11/XF86keysym.h>
     29 +
     30  /* key definitions */
     31 -#define MODKEY Mod1Mask
     32 +#define TERMINAL "st"
     33 +#define MODKEY Mod4Mask
     34 +#define MODKEY1 Mod1Mask
     35  #define TAGKEYS(KEY,TAG) \
     36  	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
     37  	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
     38 @@ -64,21 +69,72 @@ static const char *termcmd[]  = { "st", NULL };
     39  
     40  static const Key keys[] = {
     41  	/* modifier                     key        function        argument */
     42 -	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
     43 +	{ MODKEY,                       XK_d,      spawn,          {.v = dmenucmd } },
     44  	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
     45 +	{ MODKEY,                       XK_u,      spawn,          SHCMD("usb-mounter") },
     46 +	{ MODKEY|ShiftMask,             XK_u,      spawn,          SHCMD("usb-unmounter") },
     47 +	{ MODKEY1|ControlMask,          XK_m,      spawn,          SHCMD("mpvd") },
     48 +	{ MODKEY1|ControlMask|ShiftMask,XK_m,	   spawn,          {.v = (const char*[]){ TERMINAL, "-e", "bgm", NULL } } },
     49 +	{ MODKEY|ShiftMask,             XK_m,	   spawn,          {.v = (const char*[]){ TERMINAL, "-e", "mail", NULL } } },
     50 +	{ MODKEY|ShiftMask,             XK_s,      spawn,          SHCMD("mail sync") },
     51 +	{ MODKEY,                       XK_t,      spawn,          SHCMD("mpvpop volume 5") },
     52 +	{ MODKEY|ShiftMask,             XK_t,      spawn,          SHCMD("mpvpop volume -5") },
     53 +	{ MODKEY1|ControlMask,          XK_t,      spawn,          SHCMD("mpvpop pause") },
     54 +	{ 0,                XF86XK_AudioPlay,      spawn,          SHCMD("mpvpop pause") },
     55 +	{ 0,               XF86XK_AudioPause,      spawn,          SHCMD("mpvpop pause") },
     56 +	{ MODKEY1|ControlMask|ShiftMask,XK_t,      spawn,          SHCMD("mpvpop stop") },
     57 +	{ 0,                XF86XK_AudioStop,      spawn,          SHCMD("mpvpop stop") },
     58 +	{ MODKEY,                       XK_n,      spawn,          SHCMD("mpvpop next") },
     59 +	{ 0,                XF86XK_AudioNext,      spawn,          SHCMD("mpvpop next") },
     60 +	{ MODKEY|ShiftMask,             XK_n,      spawn,          SHCMD("mpvpop prev") },
     61 +	{ 0,                XF86XK_AudioPrev,      spawn,          SHCMD("mpvpop prev") },
     62 +	{ MODKEY1|ControlMask,          XK_j,      spawn,          SHCMD("journalwrite") },
     63 +	{ MODKEY,                       XK_o,      spawn,          SHCMD("bookmark") },
     64 +	{ MODKEY|ShiftMask,		XK_o,	   spawn,          SHCMD(TERMINAL " -e vim ~/.config/scripts/bookmarks") },
     65 +	{ MODKEY1|ControlMask,          XK_r,      spawn,          SHCMD("radio") },
     66 +	{ MODKEY1|ControlMask|ShiftMask,XK_r,	   spawn,          SHCMD(TERMINAL " -e vim ~/.config/scripts/radiostations") },
     67 +	{ MODKEY1|ControlMask,          XK_l,      spawn,          SHCMD("gpg-connect-agent reloadagent /bye & ssh-add -D & sudo -K & slock") },
     68 +	{ 0,              XF86XK_ScreenSaver,      spawn,          SHCMD("gpg-connect-agent reloadagent /bye & ssh-add -D & sudo -K & slock") },
     69 +	{ 0,                            XK_Print,  spawn,          SHCMD("maim | tee ~/pictures/screenshot-$(date +\"%F_%m_%S\").png | xclip -selection clipboard -t image/png") },
     70 +	{ ShiftMask,                    XK_Print,  spawn,          SHCMD("maim --select | tee ~/pictures/screenshot-$(date +\"%F_%m_%S\").png | xclip -selection clipboard -t image/png") },
     71 +	{ MODKEY,                       XK_i,      spawn,          SHCMD("mpvpop info") },
     72 +	{ MODKEY|ShiftMask,             XK_i,      spawn,          SHCMD("dunstify -h string:x-dunst-stack-tag:fcoin \"$(sh /usr/local/bin/coin -f 'name current_price price_change_24h' monero bitcoin)\" ") },
     73 +	{ MODKEY1|ControlMask,          XK_c,      spawn,          SHCMD("pclip") },
     74 +	{ MODKEY1|ControlMask|ShiftMask,XK_c,      spawn,          SHCMD("xclip -selection primary -i /dev/null & xclip -selection secondary -i /dev/null & xclip -selection clipboard -i /dev/null && notify-send \"Clipboard cleared\"") },
     75 +	{ MODKEY1|ControlMask,          XK_w,      spawn,          SHCMD("shuf -e -n1 $HOME/pictures/wallpapers/* | xargs feh --bg-max") },
     76 +	{ MODKEY1|ControlMask|ShiftMask,XK_w,      spawn,          SHCMD("shuf -e -n1 $HOME/pictures/bookart/*/* | xargs feh --bg-max") },
     77 +	{ MODKEY|ShiftMask,             XK_w,      spawn,          SHCMD("shuf -e -n1 $HOME/pictures/educational/*/* | xargs feh --bg-max") },
     78 +	{ MODKEY,                       XK_p,      spawn,          SHCMD("pwu -c") },
     79 +	{ MODKEY|ShiftMask,             XK_p,      spawn,          SHCMD("otp") },
     80 +	{ MODKEY1|ControlMask,          XK_p,      spawn,          SHCMD("pwu -t -c") },
     81 +	{ MODKEY1|ControlMask|ShiftMask,XK_p,      spawn,          SHCMD("otp -t") },
     82 +	{ 0,         XF86XK_AudioRaiseVolume,      spawn,          SHCMD("pactl set-sink-volume $(pactl get-default-sink) +5% && dunstify -h string:x-dunst-stack-tag:volume Volume:$(pactl get-sink-volume $(pactl get-default-sink) | cut -d '/' -f2)") },
     83 +	{ MODKEY1|ControlMask,          XK_v,      spawn,          SHCMD("pactl set-sink-volume $(pactl get-default-sink) +5% && dunstify -h string:x-dunst-stack-tag:volume Volume:$(pactl get-sink-volume $(pactl get-default-sink) | cut -d '/' -f2)") },
     84 +	{ 0,         XF86XK_AudioLowerVolume,      spawn,          SHCMD("pactl set-sink-volume $(pactl get-default-sink) -5% && dunstify -h string:x-dunst-stack-tag:volume Volume:$(pactl get-sink-volume $(pactl get-default-sink) | cut -d '/' -f2)") },
     85 +	{ MODKEY1|ControlMask|ShiftMask,XK_v,      spawn,          SHCMD("pactl set-sink-volume $(pactl get-default-sink) -5% && dunstify -h string:x-dunst-stack-tag:volume Volume:$(pactl get-sink-volume $(pactl get-default-sink) | cut -d '/' -f2)") },
     86 +	{ MODKEY,                       XK_m,      spawn,          SHCMD("pactl set-sink-mute $(pactl get-default-sink) toggle && dunstify -h string:x-dunst-stack-tag:mute $(pactl get-sink-mute $(pactl get-default-sink))") },
     87 +	{ 0,                XF86XK_AudioMute,      spawn,          SHCMD("pactl set-sink-mute $(pactl get-default-sink) toggle && dunstify -h string:x-dunst-stack-tag:mute $(pactl get-sink-mute $(pactl get-default-sink))") },
     88 +	{ 0,          XF86XK_MonBrightnessUp,      spawn,          SHCMD("light -A 2.5 && dunstify -h string:x-dunst-stack-tag:brightness Brightness:$(light)") },
     89 +	{ MODKEY1|ControlMask,          XK_b,      spawn,          SHCMD("light -A 2.5 && dunstify -h string:x-dunst-stack-tag:brightness Brightness:$(light)") },
     90 +	{ 0,        XF86XK_MonBrightnessDown,      spawn,          SHCMD("light -U 2.5 && dunstify -h string:x-dunst-stack-tag:brightness Brightness:$(light)") },
     91 +	{ MODKEY1|ControlMask|ShiftMask,XK_b,      spawn,          SHCMD("light -U 2.5 && dunstify -h string:x-dunst-stack-tag:brightness Brightness:$(light)") },
     92 +	{ MODKEY|ShiftMask,             XK_b,      spawn,          SHCMD("light -S 50 && dunstify -h string:x-dunst-stack-tag:brightness Brightness:$(light)") },
     93 +	{ MODKEY1|ControlMask,          XK_g,      spawn,          SHCMD("ubright -v 0.1") },
     94 +	{ MODKEY1|ControlMask|ShiftMask,XK_g,      spawn,          SHCMD("ubright -v -0.1") },
     95 +	{ MODKEY|ShiftMask,             XK_g,      spawn,          SHCMD("ubright") },
     96  	{ MODKEY,                       XK_b,      togglebar,      {0} },
     97  	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
     98  	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
     99 -	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
    100 -	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
    101 +	{ MODKEY,                       XK_y,      incnmaster,     {.i = +1 } },
    102 +	{ MODKEY|ShiftMask,             XK_y,      incnmaster,     {.i = -1 } },
    103  	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
    104  	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
    105  	{ MODKEY,                       XK_Return, zoom,           {0} },
    106  	{ MODKEY,                       XK_Tab,    view,           {0} },
    107 -	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    108 -	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    109 -	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    110 -	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    111 +	{ MODKEY|ShiftMask,             XK_q,      killclient,     {0} },
    112 + 	{ MODKEY,                       XK_e,      setlayout,      {.v = &layouts[0]} },
    113 + 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    114 + 	{ MODKEY,                       XK_s,      setlayout,      {.v = &layouts[2]} },
    115  	{ MODKEY,                       XK_space,  setlayout,      {0} },
    116  	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    117  	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    118 @@ -96,7 +152,7 @@ static const Key keys[] = {
    119  	TAGKEYS(                        XK_7,                      6)
    120  	TAGKEYS(                        XK_8,                      7)
    121  	TAGKEYS(                        XK_9,                      8)
    122 -	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
    123 +	{ MODKEY|ShiftMask,             XK_r,      quit,           {0} },
    124  };
    125  
    126  /* button definitions */