This probably doesn't work as I don't pass stdin through just, but as a draft, run jupyter in helix!

This commit is contained in:
Lillian Violet 2024-10-23 13:58:45 +02:00
parent f9471f0bcf
commit eda608dac0

View file

@ -16,6 +16,31 @@
zellij action toggle-floating-panes
zellij action close-pane
'';
jupyter =
pkgs.writeText "run_jupyter_from_helix.zsh"
''
#! ~/.nix-profile/bin/zsh
function new() {
new=true;
touch /tmp/rjh;
cat /tmp/rjh | while read line
do
if $(pwd) = line; then
new=false;
fi
done
echo new;
}
function send_to_jupyter() {
if $(new); then
zellij run -f -n "jupyter console" jupyter console --kernel="$1" -f="/tmp/rjh-$(pwd).json" --ZMQTerminalInteractiveShell.include_other_output=True --ZMQTerminalInteractiveShell.other_output_prefix=\'\'
pwd >> /tmp/rjh
fi
zellij write 29 25 # send ctr + w
just send
}
'';
in {
programs.helix = {
enable = true;
@ -29,6 +54,7 @@ in {
t = ":sh zellij run -f -n 'test code' -- direnv exec . just test";
g = ":sh zellij run -fc -n 'lazygit' -- lazygit";
f = ":sh zellij run --floating -n 'yazi picker' -- zsh ~/.config/helix/open_in_helix_from_yazi.zsh ";
j = ":pipe-to just jupyter";
};
editor = {
line-number = "relative";