mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-12-10 03:49:44 +00:00
refactor(mouse-actions): use absolute paths
This commit is contained in:
parent
1c99f9d063
commit
e9f087deed
6 changed files with 42 additions and 72 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, actions }:
|
||||
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "run-mouse-action" ''
|
||||
{
|
||||
package = pkgs.writeShellScriptBin "run-mouse-action" ''
|
||||
STATE_FILE="$HOME/.config/mouse-actions/state"
|
||||
|
||||
if [ ! -f "$STATE_FILE" ]; then
|
||||
|
|
@ -12,23 +12,17 @@ let
|
|||
|
||||
case "$ACTION_NAME" in
|
||||
"deafen")
|
||||
systemd-run --user ${actions.deafen.package}/bin/deafen-action
|
||||
${pkgs.systemd}/bin/systemd-run --user ${actions.deafen.package}/bin/deafen-action
|
||||
;;
|
||||
"sober-lag")
|
||||
systemd-run --user ${actions.sober-lag.package}/bin/sober-lag-action
|
||||
${pkgs.systemd}/bin/systemd-run --user ${actions.sober-lag.package}/bin/sober-lag-action
|
||||
;;
|
||||
"autoclick")
|
||||
systemd-run --user ${actions.autoclick.package}/bin/autoclick-action
|
||||
${pkgs.systemd}/bin/systemd-run --user ${actions.autoclick.package}/bin/autoclick-action
|
||||
;;
|
||||
"flick")
|
||||
systemd-run --user ${actions.flick.package}/bin/flick-action
|
||||
${pkgs.systemd}/bin/systemd-run --user ${actions.flick.package}/bin/flick-action
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
in
|
||||
{
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "run-mouse-action";
|
||||
paths = [ script pkgs.systemd ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue