Skip to content

Commit 6318bd5

Browse files
committed
Going towards last TODO entry
• ADD structured description for methods. • ADD snippet for description. • ADD len module. • ADD hyprlink module. • ADD ends-with module. • ADD super variable kirei_docs_url. • RENAME trim-char, it now behaves like python strip method. • FIX get-package-manager to use correct dependency. • MOVE confirm-reboot to separate plugin module.
1 parent cc48dc0 commit 6318bd5

7 files changed

Lines changed: 279 additions & 79 deletions

File tree

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.0
1+
0.9.1

.vscode/snippets.code-snippets

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"Function Template ": {
3+
"prefix": "function",
4+
"scope": "shellscript",
5+
"body": [
6+
"",
7+
"#",
8+
"#",
9+
"#---------------------------------------------------------------------------------",
10+
"# NAME: ${1:Function-Name}",
11+
"# DESC: ${2:Function-Description.}",
12+
"# USAGE: ${1:Function-Name} ${3:<arguments>}",
13+
"# ${4:FLAGS:}",
14+
"#${5: -1st,--full1st flag desc}.",
15+
"#---------------------------------------------------------------------------------",
16+
"${1:Function-Name}() {",
17+
"",
18+
"$0",
19+
"}",
20+
]
21+
}
22+
}

bin/kireisakura

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,13 @@ init() {
191191

192192
kit_version=$(cat "$kirei_dir"/.version)
193193

194-
# Output environment variable setup commands
194+
# Output SUPER variables
195195
printf "kirei_dir=\"%s\"\n" "$kirei_dir"
196196
printf "kirei_core_dir=\"%s\"\n" "$kirei_core_dir"
197197
printf "kirei_core=\"%s\"\n" "$kirei_core"
198198
printf "kirei_module_dir=\"%s\"\n" "$kirei_module_dir"
199199
printf "kirei_assets_dir=\"%s\"\n" "$kirei_assets_dir"
200+
printf "kirei_docs_url=\"%s\"\n" "$docs_url"
200201

201202
printf "kirei_project_name=\"%s\"\n" "$project_name"
202203
printf "kirei_cache_dir=\"%s\"\n" "$cache_dir"
@@ -237,6 +238,7 @@ run_tester() {
237238
#_________________________________INITIALISATION_____________________________________________
238239

239240
upstream_ver_url="${UPSTREAM_VERSION_URL:-https://raw.githubusercontent.com/soymadip/KireiSakura-Kit/main/.version}"
241+
docs_url="https://kireisakura.soymadip.me"
240242

241243
# Initialize variables
242244
kirei_dir="$HOME/.local/share/KireiSakura-Kit"

core/logging.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#
2+
#
3+
#--------------------------------------------------------------------------
4+
# Name: logger
5+
# Desc: Logs the message to the console and log file.
6+
# USAGE: logger <arguments>
7+
# ARGS:
8+
# - log_level: The log level of the message. (error, warn, success, info)
9+
# - log_message: The message to log.
10+
# - extra_info: Extra information to log.
11+
# FIXME:
12+
# \t is putting space after log symbol.
13+
# hyprlink is putting color code when using.
14+
#--------------------------------------------------------------------------
115
logger() {
216
local log_level=$1
317
local log_message=$2
@@ -22,7 +36,7 @@ logger() {
2236
esac
2337

2438
if starts-with "\n" "$log_message"; then
25-
log_message=$(trim-char "\n" "$log_message")
39+
log_message=$(strip "\n" "$log_message")
2640
echo ""
2741
echo -e "[$(date '+%Y.%m.%d %H:%M:%S')] " >>"$kirei_log_file"
2842
fi
@@ -48,8 +62,8 @@ logger() {
4862
fi
4963

5064
{
51-
echo -e "$formatted_message" &&
52-
echo -e "[$(date +"%Y.%m.%d %H:%M:%S")] [$log_level] $log_message" >>"$kirei_log_file"
65+
echo -e "$formatted_message" &&
66+
echo -e "[$(date +"%Y.%m.%d %H:%M:%S")] [$log_level] $log_message" >>"$kirei_log_file"
5367
} && return 0 || return 1
5468
}
5569

0 commit comments

Comments
 (0)