From 249c49afec96ebe3922458b322e60c67f8617b46 Mon Sep 17 00:00:00 2001 From: phalanx-hk Date: Thu, 25 Jan 2024 09:46:22 +0900 Subject: [PATCH] Add pyenv and poetry installation scripts --- config/homebrew/Brewfile | 62 +------- config/starship/starship.toml | 256 +++++++------------------------ config/vscode/settings.json | 17 +- config/zsh/.zshenv | 2 + install/common/poetry.sh | 6 + install/{mac => common}/pyenv.sh | 0 install/mac/setup.sh | 5 +- 7 files changed, 72 insertions(+), 276 deletions(-) create mode 100644 install/common/poetry.sh rename install/{mac => common}/pyenv.sh (100%) diff --git a/config/homebrew/Brewfile b/config/homebrew/Brewfile index 44649eb..a49e19d 100644 --- a/config/homebrew/Brewfile +++ b/config/homebrew/Brewfile @@ -47,64 +47,4 @@ cask "codewhisperer" cask "docker" cask "font-hack-nerd-font" cask "google-cloud-sdk" -cask "visual-studio-code" -vscode "aaron-bond.better-comments" -vscode "bierner.markdown-preview-github-styles" -vscode "charliermarsh.ruff" -vscode "donjayamanne.githistory" -vscode "eamodio.gitlens" -vscode "ecmel.vscode-html-css" -vscode "esbenp.prettier-vscode" -vscode "formulahendry.auto-close-tag" -vscode "formulahendry.auto-rename-tag" -vscode "GitHub.copilot" -vscode "GitHub.copilot-chat" -vscode "GitHub.github-vscode-theme" -vscode "github.vscode-github-actions" -vscode "GitHub.vscode-pull-request-github" -vscode "golang.go" -vscode "googlecloudtools.cloudcode" -vscode "hashicorp.terraform" -vscode "hbenl.vscode-test-explorer" -vscode "henriiik.docker-linter" -vscode "IBM.output-colorizer" -vscode "ionutvmi.path-autocomplete" -vscode "johnpapa.vscode-peacock" -vscode "kokakiwi.vscode-just" -vscode "littlefoxteam.vscode-python-test-adapter" -vscode "matangover.mypy" -vscode "mhutchie.git-graph" -vscode "mrmlnc.vscode-json5" -vscode "ms-azuretools.vscode-docker" -vscode "ms-kubernetes-tools.vscode-kubernetes-tools" -vscode "ms-python.python" -vscode "ms-python.vscode-pylance" -vscode "ms-toolsai.jupyter" -vscode "ms-toolsai.jupyter-keymap" -vscode "ms-toolsai.jupyter-renderers" -vscode "ms-toolsai.vscode-jupyter-cell-tags" -vscode "ms-toolsai.vscode-jupyter-slideshow" -vscode "ms-vscode-remote.remote-containers" -vscode "ms-vscode-remote.remote-ssh" -vscode "ms-vscode-remote.remote-ssh-edit" -vscode "ms-vscode-remote.remote-wsl" -vscode "ms-vscode-remote.vscode-remote-extensionpack" -vscode "ms-vscode.makefile-tools" -vscode "ms-vscode.remote-explorer" -vscode "ms-vscode.remote-server" -vscode "ms-vscode.test-adapter-converter" -vscode "naumovs.color-highlight" -vscode "njpwerner.autodocstring" -vscode "oderwat.indent-rainbow" -vscode "pnp.polacode" -vscode "redhat.vscode-yaml" -vscode "richie5um2.vscode-sort-json" -vscode "ritwickdey.LiveServer" -vscode "rust-lang.rust-analyzer" -vscode "shalldie.background" -vscode "skellock.just" -vscode "streetsidesoftware.code-spell-checker" -vscode "tamasfe.even-better-toml" -vscode "usernamehw.errorlens" -vscode "vadimcn.vscode-lldb" -vscode "vscode-icons-team.vscode-icons" +cask "visual-studio-code" \ No newline at end of file diff --git a/config/starship/starship.toml b/config/starship/starship.toml index b8f3cd5..499f07d 100644 --- a/config/starship/starship.toml +++ b/config/starship/starship.toml @@ -1,214 +1,68 @@ -[aws] -format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]' - -[bun] -format = '\[[$symbol($version)]($style)\]' - -[c] -format = '\[[$symbol($version(-$name))]($style)\]' - -[cmake] -format = '\[[$symbol($version)]($style)\]' - -[cmd_duration] -format = '\[[โฑ $duration]($style)\]' - -[cobol] -format = '\[[$symbol($version)]($style)\]' - -[conda] -format = '\[[$symbol$environment]($style)\]' - -[crystal] -format = '\[[$symbol($version)]($style)\]' - -[daml] -format = '\[[$symbol($version)]($style)\]' - -[dart] -format = '\[[$symbol($version)]($style)\]' - -[deno] -format = '\[[$symbol($version)]($style)\]' - -[docker_context] -format = '\[[$symbol$context]($style)\]' - -[dotnet] -format = '\[[$symbol($version)(๐ŸŽฏ $tfm)]($style)\]' - -[elixir] -format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]' - -[elm] -format = '\[[$symbol($version)]($style)\]' - -[erlang] -format = '\[[$symbol($version)]($style)\]' - -[fennel] -format = '\[[$symbol($version)]($style)\]' - -[fossil_branch] -format = '\[[$symbol$branch]($style)\]' - -[gcloud] -format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]' +format = """ +[โ–‘โ–’โ–“](#a3aed2)\ +[ ๎œ‘ ](bg:#a3aed2 fg:#090c0c)\ +[๎‚ด](bg:#769ff0 fg:#a3aed2)\ +$directory\ +[๎‚ด](fg:#769ff0 bg:#394260)\ +$git_branch\ +$git_status\ +[๎‚ด](fg:#394260 bg:#212736)\ +$nodejs\ +$rust\ +$golang\ +$php\ +$python\ +[๎‚ด](fg:#212736 bg:#1d2230)\ +$gcloud\ +\n$character""" + +[directory] +style = "fg:#e3e5e5 bg:#769ff0" +format = "[ $path ]($style)" +truncation_length = 2 +truncation_symbol = "โ€ฆ/" + +[directory.substitutions] +"Documents" = "๓ฐˆ™ " +"Downloads" = "๏€™ " +"Music" = "๏€ " +"Pictures" = "๏€พ " [git_branch] -format = '\[[$symbol$branch]($style)\]' +symbol = "๏˜" +style = "bg:#394260" +format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)' [git_status] -format = '([\[$all_status$ahead_behind\]]($style))' -conflicted = "๐Ÿ’ฅ" -ahead = "๐ŸŽ๐Ÿ’จ" -behind = "๐Ÿ˜ฐ" -diverged = "๐Ÿ˜ต" -untracked = "๐ŸŒšโ€" -stashed = "๐Ÿ“ฆ" -modified = "๐Ÿ“" -staged = '๐Ÿ”ฆ' -renamed = "๐Ÿท" -deleted = "๐Ÿ—‘" - -[golang] -format = '\[[$symbol($version)]($style)\]' - -[gradle] -format = '\[[$symbol($version)]($style)\]' - -[guix_shell] -format = '\[[$symbol]($style)\]' - -[haskell] -format = '\[[$symbol($version)]($style)\]' - -[haxe] -format = '\[[$symbol($version)]($style)\]' - -[helm] -format = '\[[$symbol($version)]($style)\]' - -[hg_branch] -format = '\[[$symbol$branch]($style)\]' - -[java] -format = '\[[$symbol($version)]($style)\]' - -[julia] -format = '\[[$symbol($version)]($style)\]' - -[kotlin] -format = '\[[$symbol($version)]($style)\]' - -[kubernetes] -format = '\[[$symbol$context( \($namespace\))]($style)\]' - -[lua] -format = '\[[$symbol($version)]($style)\]' - -[memory_usage] -format = '\[$symbol[$ram( | $swap)]($style)\]' - -[meson] -format = '\[[$symbol$project]($style)\]' - -[nim] -format = '\[[$symbol($version)]($style)\]' - -[nix_shell] -format = '\[[$symbol$state( \($name\))]($style)\]' +style = "bg:#394260" +format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)' [nodejs] -format = '\[[$symbol($version)]($style)\]' - -[ocaml] -format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]' - -[opa] -format = '\[[$symbol($version)]($style)\]' - -[openstack] -format = '\[[$symbol$cloud(\($project\))]($style)\]' - -[os] -format = '\[[$symbol]($style)\]' - -[package] -format = '\[[$symbol$version]($style)\]' - -[perl] -format = '\[[$symbol($version)]($style)\]' - -[php] -format = '\[[$symbol($version)]($style)\]' - -[pijul_channel] -format = '\[[$symbol$channel]($style)\]' - -[pulumi] -format = '\[[$symbol$stack]($style)\]' - -[purescript] -format = '\[[$symbol($version)]($style)\]' +symbol = "๎œ˜" +style = "bg:#212736" +format = '[[ $symbol ($version)](fg:#769ff0 bg:#212736)]($style)' [python] -python_binary = ["./venv/bin/python", "python"] -format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]' - -[raku] -format = '\[[$symbol($version-$vm_version)]($style)\]' - -[red] -format = '\[[$symbol($version)]($style)\]' - -[ruby] -format = '\[[$symbol($version)]($style)\]' +symbol = "๎ˆต " +style = "bg:#212736" +format = '[[ $symbol ($version)](fg:#769ff0 bg:#212736)]($style)' [rust] -format = '\[[$symbol($version)]($style)\]' - -[scala] -format = '\[[$symbol($version)]($style)\]' - -[spack] -format = '\[[$symbol$environment]($style)\]' - -[sudo] -format = '\[[as $symbol]($style)\]' - -[swift] -format = '\[[$symbol($version)]($style)\]' - -[terraform] -format = '\[[$symbol$workspace]($style)\]' - -[username] -format = '\[[$user]($style)\]' +symbol = "๎žจ" +style = "bg:#212736" +format = '[[ $symbol ($version)](fg:#769ff0 bg:#212736)]($style)' -[vagrant] -format = '\[[$symbol($version)]($style)\]' - -[vlang] -format = '\[[$symbol($version)]($style)\]' - -[zig] -format = '\[[$symbol($version)]($style)\]' - -[solidity] -format = '\[[$symbol($version)]($style)\]' - -[[battery.display]] -#ใƒใƒƒใƒ†ใƒชใƒผใ‚’่กจ็คบใ™ใ‚‹ใ‚ฟใ‚คใƒŸใƒณใ‚ฐใ€่กจ็คบใ™ใ‚‹้š›ใฎๆ–‡ๅญ—ใฎใ‚นใ‚ฟใ‚คใƒซ -threshold = 100 -style = "bold blue" +[golang] +symbol = "๎˜ง" +style = "bg:#212736" +format = '[[ $symbol ($version)](fg:#769ff0 bg:#212736)]($style)' -[battery] -#ใƒใƒƒใƒ†ใƒชใƒผใฎๅ„็Šถๆ…‹ใฎใ‚ขใ‚คใ‚ณใƒณใ€ไธŠใ‹ใ‚‰ใƒ•ใƒซๅ……้›ปใ€ๅ……้›ปไธญใ€ใƒใƒƒใƒ†ใƒชใƒผๆฎ‹้‡ไฝŽไธ‹ -full_symbol = "๐Ÿค—" -charging_symbol = "๐Ÿ˜Œ" -discharging_symbol = "๐Ÿ˜จ" +[php] +symbol = "๎˜ˆ" +style = "bg:#212736" +format = '[[ $symbol ($version)](fg:#769ff0 bg:#212736)]($style)' -[time] -disabled = false -time_format = "%R" # Hour:Minute Format +[gcloud] +symbol = 'โ˜๏ธ ' +style = "bg:#212736" +format = '[[ $symbol$account($profile)(@$domain)(\($region\))](fg:#769ff0 bg:#212736)]($style)' \ No newline at end of file diff --git a/config/vscode/settings.json b/config/vscode/settings.json index 076eec7..ef9d07a 100644 --- a/config/vscode/settings.json +++ b/config/vscode/settings.json @@ -1,7 +1,6 @@ { "autoDocstring.docstringFormat": "google", "debug.console.fontSize": 16, - "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.acceptSuggestionOnEnter": "off", "editor.accessibilitySupport": "off", "editor.bracketPairColorization.enabled": false, @@ -16,16 +15,7 @@ "git.confirmSync": false, "git.openRepositoryInParentFolders": "never", "github.copilot.enable": { - "*": false, - "plaintext": true, - "markdown": true, - "": "true", - "go": true, - "jsonc": true, - "rust": true, - "typescript": true, - "yaml": true, - "terraform": "true" + "*": true, }, "html.format.wrapLineLength": 150, "remote.SSH.configFile": "/Users/hirotoshi-kitamura/.ssh/config", @@ -33,7 +23,7 @@ "security.workspace.trust.untrustedFiles": "open", "settingsSync.ignoredExtensions": [], "terminal.integrated.enableMultiLinePasteWarning": false, - "workbench.colorTheme": "GitHub Dark Default", + "workbench.colorTheme": "GitHub Dark", "workbench.settings.useSplitJSON": false, "workbench.panel.defaultLocation": "right", "terminal.integrated.env.osx": { @@ -58,5 +48,6 @@ "editor.defaultFormatter": "redhat.vscode-yaml", "editor.tabSize": 2, "editor.insertSpaces": true - } + }, + "diffEditor.hideUnchangedRegions.enabled": true, } \ No newline at end of file diff --git a/config/zsh/.zshenv b/config/zsh/.zshenv index c4e7373..51f8f1f 100644 --- a/config/zsh/.zshenv +++ b/config/zsh/.zshenv @@ -1,6 +1,8 @@ export LANG="en_US.UTF-8" unsetopt GLOBAL_RCS +export PATH="$HOME/.local/bin:$PATH" + ### goenv ### export GOENV_ROOT="$HOME/.goenv" export PATH="$GOENV_ROOT/bin:$PATH" diff --git a/install/common/poetry.sh b/install/common/poetry.sh new file mode 100644 index 0000000..e077bfe --- /dev/null +++ b/install/common/poetry.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -x + +echo "--- install poetry is start! ---" +curl -sSL https://install.python-poetry.org | python3 - +echo "--- install poetry is done! ---" \ No newline at end of file diff --git a/install/mac/pyenv.sh b/install/common/pyenv.sh similarity index 100% rename from install/mac/pyenv.sh rename to install/common/pyenv.sh diff --git a/install/mac/setup.sh b/install/mac/setup.sh index b5bdb7e..2669217 100644 --- a/install/mac/setup.sh +++ b/install/mac/setup.sh @@ -23,7 +23,10 @@ source "$PARENT_DIR"/common/common.sh /bin/sh "$PARENT_DIR"/common/tfenv.sh ### install pyenv ### -/bin/sh "$CUR_DIR"/pyenv.sh +/bin/sh "$PARENT_DIR"/common/pyenv.sh + +### install poetry ### +/bin/sh "$PARENT_DIR"/common/poetry.sh ### vscode #### /bin/sh "$CUR_DIR"/vscode.sh