- tui-wm --init [DIR] writes an embedded default config.toml,
panels/topbar.toml and themes/{dark,light}.toml (default target
~/.config/tui-wm, existing files untouched)
- Config discovery: ./config.toml wins, otherwise ~/.config/tui-wm/
is used (process switches working dir there so panels/themes/saves/
hot-reload all resolve consistently); spawned PTYs still start in
the user's original working directory
- VS Code build tasks copy themes/ into builds/, dist/ sample configs
refreshed with all new keys and the settings gear
- CI release now also uploads tui-wm-config.tar.gz (config + panels +
themes) alongside the binaries
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
74 lines
5.2 KiB
JSON
74 lines
5.2 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Build alla (Linux + Windows)",
|
|
"type": "shell",
|
|
"command": "cargo build --release && cargo build --release --target x86_64-pc-windows-gnu && mkdir -p builds/linux/panels builds/win/panels && cp target/release/tui-wm builds/linux/tui-wm && cp target/x86_64-pc-windows-gnu/release/tui-wm.exe builds/win/tui-wm.exe && cp dist/linux/config.toml builds/linux/config.toml && cp dist/linux/panels/topbar.toml builds/linux/panels/topbar.toml && cp dist/win/config.toml builds/win/config.toml && cp dist/win/panels/topbar.toml builds/win/panels/topbar.toml && cp -r themes builds/linux/themes && cp -r themes builds/win/themes && echo 'Done: builds/linux/tui-wm + builds/win/tui-wm.exe (inkl. themes/)'",
|
|
"options": { "shell": { "executable": "bash", "args": ["-c"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"],
|
|
"detail": "Bygger båda binärerna: Linux (native) + Windows (kräver mingw-w64)"
|
|
},
|
|
{
|
|
"label": "Build (native)",
|
|
"type": "shell",
|
|
"linux": {
|
|
"command": "cargo build --release && mkdir -p builds/linux/panels && cp target/release/tui-wm builds/linux/tui-wm && cp dist/linux/config.toml builds/linux/config.toml && cp dist/linux/panels/topbar.toml builds/linux/panels/topbar.toml && cp -r themes builds/linux/themes && echo 'Done: builds/linux/tui-wm'"
|
|
},
|
|
"windows": {
|
|
"command": "& \"$env:USERPROFILE\\.cargo\\bin\\cargo.exe\" build --release; if ($LASTEXITCODE -eq 0) { New-Item -Force -ItemType Directory builds\\win\\panels | Out-Null; Copy-Item target\\release\\tui-wm.exe builds\\win\\tui-wm.exe -Force; Copy-Item dist\\win\\config.toml builds\\win\\config.toml -Force; Copy-Item dist\\win\\panels\\topbar.toml builds\\win\\panels\\topbar.toml -Force; Write-Host 'Done: builds\\win\\tui-wm.exe' }",
|
|
"options": { "shell": { "executable": "powershell.exe", "args": ["-NoProfile", "-Command"] } }
|
|
},
|
|
"group": { "kind": "build", "isDefault": true },
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Build Linux",
|
|
"type": "shell",
|
|
"command": "cargo build --release --target x86_64-unknown-linux-gnu && mkdir -p builds/linux/panels && cp target/x86_64-unknown-linux-gnu/release/tui-wm builds/linux/tui-wm && cp dist/linux/config.toml builds/linux/config.toml && cp dist/linux/panels/topbar.toml builds/linux/panels/topbar.toml && cp -r themes builds/linux/themes && echo 'Done: builds/linux/tui-wm'",
|
|
"options": { "shell": { "executable": "bash", "args": ["-c"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Build Windows cross (GNU, från Linux)",
|
|
"type": "shell",
|
|
"command": "cargo build --release --target x86_64-pc-windows-gnu && mkdir -p builds/win/panels && cp target/x86_64-pc-windows-gnu/release/tui-wm.exe builds/win/tui-wm.exe && cp dist/win/config.toml builds/win/config.toml && cp dist/win/panels/topbar.toml builds/win/panels/topbar.toml && cp -r themes builds/win/themes && echo 'Done: builds/win/tui-wm.exe'",
|
|
"options": { "shell": { "executable": "bash", "args": ["-c"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Build Windows (MSVC — kräver VS Build Tools)",
|
|
"type": "shell",
|
|
"command": "& \"$env:USERPROFILE\\.cargo\\bin\\cargo.exe\" build --release --target x86_64-pc-windows-msvc; if ($LASTEXITCODE -eq 0) { New-Item -Force -ItemType Directory builds\\win\\panels | Out-Null; Copy-Item target\\x86_64-pc-windows-msvc\\release\\tui-wm.exe builds\\win\\tui-wm.exe -Force; Copy-Item dist\\win\\config.toml builds\\win\\config.toml -Force; Copy-Item dist\\win\\panels\\topbar.toml builds\\win\\panels\\topbar.toml -Force; Write-Host 'Done: builds\\win\\tui-wm.exe' }",
|
|
"options": { "shell": { "executable": "powershell.exe", "args": ["-NoProfile", "-Command"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Build Windows (GNU — kräver msys2 + mingw-w64)",
|
|
"type": "shell",
|
|
"command": "& \"$env:USERPROFILE\\.cargo\\bin\\cargo.exe\" build --release --target x86_64-pc-windows-gnu; if ($LASTEXITCODE -eq 0) { New-Item -Force -ItemType Directory builds\\win\\panels | Out-Null; Copy-Item target\\x86_64-pc-windows-gnu\\release\\tui-wm.exe builds\\win\\tui-wm.exe -Force; Copy-Item dist\\win\\config.toml builds\\win\\config.toml -Force; Copy-Item dist\\win\\panels\\topbar.toml builds\\win\\panels\\topbar.toml -Force; Write-Host 'Done: builds\\win\\tui-wm.exe' }",
|
|
"options": { "shell": { "executable": "powershell.exe", "args": ["-NoProfile", "-Command"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Run",
|
|
"type": "shell",
|
|
"command": "cargo run",
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
}
|
|
]
|
|
}
|