You are not logged in.
(bl-mpv is a sort of substitute GUI app with some tweaked settings, that can replace VLC or... or... as a player with a window. A user who opens a player from a menu with no file expects a window they can do something with. bl-mpv gives the mpv pseudo-gui which at least allows drag & drop, and give a couple of controls.)
But it would be nice if we could make this script usable on all BL systems without forcing a new media player install. aplay comes with alsa-utils so most people will have it, but right it doesn't support many file types. Is that important for an alarm clock?
If aplay is used, we can have --file-filter="sounds|*.wav" in the file chooser, to only display wav files
+1 As long as we can find some suitable wav files.
PS any chance of being able to set a clock time as an alternative to so-many-minutes-later?
Even a date?
(At supports a lot of time settings.)
Last edited by johnraff (2019-11-17 05:04:28)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
There are probably a gazillion suitable wav files out there, so I guess it depends how many we would want to supply. Wavs are a similar size to images AFAICS, so not too much overhead to provide half-a-dozen I guess. I'll search out a few and try aplay instead of mpv.
(Thinks.... you could pass script parameters to set the media player you want to use? Then set different file filters from arrays, depending on what the player can utilize. Ooops, bloat-creep is starting again! Let's just use aplay and wavs )
I have been working on getting this script together into a useable state for now (impossible without misko's work!). I haven't even started thinking about bronto's at approach yet 8o
And yes, setting a time instead of an interval is an aspiration of course
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
It all looks like a great addition to the tint2 clock, right-click isn't used atm.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Gui stuff
I've added yad input for 'reason' in mine, it will popup when the thing is launched from gmrun/obmenu for example.
The reaction to right-click clock could be a menu with
~/bin/beepmein.txt.menu
beepmein ~ 1, beepmein 1
beepmein ~ 5, beepmein 5
beepmein ~ 15, beepmein 15
beepmein ~ 30, beepmein 30
beepmein ~ 60, beepmein 60
beepmein <time>, gmrun beepmein
beepmein --alarm <time>, gmrun 'beepmein --alarm '
killall beepmein noises, killall beepmein
Gmrun could/shall be replaced with something better for time input (what?).
Note: Tilda (~) is used for display to denote 'approximate'.
and in tint2rc
clock_rclick_command = cat ~/bin/beepmein.txt.menu | jgmenu --simple --icon-size=0
and in jgmenurc
position_mode = pointer
jgmenu --version
jgmenu v3.5
And a dynamic version (jgmenu simple pipe) of menu
Mic Drop.
Last edited by brontosaurusrex (2019-11-17 20:37:46)
Offline
I've got a bash yad time/date version working after a fashion, using at and aplay. It is proof-of-concept ATM. and not for public view :8
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Just throwing stuff in here, please ignore if you wish:
*) At alarm time, turn the volume up if it's down?
*) Alternative, extreme visual alert, like flash the whole screen on and off?
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Just throwing stuff in here, please ignore if you wish:
*) Alternative, extreme visual alert, like flash the whole screen on and off?
Possibly with the use of xscreensaver maybe?
Offline
*) Alternative, extreme visual alert, like flash the whole screen on and off?
Improved version of this should blink on some systems.
p.s. Combined with xbacklight might make a more universal solution.
edit: If someone want's to improve on this (not me), probably redshift sources might be the way to find how-to
redshift -m list
Available adjustment methods:
drm
randr
vidmode
dummy
*) At alarm time, turn the volume up if it's down?
Unmute or ...?
amixer sset Master unmute # ?
edit: ^ Probably a bad idea to mess with peoples volume at any point in time.
Last edited by brontosaurusrex (2019-11-19 08:41:18)
Offline
...
edit: ^ Probably a bad idea to mess with peoples volume at any point in time.
So a pulsing screen, or pop-up, could help with that.
I guess you could re-set the sound values after the alarm has finished, but there would always be a problem if something is already playing (although that would be an alert in itself!)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
^The problem would also be if something is playing and user would mute that on purpose, only to be overridden by reminder.
I improved the blink script a bit and it runs surprisingly smooth (seems to be in sync with monitor refresh) on my old nvidia and surprisingly out-of-sync (visible tearing) on an old integrated intel graphics. edit: Added slight sleep into gradation itself which seems to reduce tearing on intel, but shall probably decrease smoothness on nvidia.
edit:
- Also the way it is done right now is that on faster machines it will blink faster than on slower ones (but the difference should be small, so could be a nonissue)
- According to xrandr docs it appears there is possibility that no monitor is marked as primary (to research) edit: It shall now search for name of the 'primary AND connected' or else '1st connected' will do.
(Because I found a version where my primary is not connected..., I assume there are more ways that this could fail).
And I incorporated blink script as function to beepmein (and it's not working there, possibly due to 'at' environment ...), fixed by adding 'DISPLAY=${DISPLAY}' at start of the exported job.
Last edited by brontosaurusrex (2019-11-19 09:24:27)
Offline
Wow guys this is really turning into a cool project. I don’t know if I’ll use it much since I occasionally use alarms and just on my phone but will definitely kick the tires once y’all are done.
Offline
I think I actually might use this myself. Phone is usually switched off, and often forget something I have to do, getting deep into some trivia...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
So I was awoken by 'mpv' playing axelF.mod this morning, but there are 'speaker-test' beeps that will be triggered if
- script is not configured to find sample
- mpv is not present
Also there is now some defense in the field of 'user not getting at syntax right'.
beepmein yesterday
at time format error. # and double beep.
More user testing would be needed before I can call this ok for general consumption thought.
btw: What is expected to happen on --reaction:
- sample or beep
- notification
- screen blink (on some systems)
Last edited by brontosaurusrex (2019-11-20 12:15:38)
Offline
Some changes to beepmein.
fixed --help a bit
--set-alarm && --set-remind, also with yad --file selector (idea by Damo)
One can now say
beepmein --set-alarm /path/to/file.flac
or
beepmein --set-alarm
and yad --file selector should pop-up.
Last edited by brontosaurusrex (2019-11-29 20:23:48)
Offline
Back in the day, I used to just use:
at 06:00 mpg123 -m some_mp3_file.mp3
This is infinitely more sophisticated.
--Ben
BL / MX / Raspbian... and a whole bunch of RHEL boxes. :)
Offline
--list at jobs
beepmein relative to now shortcut 'beepmein <minutes>' is now the only one that has precision in seconds
todo: why not in nanoseconds
sleep "$(date +%_S.%N)"
When using "at" app DISPLAY env variable needs to be set to run Yad or some other gui apps.
"At" doesn't set DISPLAY and some other variables.
True that.
beepmein --list | sort
617 Wed Dec 4 07:00:00 2019 a b | sleep 0; DISPLAY=:0 beepmein --reaction --alarm 'Wake up.'
619 Wed Dec 4 07:30:00 2019 a b | sleep 0; DISPLAY=:0 beepmein --reaction --alarm 'Really?'
Last edited by brontosaurusrex (2019-12-04 07:23:10)
Offline
Lol, lookin' like beepmein is relentless & will get your butt up. Nice work @Brex
Offline
@cog, thanks.
So I've added the delay in (nano)seconds to this specific beepmein-custom-setter, this delay is actually added to job itself and should (the purpose) bring 'in seconds precision' to short-timed-relative-to-now events, like 'beepmein 5', however if the user says 'beepmein now + 5 minutes' that will not happen (we are in 'at' land). < is there a short way to explain all this in --help?
Last edited by brontosaurusrex (2019-12-04 20:57:06)
Offline
I'am thinking spaghetti actually, and how they need exactly 12 minutes. (Pretty sure they eat them in CERN as well)
Last edited by brontosaurusrex (2019-12-05 07:05:09)
Offline
@misko, nice, some thoughts (I build latest yad)
- position 'Repeat' and 'Loop forever' under 'Select a file to play' so it is clear this is related to sound and not repeating alarm every day (or something)
- Select a file to play' doesn't do anything for me, I get file dialog after clicking 'Set Alarm!'
- 'At Job List' is showing two alarms set at same time, but when running atq from cli there is only single event
- Missing delete event functionality?
edit: I wonder if analog picker like
https://weareoutman.github.io/clockpicker/ or
https://github.com/luncheon/clocklet
could be implemented?
edit2: I have repacked some css/html/js/svg clock for testing purposes and it works (but don't feel brave enough for js->yad interface as it would be needed for picker).
https://github.com/brontosaurusrex/svgclockcool
Last edited by brontosaurusrex (2020-01-22 23:31:53)
Offline