Repository navigation
Expand file tree
/
Copy pathupdate.cmd
More file actions
116 lines (80 loc) · 2.67 KB
/
Copy pathupdate.cmd
File metadata and controls
116 lines (80 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
@echo off
setlocal enabledelayedexpansion
echo Updating configuration files...
:: rio config
where rio >nul 2>&1
if %errorlevel%==0 (
echo Copying rio config...
if not exist "%LOCALAPPDATA%\rio\themes" (
mkdir "%LOCALAPPDATA%\rio\themes"
)
copy /y "rio\config.toml" "%LOCALAPPDATA%\rio\config.toml" >nul
copy /y "rio\themes\catppuccin-macchiato.toml" "%LOCALAPPDATA%\rio\themes\catppuccin-macchiato.toml" >nul
)
:: clink config
echo Copying clink config...
if not exist "%LOCALAPPDATA%\clink" (
mkdir "%LOCALAPPDATA%\clink"
)
xcopy /y /q "clink\*" "%LOCALAPPDATA%\clink\" >nul
:: starship config
where starship >nul 2>&1
if %errorlevel%==0 (
echo Copying starship config...
if not exist "%USERPROFILE%\.config" (
mkdir "%USERPROFILE%\.config"
)
copy /y "starship\starship.toml" "%USERPROFILE%\.config\starship.toml" >nul
)
:: git config
where git >nul 2>&1
if %errorlevel%==0 (
echo Copying git config...
if not exist "%USERPROFILE%\.config" (
mkdir "%USERPROFILE%\.config"
)
copy /y "git\.gitconfig" "%USERPROFILE%\.config\.gitconfig_env" >nul
)
:: opencode config
set "OPENCODE_DIR=%USERPROFILE%\.config\opencode"
if exist "%OPENCODE_DIR%\" (
echo Copying opencode config...
:: non jsonc/json
del /f /q "%OPENCODE_DIR%\opencode.json" >nul 2>&1
del /f /q "%OPENCODE_DIR%\tui.json" >nul 2>&1
del /f /q "%OPENCODE_DIR%\dcp.json" >nul 2>&1
:: not yet v2
del /f /q "%OPENCODE_DIR%\cli.json" >nul 2>&1
del /f /q "%OPENCODE_DIR%\cli.jsonc" >nul 2>&1
:: cleanly copy commands
robocopy "slop\commands" "%OPENCODE_DIR%\commands" /MIR >nul
:: cleanly copy plugins
robocopy "slop\plugins" "%OPENCODE_DIR%\plugins" /MIR >nul
:: cleanly copy skills
robocopy "slop\skills" "%OPENCODE_DIR%\skills" /MIR >nul
:: copy configs
copy /y "slop\opencode.jsonc" "%OPENCODE_DIR%\opencode.jsonc" >nul
copy /y "slop\tui.jsonc" "%OPENCODE_DIR%\tui.jsonc" >nul
copy /y "slop\dcp.jsonc" "%OPENCODE_DIR%\dcp.jsonc" >nul
copy /y "slop\AGENTS.md" "%OPENCODE_DIR%\AGENTS.md" >nul
)
:: vscode keybinds and snippets
if exist "%APPDATA%\Code\User" (
echo Copying vscode config...
copy /y "code\keybinds.json" "%APPDATA%\Code\User\keybindings.json" >nul
if not exist "%APPDATA%\Code\User\snippets" (
mkdir "%APPDATA%\Code\User\snippets"
)
copy /y "code\default.code-snippets" "%APPDATA%\Code\User\snippets\default.code-snippets" >nul
)
:: autohotkey
if exist "%USERPROFILE%\Desktop\hotkeys.ahk" (
echo Copying autohotkeys...
copy /y "ahk\hotkeys.ahk" "%USERPROFILE%\Desktop\hotkeys.ahk" >nul
)
echo Done.
echo %CMDCMDLINE% | findstr /i /c:" /c" >nul
if %errorlevel% equ 0 (
pause >nul
)
endlocal