Commit Graph

54 Commits

Author SHA1 Message Date
eed97e91ba tweak makefile a bit 2023-08-21 11:10:22 +02:00
5075fb8ad8 tweak makefile. 2023-08-20 14:22:44 +02:00
312bd09739 print time when changing period 2023-08-20 13:32:54 +02:00
168b4f092c add readme & makefile + small typo fixes. 2023-08-20 12:14:52 +02:00
24f3108395 add minimalistic working version. 2023-08-20 11:46:34 +02:00
25bb1ec9c2 start rewrite of spt based on sent rather than inotify. 2023-08-20 10:43:48 +02:00
Ivan Tham
64cdc50fbc
Reduce nap time to 15 minutes as mentioned in docs 2022-04-11 14:35:23 +08:00
Mohammed Anas
9f85802024 Join breaks together 2022-04-11 14:34:30 +08:00
Mohammed Anas
83c4384053 Make a small grammar fix 2022-04-10 23:28:17 +08:00
Ville Witt
b90123aca0 Fix man page for -e.
Maybe we should document for the none programmer, that currently, if
notifycmd is set, the -DNOTIFY part is skipped.
2021-01-11 22:14:17 +08:00
Ivan Tham
628804ae43
Merge pull request #16 from matesz44/patch-1
break times were switched
2020-11-22 01:22:42 +08:00
M4t35Z
c248fc1018
break times were switched 2020-11-20 13:24:35 +01:00
Ivan Tham
d5c2dd57ab
0.6 release 2020-11-06 23:45:15 +08:00
Ivan Tham
bf82caf6e0 Use shell to execute notifyext (-e)
Fix `spt -e 'mpv music.ogg' -n notify-send`, use execvp to allow
easier reuse of the cmt that appeared later.

Fix #15
2020-11-02 11:43:19 +08:00
Ivan Tham
c2b5ba6b3c 0.5 release 2020-06-15 00:43:17 +08:00
Ivan Tham
9fcdf89e06 Fix output truncation warning 2020-06-15 00:43:17 +08:00
Ivan Tham
75ad568b48 Update LICENSE year to 2020 2020-06-15 00:40:08 +08:00
Ivan Tham
de7a76f87f Update README with timer description 2020-06-15 00:38:39 +08:00
Ivan Tham
783e2d8f95 Remove parenthesis for signals in spt.1 2019-05-16 17:07:25 +08:00
Daniel M. Capella
b98188e381 Respect CPPFLAGS environment variable 2018-11-18 09:07:54 +08:00
Chris Rawnsley
65c181ec1d Add notification wrapper script for MacOS 2016-11-06 12:43:10 +00:00
Ivan Tham
4b71980933 Major release with tons of improvements
- Minor fix, sigemptyset(&emptymask)
    - Mostly consists of major code changes.

Great thanks to Simon Lieb (pips-) for his help.
2016-11-01 00:24:54 +08:00
Ivan Tham
4844396830 Simple logic fixup and prepare for release
- When -D_NOTIFY, notifycmd (-m) will be runned now
- Remove '\n' in buf in display_state() for -m echo
- Remove break; after usage() since die() is called
- Hooray! TODO is clean, everything is nice for now
- Haha, yet another rectangle blocky commit message
2016-11-01 00:21:20 +08:00
Ivan Tham
161f63ae60 Fix version in config.mk & remove authors in spt.1 2016-11-01 00:21:19 +08:00
Ivan Tham
ba2d3922fa Display time & state for SIGUSR1 2016-11-01 00:21:19 +08:00
Simon Lieb
44395654d8 Fix signal bursts blocking the counter
As sleep() would only detect a minimum of 1 second of sleeping, using
nanosleep() solves this problem. But we now required to define
POSIX_C_SOURCE >= 199309
2016-11-01 00:21:19 +08:00
Ivan Tham
b5d373cbb4 Fix year in version 2016-11-01 00:21:19 +08:00
Simon Lieb
3678854ad1 Fix separate USR1 handling & time display logic
Make remaining_time() more atomic, in order to avoid receiving a signal
during execution of this function.

Receiving a signal during a signal handler is an undefined behavior.
2016-11-01 00:21:19 +08:00
Simon Lieb
50ed6952f2 Replace signal(2) with sigaction(2) for portability
It also require defining _POSIX_C_SOURCE constant to 1 (see config.mk).

Depending on wether you only want to rely on C99 standard or POSIX 1.
2016-11-01 00:21:19 +08:00
Simon Lieb
22f35d5af4 Prefer sigsuspend(2) over pause(2)
As OpenBSD manual for pause(3) stated, this function is made obsolete by
sigsuspend(2).

We may think it will be removed in future for this *nix.

On linux, this require defining _POSIX_C_SOURCE to 1.
2016-11-01 00:21:19 +08:00
Simon Lieb
0af77c1282 Use pause(2) to suspend timer ticking
See #4 for discussion about waiting for signals, instead of incrementing
timecount with zero value.
2016-11-01 00:21:19 +08:00
Ivan Tham
906a6caa13 Main goto loop to for loop
Thanks to quinq http://lists.suckless.org/hackers/1609/12073.html
2016-11-01 00:21:19 +08:00
Ivan Tham
aa718fd83a Fix logic for i infinal loop
thanks to this I had learned about dprintf and breakpoints
2016-11-01 00:21:16 +08:00
Ivan Tham
8be5483b6a Update man page with new features
mdoc alternative @ https://ghostbin.com/paste/oj2b4/raw
2016-07-15 22:02:36 +08:00
Antonio Bibiano
938cd77b94 Implemented pause/resume on SIGUSR2 2016-07-12 21:06:28 +08:00
Ivan Tham
8e7bd4d2aa Simplify infinal loop 2016-07-11 20:35:56 +08:00
Ivan Tham
c89ef49965 Prevent macro hell 2016-07-11 19:39:13 +08:00
Ivan Tham
58d1470890 Fix failed execvp notifycmd 2016-07-11 18:47:18 +08:00
Ivan Tham
f1fe73aff8 Just comment config.mk to remove libnotify 2016-07-11 17:32:47 +08:00
Ivan Tham
0e87e7c205 Merge remote-tracking branch 'antbbn/master' 2016-07-11 15:53:19 +08:00
Antonio Bibiano
93fda613a2 Brought everything up to date, removed spawn TODO, fixed double print error 2016-07-11 15:26:56 +10:00
Ivan Tham
6486bb2ac3 Update TODO 2016-05-14 08:49:50 +08:00
Ivan Tham
2502641ce2 Fix spt on OSX (no libnotify)
- Thanks for the person who reviewed my code & gave suggestion
    - Fork notify_send() directly
    - What's next? Parallel timer
2016-05-13 23:13:23 +08:00
Antonio Bibiano
d55edcb9b6 Removed libnotify dependency 2016-05-03 10:29:46 +10:00
Ivan Tham
cafb6102db Show USR1 features and fix typo 2016-02-26 08:03:43 +08:00
Simon Lieb
b7e94be5d0 Notify remaining time on SIGUSR1 signal 2016-02-25 22:16:05 +08:00
Ivan Tham
bf41fc8e6c Better keyword (timer->timers)
- sizeof(a)[0]->sizeof(a[0]) thanks to ekleog
    - Add more work to TODO
2016-02-02 23:10:23 +08:00
Ivan Tham
8c0cb46576 Bump version to 0.1 2016-02-01 08:24:44 +08:00
Ivan Tham
f4fb27b981 README in markdown 2016-01-22 18:25:26 +08:00
Ivan Tham
fc8492296a Use ISC license 2016-01-20 20:36:05 +08:00