├── modules └── .gitkeep ├── patches └── .gitkeep ├── profiles ├── home │ ├── config │ │ ├── system │ │ │ └── services.yml │ │ ├── packages │ │ │ ├── mas.yml │ │ │ └── brew.yml │ │ ├── cli │ │ │ ├── claude-code.yml │ │ │ ├── codex.yml │ │ │ ├── opencode.yml │ │ │ ├── github-copilot.yml │ │ │ └── mistral-vibe.yml │ │ └── apps │ │ │ ├── firefox.yml │ │ │ └── claude-desktop.yml │ ├── bin │ │ └── shims │ │ │ ├── open-cap │ │ │ ├── open-flux │ │ │ ├── open-ice │ │ │ ├── open-loom │ │ │ ├── open-pika │ │ │ ├── open-plex │ │ │ ├── open-vlc │ │ │ ├── open-bruno │ │ │ ├── open-chatgpt │ │ │ ├── open-claude │ │ │ ├── open-discord │ │ │ ├── open-espanso │ │ │ ├── open-ghostty │ │ │ ├── open-gifski │ │ │ ├── open-gmail │ │ │ ├── open-gswitch │ │ │ ├── open-iterm │ │ │ ├── open-minisim │ │ │ ├── open-notion │ │ │ ├── open-opcode │ │ │ ├── open-openmtp │ │ │ ├── open-raycast │ │ │ ├── open-runjs │ │ │ ├── open-safari │ │ │ ├── open-signal │ │ │ ├── open-slack │ │ │ ├── open-spotify │ │ │ ├── open-stats │ │ │ ├── open-steam │ │ │ ├── open-todoist │ │ │ ├── open-upscayl │ │ │ ├── open-xcode │ │ │ ├── open-xcodes │ │ │ ├── open-hyperkey │ │ │ ├── open-insomnia │ │ │ ├── open-keepassxc │ │ │ ├── open-localsend │ │ │ ├── open-monodraw │ │ │ ├── open-obsidian │ │ │ ├── open-protonvpn │ │ │ ├── open-proxyman │ │ │ ├── open-shadow-pc │ │ │ ├── open-simulator │ │ │ ├── open-syncthing │ │ │ ├── open-whatsapp │ │ │ ├── open-cleanshot-x │ │ │ ├── open-etrecheckpro │ │ │ ├── open-image2icon │ │ │ ├── open-imageoptim │ │ │ ├── open-middleclick │ │ │ ├── open-pcloud-drive │ │ │ ├── open-pixelsnap-2 │ │ │ ├── open-prefs-editor │ │ │ ├── open-qr-journal │ │ │ ├── open-rawtherapee │ │ │ ├── open-steermouse │ │ │ ├── open-android-studio │ │ │ ├── open-monitorcontrol │ │ │ ├── open-sublime-merge │ │ │ ├── open-firefox-nightly │ │ │ ├── open-grandperspective │ │ │ ├── open-notion-calendar │ │ │ ├── open-quicklook-video │ │ │ ├── open-simulator-(watch) │ │ │ ├── open-suspicious-package │ │ │ ├── open-visual-studio-code │ │ │ ├── open-altair-graphql-client │ │ │ ├── open-android-file-transfer │ │ │ ├── open-google-chrome-canary │ │ │ ├── open-macmediakeyforwarder │ │ │ └── open-react-native-debugger │ └── core │ │ └── os │ │ └── main.zsh └── work │ ├── scripts │ └── globalprotect-connect │ │ ├── .gitignore │ │ ├── .env.sample │ │ └── package.json │ ├── config │ ├── packages │ │ ├── uv.yml │ │ └── brew.yml │ ├── apps │ │ └── firefox.yml │ └── cli │ │ ├── codex.yml │ │ ├── claude-code.yml │ │ ├── opencode.yml │ │ ├── github-copilot.yml │ │ └── mistral-vibe.yml │ ├── bin │ ├── shims │ │ ├── open-cap │ │ ├── open-flux │ │ ├── open-ice │ │ ├── open-loom │ │ ├── open-pika │ │ ├── open-vlc │ │ ├── open-xrg │ │ ├── open-zen │ │ ├── open-bruno │ │ ├── open-chatgpt │ │ ├── open-claude │ │ ├── open-comet │ │ ├── open-discord │ │ ├── open-espanso │ │ ├── open-figma │ │ ├── open-imovie │ │ ├── open-iterm │ │ ├── open-keynote │ │ ├── open-logseq │ │ ├── open-minisim │ │ ├── open-numbers │ │ ├── open-opcode │ │ ├── open-openmtp │ │ ├── open-pages │ │ ├── open-raycast │ │ ├── open-runjs │ │ ├── open-safari │ │ ├── open-signal │ │ ├── open-slack │ │ ├── open-spotify │ │ ├── open-stats │ │ ├── open-upscayl │ │ ├── open-xcode │ │ ├── open-xcodes │ │ ├── open-chromium │ │ ├── open-dashlane │ │ ├── open-insomnia │ │ ├── open-keepassxc │ │ ├── open-localsend │ │ ├── open-monodraw │ │ ├── open-obsidian │ │ ├── open-onedrive │ │ ├── open-proxyman │ │ ├── open-simulator │ │ ├── open-syncthing │ │ ├── open-cleanshot-x │ │ ├── open-etrecheckpro │ │ ├── open-garageband │ │ ├── open-image2icon │ │ ├── open-imageoptim │ │ ├── open-jamf-connect │ │ ├── open-jamfprotect │ │ ├── open-middleclick │ │ ├── open-pcloud-drive │ │ ├── open-pixelsnap-2 │ │ ├── open-prefs-editor │ │ ├── open-qr-journal │ │ ├── open-redisinsight │ │ ├── open-self-service │ │ ├── open-xcode-14.2 │ │ ├── open-xcode-15.0 │ │ ├── open-xcode-15.4 │ │ ├── open-xcode-26.0.1 │ │ ├── open-android-studio │ │ ├── open-company-portal │ │ ├── open-globalprotect │ │ ├── open-google-chrome │ │ ├── open-microsoft-edge │ │ ├── open-microsoft-word │ │ ├── open-monitorcontrol │ │ ├── open-neo4j-desktop │ │ ├── open-redis-insight │ │ ├── open-sublime-merge │ │ ├── open-firefox-nightly │ │ ├── open-grandperspective │ │ ├── open-microsoft-excel │ │ ├── open-microsoft-onenote │ │ ├── open-microsoft-outlook │ │ ├── open-microsoft-teams │ │ ├── open-neo4j-desktop-2 │ │ ├── open-notion-calendar │ │ ├── open-qualyscloudagent │ │ ├── open-quicklook-video │ │ ├── open-simulator-(watch) │ │ ├── open-microsoft-defender │ │ ├── open-suspicious-package │ │ ├── open-visual-studio-code │ │ ├── open-altair-graphql-client │ │ ├── open-android-file-transfer │ │ ├── open-google-chrome-canary │ │ ├── open-macmediakeyforwarder │ │ ├── open-microsoft-powerpoint │ │ └── open-react-native-debugger │ └── main │ │ ├── fix-os-upgrade │ │ ├── vpn-connect │ │ └── request-admin-privileges │ ├── shell │ ├── aliases.zsh │ └── functions.zsh │ └── core │ └── os │ └── main.zsh ├── config ├── packages │ ├── mas.yml │ ├── gem.yml │ ├── gh.yml │ ├── uv.yml │ ├── antidote.yml │ └── npm.yml ├── system │ ├── services.yml │ ├── submodules.yml │ └── symlinks.yml ├── apps │ ├── bruno.yml │ ├── sublime-merge.yml │ ├── claude-desktop.yml │ └── keepassxc.yml └── cli │ ├── basic-memory.yml │ ├── github-copilot.yml │ ├── abbr.yml │ ├── mistral-vibe.yml │ ├── codex.yml │ ├── opencode.yml │ └── claude-code.yml ├── bin ├── main │ ├── mimetype │ ├── show-path │ ├── wttr │ ├── pmset-reset │ ├── what-process-on-port │ ├── xcode-licence │ ├── fake-email │ ├── bodybuilder-repl │ ├── smerge │ ├── fix-chmod │ ├── quit │ ├── pdfconcat │ ├── unsymlink │ ├── fu-npm │ ├── fu-simulator │ ├── ascii-art │ ├── restart │ ├── pip-upgrade-all │ ├── edit-remote-file │ ├── figlet-preview │ ├── ip │ ├── dadjoke │ ├── base64-file │ ├── youtube-watch │ ├── fix-tid │ ├── smallest-files │ ├── fu-apple │ ├── wallpaper-refresh │ ├── give-me-ownership │ ├── osx-check-diff │ ├── firefox-suggest-enable │ ├── firefox-suggest-disable │ ├── create-override-bin │ ├── tmp │ ├── list-background-login-items │ ├── delete-manager │ ├── dnsmasq-manager │ ├── dnsdiff │ └── cdx ├── git │ ├── git-branch-name │ ├── git-push-new-branch │ ├── git-branch-select │ ├── git-rewrite-history │ ├── git-push-all │ ├── git-branches-local-secondary-remove │ ├── git-remote-branches-delete │ ├── git-branch-orphan-create │ ├── git-switch-main │ ├── git-sync │ ├── git-show-main │ ├── git-contrib │ ├── git-packages-create-pr │ ├── git-config-local-global │ ├── git-packages-upgrade │ ├── git-root │ ├── git-dir │ ├── git-first-commit │ ├── git-branch-current │ ├── git-branches-clean │ ├── git-finalise │ ├── git-refresh │ ├── git-scan-big │ └── git-tag-version └── trackpad-connect ├── doc ├── postinstall │ ├── spotify.md │ ├── slack.md │ ├── iterm2.md │ ├── dock.md │ ├── earsafe.md │ ├── keepassxc.md │ ├── raycast.md │ ├── vscode.md │ ├── pcloud.md │ ├── system-preferences.md │ ├── dnscrypt-proxy.md │ └── firefox.md ├── assets │ ├── firefox-001.png │ ├── firefox-002.png │ ├── firefox-adaptive-colours-001.png │ ├── firefox-adaptive-colours-002.png │ ├── firefox-addons-hotkeys-raindrop_io.png │ ├── firefox-addons-hotkeys-ublock_origin.png │ ├── firefox-addons-hotkeys-keepassxc_browser.png │ ├── firefox-addons-hotkeys-location_switcher.png │ ├── firefox-addons-hotkeys-email_address_plus.png │ ├── firefox-addons-hotkeys-markdown_web_clipper.png │ ├── firefox-addons-hotkeys-readwise_highlighter.png │ ├── firefox-addons-hotkeys-easy_container_shortcuts.png │ ├── firefox-addons-hotkeys-move_tab_to_next_windows.png │ └── firefox-addons-hotkeys-firefox_multi-account_containers.png ├── faq.md └── post-install.md ├── dotfiles ├── .prettierrc ├── .gitattributes ├── .zshenv ├── .gemrc ├── .zprofile ├── .editorconfig ├── .config │ └── mise │ │ └── config.toml ├── .zlogin ├── .zlogout ├── .gitignore_global ├── biome.json └── .zshrc ├── migrations ├── archive │ └── README.md └── global │ └── .gitkeep ├── assets └── everybodydancenow.gif ├── .gitignore ├── core ├── system │ ├── default-folders.zsh │ ├── shims.zsh │ ├── post-install.zsh │ ├── sync-files.zsh │ └── submodules.zsh ├── apps │ ├── pcloud.zsh │ └── bruno.zsh ├── commands │ └── info.zsh ├── packages │ ├── gem.zsh │ ├── antidote.zsh │ ├── gh.zsh │ └── npm.zsh └── cli │ └── abbr.zsh ├── templates └── ssh │ └── config ├── .gitleaksignore ├── shell ├── plugins.txt ├── starship.zsh ├── babel.zsh ├── locale.zsh ├── path │ ├── node.zsh │ ├── console-ninja.zsh │ ├── android.zsh │ ├── homebrew.zsh │ ├── profiles.zsh │ ├── local.zsh │ └── my.zsh ├── android.zsh ├── autosuggestions.zsh ├── display.zsh ├── node.zsh ├── globals.zsh ├── openssl.zsh ├── homebrew.zsh ├── syntax-highlighting.zsh ├── profile.zsh ├── mise.zsh ├── java.zsh ├── limits.zsh ├── antidote.zsh ├── editor.zsh ├── cursor.zsh ├── you-should-use.zsh ├── bindings.zsh ├── directory.zsh ├── local.zsh ├── history.zsh ├── functions.zsh └── environment.zsh ├── package.json ├── services └── limit.maxfiles.plist ├── README.md └── themes └── split-diffs └── claude-code-colorblind.json /modules/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /patches/.gitkeep: -------------------------------------------------------------------------------- 1 | .gitkeep 2 | -------------------------------------------------------------------------------- /profiles/home/config/system/services.yml: -------------------------------------------------------------------------------- 1 | services: [] 2 | -------------------------------------------------------------------------------- /config/packages/mas.yml: -------------------------------------------------------------------------------- 1 | # Mac App Store packages 2 | # packages: -------------------------------------------------------------------------------- /config/system/services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | - limit.maxfiles 3 | -------------------------------------------------------------------------------- /bin/main/mimetype: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | file --mime-type -b $* 4 | -------------------------------------------------------------------------------- /bin/main/show-path: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | echo $PATH | tr ":" "\n" 4 | -------------------------------------------------------------------------------- /bin/main/wttr: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | curl -4 http://wttr.in/${1} 4 | -------------------------------------------------------------------------------- /doc/postinstall/spotify.md: -------------------------------------------------------------------------------- 1 | # Spotify 2 | 3 | - Select the `Jazz` preset. 4 | -------------------------------------------------------------------------------- /profiles/work/scripts/globalprotect-connect/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .env.local 3 | -------------------------------------------------------------------------------- /bin/main/pmset-reset: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | sudo pmset restoredefaults 4 | -------------------------------------------------------------------------------- /bin/main/what-process-on-port: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | sudo lsof -i tcp:$1 4 | -------------------------------------------------------------------------------- /bin/main/xcode-licence: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | sudo xcodebuild -license 4 | -------------------------------------------------------------------------------- /config/packages/gem.yml: -------------------------------------------------------------------------------- 1 | packages: 2 | - gist 3 | - bundler 4 | - bundler-audit -------------------------------------------------------------------------------- /dotfiles/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "semi": false 4 | } 5 | -------------------------------------------------------------------------------- /profiles/work/config/packages/uv.yml: -------------------------------------------------------------------------------- 1 | packages: 2 | tool: 3 | - awsume 4 | -------------------------------------------------------------------------------- /doc/postinstall/slack.md: -------------------------------------------------------------------------------- 1 | # Slack 2 | 3 | - Set font family: `/slackfont Helvetica`. 4 | -------------------------------------------------------------------------------- /migrations/archive/README.md: -------------------------------------------------------------------------------- 1 | # Archived migrations that have run on all machines 2 | -------------------------------------------------------------------------------- /bin/main/fake-email: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | echo "$(openssl rand -hex 5)@gmail.com" 4 | -------------------------------------------------------------------------------- /migrations/global/.gitkeep: -------------------------------------------------------------------------------- 1 | # Global migrations go here 2 | # These run on all profiles 3 | -------------------------------------------------------------------------------- /assets/everybodydancenow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/assets/everybodydancenow.gif -------------------------------------------------------------------------------- /doc/assets/firefox-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-001.png -------------------------------------------------------------------------------- /doc/assets/firefox-002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-002.png -------------------------------------------------------------------------------- /doc/postinstall/iterm2.md: -------------------------------------------------------------------------------- 1 | # iTerm2 2 | 3 | - Import and load saved preferences / profile. 4 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-cap: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Cap.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-flux: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Flux.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-ice: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Ice.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-loom: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Loom.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-pika: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Pika.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-plex: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Plex.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-vlc: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/VLC.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/config/packages/mas.yml: -------------------------------------------------------------------------------- 1 | packages: 2 | - id: 1351639930 3 | name: "Gifski" 4 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-cap: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Cap.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-flux: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Flux.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-ice: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Ice.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-loom: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Loom.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-pika: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Pika.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-vlc: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/VLC.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-xrg: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/XRG.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-zen: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Zen.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-bruno: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Bruno.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-chatgpt: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/ChatGPT.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-claude: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Claude.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-discord: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Discord.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-espanso: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Espanso.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-ghostty: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Ghostty.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-gifski: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Gifski.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-gmail: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Gmail.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-gswitch: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/gSwitch.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-iterm: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/iTerm.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-minisim: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/MiniSim.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-notion: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Notion.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-opcode: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/opcode.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-openmtp: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/OpenMTP.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-raycast: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Raycast.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-runjs: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/RunJS.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-safari: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Safari.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-signal: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Signal.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-slack: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Slack.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-spotify: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Spotify.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-stats: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Stats.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-steam: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Steam.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-todoist: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Todoist.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-upscayl: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Upscayl.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-xcode: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Xcode.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-xcodes: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Xcodes.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-bruno: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Bruno.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-chatgpt: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/ChatGPT.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-claude: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Claude.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-comet: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Comet.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-discord: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Discord.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-espanso: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Espanso.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-figma: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Figma.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-imovie: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/iMovie.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-iterm: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/iTerm.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-keynote: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Keynote.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-logseq: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Logseq.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-minisim: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/MiniSim.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-numbers: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Numbers.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-opcode: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/opcode.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-openmtp: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/OpenMTP.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-pages: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Pages.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-raycast: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Raycast.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-runjs: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/RunJS.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-safari: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Safari.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-signal: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Signal.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-slack: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Slack.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-spotify: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Spotify.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-stats: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Stats.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-upscayl: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Upscayl.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-xcode: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Xcode.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-xcodes: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Xcodes.app" $@ 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | modules/* 2 | !modules/.gitkeep 3 | node_modules/ 4 | *.log 5 | .claude 6 | !dotfiles/.claude 7 | -------------------------------------------------------------------------------- /doc/postinstall/dock.md: -------------------------------------------------------------------------------- 1 | # Dock 2 | 3 | - Set Finder to appear on all desktops (Options > All Desktops). 4 | -------------------------------------------------------------------------------- /doc/postinstall/earsafe.md: -------------------------------------------------------------------------------- 1 | # earsafe 2 | 3 | - Install from: https://kristofdombi.gumroad.com/l/earsafe 4 | -------------------------------------------------------------------------------- /doc/postinstall/keepassxc.md: -------------------------------------------------------------------------------- 1 | # KeePassXC 2 | 3 | - Install / enable the KeePassXC Browser extension. 4 | -------------------------------------------------------------------------------- /doc/postinstall/raycast.md: -------------------------------------------------------------------------------- 1 | # Raycast 2 | 3 | - Log in and enable sync. 4 | - Choose the `Linear` theme. 5 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-hyperkey: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Hyperkey.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-insomnia: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Insomnia.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-keepassxc: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/KeePassXC.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-localsend: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/LocalSend.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-monodraw: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Monodraw.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-obsidian: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Obsidian.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-protonvpn: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/ProtonVPN.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-proxyman: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Proxyman.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-shadow-pc: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Shadow PC.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-simulator: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Simulator.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-syncthing: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Syncthing.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-whatsapp: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/WhatsApp.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-chromium: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Chromium.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-dashlane: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Dashlane.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-insomnia: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Insomnia.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-keepassxc: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/KeePassXC.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-localsend: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/LocalSend.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-monodraw: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Monodraw.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-obsidian: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Obsidian.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-onedrive: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/OneDrive.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-proxyman: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Proxyman.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-simulator: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Simulator.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-syncthing: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Syncthing.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/scripts/globalprotect-connect/.env.sample: -------------------------------------------------------------------------------- 1 | DATABASE_PATH= 2 | KEY_PATH= 3 | ENTRY_TITLE= 4 | -------------------------------------------------------------------------------- /config/packages/gh.yml: -------------------------------------------------------------------------------- 1 | packages: 2 | - dlvhdr/gh-dash 3 | - github/gh-copilot 4 | - kud/gh-pr-comments 5 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-cleanshot-x: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/CleanShot X.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-etrecheckpro: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/EtreCheckPro.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-image2icon: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Image2Icon.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-imageoptim: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/ImageOptim.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-middleclick: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/MiddleClick.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-pcloud-drive: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/pCloud Drive.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-pixelsnap-2: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/PixelSnap 2.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-prefs-editor: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Prefs Editor.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-qr-journal: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/QR Journal.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-rawtherapee: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/RawTherapee.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-steermouse: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/SteerMouse.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-cleanshot-x: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/CleanShot X.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-etrecheckpro: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/EtreCheckPro.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-garageband: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/GarageBand.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-image2icon: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Image2Icon.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-imageoptim: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/ImageOptim.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-jamf-connect: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Jamf Connect.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-jamfprotect: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/JamfProtect.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-middleclick: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/MiddleClick.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-pcloud-drive: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/pCloud Drive.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-pixelsnap-2: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/PixelSnap 2.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-prefs-editor: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Prefs Editor.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-qr-journal: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/QR Journal.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-redisinsight: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/RedisInsight.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-self-service: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Self Service.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-xcode-14.2: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Xcode-14.2.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-xcode-15.0: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Xcode-15.0.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-xcode-15.4: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Xcode-15.4.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-xcode-26.0.1: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Xcode-26.0.1.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-android-studio: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Android Studio.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-monitorcontrol: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/MonitorControl.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-sublime-merge: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Sublime Merge.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-android-studio: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Android Studio.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-company-portal: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Company Portal.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-globalprotect: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/GlobalProtect.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-google-chrome: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Google Chrome.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-microsoft-edge: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Microsoft Edge.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-microsoft-word: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Microsoft Word.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-monitorcontrol: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/MonitorControl.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-neo4j-desktop: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Neo4j Desktop.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-redis-insight: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Redis Insight.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-sublime-merge: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Sublime Merge.app" $@ 3 | -------------------------------------------------------------------------------- /bin/main/bodybuilder-repl: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | node ${HOMEBREW_PREFIX}/lib/node_modules/bodybuilder/repl.js 4 | -------------------------------------------------------------------------------- /bin/main/smerge: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | "/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge" "$@" 4 | -------------------------------------------------------------------------------- /config/packages/uv.yml: -------------------------------------------------------------------------------- 1 | packages: 2 | pip: 3 | - pdf2docx 4 | tool: 5 | - basic-memory 6 | - mistral-vibe -------------------------------------------------------------------------------- /doc/postinstall/vscode.md: -------------------------------------------------------------------------------- 1 | # Visual Studio Code 2 | 3 | - Enable Settings Sync (GitHub sign-in) to reuse preferences. 4 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-firefox-nightly: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Firefox Nightly.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-grandperspective: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/GrandPerspective.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-notion-calendar: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Notion Calendar.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-quicklook-video: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/QuickLook Video.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-simulator-(watch): -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Simulator (Watch).app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-firefox-nightly: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Firefox Nightly.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-grandperspective: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/GrandPerspective.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-microsoft-excel: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Microsoft Excel.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-microsoft-onenote: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Microsoft OneNote.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-microsoft-outlook: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Microsoft Outlook.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-microsoft-teams: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Microsoft Teams.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-neo4j-desktop-2: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Neo4j Desktop 2.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-notion-calendar: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Notion Calendar.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-qualyscloudagent: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/QualysCloudAgent.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-quicklook-video: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/QuickLook Video.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-simulator-(watch): -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Simulator (Watch).app" $@ 3 | -------------------------------------------------------------------------------- /bin/main/fix-chmod: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | chmod -R 644 $@ 4 | sudo find $@ -type d -print0 |xargs -0 sudo chmod 755 5 | -------------------------------------------------------------------------------- /doc/assets/firefox-adaptive-colours-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-adaptive-colours-001.png -------------------------------------------------------------------------------- /doc/assets/firefox-adaptive-colours-002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-adaptive-colours-002.png -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-suspicious-package: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Suspicious Package.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-visual-studio-code: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Visual Studio Code.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/main/fix-os-upgrade: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | fix-tid 4 | 5 | echo "" 6 | echo "It's now fixed. 💪" 7 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-microsoft-defender: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Microsoft Defender.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-suspicious-package: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Suspicious Package.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-visual-studio-code: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Visual Studio Code.app" $@ 3 | -------------------------------------------------------------------------------- /bin/main/quit: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # quit an app 4 | for app in $*; do 5 | osascript -e 'quit app "'$app'"' 6 | done 7 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-altair-graphql-client: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Altair GraphQL Client.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-android-file-transfer: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Android File Transfer.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-google-chrome-canary: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Google Chrome Canary.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-macmediakeyforwarder: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/MacMediaKeyForwarder.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/home/bin/shims/open-react-native-debugger: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/React Native Debugger.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/main/vpn-connect: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | node $MY/profiles/work/scripts/globalprotect-connect/index.js 4 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-altair-graphql-client: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Altair GraphQL Client.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-android-file-transfer: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Android File Transfer.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-google-chrome-canary: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Google Chrome Canary.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-macmediakeyforwarder: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/MacMediaKeyForwarder.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-microsoft-powerpoint: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/Microsoft PowerPoint.app" $@ 3 | -------------------------------------------------------------------------------- /profiles/work/bin/shims/open-react-native-debugger: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | open -a "/Applications/React Native Debugger.app" $@ 3 | -------------------------------------------------------------------------------- /bin/main/pdfconcat: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" $@ 4 | -------------------------------------------------------------------------------- /bin/main/unsymlink: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | ORIGINAL_SOURCE=$(readlink $argv) 4 | rm -rf $argv 5 | cp -r $ORIGINAL_SOURCE $argv 6 | -------------------------------------------------------------------------------- /profiles/work/bin/main/request-admin-privileges: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | open raycast://script-commands/request-admin-privileges 4 | -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-raindrop_io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-raindrop_io.png -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-ublock_origin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-ublock_origin.png -------------------------------------------------------------------------------- /bin/git/git-branch-name: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Print the current branch name with a newline 4 | # 5 | 6 | git rev-parse --abbrev-ref HEAD 7 | -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-keepassxc_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-keepassxc_browser.png -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-location_switcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-location_switcher.png -------------------------------------------------------------------------------- /bin/main/fu-npm: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | rm -rf ./node_modules 4 | npm cache clean --force 5 | rm -rf ~/.npm 6 | 7 | echo "" 8 | echo "💥 It's done." 9 | -------------------------------------------------------------------------------- /bin/main/fu-simulator: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | sudo killall -10 com.apple.CoreSimulator.CoreSimulatorService 4 | 5 | echo "" 6 | echo "💥 It's done." 7 | -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-email_address_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-email_address_plus.png -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-markdown_web_clipper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-markdown_web_clipper.png -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-readwise_highlighter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-readwise_highlighter.png -------------------------------------------------------------------------------- /bin/git/git-push-new-branch: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | current_branch=$(git rev-parse --abbrev-ref HEAD) 4 | 5 | git push --set-upstream origin ${current_branch} 6 | -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-easy_container_shortcuts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-easy_container_shortcuts.png -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-move_tab_to_next_windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-move_tab_to_next_windows.png -------------------------------------------------------------------------------- /bin/git/git-branch-select: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Wrapper for git-branch-select that uses node-system to avoid ESM errors 4 | exec node-system git-branch-select "$@" -------------------------------------------------------------------------------- /bin/main/ascii-art: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/helper.zsh 4 | 5 | figlet -f 'Ansi Shadow' $@ |pbcopy 6 | echo_success 'Copied in the clipboard!' 7 | -------------------------------------------------------------------------------- /bin/main/restart: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # restart an app 4 | for app in $*; do 5 | osascript -e 'quit app "'$app'"' 6 | sleep 5 7 | open -a $app 8 | done 9 | -------------------------------------------------------------------------------- /dotfiles/.gitattributes: -------------------------------------------------------------------------------- 1 | *.bmp diff=image 2 | *.gif diff=image 3 | *.heic diff=image 4 | *.jpeg diff=image 5 | *.jpg diff=image 6 | *.png diff=image 7 | *.svg diff=image 8 | -------------------------------------------------------------------------------- /config/apps/bruno.yml: -------------------------------------------------------------------------------- 1 | # Bruno Configuration (mirrors preferences.json structure) 2 | 3 | preferences: 4 | font: 5 | codeFont: "JetBrains Mono" 6 | codeFontSize: 15 7 | -------------------------------------------------------------------------------- /doc/assets/firefox-addons-hotkeys-firefox_multi-account_containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kud/my/HEAD/doc/assets/firefox-addons-hotkeys-firefox_multi-account_containers.png -------------------------------------------------------------------------------- /core/system/default-folders.zsh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/ui-kit.zsh 4 | 5 | mkdir -p ~/{__tmp,Projects} 6 | ui_success_simple "Created directories: __tmp, Projects" -------------------------------------------------------------------------------- /bin/main/pip-upgrade-all: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # Safer pip upgrade that filters out problematic packages 4 | pip list --outdated | tail -n +3 | awk '{print $1}' | xargs -n1 pip install -U 5 | -------------------------------------------------------------------------------- /bin/main/edit-remote-file: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # ex: edit-remote-file root@ip:/etc/nginx/sites-available/desktop 4 | 5 | scp $1 /tmp/scp_buffer && code -n -w /tmp/scp_buffer && scp /tmp/scp_buffer $1 6 | -------------------------------------------------------------------------------- /bin/git/git-rewrite-history: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | HEAD_BRANCH=$(basename $(git symbolic-ref --short refs/remotes/origin/HEAD)) 4 | 5 | git fetch && git rebase -i $(git merge-base origin/${HEAD_BRANCH} HEAD) 6 | -------------------------------------------------------------------------------- /bin/main/figlet-preview: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/helper.zsh 4 | 5 | figlet -l|xargs -I FONT sh -c 'echo "FONT:" && echo '' && figlet -f "FONT" "'$1'" && echo "-------------------------"' 6 | -------------------------------------------------------------------------------- /doc/faq.md: -------------------------------------------------------------------------------- 1 | # FAQ 2 | 3 | ## How to open VS Code from another editor/app 4 | 5 | ```js 6 | "editor_path": "/usr/local/bin/code", // can be different 7 | "editor_argument_format": "-g ${file}:${line}:${col}", 8 | ``` 9 | -------------------------------------------------------------------------------- /bin/main/ip: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | PUBLIC_IP=$(curl -s 'https://api.ipify.org') 4 | 5 | if [ $? -eq 0 ]; then 6 | echo "${PUBLIC_IP}" 7 | else 8 | echo "Error: Unable to fetch public IP address" 9 | fi 10 | -------------------------------------------------------------------------------- /profiles/home/config/cli/claude-code.yml: -------------------------------------------------------------------------------- 1 | # Claude Code Configuration - Home Profile 2 | # Adds Todoist MCP server for home usage 3 | 4 | mcp: 5 | todoist: 6 | transport: http 7 | url: https://ai.todoist.net/mcp 8 | -------------------------------------------------------------------------------- /bin/git/git-push-all: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | params="$@" 4 | IFS=$'\n' remotes=($(git remote)) 5 | 6 | for remote in "${remotes[@]}"; do 7 | echo "Pushing to $remote..." 8 | git push $remote $params 9 | done 10 | -------------------------------------------------------------------------------- /dotfiles/.zshenv: -------------------------------------------------------------------------------- 1 | # Ensure non-login, non-interactive shells still pick up the login profile. 2 | if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then 3 | source "${ZDOTDIR:-$HOME}/.zprofile" 4 | fi 5 | -------------------------------------------------------------------------------- /bin/git/git-branches-local-secondary-remove: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | HEAD_BRANCH=$(basename $(git symbolic-ref --short refs/remotes/origin/HEAD)) 4 | 5 | git branch | grep -v ${HEAD_BRANCH} | grep -v "stable" | xargs git branch -D 6 | -------------------------------------------------------------------------------- /bin/main/dadjoke: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | JOKE=$(curl -s -H 'Accept: text/plain' https://icanhazdadjoke.com/) 4 | 5 | if [ $? -eq 0 ]; then 6 | echo "${JOKE}" 7 | else 8 | echo "Error: Unable to fetch the joke" 9 | fi 10 | -------------------------------------------------------------------------------- /dotfiles/.gemrc: -------------------------------------------------------------------------------- 1 | --- 2 | :backtrace: false 3 | :benchmark: false 4 | :bulk_threshold: 1000 5 | :sources: 6 | - http://rubygems.org/ 7 | - http://production.cf.rubygems.org 8 | :update_sources: true 9 | :verbose: true 10 | gem: --no-ri --no-rdoc 11 | -------------------------------------------------------------------------------- /profiles/home/config/apps/firefox.yml: -------------------------------------------------------------------------------- 1 | # Firefox Configuration - Home Profile 2 | # Profile-specific settings for home usage 3 | 4 | # Profile-specific Preferences 5 | preferences: 6 | services: 7 | sync: 8 | client: 9 | name: "_kud.home" 10 | -------------------------------------------------------------------------------- /profiles/work/config/apps/firefox.yml: -------------------------------------------------------------------------------- 1 | # Firefox Configuration - Work Profile 2 | # Profile-specific settings for work usage 3 | 4 | # Profile-specific Preferences 5 | preferences: 6 | services: 7 | sync: 8 | client: 9 | name: "_kud.work" 10 | -------------------------------------------------------------------------------- /bin/main/base64-file: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/helper.zsh 4 | 5 | MIMETYPE=$(file -b --mime-type $argv) 6 | ELBASE64=$(base64 -i $argv) 7 | 8 | echo "data:$MIMETYPE;base64,$ELBASE64" | pbcopy 9 | echo_success 'Copied in the clipboard!' 10 | -------------------------------------------------------------------------------- /bin/git/git-remote-branches-delete: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | HEAD_BRANCH=$(basename $(git symbolic-ref --short refs/remotes/origin/HEAD)) 4 | 5 | git branch -r|grep origin/|grep -v "${HEAD_BRANCH}$"|grep -v HEAD|cut -d/ -f2-|while read line; do git push origin :$line; done; 6 | -------------------------------------------------------------------------------- /dotfiles/.zprofile: -------------------------------------------------------------------------------- 1 | # Set PATH, MANPATH, etc., for Homebrew (handles Apple Silicon and Intel). 2 | if [[ -x /opt/homebrew/bin/brew ]]; then 3 | eval "$(/opt/homebrew/bin/brew shellenv)" 4 | elif [[ -x /usr/local/bin/brew ]]; then 5 | eval "$(/usr/local/bin/brew shellenv)" 6 | fi 7 | -------------------------------------------------------------------------------- /profiles/work/config/packages/brew.yml: -------------------------------------------------------------------------------- 1 | taps: 2 | - ankitpokhrel/jira-cli 3 | - dashlane/tap 4 | 5 | packages: 6 | formulae: 7 | - awscli 8 | - jira-cli 9 | - dashlane-cli 10 | casks: 11 | - eloston-chromium 12 | - neo4j 13 | - redisinsight 14 | -------------------------------------------------------------------------------- /config/system/submodules.yml: -------------------------------------------------------------------------------- 1 | git-diff-image: 2 | url: https://github.com/ewanmellor/git-diff-image.git 3 | description: Git tool to show diffs of binary files using external tools 4 | 5 | themes: 6 | url: https://github.com/kud/themes.git 7 | description: Collection of custom themes and color schemes 8 | -------------------------------------------------------------------------------- /bin/git/git-branch-orphan-create: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | read "?Enter the name of the orphan branch: " ORPHAN_NAME 3 | 4 | git checkout --orphan "$ORPHAN_NAME" 5 | git rm -rf . 6 | rm '.gitignore' 7 | echo "# README" >README.md 8 | git add README.md 9 | git commit -a -m "Initial Commit" 10 | git push origin "$ORPHAN_NAME" 11 | -------------------------------------------------------------------------------- /dotfiles/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [Makefile] 13 | indent_style = tab 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | 18 | -------------------------------------------------------------------------------- /doc/postinstall/pcloud.md: -------------------------------------------------------------------------------- 1 | # pCloud 2 | 3 | Ignored file patterns: 4 | ``` 5 | .ds_store; .ds_store?; .appledouble; ._*; .spotlight-v100; .documentrevisions-v100; 6 | .temporaryitems; .trashes; .fseventsd; .~lock.*; ehthumbs.db; thumbs.db; 7 | hiberfil.sys; pagefile.sys; $recycle.bin; *.part; .pcloud; node_modules; .stfolder; *.photoslibrary; 8 | ``` 9 | -------------------------------------------------------------------------------- /dotfiles/.config/mise/config.toml: -------------------------------------------------------------------------------- 1 | [settings] 2 | auto_install = true 3 | idiomatic_version_file_enable_tools = ['node', 'ruby', 'java', 'yarn', 'python'] 4 | 5 | [tools] 6 | java = "latest" 7 | node = "24" 8 | ruby = "latest" 9 | python = "latest" 10 | pnpm = "latest" 11 | yarn = "latest" 12 | uv = "latest" 13 | go = "latest" 14 | rust = "latest" 15 | -------------------------------------------------------------------------------- /profiles/home/config/packages/brew.yml: -------------------------------------------------------------------------------- 1 | packages: 2 | formulae: 3 | - dnscrypt-proxy 4 | casks: 5 | - gswitch 6 | - notion 7 | - rawtherapee 8 | - shadow 9 | - steam 10 | - steermouse 11 | - todoist-app 12 | - whatsapp 13 | - protonvpn 14 | 15 | post_install: 16 | - sudo brew services start dnscrypt-proxy 17 | -------------------------------------------------------------------------------- /bin/main/youtube-watch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Set the file name using the current timestamp. 4 | NAME="yt-dlp-$(date +%s)" 5 | 6 | # Set the download directory. 7 | DOWNLOAD_DIR="/tmp" 8 | 9 | # Download the video using yt-dlp. 10 | yt-dlp -o "${DOWNLOAD_DIR}/${NAME}" "$@" 11 | 12 | # Open the downloaded file. 13 | open "${DOWNLOAD_DIR}/${NAME}*" 14 | -------------------------------------------------------------------------------- /templates/ssh/config: -------------------------------------------------------------------------------- 1 | # use keychain for SSH — https://ma.ttias.be/mac-osx-keeps-prompting-ssh-key-passphrase-not-use-keychain/ 2 | Host * 3 | UseKeychain yes 4 | AddKeysToAgent yes 5 | 6 | # jumper 7 | Host *+* 8 | ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /') 9 | -------------------------------------------------------------------------------- /bin/main/fix-tid: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | FILE_PATH="/etc/pam.d/sudo" 4 | LINE_TO_CHECK="auth sufficient pam_tid.so" 5 | LINE_TO_ADD_BEFORE="auth\s\+sufficient\s\+pam_smartcard.so" 6 | 7 | # Check if the line already exists 8 | if ! grep -qF "$LINE_TO_CHECK" "$FILE_PATH"; then 9 | sudo sed -i "/$LINE_TO_ADD_BEFORE/i $LINE_TO_CHECK" "$FILE_PATH" 10 | fi 11 | -------------------------------------------------------------------------------- /bin/git/git-switch-main: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | git_switch_main() { 4 | if git show-ref --verify --quiet refs/heads/main; then 5 | git switch main 6 | elif git show-ref --verify --quiet refs/heads/master; then 7 | git switch master 8 | else 9 | echo "Neither 'main' nor 'master' branch exists." 10 | return 1 11 | fi 12 | } 13 | 14 | git_switch_main 15 | -------------------------------------------------------------------------------- /profiles/home/config/cli/codex.yml: -------------------------------------------------------------------------------- 1 | # Codex CLI Configuration - Home Profile 2 | # Adds Todoist MCP server for home usage (command wrapper for reliability) 3 | 4 | mcp_servers: 5 | todoist: 6 | command: mise 7 | args: 8 | - exec 9 | - node@latest 10 | - -- 11 | - npx 12 | - -y 13 | - mcp-remote@latest 14 | - https://ai.todoist.net/mcp 15 | -------------------------------------------------------------------------------- /profiles/home/config/cli/opencode.yml: -------------------------------------------------------------------------------- 1 | # OpenCode Configuration - Home Profile 2 | # Adds Todoist MCP server for home usage 3 | 4 | mcp: 5 | todoist: 6 | type: local 7 | enabled: true 8 | command: 9 | - mise 10 | - exec 11 | - node@latest 12 | - -- 13 | - npx 14 | - -y 15 | - mcp-remote@latest 16 | - https://ai.todoist.net/mcp 17 | -------------------------------------------------------------------------------- /.gitleaksignore: -------------------------------------------------------------------------------- 1 | # Firefox keyboard shortcut configurations - false positives 2 | 3c9efecc3a8419ec5ade4ccfd1bfccbd317c08f0:config/apps/firefox.yml:generic-api-key:354 3 | 3c9efecc3a8419ec5ade4ccfd1bfccbd317c08f0:config/apps/firefox.yml:generic-api-key:355 4 | 3c9efecc3a8419ec5ade4ccfd1bfccbd317c08f0:config/apps/firefox.yml:generic-api-key:357 5 | 3c9efecc3a8419ec5ade4ccfd1bfccbd317c08f0:config/apps/firefox.yml:generic-api-key:358 6 | -------------------------------------------------------------------------------- /config/apps/sublime-merge.yml: -------------------------------------------------------------------------------- 1 | # Sublime Merge Configuration 2 | 3 | # Theme Configuration 4 | theme: 5 | name: "Meetio Theme" 6 | repository: "git@github.com:meetio-theme/merge-meetio-theme.git" 7 | sublime_theme: "Merge Palenight.sublime-theme" 8 | color_scheme: "Meetio Palenight.sublime-color-scheme" 9 | 10 | # Preferences Configuration 11 | preferences: 12 | font_face: "JetBrains Mono" 13 | font_size: 15 14 | -------------------------------------------------------------------------------- /profiles/home/config/apps/claude-desktop.yml: -------------------------------------------------------------------------------- 1 | # Claude Desktop Configuration - Home Profile 2 | # Adds Todoist MCP server for home usage (command wrapper for reliability) 3 | 4 | mcp: 5 | todoist: 6 | transport: stdio 7 | command: mise 8 | args: 9 | - exec 10 | - node@latest 11 | - -- 12 | - npx 13 | - -y 14 | - mcp-remote@latest 15 | - https://ai.todoist.net/mcp 16 | -------------------------------------------------------------------------------- /profiles/work/scripts/globalprotect-connect/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "globalprotect-connect", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "type": "module", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "clipboardy": "4.0.0", 14 | "dotenv": "17.2.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /bin/main/smallest-files: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/helper.zsh 4 | 5 | if [[ $# -eq 0 ]]; then 6 | $0 --help 7 | else 8 | 9 | case "$1" in 10 | gif) 11 | echo "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="|pbcopy 12 | echo_success 'Gif copied in the clipboard!' 13 | ;; 14 | *) 15 | echo 'What did you say?' 16 | ;; 17 | esac 18 | 19 | fi 20 | 21 | -------------------------------------------------------------------------------- /shell/plugins.txt: -------------------------------------------------------------------------------- 1 | zsh-users/zsh-completions 2 | zsh-users/zsh-syntax-highlighting 3 | zsh-users/zsh-autosuggestions 4 | zsh-users/zsh-history-substring-search 5 | Aloxaf/fzf-tab 6 | olets/zsh-abbr 7 | mtxr/zsh-change-case 8 | reegnz/jq-zsh-plugin 9 | hlissner/zsh-autopair 10 | lukechilds/zsh-better-npm-completion 11 | wfxr/forgit 12 | bigH/git-fuzzy path:bin kind:path 13 | unixorn/git-extra-commands 14 | MichaelAquilina/zsh-you-should-use 15 | -------------------------------------------------------------------------------- /profiles/home/config/cli/github-copilot.yml: -------------------------------------------------------------------------------- 1 | # GitHub Copilot CLI Configuration - Home Profile 2 | # Adds Todoist MCP server for home usage 3 | 4 | mcpServers: 5 | todoist: 6 | type: local 7 | command: mise 8 | args: 9 | - exec 10 | - node@latest 11 | - -- 12 | - npx 13 | - -y 14 | - mcp-remote@latest 15 | - https://ai.todoist.net/mcp 16 | headers: {} 17 | tools: 18 | - "*" 19 | -------------------------------------------------------------------------------- /core/apps/pcloud.zsh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/ui-kit.zsh 4 | 5 | if [ ! -d "$HOME/pCloud" ]; then 6 | mkdir -p ~/pCloud 7 | ui_info_simple "Opening pCloud installation page..." 8 | open "https://www.pcloud.com/how-to-install-pcloud-drive-mac-os.html?download=mac" 9 | read "?Install and configure pCloud and press [Enter] when finished..." =24.0.0" 19 | }, 20 | "license": "ISC" 21 | } 22 | -------------------------------------------------------------------------------- /bin/main/fu-apple: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | set -e 4 | 5 | if [[ -z "$1" ]]; then 6 | echo "Error: No file provided." 7 | echo "Usage: $0 " 8 | exit 1 9 | fi 10 | 11 | file="$1" 12 | if [[ ! -e "$file" ]]; then 13 | echo "Error: File '$file' does not exist." 14 | exit 2 15 | fi 16 | 17 | xattr -d com.apple.quarantine "$file" && { 18 | echo "" 19 | echo "💥 Quarantine attribute removed from '$file'." 20 | } || { 21 | echo "Failed to remove quarantine attribute from '$file'." 22 | exit 3 23 | } 24 | -------------------------------------------------------------------------------- /profiles/home/core/os/main.zsh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | 4 | ############################################################################### 5 | # General UI/UX # 6 | ############################################################################### 7 | 8 | sudo scutil --set ComputerName "_kud.home" 9 | sudo scutil --set HostName "_kud.home" 10 | sudo scutil --set LocalHostName "kud-home" 11 | sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "kud-home" 12 | -------------------------------------------------------------------------------- /bin/main/wallpaper-refresh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/helper.zsh 4 | 5 | echo_title "Refreshing wallpaper..." 6 | 7 | rm -rf "~/Library/Application Support/Dock/desktoppicture.db" 8 | 9 | sudo rm -rf "/System/Library/CoreServices/DefaultDesktop.jpg" 10 | sudo ln -s ${SYNC_FOLDER}/Lib/wallpapers/DefaultDesktop.jpg /System/Library/CoreServices/DefaultDesktop.jpg 11 | 12 | for app in "Activity Monitor" "Dock" "Finder" "SystemUIServer" "cfprefsd"; do 13 | killall "${app}" > /dev/null 2>&1 14 | done 15 | 16 | echo_success "Enjoy your wallpaper!" 17 | -------------------------------------------------------------------------------- /bin/git/git-sync: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | ORIGIN_REPO=$(git config --get remote.origin.url | sed 's/git@github.com://g' | sed 's/\.git//g') 4 | UPSTREAM_REPO=$(git config --get remote.upstream.url | sed 's/git@github.com://g' | sed 's/\.git//g') 5 | HEAD_BRANCH=$(basename $(git symbolic-ref --short refs/remotes/origin/HEAD)) 6 | 7 | git stash push -m "tmp-sync-command" >/dev/null 2>&1 8 | gh repo sync $ORIGIN_REPO --source $UPSTREAM_REPO 9 | git switch $HEAD_BRANCH 10 | git fetch --all 11 | git pull origin $HEAD_BRANCH 12 | git switch - 13 | git stash pop tmp-sync-command >/dev/null 2>&1 14 | -------------------------------------------------------------------------------- /profiles/work/shell/aliases.zsh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | ################################################################################ 4 | # # 5 | # Work Profile Aliases # 6 | # # 7 | ################################################################################ 8 | 9 | # awsume alias for AWS profile management 10 | # https://awsu.me/general/quickstart.html 11 | alias awsume=". awsume" 12 | -------------------------------------------------------------------------------- /doc/postinstall/dnscrypt-proxy.md: -------------------------------------------------------------------------------- 1 | # DNSCrypt-Proxy 2 | 3 | Recommended configuration snippet: 4 | 5 | ```toml 6 | server_names = ['rethinkdns-doh', 'rethinkdns-doh-max'] 7 | 8 | [static] 9 | [static.'rethinkdns-doh'] 10 | stamp = 'sdns://AgYAAAAAAAAAACBdzvEcz84tL6QcR78t69kc0nufblyYal5di10An6SyUBJza3kucmV0aGlua2Rucy5jb20KL2Rucy1xdWVyeQ' 11 | 12 | [static.'rethinkdns-doh-max'] 13 | stamp = 'sdns://AgYAAAAAAAAAACCaOjT3J965vKUQA9nOnDn48n3ZxSQpAcK6saROY1oCGRJtYXgucmV0aGlua2Rucy5jb20KL2Rucy1xdWVyeQ' 14 | ``` 15 | 16 | Set Wi-Fi DNS: 17 | ``` 18 | sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1 19 | ``` 20 | -------------------------------------------------------------------------------- /dotfiles/.zlogin: -------------------------------------------------------------------------------- 1 | # Compile completion dump asynchronously so fresh prompts stay quick. 2 | { 3 | cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/zsh" 4 | mkdir -p "$cache_dir" 5 | 6 | zcompdump="${cache_dir}/zcompdump" 7 | if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then 8 | zcompile "$zcompdump" 9 | fi 10 | } &! 11 | 12 | # Execute code only if STDERR is bound to a TTY. 13 | if [[ -o INTERACTIVE && -t 2 ]]; then 14 | 15 | # Print a random, hopefully interesting, adage. 16 | if (( $+commands[fortune] )); then 17 | fortune -s 18 | print 19 | fi 20 | 21 | fi >&2 22 | -------------------------------------------------------------------------------- /services/limit.maxfiles.plist: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Label 7 | limit.maxfiles 8 | 9 | ProgramArguments 10 | 11 | launchctl 12 | limit 13 | maxfiles 14 | 1048576 15 | 1048576 16 | 17 | 18 | RunAtLoad 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /bin/git/git-show-main: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | HEAD_BRANCH=$(basename $(git symbolic-ref --short refs/remotes/origin/HEAD)) 3 | 4 | # Cleanup function for background editor process 5 | cleanup_editor_process() { 6 | if [[ -n "$EDITOR_PID" ]]; then 7 | # Note: We don't kill the editor process as user might still be using it 8 | # Just clean up the PID variable 9 | unset EDITOR_PID 10 | fi 11 | } 12 | 13 | # Start editor with content and track PID 14 | git show ${HEAD_BRANCH}:$1 | code & 15 | EDITOR_PID=$! 16 | 17 | # Set up cleanup trap (mainly for PID variable cleanup) 18 | trap cleanup_editor_process EXIT 19 | -------------------------------------------------------------------------------- /shell/starship.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🚀 STARSHIP PROMPT INITIALIZATION # 4 | # ---------------------------------- # 5 | # Loads the Starship cross-shell prompt. # 6 | # # 7 | ################################################################################ 8 | 9 | eval "$(starship init zsh)" 10 | -------------------------------------------------------------------------------- /shell/babel.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🐝 BABEL CACHE # 4 | # ------------- # 5 | # Babel cache path. # 6 | # # 7 | ################################################################################ 8 | 9 | export BABEL_CACHE_PATH=/tmp/babel.cache.json 10 | -------------------------------------------------------------------------------- /dotfiles/.zlogout: -------------------------------------------------------------------------------- 1 | # Print a lighthearted message when leaving interactive shells. 2 | [[ -o INTERACTIVE && -t 2 ]] && { 3 | 4 | SAYINGS=( 5 | "So long and thanks for all the fish.\n -- Douglas Adams" 6 | "Good morning! And in case I don't see ya, good afternoon, good evening and goodnight.\n --Truman Burbank" 7 | "Now you're thinking with portals.\n -- GLaDOS" 8 | "Stay hungry. Stay foolish.\n -- Steve Jobs" 9 | "Live long and prosper.\n -- Spock" 10 | "Never half-ass two things. Whole-ass one thing.\n -- Ron Swanson" 11 | ) 12 | 13 | # Print a randomly-chosen message: 14 | echo $SAYINGS[$(($RANDOM % ${#SAYINGS} + 1))] 15 | 16 | } >&2 17 | -------------------------------------------------------------------------------- /bin/main/give-me-ownership: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Check if the right number of arguments are provided. 4 | if [[ $# -ne 1 ]]; then 5 | echo "Usage: $0 " 6 | exit 1 7 | fi 8 | 9 | # Capture the target file or directory. 10 | target="$1" 11 | 12 | # Check if the target exists. 13 | if [[ ! -e "$target" ]]; then 14 | echo "The file or directory '$target' does not exist." 15 | exit 1 16 | fi 17 | 18 | # Change the ownership of the target to the current user (in the 'staff' group). 19 | sudo chown -R "$(whoami):staff" "$target" 20 | 21 | # Display the executed command and result. 22 | echo "Changed ownership of '$target' to $(whoami):staff" 23 | -------------------------------------------------------------------------------- /core/commands/info.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Environment info summary 4 | # ------------------------ 5 | # Lightweight command to display the current my 6 | # environment context (version, host, profile) 7 | # without running any updates. 8 | 9 | source "$MY/core/utils/ui-kit.zsh" 10 | 11 | # Get version info 12 | MY_VERSION=$(git --git-dir="$MY/.git" describe --tags --always 2>/dev/null || echo "unknown") 13 | HOSTNAME=$(hostname -s) 14 | PROFILE="${OS_PROFILE:-default}" 15 | 16 | # Display environment info as a table for better readability 17 | headers=$'Version Host Profile' 18 | rows=$MY_VERSION$'\t'$HOSTNAME$'\t'$PROFILE 19 | 20 | ui_table "$headers" "$rows" 21 | -------------------------------------------------------------------------------- /shell/locale.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 🌐 LOCALE & ENCODING # 4 | # -------------------- # 5 | # Locale and encoding settings. # 6 | # # 7 | # ################################################################################ 8 | 9 | export LANG="en_GB" 10 | export LC_ALL="en_GB.UTF-8" 11 | -------------------------------------------------------------------------------- /shell/path/node.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 📦 NODE.JS PATH SETUP # 4 | # ------------------- # 5 | # Node.js and npm related PATH modifications. # 6 | # # 7 | ################################################################################ 8 | 9 | # npm global packages 10 | export PATH=$HOME/.npm-global/bin:$PATH 11 | -------------------------------------------------------------------------------- /shell/path/console-ninja.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🥷 CONSOLE NINJA PATH SETUP # 4 | # ------------------------- # 5 | # Console Ninja development tool PATH modifications. # 6 | # # 7 | ################################################################################ 8 | 9 | # Console Ninja 10 | export PATH=$HOME/.console-ninja/.bin:$PATH 11 | -------------------------------------------------------------------------------- /config/packages/antidote.yml: -------------------------------------------------------------------------------- 1 | plugins: 2 | # Fast, essential plugins first 3 | - zsh-users/zsh-completions 4 | - zsh-users/zsh-syntax-highlighting 5 | - zsh-users/zsh-autosuggestions 6 | - zsh-users/zsh-history-substring-search 7 | - Aloxaf/fzf-tab 8 | 9 | # Visual & Interactive plugins 10 | - olets/zsh-abbr 11 | 12 | # Utility plugins 13 | - mtxr/zsh-change-case 14 | - reegnz/jq-zsh-plugin 15 | - hlissner/zsh-autopair 16 | 17 | # Developer tools 18 | - lukechilds/zsh-better-npm-completion 19 | - wfxr/forgit 20 | 21 | # Heavier plugins last 22 | - bigH/git-fuzzy path:bin kind:path 23 | - unixorn/git-extra-commands 24 | - MichaelAquilina/zsh-you-should-use -------------------------------------------------------------------------------- /doc/post-install.md: -------------------------------------------------------------------------------- 1 | # Post-Installation Configuration Guide 2 | 3 | This index links to focused post-install documents. 4 | 5 | ## Sections 6 | - [System Preferences](postinstall/system-preferences.md) 7 | - [Dock](postinstall/dock.md) 8 | - [Firefox](postinstall/firefox.md) 9 | - [Visual Studio Code](postinstall/vscode.md) 10 | - [KeePassXC](postinstall/keepassxc.md) 11 | - [iTerm2](postinstall/iterm2.md) 12 | - [Raycast](postinstall/raycast.md) 13 | - [Spotify](postinstall/spotify.md) 14 | - [Slack](postinstall/slack.md) 15 | - [earsafe](postinstall/earsafe.md) 16 | - [pCloud](postinstall/pcloud.md) 17 | - [DNSCrypt-Proxy](postinstall/dnscrypt-proxy.md) 18 | 19 | 20 | -------------------------------------------------------------------------------- /shell/android.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 🤖 ANDROID ENVIRONMENT # 4 | # ---------------------- # 5 | # Android SDK and related variables. # 6 | # # 7 | # ################################################################################ 8 | 9 | export ANDROID_HOME=$HOME/Library/Android/sdk 10 | export ANDROID_SDK_ROOT=$ANDROID_HOME 11 | -------------------------------------------------------------------------------- /bin/main/osx-check-diff: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | echo "❯ Check before…" 4 | BEFORE=$(defaults read) 5 | BEFORE_HOST=$(defaults -currentHost read) 6 | echo $BEFORE > before.tmp 7 | echo $BEFORE_HOST > before_host.tmp 8 | 9 | read "?Do your changes and ENTER or CTRL+C to stop." < /dev/tty 10 | 11 | echo "❯ Check after…" 12 | AFTER=$(defaults read) 13 | AFTER_HOST=$(defaults -currentHost read) 14 | echo $AFTER > after.tmp 15 | echo $AFTER_HOST > after_host.tmp 16 | 17 | echo "❯ Waiting for comparison…" 18 | diff -U 30 before.tmp after.tmp|code - 19 | echo "❯ Waiting for \"host\" comparison…" 20 | diff -U 30 before_host.tmp after_host.tmp|code - 21 | 22 | rm -rf before.tmp after.tmp before_host.tmp after_host.tmp 23 | -------------------------------------------------------------------------------- /shell/path/android.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🤖 ANDROID PATH SETUP # 4 | # ------------------- # 5 | # Android development tools PATH modifications. # 6 | # # 7 | ################################################################################ 8 | 9 | # Android 10 | export PATH=$PATH:$ANDROID_HOME/emulator 11 | export PATH=$PATH:$ANDROID_HOME/platform-tools 12 | -------------------------------------------------------------------------------- /shell/autosuggestions.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🤖 ZSH AUTOSUGGESTIONS CONFIGURATION # 4 | # ------------------------------------- # 5 | # Performance and behaviour tweaks for zsh-autosuggestions. # 6 | # # 7 | ################################################################################ 8 | 9 | ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE="50" 10 | ZSH_AUTOSUGGEST_USE_ASYNC=1 11 | ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8' 12 | -------------------------------------------------------------------------------- /bin/main/firefox-suggest-enable: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/helper.zsh 4 | 5 | echo_title_update "firefox settings" 6 | 7 | DEFAULT_FOLDER=$(ls "$HOME/Library/Application Support/Firefox/Profiles" | grep .default-nightly) 8 | PREFS_JS="$HOME/Library/Application Support/Firefox/Profiles/$DEFAULT_FOLDER/prefs.js" 9 | 10 | quit "firefox" 11 | 12 | sleep 5 13 | 14 | echo 'user_pref("browser.urlbar.suggest.bookmark", true);' >>$PREFS_JS 15 | echo 'user_pref("browser.urlbar.suggest.history", true);' >>$PREFS_JS 16 | echo 'user_pref("browser.urlbar.suggest.openpage", true);' >>$PREFS_JS 17 | echo 'user_pref("browser.urlbar.suggest.topsites", true);' >>$PREFS_JS 18 | 19 | sleep 2 20 | 21 | open-firefox-nightly 22 | -------------------------------------------------------------------------------- /config/cli/basic-memory.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🧠 BASIC MEMORY CONFIGURATION # 4 | # ------------------------------ # 5 | # Configuration for Basic Memory CLI tool # 6 | # # 7 | ################################################################################ 8 | 9 | # Projects configuration 10 | projects: 11 | main: 12 | path: ${SYNC_FOLDER}/Memory 13 | default: true 14 | -------------------------------------------------------------------------------- /bin/main/firefox-suggest-disable: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | source $MY/core/utils/helper.zsh 4 | 5 | echo_title_update "firefox settings" 6 | 7 | DEFAULT_FOLDER=$(ls "$HOME/Library/Application Support/Firefox/Profiles" | grep .default-nightly) 8 | PREFS_JS="$HOME/Library/Application Support/Firefox/Profiles/$DEFAULT_FOLDER/prefs.js" 9 | 10 | quit "firefox" 11 | 12 | sleep 5 13 | 14 | echo 'user_pref("browser.urlbar.suggest.bookmark", false);' >>$PREFS_JS 15 | echo 'user_pref("browser.urlbar.suggest.history", false);' >>$PREFS_JS 16 | echo 'user_pref("browser.urlbar.suggest.openpage", false);' >>$PREFS_JS 17 | echo 'user_pref("browser.urlbar.suggest.topsites", false);' >>$PREFS_JS 18 | 19 | sleep 2 20 | 21 | open-firefox-nightly 22 | -------------------------------------------------------------------------------- /bin/main/create-override-bin: -------------------------------------------------------------------------------- 1 | 2 | #!/usr/bin/env zsh 3 | # Usage: ./create-override-bin binPath 4 | 5 | set -e 6 | 7 | if [[ -z "$1" ]]; then 8 | echo "Error: No binary path provided." 9 | echo "Usage: $0 " 10 | exit 1 11 | fi 12 | 13 | binPath="$1" 14 | binName="${binPath##*/}" 15 | overrideDir="$HOME/.bin/override/$binName" 16 | overrideBin="$overrideDir/$binName" 17 | 18 | if [[ ! -x "$binPath" ]]; then 19 | echo "Error: '$binPath' does not exist or is not executable." 20 | exit 2 21 | fi 22 | 23 | mkdir -p "$overrideDir" 24 | 25 | ln -sf "$binPath" "$overrideBin" 26 | if [[ $? -eq 0 ]]; then 27 | echo "Symlink created: $overrideBin -> $binPath" 28 | else 29 | echo "Failed to create symlink." 30 | exit 3 31 | fi 32 | -------------------------------------------------------------------------------- /shell/display.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 🎨 COLOURS & DISPLAY # 4 | # ------------------- # 5 | # Terminal colour and display settings. # 6 | # # 7 | # ################################################################################ 8 | 9 | export TERM=xterm-256color 10 | export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32' 11 | export CLICOLOR=1 12 | DISPLAY=:0.0; export DISPLAY 13 | -------------------------------------------------------------------------------- /config/cli/github-copilot.yml: -------------------------------------------------------------------------------- 1 | # GitHub Copilot CLI Configuration - Common 2 | # MCP servers for GitHub Copilot CLI (~/.copilot/mcp-config.json) 3 | # Settings applied to all profiles 4 | 5 | # Copilot settings 6 | config: 7 | banner: always 8 | 9 | # Common MCP servers (all profiles) 10 | mcpServers: 11 | basic-memory: 12 | type: local 13 | command: uvx 14 | args: 15 | - basic-memory 16 | - mcp 17 | headers: {} 18 | tools: 19 | - "*" 20 | context7: 21 | type: local 22 | command: mise 23 | args: 24 | - exec 25 | - node@latest 26 | - -- 27 | - npx 28 | - -y 29 | - mcp-remote@latest 30 | - https://mcp.context7.com/mcp 31 | headers: {} 32 | tools: 33 | - "*" 34 | -------------------------------------------------------------------------------- /shell/node.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 🟢 NODE.JS ENVIRONMENT INITIALISATION # 4 | # ------------------------------- # 5 | # Sets up Node.js via mise (unified runtime manager) and configures npm globals.# 6 | # Corepack is disabled for Yarn/PNPM (see config/packages/npm.yml) since # 7 | # Mise already manages package manager versions per-project via mise.toml. # 8 | # # 9 | # ################################################################################ 10 | 11 | -------------------------------------------------------------------------------- /shell/globals.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 🌍 GLOBAL VARIABLES # 4 | # --------------- # 5 | # User and environment global variables. # 6 | # # 7 | # ################################################################################ 8 | 9 | export MY=$HOME/my 10 | export TMP=$HOME/__tmp 11 | export SYNC_FOLDER=$HOME/pCloud 12 | 13 | export GIT_EDITOR="nvim" 14 | export VISUAL="code" 15 | export EDITOR="nvim" 16 | -------------------------------------------------------------------------------- /shell/openssl.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 🔒 OPENSSL ENVIRONMENT # 4 | # --------------------- # 5 | # OpenSSL library and include paths. # 6 | # # 7 | # ################################################################################ 8 | 9 | export LDFLAGS="-L${HOMEBREW_PREFIX}/opt/openssl/lib" 10 | export CPPFLAGS="-I${HOMEBREW_PREFIX}/opt/openssl/include" 11 | export SSL_CERT_FILE=${HOMEBREW_PREFIX}/etc/openssl@3/cert.pem 12 | -------------------------------------------------------------------------------- /profiles/work/core/os/main.zsh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | 4 | ############################################################################### 5 | # General UI/UX # 6 | ############################################################################### 7 | 8 | # sudo scutil --set ComputerName "_kud.work" 9 | sudo scutil --set ComputerName "mest001" 10 | # sudo scutil --set HostName "_kud.work" 11 | sudo scutil --set HostName "mest001" 12 | # sudo scutil --set LocalHostName "kud-work" 13 | sudo scutil --set LocalHostName "mest001" 14 | # sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "kud-work" 15 | sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "mest001" 16 | -------------------------------------------------------------------------------- /bin/git/git-contrib: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # ex: git contrib git@github.com:gajus/create-index.git 4 | 5 | REPO_SPLIT_SLASH=${${1}[(ws:/:)2]} 6 | REPO_SPLIT_DOT=${${REPO_SPLIT_SLASH}[(ws:.:)1]} 7 | REPO=$REPO_SPLIT_DOT 8 | 9 | gh repo fork $1 --clone && 10 | cd $REPO && 11 | 12 | git co -b tmp && 13 | git branch -D $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') 14 | git checkout --orphan $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') && 15 | git branch -D tmp && 16 | git rm -rf . && 17 | rm '.gitignore' &> /dev/null 18 | echo "**Repository used only for submitting PRs. 🙌**" > README.md && 19 | git add README.md && 20 | git commit -a -m "Initial Commit" && 21 | git push -f origin $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') 22 | -------------------------------------------------------------------------------- /shell/homebrew.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 📦 HOMEBREW CASK # 4 | # ----------------- # 5 | # Homebrew Cask options. # 6 | # # 7 | # ################################################################################ 8 | 9 | # Set Homebrew prefix (with fallback for older Intel Macs) 10 | export HOMEBREW_PREFIX="${HOMEBREW_PREFIX:-$(brew --prefix 2>/dev/null || echo /usr/local)}" 11 | export HOMEBREW_CASK_OPTS=--appdir=/Applications 12 | -------------------------------------------------------------------------------- /shell/path/homebrew.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🍺 HOMEBREW PATH SETUP # 4 | # -------------------- # 5 | # Homebrew-related PATH modifications. # 6 | # # 7 | ################################################################################ 8 | 9 | # Homebrew 10 | # export PATH=${HOMEBREW_PREFIX}/sbin:$PATH 11 | export PATH=${HOMEBREW_PREFIX}/opt/curl/bin:$PATH 12 | export PATH=${HOMEBREW_PREFIX}/opt/ruby/bin:$PATH 13 | export PATH=${HOMEBREW_PREFIX}/opt/gnu-sed/libexec/gnubin:$PATH 14 | -------------------------------------------------------------------------------- /shell/path/profiles.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 👤 PROFILES PATH SETUP # 4 | # -------------------- # 5 | # Profile-specific PATH modifications (work, home, etc). # 6 | # # 7 | ################################################################################ 8 | 9 | # Profile-specific bins (requires OS_PROFILE to be set by local.zsh first) 10 | if [[ -n "$OS_PROFILE" ]]; then 11 | export PATH=$MY/profiles/$OS_PROFILE/bin/main:$PATH 12 | export PATH=$MY/profiles/$OS_PROFILE/bin/shims:$PATH 13 | fi 14 | -------------------------------------------------------------------------------- /bin/git/git-packages-create-pr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { $ } from "zx" 4 | $.verbose = true 5 | 6 | import simpleGit from "simple-git" 7 | const git = simpleGit() 8 | 9 | const main = async () => { 10 | const branches = await git.branchLocal() 11 | 12 | const depsBranches = branches.all.filter((branch) => 13 | branch.startsWith("deps/"), 14 | ) 15 | 16 | for (const branch of depsBranches) { 17 | try { 18 | console.log(`Processing branch: ${branch}`) 19 | 20 | await $`git checkout ${branch}` 21 | 22 | await $`git push --set-upstream origin ${branch}` 23 | 24 | await $`gh pr create --title "📦 Upgrade to ${branch.replace( 25 | "deps/", 26 | "", 27 | )}" --body "Enjoy\!" --fill` 28 | } catch (error) { 29 | console.log(error) 30 | } 31 | } 32 | } 33 | 34 | main() 35 | -------------------------------------------------------------------------------- /profiles/home/config/cli/mistral-vibe.yml: -------------------------------------------------------------------------------- 1 | # Mistral Vibe Configuration - Home Profile 2 | # Home-specific settings and MCP servers for Mistral Vibe 3 | 4 | # Profile-specific MCP servers 5 | mcp: 6 | # Personal knowledge base integration 7 | personal-knowledge: 8 | type: local 9 | enabled: true 10 | command: 11 | - uvx 12 | - basic-memory 13 | - mcp 14 | - --project 15 | - personal 16 | 17 | # Home automation MCP (example) 18 | home-automation: 19 | type: remote 20 | enabled: false 21 | url: https://mcp.home-assistant.io/mcp 22 | headers: 23 | Authorization: Bearer ${HOME_AUTOMATION_TOKEN:-} 24 | 25 | # Home profile specific settings 26 | context: 27 | memory_window: 15 # More context for personal projects 28 | 29 | ui: 30 | show_token_count: false # Less clutter for home use -------------------------------------------------------------------------------- /config/cli/abbr.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🚀 ABBREVIATIONS CONFIGURATION # 4 | # ------------------------------- # 5 | # Shell abbreviations for common commands # 6 | # # 7 | ################################################################################ 8 | 9 | abbreviations: 10 | gcm: "git commit -m" 11 | ghrc: 'gh repo create "${PWD##*/}" --source=. --push' 12 | glv: "git lazy-version" 13 | gmg: "git merge" 14 | gp: "git push" 15 | gpo: "git push origin" 16 | gscr: "git switch -c" 17 | ocr: "opencode run" 18 | -------------------------------------------------------------------------------- /shell/path/local.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🏠 LOCAL USER BIN PATH # 4 | # ----------------------- # 5 | # Adds ~/.local/bin (uv, pipx, rust cargo installs, etc.) if present and # 6 | # not already on PATH. Kept separate from project-specific `my` paths. # 7 | # # 8 | ################################################################################ 9 | 10 | if [ -d "$HOME/.local/bin" ]; then 11 | case ":$PATH:" in 12 | *":$HOME/.local/bin:"*) ;; # already present 13 | *) export PATH="$HOME/.local/bin:$PATH" ;; 14 | esac 15 | fi 16 | -------------------------------------------------------------------------------- /config/apps/claude-desktop.yml: -------------------------------------------------------------------------------- 1 | # Claude Desktop Configuration - Common 2 | # MCP servers for Claude Desktop app (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json) 3 | # 4 | # This YAML config maps directly to the JSON format: 5 | # mcp: 6 | # server-name: 7 | # transport: stdio 8 | # command: 9 | # args: 10 | # - 11 | # - 12 | # env: # optional, only include if you need environment variables 13 | # KEY: value 14 | 15 | mcp: 16 | basic-memory: 17 | transport: stdio 18 | command: ${HOME}/.local/share/mise/shims/uvx 19 | args: 20 | - basic-memory 21 | - mcp 22 | context7: 23 | transport: stdio 24 | command: mise 25 | args: 26 | - exec 27 | - node@latest 28 | - -- 29 | - npx 30 | - -y 31 | - mcp-remote@latest 32 | - https://mcp.context7.com/mcp 33 | -------------------------------------------------------------------------------- /shell/syntax-highlighting.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🎨 ZSH SYNTAX HIGHLIGHTING CONFIGURATION # 4 | # ------------------------------------------ # 5 | # Configures zsh-syntax-highlighting plugin styling and patterns. # 6 | # https://github.com/zsh-users/zsh-syntax-highlighting # 7 | # # 8 | ################################################################################ 9 | 10 | if [[ -n "${ZSH_HIGHLIGHT_VERSION:-}" ]]; then 11 | ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern line root) 12 | ZSH_HIGHLIGHT_STYLES[path]='fg=white' 13 | ZSH_HIGHLIGHT_PATTERNS=('rm*-rf*' 'fg=white,bold,bg=red') 14 | fi 15 | -------------------------------------------------------------------------------- /dotfiles/.gitignore_global: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | # it's better to unpack these files and commit the raw source 13 | # git has its own built in compression methods 14 | *.7z 15 | *.dmg 16 | *.gz 17 | *.iso 18 | *.jar 19 | *.rar 20 | *.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | *.sql 27 | *.sqlite 28 | 29 | # OS generated files # 30 | ###################### 31 | .DS_Store? 32 | .DS_Store 33 | ehthumbs.db 34 | Thumbs.db 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Folders # 39 | ############## 40 | cache/ 41 | 42 | # Eclipse files # 43 | ################## 44 | .settings/ 45 | .project 46 | 47 | # Node.js # 48 | ########### 49 | node_modules/ 50 | 51 | # Bower # 52 | ######### 53 | bower-components/ 54 | bower_components/ 55 | 56 | # Claude # 57 | ######### 58 | .claude/ 59 | -------------------------------------------------------------------------------- /core/system/shims.zsh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | 4 | # Check if OS_PROFILE is set 5 | if [[ -z "$OS_PROFILE" ]]; then 6 | exit 1 7 | fi 8 | 9 | # Generate shims for the current active profile only 10 | # Source required utilities for path constants 11 | source $MY/core/utils/helper.zsh 12 | 13 | shims_dir="$PROFILE_DIR/bin/shims" 14 | 15 | 16 | # Create shims directory if it doesn't exist 17 | mkdir -p "$shims_dir" 18 | 19 | # Clean existing shims (only if files exist) 20 | if [[ -n "$(ls -A "$shims_dir" 2>/dev/null)" ]]; then 21 | rm -rf "$shims_dir"/* 22 | fi 23 | 24 | app_count=0 25 | 26 | for app in /Applications/*.app 27 | do 28 | finalName=`echo ${${${app// /-}/\/Applications\//}//.app/} | tr '[:upper:]' '[:lower:]'` 29 | echo "#! /usr/bin/env zsh\nopen -a \"${app}\"" \$@ > "$shims_dir/open-${finalName}" 30 | app_count=$((app_count + 1)) 31 | done 32 | 33 | # Set executable permissions 34 | chmod +x "$shims_dir"/* 35 | 36 | 37 | -------------------------------------------------------------------------------- /bin/git/git-config-local-global: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # Simple alias wrapper: git-config-local-global -> git config --file ~/.gitconfig_local "$@" 3 | # Use native git subcommands/flags directly, e.g.: 4 | # git-config-local-global user.name "Jane Doe" 5 | # git-config-local-global --get user.name 6 | # git-config-local-global includeIf."gitdir:~/Projects/work/".path .gitconfig_local_work 7 | 8 | set -euo pipefail 9 | FILE=${GIT_LOCAL_GLOBAL_FILE:-"$HOME/.gitconfig_local"} 10 | [[ -f $FILE ]] || touch "$FILE" 11 | 12 | if [[ ${1:-} == help || ${1:-} == -h || ${1:-} == --help ]]; then 13 | cat <<'EOF' 14 | git-config-local-global (pass-through to: git config --file ~/.gitconfig_local) 15 | Examples: 16 | git-config-local-global user.email "me@example.com" 17 | git-config-local-global --get user.email 18 | git-config-local-global --unset user.email 19 | git-config-local-global --list 20 | EOF 21 | exit 0 22 | fi 23 | 24 | exec git config --file "$FILE" "$@" 25 | -------------------------------------------------------------------------------- /shell/profile.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 👤 PROFILE-SPECIFIC CONFIGURATION # 4 | # ----------------------------------- # 5 | # Loads profile-specific shell configurations (home/work). # 6 | # # 7 | ################################################################################ 8 | 9 | # Load profile-specific shell functions and configurations 10 | if [[ -n "$OS_PROFILE" && -d "$MY/profiles/$OS_PROFILE/shell" ]]; then 11 | for profile_module in "$MY/profiles/$OS_PROFILE/shell"/*.zsh; do 12 | [[ -f "$profile_module" ]] && source "$profile_module" 13 | done 14 | fi 15 | 16 | ################################################################################ 17 | -------------------------------------------------------------------------------- /config/system/symlinks.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🔗 SYMLINK CONFIGURATION # 4 | # ------------------------- # 5 | # Defines symbolic links for synchronized folders and application data # 6 | # # 7 | ################################################################################ 8 | 9 | symlinks: 10 | # Screenshots directory 11 | screenshots: 12 | source: "${SYNC_FOLDER}/Screenshots" 13 | target: "~/Screenshots" 14 | description: "Screenshots directory" 15 | 16 | # Espanso text expander 17 | espanso: 18 | source: "${SYNC_FOLDER}/Appdata/espanso/espanso" 19 | target: "~/Library/Application Support/espanso" 20 | description: "Espanso text expander configuration" 21 | -------------------------------------------------------------------------------- /shell/mise.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🧰 MISE RUNTIME MANAGER INITIALISATION # 4 | # ------------------------------------- # 5 | # Centralised activation for all toolchain runtimes managed by mise. # 6 | # This replaces per-language activation blocks in node/python/ruby scripts. # 7 | # # 8 | ################################################################################ 9 | 10 | # Activate mise only once per interactive shell to provide shims for 11 | # configured runtimes (node, python, ruby, etc.). Guard with interactivity 12 | # to avoid overhead in non-interactive subshells (e.g. CI hooks, scripts). 13 | if [[ $- == *i* ]] && command -v mise >/dev/null 2>&1; then 14 | eval "$(mise activate zsh)" 15 | fi 16 | -------------------------------------------------------------------------------- /shell/java.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # ☕ JAVA ENVIRONMENT INITIALIZATION # 4 | # ------------------------------- # 5 | 6 | # # 7 | ################################################################################ 8 | 9 | # Helper function to derive JAVA_HOME from a java binary path 10 | derive_java_home() { 11 | dirname "$(dirname "$1")" 12 | } 13 | 14 | # Java via mise; derive JAVA_HOME dynamically each interactive shell 15 | if command -v mise >/dev/null 2>&1; then 16 | if JAVA_PATH=$(mise which java 2>/dev/null); then 17 | export JAVA_HOME="$(derive_java_home "$JAVA_PATH")" 18 | fi 19 | elif command -v java >/dev/null 2>&1; then 20 | JAVA_BIN=$(command -v java) 21 | export JAVA_HOME="$(derive_java_home "$JAVA_BIN")" 22 | fi 23 | -------------------------------------------------------------------------------- /bin/git/git-packages-upgrade: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { $, cd } from "zx" 4 | $.verbose = true 5 | import simpleGit from "simple-git" 6 | const git = simpleGit() 7 | 8 | const upgradePackage = async ({ name, latest }) => { 9 | try { 10 | const branchName = `deps/${name}@${latest}` 11 | 12 | await git.checkout("master") 13 | await git.checkoutLocalBranch(branchName) 14 | 15 | await $`yarn add ${name}@${latest}` 16 | 17 | await git.add("./*") 18 | await git.commit(`📦️ Upgrade to ${name}@${latest}`) 19 | 20 | await git.checkout("master") 21 | } catch (error) { 22 | console.log(error) 23 | } 24 | } 25 | 26 | const main = async () => { 27 | try { 28 | await $`npm outdated --json` 29 | } catch (error) { 30 | const outdatedPackages = JSON.parse(error.stdout) 31 | 32 | const pkgs = Object.entries(outdatedPackages).map(([key, value]) => { 33 | return { name: key, ...value } 34 | }) 35 | 36 | for (const pkg of pkgs) { 37 | await upgradePackage(pkg) 38 | } 39 | } 40 | } 41 | 42 | main() 43 | -------------------------------------------------------------------------------- /shell/limits.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 🚦 RESOURCE LIMITS # 4 | # ------------------- # 5 | # System resource limits for development tools like Watchman, Metro, and # 6 | # React Native. Works in conjunction with system-wide LaunchDaemon limits. # 7 | # # 8 | # ################################################################################ 9 | 10 | # Set file descriptor limit for this shell session 11 | # This works with the system-wide limits set by core/system/limits.zsh 12 | target=65536 13 | hard=$(ulimit -Hn) 14 | # Validate that $hard is numeric before comparison 15 | if [ "$hard" != "unlimited" ] && [[ "$hard" =~ ^[0-9]+$ ]]; then 16 | [ "$target" -gt "$hard" ] && target="$hard" 17 | fi 18 | ulimit -n "$target" 19 | -------------------------------------------------------------------------------- /shell/path/my.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🔧 MY BINS PATH SETUP # 4 | # ------------------- # 5 | # Custom bin directories for personal tools and utilities. # 6 | # # 7 | ################################################################################ 8 | 9 | # Own commands 10 | export PATH=$MY/bin:$PATH 11 | 12 | # Own utilities 13 | export PATH=$MY/bin/main:$PATH 14 | 15 | # Git commands 16 | export PATH=$MY/bin/git:$PATH 17 | 18 | # Profile-specific bins (requires OS_PROFILE to be set by local.zsh first) 19 | if [[ -n "$OS_PROFILE" ]]; then 20 | export PATH=$MY/profiles/$OS_PROFILE/bin/main:$PATH 21 | export PATH=$MY/profiles/$OS_PROFILE/bin/shims:$PATH 22 | fi 23 | ################################################################################ 24 | 25 | -------------------------------------------------------------------------------- /profiles/work/config/cli/codex.yml: -------------------------------------------------------------------------------- 1 | # Codex CLI Configuration - Work Profile 2 | # Extends the shared Codex config with additional MCP servers used at work. 3 | 4 | mcp_servers: 5 | atlassian: 6 | url: https://mcp.atlassian.com/v1/sse 7 | sentry: 8 | command: mise 9 | args: 10 | - exec 11 | - node@latest 12 | - -- 13 | - npx 14 | - -y 15 | - mcp-remote@latest 16 | - https://mcp.sentry.dev/mcp 17 | figma: 18 | url: https://mcp.figma.com/mcp 19 | # figma-local: 20 | # url: http://127.0.0.1:3845/mcp 21 | # jenkins: 22 | # command: npx 23 | # args: 24 | # - --yes 25 | # - "@kud/mcp-jenkins@latest" 26 | # env: 27 | # JENKINS_URL: ${MCP_JENKINS_URL} 28 | # JENKINS_USER: ${MCP_JENKINS_USER} 29 | # JENKINS_API_TOKEN: ${MCP_JENKINS_API_TOKEN} 30 | # datadog: 31 | # command: npx 32 | # args: 33 | # - --yes 34 | # - "@kud/mcp-datadog@latest" 35 | # env: 36 | # DD_API_KEY: ${MCP_DATADOG_API_KEY} 37 | # DD_APP_KEY: ${MCP_DATADOG_APP_KEY} 38 | # DD_SITE: ${MCP_DATADOG_SITE} 39 | -------------------------------------------------------------------------------- /bin/main/tmp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Source helper functions 4 | source "${MY}/core/utils/helper.zsh" 5 | 6 | # Display help message 7 | show_help() { 8 | show_command_help "tmp" "Temporary file manager" \ 9 | "tmp [|--help]" \ 10 | "open:Open tmp folder" \ 11 | "clean:Clean tmp folder" \ 12 | "move:Move files/folder to tmp folder" 13 | } 14 | 15 | main() { 16 | # If no arguments, display help. 17 | if [[ $# -eq 0 ]]; then 18 | show_help 19 | return 20 | fi 21 | 22 | # Handle help flag 23 | handle_help_flag "$1" 24 | 25 | case "$1" in 26 | clean) 27 | # Move files to trash 28 | find ~/__tmp/ -type f -exec trash {} \; 29 | ;; 30 | open) 31 | # Open the temp directory 32 | open ~/__tmp 33 | ;; 34 | from) 35 | # Check if second argument exists 36 | if [[ -z "$2" ]]; then 37 | echo "Specify a file or folder to move." 38 | return 39 | fi 40 | mv "$2" ~/__tmp/ 41 | ;; 42 | *) 43 | echo 'Invalid command. Use --help for usage.' 44 | ;; 45 | esac 46 | } 47 | 48 | # Call the main function with provided arguments. 49 | main "$@" 50 | -------------------------------------------------------------------------------- /shell/antidote.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # � ANTIDOTE PLUGIN MANAGER INITIALISATION # 4 | # ------------------------------------------ # 5 | # Loads and manages Zsh plugins using Antidote. # 6 | # https://getantidote.github.io/antidote/ # 7 | # # 8 | # ################################################################################ 9 | 10 | zsh_plugins_txt="$MY/shell/plugins.txt" 11 | zsh_plugins_zsh="$HOME/.zsh_plugins.zsh" 12 | 13 | [[ -f "$zsh_plugins_txt" ]] || touch "$zsh_plugins_txt" 14 | 15 | fpath=( $HOMEBREW_PREFIX/share/antidote/functions $fpath ) 16 | autoload -Uz antidote 17 | 18 | if [[ ! -f "$zsh_plugins_zsh" || "$zsh_plugins_txt" -nt "$zsh_plugins_zsh" ]]; then 19 | antidote bundle <"$zsh_plugins_txt" >! "$zsh_plugins_zsh" 20 | fi 21 | 22 | source "$zsh_plugins_zsh" 23 | -------------------------------------------------------------------------------- /dotfiles/biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", 3 | "organizeImports": { 4 | "enabled": true 5 | }, 6 | "files": { 7 | "ignore": [ 8 | "node_modules/**", 9 | "dist/**", 10 | "build/**", 11 | ".next/**", 12 | "coverage/**", 13 | ".git/**" 14 | ] 15 | }, 16 | "formatter": { 17 | "enabled": true, 18 | "indentStyle": "space", 19 | "indentWidth": 2, 20 | "lineWidth": 80, 21 | "formatWithErrors": false 22 | }, 23 | "javascript": { 24 | "formatter": { 25 | "quoteStyle": "double", 26 | "trailingCommas": "all", 27 | "semicolons": "asNeeded", 28 | "arrowParentheses": "always", 29 | "bracketSpacing": true, 30 | "bracketSameLine": false 31 | } 32 | }, 33 | "json": { 34 | "formatter": { 35 | "trailingCommas": "none" 36 | } 37 | }, 38 | "linter": { 39 | "enabled": true, 40 | "rules": { 41 | "recommended": true, 42 | "style": { 43 | "noNonNullAssertion": "off" 44 | }, 45 | "suspicious": { 46 | "noExplicitAny": "off" 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /config/cli/mistral-vibe.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🤖 MISTRAL VIBE CONFIGURATION # 4 | # ----------------------------- # 5 | # Simple YAML config for Mistral Vibe theme and MCP servers # 6 | # # 7 | ################################################################################ 8 | 9 | # Theme configuration 10 | theme: "tokyo-night" 11 | 12 | # MCP Servers configuration 13 | mcp_servers: 14 | - name: "github" 15 | transport: "http" 16 | url: "https://api.githubcopilot.com/mcp" 17 | headers: 18 | Authorization: "Bearer ${MCP_GITHUB_TOKEN}" 19 | 20 | - name: "basic-memory" 21 | transport: "stdio" 22 | command: ["uvx", "basic-memory", "mcp"] 23 | 24 | - name: "notion" 25 | transport: "http" 26 | url: "https://mcp.notion.com/mcp" 27 | 28 | - name: "context7" 29 | transport: "http" 30 | url: "https://mcp.context7.com/mcp" -------------------------------------------------------------------------------- /profiles/work/config/cli/claude-code.yml: -------------------------------------------------------------------------------- 1 | # Claude Code Configuration - Work Profile 2 | # Profile-specific MCP server settings for work usage 3 | 4 | # MCP Servers 5 | mcp: 6 | atlassian: 7 | transport: sse 8 | url: https://mcp.atlassian.com/v1/sse 9 | sentry: 10 | transport: stdio 11 | command: mise 12 | args: 13 | - exec 14 | - node@latest 15 | - -- 16 | - npx 17 | - -y 18 | - mcp-remote@latest 19 | - https://mcp.sentry.dev/mcp 20 | figma: 21 | transport: http 22 | url: https://mcp.figma.com/mcp 23 | # figma-local: 24 | # transport: http 25 | # url: http://127.0.0.1:3845/mcp 26 | jenkins: 27 | transport: stdio 28 | command: npx 29 | args: 30 | - --yes 31 | - "@kud/mcp-jenkins@latest" 32 | env: 33 | JENKINS_URL: ${MCP_JENKINS_URL} 34 | JENKINS_USER: ${MCP_JENKINS_USER} 35 | JENKINS_API_TOKEN: ${MCP_JENKINS_API_TOKEN} 36 | datadog: 37 | transport: stdio 38 | command: npx 39 | args: 40 | - --yes 41 | - "@kud/mcp-datadog@latest" 42 | env: 43 | DD_API_KEY: ${MCP_DATADOG_API_KEY} 44 | DD_APP_KEY: ${MCP_DATADOG_APP_KEY} 45 | DD_SITE: ${MCP_DATADOG_SITE} 46 | -------------------------------------------------------------------------------- /config/apps/keepassxc.yml: -------------------------------------------------------------------------------- 1 | # KeePassXC Configuration 2 | 3 | # General Settings 4 | General: 5 | autoTypeEntryTitleMatch: false 6 | autoTypeEntryURLMatch: false 7 | configVersion: 2 8 | globalAutoTypeKey: 0 9 | globalAutoTypeModifiers: 0 10 | minimizeAfterUnlock: false 11 | minimizeOnOpenUrl: false 12 | updateCheckMessageShown: true 13 | 14 | # GUI Settings 15 | GUI: 16 | applicationTheme: "dark" 17 | trayIconAppearance: "monochrome" 18 | compactMode: true 19 | minimizeOnStartup: true 20 | hidePasswords: false 21 | hidePreviewPanel: true 22 | hideToolbar: false 23 | hideUsernames: false 24 | toolButtonStyle: 0 25 | 26 | # Browser Integration Settings 27 | Browser: 28 | enabled: true 29 | customProxyLocation: "" 30 | bestMatchOnly: true 31 | 32 | # Password Generator Settings 33 | PasswordGenerator: 34 | additionalChars: "_-&@$%^" 35 | advancedMode: true 36 | excludedChars: "" 37 | length: 26 38 | logograms: false 39 | specialChars: true 40 | type: 0 41 | wordCount: 4 42 | wordSeparator: "-" 43 | wordCase: 2 44 | 45 | # Security Settings 46 | Security: 47 | iconDownloadFallback: true 48 | autotypeAsk: false 49 | lockDatabaseIdle: true 50 | lockDatabaseIdleSeconds: 300 51 | -------------------------------------------------------------------------------- /shell/editor.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # ⌨️ EDITOR CONFIGURATION # 4 | # ---------------------- # 5 | # Vi mode key bindings and editor settings for enhanced terminal experience. # 6 | # # 7 | ################################################################################ 8 | 9 | # Vi key bindings 10 | bindkey -v 11 | 12 | # Editor options 13 | WORDCHARS='*?_-.[]~&;!#$%^(){}<>' 14 | 15 | # Vi mode fixes 16 | bindkey -M vicmd 'x' delete-char 17 | bindkey -M viins '^?' backward-delete-char 18 | 19 | # Arrow keys in vi insert mode 20 | bindkey -M viins '^[[A' up-line-or-history 21 | bindkey -M viins '^[[B' down-line-or-history 22 | bindkey -M viins '^[[C' forward-char 23 | bindkey -M viins '^[[D' backward-char 24 | 25 | # Home/End keys 26 | bindkey -M viins '^[[H' beginning-of-line 27 | bindkey -M viins '^[[F' end-of-line 28 | bindkey -M vicmd '^[[H' beginning-of-line 29 | bindkey -M vicmd '^[[F' end-of-line 30 | -------------------------------------------------------------------------------- /shell/cursor.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # 🖲️ CURSOR CONFIGURATION # 4 | # --------------------- # 5 | # Sets terminal cursor style and behavior for improved visual experience. # 6 | # # 7 | # ################################################################################ 8 | 9 | echo -ne '\e[5 q' 10 | 11 | # Restore a hidden cursor on prompt redraw; some TUIs forget to reset it. 12 | if [[ -z ${__MY_CURSOR_RESTORE_HOOK:-} ]]; then 13 | __MY_CURSOR_RESTORE_HOOK=1 14 | 15 | autoload -Uz add-zsh-hook 16 | 17 | typeset -ga __MY_CURSOR_RESTORE_CMD 18 | if command -v tput >/dev/null 2>&1; then 19 | __MY_CURSOR_RESTORE_CMD=(tput cnorm) 20 | else 21 | __MY_CURSOR_RESTORE_CMD=(printf '\e[?25h') 22 | fi 23 | 24 | function __my_ensure_cursor_visible() { 25 | "${__MY_CURSOR_RESTORE_CMD[@]}" 2>/dev/null || true 26 | } 27 | 28 | add-zsh-hook precmd __my_ensure_cursor_visible 29 | fi 30 | -------------------------------------------------------------------------------- /bin/git/git-root: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # git-root - Display the path to the git working tree root 4 | # 5 | # Usage: 6 | # git-root # Display git root path 7 | # cd $(git-root) # Navigate to git root 8 | # git-root --help # Show help 9 | # 10 | # Examples: 11 | # git-root # → /Users/kud/my 12 | # cd $(git-root) # → changes to git root 13 | # code $(git-root) # → open git root in editor 14 | # 15 | # Returns: 16 | # - Absolute path to git working tree root 17 | # - Empty output if not in a git repository 18 | # - Exit code 0 on success, 1 on error 19 | 20 | # Source helper functions 21 | source "${MY}/core/utils/helper.zsh" 22 | 23 | # Help function 24 | show_help() { 25 | show_command_help "git-root" "Display the path to the git working tree root" \ 26 | "git-root [--help]" \ 27 | "Example: git-root → /Users/user/project" 28 | } 29 | 30 | # Check for help flag first 31 | handle_help_flag "$1" 32 | 33 | # Get git root using rev-parse --show-toplevel 34 | root=$(git rev-parse --show-toplevel 2>/dev/null) 35 | 36 | if [[ $? -eq 0 && -n "$root" ]]; then 37 | echo "$root" 38 | exit 0 39 | else 40 | # Not in a git repository - exit silently with error code 41 | exit 1 42 | fi 43 | -------------------------------------------------------------------------------- /bin/git/git-dir: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # git-dir - Display the path to the .git directory 4 | # 5 | # Usage: 6 | # git-dir # Display .git directory path 7 | # ls $(git-dir)/hooks # List git hooks 8 | # git-dir --help # Show help 9 | # 10 | # Examples: 11 | # git-dir # → /Users/kud/my/.git 12 | # ls $(git-dir)/hooks # → list git hooks 13 | # cat $(git-dir)/config # → show git config 14 | # 15 | # Returns: 16 | # - Absolute path to .git directory 17 | # - Empty output if not in a git repository 18 | # - Exit code 0 on success, 1 on error 19 | 20 | # Source helper functions 21 | source "${MY}/core/utils/helper.zsh" 22 | 23 | # Help function 24 | show_help() { 25 | show_command_help "git-dir" "Display the path to the .git directory" \ 26 | "git-dir [--help]" \ 27 | "Example: git-dir → /Users/user/project/.git" 28 | } 29 | 30 | # Check for help flag first 31 | handle_help_flag "$1" 32 | 33 | # Get git directory using rev-parse --git-dir and resolve to absolute path 34 | git_dir=$(git rev-parse --git-dir 2>/dev/null) 35 | 36 | if [[ $? -eq 0 && -n "$git_dir" ]]; then 37 | # Convert to absolute path 38 | echo "${git_dir:A}" 39 | exit 0 40 | else 41 | # Not in a git repository - exit silently with error code 42 | exit 1 43 | fi 44 | -------------------------------------------------------------------------------- /bin/git/git-first-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Ultra-simple first commit helper: fixed conventional + gitmoji title. 4 | # Usage: 5 | # git first-commit 6 | # (Any arguments are ignored; title is always the same.) 7 | 8 | set -euo pipefail 9 | 10 | # Always use UI kit (environment assumed to provide MY + file) 11 | source "$MY/core/utils/ui-kit.zsh" 12 | 13 | if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 14 | ui_error_msg "Not a git repository" 15 | exit 1 16 | fi 17 | 18 | HEADER="🎉 init: initial commit" 19 | 20 | # Build a fun multi-line commit message in a temp file 21 | tmp_file=$(mktemp /tmp/first-commit-msg.XXXXXX) 22 | project_name=$(basename "$(pwd)") 23 | now=$(date '+%Y-%m-%d %H:%M:%S') 24 | author=${GIT_AUTHOR_NAME:-$USER} 25 | 26 | cat > "$tmp_file" < Run a specific component: 48 | Apps: firefox, keepassxc, pcloud, sublime-merge 49 | CLI: abbr, ssh 50 | Packages: antidote, brew, gh, gem, mas, npm, pip 51 | System: default-folders, doc, dotfiles, edit, open, os, shims, submodules, symlinks 52 | ``` 53 | -------------------------------------------------------------------------------- /config/cli/codex.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🧠 CODEX CLI CONFIGURATION # 4 | # --------------------------- # 5 | # Defines default Codex CLI settings, including MCP server registrations. # 6 | # This YAML is rendered to TOML by core/cli/codex.zsh. # 7 | # # 8 | ################################################################################ 9 | 10 | model: "gpt-5.1-codex-max" 11 | 12 | features: 13 | rmcp_client: true 14 | 15 | mcp_servers: 16 | github: 17 | command: mise 18 | args: 19 | - exec 20 | - node@latest 21 | - -- 22 | - npx 23 | - -y 24 | - mcp-remote@latest 25 | - https://api.githubcopilot.com/mcp 26 | - --header 27 | - "Authorization: Bearer ${MCP_GITHUB_TOKEN}" 28 | - --name 29 | - github 30 | - --transport 31 | - http-first 32 | env: {} 33 | notion: 34 | url: https://mcp.notion.com/mcp 35 | basic-memory: 36 | command: bash 37 | args: 38 | - -c 39 | - "uvx basic-memory mcp" 40 | env: {} 41 | context7: 42 | url: https://mcp.context7.com/mcp 43 | -------------------------------------------------------------------------------- /shell/bindings.zsh: -------------------------------------------------------------------------------- 1 | # ################################################################################ 2 | # # 3 | # ⌨️ KEY BINDINGS # 4 | # ------------ # 5 | # Custom Zsh key bindings for improved usability. # 6 | # # 7 | # ################################################################################ 8 | 9 | # Text transformation functions 10 | function _mtxr-to-upper { 11 | LBUFFER=${LBUFFER:u} 12 | } 13 | zle -N _mtxr-to-upper 14 | 15 | function _mtxr-to-lower { 16 | LBUFFER=${LBUFFER:l} 17 | } 18 | zle -N _mtxr-to-lower 19 | 20 | # Dot expansion function - auto-expand .... to ../.. 21 | function expand-dot-to-parent-directory-path { 22 | if [[ $LBUFFER = *.. ]]; then 23 | LBUFFER+='/..' 24 | else 25 | LBUFFER+='.' 26 | fi 27 | } 28 | zle -N expand-dot-to-parent-directory-path 29 | 30 | # General key bindings 31 | bindkey -r '^K' # Remove Ctrl+K binding (normally kills text to end of line) to prevent accidental deletion 32 | bindkey '^R' history-incremental-search-backward 33 | bindkey '^K^U' _mtxr-to-upper 34 | bindkey '^K^L' _mtxr-to-lower 35 | bindkey "." expand-dot-to-parent-directory-path 36 | -------------------------------------------------------------------------------- /bin/main/list-background-login-items: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import fs from "fs" 4 | import os from "os" 5 | import path from "path" 6 | import Table from "cli-table3" 7 | import plist from "simple-plist" 8 | 9 | const systemPath = "/Library/LaunchAgents/" 10 | const userPath = path.join(os.homedir(), "/Library/LaunchAgents/") 11 | 12 | const lookupFolders = [ 13 | { path: systemPath, source: "System" }, 14 | { path: userPath, source: "User" }, 15 | ] 16 | 17 | const table = new Table({ 18 | head: ["File", "Program", "Source"], 19 | colWidths: [40, 120, 20], 20 | wordWrap: true, 21 | }) 22 | 23 | const allFiles = [] 24 | 25 | for (const folder of lookupFolders) { 26 | const files = fs 27 | .readdirSync(folder.path) 28 | .map((file) => ({ file, folderPath: folder.path, source: folder.source })) 29 | allFiles.push(...files) 30 | } 31 | 32 | allFiles.sort((a, b) => { 33 | return a.file.localeCompare(b.file) 34 | }) 35 | 36 | for (const fileInfo of allFiles) { 37 | const filePath = path.join(fileInfo.folderPath, fileInfo.file) 38 | const parsedPlist = plist.readFileSync(filePath) 39 | 40 | let program = parsedPlist.Program 41 | if (parsedPlist.ProgramArguments) { 42 | program = parsedPlist.ProgramArguments.map((arg) => `${arg}`).join("\n") 43 | } 44 | 45 | if (program) { 46 | table.push([fileInfo.file, program, fileInfo.source]) 47 | } 48 | } 49 | 50 | console.log(table.toString()) 51 | -------------------------------------------------------------------------------- /shell/directory.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 📁 DIRECTORY OPTIONS # 4 | # ------------------ # 5 | # Directory navigation and options configuration. # 6 | # Sets directory options for enhanced navigation. # 7 | # # 8 | ################################################################################ 9 | 10 | setopt AUTO_CD # Auto changes to a directory without typing cd. 11 | setopt AUTO_PUSHD # Push the old directory onto the stack on cd. 12 | setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack. 13 | setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd. 14 | setopt PUSHD_TO_HOME # Push to home directory when no argument is given. 15 | setopt CDABLE_VARS # Change directory to a path stored in a variable. 16 | setopt MULTIOS # Write to multiple descriptors. 17 | setopt EXTENDED_GLOB # Use extended globbing syntax. 18 | unsetopt CLOBBER # Do not overwrite existing files with > and >>. 19 | # Use >! and >>! to bypass. 20 | -------------------------------------------------------------------------------- /shell/local.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🏠 LOCAL CONFIGURATION SETUP # 4 | # ------------------------------ # 5 | # Handles local machine configuration and OS profile setup. # 6 | # # 7 | ################################################################################ 8 | 9 | if [[ ! -f "$HOME/.config/zsh/local.zsh" ]]; then 10 | mkdir -p "$HOME/.config/zsh" 11 | echo "# Local machine configuration" > "$HOME/.config/zsh/local.zsh" 12 | echo "# Add machine-specific settings here" >> "$HOME/.config/zsh/local.zsh" 13 | echo "" >> "$HOME/.config/zsh/local.zsh" 14 | 15 | if [[ -z "$OS_PROFILE" && "$-" == *i* && -t 0 && -t 1 ]]; then 16 | echo "Setting up local configuration..." 17 | while true; do 18 | read "?Enter the profile of this computer (home/work): " OS_PROFILE 19 | if [[ "$OS_PROFILE" == "home" || "$OS_PROFILE" == "work" ]]; then 20 | echo "export OS_PROFILE=$OS_PROFILE" >> "$HOME/.config/zsh/local.zsh" 21 | break 22 | else 23 | echo "Invalid input, please enter either 'home' or 'work'" 24 | fi 25 | done 26 | fi 27 | fi 28 | 29 | [[ -f $HOME/.config/zsh/local.zsh ]] && source $HOME/.config/zsh/local.zsh 30 | -------------------------------------------------------------------------------- /config/cli/opencode.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🧪 OPENCODE CONFIGURATION # 4 | # ------------------------- # 5 | # Settings to generate ~/.config/opencode/opencode.jsonc for the opencode # 6 | # CLI / UI. Values here are written out as JSONC with schema + comments. # 7 | # # 8 | ################################################################################ 9 | 10 | $schema: https://opencode.ai/config.json 11 | 12 | theme: tokyonight 13 | model: github-copilot/gpt-5.2 14 | autoupdate: true 15 | 16 | # MCP servers (all profiles) 17 | mcp: 18 | github: 19 | type: remote 20 | enabled: true 21 | url: https://api.githubcopilot.com/mcp 22 | headers: 23 | Authorization: Bearer ${MCP_GITHUB_TOKEN} 24 | notion: 25 | type: local 26 | enabled: false 27 | command: 28 | - mise 29 | - exec 30 | - node@latest 31 | - -- 32 | - npx 33 | - -y 34 | - mcp-remote@latest 35 | - https://mcp.notion.com/mcp 36 | basic-memory: 37 | type: local 38 | enabled: true 39 | command: 40 | - uvx 41 | - basic-memory 42 | - mcp 43 | context7: 44 | type: remote 45 | enabled: false 46 | url: https://mcp.context7.com/mcp 47 | -------------------------------------------------------------------------------- /core/packages/gem.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ################################################################################ 4 | # # 5 | # 💎 RUBY GEM MANAGER # 6 | # ------------------ # 7 | # Manages Ruby gems installation and updates for development tools. # 8 | # Installs essential gems for modern Ruby development workflow. # 9 | # # 10 | ################################################################################ 11 | 12 | # Source required utilities 13 | source $MY/core/utils/helper.zsh 14 | source $MY/core/utils/packages.zsh 15 | source $MY/core/utils/ui-kit.zsh 16 | 17 | # Check if Ruby and gem are available 18 | ensure_command_available "gem" "Install Ruby from https://ruby-lang.org" 19 | 20 | # Ensure yq is installed 21 | ensure_command_available "yq" "Install with: brew install yq" 22 | 23 | # Update gem system first 24 | ui_subsection "Updating gem system" 25 | gem update --system 26 | ui_success_simple "Gem system updated" 1 27 | 28 | ui_spacer 29 | 30 | ui_subsection "Updating installed gems" 31 | gem update 32 | ui_success_simple "Installed gems updated" 1 33 | 34 | ui_spacer 35 | 36 | # Process gem packages using shared utilities 37 | ui_subsection "Installing development gems" 38 | process_package_configs "gem" "gem_install" 39 | ui_success_simple "Development gems installation completed" 1 40 | 41 | -------------------------------------------------------------------------------- /profiles/work/config/cli/opencode.yml: -------------------------------------------------------------------------------- 1 | # OpenCode Configuration - Work Profile 2 | # Profile-specific MCP server settings for work usage 3 | 4 | # MCP Servers 5 | mcp: 6 | atlassian: 7 | type: local 8 | enabled: true 9 | command: 10 | - mise 11 | - exec 12 | - node@latest 13 | - -- 14 | - npx 15 | - -y 16 | - mcp-remote@latest 17 | - https://mcp.atlassian.com/v1/sse 18 | sentry: 19 | type: local 20 | enabled: false 21 | command: 22 | - mise 23 | - exec 24 | - node@latest 25 | - -- 26 | - npx 27 | - -y 28 | - mcp-remote@latest 29 | - https://mcp.sentry.dev/mcp 30 | figma: 31 | type: local 32 | enabled: false 33 | command: 34 | - mise 35 | - exec 36 | - node@latest 37 | - -- 38 | - npx 39 | - -y 40 | - mcp-remote@latest 41 | - https://mcp.figma.com/mcp 42 | # figma-local: 43 | # type: remote 44 | # enabled: true 45 | # url: http://127.0.0.1:3845/mcp 46 | jenkins: 47 | type: local 48 | enabled: true 49 | command: 50 | - npx 51 | - --yes 52 | - "@kud/mcp-jenkins@latest" 53 | environment: 54 | JENKINS_URL: ${MCP_JENKINS_URL} 55 | JENKINS_USER: ${MCP_JENKINS_USER} 56 | JENKINS_API_TOKEN: ${MCP_JENKINS_API_TOKEN} 57 | datadog: 58 | type: local 59 | enabled: false 60 | command: 61 | - npx 62 | - --yes 63 | - "@kud/mcp-datadog@latest" 64 | environment: 65 | DD_API_KEY: ${MCP_DATADOG_API_KEY} 66 | DD_APP_KEY: ${MCP_DATADOG_APP_KEY} 67 | DD_SITE: ${MCP_DATADOG_SITE} 68 | -------------------------------------------------------------------------------- /bin/main/delete-manager: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | source "${MY}/core/utils/helper.zsh" 4 | 5 | asl() { 6 | echo_title "Deleting ASL..." 7 | if sudo rm -rf /var/log/asl/*.asl; then 8 | echo_success "ASL logs deleted." 9 | else 10 | echo_error "Failed to delete ASL logs." 11 | fi 12 | } 13 | 14 | dsstore() { 15 | echo_title "Deleting .DS_Store..." 16 | if find . -name '*.DS_Store' -type f -delete; then 17 | echo_success ".DS_Store files deleted." 18 | else 19 | echo_error "Failed to delete .DS_Store files." 20 | fi 21 | } 22 | 23 | screenshots() { 24 | echo_title "Deleting screenshots..." 25 | if rm -f "${HOME}/Screenshots/"*; then 26 | echo_success "Screenshots deleted." 27 | else 28 | echo_error "Failed to delete screenshots." 29 | fi 30 | } 31 | 32 | if [[ $# -eq 0 ]]; then 33 | $0 --help 34 | else 35 | case "$1" in 36 | asl) 37 | asl 38 | ;; 39 | dsstore) 40 | dsstore 41 | ;; 42 | screenshots) 43 | screenshots 44 | ;; 45 | --help) 46 | echo_space 47 | printf "Usage:" 48 | echo_spacex2 49 | printf " ${COLOUR_CYAN}delete${COLOUR_RESET} [|--help]" 50 | echo_spacex3 51 | printf "Commands:" 52 | echo_spacex2 53 | printf " asl ${COLOUR_BLACK}Delete ASL logs${COLOUR_RESET}" 54 | echo_space 55 | printf " dsstore ${COLOUR_BLACK}Delete .DS_Store files in the current directory${COLOUR_RESET}" 56 | echo_space 57 | printf " screenshots ${COLOUR_BLACK}Delete screenshots${COLOUR_RESET}" 58 | echo_spacex2 59 | ;; 60 | *) 61 | echo 'Invalid command. Use --help for usage.' 62 | ;; 63 | esac 64 | fi 65 | -------------------------------------------------------------------------------- /themes/split-diffs/claude-code-colorblind.json: -------------------------------------------------------------------------------- 1 | { 2 | "BORDER_COLOR": { 3 | "color": "#ffcc0266", 4 | "modifiers": ["dim"] 5 | }, 6 | "COMMIT_AUTHOR_COLOR": { 7 | "color": "#ffffff" 8 | }, 9 | "COMMIT_DATE_COLOR": { 10 | "color": "#ffffff" 11 | }, 12 | "COMMIT_HEADER_COLOR": { 13 | "color": "#ffffff" 14 | }, 15 | "COMMIT_HEADER_LABEL_COLOR": { 16 | "color": "#ffffff22" 17 | }, 18 | "COMMIT_MESSAGE_COLOR": { 19 | "color": "#ffffff" 20 | }, 21 | "COMMIT_SHA_COLOR": { 22 | "color": "#ffffff" 23 | }, 24 | "COMMIT_TITLE_COLOR": { 25 | "modifiers": ["bold"] 26 | }, 27 | "DEFAULT_COLOR": { 28 | "backgroundColor": "", 29 | "color": "#ffffff" 30 | }, 31 | "DELETED_LINE_COLOR": { 32 | "backgroundColor": "#a64040", 33 | "color": "#ffffff" 34 | }, 35 | "DELETED_LINE_NO_COLOR": { 36 | "backgroundColor": "#ffffff22", 37 | "color": "#ffffff22" 38 | }, 39 | "DELETED_WORD_COLOR": { 40 | "backgroundColor": "#cc5555", 41 | "color": "#ffffff" 42 | }, 43 | "FILE_NAME_COLOR": { 44 | "color": "#ffffff" 45 | }, 46 | "HUNK_HEADER_COLOR": { 47 | "modifiers": ["dim"] 48 | }, 49 | "INSERTED_LINE_COLOR": { 50 | "backgroundColor": "#4078a6", 51 | "color": "#ffffff" 52 | }, 53 | "INSERTED_LINE_NO_COLOR": { 54 | "backgroundColor": "#ffffff22", 55 | "color": "#ffffff22" 56 | }, 57 | "INSERTED_WORD_COLOR": { 58 | "backgroundColor": "#5599cc", 59 | "color": "#ffffff" 60 | }, 61 | "MISSING_LINE_COLOR": {}, 62 | "SYNTAX_HIGHLIGHTING_THEME": "", 63 | "UNMODIFIED_LINE_COLOR": {}, 64 | "UNMODIFIED_LINE_NO_COLOR": { 65 | "color": "#ffffff" 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /config/cli/claude-code.yml: -------------------------------------------------------------------------------- 1 | # Claude Code Configuration - Common 2 | # Settings applied to all profiles 3 | 4 | # Global settings (keys must match .claude.json keys exactly) 5 | global: 6 | autoUpdates: true 7 | theme: dark-daltonized 8 | 9 | # Settings (keys must match .claude/settings.json keys exactly) 10 | settings: 11 | alwaysThinkingEnabled: true 12 | includeCoAuthoredBy: false 13 | statusLine: 14 | type: command 15 | command: "input=$(cat); cwd=$(echo \"$input\" | jq -r '.workspace.current_dir'); cd \"$cwd\" 2>/dev/null || exit 0; dir_path=\"${cwd/#$HOME/}\"; parent_dir=$(dirname \"$dir_path\"); last_dir=$(basename \"$dir_path\"); if [[ \"$parent_dir\" == \".\" ]]; then dir_display=$(printf '\\033[38;2;0;146;186m%s\\033[0m' \"$last_dir\"); else dir_display=$(printf '\\033[38;2;255;1;116m%s/\\033[38;2;0;146;186m%s\\033[0m' \"$parent_dir\" \"$last_dir\"); fi; git_branch=\"\"; if git rev-parse --git-dir > /dev/null 2>&1; then branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); if [[ -n \"$branch\" ]]; then git_branch=$(printf ' \\033[38;2;128;212;64m⎇ %s\\033[0m' \"$branch\"); fi; fi; printf '%s%s' \"${dir_display}\" \"${git_branch}\"" 16 | 17 | # Common MCP servers (all profiles) 18 | mcp: 19 | github: 20 | transport: http 21 | url: https://api.githubcopilot.com/mcp 22 | headers: 23 | Authorization: Bearer ${MCP_GITHUB_TOKEN} 24 | notion: 25 | transport: http 26 | url: https://mcp.notion.com/mcp 27 | basic-memory: 28 | transport: stdio 29 | command: uvx 30 | args: 31 | - basic-memory 32 | - mcp 33 | env: {} 34 | context7: 35 | transport: http 36 | url: https://mcp.context7.com/mcp 37 | -------------------------------------------------------------------------------- /profiles/work/config/cli/github-copilot.yml: -------------------------------------------------------------------------------- 1 | # GitHub Copilot CLI Configuration - Work Profile 2 | # Work-specific MCP servers 3 | 4 | mcpServers: 5 | atlassian: 6 | type: local 7 | command: mise 8 | args: 9 | - exec 10 | - node@latest 11 | - -- 12 | - npx 13 | - -y 14 | - mcp-remote@latest 15 | - https://mcp.atlassian.com/v1/sse 16 | headers: {} 17 | tools: 18 | - "*" 19 | # atlassian: 20 | # type: http 21 | # url: https://mcp.atlassian.com/v1/sse 22 | # headers: {} 23 | # tools: 24 | # - "*" 25 | figma: 26 | type: http 27 | url: https://mcp.figma.com/mcp 28 | headers: {} 29 | tools: 30 | - "*" 31 | notion: 32 | type: http 33 | url: https://mcp.notion.com/mcp 34 | headers: {} 35 | tools: 36 | - "*" 37 | sentry: 38 | type: local 39 | command: mise 40 | tools: 41 | - "*" 42 | args: 43 | - exec 44 | - node@latest 45 | - -- 46 | - npx 47 | - -y 48 | - mcp-remote@latest 49 | - https://mcp.sentry.dev/mcp 50 | datadog: 51 | type: local 52 | command: npx 53 | tools: 54 | - "*" 55 | args: 56 | - --yes 57 | - "@kud/mcp-datadog@latest" 58 | env: 59 | DD_API_KEY: ${MCP_DATADOG_API_KEY} 60 | DD_APP_KEY: ${MCP_DATADOG_APP_KEY} 61 | DD_SITE: ${MCP_DATADOG_SITE} 62 | jenkins: 63 | type: local 64 | command: npx 65 | tools: 66 | - "*" 67 | args: 68 | - -y 69 | - "@kud/mcp-jenkins@latest" 70 | env: 71 | JENKINS_API_TOKEN: ${MCP_JENKINS_API_TOKEN} 72 | JENKINS_URL: ${MCP_JENKINS_URL} 73 | JENKINS_USER: ${MCP_JENKINS_USER} 74 | -------------------------------------------------------------------------------- /core/packages/antidote.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ################################################################################ 4 | # # 5 | # 🧪 ANTIDOTE ZSH PLUGIN MANAGER # 6 | # ----------------------------- # 7 | # Updates and manages zsh plugins using the antidote plugin manager. # 8 | # Keeps all shell extensions and enhancements up to date. # 9 | # # 10 | ################################################################################ 11 | 12 | source ~/.zshrc 13 | 14 | ################################################################################ 15 | # 🔄 PLUGIN UPDATE PROCESS 16 | ################################################################################ 17 | 18 | # Source required utilities 19 | source $MY/core/utils/helper.zsh 20 | source $MY/core/utils/ui-kit.zsh 21 | 22 | # Generate plugins.txt from main config only 23 | if ensure_command_available "yq" "" "false"; then 24 | 25 | # Remove existing file to avoid conflicts 26 | rm -f "$MY/shell/plugins.txt" 27 | 28 | # Generate from main config only (plugins should be consistent across profiles) 29 | yq eval '.plugins[]?' "$PACKAGES_CONFIG_DIR/antidote.yml" 2>/dev/null > "$MY/shell/plugins.txt" 30 | 31 | fi 32 | 33 | # Check if antidote is available 34 | if ensure_command_available "antidote" "" "false"; then 35 | antidote update 36 | ui_success_simple "Zsh plugins updated" 37 | else 38 | ui_warning_simple "antidote not available, skipping plugin updates" 39 | return 1 40 | fi 41 | 42 | -------------------------------------------------------------------------------- /dotfiles/.zshrc: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🐚 ZSH CONFIGURATION # 4 | # ------------------ # 5 | # Main Zsh configuration file that loads all shell modules and settings. # 6 | # # 7 | ################################################################################ 8 | 9 | export MY="$HOME/my" 10 | 11 | # Enable profiling if requested (set ZPROF=1) 12 | [[ -n "$ZPROF" ]] && zmodload zsh/zprof 13 | 14 | # Load shell modules (order matters for dependencies) 15 | for module in \ 16 | globals.zsh \ 17 | directory.zsh \ 18 | editor.zsh \ 19 | history.zsh \ 20 | locale.zsh \ 21 | limits.zsh \ 22 | homebrew.zsh \ 23 | path/homebrew.zsh \ 24 | mise.zsh \ 25 | functions.zsh \ 26 | completions.zsh \ 27 | bindings.zsh \ 28 | aliases.zsh \ 29 | display.zsh \ 30 | cursor.zsh \ 31 | openssl.zsh \ 32 | python.zsh \ 33 | ruby.zsh \ 34 | java.zsh \ 35 | node.zsh \ 36 | path/node.zsh \ 37 | path/local.zsh \ 38 | babel.zsh \ 39 | android.zsh \ 40 | antidote.zsh \ 41 | syntax-highlighting.zsh \ 42 | autosuggestions.zsh \ 43 | history-substring-search.zsh \ 44 | you-should-use.zsh \ 45 | fzf.zsh \ 46 | zoxide.zsh \ 47 | local.zsh \ 48 | profile.zsh \ 49 | path/console-ninja.zsh \ 50 | path/android.zsh \ 51 | path/my.zsh \ 52 | starship.zsh 53 | 54 | do 55 | [[ -f $MY/shell/$module ]] && source $MY/shell/$module 56 | done 57 | 58 | # Show profiling report if enabled 59 | [[ -n "$ZPROF" ]] && zprof 60 | -------------------------------------------------------------------------------- /profiles/work/config/cli/mistral-vibe.yml: -------------------------------------------------------------------------------- 1 | # Mistral Vibe Configuration - Work Profile 2 | # Work-specific settings and MCP servers for Mistral Vibe 3 | 4 | # Profile-specific MCP servers 5 | mcp: 6 | # Work knowledge base integration 7 | work-knowledge: 8 | type: local 9 | enabled: true 10 | command: 11 | - uvx 12 | - basic-memory 13 | - mcp 14 | - --project 15 | - work 16 | 17 | # Jira integration for work 18 | jira: 19 | type: local 20 | enabled: true 21 | command: 22 | - npx 23 | - --yes 24 | - "@kud/mcp-jira@latest" 25 | environment: 26 | JIRA_URL: ${MCP_JIRA_URL} 27 | JIRA_USER: ${MCP_JIRA_USER} 28 | JIRA_API_TOKEN: ${MCP_JIRA_API_TOKEN} 29 | 30 | # Confluence integration 31 | confluence: 32 | type: local 33 | enabled: true 34 | command: 35 | - npx 36 | - --yes 37 | - "@kud/mcp-confluence@latest" 38 | environment: 39 | CONFLUENCE_URL: ${MCP_CONFLUENCE_URL} 40 | CONFLUENCE_USER: ${MCP_CONFLUENCE_USER} 41 | CONFLUENCE_API_TOKEN: ${MCP_CONFLUENCE_API_TOKEN} 42 | 43 | # GitHub Enterprise MCP 44 | github-enterprise: 45 | type: remote 46 | enabled: true 47 | url: https://github.company.com/api/v3/mcp 48 | headers: 49 | Authorization: Bearer ${MCP_GITHUB_ENTERPRISE_TOKEN} 50 | 51 | # Work profile specific settings 52 | context: 53 | memory_window: 8 # More focused context for work projects 54 | compression: false # Preserve full context for work accuracy 55 | 56 | ui: 57 | show_token_count: true # Important for work usage tracking 58 | show_temperature: true # Helpful for work context tuning 59 | 60 | # Work-specific API settings 61 | api: 62 | timeout: 60 # Longer timeout for enterprise systems 63 | retries: 5 -------------------------------------------------------------------------------- /core/system/post-install.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # 📮 Post-install documentation opener (minimal by request) 3 | # Usage: 4 | # my run postinstall # open GitHub doc in browser 5 | # my run postinstall --offline # open local markdown file 6 | 7 | # Known section files (basename without .md) 8 | sections=( 9 | system-preferences dock firefox vscode keepassxc iterm2 raycast spotify slack earsafe pcloud dnscrypt-proxy 10 | ) 11 | 12 | is_section() { 13 | local target="$1"; for s in "${sections[@]}"; do [[ "$s" == "$target" ]] && return 0; done; return 1; 14 | } 15 | 16 | open_local() { 17 | local file="$1"; if command -v glow >/dev/null 2>&1; then glow "$file"; elif command -v bat >/dev/null 2>&1; then bat --style=plain "$file"; else ${PAGER:-less} "$file"; fi 18 | } 19 | 20 | show_usage() { 21 | echo "Usage: my run postinstall [section] [--offline]" >&2 22 | echo "Sections: ${sections[*]}" >&2 23 | } 24 | 25 | SECTION=""; MODE="online" 26 | 27 | # Parse args (order-agnostic: section then flag or vice versa) 28 | for arg in "$@"; do 29 | case "$arg" in 30 | --offline) MODE="offline" ;; 31 | -h|--help) show_usage; exit 0 ;; 32 | *) if is_section "$arg"; then SECTION="$arg"; else echo "Unknown argument: $arg" >&2; show_usage; exit 1; fi ;; 33 | esac 34 | done 35 | 36 | if [[ -z "$SECTION" ]]; then 37 | # Index 38 | if [[ "$MODE" == offline ]]; then 39 | open_local "$MY/doc/post-install.md" 40 | else 41 | open "https://github.com/kud/my/blob/master/doc/post-install.md" 42 | fi 43 | else 44 | FILE_PATH="$MY/doc/postinstall/$SECTION.md" 45 | if [[ ! -f "$FILE_PATH" ]]; then 46 | echo "Section file missing: $FILE_PATH" >&2; exit 1 47 | fi 48 | if [[ "$MODE" == offline ]]; then 49 | open_local "$FILE_PATH" 50 | else 51 | open "https://github.com/kud/my/blob/master/doc/postinstall/$SECTION.md" 52 | fi 53 | fi 54 | -------------------------------------------------------------------------------- /bin/main/dnsmasq-manager: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | source "${MY}/core/utils/helper.zsh" 4 | 5 | # Helper function to get PID for a specific service. 6 | getPid() { 7 | serviceName=$1 8 | sudo lsof -i :53 | grep "$serviceName" | head -1 | awk '{print $2}' 9 | } 10 | 11 | killMdnsresponder() { 12 | echo_title "Killing mdnsresponder..." 13 | PID=$(getPid "_mdnsresponder") 14 | if [[ -n "$PID" ]]; then 15 | sudo kill -9 "$PID" 16 | echo_success "mdnsresponder killed." 17 | else 18 | echo_error "mdnsresponder not found." 19 | fi 20 | } 21 | 22 | killDnsmasq() { 23 | echo_title "Killing dnsmasq..." 24 | PID=$(getPid "dnsmasq") 25 | if [[ -n "$PID" ]]; then 26 | sudo kill -9 "$PID" 27 | echo_success "dnsmasq killed." 28 | else 29 | echo_error "dnsmasq not found." 30 | fi 31 | } 32 | 33 | startDnsmasq() { 34 | echo_title "Starting dnsmasq..." 35 | sudo dnsmasq 36 | echo_success "dnsmasq started." 37 | } 38 | 39 | if [[ $# -eq 0 ]]; then 40 | $0 --help 41 | else 42 | case "$1" in 43 | start) 44 | sudo -v 45 | killMdnsresponder 46 | startDnsmasq 47 | ;; 48 | stop) 49 | sudo -v 50 | killDnsmasq 51 | ;; 52 | restart) 53 | sudo -v 54 | killMdnsresponder 55 | killDnsmasq 56 | startDnsmasq 57 | ;; 58 | --help) 59 | echo_space 60 | printf "Usage:" 61 | echo_spacex2 62 | printf " ${COLOUR_CYAN}dnsmasq-manager${COLOUR_RESET} [|--help]" 63 | echo_spacex3 64 | printf "Commands:" 65 | echo_spacex2 66 | printf " start ${COLOUR_BLACK}Start dnsmasq${COLOUR_RESET}" 67 | echo_space 68 | printf " stop ${COLOUR_BLACK}Stop dnsmasq${COLOUR_RESET}" 69 | echo_space 70 | printf " restart ${COLOUR_BLACK}Restart dnsmasq${COLOUR_RESET}" 71 | echo_spacex2 72 | ;; 73 | *) 74 | echo 'Invalid command. Use --help for usage.' 75 | ;; 76 | esac 77 | fi 78 | -------------------------------------------------------------------------------- /config/packages/npm.yml: -------------------------------------------------------------------------------- 1 | pre_install: 2 | # NPM configuration 3 | - npm config set prefix ~/.npm-global 4 | - npm config set save-exact true 5 | - npm config set tag-version-prefix "" 6 | - npm config set progress false 7 | - npm config set fetch-retries 3 8 | - npm config set fetch-retry-mintimeout 15000 9 | - npm config set fetch-retry-maxtimeout 90000 10 | # Yarn configuration 11 | - yarn config set --home defaultSemverRangePrefix "" 12 | # Disable Corepack for yarn/pnpm since Mise manages versions per-project 13 | - corepack disable yarn 14 | - corepack disable pnpm 15 | 16 | packages: 17 | - "@anthropic-ai/claude-code" 18 | - "@kud/ai-conventional-commit-cli" 19 | - "@kud/am-i-admin-cli" 20 | - "@kud/git-cherry-pick-interactive-cli" 21 | - "@kud/soap-cli" 22 | - "@kud/wifi-tool-cli" 23 | - "@openai/codex" 24 | - "@github/copilot" 25 | - "@google/gemini-cli" 26 | - battery-level-cli 27 | - bodybuilder 28 | - caniuse-cmd 29 | - diff-so-fancy 30 | - envinfo 31 | - eslint 32 | - fast-cli 33 | - figlet-cli 34 | - fixme 35 | - fkill-cli 36 | - fraktur 37 | - fx 38 | - gh-pages 39 | - git-branch-select 40 | - git-split-diffs 41 | - gnomon 42 | - gulp-cli 43 | - hicat 44 | - how2 45 | - http-server 46 | - imagemin 47 | - import-cost 48 | - is-up-cli 49 | - iterm2-tab-set 50 | - jake 51 | - jscodeshift 52 | - kmdr 53 | - lighthouse 54 | - localtunnel 55 | - nativefier 56 | - nodemon 57 | - np 58 | - npm-check 59 | - npm-check-updates 60 | - npm-upgrade 61 | - ntl 62 | - open-pip-cli 63 | - opencode-ai@latest 64 | - pageres-cli 65 | - pnpm 66 | - prettier 67 | - prettier-plugin-ini 68 | - react-native-cli 69 | - serve 70 | - speed-test 71 | - svgo 72 | - tmi 73 | - trash-cli 74 | - tslint 75 | - typescript@next 76 | - uncss 77 | - vercel 78 | - vtop 79 | - web-ext 80 | - weinre 81 | - zx 82 | -------------------------------------------------------------------------------- /profiles/work/shell/functions.zsh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # Source ui-kit if not already loaded 4 | if ! typeset -f ui_warning_simple > /dev/null; then 5 | source "$MY/core/utils/ui-kit.zsh" 6 | fi 7 | 8 | # Override sudo to check for admin rights first 9 | # If no admin rights, trigger Jamf Self Service policy to grant temporary admin access 10 | sudo() { 11 | # Check if user is in admin group using dscl (more reliable than groups) 12 | local group_membership=$(dscl . -read /Groups/admin GroupMembership 2>/dev/null) 13 | if ! echo "$group_membership" | grep -q "\b$USER\b"; then 14 | # Run the automated Jamf request script silently 15 | local admin_script="$SYNC_FOLDER/Appdata/Raycast/scripts/commands/request-admin-privileges/index.js" 16 | (osascript -l JavaScript "$admin_script" &>/dev/null &) 17 | 18 | # Use ui-kit inline spinner 19 | local spinner_idx=0 20 | 21 | # Poll every 0.5 seconds for up to 30 seconds 22 | local attempts=0 23 | local max_attempts=60 24 | 25 | while [ $attempts -lt $max_attempts ]; do 26 | # Show spinner using ui-kit 27 | ui_spinner_tick "$spinner_idx" "Requesting admin rights..." 28 | spinner_idx=$(((spinner_idx + 1) % 10)) 29 | 30 | sleep 0.5 31 | attempts=$((attempts + 1)) 32 | 33 | # Check every 2 seconds (every 4th attempt) 34 | if (( attempts % 4 == 0 )); then 35 | group_membership=$(dscl . -read /Groups/admin GroupMembership 2>/dev/null) 36 | if echo "$group_membership" | grep -q "\b$USER\b"; then 37 | ui_spinner_clear 38 | ui_success_simple "Admin rights granted." 39 | command sudo "$@" 40 | return 41 | fi 42 | fi 43 | done 44 | 45 | # Timeout reached 46 | ui_spinner_clear 47 | ui_error_simple "Admin rights request timed out." 48 | return 1 49 | fi 50 | 51 | # Execute actual sudo command 52 | command sudo "$@" 53 | } 54 | -------------------------------------------------------------------------------- /core/system/sync-files.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ################################################################################ 4 | # # 5 | # 📁 SYNC FILES MANAGER # 6 | # ------------------- # 7 | # Copies files from synchronized storage (cloud/external) to local # 8 | # system locations like fonts, configurations, and other resources. # 9 | # # 10 | ################################################################################ 11 | 12 | source $MY/core/utils/ui-kit.zsh 13 | 14 | ################################################################################ 15 | # 🔤 FONTS 16 | ################################################################################ 17 | 18 | if [[ -n "${SYNC_FOLDER}" && -d "${SYNC_FOLDER}/Lib/fonts" ]]; then 19 | fonts_synced=0 20 | 21 | # Operator Mono fonts 22 | if [[ -d "${SYNC_FOLDER}/Lib/fonts/Operator Mono" ]]; then 23 | if cp "${SYNC_FOLDER}/Lib/fonts/Operator Mono"/* ~/Library/Fonts/ 2>/dev/null; then 24 | ui_success_simple "Synced Operator Mono to ~/Library/Fonts" 25 | ((fonts_synced++)) 26 | fi 27 | fi 28 | 29 | # Operator Mono Lig fonts 30 | if [[ -d "${SYNC_FOLDER}/Lib/fonts/Operator Mono Lig" ]]; then 31 | if cp "${SYNC_FOLDER}/Lib/fonts/Operator Mono Lig"/* ~/Library/Fonts/ 2>/dev/null; then 32 | ui_success_simple "Synced Operator Mono Lig to ~/Library/Fonts" 33 | ((fonts_synced++)) 34 | fi 35 | fi 36 | 37 | if [[ $fonts_synced -eq 0 ]]; then 38 | ui_info_simple "No fonts to sync" 39 | fi 40 | else 41 | ui_info_simple "No sync folder configured or fonts directory not found" 42 | fi -------------------------------------------------------------------------------- /core/packages/gh.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ################################################################################ 4 | # # 5 | # 🐙 GITHUB CLI EXTENSIONS # 6 | # ------------------------ # 7 | # Manages GitHub CLI extensions using a YAML config (profile-aware). # 8 | # Installs listed extensions and upgrades them in a single batch. # 9 | # # 10 | ################################################################################ 11 | 12 | # Source required utilities 13 | source $MY/core/utils/helper.zsh 14 | source $MY/core/utils/packages.zsh 15 | source $MY/core/utils/ui-kit.zsh 16 | 17 | # Ensure prerequisites 18 | ensure_command_available "yq" "Install with: brew install yq" 19 | ensure_command_available "gh" "Install with: brew install gh" 20 | 21 | ################################################################################ 22 | # 📦 EXTENSION INSTALLATION FUNCTIONS 23 | ################################################################################ 24 | 25 | gh_extension_install() { 26 | local ext="$1" 27 | [[ -z "$ext" ]] && return 0 28 | 29 | # Install extension (idempotent; gh will no-op if already installed) 30 | echo " • $ext" 31 | ui_debug_command "gh extension install $ext" 32 | gh extension install "$ext" || true 33 | } 34 | 35 | gh_extension_upgrade_all() { 36 | ui_subsection "Upgrading GitHub CLI extensions" 37 | ui_debug_command "gh extension upgrade --all" 38 | gh extension upgrade --all || true 39 | ui_success_simple "Extensions upgraded" 1 40 | } 41 | 42 | ################################################################################ 43 | # 🚀 MAIN 44 | ################################################################################ 45 | 46 | ui_subsection "Installing GitHub CLI extensions" 47 | process_package_configs "gh" "gh_extension_install" "gh_extension_upgrade_all" 48 | ui_success_simple "GitHub CLI extensions installed" 1 49 | -------------------------------------------------------------------------------- /core/system/submodules.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ################################################################################ 4 | # # 5 | # 📦 GIT SUBMODULES MANAGER # 6 | # ----------------------- # 7 | # Manages external Git repositories as submodules including git-diff-image # 8 | # and themes. Handles both installation and updates automatically. # 9 | # # 10 | ################################################################################ 11 | 12 | 13 | mkdir -p "$HOME/my/modules" 14 | 15 | SUBMODULES_CONFIG="$MY/config/system/submodules.yml" 16 | 17 | if [[ ! -f "$SUBMODULES_CONFIG" ]]; then 18 | exit 1 19 | fi 20 | 21 | process_submodule() { 22 | local name="$1" 23 | local url="$2" 24 | local description="$3" 25 | local module_path="$HOME/my/modules/$name" 26 | 27 | if [[ -d "$module_path" ]]; then 28 | ui_subsection "$name" 29 | git --git-dir="$module_path/.git" --work-tree="$module_path/" pull 30 | else 31 | ui_subsection "$name" 32 | ui_info_simple "Installing from: $url" 33 | git clone --recursive "$url" "$module_path" 34 | fi 35 | echo 36 | } 37 | 38 | # Source required utilities 39 | source $MY/core/utils/helper.zsh 40 | source $MY/core/utils/ui-kit.zsh 41 | 42 | # Check if yq is available 43 | ensure_command_available "yq" "Install with: brew install yq" 44 | 45 | # Parse YAML and process each submodule using yq 46 | submodule_names=$(yq eval 'keys | .[]' "$SUBMODULES_CONFIG") 47 | 48 | while IFS= read -r name; do 49 | if [[ -n "$name" ]]; then 50 | url=$(yq eval ".[\"$name\"].url" "$SUBMODULES_CONFIG") 51 | description=$(yq eval ".[\"$name\"].description" "$SUBMODULES_CONFIG") 52 | 53 | if [[ -n "$url" && -n "$description" ]]; then 54 | process_submodule "$name" "$url" "$description" 55 | fi 56 | fi 57 | done <<< "$submodule_names" 58 | 59 | -------------------------------------------------------------------------------- /bin/git/git-branch-current: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # git-branch-current - Display the current git branch name 4 | # 5 | # Usage: 6 | # git-branch-current # Display current branch 7 | # git branch-current # Can also be called as git subcommand 8 | # git-branch-current --help # Show this help 9 | # 10 | # Examples: 11 | # git-branch-current # Output: main 12 | # git branch-current # Same as above 13 | # BRANCH=$(git-branch-current) # Store in variable 14 | # echo "On branch: $(git-branch-current)" # Use in command 15 | # 16 | # Returns: 17 | # - Branch name if in a git repository 18 | # - Empty output if not in a git repository 19 | # - Exit code 0 on success, 1 on error 20 | 21 | #!/usr/bin/env zsh 22 | 23 | source $MY/core/utils/helper.zsh 24 | 25 | # Help function 26 | show_help() { 27 | show_command_help "git-branch-current" "Display the current git branch name" \ 28 | "git-branch-current [--help]" 29 | echo_bold "DESCRIPTION:" 30 | echo " Shows the name of the currently checked out git branch." 31 | echo " Returns empty output if not in a git repository." 32 | echo_space 33 | echo_bold "EXAMPLES:" 34 | echo " git-branch-current # Output: main" 35 | echo " BRANCH=\$(git-branch-current) # Store in variable" 36 | echo_space 37 | } 38 | 39 | # Check for help flag first (before any git operations) 40 | handle_help_flag "$1" 41 | 42 | # Check if we're in a git repository 43 | if ! git rev-parse --git-dir > /dev/null 2>&1; then 44 | # Not in a git repository - exit silently with error code 45 | exit 1 46 | fi 47 | 48 | # Get current branch name using the modern --show-current flag 49 | # This is available in Git 2.22+ and is the preferred method 50 | branch_name=$(git branch --show-current 2>/dev/null) 51 | if [[ $? -eq 0 && -n "$branch_name" ]]; then 52 | echo "$branch_name" 53 | exit 0 54 | fi 55 | 56 | # Fallback for older git versions (< 2.22) 57 | # Use rev-parse --abbrev-ref HEAD as fallback 58 | branch_name=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) 59 | if [[ $? -eq 0 && -n "$branch_name" ]]; then 60 | echo "$branch_name" 61 | exit 0 62 | fi 63 | 64 | exit 1 65 | -------------------------------------------------------------------------------- /shell/history.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 📚 ZSH HISTORY CONFIGURATION # 4 | # ------------------------- # 5 | # Optimized history settings for better command recall and management. # 6 | # # 7 | ################################################################################ 8 | 9 | # ----------------------------- 10 | # History Size & Storage 11 | # ----------------------------- 12 | HISTSIZE=50000 # Number of commands to keep in memory 13 | SAVEHIST=50000 # Number of commands to save to file 14 | HISTFILE=~/.zsh_history # History file location 15 | 16 | # ----------------------------- 17 | # Basic History Options 18 | # ----------------------------- 19 | setopt append_history # Append to history file rather than replacing 20 | setopt hist_ignore_dups # Don't record duplicate consecutive commands 21 | # setopt share_history # Share history between all sessions 22 | 23 | # ----------------------------- 24 | # Advanced History Options 25 | # ----------------------------- 26 | setopt extended_history # Record timestamp of command in HISTFILE 27 | setopt hist_expire_dups_first # Delete duplicates first when HISTFILE size exceeds HISTSIZE 28 | setopt hist_ignore_all_dups # Delete old recorded entry if new entry is a duplicate 29 | setopt hist_find_no_dups # Do not display a line previously found 30 | setopt hist_ignore_space # Ignore commands that start with space 31 | setopt hist_save_no_dups # Don't write duplicate entries in the history file 32 | setopt hist_reduce_blanks # Remove extra whitespace from history entries 33 | setopt hist_verify # Show command with history expansion to user before running it 34 | setopt hist_no_store # Don't store history and fc commands in history 35 | setopt inc_append_history # Write to the history file immediately, not when the shell exits 36 | setopt hist_fcntl_lock # Better file locking for performance 37 | -------------------------------------------------------------------------------- /core/packages/npm.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ################################################################################ 4 | # # 5 | # 📦 NODE.JS PACKAGE MANAGER # 6 | # ------------------------- # 7 | # Manages global npm packages for development tools and CLI utilities. # 8 | # Installs essential Node.js tools for modern web development workflow. # 9 | # # 10 | ################################################################################ 11 | 12 | # Source required utilities 13 | source $MY/core/utils/helper.zsh 14 | source $MY/core/utils/packages.zsh 15 | source $MY/core/utils/ui-kit.zsh 16 | 17 | # Check if Node.js and npm are available 18 | ensure_command_available "npm" "Install Node.js from https://nodejs.org" 19 | 20 | # Ensure yq is installed 21 | ensure_command_available "yq" "Install with: brew install yq" 22 | 23 | ################################################################################ 24 | # 🔄 NPM SYSTEM UPDATE 25 | ################################################################################ 26 | 27 | # @FIXME This section is a temporary workaround to handle npm package updates 28 | # Clean up any temporary npm rename directories before update 29 | # npm creates these as .- during failed installs 30 | local npm_prefix=$(npm config get prefix) 31 | if [[ -d "$npm_prefix/lib/node_modules" ]]; then 32 | # Remove directories matching npm's temporary rename pattern (starts with dot, contains dash) 33 | find "$npm_prefix/lib/node_modules" -type d -name ".*-*" -exec rm -rf {} + 2>/dev/null || true 34 | fi 35 | 36 | ui_subsection "Updating npm packages" 37 | npm update -g 38 | ui_success_simple "npm packages updated" 1 39 | 40 | ui_spacer 41 | 42 | ui_subsection "Ensuring npm CLI latest" 43 | if npm install -g npm@latest; then 44 | ui_success_simple "npm CLI updated" 1 45 | else 46 | ui_warning_simple "npm CLI update failed" 47 | fi 48 | 49 | ui_spacer 50 | 51 | # Process npm packages using shared utilities 52 | process_package_configs "npm" "npm_install" "npm_install_run" 53 | ui_success_simple "npm packages installed" 1 54 | -------------------------------------------------------------------------------- /core/apps/bruno.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Configure Bruno app preferences (direct JSON-structure merge) 4 | 5 | source $MY/core/utils/helper.zsh 6 | source $MY/core/utils/ui-kit.zsh 7 | 8 | ensure_command_available "yq" "Install with: brew install yq" 9 | ensure_command_available "jq" "Install with: brew install jq" 10 | 11 | CONFIG_YAML="$CONFIG_DIR/apps/bruno.yml" 12 | PROFILE_CONFIG_YAML="$PROFILE_APPS_CONFIG_DIR/bruno.yml" 13 | [[ -f "$CONFIG_YAML" ]] || exit 0 14 | 15 | PREFS_FILE="$HOME_LIBRARY_APP_SUPPORT/bruno/preferences.json" 16 | 17 | # If preferences file does not exist, do nothing (skip creating it) 18 | [[ -f "$PREFS_FILE" ]] || exit 0 19 | 20 | # Load current preferences JSON (fallback to empty object if invalid) 21 | if CURRENT_RAW=$(cat "$PREFS_FILE" 2>/dev/null); then 22 | if echo "$CURRENT_RAW" | jq empty 2>/dev/null 1>&2; then 23 | CURRENT="$CURRENT_RAW" 24 | else 25 | CURRENT='{}' 26 | fi 27 | else 28 | CURRENT='{}' 29 | fi 30 | 31 | # Load YAML (already mirrors JSON structure) 32 | MAIN_CFG=$(yq -o=json eval '.' "$CONFIG_YAML") 33 | if [[ -f "$PROFILE_CONFIG_YAML" ]]; then 34 | PROFILE_CFG=$(yq -o=json eval '.' "$PROFILE_CONFIG_YAML" 2>/dev/null || echo '{}') 35 | else 36 | PROFILE_CFG='{}' 37 | fi 38 | 39 | # Robust merge of main + profile (ignore nulls / non-objects) 40 | CFG=$(printf '%s\n%s\n' "$MAIN_CFG" "$PROFILE_CFG" | jq -s 'reduce .[] as $o ({}; if ($o|type)=="object" then . * $o else . end)') 41 | 42 | # If CFG ended up empty, nothing to do 43 | if [[ "$CFG" == '{}' ]]; then 44 | ui_info_simple "Nothing to update (no overrides)" 45 | exit 0 46 | fi 47 | 48 | # Merge CURRENT (may be {}) with CFG 49 | UPDATED=$(printf '%s\n%s\n' "$CURRENT" "$CFG" | jq -s 'reduce .[] as $o ({}; if ($o|type)=="object" then . * $o else . end)') 50 | 51 | # Extract font info for message if present 52 | FONT_FAMILY=$(echo "$CFG" | jq -r '.preferences.font.codeFont // empty') 53 | FONT_SIZE=$(echo "$CFG" | jq -r '.preferences.font.codeFontSize // empty') 54 | 55 | # If no change, report and exit 56 | if [[ "$UPDATED" == "$CURRENT" ]]; then 57 | ui_info_simple "Nothing to update (already in desired state)" 58 | exit 0 59 | fi 60 | 61 | # Write back (pretty) 62 | echo "$UPDATED" | jq . > "$PREFS_FILE" 63 | 64 | ui_success_simple "Updated Bruno preferences (font '${FONT_FAMILY:-unchanged}' size '${FONT_SIZE:-unchanged}')" 65 | 66 | -------------------------------------------------------------------------------- /shell/functions.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # 🔧 SHELL FUNCTIONS # 4 | # ---------------- # 5 | # Custom shell functions for enhanced productivity and navigation. # 6 | # # 7 | ################################################################################ 8 | 9 | # Load UI kit for icon variables 10 | source "$MY/core/utils/ui-kit.zsh" 11 | 12 | # 🏷️ Tab title to current dir 13 | precmd() { 14 | local title="" 15 | 16 | if [[ "$PWD" == "$HOME" ]]; then 17 | title="~" 18 | else 19 | title="${PWD##*/}" 20 | fi 21 | 22 | echo -ne "\e]1;$title\a" 23 | } 24 | 25 | # 📁 Create folder and cd into it 26 | function mcd() { 27 | mkdir -p "$1" && cd "$1"; 28 | } 29 | 30 | # 🗂️ Yazi: open and jump to selected dir 31 | function yy() { 32 | local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" 33 | yazi "$@" --cwd-file="$tmp" 34 | if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then 35 | cd -- "$cwd" 36 | fi 37 | rm -f -- "$tmp" 38 | } 39 | 40 | 41 | # 🤖 Install Android SDK components (latest platform by default or API level arg) 42 | android-install() { 43 | local requested="$1" latest 44 | if [[ -z "$requested" || "$requested" == latest ]]; then 45 | latest=$(sdkmanager --list 2>/dev/null \ 46 | | grep -Eo 'platforms;android-[0-9]+' \ 47 | | sed 's/.*android-//' \ 48 | | sort -n | uniq | tail -1) 49 | if [[ -z "$latest" ]]; then 50 | echo "android-install: could not determine latest platform" >&2 51 | return 1 52 | fi 53 | else 54 | latest="$requested" 55 | fi 56 | 57 | echo "Installing Android cmdline-tools;latest, platform $latest, emulator, platform-tools, tools" >&2 58 | sdkmanager "cmdline-tools;latest" "platforms;android-$latest" "emulator" "platform-tools" "tools" 59 | } 60 | 61 | # 🙏 Re-run last command with sudo (safer than simple alias) 62 | please() { 63 | local last 64 | last=$(fc -ln -1) 65 | if [[ -z "$last" ]]; then 66 | echo "No previous command" >&2 67 | return 1 68 | fi 69 | printf 'sudo %s\n' "$last" 70 | sudo $SHELL -lc "$last" 71 | } 72 | 73 | -------------------------------------------------------------------------------- /bin/main/dnsdiff: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # dnsdiff - Compare DNS answers across resolvers. 4 | # Usage: dnsdiff 5 | # Resolvers queried: system default, 1.1.1.1 (Cloudflare), 8.8.8.8 (Google) 6 | # Shows A, AAAA, CNAME (others can be added easily). 7 | 8 | set -euo pipefail 9 | DOMAIN="${1:-}" 10 | if [[ -z "$DOMAIN" ]]; then 11 | echo "Usage: dnsdiff " >&2 12 | exit 1 13 | fi 14 | 15 | if ! command -v dig >/dev/null 2>&1; then 16 | echo "dig not found" >&2 17 | exit 2 18 | fi 19 | 20 | query(){ 21 | local resolver="$1" type="$2" 22 | dig +noidnout +nottl +nocmd +noauth +noquestion +nostats @"$resolver" "$DOMAIN" "$type" 2>/dev/null | 23 | awk '/^;/ {next} /^[A-Z0-9.-]+\s+IN\s+'$type'/ {print $5}' | 24 | sort -u 25 | } 26 | 27 | systems(){ 28 | scutil --dns 2>/dev/null | awk '/nameserver\[[0-9]+\]/{print $3}' | head -3 29 | } 30 | 31 | print_section(){ 32 | local rr="$1" 33 | echo "\n== $rr ==" 34 | local sysresolvers=($(systems)) 35 | [[ ${#sysresolvers[@]} -eq 0 ]] && sysresolvers=(system) 36 | 37 | local sysset="" 38 | if [[ ${sysresolvers[1]} == system ]]; then 39 | sysset=$(query "" "$rr") 40 | else 41 | # Merge answers from first 2 system resolvers 42 | local tmp 43 | for r in "${sysresolvers[@]}"; do 44 | tmp+=$'\n'"$(query "$r" "$rr")" 45 | done 46 | sysset=$(echo "$tmp" | grep -v '^$' | sort -u) 47 | fi 48 | 49 | local cf=$(query 1.1.1.1 "$rr") 50 | local gg=$(query 8.8.8.8 "$rr") 51 | 52 | echo "System:" 53 | [[ -n "$sysset" ]] && echo "$sysset" | sed 's/^/ /' || echo " (none)" 54 | echo "1.1.1.1:" 55 | [[ -n "$cf" ]] && echo "$cf" | sed 's/^/ /' || echo " (none)" 56 | echo "8.8.8.8:" 57 | [[ -n "$gg" ]] && echo "$gg" | sed 's/^/ /' || echo " (none)" 58 | 59 | # Differences summary 60 | local union=$(printf "%s\n%s\n%s\n" "$sysset" "$cf" "$gg" | grep -v '^$' | sort -u) 61 | local diff_flag=false 62 | while IFS= read -r rec; do 63 | [[ -z "$rec" ]] && continue 64 | local present="" 65 | echo "$sysset" | grep -qx "$rec" && present+="S" 66 | echo "$cf" | grep -qx "$rec" && present+="C" 67 | echo "$gg" | grep -qx "$rec" && present+="G" 68 | if [[ "$present" != SCG ]]; then 69 | [[ $diff_flag == false ]] && { echo "-- MISMATCHED ($rr) --"; diff_flag=true; } 70 | echo " $rec [$present]" 71 | fi 72 | done <<< "$union" 73 | } 74 | 75 | echo "dnsdiff: $DOMAIN" 76 | print_section A 77 | print_section AAAA 78 | print_section CNAME 79 | 80 | exit 0 81 | -------------------------------------------------------------------------------- /bin/git/git-branches-clean: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { $ } from "zx" 4 | import chalk from "chalk" 5 | import inquirer from "inquirer" 6 | import simpleGit from "simple-git" 7 | 8 | $.verbose = false 9 | 10 | const git = simpleGit() 11 | 12 | const main = async () => { 13 | try { 14 | const branchesList = (await $`git branch -vv | grep -v 'origin/HEAD'`) 15 | .stdout 16 | const goneBranches = branchesList 17 | .split("\n") 18 | .filter((branch) => branch.includes(": gone]")) 19 | .map((branch) => branch.trim().split(" ")[0]) 20 | 21 | const currentBranch = (await git.revparse(["--abbrev-ref", "HEAD"])).trim() 22 | 23 | if (goneBranches.includes(currentBranch)) { 24 | console.log( 25 | chalk.red( 26 | `Error: The current branch ${currentBranch} is marked as gone on the remote.`, 27 | ), 28 | ) 29 | console.log( 30 | chalk.yellow( 31 | `Switch to a different branch or fix the upstream reference before proceeding.`, 32 | ), 33 | ) 34 | process.exit(1) 35 | } 36 | 37 | await git.fetch() 38 | await git.pull() 39 | 40 | if (goneBranches.length) { 41 | console.log("") 42 | 43 | const answers = await inquirer.prompt([ 44 | { 45 | type: "checkbox", 46 | name: "branchesToDelete", 47 | message: "Select branches to delete:", 48 | choices: goneBranches, 49 | default: goneBranches, 50 | }, 51 | { 52 | type: "confirm", 53 | name: "proceed", 54 | message: "Are you sure you want to delete the selected branches?", 55 | default: false, 56 | }, 57 | ]) 58 | 59 | if (answers.proceed && answers.branchesToDelete.length) { 60 | for (let branch of answers.branchesToDelete) { 61 | if (branch !== currentBranch) { 62 | await git.branch(["-D", branch]) 63 | } else { 64 | console.log( 65 | chalk.yellow( 66 | `Skipping deletion of currently checked-out branch: ${branch}`, 67 | ), 68 | ) 69 | } 70 | } 71 | } else if (!answers.branchesToDelete.length) { 72 | console.log(chalk.yellow("No branches selected for deletion.")) 73 | } 74 | } else { 75 | console.log(chalk.green("No branch to clean.")) 76 | } 77 | } catch (error) { 78 | console.error(chalk.red(`Error: ${error.message}`)) 79 | process.exit(1) 80 | } 81 | } 82 | 83 | main() 84 | -------------------------------------------------------------------------------- /doc/postinstall/firefox.md: -------------------------------------------------------------------------------- 1 | # Firefox 2 | 3 | - Launch Firefox, close it after ~5 seconds, then run: `my run firefox` 4 | - Login to Sync for bookmarks/preferences. 5 | - GUI customisation as desired. 6 | - Set Gmail as default mail handler (via handler prompt or settings) if needed. 7 | - Add `!g` for quick Google search if using keyword shortcuts. 8 | - Configure extension hotkeys (see Extension Hotkey Reference below) to match screenshots. 9 | - Review Settings (General, Privacy & Security, Search) and apply preferred privacy/performance tweaks. 10 | - Activate and sign into key extensions (Raindrop.io, Readwise, KeePassXC Browser) and grant required permissions. 11 | - For KeePassXC Browser: enable native messaging & pair with KeePassXC database. 12 | - Run through each installed extension's options page to finalize preferred defaults. 13 | 14 | ## GUI 15 | 16 |

Firefox UI 1

17 |

Firefox UI 2

18 | 19 | ### Adaptive Tab Bar Colour 20 | 21 | Import `$SYNC_FOLDER/Appdata/Firefox/atbc_pref.json` in the addon's settings. 22 | 23 | ### Extension Hotkey Reference 24 | 25 | Below are the captured screenshots of configured extension keyboard shortcuts. Configure them manually in each addon's Manage Extension Shortcuts panel. 26 | 27 |

Easy Container Shortcuts

28 |

Multi-Account Containers

29 |

Email Address Plus

30 |

Move Tab To Next Window

31 |

Raindrop.io

32 |

Readwise Highlighter

33 |

KeePassXC Browser

34 |

uBlock Origin

35 |

Markdown Web Clipper

36 |

Location Switcher

37 | -------------------------------------------------------------------------------- /bin/git/git-finalise: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # Safer shell settings 4 | set -e 5 | set -u 6 | set -o pipefail 7 | 8 | # Ensure we're in a git repo 9 | if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 10 | echo "Not a git repository." >&2 11 | exit 1 12 | fi 13 | 14 | # Ensure origin exists 15 | if ! git config --get remote.origin.url >/dev/null 2>&1; then 16 | echo "Remote 'origin' not configured." >&2 17 | exit 1 18 | fi 19 | 20 | # Resolve the default branch tracked by origin 21 | HEAD_REF=$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null || true) 22 | if [[ -n "${HEAD_REF:-}" ]]; then 23 | HEAD_BRANCH=$(basename "$HEAD_REF") 24 | else 25 | # Fallback via remote show 26 | HEAD_BRANCH=$(git remote show origin 2>/dev/null | awk '/HEAD branch/ {print $NF}') 27 | fi 28 | 29 | # Last-resort fallback if HEAD not set on remote 30 | if [[ -z "${HEAD_BRANCH:-}" ]]; then 31 | if git show-ref --verify --quiet refs/remotes/origin/main; then 32 | HEAD_BRANCH=main 33 | elif git show-ref --verify --quiet refs/remotes/origin/master; then 34 | HEAD_BRANCH=master 35 | else 36 | echo "Unable to determine origin default branch." >&2 37 | exit 1 38 | fi 39 | fi 40 | 41 | CURRENT_BRANCH=$(git symbolic-ref --quiet --short HEAD 2>/dev/null || git rev-parse --abbrev-ref HEAD) 42 | 43 | # Refuse to run on the default branch by default 44 | if [[ "$CURRENT_BRANCH" == "$HEAD_BRANCH" ]]; then 45 | echo "You are on the default branch '$HEAD_BRANCH'. Refusing to rewrite its history." >&2 46 | echo "Switch to a feature branch first." >&2 47 | exit 1 48 | fi 49 | 50 | echo "Finalising branch '$CURRENT_BRANCH' onto 'origin/$HEAD_BRANCH'..." 51 | 52 | # Auto-stash uncommitted changes to avoid rebase aborts 53 | STASH_LABEL="tmp-finalise-$(date +%s)" 54 | restore_stash() { 55 | # Find the stash entry by label and pop it if present 56 | local entry 57 | entry=$(git stash list --format='%gd:%gs' | grep "$STASH_LABEL" | head -n1 | cut -d: -f1 || true) 58 | if [[ -n "${entry:-}" ]]; then 59 | git stash pop "$entry" >/dev/null 2>&1 || true 60 | fi 61 | } 62 | trap restore_stash EXIT INT TERM 63 | 64 | # Stash including untracked files; ignore if nothing to stash 65 | git stash push -u -m "$STASH_LABEL" >/dev/null 2>&1 || true 66 | 67 | # Refresh onto latest default branch, then interactively tidy with autosquash 68 | git fetch --prune origin 69 | git rebase "origin/${HEAD_BRANCH}" 70 | git rebase -i --autosquash "origin/${HEAD_BRANCH}" 71 | 72 | # Attempt to restore stash (trap will also catch abnormal exits) 73 | restore_stash 74 | trap - EXIT INT TERM 75 | 76 | echo "Done. Branch '$CURRENT_BRANCH' rebased and interactively finalised on 'origin/$HEAD_BRANCH'." 77 | -------------------------------------------------------------------------------- /bin/trackpad-connect: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Get the Home Trackpad MAC address from connected devices 4 | get_trackpad_address() { 5 | system_profiler SPBluetoothDataType 2>/dev/null | \ 6 | grep -i -A 10 "Home Trackpad" | \ 7 | grep "Address" | \ 8 | head -1 | \ 9 | awk '{print $NF}' 10 | } 11 | 12 | case "${1:-switch}" in 13 | unpair) 14 | TRACKPAD_ADDR=$(get_trackpad_address) 15 | 16 | if [[ -z "$TRACKPAD_ADDR" ]]; then 17 | echo "⚠️ No trackpad currently connected." 18 | exit 1 19 | fi 20 | 21 | echo "🔵 Found trackpad: $TRACKPAD_ADDR" 22 | echo "🔌 Unpairing trackpad..." 23 | blueutil --unpair "$TRACKPAD_ADDR" 24 | 25 | echo "✅ Trackpad unpaired. You can now pair it with another computer." 26 | ;; 27 | 28 | pair) 29 | echo "🔍 Scanning for trackpad in pairing mode..." 30 | echo "💡 Make sure your trackpad is in pairing mode (hold power button until LED blinks)" 31 | echo "" 32 | 33 | blueutil --inquiry 5 2>/dev/null | while read -r line; do 34 | if echo "$line" | grep -iq "Home Trackpad"; then 35 | ADDR=$(echo "$line" | awk '{print $2}' | tr -d ',') 36 | echo "🔵 Found trackpad: $ADDR" 37 | echo "🔗 Attempting to pair..." 38 | blueutil --pair "$ADDR" 39 | echo "✅ Pairing initiated!" 40 | break 41 | fi 42 | done 43 | ;; 44 | 45 | switch) 46 | TRACKPAD_ADDR=$(get_trackpad_address) 47 | 48 | if [[ -n "$TRACKPAD_ADDR" ]]; then 49 | echo "🔵 Found trackpad: $TRACKPAD_ADDR" 50 | echo "🔌 Unpairing trackpad..." 51 | blueutil --unpair "$TRACKPAD_ADDR" 52 | echo "✅ Trackpad unpaired." 53 | echo "" 54 | else 55 | echo "⚠️ No trackpad currently connected. Skipping unpair step." 56 | echo "" 57 | fi 58 | 59 | echo "🔍 Now scanning for trackpad in pairing mode..." 60 | echo "💡 Put your trackpad in pairing mode (hold power button until LED blinks)" 61 | echo "" 62 | sleep 2 63 | 64 | blueutil --inquiry 5 2>/dev/null | while read -r line; do 65 | if echo "$line" | grep -iq "Home Trackpad"; then 66 | ADDR=$(echo "$line" | awk '{print $2}' | tr -d ',') 67 | echo "🔵 Found trackpad: $ADDR" 68 | echo "🔗 Attempting to pair..." 69 | blueutil --pair "$ADDR" 70 | echo "✅ Pairing initiated!" 71 | break 72 | fi 73 | done 74 | ;; 75 | 76 | *) 77 | echo "Usage: trackpad-connect [switch|unpair|pair]" 78 | echo "" 79 | echo " switch - Unpair then pair again (default)" 80 | echo " unpair - Unpair current trackpad" 81 | echo " pair - Scan and pair trackpad in pairing mode" 82 | exit 1 83 | ;; 84 | esac 85 | -------------------------------------------------------------------------------- /shell/environment.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # # 3 | # ⚡ ENVIRONMENT CONFIGURATION # 4 | # ---------------------------- # 5 | # Environment configuration and smart URL handling. # 6 | # # 7 | ################################################################################ 8 | 9 | # Utility functions 10 | autoload -Uz is-at-least 11 | autoload -Uz zmv # Mass file operations: zmv '(*).txt' '$1.bak' 12 | 13 | # Smart URLs - Handle URL pasting and quoting 14 | if [[ $ZSH_VERSION != 5.1.1 && $TERM != dumb ]]; then 15 | if is-at-least 5.2; then 16 | autoload -Uz bracketed-paste-url-magic 17 | zle -N bracketed-paste bracketed-paste-url-magic 18 | elif is-at-least 5.1; then 19 | autoload -Uz bracketed-paste-magic 20 | zle -N bracketed-paste bracketed-paste-magic 21 | fi 22 | autoload -Uz url-quote-magic 23 | zle -N self-insert url-quote-magic 24 | fi 25 | 26 | # 27 | # General Options 28 | # 29 | setopt BEEP # Beep on error in shell 30 | setopt COMBINING_CHARS # Combine zero-length punctuation characters (accents) 31 | setopt INTERACTIVE_COMMENTS # Enable comments in interactive shell 32 | setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage' 33 | unsetopt MAIL_WARNING # Don't print warning if mail file accessed 34 | 35 | # Allow mapping Ctrl+S and Ctrl+Q shortcuts 36 | [[ -r ${TTY:-} && -w ${TTY:-} && $+commands[stty] == 1 ]] && stty -ixon <$TTY >$TTY 37 | 38 | # 39 | # Job Control 40 | # 41 | setopt LONG_LIST_JOBS # List jobs in long format by default 42 | setopt AUTO_RESUME # Attempt to resume existing job before creating new process 43 | setopt NOTIFY # Report status of background jobs immediately 44 | unsetopt BG_NICE # Don't run background jobs at lower priority 45 | unsetopt HUP # Don't kill jobs on shell exit 46 | unsetopt CHECK_JOBS # Don't report on jobs when shell exits 47 | 48 | # 49 | # Termcap - Colorized man pages 50 | # 51 | export LESS_TERMCAP_mb=$'\E[01;31m' # Begins blinking 52 | export LESS_TERMCAP_md=$'\E[01;31m' # Begins bold 53 | export LESS_TERMCAP_me=$'\E[0m' # Ends mode 54 | export LESS_TERMCAP_se=$'\E[0m' # Ends standout-mode 55 | export LESS_TERMCAP_so=$'\E[00;47;30m' # Begins standout-mode 56 | export LESS_TERMCAP_ue=$'\E[0m' # Ends underline 57 | export LESS_TERMCAP_us=$'\E[01;32m' # Begins underline 58 | -------------------------------------------------------------------------------- /bin/git/git-refresh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | set -e 4 | set -u 5 | set -o pipefail 6 | 7 | # Ensure we're in a git repo 8 | if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 9 | echo $'\033[1;31m\uf00d\033[0m'" Not a git repository." >&2 10 | exit 1 11 | fi 12 | 13 | # Ensure origin exists 14 | if ! git config --get remote.origin.url >/dev/null 2>&1; then 15 | echo $'\033[1;31m\uf00d\033[0m'" Remote 'origin' not configured." >&2 16 | exit 1 17 | fi 18 | 19 | # Resolve the default branch tracked by origin 20 | HEAD_REF=$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null || true) 21 | if [[ -n "${HEAD_REF:-}" ]]; then 22 | HEAD_BRANCH=$(basename "$HEAD_REF") 23 | else 24 | HEAD_BRANCH=$(git remote show origin 2>/dev/null | awk '/HEAD branch/ {print $NF}') 25 | fi 26 | 27 | if [[ -z "${HEAD_BRANCH:-}" ]]; then 28 | if git show-ref --verify --quiet refs/remotes/origin/main; then 29 | HEAD_BRANCH=main 30 | elif git show-ref --verify --quiet refs/remotes/origin/master; then 31 | HEAD_BRANCH=master 32 | else 33 | echo $'\033[1;31m\uf00d\033[0m'" Unable to determine origin default branch." >&2 34 | exit 1 35 | fi 36 | fi 37 | 38 | CURRENT_BRANCH=$(git symbolic-ref --quiet --short HEAD 2>/dev/null || git rev-parse --abbrev-ref HEAD) 39 | echo $'\033[1;36m\uf021\033[0m'" Refreshing "$'\033[1;33m\ue0a0\033[0m\033[1m'" $CURRENT_BRANCH"$'\033[0m'" onto "$'\033[1;35m\uf09b\033[0m\033[1m'" origin/$HEAD_BRANCH"$'\033[0m'"..." 40 | 41 | # Auto-stash uncommitted changes to avoid rebase aborts 42 | STASH_LABEL="tmp-refresh-$(date +%s)" 43 | restore_stash() { 44 | local entry 45 | entry=$(git stash list --format='%gd:%gs' | grep "$STASH_LABEL" | head -n1 | cut -d: -f1 || true) 46 | if [[ -n "${entry:-}" ]]; then 47 | git stash pop "$entry" >/dev/null 2>&1 || true 48 | fi 49 | } 50 | trap restore_stash EXIT INT TERM 51 | 52 | HAS_CHANGES=false 53 | if ! git diff-index --quiet HEAD -- 2>/dev/null || [[ -n $(git ls-files --others --exclude-standard 2>/dev/null) ]]; then 54 | HAS_CHANGES=true 55 | echo $'\033[1;33m\uf187\033[0m'" Stashing uncommitted changes..." 56 | fi 57 | git stash push -u -m "$STASH_LABEL" >/dev/null 2>&1 || true 58 | 59 | echo $'\033[1;34m\uf0ed\033[0m'" Fetching from origin..." 60 | git fetch --prune origin 61 | echo $'\033[1;35m\ue727\033[0m'" Rebasing onto origin/${HEAD_BRANCH}..." 62 | git rebase "origin/${HEAD_BRANCH}" 63 | 64 | if [[ "$HAS_CHANGES" == "true" ]]; then 65 | echo $'\033[1;32m\uf0e2\033[0m'" Restoring stashed changes..." 66 | fi 67 | restore_stash 68 | trap - EXIT INT TERM 69 | 70 | echo $'\033[1;32m\uf00c\033[0m'" Done! Branch "$'\033[1;33m\ue0a0\033[0m\033[1m'" $CURRENT_BRANCH"$'\033[0m'" is up to date with "$'\033[1;35m\uf09b\033[0m\033[1m'" origin/$HEAD_BRANCH"$'\033[0m' 71 | -------------------------------------------------------------------------------- /bin/git/git-scan-big: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # git-scan-big - List largest tracked files in the current git repository. 4 | # Usage: git-scan-big [count] [--history] 5 | # count Number of largest files to show (default: 20) 6 | # --history ALSO scan full git object history (slow) for large blobs 7 | # 8 | # Columns: 9 | # SIZE PATH (for working tree) or BLOB:HASH (for history) 10 | # 11 | # Notes: 12 | # - Working tree mode respects .gitignore (only tracked files via git ls-files) 13 | # - History mode: shows unique blob sizes across all refs (can reveal deleted large files) 14 | # 15 | # Exit codes: 16 | # 0 success 17 | # 1 not a git repo 18 | # 2 invalid arguments 19 | 20 | set -euo pipefail 21 | 22 | count=20 23 | scan_history=false 24 | 25 | for arg in "$@"; do 26 | case "$arg" in 27 | --history) scan_history=true ;; 28 | ''|*[!0-9]*) ;; # ignore non-numeric here, will validate below 29 | *) count="$arg" ;; 30 | esac 31 | done 32 | 33 | if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 34 | echo "git-scan-big: not inside a git repository" >&2 35 | exit 1 36 | fi 37 | 38 | if ! [[ "$count" =~ ^[0-9]+$ ]]; then 39 | echo "git-scan-big: count must be a number" >&2 40 | exit 2 41 | fi 42 | 43 | human(){ 44 | local size=$1 45 | local units=(B K M G T) 46 | local i=0 47 | local val=$size 48 | while (( val > 1024 && i < ${#units[@]}-1 )); do 49 | val=$(( (val + 1023)/1024 )) 50 | ((i++)) 51 | done 52 | echo "${val}${units[$i]}" 53 | } 54 | 55 | # Working tree largest tracked files 56 | echo "== Working Tree (Top $count) ==" 57 | # git ls-files -z for safety; du in KB; convert to bytes (KB*1024) for sort precision 58 | # Use awk to format human-readable 59 | if git ls-files -z | xargs -0 du -k 2>/dev/null | sort -n | tail -n "$count" | awk '{print $1"\t"$2}' | while IFS=$'\t' read -r kb path; do 60 | bytes=$((kb*1024)) 61 | printf "%8s %s\n" "$(human "$bytes")" "$path" 62 | fi; then 63 | : 64 | else 65 | echo "(no tracked files?)" 66 | fi 67 | 68 | echo 69 | if [[ "$scan_history" == true ]]; then 70 | echo "== History Blobs (Top $count) ==" 71 | # rev-list objects, map to blob sizes 72 | # Format: (path unknown for deleted unless using more plumbing; we just show hash) 73 | tmp=$(mktemp -t git-scan-big.XXXX) 74 | git rev-list --objects --all | awk '{print $1}' | git cat-file --batch-check > "$tmp" 75 | # Lines look like: blob 76 | awk '/ blob /{print $3"\t"$1}' "$tmp" | sort -n | tail -n "$count" | while IFS=$'\t' read -r size hash; do 77 | printf "%8s BLOB:%s\n" "$(human "$size")" "$hash" 78 | done 79 | rm -f "$tmp" 80 | else 81 | echo "(Add --history to include historical large blobs)" 82 | fi 83 | 84 | exit 0 85 | -------------------------------------------------------------------------------- /bin/git/git-tag-version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Git tag version helper with fancy output 4 | # Creates semantic version tags using svu 5 | # Usage: git tag-version {major|minor|patch|next|current} 6 | 7 | set -euo pipefail 8 | 9 | usage() { 10 | echo "Usage: git tag-version {major|minor|patch|next|current}" >&2 11 | echo "Creates a semantic version tag using svu" >&2 12 | } 13 | 14 | arg=${1:-} 15 | case "$arg" in 16 | major) 17 | VERSION_TYPE=major ;; 18 | minor) 19 | VERSION_TYPE=minor ;; 20 | patch) 21 | VERSION_TYPE=patch ;; 22 | next) 23 | VERSION_TYPE=next ;; 24 | current) 25 | VERSION_TYPE=current ;; 26 | -h|--help|"") 27 | usage; exit 1 ;; 28 | *) 29 | echo "Error: version type must be one of: major minor patch next current" >&2 30 | usage; exit 1 ;; 31 | esac 32 | 33 | # Check for svu 34 | if ! command -v svu &>/dev/null; then 35 | echo "Error: svu not found. Install with: brew install caarlos0/tap/svu" >&2 36 | exit 1 37 | fi 38 | 39 | # Get current version (or 0.0.0 if no tags exist) 40 | OLD_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.0.0") 41 | 42 | # Calculate and create new tag 43 | NEW_TAG=$(svu "$VERSION_TYPE") 44 | git tag "$NEW_TAG" 45 | NEW_VERSION="${NEW_TAG#v}" 46 | 47 | # Fancy summary (TTY & colors if possible) 48 | if [[ -t 1 && -z ${NO_COLOR:-} ]]; then 49 | B=$'\e[1m'; R=$'\e[0m'; G=$'\e[32m'; Y=$'\e[33m'; C=$'\e[36m'; M=$'\e[35m'; GRY=$'\e[90m' 50 | else 51 | B=""; R=""; G=""; Y=""; C=""; M=""; GRY="" 52 | fi 53 | 54 | strip_ansi() { 55 | printf '%s' "$1" | sed -E $'s/\x1b\[[0-9;]*m//g' 56 | } 57 | 58 | echo 59 | # Plain (no border) summary lines 60 | LABEL_COL="${Y}Tag created:${R}" 61 | OLD_COL="${G}v${OLD_VERSION}${R}" 62 | NEW_COL="${G}v${NEW_VERSION}${R}" 63 | ARROW_COL="->" 64 | echo "${LABEL_COL} ${OLD_COL} ${ARROW_COL} ${NEW_COL}" 65 | 66 | # Styled type pill 67 | if [[ -t 1 && -z ${NO_COLOR:-} ]]; then 68 | case "$VERSION_TYPE" in 69 | major) 70 | TYPE_CLR=196 ;; # bright red 71 | minor) 72 | TYPE_CLR=208 ;; # orange 73 | patch) 74 | TYPE_CLR=240 ;; # grey 75 | next) 76 | TYPE_CLR=39 ;; # cyan/blue for pre-release 77 | current) 78 | TYPE_CLR=34 ;; # green for current 79 | *) 80 | TYPE_CLR=240 ;; # gray fallback 81 | esac 82 | TYPE_BG=$'\e[48;5;'${TYPE_CLR}'m' 83 | TYPE_FG=$'\e[38;5;'${TYPE_CLR}'m' 84 | TYPE_TEXT_FG=$'\e[38;5;15m' 85 | # Left rounded edge: foreground same as pill color on default background 86 | # Then set background for pill content; right edge printed after reset. 87 | TYPE_TAG=$'\e[0m'"${TYPE_FG}${TYPE_BG}${TYPE_TEXT_FG}${VERSION_TYPE}${R}${TYPE_FG}${R}" 88 | else 89 | TYPE_TAG="[${VERSION_TYPE}]" 90 | fi 91 | echo "${Y}Type:${R} ${TYPE_TAG}" 92 | echo "${GRY}Tip: Push with 'git push --tags'${R}" 93 | echo 94 | -------------------------------------------------------------------------------- /bin/main/cdx: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | # Codex launcher with a cinematic ">_ OpenAI Codex" splash 4 | # animation, then hands off to the real `codex` CLI. 5 | 6 | set -e 7 | 8 | # Ensure codex exists 9 | if ! command -v codex >/dev/null 2>&1; then 10 | echo "cdx: codex binary not found in PATH" >&2 11 | exit 127 12 | fi 13 | 14 | show_codex_splash() { 15 | # Only animate when attached to a real terminal 16 | if [[ ! -t 0 || ! -t 1 ]]; then 17 | return 18 | fi 19 | 20 | # Basic colors 21 | local RESET=$'\e[0m' 22 | local BOLD=$'\e[1m' 23 | local WHITE=$'\e[97m' 24 | local DIM=$'\e[2m' 25 | 26 | # Hide cursor during animation and restore afterwards 27 | tput civis 2>/dev/null || true 28 | local restore_cursor() { tput cnorm 2>/dev/null || true; } 29 | trap restore_cursor EXIT 30 | 31 | printf "\n" 32 | 33 | # Title text 34 | local full_line=">_ OpenAI Codex" 35 | local cursor="▊" 36 | 37 | # Phase 1: blinking prompt ">_" before the rest appears 38 | local prompt=">_" 39 | local k 40 | for k in {1..4}; do 41 | printf "\r %s%s%s%s" "$BOLD$WHITE" "$prompt" "$cursor" "$RESET" 42 | sleep 0.13 43 | printf "\r %s%s %s" "$BOLD$WHITE" "$prompt" "$RESET" 44 | sleep 0.13 45 | done 46 | 47 | # Phase 2: type the rest of the text after ">_ " 48 | local suffix=" OpenAI Codex" 49 | local fragment i 50 | for (( i = 1; i <= ${#suffix}; i++ )); do 51 | fragment=${suffix[1,i]} 52 | printf "\r %s>_%s%s%s" "$BOLD$WHITE" "$fragment" "$cursor" "$RESET" 53 | sleep 0.05 54 | done 55 | 56 | full_line=">_${suffix}" 57 | 58 | # Phase 3: subtle cursor blink at the completed title 59 | local j 60 | for j in {1..6}; do 61 | if (( j % 2 )); then 62 | printf "\r %s%s%s%s" "$BOLD$WHITE" "$full_line" "$cursor" "$RESET" 63 | else 64 | printf "\r %s%s %s" "$BOLD$WHITE" "$full_line" "$RESET" 65 | fi 66 | sleep 0.1 67 | done 68 | 69 | # Phase 4: shiny highlight sweep across the title (like a light passing over) 70 | local len=${#full_line} 71 | local idx left mid right 72 | for (( idx = 1; idx <= len; idx++ )); do 73 | left=""; right=""; mid="${full_line[idx,1]}" 74 | if (( idx > 1 )); then 75 | left=${full_line[1,idx-1]} 76 | fi 77 | if (( idx < len )); then 78 | right=${full_line[idx+1,-1]} 79 | fi 80 | # Dim outer text, bright highlight on current character 81 | printf "\r %s%s%s%s%s%s" "$DIM$WHITE" "$left" "$BOLD$WHITE" "$mid" "$DIM$WHITE" "$right$RESET" 82 | sleep 0.03 83 | done 84 | 85 | # Phase 5: settle on the final bright title 86 | printf "\r %s%s %s\n\n" "$BOLD$WHITE" "$full_line" "$RESET" 87 | 88 | # Restore cursor before leaving the function 89 | restore_cursor 90 | trap - EXIT 91 | } 92 | 93 | show_codex_splash 94 | 95 | # Hand off to the real codex binary, preserving args 96 | exec codex "$@" -------------------------------------------------------------------------------- /core/cli/abbr.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ################################################################################ 4 | # # 5 | # 🚀 ABBREVIATIONS MANAGER # 6 | # --------------------- # 7 | # Dynamically manages shell abbreviations from config/cli/abbr.yml # 8 | # # 9 | ################################################################################ 10 | 11 | source ~/.zshrc 12 | source $MY/core/utils/helper.zsh 13 | source $MY/core/utils/ui-kit.zsh 14 | 15 | config_file="$MY/config/cli/abbr.yml" 16 | 17 | 18 | # Only load if abbr command is available 19 | if ! ensure_command_available "abbr" "" "false"; then 20 | return 1 21 | fi 22 | 23 | # Check if yq is available 24 | if ! ensure_command_available "yq" "Install with: brew install yq" "false"; then 25 | return 1 26 | fi 27 | 28 | # Build desired abbreviations map from YAML (key=value lines) 29 | typeset -A desired_abbrs 30 | while IFS='=' read -r key value; do 31 | [[ -z "$key" ]] && continue 32 | desired_abbrs[$key]="$value" 33 | done < <(yq eval '.abbreviations | to_entries | .[] | .key + "=" + .value' "$config_file") 34 | 35 | # Collect current abbreviation keys (strip quotes if any) 36 | current_keys=() 37 | while IFS= read -r line; do 38 | line=${line//\"/} 39 | [[ -n "$line" ]] && current_keys+=("$line") 40 | done < <(abbr list-abbreviations 2>/dev/null) 41 | 42 | # Remove stale abbreviations (keys present now but not in config) 43 | stale_abbrs=() 44 | for name in $current_keys; do 45 | if [[ -z ${desired_abbrs[$name]+_} ]]; then 46 | abbr erase "$name" >/dev/null 2>&1 47 | stale_abbrs+=("$name") 48 | fi 49 | done 50 | 51 | # Add new abbreviations (keys in config but not currently defined) 52 | added_abbrs=() 53 | for name value in ${(kv)desired_abbrs}; do 54 | if ! (( ${current_keys[(I)$name]} )); then 55 | if abbr "$name"="$value" >/dev/null 2>&1; then 56 | added_abbrs+=("$name") 57 | fi 58 | else 59 | # Key exists; redefine to ensure value matches config (cheap idempotent) 60 | abbr "$name"="$value" >/dev/null 2>&1 61 | fi 62 | done 63 | 64 | # Reporting 65 | if [[ ${#stale_abbrs[@]} -gt 0 ]]; then 66 | count=${#stale_abbrs[@]} 67 | noun="abbreviation" 68 | [[ $count -ne 1 ]] && noun+="s" 69 | ui_info_simple "Removed $count stale $noun" 70 | fi 71 | if [[ ${#added_abbrs[@]} -gt 0 ]]; then 72 | count=${#added_abbrs[@]} 73 | noun="abbreviation" 74 | [[ $count -ne 1 ]] && noun+="s" 75 | ui_info_simple "Added $count new $noun" 76 | for n in $added_abbrs; do echo " • $n"; done 77 | fi 78 | if [[ ${#stale_abbrs[@]} -eq 0 && ${#added_abbrs[@]} -eq 0 ]]; then 79 | ui_info_simple "Abbreviations already aligned with config" 80 | fi 81 | --------------------------------------------------------------------------------