Documentation
¶
Overview ¶
Package config handles loading and validating the kcd daemon configuration. It has zero external imports except github.com/BurntSushi/toml.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath returns the default config file path.
Types ¶
type Config ¶
type Config struct {
DeviceID string `toml:"device_id"`
DeviceName string `toml:"device_name"`
DeviceType string `toml:"device_type"` // "desktop", "laptop", "phone", "tablet"
CertFile string `toml:"cert_file"`
KeyFile string `toml:"key_file"`
SocketPath string `toml:"socket_path"`
DownloadDir string `toml:"download_dir"`
TCPPort int `toml:"tcp_port"`
EnableBroadcast bool `toml:"enable_broadcast"` // Toggle UDP discovery broadcast
LogLevel string `toml:"log_level"` // "debug", "info", "warn", "error" (or "quiet")
AutoAcceptPairing bool `toml:"auto_accept_pairing"` // Auto-accept incoming pair requests (headless mode)
Plugins PluginConfig `toml:"plugins"`
Commands map[string]string `toml:"commands"` // key → shell command for RunCommand plugin
}
Config holds all daemon configuration.
func Defaults ¶
func Defaults() *Config
Defaults returns a Config populated with sensible defaults using XDG paths.
func (*Config) EnsureDeviceID ¶
EnsureDeviceID generates a UUIDv4-style device ID if one is not already set, and writes the updated config back to the given path.
type PluginConfig ¶
type PluginConfig struct {
Battery bool `toml:"battery"`
Clipboard bool `toml:"clipboard"`
Notification bool `toml:"notification"`
RunCommand bool `toml:"runcommand"`
MPRIS bool `toml:"mpris"`
Ping bool `toml:"ping"`
Telephony bool `toml:"telephony"`
Connectivity bool `toml:"connectivity"`
Mousepad bool `toml:"mousepad"`
SFTP bool `toml:"sftp"`
FindMyPhone bool `toml:"findmyphone"`
LockDevice bool `toml:"lockdevice"`
SystemVolume bool `toml:"systemvolume"`
PauseMusic bool `toml:"pausemusic"`
SendNotifications bool `toml:"sendnotifications"`
SMS bool `toml:"sms"`
}
PluginConfig toggles individual plugins on or off.
Click to show internal directories.
Click to hide internal directories.