From bcd478bfaa2e91bd4a0946e5aad775cf65e95f1d Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 22 Feb 2019 12:53:13 +0100 Subject: Support terminal tasks in tasker --- gui/pkgs/tasker.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gui/pkgs') diff --git a/gui/pkgs/tasker.nix b/gui/pkgs/tasker.nix index 2382be2..e967382 100644 --- a/gui/pkgs/tasker.nix +++ b/gui/pkgs/tasker.nix @@ -5,10 +5,13 @@ pkgs.lib.mapAttrsToList (name: value: let name = "tasker_cmd_" + name; executable = true; destination = "/bin/tasker_cmd_" + name; - text = '' + text = if value.terminal then '' + #!/bin/sh + exec ${pkgs.kitty}/bin/kitty -d ${value.directory} ${value.command} + '' else '' #!/bin/sh - pushd ${toString value.directory} - exec ${toString value.command} + pushd ${value.directory} + exec ${value.command} popd ''; }; @@ -19,8 +22,8 @@ pkgs.lib.mapAttrsToList (name: value: let text = '' [Desktop Entry] Type=Application - Name=${toString value.description} - Exec=${command}/bin/tasker_cmd_${toString name} + Name=${value.description} + Exec=${command}/bin/tasker_cmd_${name} Terminal=false ''; }; -- cgit v1.2.3