Didn't work without config file

This commit is contained in:
Nox Sluijtman 2024-09-23 10:10:54 +02:00
parent efc0580044
commit d665cd174f

View file

@ -3,7 +3,7 @@
let configPath = $"($env.XDG_CONFIG_HOME? | default $"($env.HOME)/.config")/irs.toml"
let config = if ($configPath | path exists) { open $configPath }
let mpdHost = $config.noise.host? | default 'localhost:6600'
let mpdHost = if ($config == nothing) { $config.noise.host? | default 'localhost' } else { 'localhost' }
let current = mpc --host $mpdHost current
def notify [message: string, display_icon:bool] {