summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-28 10:02:49 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-28 10:02:49 +0900
commitb1728e2d68d2297437d982b74fe3ac0c331eef2c (patch)
tree449e7d49933bf8adabcba8d44efba4e508420264
parent27dc4b4270481f7da877b31f122c03e6c0751811 (diff)
modified snippets/journal.lua, modified shell/bm-dirs, created snippets/journal.lua
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua119
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/journal.lua40
-rw-r--r--mac/.config/shell/bm-dirs1
3 files changed, 157 insertions, 3 deletions
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: <title>
+date: <date>
+tags: [diary, journal]
+mood: <mood>
+weather: <weather>
+---
+
+# Daily Journal
+
+## Diary (Personal Events & Feelings)
+
+- What happened today?
+ <happened>
+- How did I feel?
+ <feeling>
+- Memorable moments
+ <moments>
+
+## Journal (Learning & Reflections)
+
+- What I learned today
+ <learned>
+- Challenges faced
+ <challenges>
+- Ideas & inspirations
+ <ideas>
+
+## Plans for Tomorrow
+
+- <plans>
+
+## Gratitude
+
+1. <gratitude1>
+2. <gratitude2>
+3. <gratitude3>
+4. <gratitude4>
+5. <gratitude5>
+6. <gratitude6>
+7. <gratitude7>
+8. <gratitude8>
+9. <gratitude9>
+10. <gratitude10>
+]],
+ {
+ 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: <weather>
# Daily Journal
## Diary (Personal Events & Feelings)
+
- What happened today?
+ <happened>
- How did I feel?
+ <feeling>
- Memorable moments
+ <moments>
## Journal (Learning & Reflections)
+
- What I learned today
+ <learned>
- Challenges faced
+ <challenges>
- Ideas & inspirations
+ <ideas>
## Plans for Tomorrow
+
- <plans>
## Gratitude
-- <gratitude>
+
+1. <gratitude1>
+2. <gratitude2>
+3. <gratitude3>
+4. <gratitude4>
+5. <gratitude5>
+6. <gratitude6>
+7. <gratitude7>
+8. <gratitude8>
+9. <gratitude9>
+10. <gratitude10>
]],
{
title = i(1, "My Journal"),
@@ -75,8 +94,23 @@ weather: <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