aboutsummaryrefslogtreecommitdiff
path: root/gui/pkgs
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-02-21 22:07:25 +0100
committerAdrian Kummerlaender2019-02-21 22:08:42 +0100
commitfcd7bb539aa6930d7cba8381bc9a3b6608ad6393 (patch)
tree7edf1abd0975deb7479e958d379376fe90c3642e /gui/pkgs
parentace68795852046efab4918bfe25572c1978d5ed7 (diff)
downloadnixos_home-fcd7bb539aa6930d7cba8381bc9a3b6608ad6393.tar
nixos_home-fcd7bb539aa6930d7cba8381bc9a3b6608ad6393.tar.gz
nixos_home-fcd7bb539aa6930d7cba8381bc9a3b6608ad6393.tar.bz2
nixos_home-fcd7bb539aa6930d7cba8381bc9a3b6608ad6393.tar.lz
nixos_home-fcd7bb539aa6930d7cba8381bc9a3b6608ad6393.tar.xz
nixos_home-fcd7bb539aa6930d7cba8381bc9a3b6608ad6393.tar.zst
nixos_home-fcd7bb539aa6930d7cba8381bc9a3b6608ad6393.zip
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
Diffstat (limited to 'gui/pkgs')
-rw-r--r--gui/pkgs/tasker.nix19
1 files changed, 19 insertions, 0 deletions
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
+ '';
+}