From f329af286a039e6af089b3ef8de59ae5f9c6579b Mon Sep 17 00:00:00 2001 From: Patrick Kissling Date: Fri, 1 Mar 2024 08:20:08 +0100 Subject: [PATCH] Migrate from Alacritty with tmux to warp --- Makefile | 8 ++------ README.md | 13 ++----------- brew/Brewfile | 1 - brew/Brewfile.work | 1 + starship/starship.toml | 5 ++--- tmux/.tmux.conf | 33 --------------------------------- tmux/idea-tmux-shell | 10 ---------- tmux/install.sh | 17 ----------------- tmux/vscode-tmux-shell | 5 ----- vscode/install.sh | 2 +- vscode/settings.json | 10 +--------- warp/install.sh | 5 +++++ warp/settings.plist | 32 ++++++++++++++++++++++++++++++++ zsh/.zshrc | 9 --------- 14 files changed, 46 insertions(+), 105 deletions(-) delete mode 100644 tmux/.tmux.conf delete mode 100755 tmux/idea-tmux-shell delete mode 100755 tmux/install.sh delete mode 100755 tmux/vscode-tmux-shell create mode 100644 warp/install.sh create mode 100644 warp/settings.plist diff --git a/Makefile b/Makefile index eaa2ebb..631256e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: alacritty brew git gpg k9s nvim rust sdkman ssh starship tmux vscode zsh +.PHONY: alacritty brew git gpg k9s nvim rust sdkman ssh starship vscode zsh default: .PHONY bootstrap: @@ -48,11 +48,7 @@ ssh: bootstrap starship: bootstrap brew @chmod +x starship/install.sh @./starship/install.sh - -tmux: bootstrap brew - @chmod +x tmux/install.sh - @./tmux/install.sh - + vscode: bootstrap brew @chmod +x vscode/install.sh @./vscode/install.sh diff --git a/README.md b/README.md index c32edb1..5010d2c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ for the following tools: - [sdkman](https://sdkman.io/) - [ssh](https://www.ssh.com/) - [starship](https://starship.rs/) -- [tmux](https://github.com/tmux/tmux) - [vscode](https://code.visualstudio.com/) - [zsh](https://ohmyz.sh/) @@ -26,9 +25,9 @@ can be used to install the tool and its corresponding configuration manually. ### Screenshots -#### Alacritty with tmux, zsh and Starship +#### Warp with zsh and Starship -![Alacritty with tmux, zsh and Starship](/.github/screenshots/alacritty_tmux_zsh_starship.png) +![Warp with zsh and Starship](/.github/screenshots/warp_zsh_starship.png) #### nvim @@ -125,14 +124,6 @@ make starship Install starship shell prompt, create symlinks. -##### tmux - -```bash -make tmux -``` - -Install tpm (tmux plugin manager), create symlinks. - ##### vscode ```bash diff --git a/brew/Brewfile b/brew/Brewfile index 575fd0f..5ed9e28 100644 --- a/brew/Brewfile +++ b/brew/Brewfile @@ -53,7 +53,6 @@ brew "supabase/tap/supabase" brew "tfenv" brew "the_silver_searcher" brew "tldr" -brew "tmux" brew "tree" brew "typescript" brew "unbound" diff --git a/brew/Brewfile.work b/brew/Brewfile.work index 5ce67dd..c30d469 100644 --- a/brew/Brewfile.work +++ b/brew/Brewfile.work @@ -15,5 +15,6 @@ cask "google-chrome" cask "mattermost" cask "postman" cask "stats" +cask "warp" instance_eval(File.read(ENV['HOME'] + "/dotfiles/brew/Brewfile")) # include core Brefile mas "EasyRes", id: 688211836 diff --git a/starship/starship.toml b/starship/starship.toml index e69eb0e..de0cb1e 100644 --- a/starship/starship.toml +++ b/starship/starship.toml @@ -1,4 +1,5 @@ format = """\ + $time\ $kubernetes\ $directory\ $git_branch\ @@ -9,8 +10,6 @@ format = """\ $jobs\ $cmd_duration\ $line_break\ - $battery\ - $time\ $character\ """ @@ -63,7 +62,7 @@ format = """\ style = "bold" [kubernetes] - format = '[$context]($style) ' + format = 'ยป [$context]($style) ' disabled = false style = "bold" contexts = [ diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf deleted file mode 100644 index 340a548..0000000 --- a/tmux/.tmux.conf +++ /dev/null @@ -1,33 +0,0 @@ -# List of plugins -set -g @plugin 'dracula/tmux' -set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'tmux-plugins/tmux-sensible' -set -g @plugin 'nhdaly/tmux-better-mouse-mode' - -# https://github.com/tmux-plugins/tpm/issues/17 -set-environment -g PATH "${HOMEBREW_PREFIX}/bin:/usr/local/bin:/bin:/usr/bin" - -# allow mouse wheel scrolling -setw -g mouse on -set -g @scroll-speed-num-lines-per-scroll 1 - -# grey out inactive pane -set -g window-style "bg=#44475a" -set -g window-active-style "bg=terminal" - -# status bar in terminal color -set -g status-bg "terminal" - -# dracula -set -g @dracula-plugins " " # disable all plugins -set -g @dracula-show-left-icon window -set -g @dracula-show-powerline false - -# set color -set -g default-terminal "screen-256color" - -# set default shell -set -g default-command /bin/zsh - -# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) -run '~/.tmux/plugins/tpm/tpm' diff --git a/tmux/idea-tmux-shell b/tmux/idea-tmux-shell deleted file mode 100755 index 2a12061..0000000 --- a/tmux/idea-tmux-shell +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# from https://medium.com/@joaomoreno/persistent-terminal-sessions-in-vs-code-8fc469ed6b41 -if [ "$(arch)" = "arm64" ]; then - eval "$(/opt/homebrew/bin/brew shellenv)" - else - eval "$(/usr/local/bin/brew shellenv)" - fi -SESSION=$(echo "idea-$(pwd)" | sed 's/\./_/g') -tmux attach-session -d -t "$SESSION" || tmux new-session -s "$SESSION" diff --git a/tmux/install.sh b/tmux/install.sh deleted file mode 100755 index 67092d3..0000000 --- a/tmux/install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -ex - -# create .tmux folder, if not exist -mkdir -p "${HOME}"/.tmux/plugins - -# checkout tpm git repo, if not exist -if [ ! -d "${HOME}"/.tmux/plugins/tpm ]; then - git clone https://github.com/tmux-plugins/tpm "${HOME}"/.tmux/plugins/tpm - tmux source "${HOME}"/dotfiles/tmux/.tmux.conf -fi - -# create symlink -ln -sfv "${HOME}"/dotfiles/tmux/.tmux.conf "${HOME}" - -# install all tmux plugins defined in `.tmux.conf` -"${HOME}"/.tmux/plugins/tpm/bin/install_plugins diff --git a/tmux/vscode-tmux-shell b/tmux/vscode-tmux-shell deleted file mode 100755 index af084fa..0000000 --- a/tmux/vscode-tmux-shell +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# from https://medium.com/@joaomoreno/persistent-terminal-sessions-in-vs-code-8fc469ed6b41 -SESSION=$(echo "vscode-$(pwd)" | sed 's/\./_/g') -"${HOMEBREW_PREFIX}"/bin/tmux attach-session -t "$SESSION" || "${HOMEBREW_PREFIX}"/bin/tmux new-session -s "$SESSION" diff --git a/vscode/install.sh b/vscode/install.sh index 1bf8472..e689c52 100755 --- a/vscode/install.sh +++ b/vscode/install.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash set -ex # create symlinks diff --git a/vscode/settings.json b/vscode/settings.json index a34525d..e3cbdcb 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -124,19 +124,11 @@ "**/node_modules": true, "**/target": true }, + "security.promptForLocalFileProtocolHandling": false, "terminal.external.osxExec": "Alacritty.app", "terminal.integrated.defaultProfile.osx": "zsh", "terminal.integrated.enableMultiLinePasteWarning": false, "terminal.integrated.fontFamily": "Iosevka Term Extended", - "terminal.integrated.macOptionClickForcesSelection": true, - "terminal.integrated.profiles.osx": { - "zsh": { - "args": [ - "${env:HOME}/dotfiles/tmux/vscode-tmux-shell" - ], - "path": "zsh" - } - }, "terraform.languageServer.enable": true, "typescript.updateImportsOnFileMove.enabled": "always", "window.autoDetectColorScheme": true, diff --git a/warp/install.sh b/warp/install.sh new file mode 100644 index 0000000..b4e2d4a --- /dev/null +++ b/warp/install.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -ex + +defaults write dev.warp.Warp-Stable -string "${HOME}"/dotfiles/warp/settings.plist +defaults read dev.warp.Warp-Stable > "${HOME}"/dotfiles/warp/settings.plist diff --git a/warp/settings.plist b/warp/settings.plist new file mode 100644 index 0000000..d7f8a17 --- /dev/null +++ b/warp/settings.plist @@ -0,0 +1,32 @@ +{ + AIAssistantRequestLimitInfo = "{\\"limit\\":100,\\"num_requests_used_since_refresh\\":0,\\"next_refresh_time\\":\\"2024-02-29T20:54:51.257228Z\\"}"; + AliasExpansionBannerSeen = true; + ApplePressAndHoldEnabled = false; + AutosuggestionAcceptedCount = 2; + ChangelogVersions = "{\\"v0.2024.02.20.08.01.stable_02\\":true,\\"v0.2024.02.27.08.01.stable_03\\":true}"; + CompletionsOpenWhileTyping = false; + EnforceMinimumContrast = "\\"OnlyNamedColors\\""; + ExperimentId = "debf66fd-580f-476b-b5e8-3665465bd402"; + FontName = "\\"Iosevka Fixed\\""; + FontSize = "14.0"; + HasAutoOpenedWelcomeFolder = true; + HonorPS1 = true; + LinkTooltip = true; + Notifications = "{\\"mode\\":\\"Enabled\\",\\"is_long_running_enabled\\":true,\\"long_running_threshold\\":{\\"secs\\":30,\\"nanos\\":0},\\"is_password_prompt_enabled\\":true}"; + OpenFileEditor = "\\"VSCode\\""; + OverrideBlur = 1; + OverrideOpacity = 80; + ReceivedReferralTheme = "\\"Inactive\\""; + SavedPrompt = "{\\"CustomChipSelection\\":{\\"chips\\":[{\\"chip\\":\\"Time24\\",\\"config\\":{}},{\\"chip\\":\\"WorkingDirectory\\",\\"config\\":{}},{\\"chip\\":\\"ShellGitBranch\\",\\"config\\":{}},{\\"chip\\":\\"GitDirtyFiles\\",\\"config\\":{}}]}}"; + SelectedSystemThemes = "{\\"light\\":\\"CyberWave\\",\\"dark\\":\\"CyberWave\\"}"; + Shortcuts = true; + ShouldDimInactivePanes = true; + ShowIndicatorsButton = true; + Spacing = "\\"Normal\\""; + SystemTheme = true; + UseThinStrokes = "\\"OnHighDpiDisplays\\""; + VimKeybindingsBannerState = "\\"Dismissed\\""; + WelcomeTipsCompleted = true; + WelcomeTipsFeaturesUsed = "[{\\"Action\\":\\"SplitPane\\"},{\\"Action\\":\\"OpenWarpDrive\\"},{\\"Action\\":\\"ThemePicker\\"},{\\"Hint\\":\\"CreateBlock\\"},{\\"Hint\\":\\"BlockSelect\\"},{\\"Hint\\":\\"BlockAction\\"},{\\"Action\\":\\"CommandPalette\\"},{\\"Action\\":\\"WarpAI\\"},{\\"Action\\":\\"CommandSearch\\"}]"; + WorkflowsBoxOpen = true; +} diff --git a/zsh/.zshrc b/zsh/.zshrc index 6352c93..e5d5994 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -8,7 +8,6 @@ plugins=( git git-auto-fetch terraform - tmux zoxide ) @@ -16,11 +15,6 @@ plugins=( export ZSH=~/.oh-my-zsh source $ZSH/oh-my-zsh.sh -# create new tmux default session -if [ -z "$TMUX" ]; then - tmux attach -t default || tmux new -s default\; split-window -v \; split-window -h \; select-pane -t 1 \; -fi - # configure zsh export DISABLE_AUTO_UPDATE=true export DISABLE_MAGIC_FUNCTIONS=true @@ -102,9 +96,6 @@ function kx() { export GIT_CONFIG_COUNT=1 export GIT_CONFIG_KEY_0="gpg.program" GIT_CONFIG_VALUE_0="${HOMEBREW_PREFIX}/bin/gpg" -# save all tmux sessions in the global history -export PROMPT_COMMAND='history -a; history -r' - # Aliases (must be one of the last commands to overwrite zsh aliases) alias cat="bat" alias g="git"