From 455ec54613230f4004a24f8d2798fb0084e00cb4 Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 11 May 2026 16:25:49 +0200 Subject: Add display_format config, fix restart command, clean up config code - Add display_format option with get/set/list/unset for customizing track display - Add Track::format() supporting $ARTIST, $ALBUM, $TRACK variables - Update queue, status, notifications to use display_format - Fix restart command using wrong subcommand 'start' -> 'start-daemon' - Remove socket_path from config (now computed at runtime from XDG_RUNTIME_DIR) - Consolidate duplicate save() and save_all() into single save() - Fix redundant .clone().clone() in config.rs - Add todo item for caching config in daemon hot paths --- src/cli.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs index bd81983..e0cea63 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -14,9 +14,9 @@ pub struct Cli { #[derive(Subcommand)] pub enum Commands { /// Start the daemon - Start, + StartDaemon, /// Stop the daemon - Stop, + StopDaemon, /// Restart the daemon (kill existing and start new) Restart, /// Play a track, album, or artist @@ -37,7 +37,7 @@ pub enum Commands { /// Toggle play/pause Toggle, /// Stop playback - StopPlayback, + Stop, /// Skip to next track Next, /// Skip to previous track @@ -101,10 +101,10 @@ pub enum SettingsCommands { impl Cli { pub fn run(&self) -> Result<(), Box> { match &self.command { - Commands::Start => { + Commands::StartDaemon => { crate::daemon::start_daemon()?; } - Commands::Stop => { + Commands::StopDaemon => { crate::daemon::stop_daemon()?; } Commands::Restart => { @@ -135,7 +135,7 @@ impl Cli { Commands::Toggle => { crate::daemon::send_command("toggle".to_string())?; } - Commands::StopPlayback => { + Commands::Stop => { crate::daemon::send_command("stop".to_string())?; } Commands::Next => { -- cgit v1.2.3