Angelo Fallaria
67a558288e
refactor: rename .._curly_brace to str_..._braces
2 years ago
Angelo Fallaria
4140fa3065
refactor: rename i in range to ascii_number
2 years ago
Angelo Fallaria
767f8eb6f6
refactor: add descriptive var names for ASCII ranges
2 years ago
Angelo Fallaria
3ce4db7be8
refactor: change range syntax for squirly brace
...
Before:
```rust
begin.parse::<char>().unwrap() as u8..end.parse::<char>().unwrap() as u8 + 1
```
After:
```rust
begin.parse::<char>().unwrap() as u8..=end.parse::<char>().unwrap() as u8
```
We will use ..= instead of adding + 1 to the end range as it is
the idiomatic Rust syntax.
2 years ago
Angelo Fallaria
985598e575
refactor: use another guard clause in squirly brace
2 years ago
Angelo Fallaria
099f54f20e
refactor: rename direct_output closure into push_direct_output
2 years ago
Angelo Fallaria
3188fbde31
refactor: use guard clause in squirly brace fn
2 years ago
Angelo Fallaria
fed4c445a5
style(config): add some blank lines in curly brace fn
2 years ago
Angelo Fallaria
6f18996445
refactor(config): refactor curly brace finding
...
Remove a lot of unnecessary mutable variables to find
the curly braces. Instead, use a bit of functional programming
to achieve the algorithm.
2 years ago
Angelo Fallaria
343e5c74da
refactor: convert another if block into guard clause
2 years ago
Angelo Fallaria
6720ab6ed3
refactor(config): use guard clause in loop
2 years ago
Angelo Fallaria
7d59afb3c6
refactor(config): improve duplicate hotkey check
2 years ago
EdenQwQ
ee31c54d42
[update] config: more tests for range syntax
2 years ago
EdenQwQ
49ebf957b3
rustfmt
2 years ago
EdenQwQ
caaedeb4a7
[update] handle invalid range
2 years ago
Aakash Sen Sharma
51b3776c23
Merge pull request #43 from waycrate/error_display
...
feat: implement proper display config errors
2 years ago
EdenQwQ
214b1b1692
Merge remote-tracking branch 'origin/error_display' into config_devel
...
[merge] config error display by Angelo
2 years ago
EdenQwQ
5df6027991
[remove] config: remove test for nonsensical file
2 years ago
Angelo Fallaria
90cb0e4b93
feat(daemon): display error message for config errors
2 years ago
Angelo Fallaria
9567883fed
feat: add Display functionality for config errs
2 years ago
Angelo Fallaria
f78e40c67c
test: add tests for error display
2 years ago
EdenQwQ
85fe0f70f2
[update] config: support for ascii character as range
2 years ago
EdenQwQ
165d6b50af
[rustfmt] config
2 years ago
EdenQwQ
62cbe3e420
[update] config: basic range syntax(support numbers only)
2 years ago
EdenQwQ
f60903d2f3
[refactor, update] config: basic curly brace syntax
2 years ago
EdenQwQ
c7da0a4669
[update] config: a new function to extract all the items inside a pair of curly braces
2 years ago
EdenQwQ
a780a6ea4b
[update] config.rs: comment out unimplemented modifiers; add delete, brightness
2 years ago
EdenQwQ
4eea8ee20f
improve(server): collapse nested if block; &String to &str
2 years ago
EdenQwQ
7541118640
improve(daemon): collapse nested if block; use vec! instead of Vec::new()
2 years ago
Aakash Sen Sharma
0c910ffa37
[merge] refactor(daemon): reduce indent w/ guard clause
...
refactor(daemon): reduce indent w/ guard clause
2 years ago
Shinyzenith
870fcbf354
[remove] unused imports.
2 years ago
Shinyzenith
6911e116cb
[remove] pr template
2 years ago
Shinyzenith
222780c4f3
[upload] Basic pull request template
2 years ago
Aakash Sen Sharma
59cd0ab87c
[create] Code of conduct.md
2 years ago
Shinyzenith
7b6780e3b8
[update] Contributing.md
2 years ago
Aakash Sen Sharma
b76917f981
[create] Contributing.md
2 years ago
Angelo Fallaria
2739434273
refactor(daemon): reduce indent w/ guard clause
2 years ago
Angelo Fallaria
ce3b551628
style: fix formatting w/ rustfmt
2 years ago
Angelo Fallaria
7098ff3aab
refactor(config): put test-only modules in own mod
...
std::fs and std::io::Write are used in the unit tests,
but not in the main program itself, which results in a
warning by the Rust compiler. They are now only used
in the test module, when `cargo test` is run.
2 years ago
Angelo Fallaria
e10d2ac005
fix(config): alleviate panic on blank config filee
...
Whenever the config parse was parsed an empty config,
a panic would result because of trying to process an
empty vector:
---- config::tests::test_blank_config stdout ----
thread 'config::tests::test_blank_config' panicked at 'index out of bounds: the len is 0 but the index is 0', src/config.rs:237:33
This commit alleviates that by simply returning an empty
Hotkey vector whenever an empty config is passed.
2 years ago
Shinyzenith
036e7c12fe
[update] Build instructions.
2 years ago
Shinyzenith
47b25859ea
[update] style change
2 years ago
Shinyzenith
665f1b2e38
[Update] Add AUR to install.md
2 years ago
Shinyzenith
d1051685fa
[update]Minor readme changes
2 years ago
Shinyzenith
4502170d5f
[Bug fix] rules file needs to have permission 644.
2 years ago
Idli
62c4370f09
update: readme; grammatical error
2 years ago
Shinyzenith
042e4ff9fc
[update] switch prefix dir to comply with AUR.
2 years ago
Shinyzenith
1407b5c0f4
[Contrib] Add pkgbuilds.
2 years ago
EdenQwQ
106bef257c
added many keysyms
2 years ago
Shinyzenith
ef3e8c9b97
[typo]
2 years ago