diff --git a/README.md b/README.md index d84a078..4335de6 100644 --- a/README.md +++ b/README.md @@ -288,10 +288,10 @@ $ cargo run --release -- --frontend cli Lan Mouse can be launched in daemon mode to keep it running in the background (e.g. for use in a systemd-service). -To do so, add `--daemon` to the commandline args: +To do so, use the `daemon` subcommand: ```sh -lan-mouse --daemon +lan-mouse daemon ``` In order to start lan-mouse with a graphical session automatically, diff --git a/nix/hm-module.nix b/nix/hm-module.nix index 9484a37..5d0f7fa 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -52,7 +52,7 @@ in { }; Service = { Type = "simple"; - ExecStart = "${cfg.package}/bin/lan-mouse --daemon"; + ExecStart = "${cfg.package}/bin/lan-mouse daemon"; }; Install.WantedBy = [ (lib.mkIf config.wayland.windowManager.hyprland.systemd.enable "hyprland-session.target") @@ -65,7 +65,7 @@ in { config = { ProgramArguments = [ "${cfg.package}/bin/lan-mouse" - "--daemon" + "daemon" ]; KeepAlive = true; }; diff --git a/service/lan-mouse.service b/service/lan-mouse.service index 4b1e6f4..384b669 100644 --- a/service/lan-mouse.service +++ b/service/lan-mouse.service @@ -6,7 +6,7 @@ After=graphical-session.target BindsTo=graphical-session.target [Service] -ExecStart=/usr/bin/lan-mouse --daemon +ExecStart=/usr/bin/lan-mouse daemon Restart=on-failure [Install]