Alessandro Mauri
d3f5e888e3
parse keys as case-insensitive
4 years ago
Alessandro Mauri
79bbbcf8a9
fix memory allocation bug
...
when receiving SIGUSR1 hkd would try to allocate the new hotkey list in the old
space which could lead to errors
4 years ago
Alessandro Mauri
d6b8e129d7
live reload config file with SIGUSR1
4 years ago
Alessandro Mauri
8ad875b311
added -h flag
4 years ago
Alessandro Mauri
213db3cee5
fixed crash for small block sizes in parsing
4 years ago
Alessandro Mauri
5308b31abe
fixed bug in parse_config_file
...
there was a bug where parsing would ignore the very last valid hotkey in the
config file
4 years ago
Alessandro Mauri
684127c6fe
changed debug build options to include -O0
4 years ago
Alessandro Mauri
699ddd057c
added the dump option
...
useful for debugging, if the dump option is set hkd prints the hotkey list
4 years ago
Alessandro Mauri
122ba9b44b
fix crash when the computer is suspended
4 years ago
Alessandro Mauri
9918331491
added license in source file
4 years ago
Alessandro Mauri
6bad3614d7
die() is now a function
4 years ago
Alessandro Mauri
4a4eaf93e6
code beautify
...
- removed trailing whitespaces
- moved variables to the top of functions
- changed a couple of paths from const to define
4 years ago
Alessandro Mauri
38a72338ed
check if hkd is already running before start
...
use a lock file to determine if another instance of hkd is already running
4 years ago
Alessandro Mauri
633604cefa
added missing check
4 years ago
Alessandro Mauri
0486872d78
better error messages for wrong config
4 years ago
Alessandro Mauri
9871f375ed
bump to version 0.3
...
bug fixes, check commits for details
implemented new parser, altough it adds some lines it lowers the comlexity and
it should be faster especially for bigger config files
4 years ago
Alessandro Mauri
0507be14b6
testing new parser
4 years ago
Alessandro Mauri
5d6ee6dd83
more readable gitignore
4 years ago
Alessandro Mauri
6a3e033b68
fixed #2
...
skip zero or 1 allocations and uninitialized conditional jump
in hotkey_list_add()
now the whole output of die() is coloured
4 years ago
Alessandro Mauri
689e6005ac
shitty hack to fix out of bounds with -v
4 years ago
Alessandro Mauri
1ba688f975
bump to version 0.2
...
- better recognition of invalid config files
- general polish of error messages
- hkd follows the rule of silence
- when using -v the correct key names are shown
- commands in config files can be multiline (using \\n)
4 years ago
Alessandro Mauri
344887c925
fixed: wrong key names after 'z' when using -v
4 years ago
Alessandro Mauri
1b7af99723
fix #1 : parser no longer allows blank lines for keys or command
4 years ago
Alessandro Mauri
d110948129
closing #2 : made the program silent
...
turned off the "error" messages by default and using the -v flag to turn
them back on as they are not useful for normal use, also now those messages
are printed to stdout
4 years ago
Alessandro Mauri
e14049d5b6
fixed invalid free() and missing break;
4 years ago
Alessandro Mauri
de6db78896
removed unnecessary memmove(s) in parse_config_file()
4 years ago
Alessandro Mauri
e1e239430c
licensed under the MIT license
4 years ago
Alessandro Mauri
904a10cdf8
fix typo
4 years ago
Alessandro Mauri
36ea0ccc6d
modified readme
...
fixed typos and updated some info
4 years ago
Alessandro Mauri
472daace31
added -c option
...
-c is used to override the default config files and instead use the speocified
one
4 years ago
Alessandro Mauri
5db72c0b43
fix comment bug
...
comments not at the beginning of the line are no longer ignored
4 years ago
Alessandro Mauri
514407015e
install, uninstall and version
...
modified makefile to be abled to install and uninstall, also installing puts
the correct version in the man page.
All credits go to suckless :^)
4 years ago
Alessandro Mauri
c011888c5f
added man page for hkd
4 years ago
Alessandro Mauri
a4fcd4de31
entering version 0.1
...
the program is finally in a usable status, many things were added in
this commit:
- config file parsing from tests
- config multiple config file locations
- more I can't grasp
anyways have fun.
4 years ago
Alessandro Mauri
6613bd0707
modified parser to suit new config format
4 years ago
Alessandro Mauri
cc15646a15
changed makefile
...
Tests now compile with just -Wall in order to allow for placeholder variables.
Also tests are now compiled in c99
4 years ago
Alessandro Mauri
67a36f71e3
finally decided the config style
...
read the template.conf file for examples and the spec.
4 years ago
Alessandro Mauri
21e833143c
changed key names
...
key names now don't include the "KEY_" part before the actual name
4 years ago
Alessandro Mauri
6a5367ac00
verbose option displays key names instead of values
...
very crude implementation, works for standard keys but breaks
for media/special keys, good enough for now
4 years ago
Alessandro Mauri
ea6f548399
added -v argument
...
verbose option: now hkd doesn't default to printing pressed keys basically
acting as a keylogger but now requires -v to do so.
4 years ago
Alessandro Mauri
3ffa960ae7
changed names
...
key_buffer_compare_ordered -> key_buffer_compare
key_buffer_compare_random -> key_buffer_compare_fuzzy
4 years ago
Alessandro Mauri
05a18e8874
implemented exec_command with wordexp(3)
...
this allows for a less error-prone parsing method
(as wordexp(3) is in libc) and enables for shell-like
word expansion, refer to the man page for more info
about wordexp(3)
4 years ago
Alessandro Mauri
d39281f9a6
minor fix
...
hotkeys don't get triggerd twice when after the right
keys are pressed one or more other keys are pressed
afterwards
4 years ago
Alessandro Mauri
ed7202e5c8
added key_buffer_compare_random/ordered
...
In the future one can specify that the hotkey triggers
only when the keys are pressed in the right order, or
in any order, this will be configured per-hotkey in the
config file
4 years ago
Alessandro Mauri
dd319e08b7
deleted empty first line
4 years ago
Alessandro Mauri
8bbdaa3d21
key_buffer is now static for performance
5 years ago
Alessandro Mauri
435bbfbab8
modified configuration file and parser
5 years ago
Alessandro Mauri
300b82bc5e
added str_to_argv()
5 years ago
Alessandro Mauri
33526a916f
some linting
5 years ago
Alessandro Mauri
e15699e4ed
removed unused files
5 years ago