Angelo Fallaria
c61e92a3a2
style: add comment in ParseError to explain u32 field
2 years ago
Angelo Fallaria
60c2539413
feat: add public load config function
2 years ago
Angelo Fallaria
d26c4666ee
test: edit tests to accomodate the edited functions
2 years ago
Angelo Fallaria
9b6d67f45e
refactor: make parse_contents accept string, not PathBuf
2 years ago
Angelo Fallaria
0a76516178
test: rewrite basic hotkey tests
2 years ago
Angelo Fallaria
d5a95a26ef
refactor: refactor file loading into own function
2 years ago
Angelo Fallaria
0266ab2718
refactor: rename key_presses field in Hotkey to keysyms
2 years ago
Angelo Fallaria
abe8987d79
refactor: rename Keybind to Hotkey
2 years ago
Angelo Fallaria
17d0f02baa
test: add blank tests to fill in later
2 years ago
Angelo Fallaria
d153526037
test: improve test for nonexistent file
2 years ago
Angelo Fallaria
fd9524eaf5
style: remove some newlines in start of parse_config
2 years ago
Angelo Fallaria
ebd9db0689
fix: remove unneeded PartialEq derive in enum
2 years ago
Angelo Fallaria
7103537e31
fix: return actual line number in error
...
Because arrays, vectors, and list-style structures in Rust are
zero-index, we need to increment the line number returned by errors
by one so that it represents their actual line numbers.
2 years ago
Angelo Fallaria
8918b03f6e
feat: add handling of empty command
2 years ago
Angelo Fallaria
5763be0a7b
style: improve styling and comments of config parse func
2 years ago
Angelo Fallaria
503f174672
feat: add more error situations in the config parser
2 years ago
Angelo Fallaria
c2c1a0285d
feat(config): return error if keybind at last line
2 years ago
Angelo Fallaria
3f5c46cc48
style: remove unecessary TODO: comments
2 years ago
Angelo Fallaria
a444e3eff1
style: compress the evdev keys vector
2 years ago
Angelo Fallaria
2d97b2dea3
feat(config): add all alphanumeric numbers
2 years ago
Angelo Fallaria
1a1ba9ffbd
test(config): add 9 more unit tests
2 years ago
Angelo Fallaria
252ce9f2e4
feat: add basic config parser
...
A basic config parser has been implemented in `config.rs`. It is still
incomplete, but one letter key press bindings in QWERTYUIOP should work
now, along with a command on the next line.
Example `swhkdrc` file that should work:
```
r
alacritty
w
kitty
t
/bin/firefox
```
**TODO:**
- Add more supported key presses (alphabetical, numerical, insert,
home, delete, end, etc)
- Add chained keybindings (`super + g`, `super + 3`)
- Add error handling for parsing the contents of the file
Note: `server.rs` has been modified to add `mod config` at the start of
the file, but it was necessary to do testing for the config parser.
2 years ago
Shinyzenith
b5a7422c89
[delete] Remove all IPC code.
2 years ago
Shinyzenith
54234ac9e8
[refactor] Warn on failure to remove sock file
2 years ago
Shinyzenith
f0d212b9b0
[Refactor] permission_check(), exit on fail.
2 years ago
Idlidev
d39876e4ca
[update] move assets/ -> docs/assets/ and update INSTALL.md
2 years ago
Shinyzenith
2e1f6c2e9c
[delete] Remove man pages temporarily.
2 years ago
Shinyzenith
021291c6a3
[refactor] Warn on no perms.
2 years ago
Shinyzenith
5da3789981
[refactor] Remove redundant return statement
2 years ago
Shinyzenith
faecfcf617
[refactor] Refuse to run swhkd as user with input group
2 years ago
Shinyzenith
0e00175ff0
[update] Comment out man page build instructions.
2 years ago
Shinyzenith
00c59ab5cc
[update] Comment out man page build instructions.
2 years ago
Shinyzenith
e421f02d7b
[update] Mkdir manpage dir
2 years ago
Shinyzenith
096b610edc
[update] Remove redundant comments.
2 years ago
Shinyzenith
1e01014a14
[update] Remove physical path logging
2 years ago
Shinyzenith
65e9649f87
[update] Cargo fmt.
2 years ago
Shinyzenith
eab71d680d
[refactor] Remove redundant Result<(), Box<dyn Error>>
2 years ago
Idlidev
257e642d52
[update] update man path to /usr/local/share/man/man1 in makefile
2 years ago
Idlidev
356e0200aa
[update] update readme
2 years ago
Idlidev
d409c28870
[update] update readme
2 years ago
Idlidev
6a3d12f3f0
[update] update readme
2 years ago
Idlidev
c75e8e72d7
[update] add man pages, update readme
2 years ago
Shinyzenith
734918ea0f
[update] Makefile, run clause no longer needed.
2 years ago
Shinyzenith
b7fbcdaf34
[update] Makefile, remove `cargo test`.
2 years ago
Shinyzenith
a9e66360a9
[refactor] Do not hardcode executable path, use std::env::current_exe() instead
2 years ago
Shinyzenith
f77fb6049b
[update] Remove clap from server.rs
2 years ago
Shinyzenith
71c9645152
[update] add server binary to gitignore
2 years ago
Aakash Sen Sharma
31620b8169
[update] log on removal of socket file.
2 years ago
Shinyzenith
97b8af219f
[update] log on removal of socket file.
2 years ago
Aakash Sen Sharma
33393c436d
Merge pull request #10 from Shinyzenith/devel
...
[feature] Implement UNIX domain socket IPC client.
2 years ago