diff --git a/config.def.h b/config.def.h index b760a15..6ec56d5 100644 --- a/config.def.h +++ b/config.def.h @@ -6,21 +6,7 @@ static const unsigned int snap = 32; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 0; /* 0 means bottom bar */ static const char *fonts[] = { "monospace:size=10" }; -//static const char *fonts[] = { "JetBrains Mono Nerd Font:size=11:antialias=true:autohint=true" }; -//static const char dmenufont[] = "JetBrains Mono Nerd Font:size=12"; static const char dmenufont[] = { "monospace:size=10" }; -//static const char col_gray1[] = "#222222"; -//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_cyan[] = "#d90429"; -//static const char *colors[][3] = { -// /* fg bg border */ -// [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, -// [SchemeSel] = { col_gray4, col_cyan, col_cyan }, -//}; - static const char col_gray1[] = "#222222"; static const char col_gray2[] = "#444444"; @@ -35,9 +21,6 @@ static const char *colors[][3] = { [SchemeSel] = { col_gray4, col_main, col_alert }, }; - - - /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; @@ -79,22 +62,11 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_main, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "alacritty", NULL }; static const char *slockcmd[] = { "slock", NULL }; -// Brightness commands -static const char *brightness[3][4] = { { - "xbacklight", "-inc", "5" - }, { - "xbacklight", "-dec", "5" - } -}; -// Volume Commands -static const char *volume[3][4] = { { - "pamixer", "-i", "10" - },{ - "pamixer", "-d", "10" - },{ - "pamixer", "--toggle-mute" - } -}; +static const char *brightness[3][4] = { {"xbacklight", "-inc", "5"}, {"xbacklight", "-dec", "5"} }; +static const char *volume[3][4] = { {"pamixer", "-i", "10"}, {"pamixer", "-d", "10"}, {"pamixer", "--toggle-mute"} }; +static const char *xkbmapus[] = { "setxkbmap", "us", NULL }; +static const char *xkbmapcz[] = { "setxkbmap", "cz", "qwerty", NULL }; + static const Key keys[] = { /* modifier key function argument */ @@ -140,8 +112,12 @@ static const Key keys[] = { TAGKEYS( 17, 7) // 8 TAGKEYS( 18, 8) // 9 { MODKEY|ShiftMask, 24, quit, {0} }, // q + { MODKEY, 127, spawn, SHCMD("setxkbmap us; slock & sleep 0.2; loginctl suspend") }, // Pause { 0, 107, spawn, SHCMD("shotgun $(slop -f '-i %i -g %g') - | tee /home/$USER/Pictures/Screenshots/$(date +'%F_%T').png | xclip -t 'image/png' -selection c") }, + { MODKEY, 30, spawn, {.v = xkbmapus } }, + { MODKEY, 54, spawn, {.v = xkbmapcz } }, + }; /* button definitions */ diff --git a/config.h b/config.h index b760a15..6ec56d5 100644 --- a/config.h +++ b/config.h @@ -6,21 +6,7 @@ static const unsigned int snap = 32; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 0; /* 0 means bottom bar */ static const char *fonts[] = { "monospace:size=10" }; -//static const char *fonts[] = { "JetBrains Mono Nerd Font:size=11:antialias=true:autohint=true" }; -//static const char dmenufont[] = "JetBrains Mono Nerd Font:size=12"; static const char dmenufont[] = { "monospace:size=10" }; -//static const char col_gray1[] = "#222222"; -//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_cyan[] = "#d90429"; -//static const char *colors[][3] = { -// /* fg bg border */ -// [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, -// [SchemeSel] = { col_gray4, col_cyan, col_cyan }, -//}; - static const char col_gray1[] = "#222222"; static const char col_gray2[] = "#444444"; @@ -35,9 +21,6 @@ static const char *colors[][3] = { [SchemeSel] = { col_gray4, col_main, col_alert }, }; - - - /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; @@ -79,22 +62,11 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_main, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "alacritty", NULL }; static const char *slockcmd[] = { "slock", NULL }; -// Brightness commands -static const char *brightness[3][4] = { { - "xbacklight", "-inc", "5" - }, { - "xbacklight", "-dec", "5" - } -}; -// Volume Commands -static const char *volume[3][4] = { { - "pamixer", "-i", "10" - },{ - "pamixer", "-d", "10" - },{ - "pamixer", "--toggle-mute" - } -}; +static const char *brightness[3][4] = { {"xbacklight", "-inc", "5"}, {"xbacklight", "-dec", "5"} }; +static const char *volume[3][4] = { {"pamixer", "-i", "10"}, {"pamixer", "-d", "10"}, {"pamixer", "--toggle-mute"} }; +static const char *xkbmapus[] = { "setxkbmap", "us", NULL }; +static const char *xkbmapcz[] = { "setxkbmap", "cz", "qwerty", NULL }; + static const Key keys[] = { /* modifier key function argument */ @@ -140,8 +112,12 @@ static const Key keys[] = { TAGKEYS( 17, 7) // 8 TAGKEYS( 18, 8) // 9 { MODKEY|ShiftMask, 24, quit, {0} }, // q + { MODKEY, 127, spawn, SHCMD("setxkbmap us; slock & sleep 0.2; loginctl suspend") }, // Pause { 0, 107, spawn, SHCMD("shotgun $(slop -f '-i %i -g %g') - | tee /home/$USER/Pictures/Screenshots/$(date +'%F_%T').png | xclip -t 'image/png' -selection c") }, + { MODKEY, 30, spawn, {.v = xkbmapus } }, + { MODKEY, 54, spawn, {.v = xkbmapcz } }, + }; /* button definitions */ diff --git a/dwm b/dwm index f6b429d..cf0ac8c 100755 Binary files a/dwm and b/dwm differ diff --git a/dwm.o b/dwm.o index 53c47c1..a11e822 100644 Binary files a/dwm.o and b/dwm.o differ