alpha
Login
or
Join now
seanaye.bsky.social
/
nixos-config
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
me like nix
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
add claude code notify hook
author
Sean Aye
date
3 months ago
(Mar 22, 2026, 8:03 PM -0400)
commit
c068d4f5
c068d4f53989dcb6ad5589ce6a8958fd1621f7a8
parent
d114f55a
d114f55a743a3fa2d8766105f82e6af90c37dfef
change-id
tlxzpoll
tlxzpollxolmuxpqrxmlyxvxtlrmnuql
+27
-3
2 changed files
Expand all
Collapse all
Unified
Split
hosts
common
home.nix
packages
zjctl.nix
+23
-2
hosts/common/home.nix
Reviewed
···
63
63
zjctl # Programmatic Zellij control
64
64
(pkgs.writeShellScriptBin "claude-notify" ''
65
65
PANE_ID="$ZELLIJ_PANE_ID"
66
66
+
SESSION="$ZELLIJ_SESSION_NAME"
66
67
(
67
68
ACTION=$(${pkgs.libnotify}/bin/notify-send "Claude Code" "Waiting for your approval" \
68
69
--app-name=claude-code \
69
70
--action=default=Open \
70
71
--wait)
71
72
if [ "$ACTION" = "default" ]; then
72
72
-
niri msg action focus-window --app-id Alacritty
73
73
+
WIN_ID=$(niri msg windows | ${pkgs.gnugrep}/bin/grep -B1 "$SESSION" | ${pkgs.gnugrep}/bin/grep -oP '(?<=Window ID )\d+')
74
74
+
if [ -n "$WIN_ID" ]; then
75
75
+
niri msg action focus-window --id "$WIN_ID"
76
76
+
fi
73
77
zjctl pane focus --pane "id:terminal:$PANE_ID"
74
78
fi
75
79
) &
···
547
551
};
548
552
};
549
553
load_plugins = {
550
550
-
"file:${zrpc-wasm}/zrpc.wasm" = {};
554
554
+
"\"file:~/.config/zellij/plugins/zrpc.wasm\"" = {};
551
555
};
552
556
pane_frames = false;
553
557
show_startup_tips = false;
554
558
ui = {
555
559
pane_frames.hide_session_name = true;
556
560
};
561
561
+
};
562
562
+
};
563
563
+
564
564
+
xdg.configFile."zellij/plugins/zrpc.wasm".source = "${zrpc-wasm}/zrpc.wasm";
565
565
+
566
566
+
home.file.".claude/settings.json".text = builtins.toJSON {
567
567
+
enabledPlugins = {
568
568
+
"rust-analyzer-lsp@claude-plugins-official" = true;
569
569
+
"typescript-lsp@claude-plugins-official" = true;
570
570
+
};
571
571
+
hooks = {
572
572
+
Notification = [
573
573
+
{
574
574
+
matcher = "permission_prompt";
575
575
+
hooks = [{ type = "command"; command = "claude-notify"; }];
576
576
+
}
577
577
+
];
557
578
};
558
579
};
559
580
+4
-1
packages/zjctl.nix
Reviewed
···
8
8
9
9
src = pkgs.fetchurl {
10
10
url = "https://github.com/mrshu/zjctl/releases/download/v0.1.3/zjctl-x86_64-linux.tar.gz";
11
11
-
hash = "sha256-jtCvbfGg6hlzS9omUtiquATgLJbIsdz2yVVydzU+XV4=";
11
11
+
hash = "sha256-2O4LfV9+pXbVew1yryE3SumrGQcR77r6tBs6uTHH1Sg=";
12
12
};
13
13
14
14
sourceRoot = ".";
15
15
+
16
16
+
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
17
17
+
buildInputs = [ pkgs.gcc-unwrapped.lib ];
15
18
16
19
installPhase = ''
17
20
install -Dm755 zjctl $out/bin/zjctl