Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

MX-17: Proposal: Change Conky's time representation to "24 hours"

Show us how you are setting up MX
User avatar
MX-16_fan
Forum Regular
Forum Regular
Posts: 1098
Joined: Mon Feb 13, 2017 12:09 pm

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#11

Post by MX-16_fan » Sat Aug 11, 2018 10:52 am

@Jerry3904:
Jerry3904 wrote:
Mon Feb 26, 2018 12:43 pm
Yes, I have done it (by editing the conky definition file), but it is not easy.
It's one click in Conky Manager, as the MX Conky Help file indicates.
To change to 24hr time, in most cases you can use Conky Manager > Gear icon > Time. A few conkies are set to a time format that can not be changed (the default Gotham, for example). In such cases, click the pencil icon to open up the script itself, and click Search > Replace to change %l (lower-case L) to %H

Thanks for the hint, Jerry.

I guess it's easy for you, since you are much more of an expert than the average user.

Wouldn't call that particularly easy when compared to other desktop environments of other operating systems, however.


@all:

For anyone still struggling, the step-by-step way with MX-17.1's default time and date widget is

Conky Manager -> [Click on 'Hermoso_sys_mx171', which is the name of the default time and date widget] -> Edit Widget -> Time -> Time Format.



Greetings, and have a nice weekend to all of you, Joe

User avatar
asqwerth
Forum Veteran
Forum Veteran
Posts: 4970
Joined: Sun May 27, 2007 5:37 am

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#12

Post by asqwerth » Sat Aug 11, 2018 11:26 am

MX-16_fan wrote:...Wouldn't call that particularly easy when compared to other desktop environments of other operating systems, however.
But what do desktop environments have to do with a particular conky's representation of time?

Every conky is created the way its creator wanted it to look. Some did it so the time shows up in am/pm format and others do it with 24 hour format.

So if you want it displayed differently from the original, you have to edit the conky config file. That's just the way it is. Nothing to do with Desktop Environments. And conkies will have to be edited in any other distro if you want to change it from its original look.

Unfortunately conky is normally edited manually via text editor, so just the fact that Conky Manager and MX-Conky attempt to give someone unfamiliar with conky manipulation the GUI tools to change some parts of a text file, is already helpful. But like Jerry said, not all conkies and/or not all elements of a conky can be covered by a GUI tool. There are just tons of variables and settings in conky and so many ways for a conky creator to put together a particular conky.

Sorry, this is one case where you do need to read the Help file.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
MX-16_fan
Forum Regular
Forum Regular
Posts: 1098
Joined: Mon Feb 13, 2017 12:09 pm

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#13

Post by MX-16_fan » Sat Aug 11, 2018 1:06 pm

@asqwerth:
asqwerth wrote:
Sat Aug 11, 2018 11:26 am
(...)
But what do desktop environments have to do with a particular conky's representation of time?
(...)
Most common desktop environments so far developed didn't have very flexible time widgets. Usually you would have right-clicked on the clock, and then you could directly edit the time format via GUI.

Btw. I'd highly doubt that the average user even knows what a "Conky" is supposed to be. That's part of the problem (the adjustment problem, not the problem of the 12-hour-system being pre-digital).


Greetings, Joe

User avatar
Richard
Posts: 2804
Joined: Fri Dec 12, 2008 10:31 am

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#14

Post by Richard » Sat Aug 11, 2018 1:29 pm

Conky, like many things in Linux, requires reading/rereading/studying the reference material if you want to drastically change it's actions.
LT: MX18.3: Thinkpad T430: DualCore, Intel i5-3320M, Ivy Bridge; 8GB RAM; 4.19.0-5-amd64; 119GB SSD 840PRO, Intel Graphics-Audio-Network

NB: antiX19b2full-xfce; MX18.3: AsusTek EeePC 1005HA: Intel DualCore Atom N270, 1GB RAM, 4.19.0-1-686, 150GB HDD

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4626
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#15

Post by fehlix » Sat Aug 11, 2018 6:34 pm

TL;DR:
Find below a "Switch Conky Time" desktop-starter, which will switch all conky's time display between 12h and 24h format.
Copy onto Desktop and/or into [HOME]/.local/share/applications, to have it also available within the menu.
Any questions let me know. Check it out ;)

Code: Select all

[Desktop Entry]
# filename : Switch_Conky_Time_display.desktop
# by fehlix, 11. Aug. 2018
# copy to [HOME]/.local/share/applications
Version=1.0
Type=Application
Name=Switch Conky Time Display
Comment=Switch conky time display between 12h and 24h for all user conky's.
Exec=bash -c 'CONKY=$(xdg-user-dir HOME)/.conky; SCT=$CONKY/.switch_conky_time; P=$(printf "\x25"); H="time ${P}H";I="time ${P}I"; declare -A S;S=([$H]=$I [$I]=$H); C=$H; [ -e $SCT ] && C="${S[$C]}"; sed -i "s/$C/${S[$C]}"/g $(grep -lRF "$C" $CONKY); [ ! -e $SCT ] && touch  $SCT || rm -f  $SCT'
Icon=preferences-system-time
Path=
Terminal=false
StartupNotify=false
Categories=XFCE;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-PersonalSettings;
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 25418
Joined: Wed Jul 19, 2006 6:13 am

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#16

Post by Jerry3904 » Sat Aug 11, 2018 6:44 pm

Everybody knows it's a single button click on Conky Manager, right? For which we have a HELP document linked from the one for MX Conky.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, SSD 120 GB, Data 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB
Personal: XPS 13, 4.18.0-19.3-liquorix, 4 GB

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4626
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#17

Post by fehlix » Sat Aug 11, 2018 6:47 pm

Jerry3904 wrote:
Sat Aug 11, 2018 6:44 pm
Everybody knows it's a single button click on Conky Manager, right? For which we have a HELP document linked from the one for MX Conky.
Not for changing all with one click :p
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 25418
Joined: Wed Jul 19, 2006 6:13 am

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#18

Post by Jerry3904 » Sat Aug 11, 2018 7:12 pm

True
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, SSD 120 GB, Data 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB
Personal: XPS 13, 4.18.0-19.3-liquorix, 4 GB

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4626
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#19

Post by fehlix » Sat Aug 11, 2018 7:20 pm

OK, I must admit, out of 22 conky's I missed 4 and switched "only" 18 with one click. At least a starter for saturday night. ;)
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
MX-16_fan
Forum Regular
Forum Regular
Posts: 1098
Joined: Mon Feb 13, 2017 12:09 pm

Re: MX-17: Proposal: Change Conky's time representation to "24 hours"

#20

Post by MX-16_fan » Sun Aug 12, 2018 12:18 pm

@fehlix:
fehlix wrote:
Sat Aug 11, 2018 6:34 pm
TL;DR:
Find below a "Switch Conky Time" desktop-starter, which will switch all conky's time display between 12h and 24h format.
Copy onto Desktop and/or into [HOME]/.local/share/applications, to have it also available within the menu.
Any questions let me know. Check it out ;)

Code: Select all

[Desktop Entry]
# filename : Switch_Conky_Time_display.desktop
# by fehlix, 11. Aug. 2018
# copy to [HOME]/.local/share/applications
Version=1.0
Type=Application
Name=Switch Conky Time Display
Comment=Switch conky time display between 12h and 24h for all user conky's.
Exec=bash -c 'CONKY=$(xdg-user-dir HOME)/.conky; SCT=$CONKY/.switch_conky_time; P=$(printf "\x25"); H="time ${P}H";I="time ${P}I"; declare -A S;S=([$H]=$I [$I]=$H); C=$H; [ -e $SCT ] && C="${S[$C]}"; sed -i "s/$C/${S[$C]}"/g $(grep -lRF "$C" $CONKY); [ ! -e $SCT ] && touch  $SCT || rm -f  $SCT'
Icon=preferences-system-time
Path=
Terminal=false
StartupNotify=false
Categories=XFCE;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-PersonalSettings;
:puppy:
Extremely smart, thanks!

I guess that script might make it easy to auto-adjust the time representation according to the language / region chosen (in future versions, as proposed in the original posting)?

By-country conventions could probably be taken from the Common Locale Data Repository (CLDR) (unless everyone would be convinced to adhere to ISO 8601, FIPS PUB 4-2 and various other standards that recommend the use of the 24-hour system :number1:.)


Greetings, and have a nice week :happy:, Joe

Post Reply

Return to “Themes and Screenshots”