Open thomasvs opened 5 months ago
For now, I came up with a really hacky solution:
First you need to find which alarm-X corresponds to the timer you want to enable. You do this by running something along the lines of dconf dump /io/github/alarm-clock-applet/ | grep -B 4 message
and then looking at the [alarm-X]
header.
Then, for example, for alarm-4 you can do in your script:
alarm_num=4
# Get duration of timer
alarm_time=$(gsettings get "io.github.alarm-clock-applet.alarm:/io/github/alarm-clock-applet/alarm-${alarm_num}/" time | sed 's@int64 @@')
# Schedule it
alarm_now=$(date +%s)
gsettings set "io.github.alarm-clock-applet.alarm:/io/github/alarm-clock-applet/alarm-${alarm_num}/" timestamp "$(($alarm_time + $alarm_now))"
# Enable it
gsettings set "io.github.alarm-clock-applet.alarm:/io/github/alarm-clock-applet/alarm-${alarm_num}/" active true
I will look into adding a command line option in the future that can do this in a proper way.
I have a script to start "flow mode" on my machine and would like to have a 90 minute timer started from this script using a cli.