Skip to content

Commit

Permalink
add python bin and integrate session_recording
Browse files Browse the repository at this point in the history
  • Loading branch information
allthatjazzleo committed Feb 29, 2024
1 parent 7e4d1eb commit 079a218
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
36 changes: 31 additions & 5 deletions cells/homemanager/programs/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
};
history = {size = 100000;};
initExtraFirst = ''
# python
for dir in $(ls -rd $HOME/Library/Python/*); do
export PATH="$dir/bin:$PATH"
done
# End python
# Cargo
export PATH="$HOME/.cargo/bin:$PATH"
# End Cargo
Expand All @@ -56,11 +61,32 @@
export PATH="$HOME/.krew/bin:$PATH"
# End krew
'';
initExtra = ''
bindkey '^f' autosuggest-accept
# agenix
export EDITOR="vim"
'';
initExtra =
''
bindkey '^f' autosuggest-accept
# agenix
export EDITOR="vim"
''
+ (
if builtins.hasAttr "session_recording" user && user.session_recording
then ''
# Check if we are currently in an asciinema session
if [[ -z "$ASCIINEMA_REC" ]]; then
# Set the environment variable to indicate the recording is in progress
export ASCIINEMA_REC=1
# Define where to save the asciinema recording files
ASCIINEMA_DIR="$HOME/.asciinema"
mkdir -p "$ASCIINEMA_DIR"
# Generate a unique filename for each session
FILENAME="$ASCIINEMA_DIR/session_$(date "+%Y-%m-%d_%H-%M-%S").cast"
# Start recording with asciinema
asciinema rec "$FILENAME"
fi
''
else ""
);
};

fzf = {
Expand Down
1 change: 1 addition & 0 deletions cells/users/users.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ in {
ageIdentityPaths = ["~/.ssh/id_ed25519_homemanager"];
# zsh = false; # programs
java = true;
session_recording = false;
};
workuser = {
email = "[email protected]";
Expand Down

0 comments on commit 079a218

Please sign in to comment.