KHARD.CONF(5)
π
KHARD.CONF(5) β the khard config file, explained by your favorite Unix bestie π
okay so this is the manual for khard.conf, the config file for khard. yes bestie, the whole page. grab a matcha, we're going in π
β¨ NAME β¨
khard.conf β the configuration file for khard, periodt.
πΈ SUMMARY πΈ
So the khard config file is literally just a plain text file with ini-like syntax. no cap. a bunch of the options even have a matching command line option, so you can vibe either way.
and here's the one thing you cannot skip: the only mandatory section in the whole file is the definition of the available address books. everything else? optional, babe π«Ά
π¦ LOCATION π¦
khard goes looking for the file at $XDG_CONFIG_HOME/khard/khard.conf. if $XDG_CONFIG_HOME is unset, it uses ~/.config/ in its stead. easy.
you can also move the whole thing around with the environment variable $KHARD_CONFIG or with the command line option -c β and heads up, -c takes precedence π
β SYNTAX β
the syntax is an ini-style dialect, and it gets parsed with the configobj library. the precise definition of the corresponding ini syntax lives at <https://configobj.readthedocs.io/en/latest/configobj.html#the-config-file-format> β go read it if you want the full tea β
it supports sections marked with square brackets, and nested sections with more square brackets. each section contains several keys with values delimited by equal signs. and the values are typed and type checked β so yes, it will absolutely call you out if you put nonsense in there π
β¨ OPTIONS β¨
the config file consists of these four sections. four! iconic number, no notes:
π addressbooks
this section describes the addressbooks that are known to khard. it contains several subsections, but at least one.
each subsection can have an arbitrary title, must have a path key, and may have a type key. the optional type can be either discover or vdir (which is the default π«).
- a subsection with type
vdirdescribes a single addressbook. in this case the title of the subsection is the name of the addressbook as it is referenced inkhard. - with a type of
discover, the subsection might describe several addressbooks which are discovered by globbing. the name of each addressbook will be the basename of the folder found via globbing.
the path key contains the path to the folder containing the vCard files for that addressbook. the path value supports environment variables and tilde prefixes π . when using the discover type, it also supports globbing (for the exact syntax see :module:glob`` ).
and one lil requirement: khard expects the vCard files to hold only one VCARD record each and end in a .vcf extension. don't try to be cute and stuff multiple records in there π
βοΈ general
this section lets you configure some general features about khard. the following keys are available in this section:
debugβ a boolean indicating whether the logging level should be set to debug by default (same effect as the--debugoption on the command line)default_actionβ the default action/subcommand to use if the first non option argument does not match any of the available subcommandseditorβ the text editor to use to edit address book entries; if not given,$EDITORwill be usedmerge_editorβ a command used to merge two cards interactively; if not given,$MERGE_EDITORwill be used
π contact table
this section is used to configure the behaviour of different output listings of khard. the following keys are available:
displayβ which part of the name to use in listings; this can be one offirst_name,last_nameorformatted_namegroup_by_addressbookβ whether or not to group contacts by address book in listingslocalize_datesβ whether to localize dates or to use ISO date formatspreferred_email_address_typeβ labels of email addresses to preferpreferred_phone_number_typeβ labels of telephone numbers to preferreverseβ whether to reverse the order of contact listings or notshow_nicknamesβ whether to show nick namesshow_uidsβ whether to show uidsshow_kindsβ whether to show kindssortβ field by which to sort contact listings
πͺͺ vcard
private_objectsβ a list of strings; these are the names of private vCard fields (starting withX-) that will be loaded and displayed bykhardsearch_in_source_filesβ whether to search in the vCard files before parsing them in order to speed up searchesskip_unparsableβ whether to skip unparsable vCards; otherwisekhardexits on the first unparsable card it encounters πpreferred_versionβ the preferred vCard version to use for new cards
π EXAMPLE π
this is the example config file β steal it, copy it, make it yours, it's giving starter pack π:
# example configuration file for khard version > 0.14.0
# place it under ~/.config/khard/khard.conf
# This file is parsed by the configobj library. The syntax is described at
# https://configobj.readthedocs.io/en/latest/configobj.html#the-config-file-format
[addressbooks]
[[family]]
path = ~/.contacts/family/
[[friends]]
path = ~/.contacts/friends/
[[work]]
path = ~/.work/**/client-*-contacts/
type = discover
[general]
debug = no
default_action = list
# These are either strings or comma seperated lists
editor = vim, -i, NONE
merge_editor = vimdiff
[contact table]
# display names by first or last name: first_name / last_name / formatted_name
display = first_name
# group by address book: yes / no
group_by_addressbook = no
# reverse table ordering: yes / no
reverse = no
# append nicknames to name column: yes / no
show_nicknames = no
# show uid table column: yes / no
show_uids = yes
# show kind table column: yes / no
show_kinds = no
# sort by first or last name: first_name / last_name / formatted_name
sort = last_name
# localize dates: yes / no
localize_dates = yes
# set a comma separated list of preferred phone number types in descending priority
# or nothing for non-filtered alphabetical order
preferred_phone_number_type = pref, cell, home
# set a comma separated list of preferred email address types in descending priority
# or nothing for non-filtered alphabetical order
preferred_email_address_type = pref, work, home
[vcard]
# extend contacts with your own private objects
# these objects are stored with a leading "X-" before the object name in the vcard files
# every object label may only contain letters, digits and the - character
# example:
# private_objects = Jabber, Skype, Twitter
# default: , (the empty list)
private_objects = Jabber, Skype, Twitter
# preferred vcard version: 3.0 / 4.0
preferred_version = 3.0
# Look into source vcf files to speed up search queries: yes / no
search_in_source_files = no
# skip unparsable vcard files: yes / no
skip_unparsable = no
π Copyright π
2020, Eric Scheibler β thank you for your service, king π«Ά
and that's the whole page, bestie. this was khard.conf(5) from khard version 0.22, dated Oct 05, 2026. go forth and configure slayfully π
β¨
π¦ where this page comes from
- arch rolling: khard 0.22.0-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms