Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/orders-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ jobs:
check:
runs-on: ubuntu-latest
container:
image: ghcr.io/frantic1048/blend:0.2.14@sha256:21d9000745aafebf02633d88f06a728d4a0e9c1fae4603add67047646b64489e
image: ghcr.io/frantic1048/blend:0.2.15@sha256:8a67c80e66bae598818a1b648c01921dd70c748f48fc5c9d52da0506461cdad9
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- run: blend --version

- name: Check orders
run: blend check

Expand Down
9 changes: 2 additions & 7 deletions orders/blend/order.ncl
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
let { Order, .. } = import "../order.contract.ncl" in
let { Order, BlendOrder, .. } = import "../order.contract.ncl" in
{
blend = {
prefix = ["~/.config/blend/"],
ignore = [
# This points to the local checkout location. Most people do not need to
# persist changes to it in their dotfile repo; remove this ignore if you
# intentionally keep blend at a stable path such as ~/dotfiles.
],
files = [
{
name = "config.toml",
Expand All @@ -16,4 +11,4 @@ let { Order, .. } = import "../order.contract.ncl" in
},
],
},
} | Order
} | Order | BlendOrder
10 changes: 7 additions & 3 deletions orders/order.contract.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Regenerate with: blend init (or any sync run).

{
contract_version = 2,
contract_version = 3,

Format = std.contract.from_predicate (fun x =>
std.is_string x &&
Expand All @@ -28,7 +28,7 @@
from_config | Dyn | optional, # Inline structured config data
prefix | Array String | optional, # Destination prefixes (overrides global)
format | Format | optional, # Override format (inferred from name if omitted)
ignore | Array String | optional, # Keys to exclude from diff
ignore | Array String | optional, # Legacy compatibility; prefer resolution primitives
when | WhenCondition | optional, # Per-file condition
symlink | Bool | optional, # Create symlink instead of copying (from_file only)
exclude | Array String | optional, # Glob patterns to skip in from_file directories
Expand All @@ -40,7 +40,11 @@
files | Array FileEntry | optional,
prefix | Array String | optional, # Default prefix for all files
when | WhenCondition | optional, # Global condition
ignore | Array String | optional, # Global ignore keys
ignore | Array String | optional, # Legacy compatibility; prefer resolution primitives
with_target_only | default | not_exported = fun policy value =>
let selected_policy = policy in
let selected_value = value in
'BlendTargetOnly { resolver = selected_policy, value = selected_value },
},

Order = {
Expand Down
141 changes: 29 additions & 112 deletions orders/starship/order.ncl
Original file line number Diff line number Diff line change
@@ -1,122 +1,39 @@
# Kitty terminal configuration
# Starship prompt configuration
let { Order, .. } = import "../order.contract.ncl" in
{
blend = {
prefix = ["~/.config"],
files = [
{
name = "starship.toml",
format = "space_pair_lines",
from_config = [
[
"format",
"= \"\"\"",
],
[
"$directory\\",
"",
],
[
"$git_branch\\",
"",
],
[
"$git_status\\",
"",
],
[
"$php\\",
"",
],
[
"$nodejs\\",
"",
],
[
"$docker_context\\",
"",
],
[
"$cmd_duration\\",
"",
],
[
"$line_break\\",
"",
],
[
"$character\"\"\"",
"",
],
[
"[directory]",
"",
],
[
"truncation_length",
"= 3",
],
[
"truncate_to_repo",
"= true",
],
[
"[git_branch]",
"",
],
[
"format",
"= \"[$symbol$branch(:$remote_branch)]($style) \"",
],
[
"[git_status]",
"",
],
[
"format",
"= '([\\[$all_status$ahead_behind\\]]($style) )'",
],
[
"[php]",
"",
],
[
"format",
"= \"[$symbol($version)]($style) \"",
],
[
"[nodejs]",
"",
],
[
"format",
"= \"[$symbol($version)]($style) \"",
],
[
"detect_extensions",
"= []",
],
[
"[cmd_duration]",
"",
],
[
"min_time",
"= 2_000",
],
[
"[character]",
"",
],
[
"success_symbol",
"= \"[>](bold green)\"",
],
[
"error_symbol",
"= \"[>](bold red)\"",
],
],
format = "toml",
from_config = {
format = "$directory$git_branch$git_status$php$nodejs$docker_context$cmd_duration$line_break$character",
directory = {
truncation_length = 3,
truncate_to_repo = true,
},
git_branch = {
format = "[$symbol$branch(:$remote_branch)]($style) ",
},
git_status = {
format = "([\\[$all_status$ahead_behind\\]]($style) )",
},
php = {
format = "[$symbol($version)]($style) ",
},
nodejs = {
format = "[$symbol($version)]($style) ",
detect_extensions = [],
},
cmd_duration = {
min_time = 2000,
},
character = {
success_symbol = "[>](bold green)",
error_symbol = "[>](bold red)",
},
},
},
],
when = { os = ["darwin", "linux"] },
Expand Down
16 changes: 8 additions & 8 deletions orders/vscode/order.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ let { Order, .. } = import "../order.contract.ncl" in
{
name = "settings.json",
format = "jsonc",
# These settings are not suitable for sync.
ignore = [
"window.zoomLevel",
"workbench.colorTheme",
"workbench.iconTheme",
"playwright.env",
"chat.commandCenter.enabled",
],
from_config = {
# Keep these machine-local settings in Target without syncing them back.
# Missing settings stay absent on a new machine.
"window.zoomLevel" = 'Unmanaged,
"workbench.colorTheme" = 'Unmanaged,
"workbench.iconTheme" = 'Unmanaged,
"playwright.env" = 'Unmanaged,
"chat.commandCenter.enabled" = 'Unmanaged,

# Editor settings
# JetBrains Mono
# https://github.com/JetBrains/JetBrainsMono/wiki/OpenType-features
Expand Down