Skip to content

Commit 02f7ec8

Browse files
committed
2026-02-18
1 parent e9a3d72 commit 02f7ec8

8 files changed

Lines changed: 194 additions & 33 deletions

File tree

os-unix/config-shell/.config/sh/modules/func-override.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ unlink() {
151151

152152
_exit_code=0
153153
for _file; do
154+
if [ ! -h "$_file" ]; then
155+
_util_log_warn "Skipping non-symbolic link: \"$_file\""
156+
continue
157+
fi
154158
command unlink "${_file%/}"
155159
_code=$?
156160
if (($_code > 0)); then
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
trees:
2+
.github:
3+
url: 'git@github.com:bash-bastion/.github'
4+
path: '.github'
5+
default-remote: 'me'
6+
7+
basalt:
8+
url: 'git@github.com:bash-bastion/basalt'
9+
path: 'basalt'
10+
default-remote: 'me'
11+
12+
bash-term:
13+
url: 'git@github.com:bash-bastion/bash-term'
14+
path: 'bash-term'
15+
default-remote: 'me'
16+
17+
bash-object:
18+
url: 'git@github.com:bash-bastion/bash-object'
19+
path: 'bash-object'
20+
default-remote: 'me'
21+
22+
bash-json:
23+
url: 'git@github.com:bash-bastion/bash-json'
24+
path: 'bash-json'
25+
default-remote: 'me'
26+
27+
bash-toml:
28+
url: 'git@github.com:bash-bastion/bash-toml'
29+
path: 'bash-toml'
30+
default-remote: 'me'
31+
32+
bash-args:
33+
url: 'git@github.com:bash-bastion/bash-args'
34+
path: 'bash-args'
35+
default-remote: 'me'
36+
37+
bash-algo:
38+
url: 'git@github.com:bash-bastion/bash-algo'
39+
path: 'bash-algo'
40+
default-remote: 'me'
41+
42+
bash-core:
43+
url: 'git@github.com:bash-bastion/bash-core'
44+
path: 'bash-core'
45+
default-remote: 'me'
46+
47+
bash-tui:
48+
url: 'git@github.com:bash-bastion/bash-tui'
49+
path: 'bash-tui'
50+
default-remote: 'me'
51+
52+
bash-utility:
53+
url: 'git@github.com:bash-bastion/bash-utility'
54+
path: 'bash-utility'
55+
default-remote: 'me'
56+
57+
bash_config:
58+
url: 'git@github.com:bash-bastion/bash_config'
59+
path: 'bash_config'
60+
default-remote: 'me'
61+
62+
shelld:
63+
url: 'git@github.com:bash-bastion/shelld'
64+
path: 'shelld'
65+
default-remote: 'me'
66+
67+
awesome-basalt:
68+
url: 'git@github.com:bash-bastion/awesome-basalt'
69+
path: 'awesome-basalt'
70+
default-remote: 'me'
71+
72+
bats-all:
73+
url: 'git@github.com:bash-bastion/bats-all'
74+
path: 'bats-all'
75+
default-remote: 'me'
76+
77+
shelltest:
78+
url: 'git@github.com:bash-bastion/shelltest'
79+
path: 'shelltest'
80+
default-remote: 'me'
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
trees:
2+
scripts-nodejs:
3+
url: git@github.com:hyperupcall-self/scripts-nodejs
4+
default-remote: 'me'
5+
6+
prettier-config:
7+
url: git@github.com:hyperupcall-self/prettier-config
8+
default-remote: 'me'
9+
10+
prettier-plugin:
11+
url: git@github.com:hyperupcall-self/prettier-plugin
12+
default-remote: 'me'
13+
14+
eslint-config:
15+
url: git@github.com:hyperupcall-self/eslint-config
16+
default-remote: 'me'
17+
18+
eslint-plugin:
19+
url: git@github.com:hyperupcall-self/eslint-plugin
20+
default-remote: 'me'
21+
22+
stylelint-config:
23+
url: git@github.com:hyperupcall-self/stylelint-config
24+
default-remote: 'me'
25+
26+
stylelint-plugin:
27+
url: git@github.com:hyperupcall-self/stylelint-plugin
28+
default-remote: 'me'
29+
30+
markdownlint-config:
31+
url: git@github.com:hyperupcall-self/markdownlint-config
32+
default-remote: 'me'
33+
34+
config-utils:
35+
url: git@github.com:hyperupcall-self/config-utils
36+
default-remote: 'me'
37+
38+
lefthook-config:
39+
url: git@github.com:hyperupcall-self/lefthook-config
40+
default-remote: 'me'
41+
42+
hyperupcall-action:
43+
url: git@github.com:hyperupcall-self/hyperupcall-action
44+
default-remote: 'me'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
trees:
2+
tree-sitter-digrc:
3+
url: git@github.com:hyperupcall-experiments/tree-sitter-digrc
4+
default-remote: 'me'
5+
6+
tree-sitter-icalendar:
7+
url: git@github.com:hyperupcall-experiments/tree-sitter-icalendar
8+
default-remote: 'me'
9+
10+
zed-assorted-languages:
11+
url: git@github.com:hyperupcall-experiments/zed-assorted-languages
12+
default-remote: 'me'

os-unix/data/dotfiles.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ static Entry osc[] = ConfigEntry("osc/", CategoryTools);
271271
static Entry redshift[] = ConfigEntry("redshift/", CategoryTools);
272272
static Entry sheldon[] = ConfigEntry("sheldon/", CategoryTools);
273273
static Entry urlwatch[] = ConfigEntry("urlwatch/", CategoryTools);
274+
static Entry garden[] = ConfigEntry("garden/", CategoryTools);
275+
274276

275277
// Version Control.
276278
static Entry gh[] = ConfigEntry("gh/config.yml", CategoryVersionControl);
@@ -309,6 +311,7 @@ static Group defaultGroup = {
309311
alacritty,
310312
kitty,
311313
gh,
314+
garden,
312315
git,
313316
NULL
314317
}
@@ -453,6 +456,7 @@ static Group otherGroup = {
453456
redshift,
454457
sheldon,
455458
urlwatch,
459+
garden,
456460
hg,
457461
pijul,
458462
tig,

os-unix/scripts/doctor.sh

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,21 @@ main() {
119119
xdg-user-dirs-update --set MUSIC ~/Music
120120
xdg-user-dirs-update --set PICTURES ~/Pictures
121121
xdg-user-dirs-update --set VIDEOS ~/Videos
122+
else
123+
xdg-user-dirs-update --set DESKTOP ~/Desktop
124+
xdg-user-dirs-update --set DOWNLOAD ~/Downloads
125+
xdg-user-dirs-update --set TEMPLATES ~/Templates
126+
xdg-user-dirs-update --set PUBLICSHARE ~/Public
127+
xdg-user-dirs-update --set DOCUMENTS ~/Documents
128+
xdg-user-dirs-update --set MUSIC ~/Music
129+
xdg-user-dirs-update --set PICTURES ~/Pictures
130+
xdg-user-dirs-update --set VIDEOS ~/Videos
122131
fi
123132
if [[ $computer_profile == @(desktop|laptop) ]]; then
133+
must.dir "$HOME/Other/AppImages"
124134
must.link "$HOME/Other/AppImages" "$HOME/.dotfiles/.home/AppImages"
125135
else
136+
must.dir "$HOME/AppImages"
126137
must.link "$HOME/AppImages" "$HOME/.dotfiles/.home/AppImages"
127138
fi
128139

@@ -231,15 +242,17 @@ main() {
231242
fi
232243
must.strict_permissions ~/.gnupg/ ~/.gnupg/*
233244

234-
if gpg --list-keys 0x2FB93BF35E14E7C4 &>/dev/null; then
235-
core.print_info "Has gpg key \"Edwin Kofler (FOR PASSWORDS ONLY) <edwin@kofler.dev>\""
236-
else
237-
core.print_info "Does not have gpg key \"Edwin Kofler (FOR PASSWORDS ONLY) <edwin@kofler.dev>\""
238-
fi
239-
if gpg --list-keys 0x3851E5FD042C7C6C &>/dev/null; then
240-
core.print_info "Has gpg key \"Edwin Kofler <edwin@kofler.dev>\""
241-
else
242-
core.print_die "Does not have gpg key \"Edwin Kofler <edwin@kofler.dev>\""
245+
if [[ $computer_profile == @(desktop|laptop) ]]; then
246+
if gpg --list-keys 0x2FB93BF35E14E7C4 &>/dev/null; then
247+
core.print_info "Has gpg key \"Edwin Kofler (FOR PASSWORDS ONLY) <edwin@kofler.dev>\""
248+
else
249+
core.print_info "Does not have gpg key \"Edwin Kofler (FOR PASSWORDS ONLY) <edwin@kofler.dev>\""
250+
fi
251+
if gpg --list-keys 0x3851E5FD042C7C6C &>/dev/null; then
252+
core.print_info "Has gpg key \"Edwin Kofler <edwin@kofler.dev>\""
253+
else
254+
core.print_die "Does not have gpg key \"Edwin Kofler <edwin@kofler.dev>\""
255+
fi
243256
fi
244257
}
245258

os-unix/scripts/rare/homework.py

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import re
44
import sys
55
from datetime import datetime
6+
from pathlib import Path
67

78
parent_dir = os.path.basename(os.getcwd())
89

@@ -15,36 +16,39 @@
1516
sys.exit(1)
1617

1718
for root, _, files in os.walk('.'):
18-
for file in files:
19-
if not (file.endswith('.java') or file.endswith('.cpp')):
19+
for cur_filename in files:
20+
if not (cur_filename.endswith('.java') or cur_filename.endswith('.cpp')):
21+
continue
22+
if cur_filename != 'Main.java' and cur_filename != 'main.cpp':
2023
continue
2124

22-
today = datetime.now().strftime('%m/%d/%Y')
23-
current_file_path = os.path.join(root, file)
24-
25-
with open(current_file_path, 'r', encoding='utf-8') as f:
25+
cur_filepath = os.path.join(root, cur_filename)
26+
with open(cur_filepath, 'r', encoding='utf-8') as f:
2627
content = f.read()
2728

28-
original_content = content
29-
30-
base_name, extension = os.path.splitext(file)
31-
title_suffix = parent_dir
32-
title_suffix = title_suffix.replace('_in_cpp', '')
33-
title_suffix = title_suffix.replace('_in_java', '')
29+
base_name = (
30+
os.path.basename(os.path.dirname(cur_filepath))
31+
.replace('_in_cpp', '')
32+
.replace('_in_java', '')
33+
)
34+
new_filename = (
35+
f'{Path(cur_filepath).stem}_{base_name}{Path(cur_filepath).suffix}'
36+
)
37+
new_filepath = os.path.join(root, new_filename)
3438

35-
new_file_title = f'{base_name}_{title_suffix}{extension}'
36-
37-
content = re.sub(r'(Title:\s*).*', rf'\g<1>{new_file_title}', content)
39+
original_content = content
40+
content = re.sub(r'(Title:\s*).*', rf'\g<1>{new_filename}', content)
3841
content = re.sub(r'(ID:\s*).*', r'\g<1>1001', content)
3942
content = re.sub(r'(Name:\s*).*', r'\g<1>Edwin Kofler', content)
40-
content = re.sub(r'(Date:\s*).*', rf'\g<1>{today}', content)
41-
43+
content = re.sub(
44+
r'(Date:\s*).*', rf'\g<1>{datetime.now().strftime("%m/%d/%Y")}', content
45+
)
4246
if content != original_content:
43-
with open(current_file_path, 'w', encoding='utf-8') as f:
47+
with open(cur_filepath, 'w', encoding='utf-8') as f:
4448
f.write(content)
45-
print(f'Updated content for: {current_file_path}')
49+
print(f'Updated content for: {cur_filepath}')
4650

47-
if new_file_title != file:
48-
new_file_path = os.path.join(root, new_file_title)
49-
os.rename(current_file_path, new_file_path)
50-
print(f'Renamed: {current_file_path} -> {new_file_path}')
51+
if new_filename != cur_filename:
52+
os.rename(cur_filepath, new_filepath)
53+
print(f'Renamed: {cur_filepath} -> {new_filepath}')
54+
os.symlink(new_filename, cur_filepath)

os-unix/setup-apps/obsidian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ main() {
1919
}
2020

2121
installed() {
22-
local dir=(~/AppImages/Obsidian_*.AppImage)
22+
local dir=(~/.dotfiles/.home/AppImages/Obsidian_*.AppImage)
2323
(( ${#dir} > 0 ))
2424
}
2525

0 commit comments

Comments
 (0)