From 24112f6944d449abe8c05a25f196c3c737cc6bf8 Mon Sep 17 00:00:00 2001 From: ebkn Date: Fri, 26 Jul 2024 16:20:35 +0900 Subject: [PATCH 1/8] feat: install zsh --- bin/init/macos.sh | 3 +++ vim/coc/package.json | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/init/macos.sh b/bin/init/macos.sh index a736562..7fab72e 100644 --- a/bin/init/macos.sh +++ b/bin/init/macos.sh @@ -32,6 +32,9 @@ brew install git printf "\n--- Installing openssl ---\n" brew install openssl +printf "\n--- Installing zsh ---\n" +brew install zsh + printf "\n--- Cloning dotfiles ---\n" if [ ! -d ~/dotfiles ]; then git clone https://github.com/ebkn/dotfiles ~/dotfiles diff --git a/vim/coc/package.json b/vim/coc/package.json index 35673c2..56a528b 100644 --- a/vim/coc/package.json +++ b/vim/coc/package.json @@ -25,7 +25,6 @@ "coc-yaml": ">=1.9.0", "configstore": "^6.0.0", "cspell-dict-vimlang": "^1.0.1", - "prettier": "^2.8.1", "@yaegassy/coc-ruff": ">=0.6.3", "coc-jedi": ">=0.36.1" }, From 64fef5aaff3581232fc34a8bf3632c4ce5b81339 Mon Sep 17 00:00:00 2001 From: ebkn Date: Wed, 21 Aug 2024 19:12:33 +0900 Subject: [PATCH 2/8] feat: remove tmux --- .tmux.conf | 87 ------------------------------------ .zshrc | 4 -- README.md | 1 - bin/init/macos.sh | 7 --- bin/init/ubuntu.sh | 11 ----- brewfiles/Brewfile-cask | 1 + brewfiles/Brewfile-shell | 1 - vim/color.vim | 1 - vim/dein/instantly/base.toml | 4 -- zsh/alias.zsh | 1 - 10 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 .tmux.conf diff --git a/.tmux.conf b/.tmux.conf deleted file mode 100644 index 8004365..0000000 --- a/.tmux.conf +++ /dev/null @@ -1,87 +0,0 @@ -# plugins -set -g @plugin 'tmux-plugins/tpm' -# persist environments -set -g @plugin 'tmux-plugins/tmux-resurrect' -set -g @plugin 'tmux-plugins/tmux-continuum' -# status bar -set -g @plugin 'tmux-plugins/tmux-cpu' -set -g @plugin 'tmux-plugins/tmux-battery' - -# enable automatic restoration -set -g @continuum-restore 'on' - -# set prefix key -set -g prefix C-q -unbind C-b - -set-option -g history-limit 1000000 - -# enable mouse -set-option -g mouse on - -# fix remaining word -set -s set-clipboard off - -# color -set -g default-terminal "screen-256color" -set-option -sa terminal-overrides ',$TERM:Tc' - -# reduce delay -set -sg escape-time 1 -set-option -g repeat-time 500 - -# index number -set -g base-index 1 -set -g pane-base-index 1 - -setw -g monitor-activity on - -# used for autoreading file changes at vim -set -g focus-events on - -# session -# create new session -bind N new-session -c '#{pane_current_path}' - -# window -# create new window -bind c new-window -c '#{pane_current_path}' -# split window -bind v split-window -h -c '#{pane_current_path}' -bind s split-window -v -c '#{pane_current_path}' - -# pane -# select pane -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R -# resize pane -bind -r H resize-pane -L 2 -bind -r J resize-pane -D 2 -bind -r K resize-pane -U 2 -bind -r L resize-pane -R 2 -# remove pane -bind q kill-pane - -# copy -bind u copy-mode -setw -g mode-keys vi -if-shell '[[ `uname` = "Darwin" ]]' 'source-file ~/dotfiles/tmux/mac.conf' -if-shell '[[ `uname` = "Linux" ]]' 'source-file ~/dotfiles/tmux/linux.conf' - -# status bar -set -g status-bg black -set -g status-fg white -set-option -g status-position top -set-option -g status-left-length 300 -set-option -g status-right-length 300 -set-option -g status-left '#{pane_current_path}' -set-option -g status-right 'CPU #{cpu_percentage} | #(~/dotfiles/tmux/bin/wifi) | #{battery_percentage} | %Y-%m-%d(%a) %H:%M' -set-option -g status-interval 1 # refresh interval -set-option -g status-justify centre -set-option -g automatic-rename on -set-option -g automatic-rename-format '#{b:pane_current_path}' - -# Initialize tmux plugin manager (this should be the end of config) -run '~/.tmux/plugins/tpm/tpm' diff --git a/.zshrc b/.zshrc index edb8054..99db751 100644 --- a/.zshrc +++ b/.zshrc @@ -1,7 +1,3 @@ -# start tmux -# export PATH="/opt/homebrew/bin:$PATH" # to recognize tmux -# [[ -z "$TMUX" ]] && tmux -u - ENABLE_CORRECTION="true" source "$HOME/dotfiles/zsh/path.zsh" diff --git a/README.md b/README.md index 748fa12..fe7b87a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ curl -s https://raw.githubusercontent.com/ebkn/dotfiles/master/bin/init/ubuntu.s - install by [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle), [homebrew-cask](https://github.com/Homebrew/homebrew-cask)(mac only) - [zsh](https://github.com/zsh-users/zsh) - install [plugins](https://github.com/ebkn/dotfiles/blob/master/zsh/plugin.zsh) by [zinit](https://github.com/zdharma/zinit) -- [tmux](https://github.com/tmux/tmux) - [neovim](https://github.com/neovim/neovim) - install [plugins](https://github.com/ebkn/dotfiles/blob/master/vim/dein) by [dein](https://github.com/Shougo/dein.vim) - and some setting files diff --git a/bin/init/macos.sh b/bin/init/macos.sh index 7fab72e..301d324 100644 --- a/bin/init/macos.sh +++ b/bin/init/macos.sh @@ -59,7 +59,6 @@ rm ~/installer.sh printf "\n--- Installing shell packages ---\n" brew bundle --file="~/dotfiles/brewfiles/Brewfile-shell" -[ -f ~/.tmux.conf ] && mv ~/.tmux.conf ~/backup/ [ -f ~/.bash_profile ] && mv ~/.bash_profile ~/backup/ [ -f ~/.bashrc ] && mv ~/.bashrc ~/backup/ [ -f ~/.vimrc ] && mv ~/.vimrc ~/backup/ @@ -73,7 +72,6 @@ brew bundle --file="~/dotfiles/brewfiles/Brewfile-shell" ln -s ~/dotfiles/.gitignore_global ~ ln -s ~/dotfiles/.bash_profile ~ ln -s ~/dotfiles/.bashrc ~ -ln -s ~/dotfiles/.tmux.conf ~ ln -s ~/dotfiles/.vimrc ~ ln -s ~/dotfiles/.xvimrc ~ ln -s ~/dotfiles/.ideavimrc ~ @@ -88,11 +86,6 @@ sudo ln -s /usr/local/share/git-core/contrib/diff-highlight/diff-highlight /usr/ source ~/.zshrc -printf "\n--- Starting tmux ---\n" -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm -tmux -tmux source-file ~/.tmux.conf - printf "\n--- Installing languages from homebrew ---\n" brew bundle --file="~/dotfiles/brewfiles/Brewfile-lang" diff --git a/bin/init/ubuntu.sh b/bin/init/ubuntu.sh index 9642666..dc1a646 100644 --- a/bin/init/ubuntu.sh +++ b/bin/init/ubuntu.sh @@ -24,7 +24,6 @@ git clone \ https://github.com/adobe-fonts/source-code-pro ~/.local/share/fonts/source-code-pro fc-cache -f -v ~/.local/share/fonts/adobe-fonts/source-code-pro - printf "\n--- Installing zsh ---\n" sudo apt install zsh @@ -42,16 +41,6 @@ printf "\n--- Starting zsh ---\n" zsh source ~/.zshrc -printf "\n--- Installing tmux ---\n" -sudo apt install tmux -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm -[ -f ~/.tmux.conf ] && mv ~/.tmux.conf ~/backup/ -ln -s ~/dotfiles/.tmux.conf ~ - -printf "\n--- Starting tmux ---\n" -tmux -tmux source-file ~/.tmux.conf - printf "\n--- Installing vim ---\n" sudo apt install vim diff --git a/brewfiles/Brewfile-cask b/brewfiles/Brewfile-cask index 5111d1f..4810064 100644 --- a/brewfiles/Brewfile-cask +++ b/brewfiles/Brewfile-cask @@ -17,3 +17,4 @@ cask 'kindle' cask 'zoom' cask 'deepl' cask 'typora' +cask 'wezterm' diff --git a/brewfiles/Brewfile-shell b/brewfiles/Brewfile-shell index 5d80648..219114b 100644 --- a/brewfiles/Brewfile-shell +++ b/brewfiles/Brewfile-shell @@ -1,5 +1,4 @@ brew 'zsh' -brew 'tmux' brew 'vim' brew 'fzf' brew 'neovim' diff --git a/vim/color.vim b/vim/color.vim index fc6554b..138ad92 100644 --- a/vim/color.vim +++ b/vim/color.vim @@ -1,7 +1,6 @@ " enable 256 colors set t_Co=256 -" tmux if (empty($TMUX)) if (has("nvim")) let $NVIM_TUI_ENABLE_TRUE_COLOR=1 diff --git a/vim/dein/instantly/base.toml b/vim/dein/instantly/base.toml index 145031e..c4319a4 100644 --- a/vim/dein/instantly/base.toml +++ b/vim/dein/instantly/base.toml @@ -26,10 +26,6 @@ nnoremap sd (operator-surround-delete) nnoremap sr (operator-surround-replace) ''' -# improved autoread -[[plugins]] -repo = 'tmux-plugins/vim-tmux-focus-events' - # for vim-delve [[plugins]] repo = 'benmills/vimux' diff --git a/zsh/alias.zsh b/zsh/alias.zsh index 123172e..4ed90e8 100644 --- a/zsh/alias.zsh +++ b/zsh/alias.zsh @@ -11,7 +11,6 @@ alias vim='nvim' # dotfiles alias dot='cd ~/dotfiles' -alias tmuxs='tmux source-file ~/.tmux.conf' alias zshrc='vim ~/.zshrc' # requires procs From b2cc390cab086ef3858e81454d3da6dade86fa68 Mon Sep 17 00:00:00 2001 From: ebkn Date: Wed, 21 Aug 2024 19:13:09 +0900 Subject: [PATCH 3/8] feat: remove difft --- .gitconfig | 1 - brewfiles/Brewfile-shell | 1 - 2 files changed, 2 deletions(-) diff --git a/.gitconfig b/.gitconfig index 19fba6c..974f4dc 100644 --- a/.gitconfig +++ b/.gitconfig @@ -29,7 +29,6 @@ date = short [diff] - external = difft algorithm = histogram submodule = log diff --git a/brewfiles/Brewfile-shell b/brewfiles/Brewfile-shell index 219114b..774f60d 100644 --- a/brewfiles/Brewfile-shell +++ b/brewfiles/Brewfile-shell @@ -23,4 +23,3 @@ brew 'procs' brew 'tig' brew 'bat' brew 'direnv' -brew 'difft' From 2b665d9ef5ffbf05b8571e4802004d70501cbc94 Mon Sep 17 00:00:00 2001 From: ebkn Date: Wed, 21 Aug 2024 19:17:58 +0900 Subject: [PATCH 4/8] fix: brew cask name --- brewfiles/Brewfile-lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brewfiles/Brewfile-lang b/brewfiles/Brewfile-lang index 49a913d..84d62eb 100644 --- a/brewfiles/Brewfile-lang +++ b/brewfiles/Brewfile-lang @@ -29,7 +29,7 @@ brew 'tflint' brew 'java' # C -brew 'clangd-format' +brew 'clang-format' # PHP brew 'php' From abc3af820a60f93217d8393f693865ca15cbd296 Mon Sep 17 00:00:00 2001 From: ebkn Date: Wed, 21 Aug 2024 19:23:17 +0900 Subject: [PATCH 5/8] fix: zsh --- bin/init/macos.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/init/macos.sh b/bin/init/macos.sh index 301d324..1e0ac84 100644 --- a/bin/init/macos.sh +++ b/bin/init/macos.sh @@ -84,10 +84,12 @@ ln -s ~/dotfiles/vim/coc/package.json ~/.config/coc/extensions/ sudo ln -s /usr/local/share/git-core/contrib/diff-highlight/diff-highlight /usr/local/bin/diff-highlight -source ~/.zshrc +[ -f ~/.gitconfig ] && mv ~/.gitconfig ~/backup/ +ln -s ~/dotfiles/.gitconfig ~/.gitconfig +ln -s ~/dotfiles/.gitconfig-ebkn ~/.gitconfig-ebkn -printf "\n--- Installing languages from homebrew ---\n" -brew bundle --file="~/dotfiles/brewfiles/Brewfile-lang" +mkdir -p ~/.config/wezterm +ln -s ~/dotfiles/wezterm.lua ~/.config/wezterm/wezterm.lua # ruby ln -s ~/dotfiles/.pryrc ~ @@ -109,15 +111,13 @@ ln -s ~/dotfiles/.tigrc ~ # Java sudo ln -sfn "$(brew --prefix)/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk" -printf "\n--- Installing apps by Homebrew-Cask.. ---\n" -brew bundle --file="~/dotfiles/brewfiles/Brewfile-cask" +source ~/.zshrc -mkdir -p ~/.config/wezterm -ln -s ~/dotfiles/wezterm.lua ~/.config/wezterm/wezterm.lua +printf "\n--- Installing languages from homebrew ---\n" +brew bundle --file="~/dotfiles/brewfiles/Brewfile-lang" -[ -f ~/.gitconfig ] && mv ~/.gitconfig ~/backup/ -ln -s ~/dotfiles/.gitconfig ~/.gitconfig -ln -s ~/dotfiles/.gitconfig-ebkn ~/.gitconfig-ebkn +printf "\n--- Installing apps by Homebrew-Cask.. ---\n" +brew bundle --file="~/dotfiles/brewfiles/Brewfile-cask" if "$CI"; then printf "\n--- Skipping to install apps by mas.. ---\n" From 3eafa89107d9c182665b368312ede32e185a177a Mon Sep 17 00:00:00 2001 From: ebkn Date: Fri, 30 Aug 2024 11:30:12 +0900 Subject: [PATCH 6/8] fix: macos instlattion --- README.md | 2 +- bin/init/macos.sh | 1 + brewfiles/Brewfile-lang | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe7b87a..6c0680f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ macos ```sh # macos xcode-select --install -curl -s https://raw.githubusercontent.com/ebkn/dotfiles/master/bin/init/macos.sh | bash +curl -s https://raw.githubusercontent.com/ebkn/dotfiles/master/bin/init/macos.sh | zsh ``` ubuntu diff --git a/bin/init/macos.sh b/bin/init/macos.sh index 1e0ac84..cbd0014 100644 --- a/bin/init/macos.sh +++ b/bin/init/macos.sh @@ -97,6 +97,7 @@ ln -s ~/dotfiles/.irbrc ~ ln -s ~/dotfiles/.rspec ~ # node +mkdir -p ~/.nvm ln -s ~/dotfiles/.eslintrc.json ~ ln -s ~/dotfiles/tsconfig.json ~ diff --git a/brewfiles/Brewfile-lang b/brewfiles/Brewfile-lang index 84d62eb..6cca049 100644 --- a/brewfiles/Brewfile-lang +++ b/brewfiles/Brewfile-lang @@ -22,7 +22,6 @@ brew 'hadolint' brew 'shellcheck' # Terraform -brew 'terraform' brew 'tflint' # Java From 73023622614f778ad7d7d34e90009566dd33bf5b Mon Sep 17 00:00:00 2001 From: ebkn Date: Fri, 30 Aug 2024 12:09:00 +0900 Subject: [PATCH 7/8] fix: install neovim --- bin/init/macos.sh | 7 ------- vim/nvim/init.vim | 6 ------ 2 files changed, 13 deletions(-) diff --git a/bin/init/macos.sh b/bin/init/macos.sh index cbd0014..715b7c5 100644 --- a/bin/init/macos.sh +++ b/bin/init/macos.sh @@ -127,10 +127,3 @@ else brew install mas brew bundle --file="~/dotfiles/brewfiles/Brewfile-mas" fi - -# neovim -npm i -g neovim -sudo gem install neovim -# install python2 -# python2 -m pip install --user --upgrade pynvim -python3 -m pip install --user --upgrade pynvim diff --git a/vim/nvim/init.vim b/vim/nvim/init.vim index e1741b3..b42c8d9 100644 --- a/vim/nvim/init.vim +++ b/vim/nvim/init.vim @@ -1,9 +1,3 @@ -" requires -" python2 -m pip install --user --upgrade pynvim -" python3 -m pip install --user --upgrade pynvim -" sudo gem install neovim -" npm i -g neovim - set runtimepath^=~/.vim runtimepath+=~/.vim/after let &packpath=&runtimepath source ~/.vimrc From 326542df8a9397b2b51b645332d5c8dc324e5046 Mon Sep 17 00:00:00 2001 From: ebkn Date: Fri, 30 Aug 2024 12:18:40 +0900 Subject: [PATCH 8/8] feat: add sshconfig --- .sshconfig | 4 ++++ bin/init/macos.sh | 1 + 2 files changed, 5 insertions(+) create mode 100644 .sshconfig diff --git a/.sshconfig b/.sshconfig new file mode 100644 index 0000000..439d217 --- /dev/null +++ b/.sshconfig @@ -0,0 +1,4 @@ +Host github.com + HostName github.com + User git + IdentityFile ~/.ssh/github_ed25519 diff --git a/bin/init/macos.sh b/bin/init/macos.sh index 715b7c5..d36bfdc 100644 --- a/bin/init/macos.sh +++ b/bin/init/macos.sh @@ -69,6 +69,7 @@ brew bundle --file="~/dotfiles/brewfiles/Brewfile-shell" "$(brew --prefix)/opt/fzf/install" +mv ~/.sshconfig ~/.ssh/config ln -s ~/dotfiles/.gitignore_global ~ ln -s ~/dotfiles/.bash_profile ~ ln -s ~/dotfiles/.bashrc ~