Skip to content

Basic Configuration

Andrej Benz edited this page Feb 2, 2025 · 39 revisions

Config can be written in toml, json or yaml. Walker will fallback to /etc/xdg/walker for config, if ~/.config/walker isn't present.

You can run walker -C or walker --createuserconfig to generate the default config in $XDG_CONFIG_HOME/walker.

All config options:

type Config struct {
	ActivationMode      ActivationMode `koanf:"activation_mode"`
	AsWindow            bool           `koanf:"as_window"`
	Bar                 Bar            `koanf:"bar"`
	Builtins            Builtins       `koanf:"builtins"`
	CloseWhenOpen       bool           `koanf:"close_when_open"`
	DisableClickToClose bool           `koanf:"disable_click_to_close"`
	Keys                Keys           `koanf:"keys"`
	Disabled            []string       `koanf:"disabled"`
	Events              Events         `koanf:"events"`
	ForceKeyboardFocus  bool           `koanf:"force_keyboard_focus"`
	HotreloadTheme      bool           `koanf:"hotreload_theme"`
	IgnoreMouse         bool           `koanf:"ignore_mouse"`
	AppLaunchPrefix     string         `koanf:"app_launch_prefix"`
	List                List           `koanf:"list"`
	Locale              string         `koanf:"locale"`
	Monitor             string         `koanf:"monitor"`
	Plugins             []Plugin       `koanf:"plugins"`
	Search              Search         `koanf:"search"`
	Terminal            string         `koanf:"terminal"`
	TerminalTitleFlag   string         `koanf:"terminal_title_flag"`
	Theme               string         `koanf:"theme"`
	ThemeBase           []string       `koanf:"theme_base"`
	Timeout             int            `koanf:"timeout"`
}

type Keys struct {
	AcceptTypeahead     string              `mapstructure:"accept_typeahead"`
	ActivationModifiers ActivationModifiers `mapstructure:"activation_modifiers"`
	TriggerLabels       string              `mapstructure:"trigger_labels"`
	Ai                  AiKeys              `mapstructure:"ai"`
	Close               string              `mapstructure:"close"`
	Next                string              `mapstructure:"next"`
	Prev                string              `mapstructure:"prev"`
	RemoveFromHistory   string              `mapstructure:"remove_from_history"`
	ResumeQuery         string              `mapstructure:"resume_query"`
	ToggleExactSearch   string              `mapstructure:"toggle_exact_search"`
}

type ActivationModifiers struct {
	KeepOpen  string `mapstructure:"keep_open"`
	Alternate string `mapstructure:"alternate"`
}

type AiKeys struct {
	ClearSession     string `mapstructure:"clear_session"`
	CopyLastResponse string `mapstructure:"copy_last_response"`
	ResumeSession    string `mapstructure:"resume_session"`
	RunLastResponse  string `mapstructure:"run_last_response"`
}

type Bar struct {
	Entries []BarEntry `mapstructure:"entries"`
}

type BarEntry struct {
	Exec   string `mapstructure:"exec"`
	Icon   string `mapstructure:"icon"`
	Label  string `mapstructure:"label"`
	Module string `mapstructure:"module"`
}

type Builtins struct {
	Applications   Applications   `koanf:"applications"`
	AI             AI             `koanf:"ai"`
	Bookmarks      Bookmarks      `koanf:"bookmarks"`
	Calc           Calc           `koanf:"calc"`
	Clipboard      Clipboard      `koanf:"clipboard"`
	Commands       Commands       `koanf:"commands"`
	CustomCommands CustomCommands `koanf:"custom_commands"`
	Dmenu          Dmenu          `koanf:"dmenu"`
	Emojis         Emojis         `koanf:"emojis"`
	Finder         Finder         `koanf:"finder"`
	Runner         Runner         `koanf:"runner"`
	SSH            SSH            `koanf:"ssh"`
	Switcher       Switcher       `koanf:"switcher"`
	Symbols        Symbols        `koanf:"symbols"`
	Websearch      Websearch      `koanf:"websearch"`
	Windows        Windows        `koanf:"windows"`
	XdphPicker     XdphPicker     `koanf:"xdph_picker"`
	Translation    Translation    `koanf:"translation"`
}

type ActivationMode struct {
	Disabled bool   `mapstructure:"disabled"`
	Labels   string `mapstructure:"labels"`
	UseAlt   bool   `mapstructure:"use_alt"`
	UseFKeys bool   `mapstructure:"use_f_keys"`
}

type Search struct {
	ArgumentDelimiter string `koanf:"argument_delimiter"`
	Delay             int    `koanf:"delay"`
	Placeholder       string `koanf:"placeholder"`
	ResumeLastQuery   bool   `koanf:"resume_last_query"`
}

type List struct {
	Cycle               bool   `koanf:"cycle"`
	DynamicSub          bool   `koanf:"dynamic_sub"`
	KeyboardScrollStyle string `koanf:"keyboard_scroll_style"`
	MaxEntries          int    `koanf:"max_entries"`
	Placeholder         string `koanf:"placeholder"`
	ShowInitialEntries  bool   `koanf:"show_initial_entries"`
	SingleClick         bool   `koanf:"single_click"`
	VisibilityThreshold int    `koanf:"visibility_threshold"`
}
Clone this wiki locally