Skip to content

Instantly share code, notes, and snippets.

@josephan
Last active December 5, 2024 20:37
Show Gist options
  • Save josephan/957c65f5580c69d9725f1b1fa4aa52d7 to your computer and use it in GitHub Desktop.
Save josephan/957c65f5580c69d9725f1b1fa4aa52d7 to your computer and use it in GitHub Desktop.

Revisions

  1. josephan revised this gist Dec 5, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -66,6 +66,8 @@ fisher install jhillyerd/plugin-git
    fisher install jethrokuan/z
    ```

    Load Rectangle config: https://gist.github.com/josephan/957c65f5580c69d9725f1b1fa4aa52d7#file-rectangleconfig-json

    Enable key repeat for all keys
    ```
    defaults write -g ApplePressAndHoldEnabled -bool false
  2. josephan revised this gist Dec 5, 2024. 1 changed file with 294 additions and 0 deletions.
    294 changes: 294 additions & 0 deletions RectangleConfig.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,294 @@
    {
    "bundleId" : "com.knollsoft.Rectangle",
    "defaults" : {
    "SUEnableAutomaticChecks" : {
    "bool" : false
    },
    "allowAnyShortcut" : {
    "bool" : true
    },
    "almostMaximizeHeight" : {
    "float" : 0
    },
    "almostMaximizeWidth" : {
    "float" : 0
    },
    "altThirdCycle" : {
    "int" : 0
    },
    "alternateDefaultShortcuts" : {
    "bool" : true
    },
    "alwaysAccountForStage" : {
    "int" : 0
    },
    "applyGapsToMaximize" : {
    "int" : 0
    },
    "applyGapsToMaximizeHeight" : {
    "int" : 0
    },
    "attemptMatchOnNextPrevDisplay" : {
    "int" : 0
    },
    "autoMaximize" : {
    "int" : 0
    },
    "cascadeAllDeltaSize" : {
    "float" : 30
    },
    "centerHalfCycles" : {
    "int" : 0
    },
    "centeredDirectionalMove" : {
    "int" : 0
    },
    "cornerSnapAreaSize" : {
    "float" : 20
    },
    "curtainChangeSize" : {
    "int" : 0
    },
    "cycleSizesIsChanged" : {
    "bool" : false
    },
    "disabledApps" : {

    },
    "doubleClickTitleBar" : {
    "int" : 0
    },
    "doubleClickTitleBarIgnoredApps" : {

    },
    "doubleClickTitleBarRestore" : {
    "int" : 0
    },
    "dragFromStage" : {
    "int" : 0
    },
    "enhancedUI" : {
    "int" : 1
    },
    "footprintAlpha" : {
    "float" : 0.3
    },
    "footprintAnimationDurationMultiplier" : {
    "float" : 0
    },
    "footprintBorderWidth" : {
    "float" : 2
    },
    "footprintColor" : {

    },
    "footprintFade" : {
    "int" : 0
    },
    "fullIgnoreBundleIds" : {

    },
    "gapSize" : {
    "float" : 0
    },
    "hapticFeedbackOnSnap" : {
    "int" : 0
    },
    "hideMenubarIcon" : {
    "bool" : true
    },
    "ignoreDragSnapToo" : {
    "int" : 0
    },
    "ignoredSnapAreas" : {
    "int" : 0
    },
    "landscapeSnapAreas" : {

    },
    "launchOnLogin" : {
    "bool" : true
    },
    "minimumWindowHeight" : {
    "float" : 0
    },
    "minimumWindowWidth" : {
    "float" : 0
    },
    "missionControlDragging" : {
    "int" : 0
    },
    "missionControlDraggingAllowedOffscreenDistance" : {
    "float" : 25
    },
    "missionControlDraggingDisallowedDuration" : {
    "int" : 250
    },
    "moveCursor" : {
    "int" : 0
    },
    "moveCursorAcrossDisplays" : {
    "int" : 0
    },
    "notifiedOfProblemApps" : {
    "bool" : false
    },
    "obtainWindowOnClick" : {
    "int" : 0
    },
    "portraitSnapAreas" : {

    },
    "relaunchOpensMenu" : {
    "bool" : false
    },
    "resizeOnDirectionalMove" : {
    "bool" : false
    },
    "screenEdgeGapBottom" : {
    "float" : 0
    },
    "screenEdgeGapLeft" : {
    "float" : 0
    },
    "screenEdgeGapRight" : {
    "float" : 0
    },
    "screenEdgeGapTop" : {
    "float" : 0
    },
    "screenEdgeGapTopNotch" : {
    "float" : 0
    },
    "screenEdgeGapsOnMainScreenOnly" : {
    "bool" : false
    },
    "selectedCycleSizes" : {
    "int" : 0
    },
    "shortEdgeSnapAreaSize" : {
    "float" : 145
    },
    "showAllActionsInMenu" : {
    "int" : 0
    },
    "sixthsSnapArea" : {
    "int" : 0
    },
    "sizeOffset" : {
    "float" : 0
    },
    "snapEdgeMarginBottom" : {
    "float" : 5
    },
    "snapEdgeMarginLeft" : {
    "float" : 5
    },
    "snapEdgeMarginRight" : {
    "float" : 5
    },
    "snapEdgeMarginTop" : {
    "float" : 5
    },
    "snapModifiers" : {
    "int" : 0
    },
    "specifiedHeight" : {
    "float" : 1050
    },
    "specifiedWidth" : {
    "float" : 1680
    },
    "stageSize" : {
    "float" : 190
    },
    "subsequentExecutionMode" : {
    "int" : 0
    },
    "systemWideMouseDown" : {
    "int" : 0
    },
    "systemWideMouseDownApps" : {

    },
    "todo" : {
    "int" : 0
    },
    "todoApplication" : {

    },
    "todoMode" : {
    "bool" : false
    },
    "todoSidebarSide" : {
    "int" : 1
    },
    "todoSidebarWidth" : {
    "float" : 400
    },
    "traverseSingleScreen" : {
    "int" : 0
    },
    "unsnapRestore" : {
    "int" : 0
    },
    "windowSnapping" : {
    "int" : 0
    }
    },
    "shortcuts" : {
    "centerHalf" : {
    "keyCode" : 125,
    "modifierFlags" : 524288
    },
    "centerThird" : {
    "keyCode" : 3,
    "modifierFlags" : 786432
    },
    "firstThird" : {
    "keyCode" : 2,
    "modifierFlags" : 786432
    },
    "firstTwoThirds" : {
    "keyCode" : 14,
    "modifierFlags" : 786432
    },
    "lastThird" : {
    "keyCode" : 5,
    "modifierFlags" : 786432
    },
    "lastTwoThirds" : {
    "keyCode" : 17,
    "modifierFlags" : 786432
    },
    "leftHalf" : {
    "keyCode" : 123,
    "modifierFlags" : 524288
    },
    "maximize" : {
    "keyCode" : 126,
    "modifierFlags" : 524288
    },
    "nextDisplay" : {
    "keyCode" : 123,
    "modifierFlags" : 655360
    },
    "previousDisplay" : {
    "keyCode" : 124,
    "modifierFlags" : 655360
    },
    "reflowTodo" : {
    "keyCode" : 45,
    "modifierFlags" : 786432
    },
    "rightHalf" : {
    "keyCode" : 124,
    "modifierFlags" : 524288
    },
    "toggleTodo" : {
    "keyCode" : 11,
    "modifierFlags" : 786432
    }
    },
    "version" : "91"
    }
  3. josephan revised this gist Dec 4, 2024. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -6,11 +6,11 @@ Install Homebrew
    Install apps
    ```
    brew install autojump fish fzf git git-lfs
    brew install --cask calibre chatgpt chrome cursor clipy discord figma itsycal notunes rectangle selfcontrol spotify visual-studio-code
    brew install --cask calibre chatgpt chrome cursor clipy discord figma font-jetbrains-mono iterm2 itsycal notunes rectangle selfcontrol spotify visual-studio-code
    ```

    Set Fish as the default shell
    ```
    ```
    echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells
    chsh -s /opt/homebrew/bin/fish
    ```
    @@ -58,6 +58,13 @@ set -U fish_user_paths ~/.npm-global/bin $fish_user_paths
    # autojump
    [ -f /opt/homebrew/share/autojump/autojump.fish ]; and source /opt/homebrew/share/autojump/autojump.fish
    ```
    Install fisher and plugins
    ```
    curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
    fisher install jethrokuan/fzf
    fisher install jhillyerd/plugin-git
    fisher install jethrokuan/z
    ```

    Enable key repeat for all keys
    ```
  4. josephan revised this gist Dec 4, 2024. 1 changed file with 61 additions and 0 deletions.
    61 changes: 61 additions & 0 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,64 @@
    Install Homebrew
    ```
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    ```

    Install apps
    ```
    brew install autojump fish fzf git git-lfs
    brew install --cask calibre chatgpt chrome cursor clipy discord figma itsycal notunes rectangle selfcontrol spotify visual-studio-code
    ```

    Set Fish as the default shell
    ```
    echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells
    chsh -s /opt/homebrew/bin/fish
    ```

    Fish config `~/.config/fish/config.fish`
    ```
    if status is-interactive
    # Commands to run in interactive sessions can go here
    end
    set fish_prompt_pwd_dir_length 0
    function fish_prompt
    # Set options for the fish_git_prompt
    set -g __fish_git_prompt_showdirtystate yes
    set -g __fish_git_prompt_char_cleanstate ' ✔'
    set -g __fish_git_prompt_char_dirtystate '✗'
    set -g __fish_git_prompt_color_branch green
    set -g __fish_git_prompt_color_cleanstate green
    set -g __fish_git_prompt_color_dirtystate red
    set -g __fish_git_prompt_showupstream none
    set -g __fish_git_prompt_show_informative_status no
    set -g __fish_git_prompt_showstashstate no
    set -g __fish_git_prompt_showuntrackedfiles no
    # Show current directory
    set_color green
    echo -n (prompt_pwd)
    # Show Git branch and status if in a Git repository
    set_color normal
    fish_git_prompt
    # Show the prompt symbol
    echo -n ' > '
    end
    set -U Z_CMD "j"
    # add homebrew to path
    set -U fish_user_paths /opt/homebrew/bin $fish_user_paths
    # add npm to path
    set -U fish_user_paths ~/.npm-global/bin $fish_user_paths
    # autojump
    [ -f /opt/homebrew/share/autojump/autojump.fish ]; and source /opt/homebrew/share/autojump/autojump.fish
    ```

    Enable key repeat for all keys
    ```
    defaults write -g ApplePressAndHoldEnabled -bool false
  5. josephan created this gist Dec 4, 2024.
    10 changes: 10 additions & 0 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    Enable key repeat for all keys
    ```
    defaults write -g ApplePressAndHoldEnabled -bool false
    ```

    Clear default apps in dock
    ```
    defaults write com.apple.dock persistent-apps -array
    killall Dock
    ```