From daec57464211e0adac18c063502db7baf5617d3d Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Thu, 4 Jan 2024 02:18:31 +0200 Subject: [PATCH] feat: updates --- .config/alacritty/alacritty.yml | 133 ----- .zshrc | 2 +- install.sh | 66 +-- synced/com.googlecode.iterm2.plist | 811 ----------------------------- 4 files changed, 17 insertions(+), 995 deletions(-) delete mode 100644 .config/alacritty/alacritty.yml delete mode 100644 synced/com.googlecode.iterm2.plist diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml deleted file mode 100644 index ed276de8..00000000 --- a/.config/alacritty/alacritty.yml +++ /dev/null @@ -1,133 +0,0 @@ -cursor: - vi_mode_style: - shape: Block -draw_bold_text_with_bright_colors: true -# shell: -# args: -# - -l -# - -c -# - '/bin/zsh -c "tmux attach || tmux"' -# program: /bin/zsh -window: - padding: - x: 2 - y: 2 - - dynamic_padding: true - decorations: full - opacity: 0.95 -font: - normal: - family: 'MesloLGS NF' - size: 14.0 - builtin_box_drawing: true -hints: - enabled: - - binding: - key: U - mods: Control|Shift - command: open - hyperlinks: true - mouse: - enabled: true - mods: None - post_processing: true - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)[^\0-\x1f-Ÿ<>\"\\s{-}\\^⟨⟩`]+" - -# Cheat sheet -# \x02 - TMUX esc -# \x17 - vim - Ctrl+W -# \e - ESC -key_bindings: - # Navigate entire words - # - { key: Right, mods: Alt, chars: "\x1BF" } - # - { key: Left, mods: Alt, chars: "\x1BB" } - # - { key: Left, mods: Alt, chars: "\eb" } - # - { key: Right, mods: Alt, chars: "\ew" } - # - { key: Left, mods: Control, chars: "\eb" } - # - { key: Right, mods: Control, chars: "\ef" } - # TODO: don't know what this does - figure it out - # - { chars: "\eOH", key: Left, mode: AppCursor, mods: Command } - # - { chars: "\eOF", key: Right, mode: AppCursor, mods: Command } - - # move between tmux panes: Cmd+Shift+(HJKL) or Cmd+Shift+(Left Down Up Right) Arrow - - { chars: "\x02\e[D", key: Left, mods: Command|Shift } - - { chars: "\x02\e[D", key: H, mods: Command|Shift } - - { chars: "\x02\e[C", key: Right, mods: Command|Shift } - - { chars: "\x02\e[C", key: L, mods: Command|Shift } - - { chars: "\x02\e[A", key: Up, mods: Command|Shift } - - { chars: "\x02\e[A", key: K, mods: Command|Shift } - - { chars: "\x02\e[B", key: Down, mods: Command|Shift } - - { chars: "\x02\e[B", key: J, mods: Command|Shift } - # move between vim panes: Cmd+(HJKL) or Cmd+(Left Down Up Right) Arrow - - { chars: "\x17j", key: Down, mods: Command } - - { chars: "\x17j", key: J, mods: Command } - - { chars: "\x17k", key: Up, mods: Command } - - { chars: "\x17k", key: K, mods: Command } - - { chars: "\x17l", key: Right, mods: Command } - - { chars: "\x17l", key: L, mods: Command } - - { chars: "\x17h", key: Left, mods: Command } - - { chars: "\x17h", key: H, mods: Command } - # Select all in nvim: Cmd+A - - { chars: "\eggVG", key: A, mods: Command } - # Delete entire row: Cmd+Backspace - - { chars: "\x15", key: Back, mods: Command } - # Delete entire word: Alt+Backspace - - { chars: "\u0017", key: Back, mods: Alt } - # Delete entire word forward Alt+Delete - # - { chars: "\ew\u0017", key: Delete, mods: Alt } - # Rename the current tmux window - - { chars: "\x02,", key: Comma, mods: Command } - # Select a new tmux session for the attached client interactively - - { chars: "\x02s", key: P, mods: Command|Shift } - # vim pick file - - { chars: "\e\e sf", key: P, mods: Command } - # Select window 1-9 - - { chars: "\x021", key: Key1, mods: Command } - - { chars: "\x022", key: Key2, mods: Command } - - { chars: "\x023", key: Key3, mods: Command } - - { chars: "\x024", key: Key4, mods: Command } - - { chars: "\x025", key: Key5, mods: Command } - - { chars: "\x026", key: Key6, mods: Command } - - { chars: "\x027", key: Key7, mods: Command } - - { chars: "\x028", key: Key8, mods: Command } - - { chars: "\x029", key: Key9, mods: Command } - - { chars: "\x020", key: Key0, mods: Command } - # Switch to last tmux session - # - { chars: "\x02L", key: L, mods: Command } - # ??? - # - { chars: "\x02[", key: LBracket, mods: Command } - # - { chars: "\x02]", key: RBracket, mods: Command } - # Change to the previous tmux window - - { chars: "\x02p", key: LBracket, mods: Command|Shift } - # Change to the next tmux window - - { chars: "\x02n", key: RBracket, mods: Command|Shift } - # Split the current pane into two, left and right - - { chars: "\x02_", key: D, mods: Command|Shift } - # Split the current pane into two, top and bottom. - - { chars: "\x02|", key: D, mods: Command } - # Type :w to save neovim - - { chars: "\e\e:w\n", key: S, mods: Command } - # Type :wa to save all neovim files in nvim window - - { chars: "\e\e:wa\n", key: S, mods: Command|Shift } - # Type ZZ to save and quit current pane - - { chars: "\e\eZZ", key: S, mods: Command|Alt } - # Create a new tmux window - - { chars: "\x02c", key: T, mods: Command } - # Break the current tmux pane out of the tmux window - # - { chars: "\x02!", key: T, mods: Command|Shift } - # Kill the current tmux pane (and window if last pane) - - { chars: "\x02x", key: W, mods: Command } - # Detach from session - - { chars: "\x02d", key: W, mods: Command|Shift } - # Toggle the zoom state of the current tmux pane - - { chars: "\x02z", key: Z, mods: Command } - - { chars: "\e[1;9D", key: Right, mods: Command|Shift } - # Nvim navigate while in insert mode - - { chars: "\e\eja", key: J, mods: Alt } - - { chars: "\e\eka", key: K, mods: Alt } - - { chars: "\e\ei", key: H, mods: Alt } - - { chars: "\e\ela", key: L, mods: Alt } - - { chars: "\x02M", key: K, mods: Control } - -live_config_reload: true diff --git a/.zshrc b/.zshrc index f7c30cf0..aa126724 100644 --- a/.zshrc +++ b/.zshrc @@ -1,6 +1,6 @@ export DOTFILES="$HOME/.dotfiles" export CFG="$DOTFILES/.config" -export DOTBIN="$CFG/bin" +export DOTBIN="$HOME/bin" source "$DOTFILES/functions.sh" source "$DOTFILES/exports.sh" diff --git a/install.sh b/install.sh index 88f8152f..6d71b2f4 100755 --- a/install.sh +++ b/install.sh @@ -27,12 +27,12 @@ man_install # gi_gen echo_cyan "Fetching gi_gen latest version..." gi_ver=$(curl -s "https://api.github.com/repos/chenasraf/gi_gen/tags" | jq -r '.[0].name') -ver_file="$HOME/.config/.bin/.gi_gen_version" +ver_file="$HOME/.bin/.gi_gen_version" mkdir -p $(dirname $ver_file) touch $ver_file existing_ver=$(cat $ver_file) if [[ "$existing_ver" != "$gi_ver" ]]; then - echo_cyan "Downloading gi_gen $gi_ver..." + echo_cyan "Downloading gi_gen $gi_ver to $DOTBIN..." mkdir -p $DOTBIN mkdir -p $HOME/.config/.bin if is_mac; then @@ -82,47 +82,23 @@ for ((i = 1; i <= $#install_npm; i++)); do done if [[ $#install_npm_final -gt 0 ]]; then - echo_cyan "Installing pnpm packages ($install_npm_final)..." - pnpm install -g $install_npm_final + if ask "Install npm packages $install_npm_final?"; then + echo_cyan "Installing pnpm packages ($install_npm_final)..." + pnpm install -g $install_npm_final + else + echo_cyan "Skipping npm packages installation." + fi else echo_cyan "All pnpm packages already installed." fi -# local npm packages -check_npm_local=( - "tx" -) - -install_npm_local=( - "utils@file:$DOTFILES/utils/build" -) - -install_npm_final_local=() - -for ((i = 1; i <= $#install_npm_local; i++)); do - which $check_npm_local[$i] >/dev/null 2>&1 - exit_code=$? - if [[ $exit_code -ne 0 ]]; then - install_npm_final_local+=("${install_npm_local[$i]}") - fi -done - -if [[ $#install_npm_final_local -gt 0 ]]; then - echo_cyan "Building local pnpm packages ($install_npm_final_local)..." - for ((i = 1; i <= $#install_npm_final_local; i++)); do - dir="${install_npm_final_local[$i]}" - dir=$(dirname "${dir##*:}") - echo_cyan "Building $dir..." - pushd $dir - pnpm build - popd - done - echo_cyan "Installing local pnpm packages ($install_npm_final_local)..." - pnpm install -g $install_npm_final_local -else - echo_cyan "All local pnpm packages already installed." +if [[ ! -f $(which tx) ]]; then + echo_cyan "Installing utils..." + pushd $DOTFILES/utils + pnpm install && pnpm build && pnpm ginst + popd fi - + # zplug if [[ ! -d $HOME/.zplug ]]; then curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh @@ -140,23 +116,13 @@ if [[ ! -d ~/.tmux-power ]]; then git clone git@github.com:wfxr/tmux-power.git ~/.tmux-power fi -# if [[ ! -f $(which tblf) ]]; then -# echo_cyan "Installing tblf..." -# file=$(mktemp -d) -# git clone https://github.com/chenasraf/tblf --depth=1 $file/tblf -# cd $file/tblf -# make build && make install -# cd $cwd -# rm -rf $file -# fi - # .config rflags='-vtr --exclude ".git" --exclude "node_modules" --exclude ".DS_Store"' rsync_template="rsync $rflags {}" -# printf "%s\n" "--delete $DOTFILES/.config/nvim $HOME/.config/nvim" | xargs -I {} bash -c "$rsync_template" -# printf "%s\n" "--exclude 'mudlet' --exclude 'nvim' $DOTFILES/.config/ $HOME/.config/" | xargs -I {} bash -c "$rsync_template" + echo_cyan "Copying $DOTFILES/.config/nvim to $HOME/.config/nvim..." xrg "--delete $DOTFILES/.config/nvim/ $HOME/.config/nvim/" "$rsync_template" + echo_cyan "Copying $DOTFILES/.config to $HOME/.config..." xrg "--exclude 'mudlet' --exclude 'nvim' $DOTFILES/.config/ $HOME/.config/" "$rsync_template" diff --git a/synced/com.googlecode.iterm2.plist b/synced/com.googlecode.iterm2.plist deleted file mode 100644 index 9981814e..00000000 --- a/synced/com.googlecode.iterm2.plist +++ /dev/null @@ -1,811 +0,0 @@ - - - - - AlternateMouseScroll - - Default Bookmark Guid - F5FB9C94-2223-4D67-AA94-93799F2AB7F3 - EnableAPIServer - - HapticFeedbackForEsc - - HotkeyMigratedFromSingleToMulti - - New Bookmarks - - - ASCII Anti Aliased - - ASCII Ligatures - - Ambiguous Double Width - - Ansi 0 Color - - Alpha Component - 1 - Blue Component - 0.11764705926179886 - Color Space - sRGB - Green Component - 0.098039217293262482 - Red Component - 0.078431375324726105 - - Ansi 1 Color - - Alpha Component - 1 - Blue Component - 0.16300037503242493 - Color Space - sRGB - Green Component - 0.23660069704055786 - Red Component - 0.7074432373046875 - - Ansi 10 Color - - Alpha Component - 1 - Blue Component - 0.56541937589645386 - Color Space - sRGB - Green Component - 0.9042816162109375 - Red Component - 0.3450070321559906 - - Ansi 11 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.8833775520324707 - Red Component - 0.9259033203125 - - Ansi 12 Color - - Alpha Component - 1 - Blue Component - 0.9485321044921875 - Color Space - sRGB - Green Component - 0.67044717073440552 - Red Component - 0.65349078178405762 - - Ansi 13 Color - - Alpha Component - 1 - Blue Component - 0.8821563720703125 - Color Space - sRGB - Green Component - 0.4927266538143158 - Red Component - 0.8821563720703125 - - Ansi 14 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.99263292551040649 - Red Component - 0.37597531080245972 - - Ansi 15 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99999600648880005 - - Ansi 2 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.7607843279838562 - Red Component - 0.0 - - Ansi 3 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.76959484815597534 - Red Component - 0.78058648109436035 - - Ansi 4 Color - - Alpha Component - 1 - Blue Component - 0.78216177225112915 - Color Space - sRGB - Green Component - 0.26474356651306152 - Red Component - 0.15404300391674042 - - Ansi 5 Color - - Alpha Component - 1 - Blue Component - 0.74494361877441406 - Color Space - sRGB - Green Component - 0.24931684136390686 - Red Component - 0.752197265625 - - Ansi 6 Color - - Alpha Component - 1 - Blue Component - 0.78166204690933228 - Color Space - sRGB - Green Component - 0.77425903081893921 - Red Component - 0.0 - - Ansi 7 Color - - Alpha Component - 1 - Blue Component - 0.78104829788208008 - Color Space - sRGB - Green Component - 0.78105825185775757 - Red Component - 0.7810397744178772 - - Ansi 8 Color - - Alpha Component - 1 - Blue Component - 0.4078223705291748 - Color Space - sRGB - Green Component - 0.40782788395881653 - Red Component - 0.40781760215759277 - - Ansi 9 Color - - Alpha Component - 1 - Blue Component - 0.45833224058151245 - Color Space - sRGB - Green Component - 0.47524076700210571 - Red Component - 0.8659515380859375 - - BM Growl - - Background Color - - Alpha Component - 1 - Blue Component - 0.230743408203125 - Color Space - sRGB - Green Component - 0.10665485684962811 - Red Component - 0.0023730630055069923 - - Background Image Location - - Badge Color - - Alpha Component - 0.5 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 1 - - Blinking Cursor - - Blur - - Bold Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99999600648880005 - - Brighten Bold Text - - Character Encoding - 4 - Close Sessions On End - - Columns - 120 - Command - - Cursor Boost - 0.0 - Cursor Color - - Alpha Component - 1 - Blue Component - 0.99998724460601807 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99997633695602417 - - Cursor Guide Color - - Alpha Component - 0.25 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.9268307089805603 - Red Component - 0.70213186740875244 - - Cursor Text Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.0 - Red Component - 0.0 - - Custom Command - No - Custom Directory - No - Default Bookmark - No - Description - Default - Disable Window Resizing - - Flashing Bell - - Foreground Color - - Alpha Component - 1 - Blue Component - 0.86198854446411133 - Color Space - sRGB - Green Component - 0.86199951171875 - Red Component - 0.86197912693023682 - - Guid - F5FB9C94-2223-4D67-AA94-93799F2AB7F3 - Horizontal Spacing - 1 - Idle Code - 0 - Jobs to Ignore - - rlogin - ssh - slogin - telnet - - Keyboard Map - - 0x2d-0x40000 - - Action - 11 - Text - 0x1f - - 0x32-0x40000 - - Action - 11 - Text - 0x00 - - 0x33-0x40000 - - Action - 11 - Text - 0x1b - - 0x34-0x40000 - - Action - 11 - Text - 0x1c - - 0x35-0x40000 - - Action - 11 - Text - 0x1d - - 0x36-0x40000 - - Action - 11 - Text - 0x1e - - 0x37-0x40000 - - Action - 11 - Text - 0x1f - - 0x38-0x40000 - - Action - 11 - Text - 0x7f - - 0x7f-0x80000-0x33 - - Action - 11 - Label - - Text - 0x17 - - 0xf700-0x220000 - - Action - 10 - Text - [1;2A - - 0xf700-0x240000 - - Action - 10 - Text - [1;5A - - 0xf700-0x260000 - - Action - 10 - Text - [1;6A - - 0xf700-0x280000 - - Action - 11 - Text - 0x1b 0x1b 0x5b 0x41 - - 0xf701-0x220000 - - Action - 10 - Text - [1;2B - - 0xf701-0x240000 - - Action - 10 - Text - [1;5B - - 0xf701-0x260000 - - Action - 10 - Text - [1;6B - - 0xf701-0x280000 - - Action - 11 - Text - 0x1b 0x1b 0x5b 0x42 - - 0xf702-0x220000 - - Action - 10 - Text - [1;2D - - 0xf702-0x240000 - - Action - 10 - Text - [1;5D - - 0xf702-0x260000 - - Action - 10 - Text - [1;6D - - 0xf702-0x280000-0x7b - - Action - 10 - Label - - Text - b - - 0xf703-0x220000 - - Action - 10 - Text - [1;2C - - 0xf703-0x240000 - - Action - 10 - Text - [1;5C - - 0xf703-0x260000 - - Action - 10 - Text - [1;6C - - 0xf703-0x280000-0x7c - - Action - 10 - Label - - Text - f - - 0xf704-0x20000 - - Action - 10 - Text - [1;2P - - 0xf705-0x20000 - - Action - 10 - Text - [1;2Q - - 0xf706-0x20000 - - Action - 10 - Text - [1;2R - - 0xf707-0x20000 - - Action - 10 - Text - [1;2S - - 0xf708-0x20000 - - Action - 10 - Text - [15;2~ - - 0xf709-0x20000 - - Action - 10 - Text - [17;2~ - - 0xf70a-0x20000 - - Action - 10 - Text - [18;2~ - - 0xf70b-0x20000 - - Action - 10 - Text - [19;2~ - - 0xf70c-0x20000 - - Action - 10 - Text - [20;2~ - - 0xf70d-0x20000 - - Action - 10 - Text - [21;2~ - - 0xf70e-0x20000 - - Action - 10 - Text - [23;2~ - - 0xf70f-0x20000 - - Action - 10 - Text - [24;2~ - - 0xf729-0x20000 - - Action - 10 - Text - [1;2H - - 0xf729-0x40000 - - Action - 10 - Text - [1;5H - - 0xf72b-0x20000 - - Action - 10 - Text - [1;2F - - 0xf72b-0x40000 - - Action - 10 - Text - [1;5F - - - Link Color - - Alpha Component - 1 - Blue Component - 0.9337158203125 - Color Space - sRGB - Green Component - 0.55789834260940552 - Red Component - 0.19802422821521759 - - Minimum Contrast - 0.0 - Mouse Reporting - - Name - Default - Non Ascii Font - Monaco 12 - Non-ASCII Anti Aliased - - Normal Font - CascadiaCodePL-Roman 13 - Option Key Sends - 0 - Prompt Before Closing 2 - - Right Option Key Sends - 0 - Rows - 28 - Screen - -1 - Scrollback Lines - 0 - Selected Text Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.0 - Red Component - 0.0 - - Selection Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.84313726425170898 - Red Component - 0.70196080207824707 - - Send Code When Idle - - Shortcut - - Silence Bell - - Sync Title - - Tags - - Terminal Type - xterm-256color - Transparency - 0.0 - Unlimited Scrollback - - Use Bold Font - - Use Bright Bold - - Use Italic Font - - Use Non-ASCII Font - - Vertical Spacing - 1 - Visual Bell - - Window Type - 0 - Working Directory - /Users/chen - - - PMPrintingExpandedStateForPrint2 - - PointerActions - - Button,1,1,, - - Action - kContextMenuPointerAction - - Button,2,1,, - - Action - kPasteFromClipboardPointerAction - - Gesture,ThreeFingerSwipeDown,, - - Action - kPrevWindowPointerAction - - Gesture,ThreeFingerSwipeLeft,, - - Action - kPrevTabPointerAction - - Gesture,ThreeFingerSwipeRight,, - - Action - kNextTabPointerAction - - Gesture,ThreeFingerSwipeUp,, - - Action - kNextWindowPointerAction - - - SoundForEsc - - ToolbeltTools - - Profiles - - VisualIndicatorForEsc - - findMode_iTerm - 0 - kCPKSelectionViewPreferredModeKey - 0 - kCPKSelectionViewShowHSBTextFieldsKey - - -