You are not logged in.
Hello, I was wondering if there's yet a way to get the panel clock to show time correct after system suspend? I've updated to the latest xfce4-panel but the issue still persists where after waking from suspend, the panel clock time is wrong. I work around this by hovering my mouse over the clock which causes it to update. I'm aware I can use orage instead but I prefer the simple clock panel plugin because it supports transparency and is simpler.
Offline
It doesn't look like there is anything programmed into the plugin to refresh it.
However, it looks like it might refresh itself when a property is set.
To do this, first get the name of the plugin. Hover over the plugin in your Panel Properties Items tab to get it's name (e.g. clock-7). Replace "clock" with "plugin".
Then go to xfce4-settings-editor and in the xfce4-panel channel under the plugins branch, find this plugin. There should be an associated format settings (e.g. digital-format) with a value (e.g. %r).
Format an xfconf-query command to write to this channel with the same data. With my examples, it would be:
xfconf-query -c xfce4-panel -p /plugins/plugin-7/digital-format -s %r
Test it first by leaving the command ready to go in a terminal window and suspend your computer. Wait a few minutes and resume. Immediately run that command to see if the clock refreshes.
If it works, you just need to add running this command (with the proper X/DBUS variables exported) to your resume hooks.
Last edited by ToZ (2018-05-25 17:49:26)
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
Hm, very cool, good idea, unfortunately doesn't work. I know I've got the correct command as I can use it to change the date format, but it hasn't an effect running immediately after suspend.
edit- It does seem to be working if I actually reset it first though- for example,
xfconf-query -c xfce4-panel -p /plugins/plugin-8/digital-format -r && xfconf-query -c xfce4-panel -p /plugins/plugin-8/digital-format -n -t string -s %I:%M\ %p
I'll test a little further...
Last edited by tbqhmhsfamilam (2018-05-25 18:34:34)
Offline
Yep, it's working! Thanks Toz, you are a genie! For the record, I created and made executable file /lib/systemd/system-sleep/xfclock.sh (location may be different on non-debian system, I think it would be /usr/lib/... elsewhere) containing:
#!/bin/bash
case $1 in
post)
su rich -c "
DISPLAY=:0
xfconf-query -c xfce4-panel -p /plugins/plugin-8/digital-format -r && xfconf-query -c xfce4-panel -p /plugins/plugin-8/digital-format -n -t string -s %I:%M\ %p"
;;
esac
(I put my own username in there, season to taste )
Offline
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 533.08 KiB (Peak: 533.92 KiB) ]