Konstantin Pereiaslov
c62dc47f68
Free memory used for storing shell command string once it's no longer needed.
0.2.0
2023-05-28 02:53:02 -05:00
Konstantin Pereiaslov
e3e90723b1
After encountering first unknown argument start treating the remaining arguments as command to be run.
...
This allows to not add quotes for the command that needs to be run.
2023-05-28 02:37:28 -05:00
Konstantin Pereiaslov
9b34d7392b
Add a TODO item.
2023-05-20 09:44:11 +03:00
Konstantin Pereiaslov
56d6a6e7f4
Fix possible overflow in timeout parameter
2023-05-20 01:36:54 -05:00
Konstantin Pereiaslov
91671c0cfb
Add a TODO item.
2023-05-20 01:36:02 -05:00
Konstantin Pereiaslov
592c4e239f
Account for the time it took to pause the command when calculating how long to sleep for.
...
Possibly unnecessary as this always seems to be 0 on my machine.
2023-05-20 00:40:08 -05:00
Konstantin Pereiaslov
07b6f83543
Add header include to sleep_utils.c
2023-05-20 00:17:29 -05:00
Konstantin Pereiaslov
367bc6636c
Add TODO
2023-05-19 23:43:57 -05:00
Konstantin Pereiaslov
6347fe4ca3
Remove trailing dots in messages
2023-05-19 23:43:13 -05:00
Konstantin Pereiaslov
55bdd5c625
Automated code formatting
2023-05-19 23:40:54 -05:00
Konstantin Pereiaslov
79296a81f0
Change idle time comparison to >= instead of > to avoid an extra sleep when idle time matches the timeout exactly.
2023-05-19 23:40:30 -05:00
Konstantin Pereiaslov
8b76c78cce
Change polling to use nanosleep and calculate sleep times in ms.
...
Also fixed the calculation of time to sleep when user is active to not subtract the polling interval and changed idle time comparison to be >= instead of >.
These changes get rid of an extra activity checks before resuming the process and also allow more precise sleep timing.
2023-05-19 23:39:16 -05:00
Konstantin Pereiaslov
482fb66e54
Make commands that fail, fail faster and move first idle check before first sleep, but after an initial 300ms sleep
2023-05-19 22:56:35 -05:00
Konstantin Pereiaslov
83c82b352e
Display the command that was started
2023-05-19 22:56:35 -05:00
Konstantin Pereiaslov
3fff3d3cab
Handle all kill errors
2023-05-19 22:56:35 -05:00
Konstantin Pereiaslov
f4d7013af8
Automated code formatting
2023-05-19 22:56:35 -05:00
Konstantin Pereiaslov
796adc6b1d
Make verbose and quiet global variables
2023-05-19 22:56:35 -05:00
Konstantin Pereiaslov
f68bab3ed1
Add a link to Ubuntu and Debian package to README
2023-05-16 08:27:29 +03:00
Konstantin Pereiaslov
38984cfedc
Add Ubuntu/Debian package build script
0.1.0
2023-05-16 00:19:17 -05:00
Konstantin Pereiaslov
faf0c48e42
Add install make target
2023-05-15 22:41:00 -05:00
Konstantin Pereiaslov
81c07166bb
Include libxss-dev dependency in README
2023-05-16 06:00:46 +03:00
Konstantin Pereiaslov
e5b65b4ddd
Update Makefile to put statically linked libraries at the end.
...
Fixes #1
2023-05-15 21:57:41 -05:00
Konstantin Pereiaslov
6ccd592420
Open display before running the command so that it doesn't start execution in case X is not available.
2023-05-15 21:45:59 -05:00
Konstantin Pereiaslov
bde539adcf
Change release gcc optimization flag to O3
2023-05-15 02:41:16 -05:00
Konstantin Pereiaslov
890cdb4958
Fix -t argument treating its value as milliseconds rather than seconds.
2023-05-15 02:41:16 -05:00
Konstantin Pereiaslov
a6ee6a7463
Improve description
2023-05-15 07:36:51 +03:00
Konstantin Pereiaslov
ba6b558a27
Add header to README.md
2023-05-15 07:32:29 +03:00
Konstantin Pereiaslov
c4af2d5544
Add compiling instructions to README
2023-05-15 07:31:19 +03:00
Konstantin Pereiaslov
315e7d6793
Add readme and license
2023-05-14 22:54:32 -05:00
Konstantin Pereiaslov
8d39cab720
Add debug to Makefile
2023-05-14 22:31:27 -05:00
Konstantin Pereiaslov
d567c7bc8f
Fix parsing of -t argument not working
2023-05-14 22:29:42 -05:00
Konstantin Pereiaslov
c6aee6c444
Capture exit code properly
2023-05-14 22:01:01 -05:00
Konstantin Pereiaslov
7884874e4c
Add verbose, quiet and help arguments, improve messaging
2023-05-14 21:16:38 -05:00
Konstantin Pereiaslov
20b8bc1d4d
Remove useless comments and change formatting
2023-05-14 20:54:26 -05:00
Konstantin Pereiaslov
fbaa76303e
Use polling interval variable instead of hardcoding 1
2023-05-14 20:51:13 -05:00
Konstantin Pereiaslov
66e1ed6dc8
rename variables to use snake case
2023-05-14 20:50:11 -05:00
Konstantin Pereiaslov
c7a9ad2ffc
First version
2023-05-14 19:01:33 -05:00