From 6749d1003f4652338a8c0b684de06cd948ce468b Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sat, 19 Nov 2022 22:16:05 +0100 Subject: [PATCH] Add quick note creating script --- home/.config/hypr/hyprland.conf | 2 ++ home/.local/bin/scripts/cli/mknote | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 home/.local/bin/scripts/cli/mknote diff --git a/home/.config/hypr/hyprland.conf b/home/.config/hypr/hyprland.conf index 8e99b35..c54a2a1 100644 --- a/home/.config/hypr/hyprland.conf +++ b/home/.config/hypr/hyprland.conf @@ -165,6 +165,8 @@ bind = SUPER, X, exec, pcmanfm bind = SUPER, B, exec, firefox bind = SUPER, C, exec, qalculate-gtk bind = , XF86Calculator, exec, qalculate-gtk +bind = SUPER, N, exec, [float] alacritty -e mknote +bind = SUPER_SHIFT, N, exec, [float] alacritty -e lvim ~/TODO # Notifications bind = CTRL, grave, exec, dunstctl close diff --git a/home/.local/bin/scripts/cli/mknote b/home/.local/bin/scripts/cli/mknote new file mode 100755 index 0000000..fc287dd --- /dev/null +++ b/home/.local/bin/scripts/cli/mknote @@ -0,0 +1,13 @@ +#!/bin/sh + +file="$HOME/Personal/Notes/note-$(date +%Y-%m-%d).md" + +if [ ! -f "$file" ]; then + echo "# Notes for $(date +%Y-%m-%d)" > "$file" +fi + +lvim -c "norm Go" \ + -c "norm Go## $(date +%H:%M)" \ + -c "norm G2o" \ + -c "norm zz" \ + -c "startinsert" "$file"