From b1728e2d68d2297437d982b74fe3ac0c331eef2c Mon Sep 17 00:00:00 2001
From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>
Date: Sun, 28 Sep 2025 10:02:49 +0900
Subject: modified snippets/journal.lua, modified shell/bm-dirs, created
snippets/journal.lua
---
.../TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua | 119 +++++++++++++++++++++
.../TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua | 40 ++++++-
mac/.config/shell/bm-dirs | 1 +
3 files changed, 157 insertions(+), 3 deletions(-)
create mode 100644 ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua
new file mode 100644
index 0000000..22e0dad
--- /dev/null
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua
@@ -0,0 +1,119 @@
+local ls = require("luasnip")
+
+local s = ls.snippet
+local i = ls.insert_node
+local t = ls.text_node
+local c = ls.choice_node
+local f = ls.function_node
+
+local fmt = require("luasnip.extras.fmt").fmta
+
+-- get weather from wttr.in
+local function get_weather()
+ local q = os.getenv("JOURNAL_WEATHER_QUERY")
+ local url = q and ("wttr.in/" .. q .. "?format=1") or "wttr.in/?format=1"
+ local handle = io.popen(("curl -m 2 -s '%s'"):format(url))
+ if not handle then
+ return ""
+ end
+ local result = handle:read("*a") or ""
+ handle:close()
+ return (result:gsub("[\r\n]", ""))
+end
+
+local journal_snippet = s(
+ "journal",
+ fmt(
+ [[---
+title:
+date:
+tags: [diary, journal]
+mood:
+weather:
+---
+
+# Daily Journal
+
+## Diary (Personal Events & Feelings)
+
+- What happened today?
+
+- How did I feel?
+
+- Memorable moments
+
+
+## Journal (Learning & Reflections)
+
+- What I learned today
+
+- Challenges faced
+
+- Ideas & inspirations
+
+
+## Plans for Tomorrow
+
+-
+
+## Gratitude
+
+1.
+2.
+3.
+4.
+5.
+6.
+7.
+8.
+9.
+10.
+]],
+ {
+ title = i(1, "My Journal"),
+ date = f(function()
+ return os.date("%Y-%m-%d")
+ end, {}),
+ mood = c(2, {
+ i(nil, ""), -- default: manual input
+ t("😊 happy"),
+ t("😢 sad"),
+ t("😴 tired"),
+ t("😤 stressed"),
+ t("😌 relaxed"),
+ t("🤩 excited"),
+ t("😟 anxious"),
+ t("🎯 focused"),
+ t("😐 neutral"),
+ t("🙏 grateful"),
+ t("🤒 sick"),
+ t("😡 angry"),
+ t("🌊 calm"),
+ t("😵 overwhelmed"),
+ t("💪 motivated"),
+ t("🥱 bored"),
+ }),
+ weather = f(get_weather, {}),
+ happened = i(3),
+ feeling = i(4),
+ moments = i(5),
+ learned = i(6),
+ challenges = i(7),
+ ideas = i(8),
+ plans = i(9),
+ gratitude1 = i(10),
+ gratitude2 = i(11),
+ gratitude3 = i(12),
+ gratitude4 = i(13),
+ gratitude5 = i(14),
+ gratitude6 = i(15),
+ gratitude7 = i(16),
+ gratitude8 = i(17),
+ gratitude9 = i(18),
+ gratitude10 = i(19),
+ }
+ )
+)
+
+ls.add_snippets("markdown", { journal_snippet })
+ls.add_snippets("quarto", { journal_snippet })
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua
index e966924..22e0dad 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua
@@ -35,20 +35,39 @@ weather:
# Daily Journal
## Diary (Personal Events & Feelings)
+
- What happened today?
+
- How did I feel?
+
- Memorable moments
+
## Journal (Learning & Reflections)
+
- What I learned today
+
- Challenges faced
+
- Ideas & inspirations
+
## Plans for Tomorrow
+
-
## Gratitude
--
+
+1.
+2.
+3.
+4.
+5.
+6.
+7.
+8.
+9.
+10.
]],
{
title = i(1, "My Journal"),
@@ -75,8 +94,23 @@ weather:
t("🥱 bored"),
}),
weather = f(get_weather, {}),
- plans = i(3),
- gratitude = i(4),
+ happened = i(3),
+ feeling = i(4),
+ moments = i(5),
+ learned = i(6),
+ challenges = i(7),
+ ideas = i(8),
+ plans = i(9),
+ gratitude1 = i(10),
+ gratitude2 = i(11),
+ gratitude3 = i(12),
+ gratitude4 = i(13),
+ gratitude5 = i(14),
+ gratitude6 = i(15),
+ gratitude7 = i(16),
+ gratitude8 = i(17),
+ gratitude9 = i(18),
+ gratitude10 = i(19),
}
)
)
diff --git a/mac/.config/shell/bm-dirs b/mac/.config/shell/bm-dirs
index 1e44f25..5e6af13 100644
--- a/mac/.config/shell/bm-dirs
+++ b/mac/.config/shell/bm-dirs
@@ -111,4 +111,5 @@ ts ${XDG_DATA_HOME:-${HOME}/.local/share}/thesiah
tt ${XDG_STATE_HOME:-${HOME}/.local/state}
web ${THESIAH_WWW:-${HOME}/Private/repos/THESIAH}
wep ${THESIAH_WWW:-${HOME}/Private/repos/THESIAH}/public
+wer ${THESIAH_WWW:-${HOME}/Private/repos/THESIAH}/content/recordings
wes ${THESIAH_WWW:-${HOME}/Private/repos/THESIAH}/static
--
cgit v1.2.3