You are not logged in.
Pages: 1
Is it possible for the DateTime panel applet to be changed in order to run a user-selected program when it is clicked? This would allow it to launch a more comprehensive calendar app when clicked on.
Offline
Without an enhancement to the code, no it can't. However, if you want to display the date/time on the panel, and then click on it to bring up some other calendar app, you can use the xfce4-genmon-plugin and a command like this:
bash -c 'echo "<txt>$(date)</txt><txtclick>APP</txtclick>"'
...and change APP to the name of the calendar app you want to use.
You can format the date as well:
Example #1 - Just the time:
bash -c 'echo "<txt>$(date +"%l:%M%P")</txt><txtclick>APP</txtclick>"'
Example #2 - Date and time:
bash -c 'echo "<txt>$(date "+%a %b %d, %l:%M%P")</txt><txtclick>APP</txtclick>"'
In the genmon properties, uncheck the label, set the period cycle (seconds to refresh) and change the font if you desire.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Yes, I was requesting an enhancement to the code, and I think it would be a very worthwhile enhancement.
I have used genmon before, but I was unaware of the <txtclick> control, so I will look up the latest info on it and see if I can achieve the look I want.
Offline
Thanks for your help, ToZ, I came up with this script:
#!/bin/sh
echo "<txt><b>`date +%H:%M:%S`</b>"
echo "<span size='x-small'> `date +%d/%m/%Y`</span></txt><txtclick>APP</txtclick>"
echo "<tool>Weekday: `date +%A`"
echo "Week №: `date +%U`"
echo "Day of Year: `date +%j`</tool>"
This lines up nicely with the Font set to Bitstream Vera Sans 12pt. I had to insert spaces on the second echo line. I would have preferred to use a "center" layout command. I tried <span text-align='center'> and it didn't work. Any knowledge here would be helpful.
Offline
Unfortunately, neither GtkLabel (via css style properties) nor the Pango Markup Language currently support text alignment. Right now spaces are the best you can do.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I can set it to default center-justify in the code, and it works:
Just trying to see if there is a downside to this.
If it's a horizontal, one line output, the justification won't matter (widget will size to text length)
If it's a horizontal, multi-line output, or any of single or multi-line vertical/deskbar output, this would be justified as well.
Is there any reason someone wouldn't want it center justified?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Okay. You've convinced me. I've pushed a commit to center justify labels by default. I'll see if anyone complains about it.
To test/run it, you'll need to build the git version of the plugin. Let me know if you need any help.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Okay. You've convinced me. I've pushed a commit to center justify labels by default. I'll see if anyone complains about it.
To test/run it, you'll need to build the git version of the plugin. Let me know if you need any help.
I'll wait until it comes through as an update. I'm using PCLinuxOS which keeps pretty much up to date. Thank you!
Offline
Pages: 1
[ Generated in 0.013 seconds, 8 queries executed - Memory usage: 547.45 KiB (Peak: 548.29 KiB) ]