Skip to content

Commit ebaa760

Browse files
committed
ass
0 parents  commit ebaa760

File tree

18 files changed

+1674
-0
lines changed

18 files changed

+1674
-0
lines changed

.clang-format

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
BasedOnStyle: LLVM,
3+
UseTab: ForIndentation,
4+
IndentWidth: 3,
5+
TabWidth: 3,
6+
AlignEscapedNewlines: Left,
7+
AllowShortFunctionsOnASingleLine: Empty,
8+
AlwaysBreakTemplateDeclarations: Yes,
9+
ColumnLimit: 120,
10+
}

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.o
2+
cosmopolitan/
3+
inih/

.vscode/c_cpp_properties.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Linux",
5+
"cStandard": "c89",
6+
"intelliSenseMode": "linux-gcc-x64",
7+
"compilerPath": "/usr/bin/clang",
8+
"cppStandard": "c++14"
9+
}
10+
],
11+
"version": 4
12+
}

.vscode/launch.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "(gdb) Launch",
6+
"type": "cppdbg",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/test",
9+
"externalConsole": false,
10+
"internalConsoleOptions": "openOnSessionStart",
11+
"cwd": "${fileDirname}",
12+
"environment": [ { "name": "LD_LIBRARY_PATH", "value": "./inih/build" } ],
13+
"MIMode": "gdb",
14+
"preLaunchTask": "compile",
15+
"setupCommands": [
16+
{
17+
"description": "Enable pretty-printing for gdb",
18+
"text": "-enable-pretty-printing",
19+
"ignoreFailures": true
20+
},
21+
{
22+
"description": "Set Disassembly Flavor to Intel",
23+
"text": "-gdb-set disassembly-flavor intel",
24+
"ignoreFailures": true
25+
}
26+
]
27+
}
28+
]
29+
}

.vscode/settings.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"files.associations": {
3+
"*.ejs": "html",
4+
"__locale": "c",
5+
"algorithm": "c",
6+
"regex": "c",
7+
"optional": "c",
8+
"system_error": "c",
9+
"array": "c",
10+
"functional": "c",
11+
"tuple": "c",
12+
"type_traits": "c",
13+
"utility": "c",
14+
"istream": "c",
15+
"ostream": "c",
16+
"string.h": "c",
17+
"main.h": "c",
18+
"unistd.h": "c",
19+
"limits.h": "c"
20+
},
21+
"C_Cpp.files.exclude": {
22+
"**/cosmopolitan": true,
23+
"**/inih": true
24+
}
25+
}

.vscode/tasks.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "compile",
6+
"type":"process",
7+
"command": "gcc",
8+
"args": ["-Wall", "-Wextra", "-Wpedantic", "-g", "-L", "./inih/build", "main.c", "test.c", "-linih", "-o", "./test"],
9+
}
10+
]
11+
}

Bakefile.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# shellcheck shell=bash
2+
3+
# shellcheck disable=SC2086
4+
5+
init() {
6+
export LD_LIBRARY_PATH=./inih/build
7+
CFLAGS='-Wall -Wextra -Wpedantic -g -Wno-unused-variable -Wno-unused-parameter'
8+
}
9+
10+
task.build() {
11+
gcc -L ./inih/build $CFLAGS main.c -DIS_NOT_TEST -linih -o ./main
12+
}
13+
14+
task.run() {
15+
task.build
16+
DEBUG=1 ./main "$@"
17+
}
18+
19+
task.test() {
20+
gcc -L ./inih/build $CFLAGS main.c test.c -linih -o ./test \
21+
&& DEBUG=1 ./test "$@"
22+
}

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
LD_LIBRARY_PATH := ./inih/build
2+
3+
.PHONY: run
4+
run: build
5+
./main
6+
7+
.PHONY: build
8+
build:
9+
gcc -L ./inih/build -Wall -Wextra -Wpedantic main.c -DIS_NOT_TEST -linih -o ./ma
10+
11+
.PHONY: test
12+
test: test-build
13+
./test
14+
15+
.PHONY: test-build
16+
test-build:
17+
echo building test

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# d
2+
3+
I'm implementing another dotfile manager 😮‍💨
4+
5+
- I stopped working on [dotfox](https://github.com/fox-archives/dotfox) because I [lost confidence](https://forum.nim-lang.org/t/10312#68553) in the [social](https://forum.dlang.org/post/[email protected]) and [technical](https://news.ycombinator.com/threads?id=carterza) leadership for the language I was using, Nim
6+
- [dotmgr](https://github.com/hyperupcall/dotmgr) was supposed to replace it, but it grew too much in scope and it doesn't work on all platforms (Cygwin)
7+
8+
I've learned some things:
9+
10+
- Continue to use symlinks
11+
- Continue to implement undeploy
12+
- Continue to properly test
13+
- Explicitly specify if file/directory
14+
- That way, a directory can exist at source location (with multiple choices)
15+
16+
- Implement interactive mode
17+
- Implement command to interactively swap out file
18+
- Make status updates one line
19+
20+
## Additional Goals
21+
22+
- Heapless (TODO)
23+
- Multi-platform
24+
25+
## Summary
26+
27+
### Config
28+
29+
Configure which files to manage with an INI-style file.
30+
31+
First, label the location of the source and target directories. All paths are relative to these
32+
33+
```ini
34+
source_root_dir = $pwd/source
35+
target_root_dir = $pwd/target
36+
```
37+
38+
Then, come the variables. By default, `$home` and `$pwd` (relative to the file) are defined, but you can define more (TODO)
39+
40+
```ini
41+
[vars]
42+
cfg = ${XDG_CONFIG_HOME:-$HOME/.config}
43+
data = ${XDG_DATA_HOME:-$HOME/.local/share}
44+
state = ${XDG_DATA_HOME:-$HOME/.local/state}
45+
```
46+
47+
Lastly, list your entries. There are two types:
48+
49+
Tags are TODO
50+
51+
```ini
52+
[entry]
53+
path = .bashrc
54+
what = file
55+
tags = [Bash]
56+
57+
[entry]
58+
source = $cfg/X11/xinitrc
59+
target = $home/.xinitrc
60+
what = file
61+
tags = [X11]
62+
```

0 commit comments

Comments
 (0)