Compare commits
4 Commits
7ce24d937c
...
68ea0a3eda
Author | SHA1 | Date | |
---|---|---|---|
68ea0a3eda | |||
2be2b6b7e5 | |||
3c7c565b8d | |||
22a1922ce9 |
@ -75,6 +75,7 @@
|
||||
EDITOR = "nvim";
|
||||
BROWSER = "qutebrowser";
|
||||
TERMINAL = "alacritty";
|
||||
SECOND_BRAIN = "$HOME/Documents/sb";
|
||||
};
|
||||
|
||||
# Fix environmental variables not loaded in plasma x11
|
||||
|
@ -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 ]}
|
||||
'';
|
||||
|
44
home-manager/modules/scripts/day
Executable file
44
home-manager/modules/scripts/day
Executable 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"
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user