add config
This commit is contained in:
parent
81c4c5d8b9
commit
290eab3e66
2 changed files with 216 additions and 124 deletions
48
config.def.h
48
config.def.h
|
|
@ -1,5 +1,7 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
|
|
@ -24,7 +26,7 @@ static const char col_cyan[] = "#005577";
|
||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
[SchemeSel] = { col_gray4, col_gray2, col_cyan },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
|
|
@ -89,6 +91,19 @@ static const char *dmenucmd[] = { "rofi", "-dpi", "1", "-show", "dru
|
||||||
static const char *calccmd[] = { "rofi", "-dpi", "1", "-show", "calc", "-modi", "calc", "-no-show-match", "-no-sort", "-kb-accept-custom", "Return", "-kb-accept-entry", "Control+Return", "-calc-command", "wl-copy {result}", "-theme", "~/.config/rofi/calc.rasi", NULL};
|
static const char *calccmd[] = { "rofi", "-dpi", "1", "-show", "calc", "-modi", "calc", "-no-show-match", "-no-sort", "-kb-accept-custom", "Return", "-kb-accept-entry", "Control+Return", "-calc-command", "wl-copy {result}", "-theme", "~/.config/rofi/calc.rasi", NULL};
|
||||||
static const char *clipboardcmd[] = { "rofi", "-dpi", "1", "-modi", "clipboard:~/bin/cliphist-rofi-img", "-show", "clipboard", "-show-icons", "-theme", "~/.config/rofi/clipboard.rasi", NULL };
|
static const char *clipboardcmd[] = { "rofi", "-dpi", "1", "-modi", "clipboard:~/bin/cliphist-rofi-img", "-show", "clipboard", "-show-icons", "-theme", "~/.config/rofi/clipboard.rasi", NULL };
|
||||||
static const char *termcmd[] = { "wezterm", "-e", NULL };
|
static const char *termcmd[] = { "wezterm", "-e", NULL };
|
||||||
|
static const char *volmicmutecmd[] = { "/usr/bin/pactl", "set-source-mute", "@DEFAULT_SOURCE@", "toggle", NULL };
|
||||||
|
static const char *volsoundmutecmd[] = { "/usr/bin/wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL };
|
||||||
|
static const char *voldecreasecmd[] = { "/usr/bin/wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%-", NULL };
|
||||||
|
static const char *volincreasecmd[] = { "/usr/bin/wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%+", NULL };
|
||||||
|
// brightness
|
||||||
|
static const char *increasebrightnesscmd[] = { "/usr/bin/brightnessctl", "s", "+10%", NULL };
|
||||||
|
static const char *decreasebrightnesscmd[] = { "/usr/bin/brightnessctl", "s", "10%-", NULL };
|
||||||
|
// media
|
||||||
|
static const char *mediaplaypausecmd[] = { "/usr/bin/playerctl", "play-pause", NULL };
|
||||||
|
// static const char *mediaplay[] = { "/usr/bin/playerctl", "play", NULL };
|
||||||
|
// static const char *mediapause[] = { "/usr/bin/playerctl", "pause", NULL };
|
||||||
|
static const char *mediaplaynextcmd[] = { "/usr/bin/playerctl", "next", NULL };
|
||||||
|
static const char *mediaplayprevcmd[] = { "/usr/bin/playerctl", "previous", NULL };
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
|
|
@ -145,6 +160,37 @@ static const Key keys[] = {
|
||||||
TAGKEYS( XK_8, 7)
|
TAGKEYS( XK_8, 7)
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS( XK_9, 8)
|
||||||
TAGKEYS( XK_0, 9)
|
TAGKEYS( XK_0, 9)
|
||||||
|
|
||||||
|
|
||||||
|
// volume
|
||||||
|
{ 0, XF86XK_AudioMicMute, spawn, {.v = volmicmutecmd } },
|
||||||
|
{ 0, XF86XK_AudioMute, spawn, {.v = volsoundmutecmd } },
|
||||||
|
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldecreasecmd } },
|
||||||
|
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volincreasecmd } },
|
||||||
|
|
||||||
|
// media
|
||||||
|
{ 0, XF86XK_AudioPlay, spawn, {.v = mediaplaypausecmd } },
|
||||||
|
{ 0, XF86XK_AudioPause, spawn, {.v = mediaplaypausecmd } },
|
||||||
|
{ 0, XF86XK_AudioNext, spawn, {.v = mediaplaynextcmd } },
|
||||||
|
{ 0, XF86XK_AudioPrev, spawn, {.v = mediaplayprevcmd } },
|
||||||
|
|
||||||
|
// brightness
|
||||||
|
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = increasebrightnesscmd } },
|
||||||
|
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = decreasebrightnesscmd } },
|
||||||
|
|
||||||
|
|
||||||
|
// screenshot
|
||||||
|
{ MODKEY, XK_o, spawn, SHCMD("/usr/bin/maim -s ~/Screenshots/$(date +%Y-%m-%d-%H-%M-%S).png") },
|
||||||
|
{ MODKEY|ShiftMask, XK_o, spawn, SHCMD("/usr/bin/maim -s | /usr/bin/xclip -selection clipboard -t image/png") },
|
||||||
|
{ 0, XK_Print, spawn, SHCMD("/usr/bin/maim -s ~/Screenshots/$(date +%Y-%m-%d-%H-%M-%S).png") },
|
||||||
|
|
||||||
|
// others
|
||||||
|
{ MODKEY, XK_m, spawn, TERM("neomutt") },
|
||||||
|
{ MODKEY, XK_b, spawn, TERM("yazi") },
|
||||||
|
{ MODKEY, XK_semicolon, spawn, TERM("btop") },
|
||||||
|
{ 0, XK_F12, spawn, SHCMD("~/bin/dwm-man") },
|
||||||
|
|
||||||
|
|
||||||
// { MODKEY|ShiftMask, XK_q, quit, {0} },
|
// { MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_r, spawn, SHCMD("dinitctl restart wm") },
|
{ MODKEY|ShiftMask, XK_r, spawn, SHCMD("dinitctl restart wm") },
|
||||||
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("killall dinit") },
|
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("killall dinit") },
|
||||||
|
|
|
||||||
48
config.h
48
config.h
|
|
@ -1,5 +1,7 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
|
|
@ -24,7 +26,7 @@ static const char col_cyan[] = "#005577";
|
||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
[SchemeSel] = { col_gray4, col_gray2, col_cyan },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
|
|
@ -89,6 +91,19 @@ static const char *dmenucmd[] = { "rofi", "-dpi", "1", "-show", "dru
|
||||||
static const char *calccmd[] = { "rofi", "-dpi", "1", "-show", "calc", "-modi", "calc", "-no-show-match", "-no-sort", "-kb-accept-custom", "Return", "-kb-accept-entry", "Control+Return", "-calc-command", "wl-copy {result}", "-theme", "~/.config/rofi/calc.rasi", NULL};
|
static const char *calccmd[] = { "rofi", "-dpi", "1", "-show", "calc", "-modi", "calc", "-no-show-match", "-no-sort", "-kb-accept-custom", "Return", "-kb-accept-entry", "Control+Return", "-calc-command", "wl-copy {result}", "-theme", "~/.config/rofi/calc.rasi", NULL};
|
||||||
static const char *clipboardcmd[] = { "rofi", "-dpi", "1", "-modi", "clipboard:~/bin/cliphist-rofi-img", "-show", "clipboard", "-show-icons", "-theme", "~/.config/rofi/clipboard.rasi", NULL };
|
static const char *clipboardcmd[] = { "rofi", "-dpi", "1", "-modi", "clipboard:~/bin/cliphist-rofi-img", "-show", "clipboard", "-show-icons", "-theme", "~/.config/rofi/clipboard.rasi", NULL };
|
||||||
static const char *termcmd[] = { "wezterm", "-e", NULL };
|
static const char *termcmd[] = { "wezterm", "-e", NULL };
|
||||||
|
static const char *volmicmutecmd[] = { "/usr/bin/pactl", "set-source-mute", "@DEFAULT_SOURCE@", "toggle", NULL };
|
||||||
|
static const char *volsoundmutecmd[] = { "/usr/bin/wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL };
|
||||||
|
static const char *voldecreasecmd[] = { "/usr/bin/wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%-", NULL };
|
||||||
|
static const char *volincreasecmd[] = { "/usr/bin/wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%+", NULL };
|
||||||
|
// brightness
|
||||||
|
static const char *increasebrightnesscmd[] = { "/usr/bin/brightnessctl", "s", "+10%", NULL };
|
||||||
|
static const char *decreasebrightnesscmd[] = { "/usr/bin/brightnessctl", "s", "10%-", NULL };
|
||||||
|
// media
|
||||||
|
static const char *mediaplaypausecmd[] = { "/usr/bin/playerctl", "play-pause", NULL };
|
||||||
|
// static const char *mediaplay[] = { "/usr/bin/playerctl", "play", NULL };
|
||||||
|
// static const char *mediapause[] = { "/usr/bin/playerctl", "pause", NULL };
|
||||||
|
static const char *mediaplaynextcmd[] = { "/usr/bin/playerctl", "next", NULL };
|
||||||
|
static const char *mediaplayprevcmd[] = { "/usr/bin/playerctl", "previous", NULL };
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
|
|
@ -145,6 +160,37 @@ static const Key keys[] = {
|
||||||
TAGKEYS( XK_8, 7)
|
TAGKEYS( XK_8, 7)
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS( XK_9, 8)
|
||||||
TAGKEYS( XK_0, 9)
|
TAGKEYS( XK_0, 9)
|
||||||
|
|
||||||
|
|
||||||
|
// volume
|
||||||
|
{ 0, XF86XK_AudioMicMute, spawn, {.v = volmicmutecmd } },
|
||||||
|
{ 0, XF86XK_AudioMute, spawn, {.v = volsoundmutecmd } },
|
||||||
|
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldecreasecmd } },
|
||||||
|
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volincreasecmd } },
|
||||||
|
|
||||||
|
// media
|
||||||
|
{ 0, XF86XK_AudioPlay, spawn, {.v = mediaplaypausecmd } },
|
||||||
|
{ 0, XF86XK_AudioPause, spawn, {.v = mediaplaypausecmd } },
|
||||||
|
{ 0, XF86XK_AudioNext, spawn, {.v = mediaplaynextcmd } },
|
||||||
|
{ 0, XF86XK_AudioPrev, spawn, {.v = mediaplayprevcmd } },
|
||||||
|
|
||||||
|
// brightness
|
||||||
|
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = increasebrightnesscmd } },
|
||||||
|
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = decreasebrightnesscmd } },
|
||||||
|
|
||||||
|
|
||||||
|
// screenshot
|
||||||
|
{ MODKEY, XK_o, spawn, SHCMD("/usr/bin/maim -s ~/Screenshots/$(date +%Y-%m-%d-%H-%M-%S).png") },
|
||||||
|
{ MODKEY|ShiftMask, XK_o, spawn, SHCMD("/usr/bin/maim -s | /usr/bin/xclip -selection clipboard -t image/png") },
|
||||||
|
{ 0, XK_Print, spawn, SHCMD("/usr/bin/maim -s ~/Screenshots/$(date +%Y-%m-%d-%H-%M-%S).png") },
|
||||||
|
|
||||||
|
// others
|
||||||
|
{ MODKEY, XK_m, spawn, TERM("neomutt") },
|
||||||
|
{ MODKEY, XK_b, spawn, TERM("yazi") },
|
||||||
|
{ MODKEY, XK_semicolon, spawn, TERM("btop") },
|
||||||
|
{ 0, XK_F12, spawn, SHCMD("~/bin/dwm-man") },
|
||||||
|
|
||||||
|
|
||||||
// { MODKEY|ShiftMask, XK_q, quit, {0} },
|
// { MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_r, spawn, SHCMD("dinitctl restart wm") },
|
{ MODKEY|ShiftMask, XK_r, spawn, SHCMD("dinitctl restart wm") },
|
||||||
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("killall dinit") },
|
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("killall dinit") },
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue