feat(mouse-actions): add play-pause action

This commit is contained in:
toast 2025-11-09 21:29:36 +09:00
parent e9f087deed
commit 2c642a7e32
4 changed files with 12 additions and 0 deletions

View file

@ -5,4 +5,5 @@
deafen = import ./deafen.nix { inherit pkgs; };
sober-lag = import ./sober-lag.nix { inherit pkgs; };
flick = import ./flick.nix { inherit pkgs; };
play-pause = import ./play-pause.nix { inherit pkgs; };
}

View file

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
package = pkgs.writeShellScriptBin "play-pause-action" ''
${pkgs.playerctl}/bin/playerctl play-pause
'';
}

View file

@ -15,6 +15,7 @@
"deafen") NEW_ACTION="sober-lag" ;;
"sober-lag") NEW_ACTION="autoclick" ;;
"autoclick") NEW_ACTION="flick" ;;
"flick") NEW_ACTION="play-pause" ;;
*) NEW_ACTION="deafen"
esac

View file

@ -23,6 +23,9 @@
"flick")
${pkgs.systemd}/bin/systemd-run --user ${actions.flick.package}/bin/flick-action
;;
"play-pause")
${pkgs.systemd}/bin/systemd-run --user ${actions.play-pause.package}/bin/play-pause-action
;;
esac
'';
}