Conky can't change to 24 hour  [Solved]

Message
Author
cecca
Posts: 10
Joined: Sun Aug 23, 2020 5:14 pm

Conky can't change to 24 hour

#1 Post by cecca »

Hi! Just installed MX Linux with XFCE as DM. Tried to make the modification indicate in this thread but there's no "%l" in the config file and so I can't change the time format to 24 hours.
Can you help me? Thanks in advance

User avatar
Eadwine Rose
Administrator
Posts: 15099
Joined: Wed Jul 12, 2006 2:10 am

Re: Default Conky 12/24 hour

#2 Post by Eadwine Rose »

Please open a new topic next time. Do not dig up dead topics, thanks.


@cecca Your topic is here.
MX-23.6_x64 July 31 2023 * 6.1.0-38amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
j2mcgreg
Global Moderator
Posts: 7107
Joined: Tue Oct 23, 2007 12:04 pm

Re: Conky can't change to 24 hour

#3 Post by j2mcgreg »

We need your computer’s complete profile before we can proceed, so you need to post the output from the QSI utility. The Quick System Info (QSI) utility is located in MX Tools and its output is automatically formatted for use here in the forum. Run the QSI utility, click “Copy for Forum” at the bottom and then just paste it here in your thread.
Forum Rules
HP 15; ryzen 3 5300U APU; 500 Gb SSD; 8GB ram
HP 17; ryzen 3 3200; 500 GB SSD; 12 GB ram
Idea Center 3; 12 gen i5; 256 GB ssd;

In Linux, newer isn't always better. The best solution is the one that works.

cecca
Posts: 10
Joined: Sun Aug 23, 2020 5:14 pm

Re: Conky can't change to 24 hour

#4 Post by cecca »

Sorry for my mistake.
Quick system info output:

Code: Select all

System:
  Kernel: 6.1.0-25-amd64 [6.1.106-3] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-25-amd64 root=UUID=<filter> ro quiet splash
    resume=UUID=<filter> resume_offset=776192
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.4_x64 Libretto September 15  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: Apple product: MacBookPro5,5 v: 1.0 serial: <superuser required> Chassis:
    type: 10 v: Mac-F2268AC8 serial: <superuser required>
  Mobo: Apple model: Mac-F2268AC8 serial: <superuser required> UEFI: Apple
    v: MBP55.88Z.00AC.B03.0906151708 date: 06/15/09
Battery:
  ID-1: BAT0 charge: 22.5 Wh (33.5%) condition: 67.1/65.4 Wh (102.5%) volts: 11.2 min: 10.9
    model: SMP bq20z451 type: Li-ion serial: N/A status: charging cycles: 18
CPU:
  Info: model: Intel Core2 Duo P8700 bits: 64 type: MCP arch: Penryn level: v1 built: 2008
    process: Intel 45nm family: 6 model-id: 0x17 (23) stepping: 0xA (10) microcode: 0xA0B
  Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB
    L2: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 2302 high: 2386 min/max: 798/2527 scaling: driver: acpi-cpufreq
    governor: ondemand cores: 1: 2218 2: 2386 bogomips: 10082
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass status: Vulnerable
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines; STIBP: disabled; RSB filling; PBRSB-eIBRS: Not
    affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA C79 [GeForce 9400M] vendor: Apple driver: nouveau v: kernel non-free:
    series: 340.xx status: legacy (EOL) last: release: 340.108 kernel: 5.4 xorg: 1.20 arch: Tesla
    process: 40-80nm built: 2006-13 ports: active: LVDS-1 empty: DP-1 bus-ID: 02:00.0
    chip-ID: 10de:0863 class-ID: 0300 temp: 60.0 C
  Device-2: Apple Built-in iSight type: USB driver: uvcvideo bus-ID: 1-4:3 chip-ID: 05ac:8507
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: nouveau gpu: nouveau display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1280x800 s-dpi: 96 s-size: 338x211mm (13.31x8.31") s-diag: 398mm (15.69")
  Monitor-1: LVDS-1 model: Apple 0x9cc2 serial: <filter> built: 2009 res: 1280x800 hz: 60
    dpi: 114 gamma: 1.2 size: 286x179mm (11.26x7.05") diag: 337mm (13.3") ratio: 16:10 modes:
    max: 1280x800 min: 640x350
  API: OpenGL v: 3.3 Mesa 22.3.6 renderer: NVAC direct-render: Yes
Audio:
  Device-1: NVIDIA MCP79 High Definition Audio driver: snd_hda_intel v: kernel bus-ID: 00:08.0
    chip-ID: 10de:0ac0 class-ID: 0403
  API: ALSA v: k6.1.0-25-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: NVIDIA MCP79 Ethernet driver: forcedeth v: kernel port: 21e0 bus-ID: 00:0a.0
    chip-ID: 10de:0ab0 class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Broadcom BCM4322 802.11a/b/g/n Wireless LAN vendor: Apple AirPort Extreme driver: wl
    v: kernel modules: ssb pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 14e4:432b
    class-ID: 0280
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: Apple Bluetooth Host Controller type: USB driver: btusb v: 0.8 bus-ID: 4-1.1:3
    chip-ID: 05ac:8213 class-ID: fe01 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 1.2 lmp-v: 2.1
    sub-v: 21d0 hci-v: 2.1 rev: 20a
  Info: acl-mtu: 1021:5 sco-mtu: 64:1 link-policy: rswitch hold sniff park
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 232.89 GiB used: 20.54 GiB (8.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Fujitsu model: MJA2250BH FFS G1 size: 232.89 GiB
    block-size: physical: 512 B logical: 512 B speed: 1.5 Gb/s type: N/A serial: <filter> rev: 0020
    scheme: GPT
Partition:
  ID-1: / raw-size: 232.63 GiB size: 227.92 GiB (97.97%) used: 20.54 GiB (9.0%) fs: ext4
    dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
    dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 5.57 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 63.0 C mobo: N/A gpu: nouveau temp: 60.0 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2138 pm: dpkg pkgs: 2126 libs: 1050 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 12
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://it.mxrepo.com/mx/repo/ bookworm main non-free
Info:
  Processes: 228 Uptime: 3m wakeups: 3 Memory: 3.57 GiB used: 2.11 GiB (59.0%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
Thanks a lot for any help

User avatar
siamhie
Global Moderator
Posts: 3686
Joined: Fri Aug 20, 2021 5:45 pm

Re: Conky can't change to 24 hour

#5 Post by siamhie »

Which conky are you using?
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
fehlix
Developer
Posts: 12867
Joined: Wed Apr 11, 2018 5:09 pm

Re: Conky can't change to 24 hour

#6 Post by fehlix »

cecca wrote: Mon Sep 30, 2024 7:05 am Hi! Just installed MX Linux with XFCE as DM. Tried to make the modification indicate in this thread but there's no "%l" in the config file and so I can't change the time format to 24 hours.
Can you help me? Thanks in advance
The easiest might be this:
Change LANG to en_IE.UTF-8, or at least LC_TIME to en_IE.UTF-8,
to get English-Ireland locale with 24H.
Do logout and login. You may need select LANG in upper right corner at the login window, if you changed LANG and not only LC_TIME
The reason: Most (nearly all) MX Conky's do display 12/24 H based on locale settings (LANG or LC_TIME)-
To adjust LANG and/or LC_TIME easiest use the tool mx-locale, to be found within the menu or in "MX Tools"
Good luck.

User avatar
T3KN05H4M4N
Posts: 68
Joined: Sun Aug 04, 2024 3:21 pm

Re: Conky can't change to 24 hour

#7 Post by T3KN05H4M4N »

I got this from the antiX Linux website. I use antiX on one of my older laptops and I couldn't figure out how to change it from 24 hour to 12 hour. In your case, it's the opposite. It's called, Casey's Conky Reference Manual. You'll want to click on the "Time Format String Variables" section and it will show you how to adjust the settings to change it to 24 hour. Hope this helps. Here's the link:

http://www.ifxgroup.net/conky.htm

User avatar
fehlix
Developer
Posts: 12867
Joined: Wed Apr 11, 2018 5:09 pm

Re: Conky can't change to 24 hour

#8 Post by fehlix »

T3KN05H4M4N wrote: Mon Sep 30, 2024 12:44 pm I got this from the antiX Linux website. I use antiX on one of my older laptops and I couldn't figure out how to change it from 24 hour to 12 hour. In your case, it's the opposite. It's called, Casey's Conky Reference Manual. You'll want to click on the "Time Format String Variables" section and it will show you how to adjust the settings to change it to 24 hour. Hope this helps. Here's the link:

http://www.ifxgroup.net/conky.htm
MX Conky's are using lua and some other tricks, to get 12H/24H displayed based on locale settings.
So your advice is reasonable, but simplest to adjust MX provided Conky's by adjusting locale settings, so no need to learn conky language.
in order to change to 24H.

User avatar
DukeComposed
Posts: 1499
Joined: Thu Mar 16, 2023 1:57 pm

Re: Conky can't change to 24 hour

#9 Post by DukeComposed »

cecca wrote: Mon Sep 30, 2024 7:05 am there's no "%l" in the config file and so I can't change the time format to 24 hours.
Can you help me? Thanks in advance
"man conky" defers formatting to strftime:

Code: Select all

       time (format)
              Local time, see “man strftime” to get more information about format.
"man strftime" outlines several valid formatting options for displaying hours, including these:

Code: Select all

       %H     The  hour  as a decimal number using a 24-hour clock (range 00 to 23).  (Calculated
              from tm_hour.)

       %I     The hour as a decimal number using a 12-hour clock (range 01 to  12).   (Calculated
              from tm_hour.)

       %r     The  time  in a.m. or p.m. notation.  (SU) (The specific format used in the current
              locale can be obtained by calling nl_langinfo(3) with T_FMT_AMPM as  an  argument.)
              (In the POSIX locale this is equivalent to %I:%M:%S %p.)

       %R     The  time  in  24-hour notation (%H:%M).  (SU) For a version including the seconds,
              see %T below.

User avatar
fehlix
Developer
Posts: 12867
Joined: Wed Apr 11, 2018 5:09 pm

Re: Conky can't change to 24 hour

#10 Post by fehlix »

DukeComposed wrote: Mon Sep 30, 2024 2:03 pm
cecca wrote: Mon Sep 30, 2024 7:05 am there's no "%l" in the config file and so I can't change the time format to 24 hours.
Can you help me? Thanks in advance
"man conky" defers formatting to strftime:
Without %I within the conky's strftime won't help much
You may find some lua code like this:
${lua hours}
So you may consider to learn lua, if you prefer so, instead of adjust 24H locale settings.

Post Reply

Return to “Software / Configuration”