diff --git a/.editorconfig b/.editorconfig index bd665b90..ae8b629f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,9 +11,6 @@ insert_final_newline = true [*.md] trim_trailing_whitespace = false -[home/.config/git/config] -indent_style = tab - [{Makefile,*.mk,*.go,.gitmodules,*.*sh,.*shrc,*shenv,.bash_*}] indent_style = tab indent_size = 4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7444db06..02174b1b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,5 +29,3 @@ jobs: . .github .vscode - home/.config - home/.stack diff --git a/.gitignore b/.gitignore index 617bb12e..167c9785 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,6 @@ # Don't include any history files! It might make an accident... :scream: *hist* -# Managed by home-manager -home/.config/fish/conf.d/ -home/.config/fish/config.fish - dist/ tmp/ diff --git a/README.md b/README.md index e8930f8e..e1ae6534 100644 --- a/README.md +++ b/README.md @@ -35,4 +35,4 @@ Also known as [盆栽(bonsai)](https://en.wikipedia.org/wiki/Bonsai) 🌳 ## Installation - Windows -Read [windows steps and tips](windows/README.md) +Read [windows steps and tips](windows.md) diff --git a/cmd/setup_windows_terminals/main.go b/cmd/setup_windows_terminals/main.go index 342a6162..01eda11c 100644 --- a/cmd/setup_windows_terminals/main.go +++ b/cmd/setup_windows_terminals/main.go @@ -45,10 +45,10 @@ func main() { } copies := []fileutils.Copy{ - {Src: filepath.Join(dotsPath, "home", ".config", "starship.toml"), Dst: filepath.Join(homePath, ".config", "starship.toml")}, - {Src: filepath.Join(dotsPath, "home", ".config", "alacritty", "alacritty-common.yml"), Dst: filepath.Join(homePath, ".config", "alacritty", "alacritty-common.yml")}, - {Src: filepath.Join(dotsPath, "home", ".config", "alacritty", "alacritty-windows.yml"), Dst: filepath.Join(homePath, ".config", "alacritty", "alacritty.yml")}, - {Src: filepath.Join(dotsPath, "windows", "config", "Profile.ps1"), Dst: pwshProfilePath}, + {Src: filepath.Join(dotsPath, "config", "starship", "starship.toml"), Dst: filepath.Join(homePath, ".config", "starship.toml")}, + {Src: filepath.Join(dotsPath, "config", "alacritty", "common.yml"), Dst: filepath.Join(homePath, ".config", "alacritty", "common.yml")}, + {Src: filepath.Join(dotsPath, "config", "alacritty", "windows.yml"), Dst: filepath.Join(homePath, ".config", "alacritty", "alacritty.yml")}, + {Src: filepath.Join(dotsPath, "config", "windows", "powershell", "Profile.ps1"), Dst: pwshProfilePath}, } for _, copy := range copies { diff --git a/home/.config/Firefox/README.md b/config/Firefox/README.md similarity index 100% rename from home/.config/Firefox/README.md rename to config/Firefox/README.md diff --git a/home/.config/Firefox/userChrome.css b/config/Firefox/userChrome.css similarity index 100% rename from home/.config/Firefox/userChrome.css rename to config/Firefox/userChrome.css diff --git a/home/.config/alacritty/alacritty-common.yml b/config/alacritty/common.yml similarity index 100% rename from home/.config/alacritty/alacritty-common.yml rename to config/alacritty/common.yml diff --git a/home/.config/alacritty/alacritty-unix.yml b/config/alacritty/unix.yml similarity index 90% rename from home/.config/alacritty/alacritty-unix.yml rename to config/alacritty/unix.yml index 5e7a3e05..4a9e8386 100644 --- a/home/.config/alacritty/alacritty-unix.yml +++ b/config/alacritty/unix.yml @@ -9,4 +9,4 @@ # All imports must either be absolute paths starting with `/`, or paths relative # to the user's home directory starting with `~/`. import: - - ~/.config/alacritty/alacritty-common.yml + - ~/.config/alacritty/common.yml diff --git a/home/.config/alacritty/alacritty-windows.yml b/config/alacritty/windows.yml similarity index 94% rename from home/.config/alacritty/alacritty-windows.yml rename to config/alacritty/windows.yml index 7220ae25..a358ad9c 100644 --- a/home/.config/alacritty/alacritty-windows.yml +++ b/config/alacritty/windows.yml @@ -9,7 +9,7 @@ # All imports must either be absolute paths starting with `/`, or paths relative # to the user's home directory starting with `~/`. import: - - ~/.config/alacritty/alacritty-common.yml + - ~/.config/alacritty/common.yml # Shell # diff --git a/home/.config/macos-Terminal/Iceberg.terminal b/config/darwin/Terminal/Iceberg.terminal similarity index 100% rename from home/.config/macos-Terminal/Iceberg.terminal rename to config/darwin/Terminal/Iceberg.terminal diff --git a/home/.config/iterm2/Iceberg.json b/config/darwin/iterm2/Iceberg.json similarity index 100% rename from home/.config/iterm2/Iceberg.json rename to config/darwin/iterm2/Iceberg.json diff --git a/home/.config/iterm2/OneHalfDark.json b/config/darwin/iterm2/OneHalfDark.json similarity index 100% rename from home/.config/iterm2/OneHalfDark.json rename to config/darwin/iterm2/OneHalfDark.json diff --git a/home/.config/iterm2/com.googlecode.iterm2.plist b/config/darwin/iterm2/com.googlecode.iterm2.plist similarity index 100% rename from home/.config/iterm2/com.googlecode.iterm2.plist rename to config/darwin/iterm2/com.googlecode.iterm2.plist diff --git a/home/.config/fish/fish_variables b/config/fish/fish_variables similarity index 100% rename from home/.config/fish/fish_variables rename to config/fish/fish_variables diff --git a/home/.config/fish/functions/fish_prompt.fish b/config/fish/functions/fish_prompt.fish similarity index 100% rename from home/.config/fish/functions/fish_prompt.fish rename to config/fish/functions/fish_prompt.fish diff --git a/home/.stack/config.yaml b/config/stack/config.yaml similarity index 100% rename from home/.stack/config.yaml rename to config/stack/config.yaml diff --git a/home/.config/starship.toml b/config/starship/starship.toml similarity index 100% rename from home/.config/starship.toml rename to config/starship/starship.toml diff --git a/windows/.editorconfig b/config/windows/.editorconfig similarity index 100% rename from windows/.editorconfig rename to config/windows/.editorconfig diff --git a/windows/config/WindowsTerminal/settings.json b/config/windows/WindowsTerminal/settings.json similarity index 100% rename from windows/config/WindowsTerminal/settings.json rename to config/windows/WindowsTerminal/settings.json diff --git a/windows/config/Profile.ps1 b/config/windows/powershell/Profile.ps1 similarity index 100% rename from windows/config/Profile.ps1 rename to config/windows/powershell/Profile.ps1 diff --git a/windows/config/winget-pkgs-basic.json b/config/windows/winget/winget-pkgs-basic.json similarity index 100% rename from windows/config/winget-pkgs-basic.json rename to config/windows/winget/winget-pkgs-basic.json diff --git a/windows/config/winget-pkgs-dev.json b/config/windows/winget/winget-pkgs-dev.json similarity index 100% rename from windows/config/winget-pkgs-dev.json rename to config/windows/winget/winget-pkgs-dev.json diff --git a/windows/config/winget-pkgs-entertainment.json b/config/windows/winget/winget-pkgs-entertainment.json similarity index 100% rename from windows/config/winget-pkgs-entertainment.json rename to config/windows/winget/winget-pkgs-entertainment.json diff --git a/windows/config/winget-pkgs-storage.json b/config/windows/winget/winget-pkgs-storage.json similarity index 100% rename from windows/config/winget-pkgs-storage.json rename to config/windows/winget/winget-pkgs-storage.json diff --git a/home-manager/fish.nix b/home-manager/fish.nix index 1d5a3ad2..3bb8a7c5 100644 --- a/home-manager/fish.nix +++ b/home-manager/fish.nix @@ -9,8 +9,8 @@ programs.rtx.enableFishIntegration = true; programs.zellij.enableFishIntegration = true; - xdg.configFile."fish/fish_variables".source = ../home/.config/fish/fish_variables; - xdg.configFile."fish/functions/fish_prompt.fish".source = ../home/.config/fish/functions/fish_prompt.fish; + xdg.configFile."fish/fish_variables".source = ../config/fish/fish_variables; + xdg.configFile."fish/functions/fish_prompt.fish".source = ../config/fish/functions/fish_prompt.fish; programs.fish = { enable = true; diff --git a/home-manager/home.nix b/home-manager/home.nix index 6e3e7867..95e584b3 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -103,15 +103,15 @@ # Do not alias home.nix into `xdg.configFile`, it actually cannot be used because of using many relative dirs # So you should call `home-manager switch` with `-f ~/repos/dotfiles/home.nix` - xdg.configFile."alacritty/alacritty-common.yml".source = ../home/.config/alacritty/alacritty-common.yml; - xdg.configFile."alacritty/alacritty.yml".source = ../home/.config/alacritty/alacritty-unix.yml; + xdg.configFile."alacritty/common.yml".source = ../config/alacritty/common.yml; + xdg.configFile."alacritty/alacritty.yml".source = ../config/alacritty/unix.yml; # Not under "starship/starship.toml" - xdg.configFile."starship.toml".source = ../home/.config/starship.toml; + xdg.configFile."starship.toml".source = ../config/starship/starship.toml; # - stack manager can not found in https://github.com/nix-community/home-manager/tree/8d243f7da13d6ee32f722a3f1afeced150b6d4da/modules/programs # - https://github.com/kachick/dotfiles/issues/142 - home.file.".stack/config.yaml".source = ../home/.stack/config.yaml; + home.file.".stack/config.yaml".source = ../config/stack/config.yaml; # Should have `root = true` in the file. - https://github.com/kachick/anylang-template/blob/45d7ef685ac4fd3836c3b32b8ce8fb45e909b771/.editorconfig#L1 # Intentionally avoided to use https://github.com/nix-community/home-manager/blob/f58889c07efa8e1328fdf93dc1796ec2a5c47f38/modules/misc/editorconfig.nix diff --git a/internal/constants/main.go b/internal/constants/main.go index 012722fd..626ce273 100644 --- a/internal/constants/main.go +++ b/internal/constants/main.go @@ -4,6 +4,5 @@ func GetTyposTargetedRoots() []string { return []string{ ".", ".github", ".vscode", - "home/.config", "home/.stack", } } diff --git a/windows/README.md b/windows.md similarity index 100% rename from windows/README.md rename to windows.md