Compare commits

...

2 commits

4 changed files with 58 additions and 1 deletions

View file

@ -22,6 +22,7 @@
EDITOR = "nvim";
TERMINAL = "foot";
WINEPREFIX = "$HOME/.local/share/wineprefix/default";
SECOND_BRAIN = "$HOME/docs/sb";
};
# Let Home Manager install and manage itself.

View file

@ -0,0 +1,52 @@
#!/usr/bin/env sh
if [ $# -eq 0 ]; then
cd "$SECOND_BRAIN"/notes || exit 1
nvim .
exit 0
fi
open_file() {
cd "$SECOND_BRAIN"/notes || exit 1
nvim "${1}.md"
}
remove_file() {
cd "$SECOND_BRAIN"/notes || exit 1
if [ -f "${1}.md" ]; then
rm "${1}.md"
else
echo "File didn't exist"
fi
}
list_notes() {
cd "$SECOND_BRAIN"/notes || exit 1
eza --icons always --git --group-directories-first -l
}
if [ $# -eq 1 ]; then
case "$1" in
"-l")
list_notes
exit 0
;;
*)
open_file "$1"
exit 0
;;
esac
elif [ $# -ne 2 ]; then
echo "You need to provide action and file name."
exit 1
fi
case "$1" in
"-d")
remove_file "$2"
exit 0
;;
*)
exit 1
;;
esac

View file

@ -27,5 +27,9 @@ with pkgs;
# Add dependencies for optimise-vid script
wrapProgram $out/bin/optimise-vid \
--prefix PATH : ${lib.makeBinPath [ffmpeg cudatoolkit]}
# Add dependencis for note script
wrapProgram $out/bin/note \
--prefix PATH : ${lib.makeBinPath [eza]}
'';
}

View file

@ -132,10 +132,10 @@ in {
exec = [
# Fix laptop monitor getting turned on while my external monitor connected
"hyprctl monitors | grep 'HDMI' && hyprctl keyword monitor 'eDP-1, disable'"
"pkill waybar; waybar" # Kill waybar and start new instance because everytime hyprland restarts breaks waybar
];
exec-once = [
"waybar" # Start waybar on start
"wl-paste --type text --watch cliphist store" # Stores only text data
"wl-paste --type image --watch cliphist store" # Stores only image data
"keepassxc" # Startup my password manager