diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..6313b56c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000..649fc1c9 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,23 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base", + "github>aquaproj/aqua-renovate-config#2.3.1" + ], + "packageRules": [ + { + "description": "Automerge non-major update", + "matchUpdateTypes": [ + "minor", + "patch" + ], + "automerge": true + }, + { + "matchPackageNames": [ + "neovim/neovim" + ], + "enabled": false + } + ] +} diff --git a/.github/workflows/update-checksum.yaml b/.github/workflows/update-checksum.yaml new file mode 100644 index 00000000..a861095f --- /dev/null +++ b/.github/workflows/update-checksum.yaml @@ -0,0 +1,53 @@ +name: update aqua checksum + +on: + push: + branches: + - "main" + pull_request: + paths: + - "common/aquaproj-aqua/*" + - ".github/workflows/update-checksum.yaml" + workflow_dispatch: + +jobs: + update-aqua-checksum: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - uses: actions/cache@v4 + with: + path: ~/.local/share/aquaproj-aqua + key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('**/aqua.yaml')}} + restore-keys: | + v1-aqua-installer-${{runner.os}}- + - uses: aquaproj/aqua-installer@v3.0.1 + with: + aqua_version: v2.36.1 + working_directory: common/aquaproj-aqua + - run: aqua update-checksum -deep -prune + working-directory: common/aquaproj-aqua + - run: git diff --exit-code + id: diff + continue-on-error: true + - name: Commit changes + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git add -A + git commit --amend --no-edit + git push origin -f + if: steps.diff.outcome == 'failure' + - run: aqua install --all --only-link + + approve: + runs-on: ubuntu-latest + needs: update-aqua-checksum + if: "github.event.pull_request.user.login == 'renovate[bot]' && contains(github.event.pull_request.body, ' **Automerge**: Enabled.')" + steps: + - uses: actions/checkout@v4 + - run: gh pr review ${{ github.event.number }} --approve + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..36d3a9c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist +.DS_Store diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..2f9d5214 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + ".gitconfig*": "properties" + } +} diff --git a/README.md b/README.md new file mode 100644 index 00000000..df2a252d --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# dotfiles + +Cross-platform dotfiles for Windows, Mac, and Ubuntu. + +## Setup + +> [!CAUTION] +> In Windows environment, Run it in Git Bash (not cmd or PowerShell!) + +```bash +git clone https://github.com/ras0q/dotfiles.git ~/dotfiles +cd ~/dotfiles +./install.sh +``` + +## Checklist After Setup + +### Common + +- [ ] Install fonts to your OS + - Font files are downloaded in `./dist` + +### WSL2 + +- [ ] `set -U NPIPERELAY_PATH {{ path to npiperelay }}` diff --git a/common/.bash_profile b/common/.bash_profile new file mode 100644 index 00000000..80823d15 --- /dev/null +++ b/common/.bash_profile @@ -0,0 +1 @@ +[ -f ~/.bashrc ] && source ~/.bashrc diff --git a/common/.bashrc b/common/.bashrc new file mode 100644 index 00000000..1c09244e --- /dev/null +++ b/common/.bashrc @@ -0,0 +1,12 @@ +PATH=$PATH:~/.local/bin +# add Go Path for VSCode +PATH=$PATH:~/.local/share/aquaproj-aqua/bin + +complete -C /home/ras/go/bin/xc xc + +# If fish is installed, use it +# NOTE: This command should be at the end of this file +if [[ $- == *i* ]] && command -v fish >/dev/null 2>&1; then + exec fish +fi + diff --git a/common/.gitconfig b/common/.gitconfig new file mode 100644 index 00000000..b2094503 --- /dev/null +++ b/common/.gitconfig @@ -0,0 +1,46 @@ +# Path: $HOME/.gitconfig + +[user] + name = ras0q + email = ras0q@users.noreply.github.com + signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKwlDquvYaQtT4cq1KWEC/S+W7et8oSyQjdib2VDObz8 + +[core] + editor = nvim + autoCRLF = false + quotepath = false + +[init] + defaultBranch = main + +[fetch] + prune = true + +[pull] + rebase = false + +[commit] + gpgsign = true + template = ~/.gittemplate.txt + +[push] + default = current + autoSetupRemote = true + +[alias] + bprune = !git branch --merged | egrep -v '\\*|develop|main|master' | xargs git branch -d + lo = log --oneline + inico = commit --allow-empty -m \":seedling: initial commit\" + fixup = commit --fixup HEAD + +[gpg] + format = ssh + +# Include system-wide .gitconfig +# XXX: +# If multiple keys are specified, the last one takes precedence, +# and even if the path does not exist, it will not cause an error. +# (simply not including the path) +[include] + path = ~/.gitconfig.mac + path = ~/.gitconfig.win diff --git a/common/.gittemplate.txt b/common/.gittemplate.txt new file mode 100644 index 00000000..908a186e --- /dev/null +++ b/common/.gittemplate.txt @@ -0,0 +1,15 @@ + + +# ✨ fe: Introduce new features. +# 🐛 bu: Fix a bug. +# 🩹 ad: Simple fix for a non-critical issue. +# ♻️ re: Refactor code. +# 💥 bo: Introduce breaking changes. +# 🎨 fo: Improve structure / format of the code. +# 🔥 rm: Remove code or files. +# ⏪️ rv: Revert changes. +# 💄 ui: Add or update the UI and style files. +# 🔧 co: Add or update configuration files. +# 📝 do: Add or update documentation. +# ⬆️ up: Upgrade dependencies. +# ✅ ch: Add, update, or pass tests. diff --git a/common/aquaproj-aqua/aqua-checksums.json b/common/aquaproj-aqua/aqua-checksums.json new file mode 100644 index 00000000..1db1a607 --- /dev/null +++ b/common/aquaproj-aqua/aqua-checksums.json @@ -0,0 +1,554 @@ +{ + "checksums": [ + { + "id": "github_content/github.com/dylanaraps/neofetch/7.1.0/neofetch", + "checksum": "3DC33493E54029FB1528251552093A9F9A2894FCF94F9C3A6F809136A42348C7", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/BurntSushi/ripgrep/14.1.1/ripgrep-14.1.1-aarch64-apple-darwin.tar.gz", + "checksum": "24AD76777745FBFF131C8FBC466742B011F925BFA4FFFA2DED6DEF23B5B937BE", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/BurntSushi/ripgrep/14.1.1/ripgrep-14.1.1-aarch64-unknown-linux-gnu.tar.gz", + "checksum": "C827481C4FF4EA10C9DC7A4022C8DE5DB34A5737CB74484D62EB94A95841AB2F", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/BurntSushi/ripgrep/14.1.1/ripgrep-14.1.1-x86_64-apple-darwin.tar.gz", + "checksum": "FC87E78F7CB3FEA12D69072E7EF3B21509754717B746368FD40D88963630E2B3", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/BurntSushi/ripgrep/14.1.1/ripgrep-14.1.1-x86_64-pc-windows-msvc.zip", + "checksum": "D0F534024C42AFD6CB4D38907C25CD2B249B79BBE6CC1DBEE8E3E37C2B6E25A1", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/BurntSushi/ripgrep/14.1.1/ripgrep-14.1.1-x86_64-unknown-linux-musl.tar.gz", + "checksum": "4CF9F2741E6C465FFDB7C26F38056A59E2A2544B51F7CC128EF28337EEAE4D8E", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/JohnnyMorganz/StyLua/v0.20.0/stylua-linux-aarch64.zip", + "checksum": "376B675766BC0B9261B2B82C8D0F624C7E5F78E83BD8490330E0BF3D8F770AD7", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/JohnnyMorganz/StyLua/v0.20.0/stylua-linux-x86_64.zip", + "checksum": "28EDDB9257BF85B20B1C337E536B7A3D16BA308863F067D447C1F4D24C6DEC64", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/JohnnyMorganz/StyLua/v0.20.0/stylua-macos-aarch64.zip", + "checksum": "F1B1CF758FD4346248C78640C9B62610B811B87190942EA828A8228DD8292EE6", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/JohnnyMorganz/StyLua/v0.20.0/stylua-macos-x86_64.zip", + "checksum": "858A3F6B69AAF4A1F94809F0371EDB4B27FA8D1DB230B55780C4B51194BC7125", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/JohnnyMorganz/StyLua/v0.20.0/stylua-windows-x86_64.zip", + "checksum": "1623AF48183BBDDA9A03C39EF35C1888CED8D4D14C9730F8B92783A7EBE3B3B6", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/Schniz/fnm/v1.37.2/fnm-arm64.zip", + "checksum": "8DB196F4BCBB2F27B4742BD5A898AB79D444006D121F888D9201BB3690419763", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/Schniz/fnm/v1.37.2/fnm-linux.zip", + "checksum": "439CCBC11E65DF970500833E152B896C107F3F3014EA7AAF42213241B403338C", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/Schniz/fnm/v1.37.2/fnm-macos.zip", + "checksum": "A886932043E8C1DEE457A733E57EDC39DF2287D9952A96948155DF2A0B6B26B1", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/Schniz/fnm/v1.37.2/fnm-windows.zip", + "checksum": "4F634F9153635E4AF26EA96B15C01A28E5E4ACC03849A0B51A86BE9C70897173", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/Wilfred/difftastic/0.60.0/difft-x86_64-apple-darwin.tar.gz", + "checksum": "397801E1C42D66B982001D90E7C8108382DDA0F81D66AA3B6A9A7DB39C1EEA68", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/Wilfred/difftastic/0.60.0/difft-x86_64-pc-windows-msvc.zip", + "checksum": "A31068E3D1719DCE1A1ABC16191BC2DF4A515926CD27C93B8A13393E7CB3ACB4", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/Wilfred/difftastic/0.60.0/difft-x86_64-unknown-linux-gnu.tar.gz", + "checksum": "E2979672768802E18E6C3B1C02682F914B37610C1A7F5364160D4B79C4B0A909", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/ajeetdsouza/zoxide/v0.9.6/zoxide-0.9.6-aarch64-apple-darwin.tar.gz", + "checksum": "B0B6DDB238DFF0CD787C1210F69AB1179544F56C165CFF112131DB78625EA6C4", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/ajeetdsouza/zoxide/v0.9.6/zoxide-0.9.6-aarch64-pc-windows-msvc.zip", + "checksum": "C40BF1972D383E20E87A0DBD9A57EAAFE52A30AA5A3D05BE632C14A256415C2D", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/ajeetdsouza/zoxide/v0.9.6/zoxide-0.9.6-aarch64-unknown-linux-musl.tar.gz", + "checksum": "7DA16A093B2AC16D577DC53D1F74A8199FC824C963FA3AAF77A6D9F294A895D5", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/ajeetdsouza/zoxide/v0.9.6/zoxide-0.9.6-x86_64-apple-darwin.tar.gz", + "checksum": "A0D49BB6F04E7A98B16F2869B813AA6AD131AA04BF6A8F13D2B6B199E4B07A8E", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/ajeetdsouza/zoxide/v0.9.6/zoxide-0.9.6-x86_64-pc-windows-msvc.zip", + "checksum": "49CF729C1788570CE9C76E59F3AA77668EF1302444FDD16AEEB5748D2890F4EC", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/ajeetdsouza/zoxide/v0.9.6/zoxide-0.9.6-x86_64-unknown-linux-musl.tar.gz", + "checksum": "EAA18F8ACA1F02E1A132A9EAC21B630918F96FA1CC7486AB87E7053DAD37B004", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/rye/0.41.0/rye-aarch64-linux.gz", + "checksum": "2E552844646428120919E6CC698CDEB28F5FE17903F6B4E963BAE98474C24D63", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/rye/0.41.0/rye-aarch64-macos.gz", + "checksum": "0751AA1F6D82921D44FE3503AAB2975F4A52F4EA589F2533A0172D66F31CB243", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/rye/0.41.0/rye-x86_64-linux.gz", + "checksum": "DB3B57FE48C0704B537C0D1E7028D15D06D5357271D96C8CD8B5FA98CFFC7B46", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/rye/0.41.0/rye-x86_64-macos.gz", + "checksum": "970962D3391849A649EA2D7325A0149A448C259FF30AAEC8C0CA57574F1302A0", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/rye/0.41.0/rye-x86_64-windows.exe", + "checksum": "8C78063A8C655C95F1C0F5C7FC4BFB9F3F863F84AB07199AF1CD4C1D25A40DDC", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/uv/0.4.26/uv-aarch64-apple-darwin.tar.gz", + "checksum": "42CDC5E7ADAD5348C8763EC3D57EF7972A25C034121D13424614B83849585303", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/uv/0.4.26/uv-aarch64-unknown-linux-musl.tar.gz", + "checksum": "8CE7AC4D93CF145B9D67642CB54F2311142FAD62A59FADB7CA36AD68A3108F98", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/uv/0.4.26/uv-x86_64-apple-darwin.tar.gz", + "checksum": "B424403D93939FA025B3F1DCC34F23B0676AD48D3C33C9486A4E55D095B8AD07", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/uv/0.4.26/uv-x86_64-pc-windows-msvc.zip", + "checksum": "1DFB521253945F381279D21B7C3F4E6539100A7FEFDCD0BC7080668237575CD3", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/astral-sh/uv/0.4.26/uv-x86_64-unknown-linux-musl.tar.gz", + "checksum": "C9DFE6A38354A85B3C4C4718703C23682C8CD7F5AD2E592458CB081B970F4C02", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/biomejs/biome/cli/v1.8.3/biome-darwin-arm64", + "checksum": "9D707C28EE8E13158D2B9890DD9FAF064A4EA6DABDE2009A6A8607480AE8C24A", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/biomejs/biome/cli/v1.8.3/biome-darwin-x64", + "checksum": "2CC112178363FA0E11D8F26E0D80598EFF6CE481A1EE224B8A8AE2B8A5185124", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/biomejs/biome/cli/v1.8.3/biome-linux-arm64", + "checksum": "D134E89F6F4FC29D32C8101EFB074969AC263EBDB0303E07039E3735002C6A2D", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/biomejs/biome/cli/v1.8.3/biome-linux-x64", + "checksum": "5495F2F69EDD94E9F26ED1ADB9ED8023D7C143C3CC6F275F90ABDDED612217E4", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/denoland/deno/v2.0.2/deno-aarch64-apple-darwin.zip", + "checksum": "D627BFFC38F7F5804656C71BB6AF8EE2F5C8010DF34886B4414D4C78514350DF", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/denoland/deno/v2.0.2/deno-aarch64-unknown-linux-gnu.zip", + "checksum": "BBD4C8BE2B45A1277BF4CAA48E4C0E7C4F3C305CAB0D3548971B9F93E9CE711E", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/denoland/deno/v2.0.2/deno-x86_64-apple-darwin.zip", + "checksum": "9AFD5DDC4CA123754115FEE4A4ED883B63343696A5380AF05DB263169A84F20F", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/denoland/deno/v2.0.2/deno-x86_64-pc-windows-msvc.zip", + "checksum": "154A0D309E1E41AE373824A9FE2CF2E38775C6C09C4C23FB52C6DEE61EE68260", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/denoland/deno/v2.0.2/deno-x86_64-unknown-linux-gnu.zip", + "checksum": "D5001850EF8CC317315A7CBEC20C9C8C7F44314F7D77410410F3559FCE5B90CE", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/eza-community/eza/v0.20.4/eza.exe_x86_64-pc-windows-gnu.tar.gz", + "checksum": "D92876D23037A355876F51853A8AB9040A95A861198D735F8FCA5E14FEBD479F", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/eza-community/eza/v0.20.4/eza_aarch64-unknown-linux-gnu.tar.gz", + "checksum": "A5668794A420AC619F8989CCA376DB3C2578DCC6F6B328652F05E3ACBF11D4FE", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/eza-community/eza/v0.20.4/eza_x86_64-unknown-linux-musl.tar.gz", + "checksum": "7520BF9EA2302DFD8F528CC4D0726D38BB7BF374A0068C316366FAF56A2866C2", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/helix-editor/helix/24.07/helix-24.07-aarch64-linux.tar.xz", + "checksum": "EEDADF9E54FF83AF3B2492168D797D322C09E73B917FA775799BB93E5B318A5D", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/helix-editor/helix/24.07/helix-24.07-aarch64-macos.tar.xz", + "checksum": "9685BB07B97F64DF0D7F5D8ACACF7A76247E475C2E5470C094C43680F3F81B5C", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/helix-editor/helix/24.07/helix-24.07-x86_64-linux.tar.xz", + "checksum": "C258204690C9080ED0D141B775BFDCD1EB57DF6C3D26E83E1E439004FE10AA5C", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/helix-editor/helix/24.07/helix-24.07-x86_64-macos.tar.xz", + "checksum": "EB3007B6F24037D7B9D7AACFCF57E552A9452CE461F58EE9CDCB6CFB9DF2D90A", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/helix-editor/helix/24.07/helix-24.07-x86_64-windows.zip", + "checksum": "3575F28A3E718005FFD803FA04AE8D26C83BA72131615182BEAFE7152CE831DD", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/jqlang/jq/jq-1.7.1/jq-linux-amd64", + "checksum": "5942C9B0934E510EE61EB3E30273F1B3FE2590DF93933A93D7C58B81D19C8FF5", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/jqlang/jq/jq-1.7.1/jq-linux-arm64", + "checksum": "4DD2D8A0661DF0B22F1BB9A1F9830F06B6F3B8F7D91211A1EF5D7C4F06A8B4A5", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/jqlang/jq/jq-1.7.1/jq-macos-amd64", + "checksum": "4155822BBF5EA90F5C79CF254665975EB4274D426D0709770C21774DE5407443", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/jqlang/jq/jq-1.7.1/jq-macos-arm64", + "checksum": "0BBE619E663E0DE2C550BE2FE0D240D076799D6F8A652B70FA04AEA8A8362E8A", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/jqlang/jq/jq-1.7.1/jq-windows-amd64.exe", + "checksum": "7451FBBF37FEFFB9BF262BD97C54F0DA558C63F0748E64152DD87B0A07B6D6AB", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/junegunn/fzf/v0.55.0/fzf-0.55.0-darwin_amd64.tar.gz", + "checksum": "B5BA0CAE4B6C7B8A572121933C2307FAC5AFFBEEC3E219AD93757250AAE859A4", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/junegunn/fzf/v0.55.0/fzf-0.55.0-darwin_arm64.tar.gz", + "checksum": "D9E796F54B485196572DBE5F72A3771296C8E74952DF19800A8D7D596921794D", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/junegunn/fzf/v0.55.0/fzf-0.55.0-linux_amd64.tar.gz", + "checksum": "4DF2393776942780DDAB2CEA713DDAAC06CD5C3886CD23BC9119A6D3AA1E02BD", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/junegunn/fzf/v0.55.0/fzf-0.55.0-linux_arm64.tar.gz", + "checksum": "7AFFBFB35ED2DA650DA7B62A9590EB9BC2FB083CFE055C9F4C794B0BBFEAEFCC", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/junegunn/fzf/v0.55.0/fzf-0.55.0-windows_amd64.zip", + "checksum": "48FEA906ED9914E2E9482055B7E8BBB90CBA23EF34C0473110B64EBD65352DF1", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/junegunn/fzf/v0.55.0/fzf-0.55.0-windows_arm64.zip", + "checksum": "A29BE4A358ED4F79BFB99C95141139236EB240E67B7665F9B1E4AAAD9F45BD84", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/koalaman/shellcheck/v0.10.0/shellcheck-v0.10.0.darwin.x86_64.tar.xz", + "checksum": "EF27684F23279D112D8AD84E0823642E43F838993BBB8C0963DB9B58A90464C2", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/koalaman/shellcheck/v0.10.0/shellcheck-v0.10.0.linux.aarch64.tar.xz", + "checksum": "324A7E89DE8FA2AED0D0C28F3DAB59CF84C6D74264022C00C22AF665ED1A09BB", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/koalaman/shellcheck/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz", + "checksum": "6C881AB0698E4E6EA235245F22832860544F17BA386442FE7E9D629F8CBEDF87", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/koalaman/shellcheck/v0.10.0/shellcheck-v0.10.0.zip", + "checksum": "EB6CD53A54EA97A56540E9D296CE7E2FA68715AA507FF23574646C1E12B2E143", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/neovim/neovim/v0.9.5/nvim-linux64.tar.gz", + "checksum": "44EE395D9B5F8A14BE8EC00D3B8EAD34E18FE6461E40C9C8C50E6956D643B6CA", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/neovim/neovim/v0.9.5/nvim-macos.tar.gz", + "checksum": "19D2366E0D6DA001583BD0B8A3DB59F69CE3DDA5FA41F3064C6778CEF3EDD34C", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/neovim/neovim/v0.9.5/nvim-win64.zip", + "checksum": "DE6DC1F0EDB45F5F225EE24CE80A4FCBC3A337932037E98AE143975FCA2556BF", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/sharkdp/fd/v10.2.0/fd-v10.2.0-aarch64-unknown-linux-gnu.tar.gz", + "checksum": "6DE8BE7A3D8CA27954A6D1E22BC327AF4CF6FC7622791E68B820197F915C422B", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/sharkdp/fd/v10.2.0/fd-v10.2.0-x86_64-apple-darwin.tar.gz", + "checksum": "991A648A58870230AF9547C1AE33E72CB5C5199A622FE5E540E162D6DBA82D48", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/sharkdp/fd/v10.2.0/fd-v10.2.0-x86_64-pc-windows-msvc.zip", + "checksum": "92AC9E6B0A0C6ECDAB638FFE210DC786403FFF4C66373604CF70DF27BE45E4FE", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/sharkdp/fd/v10.2.0/fd-v10.2.0-x86_64-unknown-linux-musl.tar.gz", + "checksum": "D9BFA25EC28624545C222992E1B00673B7C9CA5EB15393C40369F10B28F9C932", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/starship/starship/v1.21.1/starship-aarch64-apple-darwin.tar.gz", + "checksum": "CF1BF179C10B82EC05915323FBEBABCC8F5BE9A55678684706AF4E1FF117EC89", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/starship/starship/v1.21.1/starship-aarch64-pc-windows-msvc.zip", + "checksum": "A5E6AE7EA06BD82BA7047435F63187A5024D5109FAAC20EC975DB4D690788344", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/starship/starship/v1.21.1/starship-aarch64-unknown-linux-musl.tar.gz", + "checksum": "3AC9D7015E9DD0E15B26C5EFC584C2BC79C3D6D92735FDEC4C37AE98161E7D02", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/starship/starship/v1.21.1/starship-x86_64-apple-darwin.tar.gz", + "checksum": "80288312DA78C0DEBE9DD76A1D5CA08D95D1C56BBD18A761077F016B5D8D4689", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/starship/starship/v1.21.1/starship-x86_64-pc-windows-msvc.zip", + "checksum": "19CE36E44825289D56E9AF10C5D5F30310073B233F64B8A99DD21402B6C2F007", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/starship/starship/v1.21.1/starship-x86_64-unknown-linux-musl.tar.gz", + "checksum": "744E21EB2E61B85B0C11378520EBB9E94218DE965BCA5B8C2266F6C3E23FF5BE", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/tree-sitter/tree-sitter/v0.24.3/tree-sitter-linux-arm64.gz", + "checksum": "319AA4FFBA11967CD3667658EE7DC588E374A58B5CC3179535078A3E6C19C7C6", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/tree-sitter/tree-sitter/v0.24.3/tree-sitter-linux-x64.gz", + "checksum": "4F77807A8BAB1C166CD416648806BA3CBC2B20218C301B964EF65B68C7FE3DA0", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/tree-sitter/tree-sitter/v0.24.3/tree-sitter-macos-arm64.gz", + "checksum": "03DCC32A30F6B66F28843C5DDC634E51114E655C6F2EFE72414400D6F1878CD5", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/tree-sitter/tree-sitter/v0.24.3/tree-sitter-macos-x64.gz", + "checksum": "9583E392A28470F2A8C4E5AC0937A8888966719E9DAD6D91389E1D7BAA371C2F", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/tree-sitter/tree-sitter/v0.24.3/tree-sitter-windows-x64.gz", + "checksum": "F58A7D59A5499EEAF76288C633EBBC56B5CD2839CFED9C8C2D55005A47709D3B", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/x-motemen/ghq/v1.6.2/ghq_darwin_amd64.zip", + "checksum": "DFC7A33DB55043CB622EC1976C8374020148FC48365152BE87B765F0B05F4CA1", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/x-motemen/ghq/v1.6.2/ghq_darwin_arm64.zip", + "checksum": "CDECCDC896D511D583F1A585786AE94604B3B375E3ACE95ECE8DA9ADEF11E743", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/x-motemen/ghq/v1.6.2/ghq_linux_amd64.zip", + "checksum": "B4883F3B4E4771E95BCB34C3E262D48BF2A76A1148AA46EDD273BF347C924A4C", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/x-motemen/ghq/v1.6.2/ghq_linux_arm64.zip", + "checksum": "257A1A8BADD67DD2F10224D0556D9A6C43A8B9474412147E8E560A3ABEDBAAF7", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/x-motemen/ghq/v1.6.2/ghq_windows_amd64.zip", + "checksum": "30FE26F89EFEE769306D3A3C8DDDB996C1E60C58D74750EB7EA7C84B64066A6A", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/x-motemen/ghq/v1.6.2/ghq_windows_arm64.zip", + "checksum": "6BC237E823B10F35D20E608E09E9E6768CF86EB75A1EFD906B624C3C52D47DF3", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/ynqa/jnv/v0.4.1/jnv-x86_64-apple-darwin.tar.xz", + "checksum": "11B7824ED7ED78ABFDA3F39B2583FDE718BDFB50F2DB1100014BF1064627DA9F", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/ynqa/jnv/v0.4.1/jnv-x86_64-unknown-linux-gnu.tar.xz", + "checksum": "82DF03D2121C23609F54E8F11A3D48809768C9CFBD0A59C247A4447EFE160AE4", + "algorithm": "sha256" + }, + { + "id": "http/cache.agilebits.com/dist/1P/op2/pkg/v2.30.0/op_darwin_amd64_v2.30.0.zip", + "checksum": "DA3C1FD900A82A2D62AA197E5A984662AB2B237A0B6EE74C963FA28712BF6563", + "algorithm": "sha256" + }, + { + "id": "http/cache.agilebits.com/dist/1P/op2/pkg/v2.30.0/op_darwin_arm64_v2.30.0.zip", + "checksum": "3B31DBC413AD3E205BB68F055A2A76C1A3F0EA252270DB6A908083B852B76BE3", + "algorithm": "sha256" + }, + { + "id": "http/cache.agilebits.com/dist/1P/op2/pkg/v2.30.0/op_linux_amd64_v2.30.0.zip", + "checksum": "CD5361B074CD40EB2B332885F35A4D61C74369919CED95190C885F4D4F739DC7", + "algorithm": "sha256" + }, + { + "id": "http/cache.agilebits.com/dist/1P/op2/pkg/v2.30.0/op_linux_arm64_v2.30.0.zip", + "checksum": "C0618A4D4DEFA5D61606DFB4EAF7D5F39CF6361382C4943449DF95FA1F7CC310", + "algorithm": "sha256" + }, + { + "id": "http/cache.agilebits.com/dist/1P/op2/pkg/v2.30.0/op_windows_amd64_v2.30.0.zip", + "checksum": "9F977D7E16684489B6F648126778489B97055636468946741EDED742F2ABCAA7", + "algorithm": "sha256" + }, + { + "id": "http/golang.org/dl/go1.23.2.darwin-amd64.tar.gz", + "checksum": "445C0EF19D8692283F4C3A92052CC0568F5A048F4E546105F58E991D4AEA54F5", + "algorithm": "sha256" + }, + { + "id": "http/golang.org/dl/go1.23.2.darwin-arm64.tar.gz", + "checksum": "D87031194FE3E01ABDCAF3C7302148ADE97A7ADD6EAC3FEC26765BCB3207B80F", + "algorithm": "sha256" + }, + { + "id": "http/golang.org/dl/go1.23.2.linux-amd64.tar.gz", + "checksum": "542D3C1705F1C6A1C5A80D5DC62E2E45171AF291E755D591C5E6531EF63B454E", + "algorithm": "sha256" + }, + { + "id": "http/golang.org/dl/go1.23.2.linux-arm64.tar.gz", + "checksum": "F626CDD92FC21A88B31C1251F419C17782933A42903DB87A174CE74EEECC66A9", + "algorithm": "sha256" + }, + { + "id": "http/golang.org/dl/go1.23.2.windows-amd64.zip", + "checksum": "BC28FE3002CD65CEC65D0E4F6000584DACB8C71BFAFF8801DFB532855CA42513", + "algorithm": "sha256" + }, + { + "id": "http/golang.org/dl/go1.23.2.windows-arm64.zip", + "checksum": "0D50BADE977B84E173CB350946087F5DE8C75F8DF19456C3B60C5D58E186089D", + "algorithm": "sha256" + }, + { + "id": "http/ziglang.org/download/0.13.0/zig-linux-aarch64-0.13.0.tar.xz", + "checksum": "041AC42323837EB5624068ACD8B00CD5777DAC4CF91179E8DAD7A7E90DD0C556", + "algorithm": "sha256" + }, + { + "id": "http/ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz", + "checksum": "D45312E61EBCC48032B77BC4CF7FD6915C11FA16E4AAD116B66C9468211230EA", + "algorithm": "sha256" + }, + { + "id": "http/ziglang.org/download/0.13.0/zig-macos-aarch64-0.13.0.tar.xz", + "checksum": "46FAE219656545DFAF4DCE12FB4E8685CEC5B51D721BEEE9389AB4194D43394C", + "algorithm": "sha256" + }, + { + "id": "http/ziglang.org/download/0.13.0/zig-macos-x86_64-0.13.0.tar.xz", + "checksum": "8B06ED1091B2269B700B3B07F8E3BE3B833000841BAE5AA6A09B1A8B4773EFFD", + "algorithm": "sha256" + }, + { + "id": "http/ziglang.org/download/0.13.0/zig-windows-aarch64-0.13.0.zip", + "checksum": "95FF88427AF7BA2B4F312F45D2377CE7A033E5E3C620C8CAAA396A9ABA20EFDA", + "algorithm": "sha256" + }, + { + "id": "http/ziglang.org/download/0.13.0/zig-windows-x86_64-0.13.0.zip", + "checksum": "D859994725EF9402381E557C60BB57497215682E355204D754EE3DF75EE3C158", + "algorithm": "sha256" + }, + { + "id": "registries/github_content/github.com/aquaproj/aqua-registry/v4.238.0/registry.yaml", + "checksum": "09D0FCEE469D485AECB7652721F454CC5D0F56B640D3349413C078BC1A6F9FB7086A22A30E5C2F7566C778060E1FA2FA18ACE74D3910DA755E53A95AE934280F", + "algorithm": "sha512" + } + ] +} diff --git a/common/aquaproj-aqua/aqua.yaml b/common/aquaproj-aqua/aqua.yaml new file mode 100644 index 00000000..f1659c31 --- /dev/null +++ b/common/aquaproj-aqua/aqua.yaml @@ -0,0 +1,36 @@ +--- +# aqua - Declarative CLI Version Manager +# https://aquaproj.github.io/ +checksum: + enabled: true + require_checksum: true + supported_envs: + - all +registries: +- type: standard + ref: v4.238.0 # renovate: depName=aquaproj/aqua-registry +packages: +- name: junegunn/fzf@v0.55.0 +- name: x-motemen/ghq@v1.6.2 +- name: golang/go@go1.23.2 +- name: jqlang/jq@jq-1.7.1 +- name: neovim/neovim@v0.9.5 +- name: starship/starship@v1.21.1 +- name: ajeetdsouza/zoxide@v0.9.6 +- name: mitsuhiko/rye@0.41.0 +- name: BurntSushi/ripgrep@14.1.1 +- name: dylanaraps/neofetch@7.1.0 +- name: eza-community/eza@v0.20.4 +- name: tree-sitter/tree-sitter@v0.24.3 +- name: denoland/deno@v2.0.2 +- name: ziglang/zig@0.13.0 +- name: sharkdp/fd@v10.2.0 +- name: ynqa/jnv@v0.4.1 +- name: JohnnyMorganz/StyLua@v0.20.0 +- name: helix-editor/helix@24.07 +- name: Schniz/fnm@v1.37.2 +- name: biomejs/biome@cli/v1.8.3 +- name: koalaman/shellcheck@v0.10.0 +- name: Wilfred/difftastic@0.60.0 +- name: astral-sh/uv@0.4.26 +- name: 1password/cli@v2.30.0 diff --git a/common/fish/.gitignore b/common/fish/.gitignore new file mode 100644 index 00000000..23efee95 --- /dev/null +++ b/common/fish/.gitignore @@ -0,0 +1 @@ +fish_variables diff --git a/common/fish/completions/fisher.fish b/common/fish/completions/fisher.fish new file mode 100644 index 00000000..6d23ce49 --- /dev/null +++ b/common/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +complete --command fisher --exclusive --long help --description "Print help" +complete --command fisher --exclusive --long version --description "Print version" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" +complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/common/fish/completions/pnpm.fish b/common/fish/completions/pnpm.fish new file mode 100644 index 00000000..175273e3 --- /dev/null +++ b/common/fish/completions/pnpm.fish @@ -0,0 +1,23 @@ +###-begin-pnpm-completion-### +function _pnpm_completion + set cmd (commandline -o) + set cursor (commandline -C) + set words (count $cmd) + + set completions (eval env DEBUG=\"" \"" COMP_CWORD=\""$words\"" COMP_LINE=\""$cmd \"" COMP_POINT=\""$cursor\"" SHELL=fish pnpm completion-server -- $cmd) + + if [ "$completions" = "__tabtab_complete_files__" ] + set -l matches (commandline -ct)* + if [ -n "$matches" ] + __fish_complete_path (commandline -ct) + end + else + for completion in $completions + echo -e $completion + end + end +end + +complete -f -d 'pnpm' -c pnpm -a "(_pnpm_completion)" +###-end-pnpm-completion-### + diff --git a/common/fish/completions/xc.fish b/common/fish/completions/xc.fish new file mode 100644 index 00000000..717d4808 --- /dev/null +++ b/common/fish/completions/xc.fish @@ -0,0 +1,9 @@ + +function __complete_xc + set -lx COMP_LINE (commandline -cp) + test -z (commandline -ct) + and set COMP_LINE "$COMP_LINE " + /home/ras/go/bin/xc +end +complete -f -c xc -a "(__complete_xc)" + diff --git a/common/fish/conf.d/_variables.fish b/common/fish/conf.d/_variables.fish new file mode 100644 index 00000000..f6dd4822 --- /dev/null +++ b/common/fish/conf.d/_variables.fish @@ -0,0 +1,7 @@ +# Common universal variables +# This file do not force users to rewrite all variables in fish_variables. + +set -q AQUA_GLOBAL_CONFIG; or set -Ux AQUA_GLOBAL_CONFIG ~/.config/aquaproj-aqua/aqua.yaml +set -q EDITOR; or set -Ux EDITOR nvim +set -q GOPATH; or set -Ux GOPATH ~/go +set -q LANG; or set -Ux LANG POSIX diff --git a/common/fish/conf.d/abbr.fish b/common/fish/conf.d/abbr.fish new file mode 100644 index 00000000..ba5f4ee1 --- /dev/null +++ b/common/fish/conf.d/abbr.fish @@ -0,0 +1,28 @@ +# git +abbr -a ga 'git add -A && git commit' +abbr -a gc 'git commit' +abbr -a gs 'git switch' +abbr -a gst 'git status' +abbr -a gp 'git push' +abbr -a gpp 'git pull && git bprune' + +# docker +abbr -a d docker +abbr -a dc 'docker compose' + +# ls (eza) +abbr -a la 'eza -al' +abbr -a ll 'eza -l' +abbr -a ls eza + +# others +abbr -a aqi 'aqua g -i && aqua upc -a -deep -prune && aqua i -a' +abbr -a bd 'brew bundle dump --global --tap --formula -f' +abbr -a c 'code .' +abbr -a grm 'rm -i $GOPATH/bin/(ls $GOPATH/bin | fzf)' +abbr -a gg 'ghq get' +abbr -a h 'hx .' +abbr -a n nvim +abbr -a nn 'nvim .' +abbr -a pp pnpm +abbr -a sc systemctl diff --git a/common/fish/conf.d/autopair.fish b/common/fish/conf.d/autopair.fish new file mode 100644 index 00000000..abb4bf3e --- /dev/null +++ b/common/fish/conf.d/autopair.fish @@ -0,0 +1,39 @@ +status is-interactive || exit + +set --global autopair_left "(" "[" "{" '"' "'" +set --global autopair_right ")" "]" "}" '"' "'" +set --global autopair_pairs "()" "[]" "{}" '""' "''" + +function _autopair_fish_key_bindings --on-variable fish_key_bindings + set --query fish_key_bindings[1] || return + + test $fish_key_bindings = fish_default_key_bindings && + set --local mode default insert || + set --local mode insert default + + bind --mode $mode[-1] --erase \177 \b \t + + bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫ + bind --mode $mode[1] \b _autopair_backspace + bind --mode $mode[1] \t _autopair_tab + + printf "%s\n" $autopair_pairs | while read --local left right --delimiter "" + bind --mode $mode[-1] --erase $left $right + if test $left = $right + bind --mode $mode[1] $left "_autopair_insert_same \\$left" + else + bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right" + bind --mode $mode[1] $right "_autopair_insert_right \\$right" + end + end +end + +_autopair_fish_key_bindings + +function _autopair_uninstall --on-event autopair_uninstall + string collect ( + bind --all | string replace --filter --regex -- "_autopair.*" --erase + set --names | string replace --filter --regex -- "^autopair" "set --erase autopair" + ) | source + functions --erase (functions --all | string match "_autopair_*") +end diff --git a/common/fish/conf.d/fnm.fish b/common/fish/conf.d/fnm.fish new file mode 100644 index 00000000..5b874c72 --- /dev/null +++ b/common/fish/conf.d/fnm.fish @@ -0,0 +1 @@ +fnm env --use-on-cd | source diff --git a/common/fish/conf.d/wsl2_setup_sshagent.fish b/common/fish/conf.d/wsl2_setup_sshagent.fish new file mode 100644 index 00000000..c2a64287 --- /dev/null +++ b/common/fish/conf.d/wsl2_setup_sshagent.fish @@ -0,0 +1,21 @@ +# setup 1Password SSH agent for WSL2 + +if ! string match -q "*microsoft*" (uname -r) + exit 0 +end + +set -q SSH_AUTH_SOCK; or set -Ux SSH_AUTH_SOCK ~/.ssh/agent.sock +set -q NPIPERELAY_PATH; or begin + # set -U NPIPERELAY_PATH {{ path to npiperelay }} + echo (set_color yellow)WARNING: \$NPIPERELAY_PATH is not set. 1Password SSH Agent will not be set up.(set_color normal) + exit 0 +end + +if ! ss -a | grep -q $SSH_AUTH_SOCK >/dev/null 2>&1 + if test -e $SSH_AUTH_SOCK + echo "removing previous socket..." + rm -f $SSH_AUTH_SOCK + end + echo "Starting SSH-Agent relay..." + eval (setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"$NPIPERELAY_PATH -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1 +end diff --git a/common/fish/config.fish b/common/fish/config.fish new file mode 100644 index 00000000..f10ff05b --- /dev/null +++ b/common/fish/config.fish @@ -0,0 +1,26 @@ +# $fish_user_paths +fish_add_path \ + ~/.local/share/aquaproj-aqua/bin \ + ~/go/bin \ + ~/.rye/shims \ + ~/.volta/bin \ + ~/.cargo/bin \ + ~/.deno/bin \ + /opt/homebrew/bin \ + /opt/homebrew/opt/openjdk/bin +set -q CODE_BIN; and fish_add_path $CODE_BIN +set -q PWSH_BIN; and fish_add_path $PWSH_BIN + +# fzf +fzf --fish | source + +# starship +starship init fish --print-full-init \ + | sed "s@(which starship)@(aqua which starship)@g" \ + | source + +# zoxide +zoxide init --cmd cd --hook pwd fish | source + +# fnm +fnm completions --shell fish | source diff --git a/common/fish/functions/__bass.py b/common/fish/functions/__bass.py new file mode 100644 index 00000000..3f02bd40 --- /dev/null +++ b/common/fish/functions/__bass.py @@ -0,0 +1,140 @@ +""" +To be used with a companion fish function like this: + + function refish + set -l _x (python /tmp/bass.py source ~/.nvm/nvim.sh ';' nvm use iojs); source $_x; and rm -f $_x + end + +""" + +from __future__ import print_function + +import json +import os +import signal +import subprocess +import sys +import traceback + + +BASH = 'bash' + +FISH_READONLY = [ + 'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version', + 'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode' +] + +IGNORED = [ + 'PS1', 'XPC_SERVICE_NAME' +] + +def ignored(name): + if name == 'PWD': # this is read only, but has special handling + return False + # ignore other read only variables + if name in FISH_READONLY: + return True + if name in IGNORED or name.startswith("BASH_FUNC"): + return True + if name.startswith('%'): + return True + return False + +def escape(string): + # use json.dumps to reliably escape quotes and backslashes + return json.dumps(string).replace(r'$', r'\$') + +def escape_identifier(word): + return escape(word.replace('?', '\\?')) + +def comment(string): + return '\n'.join(['# ' + line for line in string.split('\n')]) + +def gen_script(): + # Use the following instead of /usr/bin/env to read environment so we can + # deal with multi-line environment variables (and other odd cases). + env_reader = "%s -c 'import os,json; print(json.dumps({k:v for k,v in os.environ.items()}))'" % (sys.executable) + args = [BASH, '-c', env_reader] + output = subprocess.check_output(args, universal_newlines=True) + old_env = output.strip() + + pipe_r, pipe_w = os.pipe() + if sys.version_info >= (3, 4): + os.set_inheritable(pipe_w, True) + command = 'eval $1 && ({}; alias) >&{}'.format( + env_reader, + pipe_w + ) + args = [BASH, '-c', command, 'bass', ' '.join(sys.argv[1:])] + p = subprocess.Popen(args, universal_newlines=True, close_fds=False) + os.close(pipe_w) + with os.fdopen(pipe_r) as f: + new_env = f.readline() + alias_str = f.read() + if p.wait() != 0: + raise subprocess.CalledProcessError( + returncode=p.returncode, + cmd=' '.join(sys.argv[1:]), + output=new_env + alias_str + ) + new_env = new_env.strip() + + old_env = json.loads(old_env) + new_env = json.loads(new_env) + + script_lines = [] + + for k, v in new_env.items(): + if ignored(k): + continue + v1 = old_env.get(k) + if not v1: + script_lines.append(comment('adding %s=%s' % (k, v))) + elif v1 != v: + script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v))) + # process special variables + if k == 'PWD': + script_lines.append('cd %s' % escape(v)) + continue + else: + continue + if k == 'PATH': + value = ' '.join([escape(directory) + for directory in v.split(':')]) + else: + value = escape(v) + script_lines.append('set -g -x %s %s' % (k, value)) + + for var in set(old_env.keys()) - set(new_env.keys()): + script_lines.append(comment('removing %s' % var)) + script_lines.append('set -e %s' % var) + + script = '\n'.join(script_lines) + + alias_lines = [] + for line in alias_str.splitlines(): + _, rest = line.split(None, 1) + k, v = rest.split("=", 1) + alias_lines.append("alias " + escape_identifier(k) + "=" + v) + alias = '\n'.join(alias_lines) + + return script + '\n' + alias + +script_file = os.fdopen(3, 'w') + +if not sys.argv[1:]: + print('__bass_usage', file=script_file, end='') + sys.exit(0) + +try: + script = gen_script() +except subprocess.CalledProcessError as e: + sys.exit(e.returncode) +except Exception: + print('Bass internal error!', file=sys.stderr) + raise # traceback will output to stderr +except KeyboardInterrupt: + signal.signal(signal.SIGINT, signal.SIG_DFL) + os.kill(os.getpid(), signal.SIGINT) +else: + script_file.write(script) diff --git a/common/fish/functions/_autopair_backspace.fish b/common/fish/functions/_autopair_backspace.fish new file mode 100644 index 00000000..a43fa79d --- /dev/null +++ b/common/fish/functions/_autopair_backspace.fish @@ -0,0 +1,9 @@ +function _autopair_backspace + set --local index (commandline --cursor) + set --local buffer (commandline) + + test $index -ge 1 && + contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs && + commandline --function delete-char + commandline --function backward-delete-char +end diff --git a/common/fish/functions/_autopair_insert_left.fish b/common/fish/functions/_autopair_insert_left.fish new file mode 100644 index 00000000..f078e861 --- /dev/null +++ b/common/fish/functions/_autopair_insert_left.fish @@ -0,0 +1,13 @@ +function _autopair_insert_left --argument-names left right + set --local buffer (commandline) + set --local before (commandline --cut-at-cursor) + + commandline --insert -- $left + + switch "$buffer" + case "$before"{," "\*,$autopair_right\*} + set --local index (commandline --cursor) + commandline --insert -- $right + commandline --cursor $index + end +end diff --git a/common/fish/functions/_autopair_insert_right.fish b/common/fish/functions/_autopair_insert_right.fish new file mode 100644 index 00000000..a0bd61c6 --- /dev/null +++ b/common/fish/functions/_autopair_insert_right.fish @@ -0,0 +1,11 @@ +function _autopair_insert_right --argument-names key + set --local buffer (commandline) + set --local before (commandline --cut-at-cursor) + + switch "$buffer" + case "$before$key"\* + commandline --cursor (math (commandline --cursor) + 1) + case \* + commandline --insert -- $key + end +end diff --git a/common/fish/functions/_autopair_insert_same.fish b/common/fish/functions/_autopair_insert_same.fish new file mode 100644 index 00000000..27f971de --- /dev/null +++ b/common/fish/functions/_autopair_insert_same.fish @@ -0,0 +1,20 @@ +function _autopair_insert_same --argument-names key + set --local buffer (commandline) + set --local index (commandline --cursor) + set --local next (string sub --start=(math $index + 1) --length=1 -- "$buffer") + + if test (math (count (string match --all --regex -- "$key" "$buffer")) % 2) = 0 + test $key = $next && commandline --cursor (math $index + 1) && return + + commandline --insert -- $key + + if test $index -lt 1 || + contains -- (string sub --start=$index --length=1 -- "$buffer") "" " " $autopair_left && + contains -- $next "" " " $autopair_right + commandline --insert -- $key + commandline --cursor (math $index + 1) + end + else + commandline --insert -- $key + end +end diff --git a/common/fish/functions/_autopair_tab.fish b/common/fish/functions/_autopair_tab.fish new file mode 100644 index 00000000..b74a0fb4 --- /dev/null +++ b/common/fish/functions/_autopair_tab.fish @@ -0,0 +1,7 @@ +function _autopair_tab + commandline --paging-mode && down-or-search && return + + string match --quiet --regex -- '\$[^\s]*"$' (commandline --current-token) && + commandline --function delete-char + commandline --function complete +end diff --git a/common/fish/functions/aqua_checksum.fish b/common/fish/functions/aqua_checksum.fish new file mode 100644 index 00000000..0fe2e72e --- /dev/null +++ b/common/fish/functions/aqua_checksum.fish @@ -0,0 +1,4 @@ +function aqua_checksum + set fish_trace 1 + aqua update-checksum -a -deep -prune +end diff --git a/common/fish/functions/bass.fish b/common/fish/functions/bass.fish new file mode 100644 index 00000000..2b3af165 --- /dev/null +++ b/common/fish/functions/bass.fish @@ -0,0 +1,29 @@ +function bass + set -l bash_args $argv + set -l bass_debug + if test "$bash_args[1]_" = '-d_' + set bass_debug true + set -e bash_args[1] + end + + set -l script_file (mktemp) + if command -v python3 >/dev/null 2>&1 + command python3 -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file + else + command python -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file + end + set -l bass_status $status + if test $bass_status -ne 0 + return $bass_status + end + + if test -n "$bass_debug" + cat $script_file + end + source $script_file + command rm $script_file +end + +function __bass_usage + echo "Usage: bass [-d] " +end diff --git a/common/fish/functions/brew_dump.fish b/common/fish/functions/brew_dump.fish new file mode 100644 index 00000000..ed30bb22 --- /dev/null +++ b/common/fish/functions/brew_dump.fish @@ -0,0 +1,5 @@ +function brew_dump + set fish_trace 1 + brew bundle dump --global -f + brew bundle --global +end diff --git a/common/fish/functions/fish_greeting.fish b/common/fish/functions/fish_greeting.fish new file mode 100644 index 00000000..c131f62a --- /dev/null +++ b/common/fish/functions/fish_greeting.fish @@ -0,0 +1,5 @@ +# https://github.com/oh-my-fish/theme-bobthefish/blob/master/functions/fish_greeting.fish +function fish_greeting -d "What's up, fish?" + uname -nmsr + uptime +end diff --git a/common/fish/functions/fish_user_key_bindings.fish b/common/fish/functions/fish_user_key_bindings.fish new file mode 100644 index 00000000..d217cf51 --- /dev/null +++ b/common/fish/functions/fish_user_key_bindings.fish @@ -0,0 +1,3 @@ +function fish_user_key_bindings + bind \cg gf_open +end diff --git a/common/fish/functions/fisher.fish b/common/fish/functions/fisher.fish new file mode 100644 index 00000000..b1513d3b --- /dev/null +++ b/common/fish/functions/fisher.fish @@ -0,0 +1,240 @@ +function fisher --argument-names cmd --description "A plugin manager for Fish" + set --query fisher_path || set --local fisher_path $__fish_config_dir + set --local fisher_version 4.4.4 + set --local fish_plugins $__fish_config_dir/fish_plugins + + switch "$cmd" + case -v --version + echo "fisher, version $fisher_version" + case "" -h --help + echo "Usage: fisher install Install plugins" + echo " fisher remove Remove installed plugins" + echo " fisher update Update installed plugins" + echo " fisher update Update all installed plugins" + echo " fisher list [] List installed plugins matching regex" + echo "Options:" + echo " -v, --version Print version" + echo " -h, --help Print this help message" + echo "Variables:" + echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~ + case ls list + string match --entire --regex -- "$argv[2]" $_fisher_plugins + case install update remove + isatty || read --local --null --array stdin && set --append argv $stdin + + set --local install_plugins + set --local update_plugins + set --local remove_plugins + set --local arg_plugins $argv[2..-1] + set --local old_plugins $_fisher_plugins + set --local new_plugins + + test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins) + + if ! set --query argv[2] + if test "$cmd" != update + echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1 + else if ! set --query file_plugins + echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1 + end + set arg_plugins $file_plugins + end + + for plugin in $arg_plugins + set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin) + contains -- "$plugin" $new_plugins || set --append new_plugins $plugin + end + + if set --query argv[2] + for plugin in $new_plugins + if contains -- "$plugin" $old_plugins + test "$cmd" = remove && + set --append remove_plugins $plugin || + set --append update_plugins $plugin + else if test "$cmd" = install + set --append install_plugins $plugin + else + echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1 + end + end + else + for plugin in $new_plugins + contains -- "$plugin" $old_plugins && + set --append update_plugins $plugin || + set --append install_plugins $plugin + end + + for plugin in $old_plugins + contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin + end + end + + set --local pid_list + set --local source_plugins + set --local fetch_plugins $update_plugins $install_plugins + set --local fish_path (status fish-path) + + echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal) + + for plugin in $fetch_plugins + set --local source (command mktemp -d) + set --append source_plugins $source + + command mkdir -p $source/{completions,conf.d,themes,functions} + + $fish_path --command " + if test -e $plugin + command cp -Rf $plugin/* $source + else + set temp (command mktemp -d) + set repo (string split -- \@ $plugin) || set repo[2] HEAD + + if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1]) + set name (string split -- / \$path)[-1] + set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz + else + set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2] + end + + echo Fetching (set_color --underline)\$url(set_color normal) + + if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null + command cp -Rf \$temp/*/* $source + else + echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 + command rm -rf $source + end + + command rm -rf \$temp + end + + set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files + " & + + set --append pid_list (jobs --last --pid) + end + + wait $pid_list 2>/dev/null + + for plugin in $fetch_plugins + if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source + if set --local index (contains --index -- "$plugin" $install_plugins) + set --erase install_plugins[$index] + else + set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)] + end + end + end + + for plugin in $update_plugins $remove_plugins + if set --local index (contains --index -- "$plugin" $_fisher_plugins) + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + + if contains -- "$plugin" $remove_plugins + for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var) + emit {$name}_uninstall + end + printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ + set --erase _fisher_plugins[$index] + end + + command rm -rf (string replace -- \~ ~ $$plugin_files_var) + + functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var) + + for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var) + complete --erase --command $name + end + + set --erase $plugin_files_var + end + end + + if set --query update_plugins[1] || set --query install_plugins[1] + command mkdir -p $fisher_path/{functions,themes,conf.d,completions} + end + + for plugin in $update_plugins $install_plugins + set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] + set --local files $source/{functions,themes,conf.d,completions}/* + + if set --local index (contains --index -- $plugin $install_plugins) + set --local user_files $fisher_path/{functions,themes,conf.d,completions}/* + set --local conflict_files + + for file in (string replace -- $source/ $fisher_path/ $files) + contains -- $file $user_files && set --append conflict_files $file + end + + if set --query conflict_files[1] && set --erase install_plugins[$index] + echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2 + continue + end + end + + for file in (string replace -- $source/ "" $files) + command cp -RLf $source/$file $fisher_path/$file + end + + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + + set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~) + + contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin + contains -- $plugin $install_plugins && set --local event install || set --local event update + + printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ + + for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~) + source $file + if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file) + emit {$name}_$event + end + end + end + + command rm -rf $source_plugins + + if set --query _fisher_plugins[1] + set --local commit_plugins + + for plugin in $file_plugins + contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin + end + + for plugin in $_fisher_plugins + contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin + end + + printf "%s\n" $commit_plugins >$fish_plugins + else + set --erase _fisher_plugins + command rm -f $fish_plugins + end + + set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins) + + test "$total" != "0 0 0" && echo (string join ", " ( + test $total[1] = 0 || echo "Installed $total[1]") ( + test $total[2] = 0 || echo "Updated $total[2]") ( + test $total[3] = 0 || echo "Removed $total[3]") + ) plugin/s + case \* + echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1 + end +end + +if ! set --query _fisher_upgraded_to_4_4 + set --universal _fisher_upgraded_to_4_4 + if functions --query _fisher_list + set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share + command rm -rf $XDG_DATA_HOME/fisher + functions --erase _fisher_{list,plugin_parse} + fisher update >/dev/null 2>/dev/null + else + for var in (set --names | string match --entire --regex '^_fisher_.+_files$') + set $var (string replace -- ~ \~ $$var) + end + functions --erase _fisher_fish_postexec + end +end diff --git a/common/fish/functions/gf.fish b/common/fish/functions/gf.fish new file mode 100644 index 00000000..91f7673e --- /dev/null +++ b/common/fish/functions/gf.fish @@ -0,0 +1,11 @@ +function gf -d 'Repository search with ghq & fzf' + ghq list | fzf | read select + if test -n "$select" + cd (ghq root)/$select + echo "$select" + commandline -f repaint + else + echo "No repository selected." + return 1 + end +end diff --git a/common/fish/functions/gf_open.fish b/common/fish/functions/gf_open.fish new file mode 100644 index 00000000..6545ae11 --- /dev/null +++ b/common/fish/functions/gf_open.fish @@ -0,0 +1,3 @@ +function gf_open -d 'Repository search and open in editor' + gf && echo "Opening" (basename (pwd)) "in $EDITOR" && $EDITOR . +end diff --git a/common/fish/functions/hx_enable_deno_lsp.fish b/common/fish/functions/hx_enable_deno_lsp.fish new file mode 100644 index 00000000..de861878 --- /dev/null +++ b/common/fish/functions/hx_enable_deno_lsp.fish @@ -0,0 +1,9 @@ +function hx_enable_deno_lsp + mkdir -p ./.helix + echo "*" >./.helix/.gitignore + + string trim " +[language-server.deno-lsp] +required-root-patterns = [] + " >./.helix/languages.toml +end diff --git a/common/fish/functions/wsl2_fix_time.fish b/common/fish/functions/wsl2_fix_time.fish new file mode 100644 index 00000000..f80cf5d7 --- /dev/null +++ b/common/fish/functions/wsl2_fix_time.fish @@ -0,0 +1,7 @@ +function wsl2_fix_time + if ! string match -q "*microsoft*" (uname -r) + return + end + + sudo ntpdate ntp.nict.jp +end diff --git a/common/helix/.gitignore b/common/helix/.gitignore new file mode 100644 index 00000000..e4d05d91 --- /dev/null +++ b/common/helix/.gitignore @@ -0,0 +1 @@ +runtime diff --git a/common/helix/config.toml b/common/helix/config.toml new file mode 100644 index 00000000..ad0c7f06 --- /dev/null +++ b/common/helix/config.toml @@ -0,0 +1,40 @@ +theme = "catppuccin_latte" + +[editor] +auto-save = true # TODO: 動いてる? +cursorline = true +cursorcolumn = true +true-color = true + +[editor.statusline] +left = ["mode", "spinner", "file-name", "file-type", "read-only-indicator", "file-modification-indicator"] +mode.normal ="NORMAL" +mode.insert = "INSERT" +mode.select = "SELECT" + +[editor.lsp] +display-messages = true +display-inlay-hints = true + +[editor.cursor-shape] +insert = "bar" +normal = "block" +select = "underline" + +[editor.file-picker] +hidden = false + +[editor.whitespace.render] +tab = "all" + +[editor.whitespace.characters] +tabpad = "." + +[editor.indent-guides] +render = true + +[keys.normal] +Z = { Z = ":wq" } + +[keys.insert] +j = { k = "normal_mode" } diff --git a/common/helix/languages.toml b/common/helix/languages.toml new file mode 100644 index 00000000..9744cab6 --- /dev/null +++ b/common/helix/languages.toml @@ -0,0 +1,20 @@ +[[language]] +name = "typescript" +roots = ["deno.json", "deno.jsonc", "package.json"] +auto-format = true +language-servers = ["typescript-language-server", "deno-lsp"] + +[[language]] +name = "tsx" +roots = ["deno.json", "deno.jsonc", "package.json"] +auto-format = true +language-servers = ["typescript-language-server", "deno-lsp"] + +[language-server.typescript-language-server] +required-root-patterns = ["package.json"] + +[language-server.deno-lsp] +command = "deno" +args = ["lsp"] +config = { deno = { enable = true } } +required-root-patterns = ["deno.*"] diff --git a/common/nvim/.luarc.json b/common/nvim/.luarc.json new file mode 100644 index 00000000..7440adda --- /dev/null +++ b/common/nvim/.luarc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", + "diagnostics": { + "globals": ["vim"] + } +} diff --git a/common/nvim/init.lua b/common/nvim/init.lua new file mode 100644 index 00000000..88cd14f9 --- /dev/null +++ b/common/nvim/init.lua @@ -0,0 +1,18 @@ +require "autocmds" +require "keymaps" +require "options" + +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup("plugins", {}) diff --git a/common/nvim/lazy-lock.json b/common/nvim/lazy-lock.json new file mode 100644 index 00000000..43a016c5 --- /dev/null +++ b/common/nvim/lazy-lock.json @@ -0,0 +1,20 @@ +{ + "catppuccin": { "branch": "main", "commit": "c0bea773a09e49e123136b099bce9ddc1bf395d2" }, + "copilot.vim": { "branch": "release", "commit": "88d08cf54f623341adde4b18362bffc95174dcd5" }, + "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" }, + "lazy.nvim": { "branch": "main", "commit": "bc620783663ab09d16bff9fdecc07da65b2a1528" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mini.nvim": { "branch": "main", "commit": "ebc8cb0c1f73ee6c53e0560957a37a2307a70f98" }, + "noice.nvim": { "branch": "main", "commit": "88ac36864b5976a64b14a8f156c616f41b32f228" }, + "none-ls.nvim": { "branch": "main", "commit": "cc0a3c45047e3daf85d07c1571d65476cfce6480" }, + "nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" }, + "nvim-lspconfig": { "branch": "master", "commit": "5c33bf1f708ac8cb839469e1a03d45987fec305c" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "a7ab9a957b17199183388c6f357d614fcaa508e5" }, + "telescope.nvim": { "branch": "master", "commit": "c392f1b78eaaf870ca584bd698e78076ed301b26" }, + "vim-wakatime": { "branch": "master", "commit": "3cb40867cb5a3120f9bef76eff88edc7f1dc1a23" } +} \ No newline at end of file diff --git a/common/nvim/lua/autocmds.lua b/common/nvim/lua/autocmds.lua new file mode 100644 index 00000000..e2a46f20 --- /dev/null +++ b/common/nvim/lua/autocmds.lua @@ -0,0 +1,33 @@ +-- TODO: migrate to lua syntax +-- git commit prefix +vim.cmd([[ +augroup gitabbr + autocmd! + " ✨ fe: Introduce new features. + autocmd FileType gitcommit iabbrev fe :sparkles: + " 🐛 bu: Fix a bug. + autocmd FileType gitcommit iabbrev bu :bug: + " 🩹 ad: Simple fix for a non-critical issue. + autocmd FileType gitcommit iabbrev ad :adhesive_bandage: + " ♻️ re: Refactor code. + autocmd FileType gitcommit iabbrev re :recycle: + " 💥 bo: Introduce breaking changes. + autocmd FileType gitcommit iabbrev bo :boom: + " 🔥 rm: Remove code or files. + autocmd FileType gitcommit iabbrev rm :fire: + " ⏪️ rv: Revert changes. + autocmd FileType gitcommit iabbrev rv :rewind: + " 🎨 fo: Improve structure / format of the code. + autocmd FileType gitcommit iabbrev fo :art: + " 💄 ui: Add or update the UI and style files. + autocmd FileType gitcommit iabbrev ui :lipstick: + " 🔧 co: Add or update configuration files. + autocmd FileType gitcommit iabbrev co :wrench: + " 📝 do: Add or update documentation. + autocmd FileType gitcommit iabbrev do :memo: + " ⬆️ up: Upgrade dependencies. + autocmd FileType gitcommit iabbrev up :arrow_up: + " ✅ ch: Add, update, or pass tests." + autocmd FileType gitcommit iabbrev ch :white_check_mark: +augroup END +]]) diff --git a/common/nvim/lua/keymaps.lua b/common/nvim/lua/keymaps.lua new file mode 100644 index 00000000..2771d6c5 --- /dev/null +++ b/common/nvim/lua/keymaps.lua @@ -0,0 +1,20 @@ +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +-- normal mode +-- 表示行単位で上下移動 +keymap("n", "j", "gj", opts) +keymap("n", "k", "gk", opts) +keymap("n", "", "gj", opts) +keymap("n", "", "gk", opts) +-- open terminal +keymap("n", "tt", ":split | wincmd j | resize 10 | terminali", opts) + +-- insert mode +keymap("i", "jk", "", opts) + +-- visual mode +keymap("v", "jk", "", opts) + +-- terminal mode +keymap("t", "", "", opts) diff --git a/common/nvim/lua/options.lua b/common/nvim/lua/options.lua new file mode 100644 index 00000000..2ed0fdae --- /dev/null +++ b/common/nvim/lua/options.lua @@ -0,0 +1,38 @@ +local opt = vim.opt + +-- core +opt.encoding = "utf-8" +opt.fileencoding = "utf-8" +vim.scriptencoding = "utf-8" +vim.g.mapleader = " " +opt.clipboard:append({ "unnamedplus" }) + +-- appearance +vim.cmd.colorscheme("delek") -- fallback colorscheme +opt.number = true +opt.cursorline = true +opt.virtualedit = "onemore" +opt.smartindent = true +opt.list = true +opt.listchars = { tab = ">-", trail = "-", nbsp = "+" } + +-- tabs +opt.expandtab = true +opt.tabstop = 2 +opt.shiftwidth = 2 + +-- search +opt.ignorecase = true +opt.smartcase = true +opt.incsearch = true +opt.hlsearch = true +opt.wrapscan = true + +-- backup +opt.backup = false +opt.swapfile = false + +-- terminal +if vim.fn.has("win64") == 1 then + opt.shell = "pwsh" +end diff --git a/common/nvim/lua/plugins/completion.lua b/common/nvim/lua/plugins/completion.lua new file mode 100644 index 00000000..974923ff --- /dev/null +++ b/common/nvim/lua/plugins/completion.lua @@ -0,0 +1,9 @@ +-- Completion: (mini.completion), GitHub Copilot + +return { + { + "github/copilot.vim", + event = "VeryLazy", + build = ":Copilot enable", + }, +} diff --git a/common/nvim/lua/plugins/finder.lua b/common/nvim/lua/plugins/finder.lua new file mode 100644 index 00000000..2a16e63d --- /dev/null +++ b/common/nvim/lua/plugins/finder.lua @@ -0,0 +1,54 @@ +-- Finder: telescope.nvim + +return { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "nvim-telescope/telescope-file-browser.nvim", + }, + -- TODO: cannot open finder on startup + event = "VeryLazy", + config = function() + local telescope = require("telescope") + local actions = require("telescope.actions") + + telescope.setup({ + defaults = { + layout_config = { + prompt_position = "top", + preview_width = 0.6, + }, + sorting_strategy = "ascending", + mappings = { + n = { + ["q"] = actions.close, + ["ZZ"] = actions.close, + }, + }, + }, + pickers = { + find_files = { + find_command = { "fd", "--hidden", "--exclude", "**/.git/*" }, + }, + }, + extensions = { + file_browser = { + grouped = true, -- directories, then files + auto_depth = true, + hidden = { file_browser = true }, + display_stat = false, + hijack_netrw = true, + }, + }, + }) + + local builtin = require("telescope.builtin") + vim.keymap.set("n", "ff", builtin.find_files, {}) + vim.keymap.set("n", "fg", builtin.live_grep, {}) + vim.keymap.set("n", "fk", builtin.keymaps, {}) + + require("telescope").load_extension("file_browser") + vim.keymap.set("n", "fb", ":Telescope file_browser", {}) + end, +} diff --git a/common/nvim/lua/plugins/lsp.lua b/common/nvim/lua/plugins/lsp.lua new file mode 100644 index 00000000..44137958 --- /dev/null +++ b/common/nvim/lua/plugins/lsp.lua @@ -0,0 +1,91 @@ +-- LSP: nvim-lspconfig +-- Formatter / Linter: none-ls.nvim +-- Package Manager: mason.nvim + +return { + { + "williamboman/mason.nvim", + event = "VeryLazy", + opts = { + ui = { border = "single" }, + }, + }, + + -- LSP + { + "neovim/nvim-lspconfig", + lazy = true, + }, + { + "williamboman/mason-lspconfig.nvim", + dependencies = { + "williamboman/mason.nvim", + }, + opts = { + ensure_installed = { + "lua_ls", + "bashls", + "gopls", + "jsonls", + }, + }, + }, + { + "williamboman/mason-lspconfig.nvim", + dependencies = { + "neovim/nvim-lspconfig", + }, + event = { "BufReadPre", "BufNewFile" }, + config = function() + local lspconfig = require("lspconfig") + require("mason-lspconfig").setup_handlers({ + function(server_name) + lspconfig[server_name].setup({}) + end, + }) + end, + }, + + -- Formatter / Linter + { + "nvimtools/none-ls.nvim", + lazy = true, + config = function() + local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) + local builtins = require("null-ls.builtins") + require("null-ls").setup({ + sources = { + builtins.formatting.stylua, + builtins.formatting.goimports, + builtins.diagnostics.golangci_lint, + }, + on_attach = function(client, bufnr) + if client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) + vim.api.nvim_create_autocmd("BufWritePre", { + group = augroup, + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ async = false }) + end, + }) + end + end, + }) + end, + }, + { + "jay-babu/mason-null-ls.nvim", + dependencies = { + "williamboman/mason.nvim", + }, + event = { "BufReadPre", "BufNewFile" }, + opts = { + ensure_installed = { + "stylua", + "goimports", + "golangci_lint", + }, + }, + }, +} diff --git a/common/nvim/lua/plugins/other.lua b/common/nvim/lua/plugins/other.lua new file mode 100644 index 00000000..24a1f85d --- /dev/null +++ b/common/nvim/lua/plugins/other.lua @@ -0,0 +1,18 @@ +return { + { + "echasnovski/mini.nvim", + event = "VeryLazy", + config = function() + require("mini.completion").setup() + require("mini.cursorword").setup() + require("mini.indentscope").setup() + require("mini.pairs").setup() + require("mini.statusline").setup() + require("mini.trailspace").setup() + end, + }, + { + "wakatime/vim-wakatime", + event = "VeryLazy", + }, +} diff --git a/common/nvim/lua/plugins/ui.lua b/common/nvim/lua/plugins/ui.lua new file mode 100644 index 00000000..de730f74 --- /dev/null +++ b/common/nvim/lua/plugins/ui.lua @@ -0,0 +1,59 @@ +-- Theme: catppuccin-latte +-- Syntax: nvim-treesitter +-- Popup: noice.nvim +-- LSP Log: fidget.nvim + +return { + { + "catppuccin/nvim", + name = "catppuccin", + event = "VimEnter", + priority = 1000, + config = function() + vim.cmd.colorscheme("catppuccin-latte") + end, + }, + { + "nvim-treesitter/nvim-treesitter", + enabled = false, + event = "VeryLazy", + build = ":TSUpdate", + config = function() + require("nvim-treesitter.install").prefer_git = false + require("nvim-treesitter.configs").setup({ + highlight = { enable = true }, + indent = { enable = true }, + }) + end, + }, + { + "folke/noice.nvim", + event = "VeryLazy", + dependencies = { + "MunifTanjim/nui.nvim", + "rcarriga/nvim-notify", + }, + config = function() + require("noice").setup({ + lsp = { + -- override markdown rendering so that **cmp** and other plugins use **Treesitter** + override = { + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp + }, + }, + presets = { + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = true, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help + }, + }) + end, + }, + { + "j-hui/fidget.nvim", + event = "LspAttach", + }, +} diff --git a/common/rye/config.toml b/common/rye/config.toml new file mode 100644 index 00000000..e306c0e9 --- /dev/null +++ b/common/rye/config.toml @@ -0,0 +1,9 @@ +[default] +requires-python = ">= 3.10" +toolchain = "cpython@3.12" +build-system = "hatchling" +license = "MIT" + +[behavior] +global-python = true +use-uv = true diff --git a/common/starship.toml b/common/starship.toml new file mode 100644 index 00000000..c40882a1 --- /dev/null +++ b/common/starship.toml @@ -0,0 +1,75 @@ +'$schema' = 'https://starship.rs/config-schema.json' + +add_newline = false +palette = 'catppuccin_latte' +format = """ +$username\ +$hostname\ +$shell\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$line_break\ +$character""" + +[hostname] +ssh_symbol = '\[ssh\]' +format = '[$hostname$ssh_symbol]($style) ' + +[directory] +truncation_length = 4 +style = 'bold lavender' + +[shell] +disabled = false +unknown_indicator = "MYTERY SHELL" +format = '[\[$indicator\]]($style) ' +style = "sapphire bold" + +[git_branch] +symbol = '' + +[git_commit] +tag_symbol = ' tag ' + +[git_status] +ahead = '>' +behind = '<' +diverged = '<>' +renamed = 'r' +deleted = 'x' + +[character] +success_symbol = '[\$](bold green)' +error_symbol = '[\$](bold red)' +vimcmd_symbol = '[\$](bold green)' + +# https://github.com/catppuccin/starship +[palettes.catppuccin_latte] +rosewater = "#dc8a78" +flamingo = "#dd7878" +pink = "#ea76cb" +mauve = "#8839ef" +red = "#d20f39" +maroon = "#e64553" +peach = "#fe640b" +yellow = "#df8e1d" +green = "#40a02b" +teal = "#179299" +sky = "#04a5e5" +sapphire = "#209fb5" +blue = "#1e66f5" +lavender = "#7287fd" +text = "#4c4f69" +subtext1 = "#5c5f77" +subtext0 = "#6c6f85" +overlay2 = "#7c7f93" +overlay1 = "#8c8fa1" +overlay0 = "#9ca0b0" +surface2 = "#acb0be" +surface1 = "#bcc0cc" +surface0 = "#ccd0da" +base = "#eff1f5" +mantle = "#e6e9ef" +crust = "#dce0e8" diff --git a/common/vscode/extensions.json b/common/vscode/extensions.json new file mode 100644 index 00000000..7bc30168 --- /dev/null +++ b/common/vscode/extensions.json @@ -0,0 +1 @@ +[{"identifier":{"id":"richie5um2.vscode-sort-json","uuid":"3fb77af3-b8b3-4cb9-9137-f555bd80e2b1"},"version":"1.20.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/richie5um2.vscode-sort-json-1.20.0","scheme":"file"},"relativeLocation":"richie5um2.vscode-sort-json-1.20.0","metadata":{"id":"3fb77af3-b8b3-4cb9-9137-f555bd80e2b1","publisherId":"c410f7b8-d406-4e23-b77b-3719c4d5efb7","publisherDisplayName":"richie5um2","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1701917783543,"preRelease":false}},{"identifier":{"id":"donjayamanne.python-environment-manager","uuid":"0c9f60fd-5588-42f7-9176-e80c3ae111ec"},"version":"1.2.4","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/donjayamanne.python-environment-manager-1.2.4","scheme":"file"},"relativeLocation":"donjayamanne.python-environment-manager-1.2.4","metadata":{"id":"0c9f60fd-5588-42f7-9176-e80c3ae111ec","publisherId":"1ba8bd00-2ad1-4be0-a007-5b4b954c1ee7","publisherDisplayName":"Don Jayamanne","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1701917787254,"preRelease":false}},{"identifier":{"id":"tamasfe.even-better-toml","uuid":"b2215d5f-675e-4a2b-b6ac-1ca737518b78"},"version":"0.19.2","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/tamasfe.even-better-toml-0.19.2","scheme":"file"},"relativeLocation":"tamasfe.even-better-toml-0.19.2","metadata":{"id":"b2215d5f-675e-4a2b-b6ac-1ca737518b78","publisherId":"78c2102e-13a2-49ea-ac79-8d1bbacbbf0e","publisherDisplayName":"tamasfe","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1701917811276,"preRelease":false}},{"identifier":{"id":"yzhang.markdown-all-in-one","uuid":"98790d67-10fa-497c-9113-f6c7489207b2"},"version":"3.6.2","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/yzhang.markdown-all-in-one-3.6.2","scheme":"file"},"relativeLocation":"yzhang.markdown-all-in-one-3.6.2","metadata":{"installedTimestamp":1727896642922,"source":"gallery","id":"98790d67-10fa-497c-9113-f6c7489207b2","publisherId":"36c8b41c-6ef6-4bf5-a5b7-65bef29b606f","publisherDisplayName":"Yu Zhang","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-toolsai.jupyter-keymap","uuid":"9f6dc8db-620c-4844-b8c5-e74914f1be27"},"version":"1.1.2","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-toolsai.jupyter-keymap-1.1.2","scheme":"file"},"relativeLocation":"ms-toolsai.jupyter-keymap-1.1.2","metadata":{"id":"9f6dc8db-620c-4844-b8c5-e74914f1be27","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1706634493623,"pinned":false,"preRelease":false}},{"identifier":{"id":"ms-toolsai.vscode-jupyter-cell-tags","uuid":"ab4fb32a-befb-4102-adf9-1652d0cd6a5e"},"version":"0.1.9","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-toolsai.vscode-jupyter-cell-tags-0.1.9","scheme":"file"},"relativeLocation":"ms-toolsai.vscode-jupyter-cell-tags-0.1.9","metadata":{"id":"ab4fb32a-befb-4102-adf9-1652d0cd6a5e","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1712315998733,"pinned":false,"preRelease":false,"source":"gallery"}},{"identifier":{"id":"ms-toolsai.vscode-jupyter-slideshow","uuid":"e153ca70-b543-4865-b4c5-b31d34185948"},"version":"0.1.6","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-toolsai.vscode-jupyter-slideshow-0.1.6","scheme":"file"},"relativeLocation":"ms-toolsai.vscode-jupyter-slideshow-0.1.6","metadata":{"id":"e153ca70-b543-4865-b4c5-b31d34185948","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1712315999357,"pinned":false,"preRelease":false,"source":"gallery"}},{"identifier":{"id":"vue.volar","uuid":"a5223b43-8621-4351-a14e-3d560f85f277"},"version":"2.0.10","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/vue.volar-2.0.10","scheme":"file"},"relativeLocation":"vue.volar-2.0.10","metadata":{"id":"a5223b43-8621-4351-a14e-3d560f85f277","publisherId":"49983e2f-38ad-4441-beea-d678b53d0549","publisherDisplayName":"Vue","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1713293380831,"pinned":false,"source":"gallery"}},{"identifier":{"id":"johnnymorganz.stylua","uuid":"6f48cf48-3912-4acc-8119-94a96a062cc1"},"version":"1.6.3","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/johnnymorganz.stylua-1.6.3","scheme":"file"},"relativeLocation":"johnnymorganz.stylua-1.6.3","metadata":{"id":"6f48cf48-3912-4acc-8119-94a96a062cc1","publisherId":"fe1fd8e8-b4b3-4f27-8d87-057406d74ab9","publisherDisplayName":"JohnnyMorganz","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1715438715205,"source":"gallery"}},{"identifier":{"id":"ms-vscode.powershell"},"version":"2024.2.2","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-vscode.powershell-2024.2.2","scheme":"file"},"relativeLocation":"ms-vscode.powershell-2024.2.2","metadata":{"isApplicationScoped":false,"installedTimestamp":1715734080553,"pinned":false,"source":"vsix","id":"40d39ce9-c381-47a0-80c8-a6661f731eab","publisherDisplayName":"Microsoft","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"mechatroner.rainbow-csv","uuid":"3792588c-3d35-442d-91ea-fe6a755e8155"},"version":"3.12.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/mechatroner.rainbow-csv-3.12.0","scheme":"file"},"relativeLocation":"mechatroner.rainbow-csv-3.12.0","metadata":{"id":"3792588c-3d35-442d-91ea-fe6a755e8155","publisherId":"0d5438b6-325a-4f88-aa28-6192aa2cf2a6","publisherDisplayName":"mechatroner","targetPlatform":"undefined","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1716707169706,"pinned":false,"preRelease":false,"source":"gallery"}},{"identifier":{"id":"christian-kohler.path-intellisense","uuid":"a41c1549-4053-44d4-bf30-60fc809b4a86"},"version":"2.9.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/christian-kohler.path-intellisense-2.9.0","scheme":"file"},"relativeLocation":"christian-kohler.path-intellisense-2.9.0","metadata":{"id":"a41c1549-4053-44d4-bf30-60fc809b4a86","publisherId":"a892fb38-060b-475f-9e73-2e06a8a17a68","publisherDisplayName":"Christian Kohler","targetPlatform":"undefined","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1717421385999,"pinned":false,"preRelease":false,"source":"gallery"}},{"identifier":{"id":"redhat.vscode-yaml","uuid":"2061917f-f76a-458a-8da9-f162de22b97e"},"version":"1.15.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/redhat.vscode-yaml-1.15.0","scheme":"file"},"relativeLocation":"redhat.vscode-yaml-1.15.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1718045201588,"pinned":false,"source":"gallery","id":"2061917f-f76a-458a-8da9-f162de22b97e","publisherId":"eed56242-9699-4317-8bc7-e9f4b9bdd3ff","publisherDisplayName":"Red Hat","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"antfu.vite","uuid":"b22eea9f-5a30-43a2-8a59-3d3707869cf8"},"version":"0.2.5","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/antfu.vite-0.2.5","scheme":"file"},"relativeLocation":"antfu.vite-0.2.5","metadata":{"installedTimestamp":1727896549742,"source":"gallery","id":"b22eea9f-5a30-43a2-8a59-3d3707869cf8","publisherId":"f20453fe-720b-4a02-8838-84ab3fdc1b74","publisherDisplayName":"Anthony Fu","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-python.debugpy","uuid":"4bd5d2c9-9d65-401a-b0b2-7498d9f17615"},"version":"2024.8.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-python.debugpy-2024.8.0-linux-x64","scheme":"file"},"relativeLocation":"ms-python.debugpy-2024.8.0-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1720968158636,"pinned":false,"source":"gallery","id":"4bd5d2c9-9d65-401a-b0b2-7498d9f17615","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"xc-vscode.xc-vscode","uuid":"1d16a8f5-c5cc-428a-b0ab-579891c7a0cf"},"version":"0.0.10","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/xc-vscode.xc-vscode-0.0.10","scheme":"file"},"relativeLocation":"xc-vscode.xc-vscode-0.0.10","metadata":{"installedTimestamp":1721567348228,"pinned":false,"source":"gallery","id":"1d16a8f5-c5cc-428a-b0ab-579891c7a0cf","publisherId":"aeb4162c-940d-4909-af79-312ee15042c2","publisherDisplayName":"xc-vscode","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-toolsai.jupyter-renderers","uuid":"b15c72f8-d5fe-421a-a4f7-27ed9f6addbf"},"version":"1.0.19","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-toolsai.jupyter-renderers-1.0.19","scheme":"file"},"relativeLocation":"ms-toolsai.jupyter-renderers-1.0.19","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1722422595180,"pinned":false,"source":"gallery","id":"b15c72f8-d5fe-421a-a4f7-27ed9f6addbf","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-python.debugpy","uuid":"4bd5d2c9-9d65-401a-b0b2-7498d9f17615"},"version":"2024.10.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64","scheme":"file"},"relativeLocation":"ms-python.debugpy-2024.10.0-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1722581671062,"pinned":false,"source":"gallery","id":"4bd5d2c9-9d65-401a-b0b2-7498d9f17615","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"biomejs.biome","uuid":"2c992d35-3965-4369-856e-fdfbb0af2ce2"},"version":"2.3.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/biomejs.biome-2.3.0","scheme":"file"},"relativeLocation":"biomejs.biome-2.3.0","metadata":{"installedTimestamp":1723504272063,"source":"gallery","id":"2c992d35-3965-4369-856e-fdfbb0af2ce2","publisherId":"570e4e26-7e71-4308-8299-d18166119ce7","publisherDisplayName":"biomejs","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"esbenp.prettier-vscode","uuid":"96fa4707-6983-4489-b7c5-d5ffdfdcce90"},"version":"11.0.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/esbenp.prettier-vscode-11.0.0","scheme":"file"},"relativeLocation":"esbenp.prettier-vscode-11.0.0","metadata":{"installedTimestamp":1727905895950,"source":"gallery","id":"96fa4707-6983-4489-b7c5-d5ffdfdcce90","publisherId":"d16f4e39-2ffb-44e3-9c0d-79d873570e3a","publisherDisplayName":"Prettier","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"antfu.slidev","uuid":"1396f3b6-119e-4436-a767-30a73c5a4a4f"},"version":"0.49.29","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/antfu.slidev-0.49.29","scheme":"file"},"relativeLocation":"antfu.slidev-0.49.29","metadata":{"installedTimestamp":1727944854078,"source":"gallery","id":"1396f3b6-119e-4436-a767-30a73c5a4a4f","publisherId":"f20453fe-720b-4a02-8838-84ab3fdc1b74","publisherDisplayName":"Anthony Fu","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"wakatime.vscode-wakatime","uuid":"f2fd462f-f1bd-4c62-b54f-59a4e5ffc6a3"},"version":"24.6.2","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/wakatime.vscode-wakatime-24.6.2","scheme":"file"},"relativeLocation":"wakatime.vscode-wakatime-24.6.2","metadata":{"installedTimestamp":1727896551756,"source":"gallery","id":"f2fd462f-f1bd-4c62-b54f-59a4e5ffc6a3","publisherId":"27977793-9e84-451b-8977-744ce63f3d70","publisherDisplayName":"WakaTime","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-python.mypy-type-checker","uuid":"2203dd65-f4f9-40ea-a900-d0878231c22d"},"version":"2024.0.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-python.mypy-type-checker-2024.0.0","scheme":"file"},"relativeLocation":"ms-python.mypy-type-checker-2024.0.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1725565465885,"pinned":false,"source":"gallery","id":"2203dd65-f4f9-40ea-a900-d0878231c22d","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"vue.volar","uuid":"a95ee795-1576-4ffa-acda-8d6e6a95c584"},"version":"2.1.6","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/vue.volar-2.1.6","scheme":"file"},"relativeLocation":"vue.volar-2.1.6","metadata":{"installedTimestamp":1727896518805,"source":"gallery","id":"a95ee795-1576-4ffa-acda-8d6e6a95c584","publisherId":"49983e2f-38ad-4441-beea-d678b53d0549","publisherDisplayName":"Vue","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"jock.svg","uuid":"4ae6dc82-7981-4f10-bd81-2d72aec37f39"},"version":"1.5.4","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/jock.svg-1.5.4","scheme":"file"},"relativeLocation":"jock.svg-1.5.4","metadata":{"installedTimestamp":1725671165034,"pinned":false,"source":"gallery","id":"4ae6dc82-7981-4f10-bd81-2d72aec37f39","publisherId":"f01a7894-535b-451f-980b-1a4bee6d63f3","publisherDisplayName":"jock","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"shd101wyy.markdown-preview-enhanced","uuid":"3b1db1fc-c7f7-4bd6-9fa4-b499dfa99a8a"},"version":"0.8.14","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/shd101wyy.markdown-preview-enhanced-0.8.14","scheme":"file"},"relativeLocation":"shd101wyy.markdown-preview-enhanced-0.8.14","metadata":{"installedTimestamp":1727896652985,"source":"gallery","id":"3b1db1fc-c7f7-4bd6-9fa4-b499dfa99a8a","publisherId":"deac4ec9-08f5-4752-aa45-c6f09e1f615d","publisherDisplayName":"Yiyi Wang","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"davidanson.vscode-markdownlint","uuid":"daf8b44d-8aae-4da2-80c5-1f770219f643"},"version":"0.56.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/davidanson.vscode-markdownlint-0.56.0","scheme":"file"},"relativeLocation":"davidanson.vscode-markdownlint-0.56.0","metadata":{"installedTimestamp":1727896651470,"source":"gallery","id":"daf8b44d-8aae-4da2-80c5-1f770219f643","publisherId":"2e4d1cda-6ef0-4e42-a352-ab540afe8ff0","publisherDisplayName":"David Anson","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"golang.go","uuid":"d6f6cfea-4b6f-41f4-b571-6ad2ab7918da"},"version":"0.42.1","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/golang.go-0.42.1","scheme":"file"},"relativeLocation":"golang.go-0.42.1","metadata":{"installedTimestamp":1727896634600,"source":"gallery","id":"d6f6cfea-4b6f-41f4-b571-6ad2ab7918da","publisherId":"dbf6ae0a-da75-4167-ac8b-75b4512f2153","publisherDisplayName":"Go Team at Google","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-toolsai.jupyter","uuid":"6c2f1801-1e7f-45b2-9b5c-7782f1e076e8"},"version":"2024.8.1","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-toolsai.jupyter-2024.8.1-linux-x64","scheme":"file"},"relativeLocation":"ms-toolsai.jupyter-2024.8.1-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1726739656800,"pinned":false,"source":"gallery","id":"6c2f1801-1e7f-45b2-9b5c-7782f1e076e8","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"eamodio.gitlens","uuid":"4de763bd-505d-4978-9575-2b7696ecf94e"},"version":"15.5.1","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/eamodio.gitlens-15.5.1","scheme":"file"},"relativeLocation":"eamodio.gitlens-15.5.1","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1726739656737,"pinned":false,"source":"gallery","id":"4de763bd-505d-4978-9575-2b7696ecf94e","publisherId":"678d198b-9b2e-49d3-96ff-6d801c9575df","publisherDisplayName":"GitKraken","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-python.python","uuid":"f1f59ae4-9318-4f3c-a9b5-81b2eaa5f8a5"},"version":"2024.14.1","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-python.python-2024.14.1-linux-x64","scheme":"file"},"relativeLocation":"ms-python.python-2024.14.1-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1726739658346,"pinned":false,"source":"gallery","id":"f1f59ae4-9318-4f3c-a9b5-81b2eaa5f8a5","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"exiasr.hadolint","uuid":"c0f361c5-4179-43c5-9cb5-c4eba77388b4"},"version":"1.1.2","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/exiasr.hadolint-1.1.2","scheme":"file"},"relativeLocation":"exiasr.hadolint-1.1.2","metadata":{"installedTimestamp":1726790401796,"pinned":false,"source":"gallery","id":"c0f361c5-4179-43c5-9cb5-c4eba77388b4","publisherId":"ec868bdf-3500-486f-92b1-7d269d37c606","publisherDisplayName":"Michael Lin","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"denoland.vscode-deno","uuid":"91881318-cfd0-4905-adb7-f4e431ca1ead"},"version":"3.41.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/denoland.vscode-deno-3.41.0","scheme":"file"},"relativeLocation":"denoland.vscode-deno-3.41.0","metadata":{"installedTimestamp":1727896608035,"source":"gallery","id":"91881318-cfd0-4905-adb7-f4e431ca1ead","publisherId":"d9844221-d0e6-438e-adcd-4f37f93f23b4","publisherDisplayName":"denoland","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"charliermarsh.ruff","uuid":"c2ca9b43-fa38-44fc-928e-5125970b9c00"},"version":"2024.50.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/charliermarsh.ruff-2024.50.0-linux-x64","scheme":"file"},"relativeLocation":"charliermarsh.ruff-2024.50.0-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1727188792114,"pinned":false,"source":"gallery","id":"c2ca9b43-fa38-44fc-928e-5125970b9c00","publisherId":"ae7578b3-bd2b-455d-bbd6-cd231eee3c09","publisherDisplayName":"Astral Software","targetPlatform":"linux-x64","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-python.vscode-pylance","uuid":"364d2426-116a-433a-a5d8-a5098dc3afbd"},"version":"2024.9.2","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.2","scheme":"file"},"relativeLocation":"ms-python.vscode-pylance-2024.9.2","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1727188793366,"pinned":false,"source":"gallery","id":"364d2426-116a-433a-a5d8-a5098dc3afbd","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"bradlc.vscode-tailwindcss","uuid":"4db62a7c-7d70-419c-96d2-6c3a4dc77ea5"},"version":"0.12.11","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/bradlc.vscode-tailwindcss-0.12.11","scheme":"file"},"relativeLocation":"bradlc.vscode-tailwindcss-0.12.11","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1727195801503,"pinned":false,"source":"gallery","id":"4db62a7c-7d70-419c-96d2-6c3a4dc77ea5","publisherId":"84722833-669b-4c7d-920e-b60e43fae19a","publisherDisplayName":"Tailwind Labs","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"styled-components.vscode-styled-components","uuid":"22a740c5-ec07-4bf0-a58f-1a38aabea310"},"version":"1.7.8","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/styled-components.vscode-styled-components-1.7.8","scheme":"file"},"relativeLocation":"styled-components.vscode-styled-components-1.7.8","metadata":{"installedTimestamp":1727226615474,"pinned":false,"source":"gallery","id":"22a740c5-ec07-4bf0-a58f-1a38aabea310","publisherId":"608ef4b3-a3fc-4d26-918a-19c0d8435cf4","publisherDisplayName":"Styled Components","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-azuretools.vscode-docker","uuid":"0479fc1c-3d67-49f9-b087-fb9069afe48f"},"version":"1.29.3","location":{"$mid":1,"fsPath":"/home/ras/.vscode-server/extensions/ms-azuretools.vscode-docker-1.29.3","external":"file:///home/ras/.vscode-server/extensions/ms-azuretools.vscode-docker-1.29.3","path":"/home/ras/.vscode-server/extensions/ms-azuretools.vscode-docker-1.29.3","scheme":"file"},"relativeLocation":"ms-azuretools.vscode-docker-1.29.3","metadata":{"installedTimestamp":1728054504567,"source":"gallery","id":"0479fc1c-3d67-49f9-b087-fb9069afe48f","publisherId":"52b787f2-79a9-4f32-99b4-393afe3005d3","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-toolsai.datawrangler","uuid":"de3960e6-b262-4565-8a1c-9870629f1ed9"},"version":"1.10.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-toolsai.datawrangler-1.10.0","scheme":"file"},"relativeLocation":"ms-toolsai.datawrangler-1.10.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1727385229068,"pinned":false,"source":"gallery","id":"de3960e6-b262-4565-8a1c-9870629f1ed9","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"antfu.iconify","uuid":"14933acc-ee13-48c1-9320-e39310c683b1"},"version":"0.9.4","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/antfu.iconify-0.9.4","scheme":"file"},"relativeLocation":"antfu.iconify-0.9.4","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1727416167732,"pinned":false,"source":"gallery","id":"14933acc-ee13-48c1-9320-e39310c683b1","publisherId":"f20453fe-720b-4a02-8838-84ab3fdc1b74","publisherDisplayName":"Anthony Fu","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"github.copilot-chat","uuid":"7ec7d6e6-b89e-4cc5-a59b-d6c4d238246f"},"version":"0.20.3","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/github.copilot-chat-0.20.3","scheme":"file"},"relativeLocation":"github.copilot-chat-0.20.3","metadata":{"installedTimestamp":1727896617805,"source":"gallery","id":"7ec7d6e6-b89e-4cc5-a59b-d6c4d238246f","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"github.copilot","uuid":"23c4aeee-f844-43cd-b53e-1113e483f1a6"},"version":"1.235.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/github.copilot-1.235.0","scheme":"file"},"relativeLocation":"github.copilot-1.235.0","metadata":{"installedTimestamp":1727896617804,"source":"gallery","id":"23c4aeee-f844-43cd-b53e-1113e483f1a6","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"antfu.browse-lite","uuid":"61ce9ab3-f230-47ea-8cdc-2b5eb25f3ae2"},"version":"0.3.9","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/antfu.browse-lite-0.3.9","scheme":"file"},"relativeLocation":"antfu.browse-lite-0.3.9","metadata":{"installedTimestamp":1727896549743,"source":"gallery","id":"61ce9ab3-f230-47ea-8cdc-2b5eb25f3ae2","publisherId":"f20453fe-720b-4a02-8838-84ab3fdc1b74","publisherDisplayName":"Anthony Fu","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"unifiedjs.vscode-mdx","uuid":"af8cfc85-cb72-45d0-bae2-9a98cd0c69f3"},"version":"1.8.11","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/unifiedjs.vscode-mdx-1.8.11","scheme":"file"},"relativeLocation":"unifiedjs.vscode-mdx-1.8.11","metadata":{"installedTimestamp":1727896655191,"source":"gallery","id":"af8cfc85-cb72-45d0-bae2-9a98cd0c69f3","publisherId":"207bcd0f-c1b5-4dc9-ab76-47615c59238d","publisherDisplayName":"unified","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"dbaeumer.vscode-eslint","uuid":"583b2b34-2c1e-4634-8c0b-0b82e283ea3a"},"version":"3.0.10","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/dbaeumer.vscode-eslint-3.0.10","scheme":"file"},"relativeLocation":"dbaeumer.vscode-eslint-3.0.10","metadata":{"installedTimestamp":1727897471296,"source":"gallery","id":"583b2b34-2c1e-4634-8c0b-0b82e283ea3a","publisherId":"29859a75-d81b-4f0e-8578-2c80ecee6f99","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"antfu.unocss","uuid":"55f2cc0f-acb9-4fb0-bf94-e0328e3c43fd"},"version":"0.63.3","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/antfu.unocss-0.63.3","scheme":"file"},"relativeLocation":"antfu.unocss-0.63.3","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1728054446307,"pinned":false,"source":"gallery","id":"55f2cc0f-acb9-4fb0-bf94-e0328e3c43fd","publisherId":"f20453fe-720b-4a02-8838-84ab3fdc1b74","publisherDisplayName":"Anthony Fu","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"github.vscode-pull-request-github","uuid":"69ddd764-339a-4ecc-97c1-9c4ece58e36d"},"version":"0.98.0","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/github.vscode-pull-request-github-0.98.0","scheme":"file"},"relativeLocation":"github.vscode-pull-request-github-0.98.0","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1728054446578,"pinned":false,"source":"gallery","id":"69ddd764-339a-4ecc-97c1-9c4ece58e36d","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-ceintl.vscode-language-pack-ja","uuid":"077515fe-1509-49c0-9dcc-5511b41682fc"},"version":"1.94.2024100209","location":{"$mid":1,"path":"/home/ras/.vscode-server/extensions/ms-ceintl.vscode-language-pack-ja-1.94.2024100209","scheme":"file"},"relativeLocation":"ms-ceintl.vscode-language-pack-ja-1.94.2024100209","metadata":{"isApplicationScoped":true,"isMachineScoped":true,"isBuiltin":false,"installedTimestamp":1728054509450,"pinned":false,"source":"gallery","id":"077515fe-1509-49c0-9dcc-5511b41682fc","publisherId":"0b0882c3-aee3-4d7c-b5f9-872f9be0a115","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}}] \ No newline at end of file diff --git a/common/vscode/settings.json b/common/vscode/settings.json new file mode 100644 index 00000000..77eea679 --- /dev/null +++ b/common/vscode/settings.json @@ -0,0 +1,3 @@ +{ + "biome.enabled": false +} diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..1a985c9e --- /dev/null +++ b/install.sh @@ -0,0 +1,89 @@ +#!/bin/bash + +export PS4='\[\e[1;36m\]+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME:+$FUNCNAME(): }\[\e[m\]' +export __STEP__="echo -e \e[1;32m\n#" + +os=$(uname) +if [[ "$os" != "Linux" && "$os" != "Darwin" ]]; then + echo "Unsupported OS" + exit 1 +fi + +sudoer_mode=false +read -n1 -p "Sudoer mode? (y/N)" yn +echo "" +if [[ $yn = [yY] ]]; then + command -v sudo >/dev/null 2>&1 && sudo -v && sudoer_mode=true || exit 1 +fi + +read -p "Press enter to continue (OS: $os, Sudoer mode: $sudoer_mode)" + +root=$(git rev-parse --show-toplevel) +cd $root + +set -eux + +$__STEP__ "Create symlinks" + +ln -sfn $root/common/.bash_profile ~/.bash_profile +ln -sfn $root/common/.bashrc ~/.bashrc +ln -sfn $root/common/.gitconfig ~/.gitconfig +ln -sfn $root/common/.gittemplate.txt ~/.gittemplate.txt +mkdir -p ~/.config +ln -sfn $root/common/aquaproj-aqua ~/.config/aquaproj-aqua +ln -sfn $root/common/fish ~/.config/fish +ln -sfn $root/common/helix ~/.config/helix +ln -sfn $root/common/nvim ~/.config/nvim +mkdir -p ~/.rye +ln -sfn $root/rye/config.toml ~/.rye/config.toml + +$__STEP__ "Setup for $os" + +case "$os" in + Linux) + if [[ "$(uname -r)" == *-microsoft-standard-WSL2 ]]; then + ln -sfn $root/common/vscode/extensions.json ~/.vscode-server/extensions/extensions.json + ln -sfn $root/common/vscode/settings.json ~/.vscode-server/data/Machine/settings.json + $sudoer_mode && sudo ln -sfn $root/wsl/wsl.conf /etc/wsl.conf + fi + + if command -v apt >/dev/null 2>&1; then + $sudoer_mode && ./setup/apt.sh + ./setup/aqua.sh + ./setup/font.sh + else + echo "Unsupported Linux distribution" + exit 1 + fi + ;; + + Darwin) + ln -sfn $root/mac/.Brewfile ~/.Brewfile + ln -sfn $root/mac/.Brewfile.lock.json ~/.Brewfile.lock.json + ln -sfn $root/mac/.gitconfig.mac ~/.gitconfig.mac + ln -sfn $root/mac/skhd ~/.config/skhd + ln -sfn $root/mac/yabai ~/.config/yabai + ln -sfn $root/mac/warp ~/.warp + + ./setup/brew.sh + ./setup/rustup.sh + ./setup/aqua.sh + ./setup/font.sh + ;; + + MINGW*) + # enable to create synlinks in Git Bash + export MSYS=winsymlinks:nativestrict + ln -sfn $root/win/.wslconfig ~/.wslconfig + ln -sfn $root/common/nvim ~/AppData/Local/nvim + ln -sfn $root/win/terminal/settings.json ~/AppData/Local/Packages/Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe/LocalState/settings.json + ln -sfn $root/win/vscode/settings.json ~/AppData/Roaming/Code/User/settings.json + ln -sfn $root/common/helix ~/AppData/Roaming/helix + ln -sfn $root/win/Microsoft.PowerShell_profile.ps1 ~/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 + ln -sfn $root/win/Microsoft.PowerShell_profile.ps1 ~/Documents/PowerShell/Microsoft.VSCode_profile.ps1 + + ./setup/winget.sh + ./setup/aqua.sh + ./setup/font.sh + ;; +esac diff --git a/mac/.Brewfile b/mac/.Brewfile new file mode 100644 index 00000000..607ce381 --- /dev/null +++ b/mac/.Brewfile @@ -0,0 +1,68 @@ +tap "homebrew/bundle" +tap "homebrew/cask" +tap "homebrew/core" +tap "homebrew/services" +tap "koekeishiya/formulae" +brew "libpng" +brew "cmake" +brew "fish" +brew "gh" +brew "htop" +brew "openjdk" +brew "swiftformat" +brew "wget" +brew "koekeishiya/formulae/skhd" +brew "koekeishiya/formulae/yabai" +cask "1password" +cask "arc" +cask "discord" +cask "docker" +cask "figma" +cask "google-chrome" +cask "google-cloud-sdk" +cask "google-drive" +cask "microsoft-edge" +cask "obsidian" +cask "raycast" +cask "readdle-spark" +cask "slack" +cask "spotify" +cask "todoist" +cask "visual-studio-code" +cask "warp" +cask "xcodes" +vscode "antfu.slidev" +vscode "antfu.unocss" +vscode "catppuccin.catppuccin-vsc" +vscode "catppuccin.catppuccin-vsc-icons" +vscode "charliermarsh.ruff" +vscode "davidanson.vscode-markdownlint" +vscode "donjayamanne.python-environment-manager" +vscode "eamodio.gitlens" +vscode "esbenp.prettier-vscode" +vscode "github.copilot" +vscode "github.copilot-chat" +vscode "golang.go" +vscode "gruntfuggly.todo-tree" +vscode "ibm.output-colorizer" +vscode "mechatroner.rainbow-csv" +vscode "ms-azuretools.vscode-docker" +vscode "ms-ceintl.vscode-language-pack-ja" +vscode "ms-python.mypy-type-checker" +vscode "ms-python.python" +vscode "ms-python.vscode-pylance" +vscode "ms-vscode-remote.remote-containers" +vscode "ms-vscode-remote.remote-ssh" +vscode "ms-vscode-remote.remote-ssh-edit" +vscode "ms-vscode-remote.vscode-remote-extensionpack" +vscode "ms-vscode.remote-explorer" +vscode "ms-vscode.remote-server" +vscode "p1c2u.docker-compose" +vscode "pflannery.vscode-versionlens" +vscode "redhat.vscode-yaml" +vscode "richie5um2.vscode-sort-json" +vscode "sumneko.lua" +vscode "tamasfe.even-better-toml" +vscode "tomoki1207.pdf" +vscode "wakatime.vscode-wakatime" +vscode "yzhang.markdown-all-in-one" diff --git a/mac/.Brewfile.lock.json b/mac/.Brewfile.lock.json new file mode 100644 index 00000000..64996a13 --- /dev/null +++ b/mac/.Brewfile.lock.json @@ -0,0 +1,542 @@ +{ + "entries": { + "tap": { + "homebrew/bundle": { + "revision": "88ecf2f0f8fe496c2f8994df4d820dd791aea69a" + }, + "homebrew/cask": { + "revision": "8a6fdd223803bbd9c9779caecf7ebc9c7b42ca56" + }, + "homebrew/core": { + "revision": "2461efa1197635f5bd546536a7ace1c6b9ab3535" + }, + "homebrew/services": { + "revision": "34637816b6d34a6f9414758ceaa410437c4e997c" + }, + "koekeishiya/formulae": { + "revision": "3cb432b8b4767f2b33235f9c31d8d914df1bc0ed" + } + }, + "brew": { + "libpng": { + "version": "1.6.43", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/libpng/blobs/sha256:37936ba5cd5a1e736908a26fd2a944e04d86694a55f99fe5e173bfacac90e2e8", + "sha256": "37936ba5cd5a1e736908a26fd2a944e04d86694a55f99fe5e173bfacac90e2e8" + }, + "arm64_ventura": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/libpng/blobs/sha256:a94e8b28177fa5015a8799b5147aa4ac28ec07bd0d8f913d33a67f155e442301", + "sha256": "a94e8b28177fa5015a8799b5147aa4ac28ec07bd0d8f913d33a67f155e442301" + }, + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/libpng/blobs/sha256:b41f32d6d5dc6172f9008cf4e9ca8c0595f7c5f10076742a134740c119051ce1", + "sha256": "b41f32d6d5dc6172f9008cf4e9ca8c0595f7c5f10076742a134740c119051ce1" + }, + "sonoma": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/libpng/blobs/sha256:12d4c09fc08f07816fd485c6e64d07e17426cce36bcd525292089bb80d4ecf22", + "sha256": "12d4c09fc08f07816fd485c6e64d07e17426cce36bcd525292089bb80d4ecf22" + }, + "ventura": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/libpng/blobs/sha256:37ae0c13a861618b896194178705949887b13821f4762888d1a624c79d08ab4e", + "sha256": "37ae0c13a861618b896194178705949887b13821f4762888d1a624c79d08ab4e" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/libpng/blobs/sha256:048eff2f9c2e1158a8deb1bbbda916ce52d93a2ae91dabbe4ced7609337658c0", + "sha256": "048eff2f9c2e1158a8deb1bbbda916ce52d93a2ae91dabbe4ced7609337658c0" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/libpng/blobs/sha256:af870ecc2a8824919dd700525424c92bad4567fc0efdc4626884f434af2b6ea5", + "sha256": "af870ecc2a8824919dd700525424c92bad4567fc0efdc4626884f434af2b6ea5" + } + } + } + }, + "cmake": { + "version": "3.30.2", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:e1a7afbdd456ac8cd3de0f5a1bde0489961fcca116db12e14b0802a819c72cf1", + "sha256": "e1a7afbdd456ac8cd3de0f5a1bde0489961fcca116db12e14b0802a819c72cf1" + }, + "arm64_ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:fb8759c9f5b8db32b1487beac082acaf8ac0d0dd79c121346492be73e1124d30", + "sha256": "fb8759c9f5b8db32b1487beac082acaf8ac0d0dd79c121346492be73e1124d30" + }, + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:8b785dba3f141d1c086d9235e1eee2803eeef21f0e3984c933c581a75f889343", + "sha256": "8b785dba3f141d1c086d9235e1eee2803eeef21f0e3984c933c581a75f889343" + }, + "sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:1dc4f5f01bc6583e86096d4d54d34bfd6ff913a1f0bffc1b13e5baf6056d04c2", + "sha256": "1dc4f5f01bc6583e86096d4d54d34bfd6ff913a1f0bffc1b13e5baf6056d04c2" + }, + "ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:9a7d063cc375b3e8e9f0ab847379b519556f67f1842223a91a7cb90f8dc560b1", + "sha256": "9a7d063cc375b3e8e9f0ab847379b519556f67f1842223a91a7cb90f8dc560b1" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:55f487c399392c9214c541e061231b2493730776a6d68bbc97d33fa2673eeb7c", + "sha256": "55f487c399392c9214c541e061231b2493730776a6d68bbc97d33fa2673eeb7c" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:91022e707782ddf419534ee51150d126a67a62d274c18f3a870cd087b1c7263d", + "sha256": "91022e707782ddf419534ee51150d126a67a62d274c18f3a870cd087b1c7263d" + } + } + } + }, + "fish": { + "version": "3.7.1", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/fish/blobs/sha256:479ae1960544dc4a84c961f125bb9cc42c194ec2a04f0ffb1591e0c3c1d7d577", + "sha256": "479ae1960544dc4a84c961f125bb9cc42c194ec2a04f0ffb1591e0c3c1d7d577" + }, + "arm64_ventura": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/fish/blobs/sha256:51719eb992cbea31b99828036479b510011c1b4eef131a7b684bf4835f01374e", + "sha256": "51719eb992cbea31b99828036479b510011c1b4eef131a7b684bf4835f01374e" + }, + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/fish/blobs/sha256:0261f26bf449353f84f83ebfe3922fb2d6a0f98e65c551f3d3b14d0e26e78723", + "sha256": "0261f26bf449353f84f83ebfe3922fb2d6a0f98e65c551f3d3b14d0e26e78723" + }, + "sonoma": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/fish/blobs/sha256:a5b25fde2926a00b08d77798c52030543252418733442fc25eb1e0ce99b95010", + "sha256": "a5b25fde2926a00b08d77798c52030543252418733442fc25eb1e0ce99b95010" + }, + "ventura": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/fish/blobs/sha256:f2d8ddb5b5e4a29dc9e39230845b514c9fc169e5f2922a1369bd72decc141886", + "sha256": "f2d8ddb5b5e4a29dc9e39230845b514c9fc169e5f2922a1369bd72decc141886" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/fish/blobs/sha256:8518a301b9136ecbd87373b39c6736fae1fc0569da2fa8be7d5f066f1b320fd0", + "sha256": "8518a301b9136ecbd87373b39c6736fae1fc0569da2fa8be7d5f066f1b320fd0" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/fish/blobs/sha256:c69075343a17848c5f56d4af091e84604f7447fd91d62ebd92ce20b9eb67f2b5", + "sha256": "c69075343a17848c5f56d4af091e84604f7447fd91d62ebd92ce20b9eb67f2b5" + } + } + } + }, + "gh": { + "version": "2.55.0", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:848b301ea3e28c03cac9060b1dfe27b25d2949e5311b123598b959bf34b7c049", + "sha256": "848b301ea3e28c03cac9060b1dfe27b25d2949e5311b123598b959bf34b7c049" + }, + "arm64_ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:848b301ea3e28c03cac9060b1dfe27b25d2949e5311b123598b959bf34b7c049", + "sha256": "848b301ea3e28c03cac9060b1dfe27b25d2949e5311b123598b959bf34b7c049" + }, + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:848b301ea3e28c03cac9060b1dfe27b25d2949e5311b123598b959bf34b7c049", + "sha256": "848b301ea3e28c03cac9060b1dfe27b25d2949e5311b123598b959bf34b7c049" + }, + "sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:4ae5a0881b7a01b6a68e45bee7bc1d89343e29594f7f2e2cb8751075130a2bd2", + "sha256": "4ae5a0881b7a01b6a68e45bee7bc1d89343e29594f7f2e2cb8751075130a2bd2" + }, + "ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:22074fc7d13771f421a4eb3d78198df45cbf17335b3fc083c1480d4e98938ef6", + "sha256": "22074fc7d13771f421a4eb3d78198df45cbf17335b3fc083c1480d4e98938ef6" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:6a21dbcf7d8e6e8de7b61a37784d50b92704ade19e5e8972d168319607b52db4", + "sha256": "6a21dbcf7d8e6e8de7b61a37784d50b92704ade19e5e8972d168319607b52db4" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:5d9bc648156a1de5fd1faae966c08db5969299ed1819357d9bfb434eb215321a", + "sha256": "5d9bc648156a1de5fd1faae966c08db5969299ed1819357d9bfb434eb215321a" + } + } + } + }, + "htop": { + "version": "3.3.0", + "bottle": { + "rebuild": 1, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:ea457e022296c96a73ebecc31119ea225c2b41670426a9099bccf5f1d17673ec", + "sha256": "ea457e022296c96a73ebecc31119ea225c2b41670426a9099bccf5f1d17673ec" + }, + "arm64_ventura": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:5895685e6db67598024850ca3c440e1244ee5dd54bc7c6b5345b28d74f9fa4f0", + "sha256": "5895685e6db67598024850ca3c440e1244ee5dd54bc7c6b5345b28d74f9fa4f0" + }, + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:91b0b5fe4ffb977e6381664d74ec48e890da908a346473b5e4d88f8117a2dc23", + "sha256": "91b0b5fe4ffb977e6381664d74ec48e890da908a346473b5e4d88f8117a2dc23" + }, + "sonoma": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:c3ee757e215de2dfd151ea9eb68ef53bb64ba86c5d07a443c6477bdb952f02bf", + "sha256": "c3ee757e215de2dfd151ea9eb68ef53bb64ba86c5d07a443c6477bdb952f02bf" + }, + "ventura": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:69f690190833cf309baa396b7a7a8218ec012ca93e0825a2b2a4d9f0d5cafb33", + "sha256": "69f690190833cf309baa396b7a7a8218ec012ca93e0825a2b2a4d9f0d5cafb33" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:9872ffeea0cbab0d5f2e418fd06442663a113b67be12e15b0ece20e701f4ada3", + "sha256": "9872ffeea0cbab0d5f2e418fd06442663a113b67be12e15b0ece20e701f4ada3" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:85ee4a9f06bc81442fc93e02f8aa875a7641781aa147aab1f863e5c4d744b47d", + "sha256": "85ee4a9f06bc81442fc93e02f8aa875a7641781aa147aab1f863e5c4d744b47d" + } + } + } + }, + "openjdk": { + "version": "22.0.2", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:a358fe408c5c64524cabed4da75a1d16175ebedc0477ef3870e3db75a0800302", + "sha256": "a358fe408c5c64524cabed4da75a1d16175ebedc0477ef3870e3db75a0800302" + }, + "arm64_ventura": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:08278518189b954b7e2abe25283ef2a50b7de0a4e0bde6fbb890066aa7568dbd", + "sha256": "08278518189b954b7e2abe25283ef2a50b7de0a4e0bde6fbb890066aa7568dbd" + }, + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:10c80312e091cbc90ce66a61da051f0320f96752aeefa4aafdae3a402ba8b738", + "sha256": "10c80312e091cbc90ce66a61da051f0320f96752aeefa4aafdae3a402ba8b738" + }, + "sonoma": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:9f84e386dcc5dca1ecdab63724b6dffc967e8a212ef4673d981ec60b733ce43b", + "sha256": "9f84e386dcc5dca1ecdab63724b6dffc967e8a212ef4673d981ec60b733ce43b" + }, + "ventura": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:b73fa3f093d1153afa5baf376346521d7cc863fe679287b7abf57a180aa7a651", + "sha256": "b73fa3f093d1153afa5baf376346521d7cc863fe679287b7abf57a180aa7a651" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:84795b272691e9ee02b9a0bb9fba35552c1ae8d3b977be2468dc71e57aa4e42f", + "sha256": "84795b272691e9ee02b9a0bb9fba35552c1ae8d3b977be2468dc71e57aa4e42f" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:8493873d21bcda50b1cf5644a2e7582fddf1ac6936ed23e1d2c6ada6d10ee7eb", + "sha256": "8493873d21bcda50b1cf5644a2e7582fddf1ac6936ed23e1d2c6ada6d10ee7eb" + } + } + } + }, + "swiftformat": { + "version": "0.54.3", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:cecdcf7705cb91f9ba9d08793c67edd61b7e1d1acbe2ee1ef598acfd7cfcc6b3", + "sha256": "cecdcf7705cb91f9ba9d08793c67edd61b7e1d1acbe2ee1ef598acfd7cfcc6b3" + }, + "arm64_ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:b2222e0ffee8931b40c61548237ff2037a0e99139089a6df6ab4f3e1a23d0b7a", + "sha256": "b2222e0ffee8931b40c61548237ff2037a0e99139089a6df6ab4f3e1a23d0b7a" + }, + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:e87d9ce5bb0f266c6a31e13752aa74b0ecc895b87eaec987297e2c24b69c505d", + "sha256": "e87d9ce5bb0f266c6a31e13752aa74b0ecc895b87eaec987297e2c24b69c505d" + }, + "sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:e56f11df75c29a52fc1a14d99fb0808858e15f989aac824202ca8380a29a5073", + "sha256": "e56f11df75c29a52fc1a14d99fb0808858e15f989aac824202ca8380a29a5073" + }, + "ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:1c4644e0db67009e71d72ff3139a870898f47dbdb38e4b1f9ca19e16e507a025", + "sha256": "1c4644e0db67009e71d72ff3139a870898f47dbdb38e4b1f9ca19e16e507a025" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:b564501ae28caf4b5108a1ba351a6eb6f989522353cac25e078e8edf88239c96", + "sha256": "b564501ae28caf4b5108a1ba351a6eb6f989522353cac25e078e8edf88239c96" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:82a084203a146c3f27e80440c3c5fc7c1222e1c58e8743445d3e880d1d913957", + "sha256": "82a084203a146c3f27e80440c3c5fc7c1222e1c58e8743445d3e880d1d913957" + } + } + } + }, + "wget": { + "version": "1.24.5", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:9befdad158e59763fb0622083974a6252878019702d8c961e1bec3a5f5305339", + "sha256": "9befdad158e59763fb0622083974a6252878019702d8c961e1bec3a5f5305339" + }, + "arm64_ventura": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:ac4c0330b70dae06eaa8065bfbea78dda277699d1ae8002478017a1bd9cf1908", + "sha256": "ac4c0330b70dae06eaa8065bfbea78dda277699d1ae8002478017a1bd9cf1908" + }, + "arm64_monterey": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:02313702fc03880f221d60ce4d0b652c8b44fe68c15609329d757d031bce6bc4", + "sha256": "02313702fc03880f221d60ce4d0b652c8b44fe68c15609329d757d031bce6bc4" + }, + "sonoma": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:034528edb247df85f90997aca6a51ddb988a880af6bb571b8473de1702a887af", + "sha256": "034528edb247df85f90997aca6a51ddb988a880af6bb571b8473de1702a887af" + }, + "ventura": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:1b7e2f76c90553543a5e25dadf031c6fcfe280f52bf27d89e04006f9d33fd20b", + "sha256": "1b7e2f76c90553543a5e25dadf031c6fcfe280f52bf27d89e04006f9d33fd20b" + }, + "monterey": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:ffc49a5064a003006e69f51434ac5f7ec4f4019c161ad32fab22c32697db61cd", + "sha256": "ffc49a5064a003006e69f51434ac5f7ec4f4019c161ad32fab22c32697db61cd" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:6a4642964fe5c4d1cc8cd3507541736d5b984e34a303a814ef550d4f2f8242f9", + "sha256": "6a4642964fe5c4d1cc8cd3507541736d5b984e34a303a814ef550d4f2f8242f9" + } + } + } + }, + "koekeishiya/formulae/skhd": { + "version": "0.3.9", + "bottle": false + }, + "koekeishiya/formulae/yabai": { + "version": "7.1.2", + "bottle": false + } + }, + "cask": { + "1password": { + "version": "8.10.40", + "options": { + "full_name": "1password" + } + }, + "arc": { + "version": "1.57.2,53036", + "options": { + "full_name": "arc" + } + }, + "discord": { + "version": "0.0.317", + "options": { + "full_name": "discord" + } + }, + "docker": { + "version": "4.33.0,160616", + "options": { + "full_name": "docker" + } + }, + "figma": { + "version": "124.3.2", + "options": { + "full_name": "figma" + } + }, + "google-chrome": { + "version": "128.0.6613.85", + "options": { + "full_name": "google-chrome" + } + }, + "google-cloud-sdk": { + "version": "490.0.0", + "options": { + "full_name": "google-cloud-sdk" + } + }, + "google-drive": { + "version": "96.0", + "options": { + "full_name": "google-drive" + } + }, + "microsoft-edge": { + "version": "128.0.2739.42,a0405b5e-b043-4a22-bc5a-34c762d62c1e", + "options": { + "full_name": "microsoft-edge" + } + }, + "obsidian": { + "version": "1.6.7", + "options": { + "full_name": "obsidian" + } + }, + "raycast": { + "version": "1.81.2", + "options": { + "full_name": "raycast" + } + }, + "readdle-spark": { + "version": "3.17.3.83184", + "options": { + "full_name": "readdle-spark" + } + }, + "slack": { + "version": "4.40.120", + "options": { + "full_name": "slack" + } + }, + "spotify": { + "version": "1.2.44.405,81fd6352,3712", + "options": { + "full_name": "spotify" + } + }, + "todoist": { + "version": "9.7.2", + "options": { + "full_name": "todoist" + } + }, + "visual-studio-code": { + "version": "1.92.2", + "options": { + "full_name": "visual-studio-code" + } + }, + "warp": { + "version": "0.2024.08.20.08.02.stable_00", + "options": { + "full_name": "warp" + } + }, + "xcodes": { + "version": "2.2.0b27", + "options": { + "full_name": "xcodes" + } + } + }, + "vscode": { + "antfu.slidev": null, + "antfu.unocss": null, + "catppuccin.catppuccin-vsc": null, + "catppuccin.catppuccin-vsc-icons": null, + "charliermarsh.ruff": null, + "davidanson.vscode-markdownlint": null, + "donjayamanne.python-environment-manager": null, + "eamodio.gitlens": null, + "esbenp.prettier-vscode": null, + "github.copilot": null, + "github.copilot-chat": null, + "golang.go": null, + "gruntfuggly.todo-tree": null, + "ibm.output-colorizer": null, + "mechatroner.rainbow-csv": null, + "ms-azuretools.vscode-docker": null, + "ms-ceintl.vscode-language-pack-ja": null, + "ms-python.mypy-type-checker": null, + "ms-python.python": null, + "ms-python.vscode-pylance": null, + "ms-vscode-remote.remote-containers": null, + "ms-vscode-remote.remote-ssh": null, + "ms-vscode-remote.remote-ssh-edit": null, + "ms-vscode-remote.vscode-remote-extensionpack": null, + "ms-vscode.remote-explorer": null, + "ms-vscode.remote-server": null, + "p1c2u.docker-compose": null, + "pflannery.vscode-versionlens": null, + "redhat.vscode-yaml": null, + "richie5um2.vscode-sort-json": null, + "sumneko.lua": null, + "tamasfe.even-better-toml": null, + "tomoki1207.pdf": null, + "wakatime.vscode-wakatime": null, + "yzhang.markdown-all-in-one": null + } + }, + "system": { + "macos": { + "sonoma": { + "HOMEBREW_VERSION": "4.3.18-19-g45be393", + "HOMEBREW_PREFIX": "/opt/homebrew", + "Homebrew/homebrew-core": "api", + "CLT": "15.3.0.0.1.1708646388", + "Xcode": "15.4", + "macOS": "14.6.1" + } + } + } +} diff --git a/mac/.gitconfig.mac b/mac/.gitconfig.mac new file mode 100644 index 00000000..165d2056 --- /dev/null +++ b/mac/.gitconfig.mac @@ -0,0 +1,5 @@ +[gpg] + format = ssh + +[gpg "ssh"] + program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign diff --git a/mac/skhd/skhdrc b/mac/skhd/skhdrc new file mode 100644 index 00000000..165a9c3c --- /dev/null +++ b/mac/skhd/skhdrc @@ -0,0 +1,142 @@ +# ################################################################ # +# THE FOLLOWING IS AN EXPLANATION OF THE GRAMMAR THAT SKHD PARSES. # +# FOR SIMPLE EXAMPLE MAPPINGS LOOK FURTHER DOWN THIS FILE.. # +# ################################################################ # + +# A list of all built-in modifier and literal keywords can +# be found at https://github.com/koekeishiya/skhd/issues/1 +# +# A hotkey is written according to the following rules: +# +# hotkey = '<' | +# +# mode = 'name of mode' | ',' +# +# action = '[' ']' | '->' '[' ']' +# ':' | '->' ':' +# ';' | '->' ';' +# +# keysym = '-' | +# +# mod = 'modifier keyword' | '+' +# +# key = | +# +# literal = 'single letter or built-in keyword' +# +# keycode = 'apple keyboard kVK_ values (0x3C)' +# +# proc_map_lst = * +# +# proc_map = ':' | '~' | +# '*' ':' | '*' '~' +# +# string = '"' 'sequence of characters' '"' +# +# command = command is executed through '$SHELL -c' and +# follows valid shell syntax. if the $SHELL environment +# variable is not set, it will default to '/bin/bash'. +# when bash is used, the ';' delimeter can be specified +# to chain commands. +# +# to allow a command to extend into multiple lines, +# prepend '\' at the end of the previous line. +# +# an EOL character signifies the end of the bind. +# +# -> = keypress is not consumed by skhd +# +# * = matches every application not specified in +# +# ~ = application is unbound and keypress is forwarded per usual, when specified in a +# +# A mode is declared according to the following rules: +# +# mode_decl = '::' '@' ':' | '::' ':' | +# '::' '@' | '::' +# +# name = desired name for this mode, +# +# @ = capture keypresses regardless of being bound to an action +# +# command = command is executed through '$SHELL -c' and +# follows valid shell syntax. if the $SHELL environment +# variable is not set, it will default to '/bin/bash'. +# when bash is used, the ';' delimeter can be specified +# to chain commands. +# +# to allow a command to extend into multiple lines, +# prepend '\' at the end of the previous line. +# +# an EOL character signifies the end of the bind. + +# ############################################################### # +# THE FOLLOWING SECTION CONTAIN SIMPLE MAPPINGS DEMONSTRATING HOW # +# TO INTERACT WITH THE YABAI WM. THESE ARE SUPPOSED TO BE USED AS # +# A REFERENCE ONLY, WHEN MAKING YOUR OWN CONFIGURATION.. # +# ############################################################### # + +# focus window +# alt - h : yabai -m window --focus west + +# move managed window +# shift + cmd - h : yabai -m window --warp east + +# balance size of windows +shift + alt - 0 : yabai -m space --balance + +# make floating window fill screen +# shift + alt - up : yabai -m window --grid 1:1:0:0:1:1 + +# make floating window fill left-half of screen +# shift + alt - left : yabai -m window --grid 1:2:0:0:1:1 + +# create desktop, move window and follow focus - uses jq for parsing json (brew install jq) +# shift + cmd - n : yabai -m space --create && \ +# index="$(yabai -m query --spaces --display | jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \ +# yabai -m window --space "${index}" && \ +# yabai -m space --focus "${index}" + +# fast focus desktop +# cmd + alt - x : yabai -m space --focus recent +# cmd + alt - 1 : yabai -m space --focus 1 + +# send window to desktop and follow focus +# shift + cmd - z : yabai -m window --space next; yabai -m space --focus next +# shift + cmd - 2 : yabai -m window --space 2; yabai -m space --focus 2 + +# focus monitor +# ctrl + alt - z : yabai -m display --focus prev +# ctrl + alt - 3 : yabai -m display --focus 3 + +# send window to monitor and follow focus +# ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next +# ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1 + +# move floating window +# shift + ctrl - a : yabai -m window --move rel:-20:0 +# shift + ctrl - s : yabai -m window --move rel:0:20 + +# increase window size +# shift + alt - a : yabai -m window --resize left:-20:0 +# shift + alt - w : yabai -m window --resize top:0:-20 + +# decrease window size +# shift + cmd - s : yabai -m window --resize bottom:0:-20 +# shift + cmd - w : yabai -m window --resize top:0:20 + +# set insertion point in focused container +# ctrl + alt - h : yabai -m window --insert west + +# toggle window zoom +# alt - d : yabai -m window --toggle zoom-parent +# alt - f : yabai -m window --toggle zoom-fullscreen + +# toggle window split type +# alt - e : yabai -m window --toggle split + +# float / unfloat window and center on screen +# alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2 + +# toggle sticky(+float), picture-in-picture +# alt - p : yabai -m window --toggle sticky --toggle pip diff --git a/mac/warp/themes/catppuccin_frappe.yml b/mac/warp/themes/catppuccin_frappe.yml new file mode 100644 index 00000000..420bfd0a --- /dev/null +++ b/mac/warp/themes/catppuccin_frappe.yml @@ -0,0 +1,23 @@ +background: '#303446' +accent: '#f2d5cf' +foreground: '#c6d0f5' +details: darker +terminal_colors: + normal: + black: '#51576d' + red: '#e78284' + green: '#a6d189' + yellow: '#e5c890' + blue: '#8caaee' + magenta: '#f4b8e4' + cyan: '#81c8be' + white: '#b5bfe2' + bright: + black: '#626880' + red: '#e78284' + green: '#a6d189' + yellow: '#e5c890' + blue: '#8caaee' + magenta: '#f4b8e4' + cyan: '#81c8be' + white: '#a5adce' diff --git a/mac/warp/themes/catppuccin_latte.yml b/mac/warp/themes/catppuccin_latte.yml new file mode 100644 index 00000000..84b7d375 --- /dev/null +++ b/mac/warp/themes/catppuccin_latte.yml @@ -0,0 +1,23 @@ +background: '#eff1f5' +accent: '#dc8a78' +foreground: '#4c4f69' +details: lighter +terminal_colors: + normal: + black: '#5c5f77' + red: '#d20f39' + green: '#40a02b' + yellow: '#df8e1d' + blue: '#1e66f5' + magenta: '#ea76cb' + cyan: '#179299' + white: '#acb0be' + bright: + black: '#6c6f85' + red: '#d20f39' + green: '#40a02b' + yellow: '#df8e1d' + blue: '#1e66f5' + magenta: '#ea76cb' + cyan: '#179299' + white: '#bcc0cc' diff --git a/mac/yabai/yabairc b/mac/yabai/yabairc new file mode 100644 index 00000000..914211e7 --- /dev/null +++ b/mac/yabai/yabairc @@ -0,0 +1,46 @@ +#!/usr/bin/env sh + +# +# for this to work you must configure sudo such that +# it will be able to run the command without password +# +# see this wiki page for information: +# - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition +# +# yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" +# sudo yabai --load-sa +# + +# global settings +yabai -m config \ + external_bar off:40:0 \ + menubar_opacity 1.0 \ + mouse_follows_focus off \ + focus_follows_mouse off \ + display_arrangement_order default \ + window_origin_display default \ + window_placement second_child \ + window_zoom_persist on \ + window_shadow on \ + window_animation_duration 0.0 \ + window_animation_easing ease_out_circ \ + window_opacity_duration 0.0 \ + active_window_opacity 1.0 \ + normal_window_opacity 0.90 \ + window_opacity off \ + insert_feedback_color 0xffd75f5f \ + split_ratio 0.50 \ + split_type auto \ + auto_balance off \ + top_padding 12 \ + bottom_padding 12 \ + left_padding 12 \ + right_padding 12 \ + window_gap 06 \ + layout float \ + mouse_modifier fn \ + mouse_action1 move \ + mouse_action2 resize \ + mouse_drop_action swap + +echo "yabai configuration loaded.." diff --git a/setup/apt.sh b/setup/apt.sh new file mode 100755 index 00000000..d9cf45d0 --- /dev/null +++ b/setup/apt.sh @@ -0,0 +1,38 @@ +#!/bin/bash -eux + +$__STEP__ "Install apt packages" + +sudo apt-get update +sudo apt-get upgrade -y +sudo apt-get install -y \ + curl \ + ca-certificates \ + make \ + gcc \ + socat \ + wget + +$__STEP__ "Install Git using PPA" + +sudo apt-add-repository -y ppa:git-core/ppa +sudo apt-get update +sudo apt-get install -y git + +$__STEP__ "Install fish using PPA" + +sudo apt-add-repository -y ppa:fish-shell/release-3 +sudo apt-get update +sudo apt-get install -y fish + +# REF: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository +$__STEP__ "Install Docker and Compose" + +sudo install -m 0755 -d /etc/apt/keyrings +sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc +sudo chmod a+r /etc/apt/keyrings/docker.asc +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +sudo apt-get update +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin diff --git a/setup/aqua.sh b/setup/aqua.sh new file mode 100755 index 00000000..79ce8538 --- /dev/null +++ b/setup/aqua.sh @@ -0,0 +1,15 @@ +#!/bin/bash -eux + +# REF: https://aquaproj.github.io/docs/products/aqua-installer#shell-script +$__STEP__ "Install aqua" + +curl -sSfL -O https://raw.githubusercontent.com/aquaproj/aqua-installer/v3.0.1/aqua-installer +echo "fb4b3b7d026e5aba1fc478c268e8fbd653e01404c8a8c6284fdba88ae62eda6a aqua-installer" | sha256sum -c +chmod +x aqua-installer +./aqua-installer +rm ./aqua-installer + +$__STEP__ "Install aqua packages" + +~/.local/share/aquaproj-aqua/bin/aqua install --all --only-link + diff --git a/setup/brew.sh b/setup/brew.sh new file mode 100755 index 00000000..1ff6b268 --- /dev/null +++ b/setup/brew.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# REF: https://brew.sh/ +$__STEP__ "Install Homebrew" + +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +$__STEP__ "Install Homebrew packages" + +brew upgrade +brew doctor +brew bundle --global --force +brew bundle cleanup --global --force diff --git a/setup/font.sh b/setup/font.sh new file mode 100755 index 00000000..e5529f90 --- /dev/null +++ b/setup/font.sh @@ -0,0 +1,17 @@ +#!/bin/bash -eux + +$__STEP__ "Download fonts" + +mkdir -p ./dist +cd ./dist + +# 源ノ角ゴシック +curl -O "https://github.com/adobe-fonts/source-han-sans/raw/release/Variable/OTF/Subset/SourceHanSansJP-VF.otf" +# 源ノ角ゴシック Code +curl -O "https://github.com/adobe-fonts/source-han-code-jp/raw/release/OTF/SourceHanCodeJP-Regular.otf" +# Source Code Pro (Nerd Font) +curl -O "https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/SourceCodePro/SauceCodeProNerdFont-Regular.ttf" +# Nerd Font +curl -O "https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/NerdFontsSymbolsOnly/SymbolsNerdFont-Regular.ttf" + +cd .. diff --git a/setup/rustup.sh b/setup/rustup.sh new file mode 100755 index 00000000..fb9d3ab3 --- /dev/null +++ b/setup/rustup.sh @@ -0,0 +1,6 @@ +#!/bin/bash -eux + +# REF: https://www.rust-lang.org/tools/install +$__STEP__ "Install rustup" + +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh diff --git a/setup/winget.sh b/setup/winget.sh new file mode 100755 index 00000000..3666a0b0 --- /dev/null +++ b/setup/winget.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +$__STEP__ "Install WinGet (if not exists)" + +if ! command -v winget >/dev/null 2>&1; then + bundle=winget.msixbundle + curl -o $bundle https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle + pwsh -c Add-AppxPackage -Path $bundle + rm $bundle +fi + +$__STEP__ "Install WinGet Packages" + +winget install \ + --accept-source-agreements \ + --accept-package-agreements \ + --silent \ + Microsoft.Edge \ + Microsoft.VisualStudioCode \ + AgileBits.1Password \ + Discord.Discord \ + Figma.Figma \ + Google.GoogleDrive \ + Obsidian.Obsidian \ + LINE.LINE \ + SlackTechnologies.Slack \ + Spotify.Spotify \ + Git.Git \ + jstarks.npiperelay \ + Microsoft.PowerShell \ + Microsoft.PowerToys \ + Microsoft.WindowsTerminal.Preview \ + gerardog.gsudo diff --git a/win/.gitconfig.win b/win/.gitconfig.win new file mode 100644 index 00000000..7256704e --- /dev/null +++ b/win/.gitconfig.win @@ -0,0 +1,8 @@ +[core] + sshCommand = C:/Windows/System32/OpenSSH/ssh.exe + +[gpg] + format = ssh + +[gpg "ssh"] + program = op-ssh-sign diff --git a/win/.wslconfig b/win/.wslconfig new file mode 100644 index 00000000..d2a98e73 --- /dev/null +++ b/win/.wslconfig @@ -0,0 +1,10 @@ +[wsl2] +localhostForwarding = true +kernelCommandLine = vsyscall=emulate +memory = 6GB +swap = 0 + +[experimental] +autoMemoryReclaim = gradual +sparseVhd = true +autoProxy = true diff --git a/win/Microsoft.PowerShell_profile.ps1 b/win/Microsoft.PowerShell_profile.ps1 new file mode 100644 index 00000000..d42ed3d2 --- /dev/null +++ b/win/Microsoft.PowerShell_profile.ps1 @@ -0,0 +1,56 @@ +# Path: $PROFILE/Microsoft.PowerShell_profile.ps1 + +function Set-Path() { + $env:Path = "$HOME\AppData\Local\1Password\app\8;" ` + + "$HOME\.rye\shims;" ` + + "$HOME\AppData\Local\volta\bin;" ` + + "$HOME\AppData\Local\aquaproj-aqua\bat;" ` + + "$HOME\AppData\Local\aquaproj-aqua\bin;" ` + + [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` + [System.Environment]::GetEnvironmentVariable("Path", "User") +} + +function Call($batfile) { + cmd.exe /c "call `"${batfile}`" && set > %temp%\vars.txt" + Get-Content "${env:temp}\vars.txt" | Foreach-Object { + if ($_ -match "^(.*?)=(.*)$") { + Set-Content "env:\$($matches[1])" $matches[2] + } + } +} + +Set-PsReadLineKeyHandler -Chord Ctrl+r -ScriptBlock { + $command = Get-Content (Get-PSReadLineOption).HistorySavePath | fzf --scheme=history --tac + [Microsoft.PowerShell.PSConsoleReadLine]::Insert($command) +} + +Set-PSReadLineKeyHandler -Key Tab -Function Complete + +# mute +Set-PSReadLineOption -BellStyle None + +# Environment variables +$env:LESSCHARSET = "utf-8" +$env:AQUA_GLOBAL_CONFIG = "$HOME\.config\aquaproj-aqua\aqua.yaml" + +# Set PATH +Set-Path + +# Aliases & Functions +Set-Alias powershell pwsh +Set-Alias ls eza +# Git +function ga() { git add -A && git commit } +function gc() { git commit } +function gs($branch) { git switch $branch } +function gpu() { git push } +function gpp() { git pull && git bprune } +# ghq +function gf() { ghq list -p | fzf | ForEach-Object { Set-Location $_ } } +function gg($repo) { ghq get $repo } + +# Starship +Invoke-Expression (&starship init powershell) + +# fnm +fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression diff --git a/win/powertoys/settings_133724822475268291.ptb b/win/powertoys/settings_133724822475268291.ptb new file mode 100644 index 00000000..a9afaac6 Binary files /dev/null and b/win/powertoys/settings_133724822475268291.ptb differ diff --git a/win/terminal/settings.json b/win/terminal/settings.json new file mode 100644 index 00000000..3675f1e1 --- /dev/null +++ b/win/terminal/settings.json @@ -0,0 +1,176 @@ +{ + "$help": "https://aka.ms/terminal-documentation", + "$schema": "https://aka.ms/terminal-profiles-schema-preview", + "actions": + [ + { + "command": + { + "action": "copy", + "singleLine": false + }, + "id": "User.copy" + }, + { + "command": "find", + "id": "User.find" + }, + { + "command": "paste", + "id": "User.paste" + }, + { + "command": + { + "action": "splitPane", + "split": "auto", + "splitMode": "duplicate" + }, + "id": "User.splitPane" + } + ], + "copyFormatting": "none", + "copyOnSelect": false, + "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", + "initialCols": 80, + "initialRows": 20, + "keybindings": + [ + { + "id": "User.paste", + "keys": "ctrl+v" + }, + { + "id": "User.find", + "keys": "ctrl+shift+f" + }, + { + "id": "User.copy", + "keys": "ctrl+c" + }, + { + "id": "User.splitPane", + "keys": "alt+shift+d" + } + ], + "newTabMenu": + [ + { + "type": "remainingProfiles" + } + ], + "profiles": + { + "defaults": + { + "colorScheme": "Catppuccin Latte", + "font": + { + "face": "\u6e90\u30ce\u89d2\u30b4\u30b7\u30c3\u30af Code JP, Symbols Nerd Font", + "size": 10 + } + }, + "list": + [ + { + "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", + "hidden": false, + "name": "PowerShell", + "source": "Windows.Terminal.PowershellCore" + }, + { + "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", + "hidden": false, + "name": "Ubuntu", + "source": "Windows.Terminal.Wsl" + }, + { + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": true, + "name": "Windows PowerShell" + }, + { + "commandline": "C:\\Program Files\\Git\\bin\\bash.exe", + "guid": "{24cf895b-509b-40de-8b52-2a034074ac5f}", + "hidden": false, + "icon": "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico", + "name": "Git Bash", + "startingDirectory": "%USERPROFILE%" + }, + { + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": false, + "name": "Command Prompt" + }, + { + "guid": "{51855cb2-8cce-5362-8f54-464b92b32386}", + "hidden": true, + "name": "Ubuntu", + "source": "CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc" + }, + { + "commandline": "C:\\Program Files\\Git\\bin\\bash.exe", + "guid": "{b189bd66-356a-4008-871b-3cb9c7ae8509}", + "hidden": false, + "icon": "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico", + "name": "Git Bash", + "startingDirectory": "%USERPROFILE%" + } + ] + }, + "schemes": + [ + { + "background": "#EFF1F5", + "black": "#5C5F77", + "blue": "#1E66F5", + "brightBlack": "#ACB0BE", + "brightBlue": "#1E66F5", + "brightCyan": "#179299", + "brightGreen": "#40A02B", + "brightPurple": "#EA76CB", + "brightRed": "#D20F39", + "brightWhite": "#BCC0CC", + "brightYellow": "#DF8E1D", + "cursorColor": "#DC8A78", + "cyan": "#179299", + "foreground": "#4C4F69", + "green": "#40A02B", + "name": "Catppuccin Latte", + "purple": "#EA76CB", + "red": "#D20F39", + "selectionBackground": "#ACB0BE", + "white": "#ACB0BE", + "yellow": "#DF8E1D" + } + ], + "tabWidthMode": "equal", + "theme": "Catppuccin Latte", + "themes": + [ + { + "name": "Catppuccin Latte", + "tab": + { + "background": "#EFF1F5FF", + "iconStyle": "default", + "showCloseButton": "always", + "unfocusedBackground": null + }, + "tabRow": + { + "background": "#E6E9EFFF", + "unfocusedBackground": "#DCE0E8FF" + }, + "window": + { + "applicationTheme": "light", + "experimental.rainbowFrame": false, + "frame": null, + "unfocusedFrame": null, + "useMica": false + } + } + ], + "useAcrylicInTabRow": true +} \ No newline at end of file diff --git a/win/vscode/settings.json b/win/vscode/settings.json new file mode 100644 index 00000000..827ff2be --- /dev/null +++ b/win/vscode/settings.json @@ -0,0 +1,138 @@ +{ + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[markdown]": { + "editor.defaultFormatter": "DavidAnson.vscode-markdownlint" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[vue]": { + "editor.defaultFormatter": "Vue.volar" + }, + "debug.allowBreakpointsEverywhere": true, + "diffEditor.ignoreTrimWhitespace": false, + "editor.accessibilitySupport": "off", + "editor.autoClosingQuotes": "beforeWhitespace", + "editor.autoIndent": "full", + "editor.bracketPairColorization.enabled": true, + "editor.foldingMaximumRegions": 2000, + "editor.fontFamily": "源ノ角ゴシック Code JP, Symbols Nerd Font", + "editor.fontSize": 14, + "editor.formatOnSave": true, + "editor.glyphMargin": false, + "editor.guides.bracketPairs": true, + "editor.inlineSuggest.enabled": true, + "editor.lineHeight": 20, + "editor.linkedEditing": true, + "editor.minimap.enabled": false, + "editor.renderLineHighlight": "all", + "editor.tabSize": 2, + "editor.unicodeHighlight.allowedCharacters": { + "️": true + }, + "editor.unicodeHighlight.ambiguousCharacters": false, + "emmet.triggerExpansionOnTab": true, + "explorer.confirmDelete": false, + "explorer.confirmDragAndDrop": false, + "explorer.confirmPasteNative": false, + "extensions.autoUpdate": true, + "files.autoGuessEncoding": true, + "files.autoSave": "afterDelay", + "files.autoSaveDelay": 500, + "files.eol": "\n", + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/.venv/**": true + }, + "git.autofetch": true, + "git.confirmSync": false, + "git.ignoreLegacyWarning": true, + "git.openRepositoryInParentFolders": "never", + "git.suggestSmartCommit": false, + "github.copilot.enable": {}, + "githubPullRequests.pullBranch": "never", + "gitlens.advanced.messages": { + "suppressGitMissingWarning": true + }, + "go.lintTool": "golangci-lint", + "go.toolsManagement.autoUpdate": true, + "http.proxySupport": "off", + "javascript.updateImportsOnFileMove.enabled": "always", + "jupyter.askForKernelRestart": false, + "markdown-preview-enhanced.previewTheme": "github-light.css", + "markdown-preview-enhanced.puppeteerWaitForTimeout": 3000, + "markdownlint.config": { + "first-line-h1": false, + "no-inline-html": false, + "ol-prefix": false + }, + "notebook.cellToolbarLocation": { + "default": "right", + "jupyter-notebook": "left" + }, + "notebook.formatOnCellExecution": true, + "notebook.formatOnSave.enabled": true, + "notebook.lineNumbers": "on", + "security.workspace.trust.untrustedFiles": "open", + "sortJSON.contextMenu": { + "sortJSONAlphaNum": false, + "sortJSONAlphaNumReverse": false, + "sortJSONKeyLength": false, + "sortJSONKeyLengthReverse": false, + "sortJSONReverse": false, + "sortJSONType": false, + "sortJSONTypeReverse": false, + "sortJSONValues": false, + "sortJSONValuesReverse": false + }, + "terminal.integrated.cursorBlinking": true, + "terminal.integrated.cursorStyle": "line", + "terminal.integrated.defaultProfile.linux": "fish", + "terminal.integrated.defaultProfile.windows": "PowerShell", + "terminal.integrated.enableMultiLinePasteWarning": "never", + "terminal.integrated.fontWeight": "normal", + "terminal.integrated.gpuAcceleration": "on", + "terminal.integrated.ignoreProcessNames": [], + "terminal.integrated.minimumContrastRatio": 1, + "terminal.integrated.profiles.windows": { + "Command Prompt": { + "args": [], + "icon": "terminal-cmd", + "path": [ + "${env:windir}\\Sysnative\\cmd.exe", + "${env:windir}\\System32\\cmd.exe" + ] + }, + "Git Bash": { + "source": "Git Bash" + }, + "PowerShell": { + "icon": "terminal-powershell", + "source": "PowerShell" + }, + "Ubuntu (WSL)": { + "args": [ + "-d", + "Ubuntu" + ], + "path": "C:\\WINDOWS\\System32\\wsl.exe" + } + }, + "terminal.integrated.tabs.enabled": true, + "typescript.updateImportsOnFileMove.enabled": "always", + "window.commandCenter": false, + "window.confirmSaveUntitledWorkspace": false, + "window.zoomLevel": -1, + "workbench.colorTheme": "Catppuccin Latte", + "workbench.editor.enablePreview": false, + "workbench.iconTheme": "catppuccin-latte", + "workbench.startupEditor": "none", + "workbench.tree.indent": 16, + "workbench.tree.renderIndentGuides": "always" +} diff --git a/win/winget.json b/win/winget.json new file mode 100644 index 00000000..f48d1f03 --- /dev/null +++ b/win/winget.json @@ -0,0 +1,140 @@ +{ + "$schema" : "https://aka.ms/winget-packages.schema.2.0.json", + "CreationDate" : "2024-08-29T15:55:56.870-00:00", + "Sources" : + [ + { + "Packages" : + [ + { + "PackageIdentifier" : "Git.Git", + "Version" : "2.45.2" + }, + { + "PackageIdentifier" : "Microsoft.Office", + "Version" : "16.0.17928.20114" + }, + { + "PackageIdentifier" : "Microsoft.OneDrive", + "Version" : "24.156.0804.0002" + }, + { + "PackageIdentifier" : "Google.GoogleDrive", + "Version" : "96.0.0.0" + }, + { + "PackageIdentifier" : "Logitech.OptionsPlus", + "Version" : "1.78.588966" + }, + { + "PackageIdentifier" : "Nvidia.GeForceExperience", + "Version" : "3.28.0.417" + }, + { + "PackageIdentifier" : "Microsoft.Edge", + "Version" : "128.0.2739.42" + }, + { + "PackageIdentifier" : "Microsoft.EdgeWebView2Runtime", + "Version" : "128.0.2739.42" + }, + { + "PackageIdentifier" : "Microsoft.PowerShell", + "Version" : "7.4.5.0" + }, + { + "PackageIdentifier" : "AgileBits.1Password", + "Version" : "8.10.40" + }, + { + "PackageIdentifier" : "Discord.Discord", + "Version" : "1.0.9154" + }, + { + "PackageIdentifier" : "Figma.Figma", + "Version" : "124.2.9" + }, + { + "PackageIdentifier" : "Figma.FigmaAgent", + "Version" : "124.1.15" + }, + { + "PackageIdentifier" : "LINE.LINE", + "Version" : "9.1.2.3379" + }, + { + "PackageIdentifier" : "Rye.Rye", + "Version" : "0.36.0" + }, + { + "PackageIdentifier" : "Spotify.Spotify", + "Version" : "1.2.40.599.g606b7f29" + }, + { + "PackageIdentifier" : "Zoom.Zoom.EXE", + "Version" : "6.1.1 (41705)" + }, + { + "PackageIdentifier" : "aquaproj.aqua", + "Version" : "2.30.0" + }, + { + "PackageIdentifier" : "Obsidian.Obsidian", + "Version" : "1.6.3" + }, + { + "PackageIdentifier" : "jstarks.npiperelay", + "Version" : "0.1.0" + }, + { + "PackageIdentifier" : "SlackTechnologies.Slack", + "Version" : "4.39.95" + }, + { + "PackageIdentifier" : "Microsoft.VisualStudioCode", + "Version" : "1.92.2" + }, + { + "PackageIdentifier" : "Microsoft.PowerToys", + "Version" : "0.82.1" + }, + { + "PackageIdentifier" : "Canonical.Ubuntu.2204", + "Version" : "2204.3.49.0" + }, + { + "PackageIdentifier" : "Microsoft.AppInstaller", + "Version" : "1.23.1911.0" + }, + { + "PackageIdentifier" : "Microsoft.UI.Xaml.2.7", + "Version" : "7.2208.15002.0" + }, + { + "PackageIdentifier" : "Microsoft.UI.Xaml.2.8", + "Version" : "8.2310.30001.0" + }, + { + "PackageIdentifier" : "Microsoft.VCLibs.Desktop.14", + "Version" : "14.0.33728.0" + }, + { + "PackageIdentifier" : "Microsoft.WindowsTerminal.Preview", + "Version" : "1.21.1772.0" + }, + { + "PackageIdentifier" : "TheBrowserCompany.Arc", + "Version" : "1.11.1.38413" + } + ], + "SourceDetails" : + { + "Argument" : "https://cdn.winget.microsoft.com/cache", + "Identifier" : "Microsoft.Winget.Source_8wekyb3d8bbwe", + "Name" : "winget", + "Type" : "Microsoft.PreIndexed.Package" + } + } + ], + "WinGetVersion" : "1.8.1911" +} \ No newline at end of file diff --git a/wsl/wsl.conf b/wsl/wsl.conf new file mode 100644 index 00000000..1e7bc416 --- /dev/null +++ b/wsl/wsl.conf @@ -0,0 +1,7 @@ +[boot] +systemd=true +command = systemctl start docker cron +[interop] +appendWindowsPath = false +[network] +generateResolvConf = true