Skip to content

CPU Module

Sam edited this page Aug 7, 2024 · 4 revisions

The cpu module displays information such as your CPU's name, vendor, clock speed, cores/threads.

Using

Insert into the modules array.

Configuration

  • title -> (String) The module title.
  • format -> (String) The format used to display the module. Check below to see available placeholders.
  • title_color -> (Optional/String) Override the title color to be used.
  • title_bold -> (Optional/Bool) Make the title bold.
  • title_italic -> (Optional/Bool) Make the title italic.
  • separator -> (Optional/Char) Override the separator to be used.
  • decimal_places -> (Optional/Number) Override the decimal places to be displayed.
format placeholders;
  • {name} -> The name of the CPU.
  • {core_count} -> The number of cores.
  • {thread_count} -> The number of threads.
  • {arch} -> The architecture of the CPU, e.g x86_64
  • {current_clock_mhz} -> The current clock speed, in MHz.
  • {current_clock_ghz} -> The current clock speed, in GHz.
  • {max_clock_mhz} -> The maximum clock speed, in MHz.
  • {max_clock_ghz} -> The maximum clock speed, in GHz.
Default Configuration
[cpu]
title = "CPU"
format = "{name} ({core_count}c {thread_count}t) @ {max_clock_ghz} GHz"

Example

modules = [
    "cpu"
]

[cpu]
title = "Processor"
format = "{name}"