aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-02-22 12:53:13 +0100
committerAdrian Kummerlaender2019-02-22 12:53:13 +0100
commitbcd478bfaa2e91bd4a0946e5aad775cf65e95f1d (patch)
tree3ce583a1e655643a99fab25820f6f0540a399f14
parent112db5f0e456a34c959aafed3cf16ba500a1821a (diff)
downloadnixos_home-bcd478bfaa2e91bd4a0946e5aad775cf65e95f1d.tar
nixos_home-bcd478bfaa2e91bd4a0946e5aad775cf65e95f1d.tar.gz
nixos_home-bcd478bfaa2e91bd4a0946e5aad775cf65e95f1d.tar.bz2
nixos_home-bcd478bfaa2e91bd4a0946e5aad775cf65e95f1d.tar.lz
nixos_home-bcd478bfaa2e91bd4a0946e5aad775cf65e95f1d.tar.xz
nixos_home-bcd478bfaa2e91bd4a0946e5aad775cf65e95f1d.tar.zst
nixos_home-bcd478bfaa2e91bd4a0946e5aad775cf65e95f1d.zip
Support terminal tasks in tasker
-rw-r--r--gui/pkgs/tasker.nix13
-rw-r--r--gui/tasker.nix8
2 files changed, 16 insertions, 5 deletions
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
'';
};
diff --git a/gui/tasker.nix b/gui/tasker.nix
index 0805ac8..43a40df 100644
--- a/gui/tasker.nix
+++ b/gui/tasker.nix
@@ -5,11 +5,19 @@ let
"bsc_edit" = {
description = "Grid refinement BSc thesis editor";
directory = "~/university/documents/bachelor/arbeit";
+ terminal = false;
command = "nix-shell --run 'nvim-qt --no-ext-tabline'";
};
+ "bsc_shell" = {
+ description = "Grid refinement BSc thesis shell";
+ directory = "~/university/documents/bachelor/arbeit";
+ terminal = true;
+ command = "nix-shell --command fish";
+ };
"bsc_view" = {
description = "Grid refinement BSc thesis PDF";
directory = "~/university/documents/bachelor/arbeit";
+ terminal = false;
command = "evince build/main.pdf";
};
};