Compare commits

..

4 Commits

Author SHA1 Message Date
68ea0a3eda Remove unneded aliases. 2024-03-23 21:33:36 +01:00
2be2b6b7e5 Rework scripts module. 2024-03-23 21:33:18 +01:00
3c7c565b8d Add new variable. 2024-03-23 21:33:09 +01:00
22a1922ce9 Add new script, move blog to better path. 2024-03-23 21:33:00 +01:00
5 changed files with 55 additions and 9 deletions

View File

@ -75,6 +75,7 @@
EDITOR = "nvim";
BROWSER = "qutebrowser";
TERMINAL = "alacritty";
SECOND_BRAIN = "$HOME/Documents/sb";
};
# Fix environmental variables not loaded in plasma x11

View File

@ -2,15 +2,20 @@
with pkgs;
stdenv.mkDerivation {
pname = "blog";
pname = "scripts";
version = "1";
src = ./scripts/blog;
src = ./scripts;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
mv blog $out/bin/blog
patchShebangs $out/bin/blog
# Move scripts to bin
mv ./* $out/bin
# Fix shebangs for the scripts
patchShebangs $out/bin
# Add dependencies to the runtime for my blog script
wrapProgram $out/bin/blog \
--prefix PATH : ${lib.makeBinPath [ hugo rsync git ]}
'';

View File

@ -0,0 +1,44 @@
#!/usr/bin/env sh
# Based on day script from mischavandenburg
# url: https://github.com/mischavandenburg/dotfiles/blob/main/scripts/day
today=$(date +"%Y-%m-%d")
tomorrow=$(date -d "tomorrow" '+%Y-%m-%d')
yesterday=$(date -d "yesterday" '+%Y-%m-%d')
file="$SECOND_BRAIN"'/periodic/daily/'"$today.md"
cd "$SECOND_BRAIN" || exit 1
new_note() {
touch "$file"
# Give me a nice format
cat <<EOF >"$file"
# $today
[[$yesterday]] - [[$tomorrow]]
## Intention
What do I want to achieve today and tomorrow?
## Tracking
- [ ] Cycle
- [ ] Strength training
- [ ] Watch a movie or tv show episode
- [ ] Play/finish a game
- [ ] Post a blog post
- [ ] Check servers
- [ ] Check backups
## Log
EOF
}
if [ ! -f "$file" ]; then
new_note
fi
nvim '+ normal Gzzo' "$file"

View File

@ -6,11 +6,7 @@
enableCompletion = true;
history.path = "${config.xdg.dataHome}/zsh/history";
dotDir = ".config/zsh";
shellAliases = {
note = "cd ~/Documents/wiki && nvim ~/Documents/wiki/notes.md";
wiki = "cd ~/Documents/wiki && nvim ~/Documents/wiki/index.md";
lg = "lazygit";
};
shellAliases = { lg = "lazygit"; };
envExtra = ''
# NNN settings
export NNN_FIFO="/tmp/nnn.fifo"