~noneofyourbusiness

Switzerland

I

  • like C, Shell, Common Lisp
  • program for fun
  • work in industrial automation (which involves programming)

Trackers

~noneofyourbusiness/nscat

Last active 4 months ago

#521 Using emacs instead of vis or vim to text 4 months ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

Why not just make sxmo_terminal.sh a hook? That way you can customize it as you like. In fact, you could make every script a hook (including the script that calls the hooks) to enhance customizability since you can't know of all possible use cases.

#446 replace date -d with portable alternative 4 months ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

Since alpine is already making their own POSIX utils with some GNU extensions, it's fine with me. sbase also implements -d. I guess you can keep this one around as wontfix (after documenting why exactly in the docs)

#446 replace date -d with portable alternative 7 months ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

#456 High cpu usage caused by sxmo_led.sh 9 months ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

Could reproduce, fixed by modifying the screenoff hook

this seems to be the problematic spot https://git.sr.ht/~mil/sxmo-utils/tree/master/item/configs/default_hooks/screenoff#L36

#465 RFC: hook-ify the keyboard 10 months ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

for the german wordlist thing: you could be using an editor plugin for that (vis is also extensible, in example vis-ins-completion could be used here, using a dictionary for .txt syntax type) (sounds like another entry for the tips&tricks page)

seems like a good idea (because it enhances customizability)

sxmo_keyboard.sh is small, too, so it should be somewhat trivial to turn into a hook

however the external keyboard detection sounds like there is a need for device specific code, i.e. how do you detect a usb keyboard (probably via /sys)?

#446 replace date -d with portable alternative 10 months ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

#441 Save EMMC and disk write/read generally, move XDG_RUNTIME_DIR to /run 10 months ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

yeah, upstream

#446 replace date -d with portable alternative 10 months ago

Ticket created by ~noneofyourbusiness on ~mil/sxmo-tickets

problem: date -d is not POSIX, thus does not work on every posix-compliant system see https://www.unix.com/man-page/posix/1P/date/

3 ideas come to mind option 1: replace every occurence with a C wrapper around the posix strftime? https://www.unix.com/man-page/posix/3p/strftime/

option 2: "" with a shell script that does the math for us [slow]

option 3: use awk '{ print strftime("%F%T%z", $0) }' NOT posix, but widespread, even in openbsd awk - the easiest and smallest solution

I've seen date -d being used i.e. for sms logs - getting the timestamp from the file i.e. "2022-01-1121:03:14+01:00" and reformatting it.

#410 Add short comment/description of what each script does in the header 1 year, 13 days ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

I agree. This would make understanding it easier and is a constant reminder of what the specific script is not for.

#357 Persist audio settings across reboots 1 year, 2 months ago

Comment by ~noneofyourbusiness on ~mil/sxmo-tickets

Looks like sxmo_modemcall.sh does alsa stuff here:

19: alsactl --file "$ALSASTATEFILE" restore

21: alsactl --file /usr/share/sxmo/alsa/default_alsa_sound.conf restore

123: alsactl --file "$ALSASTATEFILE" store

and ALSASTATEFILE has a hardcoded name...

2:ALSASTATEFILE="$XDG_CACHE_HOME"/precall.alsa.state

Looks like sxmo_*init.sh both need another addition, with modemcall having a small change