Command containing 'Zenity' isn't displaying content as its supposed to be displaying !
Hey,
thanks for your simple alarm app, I have installed the same and whilst test driving I wanted to see if i can get some sort of Dialog Box popping up on the screen to draw my attention.
Identified the package that goes by the name 'zenity' to accomplish the pop up dialog box.
The pop-up box works great, however the Date isn't displaying properly(screenshot attached below)
WHEN IT OPENS FROM YOUR ALARM APP
I have tested this via the command line(terminal) as well as by adding this command to my global shortcuts and invoking the shortcut.
WHEN IT OPENS THROUGH THE GLOBAL SHORTCUT
as you can see the very same command seems to show the dialog with the current time, however It does not do that on your alarm app
zenity test command to show time in the dialog
zenity --info --text=$(date +%H:%M) --title="DIALOG BOX TITLE" --ok-label="OK"
This occurs because you are using $(date +%H:%M) which requires a shell to expand it to the actual value. Alarm clock doesn't run commands in a shell by default.
What you can do is manually run it inside a shell by wrapping it in bash -c ''.
Thus, the command you would enter in alarm clock would be the following:
bash -c 'zenity --info --text="$(date +%H:%M)" --title="DIALOG BOX TITLE" --ok-label="OK"'
which results in the following for me
As a sidenote, are the notifications not enough to grab your attention? Perhaps opening a popup window could be made into a feature in alarm clock itself at some point in the future if it would help people.
As a sidenote, are the notifications not enough to grab your attention? Perhaps opening a popup window could be made into a feature in alarm clock itself at some point in the future if it would help people.
the notification is visible briefly on one corner of the screen and it will most certainly be lost amidst the other notifications. The purpose of an Alarm Clock is to CATCH, rather GRAB the attention of the person who wants the alarm reminder.
A continuous sound does that, but if the headphones are attached and not worn(or the sound is muted) then the sound will be ineffective. Hence my quest to find something that pops right in front of the screen drawing one's attention to the reminder at hand.
Well that would be lovely, in fact if the alarm-clock team did plan such a feature it would be very intuitive, they can further connect the ability to show this dialog with additional options like the option to snooze with the ability to choose the snooze duration, etc.
the team can also make this dialogue to show on top of all open windows(using the 'Always on Top' feature linux already has) that way it will serve the purpose of a reminder even more close to a 't' ...
Thus, the command you would enter in alarm clock would be the following:
bash -c 'zenity --info --text="$(date +%H:%M)" --title="DIALOG BOX TITLE" --ok-label="OK"'
Its working fantastic !!! Alarm Clock and Zenity in conjunction is harmony !!!
If only zenity dialog could be enforced to show with a 'Always on Top' windows attribute !
Eureka !!! Seems like the 'Always on Top' dialog window seems to be achievable in further conjunction with 'wmctrl' package ...
the following command seems to work fine with the 'Always on Top' window attribute ... when executed from the shell(terminal).
(sleep 1 && DISPLAY=:0 wmctrl -F -a "I am on top" -b add,above)&(DISPLAY=:0 zenity --info --title="I am on top" --text="How to help Zenity to get focus and be always on top")
or
(sleep 1 && DISPLAY=:0 wmctrl -F -a "I am on top" -b add,above)&(DISPLAY=:0 bash -c zenity --info --title="I am on top" --text="How to help Zenity to get focus and be always on top")
However it does not seem to work from the Alarm Clock command line