@brantshi1/devspace 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/devspace CHANGED
@@ -7,8 +7,8 @@
7
7
  # │ │ lazygit │
8
8
  # └──────────┴──────────┘
9
9
 
10
- VERSION="1.3.0"
11
- SCRIPT_DIR="${0:a:h}"
10
+ VERSION="1.4.0"
11
+ SCRIPT_DIR="${0:A:h}"
12
12
  REPO_DIR="${SCRIPT_DIR:h}"
13
13
  CONFIGS_DIR="$REPO_DIR/configs"
14
14
 
@@ -87,6 +87,9 @@ do_sync() {
87
87
  [[ -f "$HOME/.config/yazi/yazi.toml" ]] && cp "$HOME/.config/yazi/yazi.toml" "$CONFIGS_DIR/yazi/yazi.toml" && ((count++))
88
88
  [[ -f "$HOME/.config/yazi/package.toml" ]] && cp "$HOME/.config/yazi/package.toml" "$CONFIGS_DIR/yazi/package.toml" && ((count++))
89
89
 
90
+ # Starship
91
+ [[ -f "$HOME/.config/starship.toml" ]] && cp "$HOME/.config/starship.toml" "$CONFIGS_DIR/starship.toml" && ((count++))
92
+
90
93
  # Claude Code
91
94
  [[ -f "$HOME/.claude/CLAUDE.md" ]] && cp "$HOME/.claude/CLAUDE.md" "$CONFIGS_DIR/claude/CLAUDE.md" && ((count++))
92
95
  if [[ -f "$HOME/.claude/settings.json" ]]; then
@@ -188,6 +191,14 @@ do_setup() {
188
191
  _fail "未找到 pipx 或 pip3,请手动安装 rich-cli"
189
192
  fi
190
193
 
194
+ # Starship
195
+ _section "Starship"
196
+ _ensure_brew_pkg starship
197
+
198
+ # Starship 配置
199
+ _section "Starship 配置"
200
+ [[ -f "$CONFIGS_DIR/starship.toml" ]] && _copy_config "$CONFIGS_DIR/starship.toml" "$HOME/.config/starship.toml"
201
+
191
202
  # devspace 依赖
192
203
  _section "devspace 依赖"
193
204
  _ensure_brew_pkg lazygit
@@ -248,7 +259,7 @@ devspace - 在 Ghostty 中一键创建开发工作区
248
259
 
249
260
  命令:
250
261
  setup [-f] 部署开发环境(安装依赖 + 配置),-f 强制覆盖
251
- sync 将本机 ghostty/yazi/claude 配置同步到仓库 configs/ 目录
262
+ sync 将本机 ghostty/yazi/starship/claude 配置同步到仓库 configs/ 目录
252
263
 
253
264
  选项:
254
265
  -h, --help 显示帮助
@@ -0,0 +1,180 @@
1
+ "$schema" = 'https://starship.rs/config-schema.json'
2
+
3
+ format = """
4
+ [](color_orange)\
5
+ $os\
6
+ $username\
7
+ [](bg:color_yellow fg:color_orange)\
8
+ $directory\
9
+ [](fg:color_yellow bg:color_aqua)\
10
+ $git_branch\
11
+ $git_status\
12
+ [](fg:color_aqua bg:color_blue)\
13
+ $c\
14
+ $cpp\
15
+ $rust\
16
+ $golang\
17
+ $nodejs\
18
+ $php\
19
+ $java\
20
+ $kotlin\
21
+ $haskell\
22
+ $python\
23
+ [](fg:color_blue bg:color_bg3)\
24
+ $docker_context\
25
+ $conda\
26
+ $pixi\
27
+ [](fg:color_bg3 bg:color_bg1)\
28
+ $time\
29
+ [ ](fg:color_bg1)\
30
+ $line_break$character"""
31
+
32
+ palette = 'gruvbox_dark'
33
+
34
+ [palettes.gruvbox_dark]
35
+ color_fg0 = '#fbf1c7'
36
+ color_bg1 = '#3c3836'
37
+ color_bg3 = '#665c54'
38
+ color_blue = '#458588'
39
+ color_aqua = '#689d6a'
40
+ color_green = '#98971a'
41
+ color_orange = '#d65d0e'
42
+ color_purple = '#b16286'
43
+ color_red = '#cc241d'
44
+ color_yellow = '#d79921'
45
+
46
+ [os]
47
+ disabled = false
48
+ style = "bg:color_orange fg:color_fg0"
49
+
50
+ [os.symbols]
51
+ Windows = "󰍲"
52
+ Ubuntu = "󰕈"
53
+ SUSE = ""
54
+ Raspbian = "󰐿"
55
+ Mint = "󰣭"
56
+ Macos = "󰀵"
57
+ Manjaro = ""
58
+ Linux = "󰌽"
59
+ Gentoo = "󰣨"
60
+ Fedora = "󰣛"
61
+ Alpine = ""
62
+ Amazon = ""
63
+ Android = ""
64
+ Arch = "󰣇"
65
+ Artix = "󰣇"
66
+ EndeavourOS = ""
67
+ CentOS = ""
68
+ Debian = "󰣚"
69
+ Redhat = "󱄛"
70
+ RedHatEnterprise = "󱄛"
71
+ Pop = ""
72
+
73
+ [username]
74
+ show_always = true
75
+ style_user = "bg:color_orange fg:color_fg0"
76
+ style_root = "bg:color_orange fg:color_fg0"
77
+ format = '[ $user ]($style)'
78
+
79
+ [directory]
80
+ style = "fg:color_fg0 bg:color_yellow"
81
+ format = "[ $path ]($style)"
82
+ truncation_length = 3
83
+ truncation_symbol = "…/"
84
+
85
+ [directory.substitutions]
86
+ "Documents" = "󰈙 "
87
+ "Downloads" = " "
88
+ "Music" = "󰝚 "
89
+ "Pictures" = " "
90
+ "Developer" = "󰲋 "
91
+
92
+ [git_branch]
93
+ symbol = ""
94
+ style = "bg:color_aqua"
95
+ format = '[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)'
96
+
97
+ [git_status]
98
+ style = "bg:color_aqua"
99
+ format = '[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)'
100
+
101
+ [nodejs]
102
+ symbol = ""
103
+ style = "bg:color_blue"
104
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
105
+
106
+ [c]
107
+ symbol = " "
108
+ style = "bg:color_blue"
109
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
110
+
111
+ [cpp]
112
+ symbol = " "
113
+ style = "bg:color_blue"
114
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
115
+
116
+ [rust]
117
+ symbol = ""
118
+ style = "bg:color_blue"
119
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
120
+
121
+ [golang]
122
+ symbol = ""
123
+ style = "bg:color_blue"
124
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
125
+
126
+ [php]
127
+ symbol = ""
128
+ style = "bg:color_blue"
129
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
130
+
131
+ [java]
132
+ symbol = ""
133
+ style = "bg:color_blue"
134
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
135
+
136
+ [kotlin]
137
+ symbol = ""
138
+ style = "bg:color_blue"
139
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
140
+
141
+ [haskell]
142
+ symbol = ""
143
+ style = "bg:color_blue"
144
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
145
+
146
+ [python]
147
+ symbol = ""
148
+ style = "bg:color_blue"
149
+ format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
150
+
151
+ [docker_context]
152
+ symbol = ""
153
+ style = "bg:color_bg3"
154
+ format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
155
+
156
+ [conda]
157
+ style = "bg:color_bg3"
158
+ format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
159
+
160
+ [pixi]
161
+ style = "bg:color_bg3"
162
+ format = '[[ $symbol( $version)( $environment) ](fg:color_fg0 bg:color_bg3)]($style)'
163
+
164
+ [time]
165
+ disabled = false
166
+ time_format = "%R"
167
+ style = "bg:color_bg1"
168
+ format = '[[  $time ](fg:color_fg0 bg:color_bg1)]($style)'
169
+
170
+ [line_break]
171
+ disabled = false
172
+
173
+ [character]
174
+ disabled = false
175
+ success_symbol = '[](bold fg:color_green)'
176
+ error_symbol = '[](bold fg:color_red)'
177
+ vimcmd_symbol = '[](bold fg:color_green)'
178
+ vimcmd_replace_one_symbol = '[](bold fg:color_purple)'
179
+ vimcmd_replace_symbol = '[](bold fg:color_purple)'
180
+ vimcmd_visual_symbol = '[](bold fg:color_yellow)'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brantshi1/devspace",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Ghostty terminal workspace: claude + yazi + lazygit in split panes",
5
5
  "bin": {
6
6
  "devspace": "./bin/devspace"
package/setup.sh CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  set -euo pipefail
7
7
 
8
- SCRIPT_DIR="${0:a:h}"
8
+ SCRIPT_DIR="${0:A:h}"
9
9
 
10
10
  # 确保 Homebrew 可用
11
11
  if ! command -v brew &>/dev/null; then