Skip to content

Commit b237668

Browse files
committed
2026-04-01
1 parent 8581767 commit b237668

175 files changed

Lines changed: 946 additions & 848 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ config/ublacklist.txt linguist-language=AdBlock linguist-detectable
44

55
os-unix/config-language/.config/npm/npmrc filter=npmrc
66
os-unix/config-tools/.config/osc/oscrc filter=oscrc
7+
os-unix/config-editor/.config/zed/settings.json filter=homedir

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
.bin/
22
.data/
3-
.home/
43
os-unix/scripts/setup/
5-
os-unix/data/setup-private.*
4+
os-unix/data/setup-private*
65
scripts-hidden/
76
**/bash/bash.d/
87
**/sh/shell.d/

.vscode/settings.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,37 @@
22
"window.title": "${folderName} ${separator}${activeRepositoryBranchName}${separator}${remoteName} (nodejs)",
33
"shellcheck.ignorePatterns": {
44
"**/.git/**": true,
5-
"**/.home/**": true,
65
"**/.venv/**": true,
76
"**/node_modules/**": true,
87
},
98
"search.exclude": {
109
"**/.git/**": true,
11-
"**/.home/**": true,
1210
"**/.venv/**": true,
13-
"os-unix/config-shell/.config/bash/frameworks/bash-it.sh": false,
11+
"**/vendor": true,
12+
"os-unix/config-shell/.config/bash/frameworks/bash-it.sh": true,
1413
},
1514
"npm.exclude": "**/.*",
1615
"files.watcherExclude": {
1716
"**/.git/**": true,
18-
"**/.home/**": true,
1917
"**/.venv/**": true,
2018
"**/node_modules/**": true,
2119
},
2220
"explorer.excludeGitIgnore": true,
2321
"errorLens.excludePatterns": [
2422
"**/.git/**",
25-
"**/.home/**",
2623
"**/.venv/**",
2724
"**/node_modules/**",
2825
],
2926
"todo-tree.filtering.excludeGlobs": [
3027
"**/.git/**",
31-
"**/.home/**",
3228
"**/.venv/**",
3329
"**/node_modules/**",
3430
],
3531
"workbench.localHistory.exclude": {
3632
"**/.git/**": true,
37-
"**/.home/**": true,
3833
"**/.venv/**": true,
3934
"**/node_modules/**": true,
4035
},
41-
"prettier.enable": false,
42-
"editor.formatOnSave": false,
43-
"editor.codeActionsOnSave": {
44-
"source.fixAll.eslint": "explicit",
45-
"source.organizeImports": "never"
46-
},
4736
"eslint.rules.customizations": [
4837
{
4938
"rule": "style/*",

.zed/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
"code_action": "source.fixAll.eslint"
66
}
77
],
8+
"file_scan_exclusions": [
9+
"**/.git/**",
10+
"**/.venv/**",
11+
"bake",
12+
"os-unix/config-shell/.config/bash/frameworks/bash-it.sh",
13+
"vendor/**",
14+
],
815
"languages": {
916
"HTML": {
1017
"language_servers": [

Bakefile.sh

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# shellcheck shell=bash
2-
32
init() {
43
if [ -f ~/.dotfiles/os-unix/data/setup-private.sh ]; then
54
source ~/.dotfiles/os-unix/data/setup-private.sh
@@ -9,6 +8,10 @@ init() {
98
task.init() {
109
git config set --local filter.npmrc.clean './scripts/npmrc-clean.sh'
1110
git config set --local filter.oscrc.clean './scripts/oscrc-clean.sh'
11+
git config set --local filter.homedir.clean './scripts/homedir-clean.sh'
12+
git config set --local filter.npmrc.required true
13+
git config set --local filter.oscrc.required true
14+
git config set --local filter.homedir.required true
1215
cat > .clangd <<EOF
1316
# DO NOT MODIFY! This file is auto-autogenerated from Bakefile.sh.
1417
CompileFlags:
@@ -31,16 +34,77 @@ EOF
3134
task.build() {
3235
./os-unix/scripts/lint-scripts.py --internal-test-regex
3336

37+
err=0
38+
while read -r file; do
39+
if grep -q ' _setup ' "$file" && grep -q '^main()' "$file"; then
40+
printf 'Should not call _setup but define main(): %s\n' "$file"
41+
err=1
42+
fi
43+
44+
if grep -q ' _setup ' "$file" && ! grep -q '^installed' "$file"; then
45+
printf 'If calls _setup, must define installed(): %s\n' "$file"
46+
err=1
47+
fi
48+
done < <(find . \( -name '*.sh' -not -name 'Bakefile.sh' \) -type f)
49+
50+
# Should have proper ordering of functions.
51+
node --input-type=module <<'EOF'
52+
import { readFileSync } from 'fs'
53+
import { glob } from 'fs/promises'
54+
55+
const EXPECTED_ORDER = [
56+
'install.any',
57+
'install.debian',
58+
'install.ubuntu',
59+
'install.fedora',
60+
'install.opensuse',
61+
'install.arch',
62+
'installed',
63+
'configure',
64+
'caveats',
65+
]
66+
67+
let err = 0
68+
69+
for await (const file of glob('**/*.sh', { exclude: (p) => p === '.data' || p === 'vendor' })) {
70+
const lines = readFileSync(file, 'utf8').split('\n')
71+
72+
if (!lines.some(l => l.includes('_setup '))) continue
73+
74+
const order = []
75+
for (const line of lines) {
76+
for (const name of EXPECTED_ORDER) {
77+
if (line.startsWith(name + '(')) order.push(name)
78+
}
79+
}
80+
81+
for (let i = 0; i < order.length; i++) {
82+
for (let j = i + 1; j < order.length; j++) {
83+
const pi = EXPECTED_ORDER.indexOf(order[i])
84+
const pj = EXPECTED_ORDER.indexOf(order[j])
85+
if (pi > pj) {
86+
console.log(`Bad ordering in ${file}: ${order[j]}() must be before ${order[i]}()`)
87+
err = 1
88+
}
89+
}
90+
}
91+
}
92+
process.exit(err)
93+
EOF
94+
3495
# grep '-P' not compatible with with multiple arguments using '-e'.
3596
for pattern in "${_private_forbidden_patterns[@]}"; do
36-
if grep -IPr --exclude setup-private.* --exclude .clangd --exclude-dir node_modules --exclude-dir .data --exclude-dir vendor --color=always "$pattern" ./ | grep -Ev '(#|//|") lint-ignore'; then
37-
bake.die "Expected to find no matches for '$pattern'"
97+
if grep -IPr --exclude setup-private.* --exclude .clangd --exclude-dir node_modules --exclude-dir .data --exclude-dir vendor --exclude-dir target --exclude-dir .jekyll-cache --color=always "$pattern" ./ | grep -Ev '(#|//|") lint-ignore'; then
98+
printf 'Expected to find no matches for: %s\n' "$pattern"
99+
err=1
38100
fi
39101
done
40102

41103
cd "./os-unix/config-linux-rice/.config/X11/resources" || exit
42104
printf '%s\n' "! GENERATED BY 'bake build'" > uxterm.Xresources
43105
sed 's/XTerm/UXTerm/g' xterm.Xresources >> uxterm.Xresources
106+
107+
return $err
44108
}
45109

46110
task.lint() {

file.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
node --input-type=module <<'EOF'
2+
import { readFileSync } from 'fs'
3+
import { glob } from 'fs/promises'
4+
5+
const EXPECTED_ORDER = [
6+
'install.any',
7+
'install.debian',
8+
'install.ubuntu',
9+
'install.fedora',
10+
'install.opensuse',
11+
'install.arch',
12+
'installed',
13+
'configure',
14+
'caveats',
15+
]
16+
17+
let err = 0
18+
19+
for await (const file of glob('**/*.sh', { exclude: (p) => p === '.data' || p === 'vendor' })) {
20+
const lines = readFileSync(file, 'utf8').split('\n')
21+
22+
if (!lines.some(l => l.includes('_setup '))) continue
23+
24+
const order = []
25+
for (const line of lines) {
26+
for (const name of EXPECTED_ORDER) {
27+
if (line.startsWith(name + '(')) order.push(name)
28+
}
29+
}
30+
31+
for (let i = 0; i < order.length; i++) {
32+
for (let j = i + 1; j < order.length; j++) {
33+
const pi = EXPECTED_ORDER.indexOf(order[i])
34+
const pj = EXPECTED_ORDER.indexOf(order[j])
35+
if (pi > pj) {
36+
console.log(`Bad ordering in ${file}: ${order[j]}() must be before ${order[i]}()`)
37+
err = 1
38+
}
39+
}
40+
}
41+
}
42+
43+
process.exit(err)
44+
EOF

os-unix/bin/code-with-extension-path

Lines changed: 0 additions & 11 deletions
This file was deleted.

os-unix/bootstrap.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ main() {
3030
installcmd 'curl' 'curl'
3131
installcmd 'git' 'git'
3232
installcmd 'vim' 'vim'
33+
installcmd 'zsh' 'zsh'
3334

3435
# Install hyperupcall/dotfiles.
3536
clonerepo 'https://github.com/hyperupcall/dotfiles' ~/.dotfiles

os-unix/config-application/.config/ncmpcpp/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Frenzy's
22

33
### Directories ###
4-
ncmpcpp_directory = ~/.dotfiles/.home/xdg_config_dir/ncmpcpp
5-
lyrics_directory = ~/.dotfiles/.home/xdg_config_dir/ncmpcpp/lyrics
4+
ncmpcpp_directory = ~/.home/xdg_config_dir/ncmpcpp
5+
lyrics_directory = ~/.home/xdg_config_dir/ncmpcpp/lyrics
66
mpd_music_dir = "~/Music"
77

88
# Encoding

os-unix/config-application/.config/ranger/rc.conf

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
map icb cd ~/.dotfiles/.home/xdg_config_dir/bash
2-
map icc cd ~/.dotfiles/.home/xdg_config_dir
3-
map icg cd ~/.dotfiles/.home/xdg_config_dir/git
4-
map icn cd ~/.dotfiles/.home/xdg_config_dir/neovim
5-
map icr cd ~/.dotfiles/.home/xdg_config_dir/ranger
6-
map ics cd ~/.dotfiles/.home/xdg_config_dir/sh
1+
map icb cd ~/.home/xdg_config_dir/bash
2+
map icc cd ~/.home/xdg_config_dir
3+
map icg cd ~/.home/xdg_config_dir/git
4+
map icn cd ~/.home/xdg_config_dir/neovim
5+
map icr cd ~/.home/xdg_config_dir/ranger
6+
map ics cd ~/.home/xdg_config_dir/sh
77

8-
map ida cd ~/.dotfiles/.home/xdg_data_dir/applications
9-
map idt cd ~/.dotfiles/.home/xdg_data_dir/Trash
10-
map idp cd ~/.dotfiles/.home/xdg_data_dir/password-store
8+
map ida cd ~/.home/xdg_data_dir/applications
9+
map idt cd ~/.home/xdg_data_dir/Trash
10+
map idp cd ~/.home/xdg_data_dir/password-store
1111

12-
map ihc cd ~/.dotfiles/.home/Documents
13-
map ihd cd ~/.dotfiles/.home/Documents
14-
map ihb cd ~/.dotfiles/.home/Public
12+
map ihc cd ~/.home/Documents
13+
map ihd cd ~/.home/Documents
14+
map ihb cd ~/.home/Public
1515
map ihh cd ~
16-
map ihk cd ~/.dotfiles/.home/Desktop
17-
map ihm cd ~/.dotfiles/.home/Music
18-
map ihp cd ~/.dotfiles/.home/Pictures
16+
map ihk cd ~/.home/Desktop
17+
map ihm cd ~/.home/Music
18+
map ihp cd ~/.home/Pictures
1919
map ihs cd ~/scripts
20-
map iht cd ~/.dotfiles/.home/Templates
21-
map ihv cd ~/.dotfiles/.home/Videos
22-
map ihw cd ~/.dotfiles/.home/Downloads
20+
map iht cd ~/.home/Templates
21+
map ihv cd ~/.home/Videos
22+
map ihw cd ~/.home/Downloads
2323
map ihx cd ~/Dropbox
2424

2525
map im cd /run/media

0 commit comments

Comments
 (0)