From 3f51a5842490e268e3c64abfba0d85dea6f04464 Mon Sep 17 00:00:00 2001 From: baileywickham Date: Mon, 9 Sep 2024 13:00:46 -0400 Subject: [PATCH] update --- config/.env | 1 + config/.zshrc | 3 +- config/com.googlecode.iterm2.plist | 1611 ++++++++++++++++++++++++++++ modules/add2FA.sh | 5 - modules/install_zsh.sh | 15 - personal_packages.sh | 98 +- 6 files changed, 1653 insertions(+), 80 deletions(-) create mode 100644 config/com.googlecode.iterm2.plist delete mode 100644 modules/add2FA.sh delete mode 100755 modules/install_zsh.sh diff --git a/config/.env b/config/.env index 269d8cb..cf9e362 100644 --- a/config/.env +++ b/config/.env @@ -7,6 +7,7 @@ path "$HOME/.local/bin" path "${HOME}/bin" path "${HOME}/bin/metaculus" path "${HOME}/bin/cnsl" +path "${HOME}/bin/compiled" export EDITOR="nvim" export TERM="xterm-256color" export PGDATA=/opt/homebrew/var/postgresql@16 diff --git a/config/.zshrc b/config/.zshrc index 75535e8..1a65c43 100644 --- a/config/.zshrc +++ b/config/.zshrc @@ -101,4 +101,5 @@ esac [ -f /opt/homebrew/etc/profile.d/autojump.sh ] && . /opt/homebrew/etc/profile.d/autojump.sh export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH" -source ~/.iterm2_shell_integration.zsh +export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH" +eval "$(starship init zsh)" diff --git a/config/com.googlecode.iterm2.plist b/config/com.googlecode.iterm2.plist new file mode 100644 index 0000000..aa12da1 --- /dev/null +++ b/config/com.googlecode.iterm2.plist @@ -0,0 +1,1611 @@ + + + + + Default Bookmark Guid + 8BDD2053-07BA-48C1-935C-17583DD0F5BF + GlobalKeyMap + + 0x19-0x60000 + + Action + 39 + Text + + + 0x68-0x40000-0x26 + + Action + 18 + Apply Mode + 0 + Escaping + 2 + Text + + Version + 2 + + 0x6a-0x40000-0x8 + + Action + 21 + Apply Mode + 0 + Escaping + 2 + Text + + Version + 2 + + 0x6b-0x40000-0x9 + + Action + 20 + Apply Mode + 0 + Escaping + 2 + Text + + Version + 2 + + 0x6c-0x40000-0x23 + + Action + 19 + Apply Mode + 0 + Escaping + 2 + Text + + Version + 2 + + 0x9-0x40000 + + Action + 32 + Text + + + 0xf700-0x300000 + + Action + 7 + Text + + + 0xf701-0x300000 + + Action + 6 + Text + + + 0xf702-0x300000 + + Action + 2 + Text + + + 0xf702-0x320000 + + Action + 33 + Text + + + 0xf703-0x300000 + + Action + 0 + Text + + + 0xf703-0x320000 + + Action + 34 + Text + + + 0xf729-0x100000 + + Action + 5 + Text + + + 0xf72b-0x100000 + + Action + 4 + Text + + + 0xf72c-0x100000 + + Action + 9 + Text + + + 0xf72c-0x20000 + + Action + 9 + Text + + + 0xf72d-0x100000 + + Action + 8 + Text + + + 0xf72d-0x20000 + + Action + 8 + Text + + + + HapticFeedbackForEsc + + HotkeyMigratedFromSingleToMulti + + NeverWarnAboutShortLivedSessions_8BDD2053-07BA-48C1-935C-17583DD0F5BF + + NeverWarnAboutShortLivedSessions_8BDD2053-07BA-48C1-935C-17583DD0F5BF_selection + 0 + New Bookmarks + + + ASCII Anti Aliased + + 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 0 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.11764705926179886 + Color Space + sRGB + Green Component + 0.098039217293262482 + Red Component + 0.078431375324726105 + + Ansi 0 Color (Light) + + 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 1 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.16300037503242493 + Color Space + sRGB + Green Component + 0.23660069704055786 + Red Component + 0.7074432373046875 + + Ansi 1 Color (Light) + + 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 10 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.56541937589645386 + Color Space + sRGB + Green Component + 0.9042816162109375 + Red Component + 0.3450070321559906 + + Ansi 10 Color (Light) + + 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 11 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.8833775520324707 + Red Component + 0.9259033203125 + + Ansi 11 Color (Light) + + 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 12 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.9485321044921875 + Color Space + sRGB + Green Component + 0.67044717073440552 + Red Component + 0.65349078178405762 + + Ansi 12 Color (Light) + + 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 13 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.8821563720703125 + Color Space + sRGB + Green Component + 0.4927266538143158 + Red Component + 0.8821563720703125 + + Ansi 13 Color (Light) + + 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 14 Color (Dark) + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 0.99263292551040649 + Red Component + 0.37597531080245972 + + Ansi 14 Color (Light) + + 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 15 Color (Dark) + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 0.99999600648880005 + + Ansi 15 Color (Light) + + 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 2 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.7607843279838562 + Red Component + 0.0 + + Ansi 2 Color (Light) + + 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 3 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.76959484815597534 + Red Component + 0.78058648109436035 + + Ansi 3 Color (Light) + + 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 4 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.78216177225112915 + Color Space + sRGB + Green Component + 0.26474356651306152 + Red Component + 0.15404300391674042 + + Ansi 4 Color (Light) + + 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 5 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.74494361877441406 + Color Space + sRGB + Green Component + 0.24931684136390686 + Red Component + 0.752197265625 + + Ansi 5 Color (Light) + + 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 6 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.78166204690933228 + Color Space + sRGB + Green Component + 0.77425903081893921 + Red Component + 0.0 + + Ansi 6 Color (Light) + + 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 7 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.78104829788208008 + Color Space + sRGB + Green Component + 0.78105825185775757 + Red Component + 0.7810397744178772 + + Ansi 7 Color (Light) + + 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 8 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.4078223705291748 + Color Space + sRGB + Green Component + 0.40782788395881653 + Red Component + 0.40781760215759277 + + Ansi 8 Color (Light) + + 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 + + Ansi 9 Color (Dark) + + Alpha Component + 1 + Blue Component + 0.45833224058151245 + Color Space + sRGB + Green Component + 0.47524076700210571 + Red Component + 0.8659515380859375 + + Ansi 9 Color (Light) + + 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.97999999999999998 + Color Space + sRGB + Green Component + 0.97999999999999998 + Red Component + 0.97999999999999998 + + Background Color (Dark) + + Alpha Component + 1 + Blue Component + 0.12103271484375 + Color Space + sRGB + Green Component + 0.099111050367355347 + Red Component + 0.0806884765625 + + Background Color (Light) + + Alpha Component + 1 + Blue Component + 0.97999999999999998 + Color Space + sRGB + Green Component + 0.97999999999999998 + Red Component + 0.97999999999999998 + + Background Image Location + + Badge Color + + Alpha Component + 0.5 + Blue Component + 0.11610633134841919 + Color Space + sRGB + Green Component + 0.11610633134841919 + Red Component + 0.74613857269287109 + + Badge Color (Dark) + + Alpha Component + 0.5 + Blue Component + 0.65218597462148864 + Color Space + sRGB + Green Component + 0.65218597462148864 + Red Component + 0.9787440299987793 + + Badge Color (Light) + + Alpha Component + 0.5 + Blue Component + 0.11610633058398889 + Color Space + sRGB + Green Component + 0.11610633058398889 + Red Component + 0.74613857269287109 + + Blinking Cursor + + Blur + + Bold Color + + Alpha Component + 1 + Blue Component + 0.062745101749897003 + Color Space + sRGB + Green Component + 0.062745101749897003 + Red Component + 0.062745101749897003 + + Bold Color (Dark) + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 0.99999600648880005 + + Bold Color (Light) + + Alpha Component + 1 + Blue Component + 0.062745098039215685 + Color Space + sRGB + Green Component + 0.062745098039215685 + Red Component + 0.062745098039215685 + + Character Encoding + 4 + Close Sessions On End + + Columns + 80 + Command + + Cursor Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Cursor Color (Dark) + + Alpha Component + 1 + Blue Component + 0.99998724460601807 + Color Space + sRGB + Green Component + 1 + Red Component + 0.99997633695602417 + + Cursor Color (Light) + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Cursor Guide Color + + Alpha Component + 0.25 + Blue Component + 0.85319280624389648 + Color Space + sRGB + Green Component + 0.77217715978622437 + Red Component + 0.52338260412216187 + + Cursor Guide Color (Dark) + + Alpha Component + 0.25 + Blue Component + 0.94099044799804688 + Color Space + sRGB + Green Component + 0.80232617749205526 + Red Component + 0.37649588016392954 + + Cursor Guide Color (Light) + + Alpha Component + 0.25 + Blue Component + 0.85319280624389648 + Color Space + sRGB + Green Component + 0.77217718629089516 + Red Component + 0.52338262643729649 + + Cursor Text Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 1 + + Cursor Text Color (Dark) + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Cursor Text Color (Light) + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 1 + + Custom Command + No + Custom Directory + Recycle + Default Bookmark + No + Description + Default + Disable Window Resizing + + Flashing Bell + + Foreground Color + + Alpha Component + 1 + Blue Component + 0.062745101749897003 + Color Space + sRGB + Green Component + 0.062745101749897003 + Red Component + 0.062745101749897003 + + Foreground Color (Dark) + + Alpha Component + 1 + Blue Component + 0.86198854446411133 + Color Space + sRGB + Green Component + 0.86199951171875 + Red Component + 0.86197912693023682 + + Foreground Color (Light) + + Alpha Component + 1 + Blue Component + 0.062745098039215685 + Color Space + sRGB + Green Component + 0.062745098039215685 + Red Component + 0.062745098039215685 + + Guid + 8BDD2053-07BA-48C1-935C-17583DD0F5BF + 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 + + 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 + + Action + 11 + Text + 0x1b 0x1b 0x5b 0x44 + + 0xf703-0x220000 + + Action + 10 + Text + [1;2C + + 0xf703-0x240000 + + Action + 10 + Text + [1;5C + + 0xf703-0x260000 + + Action + 10 + Text + [1;6C + + 0xf703-0x280000 + + Action + 11 + Text + 0x1b 0x1b 0x5b 0x43 + + 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 + + Link Color (Dark) + + Alpha Component + 1 + Blue Component + 0.9337158203125 + Color Space + sRGB + Green Component + 0.55789834260940552 + Red Component + 0.19802422821521759 + + Link Color (Light) + + Alpha Component + 1 + Blue Component + 0.9337158203125 + Color Space + sRGB + Green Component + 0.55789834260940552 + Red Component + 0.19802422821521759 + + Mouse Reporting + + Name + Default + Non Ascii Font + Monaco 12 + Non-ASCII Anti Aliased + + Normal Font + Monaco 12 + Option Key Sends + 2 + Prompt Before Closing 2 + + Right Option Key Sends + 0 + Rows + 25 + Screen + -1 + Scrollback Lines + 1000 + Selected Text Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Selected Text Color (Dark) + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Selected Text Color (Light) + + 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 + + Selection Color (Dark) + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 0.84313726425170898 + Red Component + 0.70196080207824707 + + Selection Color (Light) + + 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 + + Use Separate Colors for Light and Dark Mode + + Vertical Spacing + 1 + Visual Bell + + Window Type + 0 + Working Directory + /Users/baileywickham + + + 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 + + VisualIndicatorForEsc + + findMode_iTerm + 0 + + diff --git a/modules/add2FA.sh b/modules/add2FA.sh deleted file mode 100644 index 45584eb..0000000 --- a/modules/add2FA.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -function add2FA() { - task "copying keyboard" - with_sudo cp "${PPACKAGES}/files/keyboard" /etc/default -} diff --git a/modules/install_zsh.sh b/modules/install_zsh.sh deleted file mode 100755 index 603b15a..0000000 --- a/modules/install_zsh.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -function install_zsh() { - task "Installing zsh" - sub "Installing Packages" - apt_install zsh - sub "Installing oh-my-zsh" - if [ -d "$HOME/.oh-my-zsh" ]; then - sub_sub "oh-my-zsh already installed" - else - sub_sub "linking oh-my-zsh" - ln -s "${PPACKAGES}/oh-my-zsh/" "${HOME}/.oh-my-zsh" - fi -} - diff --git a/personal_packages.sh b/personal_packages.sh index c783fdd..6022b94 100755 --- a/personal_packages.sh +++ b/personal_packages.sh @@ -1,14 +1,21 @@ #!/usr/bin/env bash -#TODO handle errors, that would probably be good -# - add warning layer -# - copy stderror output to waring output + +set -euo pipefail + +unameOut="$(uname -s)" +case "${unameOut}" in + Linux*) machine=Linux;; + Darwin*) machine=Mac;; + CYGWIN*) machine=Cygwin;; + MINGW*) machine=MinGw;; + *) machine="UNKNOWN:${unameOut}" +esac function help() { cat << EOF personal_packages.sh a dotfiles install script --install : Install all features including all configs, docker, zsh, go... --configs : configs, Install just config files - --minimal : minimal, Install just files needed for a server EOF } @@ -19,7 +26,6 @@ fi source utils.sh -set -uo pipefail trap exit SIGINT @@ -34,9 +40,6 @@ BUILDS="${HOME}/builds" function whichos() { awk -F= '$1=="PRETTY_NAME" { print $2 ;}' /etc/os-release | tr -d \" } -function whichcpu() { - awk -F: '$1=="model name\t" {print $2;exit;}' /proc/cpuinfo -} function whichrepo(){ awk -F@ '"\turl = git"==$1 {print $2;exit;}' ./.git/config } @@ -50,10 +53,10 @@ function neoneofetch() { echo -e "" echo -e " ┈┈╱▔▔▔▔▔╲┈┈ ${BLUE}User:${NC} $(whoami)" echo -e " ┈▕╋╋╋╋╋╋╋▏┈ ${BLUE}Hostname:${NC} $(hostname)" - echo -e " ┈▕╳╳╳╳╳╳╳▏┈ ${BLUE}Distro:${NC} $(whichos)" + echo -e " ┈▕╳╳╳╳╳╳╳▏┈ ${BLUE}Distro:${NC} $(machine)" echo -e " ┈┈╲╳╳╳╳╳╱┈┈ ${BLUE}Kernel:${NC} $(uname -r)" echo -e " ┈┈┈╲╋╋╋╱┈┈┈ ${BLUE}Shell:${NC} $SHELL" - echo -e " ┈┈┈┈╲▂╱┈┈┈┈ ${BLUE}CPU:${NC} $(whichcpu)" + echo -e " ┈┈┈┈╲▂╱┈┈┈┈ ${BLUE}CPU:${NC} " echo -e " ┈┈┈┈▕▅▏┈┈┈┈ ${BLUE}Dotfiles:${NC} $(whichrepo)" echo -e " " echo -e "" @@ -100,7 +103,7 @@ function move_dotfiles() { create_directories task "Replacing config files" sub "Updating env with new PPACKAGES" - sed -i "s/PPACKAGES=/PPACKAGES=${PPACKAGES//\//\\/}/g" ./config/.env + # sed -i "s/PPACKAGES=/PPACKAGES=${PPACKAGES//\//\\/}/g" ./config/.env for i in ${!dotFiles[@]}; do sub "copying ${dotFiles[i]}" ln -sf "${PWD}/config/${dotFiles[i]}" "${HOME}/${dotFiles[i]}" @@ -108,11 +111,8 @@ function move_dotfiles() { sub "copying nvim" ln -sf "${PWD}/config/nvim" "${HOME}/.config/" sub "copying emacs config" - ln -sf "${PWD}/config/init.el" "${HOME}/.emacs.d/" - ln -sf "${PWD}/config/init.el" "${HOME}" - sub "copying fish configs" - ln -sf "${PWD}/config/omf" "${HOME}/.config/" - ln -sf "${PWD}/config/fish" "${HOME}/.config/" + # ln -sf "${PWD}/config/init.el" "${HOME}/.emacs.d/" + # ln -sf "${PWD}/config/init.el" "${HOME}" } @@ -126,12 +126,7 @@ function addSSHLink() { fi } -function add2FA() { - task "copying 2fa" - with_sudo cp ./files/70-u2f.rules /etc/udev/rules.d/ -} - -function install_packages() { +function install_packages_linux() { # get the packages that will be used for other packages task "Initializing install" sub "Installing packages" @@ -147,52 +142,42 @@ function install_packages() { python3-pip \ sub_sub "Update Submodules" - git submodule init - git submodule update } +function install_packages_osx() { + brew install fzf fd ripgrep gnu-sed +} - +function install_omz() { + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +} function main() { + git submodule init + git submodule update neoneofetch - install_packages create_directories - add2FA + if [[ $machine == "Linux" ]]; then + install_packages_linux + elif [[ $machine == "Mac" ]]; then + install_packages_osx + fi addSSHLink move_dotfiles # This sources all files in modules # running the function with the filename # ex: in modules/test.sh, the test function will be called - for file in modules/*.sh - do - source $file - _name=${file%.*} - #name=${x%%.*} - name=$(basename $_name) - eval $name - done + # this must be done because we only have a global scope, so we can't just use main + # for file in modules/*.sh + # do + # source $file + # _name=${file%.*} + # #name=${x%%.*} + # name=$(basename $_name) + # eval $name + # done } -function minimal() { - local dotFiles=(".zshrc" - ".aliases" - ".vimrc" - ".env") - - create_directories - task "Replacing config files" - sub "Updating env with new PPACKAGES" - sed -i "s/PPACKAGES=/PPACKAGES=${PPACKAGES//\//\\/}/g" ./config/.env - for i in ${!dotFiles[@]}; do - sub "copying ${dotFiles[i]}" - ln -sf "${PWD}/config/${dotFiles[i]}" "${HOME}/${dotFiles[i]}" - done - - source modules/install_zsh.sh - install_zsh - -} while [[ $# -gt 0 && ${1} ]]; do case "${1}" in @@ -209,11 +194,6 @@ while [[ $# -gt 0 && ${1} ]]; do neoneofetch shift ;; - --minimal) - minimal - shift - ;; - --help | -h) help break;