From 3087f554c735a5f980b229ffc9d02e5ea5563ef5 Mon Sep 17 00:00:00 2001 From: Harivansh Rathi Date: Fri, 20 Feb 2026 20:25:37 -0500 Subject: [PATCH] stuff --- Makefile | 6 +- aerospace/.aerospace.toml | 181 ++++++++++++++++++ .../com.mitchellh.ghostty/config.ghostty | 2 +- nvim/.config/nvim | 2 +- rectangle/Rectangle.plist | Bin 0 -> 2205 bytes rectangle/install.sh | 16 ++ tmux/.config/tmux/tmux.conf | 2 +- 7 files changed, 205 insertions(+), 4 deletions(-) create mode 100644 aerospace/.aerospace.toml create mode 100644 rectangle/Rectangle.plist create mode 100755 rectangle/install.sh diff --git a/Makefile b/Makefile index 2d5e4c1..8eae6af 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,15 @@ -STOW_PACKAGES = zsh git nvim tmux karabiner ghostty claude lazygit codex +STOW_PACKAGES = zsh git nvim tmux karabiner ghostty claude lazygit codex aerospace install: brew install stow stow -t ~ $(STOW_PACKAGES) + ./rectangle/install.sh uninstall: stow -t ~ -D $(STOW_PACKAGES) restow: stow -t ~ -R $(STOW_PACKAGES) + +rectangle-export: + ./rectangle/install.sh export diff --git a/aerospace/.aerospace.toml b/aerospace/.aerospace.toml new file mode 100644 index 0000000..51cd43d --- /dev/null +++ b/aerospace/.aerospace.toml @@ -0,0 +1,181 @@ +# AeroSpace config - https://nikitabobko.github.io/AeroSpace/guide +# +# Keybinding philosophy: +# alt+* = AeroSpace (focus, workspaces, layout) +# alt+shift+* = AeroSpace (move, modes) +# ctrl+h/j/k/l = Karabiner vim nav (arrows, scroll) - DO NOT USE +# ctrl+1-6 = Karabiner app launchers - DO NOT USE +# alt+w = tmux prefix (via Karabiner Right Cmd) - DO NOT USE +# C-h/j/k/l = nvim window nav (inside terminal) - no conflict +# zsh ctrl+j/k = autosuggestion nav (inside terminal) - no conflict + +config-version = 2 + +start-at-login = true + +# Normalizations +enable-normalization-flatten-containers = true +enable-normalization-opposite-orientation-for-nested-containers = true + +# Layout defaults +default-root-container-layout = 'tiles' +default-root-container-orientation = 'auto' +accordion-padding = 30 + +# Mouse follows focus when switching monitors +on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] + +# Gaps between windows +[gaps] +inner.horizontal = 10 +inner.vertical = 10 +outer.left = 10 +outer.right = 10 +outer.top = 10 +outer.bottom = 10 + +# ------------------------------------------------------------------- +# Main keybindings +# ------------------------------------------------------------------- +[mode.main.binding] + +# Focus windows: alt + h/j/k/l +alt-h = 'focus left' +alt-j = 'focus down' +alt-k = 'focus up' +alt-l = 'focus right' + +# Move windows: alt+shift + h/j/k/l +alt-shift-h = 'move left' +alt-shift-j = 'move down' +alt-shift-k = 'move up' +alt-shift-l = 'move right' + +# Switch workspaces: alt + number +alt-1 = 'workspace 1' +alt-2 = 'workspace 2' +alt-3 = 'workspace 3' +alt-4 = 'workspace 4' +alt-5 = 'workspace 5' +alt-6 = 'workspace 6' +alt-7 = 'workspace 7' +alt-8 = 'workspace 8' +alt-9 = 'workspace 9' + +# Move window to workspace: alt+shift + number +alt-shift-1 = 'move-node-to-workspace 1' +alt-shift-2 = 'move-node-to-workspace 2' +alt-shift-3 = 'move-node-to-workspace 3' +alt-shift-4 = 'move-node-to-workspace 4' +alt-shift-5 = 'move-node-to-workspace 5' +alt-shift-6 = 'move-node-to-workspace 6' +alt-shift-7 = 'move-node-to-workspace 7' +alt-shift-8 = 'move-node-to-workspace 8' +alt-shift-9 = 'move-node-to-workspace 9' + +# Layout toggles +alt-slash = 'layout tiles horizontal vertical' +alt-comma = 'layout accordion horizontal vertical' + +# Fullscreen (replaces Rectangle: Option+F maximize) +alt-f = 'fullscreen' + +# Float toggle (replaces Rectangle: Option+Shift+F almost-maximize) +alt-shift-f = 'layout floating tiling' + +# Balance window sizes +alt-shift-b = 'balance-sizes' + +# Last workspace (using backtick instead of tab to preserve macOS app switcher) +alt-backtick = 'workspace-back-and-forth' + +# Monitor focus/move (replaces Rectangle: Ctrl+Option+Cmd+Space next display) +alt-period = 'focus-monitor next' +alt-shift-period = 'move-node-to-monitor next' +alt-shift-comma = 'move-workspace-to-monitor next' + +# Modes +alt-shift-r = 'mode resize' +alt-shift-semicolon = 'mode service' + +# Screenshot to clipboard +alt-shift-s = 'exec-and-forget screencapture -i -c' + +# ------------------------------------------------------------------- +# Resize mode: alt+shift+r to enter, esc to exit +# ------------------------------------------------------------------- +[mode.resize.binding] +h = 'resize width -50' +j = 'resize height +50' +k = 'resize height -50' +l = 'resize width +50' +minus = 'resize smart -50' +equal = 'resize smart +50' +enter = 'mode main' +esc = 'mode main' + +# ------------------------------------------------------------------- +# Service mode: alt+shift+; to enter, esc to exit +# ------------------------------------------------------------------- +[mode.service.binding] +r = ['reload-config', 'mode main'] +f = ['flatten-workspace-tree', 'mode main'] +b = ['balance-sizes', 'mode main'] +esc = 'mode main' +backspace = ['close-all-windows-but-current', 'mode main'] + +# ------------------------------------------------------------------- +# Auto-assign apps to workspaces +# ------------------------------------------------------------------- +# Browsers -> workspace 1 +[[on-window-detected]] +if.app-id = 'com.apple.Safari' +run = 'move-node-to-workspace 1' + +[[on-window-detected]] +if.app-id = 'company.thebrowser.Browser' +run = 'move-node-to-workspace 1' + +# Terminals -> workspace 2 +[[on-window-detected]] +if.app-id = 'com.apple.Terminal' +run = 'move-node-to-workspace 2' + +[[on-window-detected]] +if.app-id = 'com.mitchellh.ghostty' +run = 'move-node-to-workspace 2' + +[[on-window-detected]] +if.app-id = 'com.googlecode.iterm2' +run = 'move-node-to-workspace 2' + +# Editors -> workspace 3 +[[on-window-detected]] +if.app-id = 'com.microsoft.VSCode' +run = 'move-node-to-workspace 3' + +[[on-window-detected]] +if.app-id = 'dev.zed.Zed' +run = 'move-node-to-workspace 3' + +# Chat -> workspace 4 +[[on-window-detected]] +if.app-id = 'com.tinyspeck.slackmacgap' +run = 'move-node-to-workspace 4' + +[[on-window-detected]] +if.app-id = 'ru.keepcoder.Telegram' +run = 'move-node-to-workspace 4' + +[[on-window-detected]] +if.app-id = 'org.whispersystems.signal-desktop' +run = 'move-node-to-workspace 4' + +[[on-window-detected]] +if.app-id = 'com.apple.MobileSMS' +run = 'move-node-to-workspace 4' + +# Media -> workspace 5 +[[on-window-detected]] +if.app-id = 'com.spotify.client' +run = 'move-node-to-workspace 5' diff --git a/ghostty/Library/Application Support/com.mitchellh.ghostty/config.ghostty b/ghostty/Library/Application Support/com.mitchellh.ghostty/config.ghostty index 6221ce6..73ecc91 100644 --- a/ghostty/Library/Application Support/com.mitchellh.ghostty/config.ghostty +++ b/ghostty/Library/Application Support/com.mitchellh.ghostty/config.ghostty @@ -4,7 +4,7 @@ font-codepoint-map= "U+f101-U+f25c=nonicons" background-opacity = 1 # background-blur = macos-glass-regular -font-size=17 +font-size=15 window-padding-y = 0 window-padding-x = 0 diff --git a/nvim/.config/nvim b/nvim/.config/nvim index d9a93f4..1db6db7 160000 --- a/nvim/.config/nvim +++ b/nvim/.config/nvim @@ -1 +1 @@ -Subproject commit d9a93f41a3224b752a5f4d72791d2f642cc03fb2 +Subproject commit 1db6db7f92efefefa9283ad8c77eb3204f6e1659 diff --git a/rectangle/Rectangle.plist b/rectangle/Rectangle.plist new file mode 100644 index 0000000000000000000000000000000000000000..5d5498d589389a2dc2bc46238c4575d772853ac8 GIT binary patch literal 2205 zcmYc)$jK}&F)+9 zuBED~r*B|lYG$cwZDZ@;?Be0A?5pY@6dEtUUr>}t`{$jr^GN{tr~PRTD#%1L$3$xO};$t=l9bxJIX7Z6Cy z$;mHw%&QE}$S*2ME-i@{5DpIYNG$eAEX_;KNKJ7{P0KGzjThh#4h1;|Y*$ETZfd-M zj9+kgW?o8uxq@3!Vs5HJaA;^jN@7W>V@_&ONmNOGdU{T3NPbFwczR+%aAs9%bWUP% zNmy!8ab|vAEQlRao*$BtS(H*7FQAHMmS3=6Vp%|9UTO}=m&J)?seXwdJH;~dN>YpR z5_3W_b29VN{qjpP(=t<2;ss>U3_x*=QM`aiMq)upX0lsqYD!XKa<+dSD2SqyQ$fao z9TAt7SyWttmXlu&@@2e$N?Lw?NkLI& zUWsE~CMaU^^IS@c5<&6oTbfgnS&);NS`;rJnV19iLP@GiYFc7xP6;gJi{k~vi%XM= zQwvK|^GaMRQj<%;dh=6KV{^c<;h*P|pPrc)1#v1U=pw=42x7%0=H%uVm-s^C`+}15 z$_54we?g`Wt@QQv!S*sTF!&}WXXcgU7iTDVxWL@T z5O7cuPnv@kGn zH8OQHb~bZ`xw#Rfhk=3Ny)eXGFdF1WPIE)9(j`br`~xISf!InP7#Mn>=5xjiv_+fiR4XOt=N9Cb z=A|fE>6+B)n4pRn)#@1OR4XMWgYuV>l~JvZ84}mfxK_synQvOFV~or& zn4(%>TpN2yLsLsTJUg}08I*r>^HV?tRgqgxVtTOvvk)k;b8;Fx9$ys0@Nactynvjk zrGbK}iG_lhk%5A-rGX?aP* z+(H{og+#o7oVlT?f|;eUg0Z=Qf{}p=aPo2n>(6A422kE7#J>TczU6GLRZP&fq{WTfPwRpMnE9C ziHesrf+wJvFdX@#TOAjH50E*-oXVj0>PW-x4IIL+{Y;U&X=Mj=KGMk~fh#uUaJ z#tOzZ#&wLx8J{!$W8z|xWHM&5XYyhyWa?#F&a{>30MjX^n@qQu?lV1Ly}){rEs8Ck zEuF2Dt(>ift(L8ht(|QJ+gi5WYbTF7|Hr3GDOO7qBm7-^{+1eHZ%)P|PtfFhP?p N1E`#X2!ToVvjD&?3|jyI literal 0 HcmV?d00001 diff --git a/rectangle/install.sh b/rectangle/install.sh new file mode 100755 index 0000000..d16bd82 --- /dev/null +++ b/rectangle/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Rectangle config - stored in UserDefaults, cannot be stowed +# Usage: ./install.sh import settings +# ./install.sh export export current settings + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +PLIST="$SCRIPT_DIR/Rectangle.plist" + +if [ "$1" = "export" ]; then + defaults export com.knollsoft.Rectangle "$PLIST" + echo "Exported Rectangle settings to $PLIST" +else + defaults import com.knollsoft.Rectangle "$PLIST" + echo "Imported Rectangle settings from $PLIST" + echo "Restart Rectangle for changes to take effect." +fi diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 1de7996..02885e7 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -40,7 +40,7 @@ bind f display-popup -w 80% -h 80% -E "\ # Auto-rename windows to the current running command set -g automatic-rename on -set -g automatic-rename-format '#{b:pane_current_path}' +set -g automatic-rename-format '#{pane_current_command}' #from github