Skip to content
ernesto1 edited this page Aug 18, 2024 · 39 revisions

Items to configure

These are the particular settings you may need to tweak in order to customize this conky configuration to your particular linux distribution/system.

Network devices

Each linux distribution follows a different convention for naming their network devices. Even Fedora at some point changed their own convention. Conky requires the name of your wifi and/or ethernet card in order to monitor its usage.

Run the netstat command to find out what your device names are:

$ netstat -i
Iface             MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
enp6s0           1500        0      0      0 0             0      0      0      0 BMU
lo              65536       27      0      0 0            27      0      0      0 LRU
virbr0           1500        0      0      0 0             0      0      0      0 BMU
wlp4s0           1500    10041      0      0 0          7473      0      0      0 BMRU

On Fedora 32, enp6s0 is my ethernet card and wlp4s0 is my wifi.

If you are not familiar with your distribution's naming convention, you can just plug the available values into the conky config until you see the network monitors registering activity for the right device.

hard drive details

Conky disk variables require one these details:

  • The device name, ex. /dev/sdc
  • The mount point of each partition within the disk, ex. /media/movies

You can run the df -h command to find these details, below is a simplified output of this command

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        50G   26G   22G  55% /
/dev/sda3       289G  119G  156G  44% /home
/dev/sdc        2.7T  2.1T  541G  80% /media/photos  # a partition's mount point under /dev/sdc
/dev/sdc        2.7T  1.1T  1.6T  41% /media/movies  # a partition's mount point under /dev/sdc

Alternatively you could use gnome disks to get these details.
If your disk has multiple partitions, you will have to add each individual partition entry into the configuration.

USB hard drives and memory sticks

USB drives are no different than plain hard drives. The df -h command above will give you their device name as well as their mount points.

Device Temperature

Conky uses the linux hardware monitoring kernel API (HWMON) for retrieving the temperature of your devices. Depending on your hardware you may be able to check the temperature of all your devices.

To see what devices you have available, run

$ grep '' /sys/class/hwmon/hwmon*/name
/sys/class/hwmon/hwmon0/name:ADP1
/sys/class/hwmon/hwmon1/name:acpitz
/sys/class/hwmon/hwmon2/name:BAT0
/sys/class/hwmon/hwmon3/name:coretemp

My cpu is under coretemp in hwmon3, in order to see how many temperature sensors are available run

$ grep '' /sys/class/hwmon/hwmon3/temp*_label
/sys/class/hwmon/hwmon3/temp2_label:Core 0
/sys/class/hwmon/hwmon3/temp3_label:Core 1

The ${hwmon ...} conky variable is used to retrieve the corresponding temperature for each device.

Hard drives

For hard drives to show up on hwmon you need to load the drivetemp module

$ sudo modprobe drivetemp

This module can be loaded on boot with this command

# echo drivetemp > /etc/modules-load.d/drivetemp.conf

Package manager

The dnfPackageLookup.bash script uses Fedora's package manager dnf in order to query the repositories and check for new packages.
If you use a different linux distribution, you will have to update this script to use your distro's package manager instead.

Lines to change:

Multi monitor setups

If you run a multi monitor setup, the window compositor that you use (x11 or wayland) will influence on what monitor conky will be displayed.

If you alternate between these two compositors, you may have to change the monitor configuration accordingly. Unfortunately there is no way to "permanently assign" a monitor for conky to use.

The xinerama_head property tells conky on what monitor to show up. Values start from 0, ex. 0,1,2,3.
Depending on the compositor, these values may yield different monitors. You will have to experiment with these values to see what works for your setup.

Selecting the monitor from the launch script

The launch script allows you to select what monitor you want conky to run on. Just use the --monitor flag, example:

$ ~/conky/monochrome/launch.bash --conky glass --monitor 1

This will launch conky on monitor 1