199 Commits (main)

Author SHA1 Message Date
Angelo Fallaria 560f69dc0a test: refactor return statement in tests
2 years ago
Angelo Fallaria f9e0db9309 fix: remove unused code in parse_keybind
2 years ago
Angelo Fallaria 5ad8877e73 feat: allow empty commands
2 years ago
Angelo Fallaria 0f3f64551f style(config): format w/ rustfmt
2 years ago
Angelo Fallaria f272fcfc64 feat: add more modifiers
2 years ago
Angelo Fallaria b06323540e test: add tests for more keysyms
2 years ago
Angelo Fallaria 252e09a5d2 refactor: use 'map' instead of iteration for modifiers
2 years ago
Angelo Fallaria 5e2b74d923 feat: add detection of modifier keys
2 years ago
Angelo Fallaria 981d4c0387 refactor: reduce one line of indent in parsing
2 years ago
Angelo Fallaria ff635cc3d9 refactor: remove unused 'keysyms' var in parse_contents
2 years ago
Angelo Fallaria 5aa87b60cc test: add tests for invalid configs
2 years ago
Angelo Fallaria b5ba778072 feat: add modifiers field to Hotkey
2 years ago
Angelo Fallaria 7a34a1e664 test: add #[test] to #[ignore] tests
2 years ago
Angelo Fallaria 1953fe269e test: refactor valid config tests into a wrapper
2 years ago
Angelo Fallaria 920458cdf7 style: put the error checks next to each other
2 years ago
Angelo Fallaria 067cbe2843 feat: add handling for multiline commands
2 years ago
Angelo Fallaria 4fd18d753e style: remove one whitespace in config.rs for clarity
2 years ago
Angelo Fallaria 60b3c7ff24 style: format w/ rustfmt
2 years ago
Angelo Fallaria d886ff18eb fix: return missing command line nr. w/ blank line
2 years ago
Angelo Fallaria e2027b2a04 style: improve style w/ rustfmt
2 years ago
Angelo Fallaria 7117317001 style: slightly improve style of parse_contents
2 years ago
Angelo Fallaria 681d553654 test: add test wrapper function to check err types
2 years ago
Angelo Fallaria 66c3792927 test: remove test for commented-out commands
2 years ago
Shinyzenith ca629df880
[update] fixed pid file name.
2 years ago
Shinyzenith f919ff91f3
[update] Warn on no server instances.
2 years ago
Shinyzenith 35d4960d87
[refactor] Simple IPC implementation using std::os
2 years ago
EdenQwQ 6fae0fce24 rustfmt, improve
2 years ago
Angelo Fallaria 4bce5f71d1 style: split the whitespace error return statement
2 years ago
EdenQwQ b794b89c80 return the command line instead
2 years ago
EdenQwQ 84fd84cc65 error if command doesn't start with whitespace
2 years ago
EdenQwQ a7529c49f2 small improvement
2 years ago
Angelo Fallaria cffd1694d1 style: format config.rs using rust-analyzer
2 years ago
Angelo Fallaria b47904b3f3 test: add test for command with blank space
2 years ago
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
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
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
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 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
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 97b8af219f
[update] log on removal of socket file.
2 years ago
Shinyzenith ab914f5b9c
[refactor] Add temporary to hotedit the shell command for development testing.
2 years ago
Shinyzenith 5d92de385a
[feature] Implement UNIX domain socket IPC between swhks ( server ) & swhkd ( daemon )
2 years ago
Shinyzenith c15b5b153e
[refactor] Setup build instructions for client to recieve shell commands.
2 years ago
Shinyzenith ac6c5d5fc6
[refactor] Remove preceeding "Note:" from root warning.
2 years ago
Shinyzenith 620782f1ba
[refactor] Default to /etc/swhkd/swhkdrc instead of /home/USER/.config/swhkd/swhkdrc.
2 years ago
Shinyzenith ced2ea3c95
[refactor] flag creation function, xdg checker function, allow swhkd to run as root
2 years ago
Shinyzenith f2a1e5b862
[refactor] Append valid devices to a vector and check for 0 devices
2 years ago
Shinyzenith c8dcd0dd0c
[refactor] Replace glob with evdev::enumerate.
2 years ago
Shinyzenith 6ccce2792c
[refactor] concise import
2 years ago
Shinyzenith 824d36a7f9
[refactor] concise format
2 years ago
Shinyzenith a9d6966ad5
[refactor] Utilize cargo pkg authors
2 years ago
Shinyzenith df2f110208
[refactor] use Path::new PathBuf instead of pushstr
2 years ago
Shinyzenith dbad34c65f
[refactor] turn permission checks into a function main.rs
2 years ago
Shinyzenith fc70c44684
[feature] config file path detection with xdg base directory variables
2 years ago
Shinyzenith c774f6b3f8
move input group permission check to separate function
2 years ago
Shinyzenith c44b634cc3
logging added, permission checks added, basic error handling
2 years ago
Shinyzenith 328c310f16
add tokio as dependency for event scheduling
2 years ago
Shinyzenith 8bbd34c4df
Check all event devices for KEY_ENTER presence.
2 years ago
Shinyzenith ffd8b998b2
remove all python code
2 years ago
Shinyzenith 6ce03e1bc3
Rolling back a commit.
2 years ago
ckyiu 704d1f1e47 Add requirements.txt and clean up configuration related stuff
2 years ago
Shinyzenith 13d3e26725
stdout to devnull
2 years ago
Shinyzenith 069230e0be
Fixed running swhkd as sudo and added exception for no input group
2 years ago
Shinyzenith 421728d19d
no keyboard check
2 years ago
Shinyzenith fc3454b94f
typo fix
2 years ago
Shinyzenith f7da66a1a7
added stderr for error messages, config parser, sample configuration file. STILL A WIP. THE PROGRAM WILL JUST SPIT OUT THE EVENTS AND NOT ACTUALLY USE YOUR DEFINED EVENTS.
2 years ago
Shinyzenith 41a17d9b49
remove EV_MSC event
2 years ago
Shinyzenith 12e50824b4
Useless import
2 years ago
Shinyzenith 35455635c1
signal handler fix and some minor changes
2 years ago
Shinyzenith 1eca3b18e0
readme update
2 years ago
Shinyzenith f58f07c5be
working input detection
2 years ago