Compare commits
6
Commits
0649340152
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d8271982e | ||
|
|
1f1a9ce05b | ||
|
|
9a625bb675 | ||
|
|
1d5c6c0e24 | ||
|
|
922023c95a | ||
|
|
8e36c8c791 |
+5
-2
@@ -23,8 +23,8 @@ static uint32_t colors[][3] = {
|
|||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||||
static const char *tagempty = "[ - ]"; /* label of empty workspaces */
|
static const char *tagempty = " "; /* label of empty workspaces */
|
||||||
static const unsigned int tagtitlelen = 7; /* title characters per workspace label */
|
static const unsigned int tagtitlelen = 7; /* max title characters per workspace label */
|
||||||
|
|
||||||
/* logging */
|
/* logging */
|
||||||
static int log_level = WLR_ERROR;
|
static int log_level = WLR_ERROR;
|
||||||
@@ -65,6 +65,9 @@ static const struct xkb_rule_names xkb_rules = {
|
|||||||
.options = NULL,
|
.options = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* NumLock on at startup */
|
||||||
|
static const int numlock = 1;
|
||||||
|
|
||||||
static const int repeat_rate = 25;
|
static const int repeat_rate = 25;
|
||||||
static const int repeat_delay = 600;
|
static const int repeat_delay = 600;
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ static uint32_t colors[][3] = {
|
|||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||||
static const char *tagempty = "[ - ]"; /* label of empty workspaces */
|
static const char *tagempty = " "; /* label of empty workspaces */
|
||||||
static const unsigned int tagtitlelen = 7; /* title characters per workspace label */
|
static const unsigned int tagtitlelen = 7; /* max title characters per workspace label */
|
||||||
|
|
||||||
/* logging */
|
/* logging */
|
||||||
static int log_level = WLR_ERROR;
|
static int log_level = WLR_ERROR;
|
||||||
@@ -62,10 +62,16 @@ static const struct xkb_rule_names xkb_rules = {
|
|||||||
/* example:
|
/* example:
|
||||||
.options = "ctrl:nocaps",
|
.options = "ctrl:nocaps",
|
||||||
*/
|
*/
|
||||||
.layout = "de",
|
/* second layout: Russian phonetic on a German keyboard (de(ru):
|
||||||
.options = NULL,
|
* Ö=ч, Ä=э, Ü=ш), toggled with Alt+Shift */
|
||||||
|
.layout = "de,de",
|
||||||
|
.variant = ",ru",
|
||||||
|
.options = "grp:alt_shift_toggle",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* NumLock on at startup */
|
||||||
|
static const int numlock = 1;
|
||||||
|
|
||||||
static const int repeat_rate = 25;
|
static const int repeat_rate = 25;
|
||||||
static const int repeat_delay = 600;
|
static const int repeat_delay = 600;
|
||||||
|
|
||||||
@@ -135,6 +141,7 @@ static const char *brigup[] = { "/home/irrlicht/nixos/scripts/brightness.
|
|||||||
static const char *brigdown[] = { "/home/irrlicht/nixos/scripts/brightness.sh", "down", NULL };
|
static const char *brigdown[] = { "/home/irrlicht/nixos/scripts/brightness.sh", "down", NULL };
|
||||||
static const char *lockcmd[] = { "waylock", NULL };
|
static const char *lockcmd[] = { "waylock", NULL };
|
||||||
static const char *snipcmd[] = { "/home/irrlicht/nixos/scripts/snip.sh", NULL };
|
static const char *snipcmd[] = { "/home/irrlicht/nixos/scripts/snip.sh", NULL };
|
||||||
|
static const char *autoclickcmd[] = { "/home/irrlicht/nixos/scripts/autoclick.sh", NULL };
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
@@ -159,6 +166,15 @@ static const Key keys[] = {
|
|||||||
{ MODKEY, XKB_KEY_Right, shiftview, {.i = +1} },
|
{ MODKEY, XKB_KEY_Right, shiftview, {.i = +1} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Left, shiftclient, {.i = -1} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Left, shiftclient, {.i = -1} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Right, shiftclient, {.i = +1} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Right, shiftclient, {.i = +1} },
|
||||||
|
{ MODKEY, XKB_KEY_1, view, {.ui = 1 << 0} },
|
||||||
|
{ MODKEY, XKB_KEY_2, view, {.ui = 1 << 1} },
|
||||||
|
{ MODKEY, XKB_KEY_3, view, {.ui = 1 << 2} },
|
||||||
|
{ MODKEY, XKB_KEY_4, view, {.ui = 1 << 3} },
|
||||||
|
{ MODKEY, XKB_KEY_5, view, {.ui = 1 << 4} },
|
||||||
|
{ MODKEY, XKB_KEY_6, view, {.ui = 1 << 5} },
|
||||||
|
{ MODKEY, XKB_KEY_7, view, {.ui = 1 << 6} },
|
||||||
|
{ MODKEY, XKB_KEY_8, view, {.ui = 1 << 7} },
|
||||||
|
{ MODKEY, XKB_KEY_9, view, {.ui = 1 << 8} },
|
||||||
{ MODKEY, XKB_KEY_Up, focusstack, {.i = -1} },
|
{ MODKEY, XKB_KEY_Up, focusstack, {.i = -1} },
|
||||||
{ MODKEY, XKB_KEY_Down, focusstack, {.i = +1} },
|
{ MODKEY, XKB_KEY_Down, focusstack, {.i = +1} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Up, movestack, {.i = -1} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Up, movestack, {.i = -1} },
|
||||||
@@ -176,6 +192,7 @@ static const Key keys[] = {
|
|||||||
{ 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brigup} },
|
{ 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brigup} },
|
||||||
{ 0, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brigdown} },
|
{ 0, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brigdown} },
|
||||||
{ 0, XKB_KEY_Print, spawn, {.v = snipcmd} },
|
{ 0, XKB_KEY_Print, spawn, {.v = snipcmd} },
|
||||||
|
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT, XKB_KEY_c, spawn, {.v = autoclickcmd} },
|
||||||
|
|
||||||
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
||||||
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_BackSpace, quit, {0} },
|
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_BackSpace, quit, {0} },
|
||||||
|
|||||||
Binary file not shown.
@@ -69,6 +69,7 @@
|
|||||||
#include <wlr/types/wlr_xdg_output_v1.h>
|
#include <wlr/types/wlr_xdg_output_v1.h>
|
||||||
#include <wlr/types/wlr_xdg_shell.h>
|
#include <wlr/types/wlr_xdg_shell.h>
|
||||||
#include <wlr/interfaces/wlr_buffer.h>
|
#include <wlr/interfaces/wlr_buffer.h>
|
||||||
|
#include <wlr/interfaces/wlr_keyboard.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <wlr/util/region.h>
|
#include <wlr/util/region.h>
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
@@ -1232,6 +1233,15 @@ createkeyboardgroup(void)
|
|||||||
die("failed to compile keymap");
|
die("failed to compile keymap");
|
||||||
|
|
||||||
wlr_keyboard_set_keymap(&group->wlr_group->keyboard, keymap);
|
wlr_keyboard_set_keymap(&group->wlr_group->keyboard, keymap);
|
||||||
|
|
||||||
|
/* Start with NumLock on: lock the keymap's NumLock modifier (Mod2) */
|
||||||
|
if (numlock) {
|
||||||
|
xkb_mod_index_t mod = xkb_keymap_mod_get_index(keymap, XKB_MOD_NAME_NUM);
|
||||||
|
if (mod != XKB_MOD_INVALID)
|
||||||
|
wlr_keyboard_notify_modifiers(&group->wlr_group->keyboard,
|
||||||
|
0, 0, 1u << mod, 0);
|
||||||
|
}
|
||||||
|
|
||||||
xkb_keymap_unref(keymap);
|
xkb_keymap_unref(keymap);
|
||||||
xkb_context_unref(context);
|
xkb_context_unref(context);
|
||||||
|
|
||||||
@@ -3110,8 +3120,8 @@ tag(const Arg *arg)
|
|||||||
drawbars();
|
drawbars();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Workspace label: first tagtitlelen characters of the tag's master client
|
/* Workspace label: at most tagtitlelen characters of the tag's master client
|
||||||
* title, padded with spaces. Empty tags show tagempty. */
|
* title. Empty tags show tagempty. */
|
||||||
void
|
void
|
||||||
taglabel(Monitor *m, unsigned int i, char *buf, size_t size)
|
taglabel(Monitor *m, unsigned int i, char *buf, size_t size)
|
||||||
{
|
{
|
||||||
@@ -3139,8 +3149,6 @@ taglabel(Monitor *m, unsigned int i, char *buf, size_t size)
|
|||||||
while ((*s & 0xc0) == 0x80 && n < size - 1);
|
while ((*s & 0xc0) == 0x80 && n < size - 1);
|
||||||
chars++;
|
chars++;
|
||||||
}
|
}
|
||||||
for (; chars < tagtitlelen && n < size - 1; chars++)
|
|
||||||
buf[n++] = ' ';
|
|
||||||
buf[n] = '\0';
|
buf[n] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user