summaryrefslogtreecommitdiff
path: root/home/zsh/watch-while.nix
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2024-12-04 12:10:33 +0100
committerLinnnus <[email protected]>2024-12-06 08:31:58 +0100
commite9a101ee0855ffe760dfee6a3bb59361c9c528ef (patch)
tree8f04eaec9fc96028ef794a832135291a4e84189b /home/zsh/watch-while.nix
parentb3cf126be6d25c4364b63f69b3edcb2b531b021e (diff)
Revert "home/zsh+pkgs: Add watch-while for long commands lol"
This reverts commit 3824d4d797d39bd6f2dee3655027a79713ef400c. Turned out to actually just be really annoying. Funny joke though.
Diffstat (limited to 'home/zsh/watch-while.nix')
-rw-r--r--home/zsh/watch-while.nix25
1 files changed, 0 insertions, 25 deletions
diff --git a/home/zsh/watch-while.nix b/home/zsh/watch-while.nix
deleted file mode 100644
index ec42e13..0000000
--- a/home/zsh/watch-while.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-# This module configures some ZSH aliases such that 'watch-while' is invoked
-{
- pkgs,
- lib,
- ...
-}: let
- # Program to invoke for long-running commands.
- pkg = pkgs.watch-while;
-
- # Prorams to wrap with watch-while.
- toWrap = ["nixos-rebuild" "darwin-rebuild" "nmap"];
-in {
- # Alias long-running commands to their prefixed versions. These aliases are
- # only loaded for interactive use, so they won't mess with scripts.
- programs.zsh.shellAliases =
- lib.genAttrs toWrap (p: "${pkg}/bin/${pkg.pname} ${p}")
- # Enable alias expansion after sudo with this trick.
- // {
- "sudo" = "sudo ";
- "ww" = "watch-while ";
- };
-
- # Also add the program to the environment for manual invocation.
- home.packages = [pkg];
-}