formatting, added shortcuts for keyboard layout switch
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Filip Rojek 2023-11-23 16:25:40 +01:00
parent 62cd0cb2cb
commit 2bfa726363
4 changed files with 18 additions and 66 deletions

View File

@ -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 */

View File

@ -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 */

BIN
dwm

Binary file not shown.

BIN
dwm.o

Binary file not shown.