From fcd7bb539aa6930d7cba8381bc9a3b6608ad6393 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 21 Feb 2019 22:07:25 +0100 Subject: Improvise rofi task launcher `tasker` opens a rofi selection of all scripts found in `~/.local/share/tasks`. This is useful for launching e.g. project specific nix-shells, vim instances and so on. Actual tasks are not included at this point as they are still quite rudimentary. This vision is that this develops into a Nix and XMonad integrated project manager that: * Automatically clones the project repository if it is not already available * Allows for (optional) central management of nix-shell derivations * Allows for easy isolation of project-specific UI utilities * Enables convenient launching of build and test scripts --- gui/pkgs/tasker.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gui/pkgs/tasker.nix (limited to 'gui/pkgs') diff --git a/gui/pkgs/tasker.nix b/gui/pkgs/tasker.nix new file mode 100644 index 0000000..a198cb8 --- /dev/null +++ b/gui/pkgs/tasker.nix @@ -0,0 +1,19 @@ +{ stdenv, pkgs, ... }: + +pkgs.writeTextFile { + name = "tasker"; + executable = true; + destination = "/bin/tasker"; + + text = with pkgs; '' + #!${fish}/bin/fish + + pushd ~/.local/share/tasks + set task (find . -executable -type f | cut -c3- | rofi -dmenu -p "task") + + if test $status -eq 0 + eval $task + end + popd + ''; +} -- cgit v1.2.3