Compare commits
No commits in common. "1e7857dfdd69aa7948ab2250737646198737e788" and "7143225fc582084630693ad6f9e455b3206f4fff" have entirely different histories.
1e7857dfdd
...
7143225fc5
11
paswitch.c
11
paswitch.c
|
@ -791,9 +791,8 @@ read_key_sequence (const char *buf, size_t len)
|
||||||
return ++p - buf;
|
return ++p - buf;
|
||||||
return -escapes;
|
return -escapes;
|
||||||
}
|
}
|
||||||
// We don't know this sequence, so just return M-Esc
|
|
||||||
if (escapes == 2)
|
if (escapes == 2)
|
||||||
return escapes;
|
return -escapes;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shift state encodings aren't going to work, though anything else should
|
// Shift state encodings aren't going to work, though anything else should
|
||||||
|
@ -1040,16 +1039,16 @@ main (int argc, char *argv[])
|
||||||
opt_handler_free (&oh);
|
opt_handler_free (&oh);
|
||||||
|
|
||||||
if (!isatty (STDIN_FILENO))
|
if (!isatty (STDIN_FILENO))
|
||||||
exit_fatal ("input is not a terminal");
|
print_fatal ("input is not a terminal");
|
||||||
if (!isatty (STDOUT_FILENO))
|
if (!isatty (STDOUT_FILENO))
|
||||||
exit_fatal ("output is not a terminal");
|
print_fatal ("output is not a terminal");
|
||||||
|
|
||||||
setlocale (LC_CTYPE, "");
|
setlocale (LC_CTYPE, "");
|
||||||
// PulseAudio uses UTF-8, let's avoid encoding conversions
|
// PulseAudio uses UTF-8, let's avoid encoding conversions
|
||||||
if (strcasecmp (nl_langinfo (CODESET), "UTF-8"))
|
if (strcasecmp (nl_langinfo (CODESET), "UTF-8"))
|
||||||
exit_fatal ("UTF-8 encoding required");
|
print_fatal ("UTF-8 encoding required");
|
||||||
if (setvbuf (stdout, NULL, _IOLBF, 0) || !tty_start ())
|
if (setvbuf (stdout, NULL, _IOLBF, 0) || !tty_start ())
|
||||||
exit_fatal ("terminal initialization failed");
|
print_fatal ("terminal initialization failed");
|
||||||
|
|
||||||
// TODO: we will need a logging function aware of our rendering
|
// TODO: we will need a logging function aware of our rendering
|
||||||
g_log_message_real = log_message_custom;
|
g_log_message_real = log_message_custom;
|
||||||
|
|
|
@ -2227,11 +2227,9 @@ g_keys[] =
|
||||||
// Brightness
|
// Brightness
|
||||||
{ Mod4Mask, XK_Home, on_brightness, 10 },
|
{ Mod4Mask, XK_Home, on_brightness, 10 },
|
||||||
{ Mod4Mask, XK_End, on_brightness, -10 },
|
{ Mod4Mask, XK_End, on_brightness, -10 },
|
||||||
{ 0, XF86XK_MonBrightnessUp, on_brightness, 10 },
|
{ 0, XF86XK_MonBrightnessUp, on_brightness, 10 },
|
||||||
{ 0, XF86XK_MonBrightnessDown, on_brightness, -10 },
|
{ 0, XF86XK_MonBrightnessDown, on_brightness, -10 },
|
||||||
|
|
||||||
{ Mod4Mask, XK_F4, on_standby, 0 },
|
|
||||||
{ Mod4Mask | ShiftMask, XK_F4, on_insomnia, 0 },
|
|
||||||
{ Mod4Mask, XK_Pause, on_standby, 0 },
|
{ Mod4Mask, XK_Pause, on_standby, 0 },
|
||||||
{ Mod4Mask | ShiftMask, XK_Pause, on_insomnia, 0 },
|
{ Mod4Mask | ShiftMask, XK_Pause, on_insomnia, 0 },
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue