mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nix): migrate fish shell and direnv to Nix
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
- clean: ["~"]
|
||||
|
||||
- link:
|
||||
~/.config/fish: fish
|
||||
~/.config/nvim: nvim
|
||||
|
||||
- shell:
|
||||
|
||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -1,11 +1,2 @@
|
||||
# Neovim
|
||||
nvim/plugin
|
||||
|
||||
# Vale
|
||||
.vale/proselint
|
||||
.vale/Readability
|
||||
.vale/write-good
|
||||
kitty/kitty.conf.bak
|
||||
# Karabiner backups
|
||||
automatic_backups
|
||||
Brewfile.lock.json
|
||||
fish/fish_variables
|
||||
|
||||
378
Brewfile
378
Brewfile
@@ -1,378 +0,0 @@
|
||||
tap "dustinblackman/tap"
|
||||
tap "homebrew/bundle"
|
||||
tap "homebrew/services"
|
||||
# Bourne-Again SHell, a UNIX command interpreter
|
||||
brew "bash"
|
||||
# GNU compiler collection
|
||||
brew "gcc"
|
||||
# Cryptography and SSL/TLS Toolkit
|
||||
brew "openssl@3"
|
||||
# High performance message passing library
|
||||
brew "open-mpi"
|
||||
# Cryptography and SSL/TLS Toolkit
|
||||
brew "openssl@1.1"
|
||||
# Console-based Audio Visualizer for ALSA
|
||||
brew "cava"
|
||||
# macOS CLI for managing custom icons for files and folders
|
||||
brew "fileicon"
|
||||
# User-friendly command-line shell for UNIX-like operating systems
|
||||
brew "fish"
|
||||
# GNU internationalization (i18n) and localization (l10n) library
|
||||
brew "gettext"
|
||||
# C/C++ and Java libraries for Unicode and globalization
|
||||
brew "icu4c"
|
||||
# Conversion library
|
||||
brew "libiconv"
|
||||
# Just-In-Time Compiler (JIT) for the Lua programming language
|
||||
brew "luajit", args: ["HEAD"]
|
||||
# Mac App Store command-line interface
|
||||
brew "mas"
|
||||
# Parser generator tool and incremental parsing library
|
||||
brew "tree-sitter"
|
||||
# Ambitious Vim-fork focused on extensibility and agility
|
||||
brew "neovim"
|
||||
# Platform built on V8 to build network applications
|
||||
brew "node"
|
||||
# Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML
|
||||
brew "prettier"
|
||||
# Cross-shell prompt for astronauts
|
||||
brew "starship"
|
||||
# Terminal multiplexer
|
||||
brew "tmux"
|
||||
# URL extractor/launcher
|
||||
brew "urlview"
|
||||
# Process YAML, JSON, XML, CSV and properties documents from the CLI
|
||||
brew "yq"
|
||||
# UNIX shell (command interpreter)
|
||||
brew "zsh"
|
||||
# Fish shell like syntax highlighting for zsh
|
||||
brew "zsh-syntax-highlighting"
|
||||
# Terminal UI to chat with large language models (LLM) using backends such as Ollama, and direct integrations with your favourite editor like Neovim!
|
||||
brew "dustinblackman/tap/oatmeal"
|
||||
# Professional graphic design software
|
||||
cask "affinity-designer"
|
||||
# Professional image editing software
|
||||
cask "affinity-photo"
|
||||
# Professional desktop publishing software
|
||||
cask "affinity-publisher"
|
||||
# Application launcher and productivity software
|
||||
cask "alfred"
|
||||
# Network scanner
|
||||
cask "angry-ip-scanner"
|
||||
# Webcam & audio device software
|
||||
cask "ankerwork"
|
||||
# Memory training application
|
||||
cask "anki"
|
||||
# Chromium based browser
|
||||
cask "arc"
|
||||
# Edit and manage bibliographies
|
||||
cask "bibdesk"
|
||||
# 3D creation suite
|
||||
cask "blender"
|
||||
# 3D performance benchmarking tool
|
||||
cask "blender-benchmark"
|
||||
# Utility to dim background/inactive content in the screen
|
||||
cask "blurred"
|
||||
# Web browser focusing on privacy
|
||||
cask "brave-browser"
|
||||
# E-books management software
|
||||
cask "calibre"
|
||||
# Screen capturing tool
|
||||
cask "cleanshot"
|
||||
cask "color-oracle"
|
||||
# Multi-platform client-side cloud file encryption tool
|
||||
cask "cryptomator"
|
||||
# Disk space visualiser
|
||||
cask "daisydisk"
|
||||
# Browser for SQLite databases
|
||||
cask "db-browser-for-sqlite"
|
||||
# Trains AIs to understand and translate texts
|
||||
cask "deepl"
|
||||
# Collect, organise, edit and annotate documents
|
||||
cask "devonthink"
|
||||
# App to build and share containerised applications and microservices
|
||||
cask "docker"
|
||||
# Client for the Dropbox cloud storage service
|
||||
cask "dropbox"
|
||||
# Collaborative team software
|
||||
cask "figma"
|
||||
# Web browser
|
||||
cask "firefox"
|
||||
# Web browser
|
||||
cask "firefox@developer-edition"
|
||||
cask "font-fira-code"
|
||||
cask "font-fira-code-nerd-font"
|
||||
cask "font-fira-sans"
|
||||
cask "font-fira-sans-condensed"
|
||||
cask "font-hack-nerd-font"
|
||||
cask "font-ia-writer-duo"
|
||||
cask "font-ia-writer-mono"
|
||||
cask "font-ia-writer-quattro"
|
||||
cask "font-monaspace"
|
||||
cask "font-noto-emoji"
|
||||
cask "font-symbols-only-nerd-font"
|
||||
# Free VPN client for FortiClient
|
||||
cask "forticlient-vpn"
|
||||
# Disk space cleaner that finds and deletes duplicated and similar files
|
||||
cask "gemini"
|
||||
# Japanese input software
|
||||
cask "google-japanese-ime"
|
||||
# Tools to protect your files
|
||||
cask "gpg-suite-no-mail"
|
||||
# Desktop automation application
|
||||
cask "hammerspoon"
|
||||
# Open-source video transcoder
|
||||
cask "handbrake"
|
||||
# Create presentation slides from a Markdown document
|
||||
cask "ia-presenter"
|
||||
# Tool to optimise images to a smaller size
|
||||
cask "imageoptim"
|
||||
# Tool to scan a website checking for broken links
|
||||
cask "integrity"
|
||||
# Menu bar calendar
|
||||
cask "itsycal"
|
||||
# Spot and merge differences in text and image files or folders
|
||||
cask "kaleidoscope@3"
|
||||
# Open-source screen recorder built with web technology
|
||||
cask "kap"
|
||||
# Grammar, spelling and style suggestions in all the writing apps
|
||||
cask "languagetool"
|
||||
# Official client for LBRY, a decentralised file-sharing and payment network
|
||||
cask "lbry"
|
||||
# Wallet desktop application to maintain multiple cryptocurrencies
|
||||
cask "ledger-live"
|
||||
# File system integration
|
||||
cask "macfuse"
|
||||
# Video format converter (transcoder)
|
||||
cask "makemkv"
|
||||
# Email client
|
||||
cask "microsoft-outlook"
|
||||
# Meet, chat, call, and collaborate in just one place
|
||||
cask "microsoft-teams"
|
||||
# App to write, plan, collaborate, and get organised
|
||||
cask "notion"
|
||||
# Knowledge base that works on top of a local folder of plain text Markdown files
|
||||
cask "obsidian"
|
||||
# Organise all your reference images in one place
|
||||
cask "ogdesign-eagle"
|
||||
# Get up and running with large language models locally
|
||||
cask "ollama"
|
||||
# Control your smart light system
|
||||
cask "philips-hue-sync"
|
||||
# Client for Proton Drive
|
||||
cask "proton-drive"
|
||||
# Client for Proton Mail and Proton Calendar
|
||||
cask "proton-mail"
|
||||
# Desktop client for Proton Pass
|
||||
cask "proton-pass"
|
||||
# Bridges Proton Mail to email clients supporting IMAP and SMTP protocols
|
||||
cask "protonmail-bridge"
|
||||
# VPN client focusing on security
|
||||
cask "protonvpn"
|
||||
# All-in-one bookmark manager
|
||||
cask "raindropio"
|
||||
# Imaging utility to install operating systems to a microSD card
|
||||
cask "raspberry-pi-imager"
|
||||
# Control your tools with a few keystrokes
|
||||
cask "raycast"
|
||||
# Save articles to read, highlight key content, and organise notes for review
|
||||
cask "reader"
|
||||
# Store SSH keys in the Secure Enclave
|
||||
cask "secretive"
|
||||
# Tool for sending personal documents to Kindles from Macs
|
||||
cask "send-to-kindle"
|
||||
# Onion routing based messenger
|
||||
cask "session"
|
||||
# Tool that provides consistent, highly configurable symbols for apps
|
||||
cask "sf-symbols"
|
||||
# Instant messaging application focusing on security
|
||||
cask "signal"
|
||||
# Control your Sonos system
|
||||
cask "sonos"
|
||||
# Music streaming service
|
||||
cask "spotify"
|
||||
# Interior design application
|
||||
cask "sweet-home3d"
|
||||
# Unpacks archive files
|
||||
cask "the-unarchiver"
|
||||
# Web browser focusing on security
|
||||
cask "tor-browser"
|
||||
# File transfer application
|
||||
cask "transmit"
|
||||
# Disk encryption software focusing on security based on TrueCrypt
|
||||
cask "veracrypt"
|
||||
# Virtualizer for x86 and arm64 hardware
|
||||
cask "virtualbox@beta"
|
||||
# Open-source code editor
|
||||
cask "visual-studio-code"
|
||||
# Multimedia player
|
||||
cask "vlc"
|
||||
# Web browser plugin
|
||||
cask "vlc-webplugin"
|
||||
# Torrent streaming application
|
||||
cask "webtorrent"
|
||||
# GPU-accelerated cross-platform terminal emulator and multiplexer
|
||||
cask "wezterm"
|
||||
# Native desktop client for WhatsApp
|
||||
cask "whatsapp"
|
||||
# Tax declaration for the fiscal year 2023
|
||||
cask "wiso-steuer-2024"
|
||||
# Multiplayer code editor
|
||||
cask "zed"
|
||||
mas "1-Click Video Converter", id: 717545086
|
||||
mas "Aiko", id: 1672085276
|
||||
mas "DaVinci Resolve", id: 571213070
|
||||
mas "Day One", id: 1055511498
|
||||
mas "Deliveries", id: 290986013
|
||||
mas "Draw Things", id: 6444050820
|
||||
mas "Exporter", id: 1099120373
|
||||
mas "Free MP4 Converter", id: 693443591
|
||||
mas "Goodnotes", id: 1444383602
|
||||
mas "iA Writer", id: 775737590
|
||||
mas "iFinance 5", id: 1500241909
|
||||
mas "Key Codes", id: 414568915
|
||||
mas "Keynote", id: 409183694
|
||||
mas "Kindle", id: 302584613
|
||||
mas "Mela", id: 1568924476
|
||||
mas "MindNode", id: 1289197285
|
||||
mas "Numbers", id: 409203825
|
||||
mas "Pages", id: 409201541
|
||||
mas "Proton Pass for Safari", id: 6502835663
|
||||
mas "Pure Paste", id: 1611378436
|
||||
mas "Reeder", id: 1529448980
|
||||
mas "Save to Raindrop.io", id: 1549370672
|
||||
mas "Smart Converter", id: 447513724
|
||||
mas "The Unarchiver", id: 425424353
|
||||
mas "Things", id: 904280696
|
||||
mas "Time Sink", id: 404363161
|
||||
mas "Typeface", id: 1062679359
|
||||
mas "Yoink", id: 457622435
|
||||
vscode "activitywatch.aw-watcher-vscode"
|
||||
vscode "adamvoss.vscode-languagetool"
|
||||
vscode "ahmadalli.vscode-nginx-conf"
|
||||
vscode "akamud.vscode-caniuse"
|
||||
vscode "alefragnani.bookmarks"
|
||||
vscode "alefragnani.project-manager"
|
||||
vscode "anteprimorac.html-end-tag-labels"
|
||||
vscode "arcticicestudio.nord-visual-studio-code"
|
||||
vscode "ardenivanov.svelte-intellisense"
|
||||
vscode "astro-build.astro-vscode"
|
||||
vscode "asvetliakov.snapshot-tools"
|
||||
vscode "azemoh.one-monokai"
|
||||
vscode "bbenoist.nix"
|
||||
vscode "bierner.markdown-preview-github-styles"
|
||||
vscode "bradlc.vscode-tailwindcss"
|
||||
vscode "chakrounanas.turbo-console-log"
|
||||
vscode "chrischinchilla.vale-vscode"
|
||||
vscode "christian-kohler.npm-intellisense"
|
||||
vscode "christian-kohler.path-intellisense"
|
||||
vscode "chrmarti.regex"
|
||||
vscode "codeium.codeium"
|
||||
vscode "codesandbox-io.codesandbox-projects"
|
||||
vscode "codezombiech.gitignore"
|
||||
vscode "continue.continue"
|
||||
vscode "csstools.postcss"
|
||||
vscode "cstrachan.vcard"
|
||||
vscode "davidlday.languagetool-linter"
|
||||
vscode "daylerees.rainglow"
|
||||
vscode "dbaeumer.vscode-eslint"
|
||||
vscode "deerawan.vscode-dash"
|
||||
vscode "dendron.dendron"
|
||||
vscode "dendron.dendron-paste-image"
|
||||
vscode "donjayamanne.githistory"
|
||||
vscode "dsznajder.es7-react-js-snippets"
|
||||
vscode "eamodio.gitlens"
|
||||
vscode "ecmel.vscode-html-css"
|
||||
vscode "editorconfig.editorconfig"
|
||||
vscode "enkia.tokyo-night"
|
||||
vscode "equinusocio.vsc-material-theme"
|
||||
vscode "equinusocio.vsc-material-theme-icons"
|
||||
vscode "esbenp.prettier-vscode"
|
||||
vscode "fallenmax.mithril-emmet"
|
||||
vscode "file-icons.file-icons"
|
||||
vscode "foam.foam-vscode"
|
||||
vscode "gerane.theme-tomorrownight"
|
||||
vscode "ginfuru.better-nunjucks"
|
||||
vscode "github.copilot"
|
||||
vscode "github.copilot-chat"
|
||||
vscode "github.github-vscode-theme"
|
||||
vscode "github.vscode-pull-request-github"
|
||||
vscode "gruntfuggly.todo-tree"
|
||||
vscode "hextorgb.hex-to-rgb"
|
||||
vscode "idleberg.applescript"
|
||||
vscode "jasonnutter.search-node-modules"
|
||||
vscode "juanblanco.solidity"
|
||||
vscode "kaleidoscope-app.vscode-ksdiff"
|
||||
vscode "kamikillerto.vscode-colorize"
|
||||
vscode "kotfu.bunch"
|
||||
vscode "kumar-harsh.graphql-for-vscode"
|
||||
vscode "liviuschera.noctis"
|
||||
vscode "mattpocock.ts-error-translator"
|
||||
vscode "mechatroner.rainbow-csv"
|
||||
vscode "mehullakhanpal.file-ops"
|
||||
vscode "mgmcdermott.vscode-language-babel"
|
||||
vscode "miguelsolorio.fluent-icons"
|
||||
vscode "miguelsolorio.min-theme"
|
||||
vscode "miguelsolorio.symbols"
|
||||
vscode "mikestead.dotenv"
|
||||
vscode "morph.rift-vscode"
|
||||
vscode "mrmlnc.vscode-attrs-sorter"
|
||||
vscode "ms-azuretools.vscode-docker"
|
||||
vscode "ms-ceintl.vscode-language-pack-de"
|
||||
vscode "ms-playwright.playwright"
|
||||
vscode "ms-python.debugpy"
|
||||
vscode "ms-python.isort"
|
||||
vscode "ms-python.python"
|
||||
vscode "ms-python.vscode-pylance"
|
||||
vscode "ms-toolsai.jupyter"
|
||||
vscode "ms-toolsai.jupyter-keymap"
|
||||
vscode "ms-toolsai.jupyter-renderers"
|
||||
vscode "ms-toolsai.vscode-jupyter-cell-tags"
|
||||
vscode "ms-toolsai.vscode-jupyter-slideshow"
|
||||
vscode "ms-vscode-remote.remote-containers"
|
||||
vscode "ms-vscode-remote.remote-ssh"
|
||||
vscode "ms-vscode-remote.remote-ssh-edit"
|
||||
vscode "ms-vscode-remote.remote-wsl"
|
||||
vscode "ms-vscode-remote.vscode-remote-extensionpack"
|
||||
vscode "ms-vscode.remote-explorer"
|
||||
vscode "ms-vscode.remote-server"
|
||||
vscode "ms-vsliveshare.vsliveshare"
|
||||
vscode "nrwl.angular-console"
|
||||
vscode "octref.vetur"
|
||||
vscode "perkovec.emoji"
|
||||
vscode "pkief.material-icon-theme"
|
||||
vscode "pnp.polacode"
|
||||
vscode "pomdtr.excalidraw-editor"
|
||||
vscode "prisma.prisma"
|
||||
vscode "quick-lint.quick-lint-js"
|
||||
vscode "raynigon.nginx-formatter"
|
||||
vscode "redhat.vscode-commons"
|
||||
vscode "redhat.vscode-yaml"
|
||||
vscode "rvest.vs-code-prettier-eslint"
|
||||
vscode "sdras.night-owl"
|
||||
vscode "sleistner.vscode-fileutils"
|
||||
vscode "softwaredotcom.swdc-vscode"
|
||||
vscode "styled-components.vscode-styled-components"
|
||||
vscode "svanimpe.stencil"
|
||||
vscode "svelte.svelte-vscode"
|
||||
vscode "tamasfe.even-better-toml"
|
||||
vscode "tchayen.markdown-links"
|
||||
vscode "thenikso.github-plus-theme"
|
||||
vscode "tyriar.sort-lines"
|
||||
vscode "unifiedjs.vscode-mdx"
|
||||
vscode "visualstudioexptteam.intellicode-api-usage-examples"
|
||||
vscode "visualstudioexptteam.vscodeintellicode"
|
||||
vscode "vivaxy.vscode-conventional-commits"
|
||||
vscode "vscode-icons-team.vscode-icons"
|
||||
vscode "vscodevim.vim"
|
||||
vscode "wakatime.vscode-wakatime"
|
||||
vscode "wayou.vscode-todo-highlight"
|
||||
vscode "william-voyek.vscode-nginx"
|
||||
vscode "wix.vscode-import-cost"
|
||||
vscode "xabikos.javascriptsnippets"
|
||||
vscode "xadillax.viml"
|
||||
vscode "xyc.vscode-mdx-preview"
|
||||
vscode "yinfei.luahelper"
|
||||
vscode "yutengjing.open-in-external-app"
|
||||
vscode "yzhang.markdown-all-in-one"
|
||||
vscode "zhuangtongfa.material-theme"
|
||||
922
Brewfile-Work
922
Brewfile-Work
@@ -1,922 +0,0 @@
|
||||
tap "charmbracelet/tap"
|
||||
tap "cooklang/tap"
|
||||
tap "denisidoro/tools"
|
||||
tap "espanso/espanso"
|
||||
tap "felixkratz/formulae"
|
||||
tap "fsouza/prettierd"
|
||||
tap "github/gh"
|
||||
tap "homebrew/bundle"
|
||||
tap "homebrew/services"
|
||||
tap "jakehilborn/jakehilborn"
|
||||
tap "jondot/tap"
|
||||
tap "joshmedeski/sesh"
|
||||
tap "koekeishiya/formulae"
|
||||
tap "micnncim/tap"
|
||||
tap "ms-jpq/sad"
|
||||
tap "neovim/neovim"
|
||||
tap "oven-sh/bun"
|
||||
tap "ttscoff/thelab"
|
||||
tap "universal-ctags/universal-ctags"
|
||||
# Search tool like grep, but optimized for programmers
|
||||
brew "ack"
|
||||
# Library for manipulating PNG images
|
||||
brew "libpng"
|
||||
# Software library to render fonts
|
||||
brew "freetype"
|
||||
# GNU internationalization (i18n) and localization (l10n) library
|
||||
brew "gettext"
|
||||
# Cryptography and SSL/TLS Toolkit
|
||||
brew "openssl@3"
|
||||
# Library for command-line editing
|
||||
brew "readline"
|
||||
# Command-line interface for SQLite
|
||||
brew "sqlite"
|
||||
# Vector graphics library with cross-device output support
|
||||
brew "cairo"
|
||||
# C/C++ and Java libraries for Unicode and globalization
|
||||
brew "icu4c"
|
||||
# OpenType text shaping engine
|
||||
brew "harfbuzz"
|
||||
# Framework for layout and rendering of i18n text
|
||||
brew "pango"
|
||||
# Library to render SVG files using Cairo
|
||||
brew "librsvg"
|
||||
# Icons for the GNOME project
|
||||
brew "adwaita-icon-theme"
|
||||
# Library and utilities for processing GIFs
|
||||
brew "giflib"
|
||||
# Color management engine supporting ICC profiles
|
||||
brew "little-cms2"
|
||||
# New file format for still image compression
|
||||
brew "jpeg-xl"
|
||||
# Codec library for encoding and decoding AV1 video streams
|
||||
brew "aom"
|
||||
# Record and share terminal sessions
|
||||
brew "asciinema"
|
||||
# GNU File, Shell, and Text utilities
|
||||
brew "coreutils"
|
||||
# Extendable version manager with support for Ruby, Node.js, Erlang & more
|
||||
brew "asdf"
|
||||
# Manage compile and link flags for libraries
|
||||
brew "pkg-config"
|
||||
# Improved shell history for zsh, bash, fish and nushell
|
||||
brew "atuin"
|
||||
# Bourne-Again SHell, a UNIX command interpreter
|
||||
brew "bash"
|
||||
# Clone of cat(1) with syntax highlighting and Git integration
|
||||
brew "bat"
|
||||
# Development kit for the Java programming language
|
||||
brew "openjdk"
|
||||
# Remove large files or passwords from Git history like git-filter-branch
|
||||
brew "bfg"
|
||||
# BibTeX bibliography file pretty printer and syntax checker
|
||||
brew "bibclean"
|
||||
# Platform built on V8 to build network applications
|
||||
brew "node"
|
||||
# Secure and free password manager for all of your devices
|
||||
brew "bitwarden-cli"
|
||||
# Collection of portable C++ source libraries
|
||||
brew "boost"
|
||||
# Install RubyGems as Homebrew formulae
|
||||
brew "brew-gem"
|
||||
# GNU compiler collection
|
||||
brew "gcc"
|
||||
# Resource monitor. C++ version and continuation of bashtop and bpytop
|
||||
brew "btop"
|
||||
# Freely available high-quality data compressor
|
||||
brew "bzip2"
|
||||
# Cryptography and SSL/TLS Toolkit
|
||||
brew "openssl@1.1"
|
||||
# Console-based Audio Visualizer for ALSA
|
||||
brew "cava"
|
||||
# Versatile and fast Unicode/ASCII/ANSI graphics renderer
|
||||
brew "chafa"
|
||||
# Statistics utility to count lines of code
|
||||
brew "cloc"
|
||||
# JavaScript optimizing compiler
|
||||
brew "closure-compiler"
|
||||
# Cross-platform make
|
||||
brew "cmake"
|
||||
# Powerful, clean, object-oriented scripting language
|
||||
brew "ruby"
|
||||
# Dependency manager for Cocoa projects
|
||||
brew "cocoapods"
|
||||
# Defines a standard way of committing rules and communicating it
|
||||
brew "commitizen"
|
||||
# Get a file from an HTTP, HTTPS or FTP server
|
||||
brew "curl"
|
||||
# Graphics library to dynamically manipulate images
|
||||
brew "gd"
|
||||
# C library for reading, creating, and modifying zip archives
|
||||
brew "libzip"
|
||||
# General-purpose scripting language
|
||||
brew "php"
|
||||
# Dependency Manager for PHP
|
||||
brew "composer"
|
||||
# Header-only library for parsing TOML
|
||||
brew "cpptoml"
|
||||
# Reimplementation of ctags(1)
|
||||
brew "ctags"
|
||||
# Secure runtime for JavaScript and TypeScript
|
||||
brew "deno"
|
||||
# Good-lookin' diffs with diff-highlight and more
|
||||
brew "diff-so-fancy"
|
||||
# Load/unload environment variables based on $PWD
|
||||
brew "direnv"
|
||||
# Pack, ship and run any application as a lightweight container
|
||||
brew "docker"
|
||||
# Text processing system for reStructuredText
|
||||
brew "docutils"
|
||||
# .NET Core
|
||||
brew "dotnet"
|
||||
# More intuitive version of du in rust
|
||||
brew "dust"
|
||||
# Collection of reusable C++ library artifacts developed at Facebook
|
||||
brew "folly"
|
||||
# C++14 implementation of the TLS-1.3 standard
|
||||
brew "fizz"
|
||||
# Modular, composable client/server abstractions framework
|
||||
brew "wangle"
|
||||
# Facebook's branch of Apache Thrift, including a new C++ server
|
||||
brew "fbthrift"
|
||||
# Thrift functions for querying information from a service
|
||||
brew "fb303"
|
||||
# Shared library for Watchman and Eden projects
|
||||
brew "edencommon"
|
||||
# Maintain consistent coding style between multiple editors
|
||||
brew "editorconfig"
|
||||
# LLVM bytecode to JavaScript compiler
|
||||
brew "emscripten"
|
||||
# Tools to convert fonts from OTF/TTF to EOT format
|
||||
brew "eot-utils"
|
||||
# Cross-platform C++ GUI toolkit
|
||||
brew "wxwidgets"
|
||||
# Programming language for highly scalable real-time systems
|
||||
brew "erlang"
|
||||
# Perl lib for reading and writing EXIF metadata
|
||||
brew "exiftool"
|
||||
# Modern, maintained replacement for ls
|
||||
brew "eza"
|
||||
# Simple, fast and user-friendly alternative to find
|
||||
brew "fd"
|
||||
# Validating, recursive, caching DNS resolver
|
||||
brew "unbound"
|
||||
# GNU Transport Layer Security (TLS) Library
|
||||
brew "gnutls"
|
||||
# Library for JPEG-2000 image manipulation
|
||||
brew "openjpeg"
|
||||
# Image processing and image analysis library
|
||||
brew "leptonica"
|
||||
# Subtitle renderer for the ASS/SSA subtitle format
|
||||
brew "libass"
|
||||
# OCR (Optical Character Recognition) engine
|
||||
brew "tesseract"
|
||||
# High-performance, asynchronous messaging library
|
||||
brew "zeromq"
|
||||
# Play, record, convert, and stream audio and video
|
||||
brew "ffmpeg"
|
||||
# User-friendly command-line shell for UNIX-like operating systems
|
||||
brew "fish"
|
||||
# Static type checker for JavaScript
|
||||
brew "flow"
|
||||
# CLI program that accepts piped input and presents files for selection
|
||||
brew "fpp"
|
||||
# Command-line fuzzy finder written in Go
|
||||
brew "fzf"
|
||||
# GitHub command-line tool
|
||||
brew "gh"
|
||||
# Interpreter for PostScript and PDF
|
||||
brew "ghostscript"
|
||||
# Distributed revision control system
|
||||
brew "git"
|
||||
# Syntax-highlighting pager for git and diff output
|
||||
brew "git-delta"
|
||||
# Small git utilities
|
||||
brew "git-extras"
|
||||
# Alias for git commit --fixup <ref>
|
||||
brew "git-fixup"
|
||||
# Git extension for versioning large files
|
||||
brew "git-lfs"
|
||||
# Simple and efficient way to access statistics in git
|
||||
brew "git-quick-stats"
|
||||
# Network related modules for glib
|
||||
brew "glib-networking"
|
||||
# C++ mathematics library for graphics software
|
||||
brew "glm"
|
||||
# Render markdown on the CLI
|
||||
brew "glow"
|
||||
# GNU implementation of the famous stream editor
|
||||
brew "gnu-sed"
|
||||
# GNU Pretty Good Privacy (PGP) package
|
||||
brew "gnupg"
|
||||
# Open source programming language to build simple/reliable/efficient software
|
||||
brew "go"
|
||||
# Generate introspection data for GObject libraries
|
||||
brew "gobject-introspection"
|
||||
# Google Testing and Mocking Framework
|
||||
brew "googletest"
|
||||
# Library for loading images as SDL surfaces and textures
|
||||
brew "sdl2_image"
|
||||
# Version Control Visualization Tool
|
||||
brew "gource"
|
||||
# Image manipulation
|
||||
brew "netpbm"
|
||||
# Graph visualization software from AT&T and Bell Labs
|
||||
brew "graphviz"
|
||||
# Command-line tool for generating regular expressions
|
||||
brew "grex"
|
||||
# Numerical library for C and C++
|
||||
brew "gsl"
|
||||
# Toolkit for creating graphical user interfaces
|
||||
brew "gtk+3"
|
||||
# Tool for glamorous shell scripts
|
||||
brew "gum"
|
||||
# File format designed to store large amounts of data
|
||||
brew "hdf5"
|
||||
# Post-modern modal text editor
|
||||
brew "helix"
|
||||
# Powerful, lightweight programming language
|
||||
brew "lua"
|
||||
# Convert source code to formatted text with syntax highlighting
|
||||
brew "highlight"
|
||||
# Instant coding answers via the command-line
|
||||
brew "howdoi"
|
||||
# Improved top (interactive process viewer)
|
||||
brew "htop"
|
||||
# User-friendly cURL replacement (command-line HTTP client)
|
||||
brew "httpie"
|
||||
# Add GitHub support to git on the command-line
|
||||
brew "hub"
|
||||
# Configurable static site generator
|
||||
brew "hugo"
|
||||
# Command-line benchmarking tool
|
||||
brew "hyperfine"
|
||||
# Toolkit for embedding hypervisor capabilities in your application
|
||||
brew "hyperkit"
|
||||
# Open h.265 video codec implementation
|
||||
brew "libde265"
|
||||
# ISO/IEC 23008-12:2017 HEIF file format decoder and encoder
|
||||
brew "libheif"
|
||||
# Tools and libraries to manipulate images in many formats
|
||||
brew "imagemagick"
|
||||
# Tool to capture still images from an iSight or other video source
|
||||
brew "imagesnap"
|
||||
# Image loading and rendering library
|
||||
brew "imlib2"
|
||||
# Command-line pager for JSON data
|
||||
brew "jless"
|
||||
# Image manipulation library
|
||||
brew "jpeg"
|
||||
# Kubernetes command-line interface
|
||||
brew "kubernetes-cli", link: false
|
||||
# Lazier way to manage everything docker
|
||||
brew "lazydocker"
|
||||
# Simple terminal UI for git commands
|
||||
brew "lazygit"
|
||||
# Terminal file manager
|
||||
brew "lf"
|
||||
# Access DVDs as block devices without the decryption
|
||||
brew "libdvdcss"
|
||||
# Conversion library
|
||||
brew "libiconv"
|
||||
# C library for reading and writing MATLAB MAT files
|
||||
brew "libmatio"
|
||||
# Implementation of the Double Ratchet cryptographic ratchet
|
||||
brew "libolm"
|
||||
# C library for the Public Suffix List
|
||||
brew "libpsl"
|
||||
# HTTP client/server library for GNOME
|
||||
brew "libsoup"
|
||||
# C websockets server library
|
||||
brew "libwebsockets"
|
||||
# Next-gen compiler infrastructure
|
||||
brew "llvm"
|
||||
# Just-In-Time Compiler (JIT) for the Lua programming language
|
||||
brew "luajit", args: ["HEAD"]
|
||||
# Package manager for the Lua programming language
|
||||
brew "luarocks"
|
||||
# Friendly wrapper for launchctl
|
||||
brew "lunchy"
|
||||
# Bare libuv bindings for lua
|
||||
brew "luv"
|
||||
# Text-based web browser
|
||||
brew "lynx"
|
||||
# Swiss Army Knife for macOS
|
||||
brew "m-cli"
|
||||
# Mac App Store command-line interface
|
||||
brew "mas"
|
||||
# High performance, distributed memory object caching system
|
||||
brew "memcached"
|
||||
# Run a Kubernetes cluster locally
|
||||
brew "minikube", link: false
|
||||
# UNIX movie player
|
||||
brew "mplayer"
|
||||
# Turn marked-up plain text into well-formatted documents
|
||||
brew "multimarkdown"
|
||||
# General-purpose lossless data-compression library
|
||||
brew "zlib"
|
||||
# Open source relational database management system
|
||||
brew "mysql"
|
||||
# Interactive cheatsheet tool for the command-line
|
||||
brew "navi"
|
||||
# NCurses Disk Usage
|
||||
brew "ncdu"
|
||||
# Fast, highly customisable system info script
|
||||
brew "neofetch"
|
||||
# Parser generator tool and incremental parsing library
|
||||
brew "tree-sitter"
|
||||
# Ambitious Vim-fork focused on extensibility and agility
|
||||
brew "neovim"
|
||||
# HTTP/2 C Library
|
||||
brew "nghttp2"
|
||||
# Small build system for use with gyp or CMake
|
||||
brew "ninja"
|
||||
# Optimized BLAS library
|
||||
brew "openblas"
|
||||
# Open Fortinet client for PPP+TLS VPN tunnel services
|
||||
brew "openfortivpn"
|
||||
# C library to read whole-slide images (a.k.a. virtual slides)
|
||||
brew "openslide"
|
||||
# ISO-C API and CLI for generating UUIDs
|
||||
brew "ossp-uuid"
|
||||
# Swiss-army knife of markup format conversion
|
||||
brew "pandoc"
|
||||
# Display directories as trees (with optional color/HTML output)
|
||||
brew "tree"
|
||||
# Password manager
|
||||
brew "pass"
|
||||
# Simplistic interactive filtering tool
|
||||
brew "peco"
|
||||
# Highly capable, feature-rich programming language
|
||||
brew "perl"
|
||||
# Fast, disk space efficient package manager
|
||||
brew "pnpm"
|
||||
# PDF rendering library (based on the xpdf-3.0 code base)
|
||||
brew "poppler"
|
||||
# Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML
|
||||
brew "prettier"
|
||||
# Protocol buffers (Google's data interchange format)
|
||||
brew "protobuf"
|
||||
# Python 3 bindings for the Cairo graphics library
|
||||
brew "py3cairo"
|
||||
# Generic syntax highlighter
|
||||
brew "pygments"
|
||||
# GNOME Python bindings (based on GObject Introspection)
|
||||
brew "pygobject3"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.10"
|
||||
# Python interface to Tcl/Tk
|
||||
brew "python-tk@3.10"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.11"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.8"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.9"
|
||||
# Generic machine emulator and virtualizer
|
||||
brew "qemu"
|
||||
# Messaging and streaming broker
|
||||
brew "rabbitmq"
|
||||
# File browser
|
||||
brew "ranger"
|
||||
# Install various Ruby versions and implementations
|
||||
brew "ruby-build"
|
||||
# Ruby version manager
|
||||
brew "rbenv"
|
||||
# Make aliases for Ruby versions
|
||||
brew "rbenv-aliases"
|
||||
# Safely sets global and per-project environment variables
|
||||
brew "rbenv-vars"
|
||||
# Reattach process (e.g., tmux) to background
|
||||
brew "reattach-to-user-namespace"
|
||||
# Persistent key-value database, with built-in net interface
|
||||
brew "redis"
|
||||
# Convert between TOML, YAML and JSON
|
||||
brew "remarshal"
|
||||
# Search tool like grep and The Silver Searcher
|
||||
brew "ripgrep"
|
||||
# Readline wrapper: adds readline support to tools that lack it
|
||||
brew "rlwrap"
|
||||
# Utility that provides fast incremental file transfer
|
||||
brew "rsync"
|
||||
# Safe, concurrent, practical language
|
||||
brew "rust"
|
||||
# JVM-based programming language
|
||||
brew "scala"
|
||||
# Create beautiful image of your source code
|
||||
brew "silicon"
|
||||
# Convert filenames and directories to a web friendly format
|
||||
brew "slugify"
|
||||
# Compression/decompression tool based on snappy
|
||||
brew "snzip"
|
||||
# Add a public key to a remote machine's authorized_keys file
|
||||
brew "ssh-copy-id"
|
||||
# Cross-shell prompt for astronauts
|
||||
brew "starship"
|
||||
# Open source continuous file synchronization application
|
||||
brew "syncthing"
|
||||
# Code-search similar to ack
|
||||
brew "the_silver_searcher"
|
||||
# Text interface for Git repositories
|
||||
brew "tig"
|
||||
# Simplified and community-driven man pages
|
||||
brew "tldr"
|
||||
# Instant terminal sharing
|
||||
brew "tmate"
|
||||
# Terminal multiplexer
|
||||
brew "tmux"
|
||||
# Manage complex tmux sessions easily
|
||||
brew "tmuxinator"
|
||||
# Command-line tool for sharing terminal over the web
|
||||
brew "ttyd", args: ["HEAD"]
|
||||
# TUI for Mastodon with vim inspired keys
|
||||
brew "tut"
|
||||
# Maintained ctags implementation
|
||||
brew "universal-ctags", args: ["HEAD"]
|
||||
# URL extractor/launcher
|
||||
brew "urlview"
|
||||
# Compiler for the GObject type system
|
||||
brew "vala"
|
||||
# Syntax-aware linter for prose
|
||||
brew "vale"
|
||||
# Image processing library
|
||||
brew "vips"
|
||||
# Watch files and take action when they change
|
||||
brew "watchman"
|
||||
# Command-line tool to track (your) time
|
||||
brew "watson"
|
||||
# Internet file retriever
|
||||
brew "wget"
|
||||
# Homebrew, but with Docker images
|
||||
brew "whalebrew"
|
||||
# Utilities to create and convert Web Open Font File (WOFF) files
|
||||
brew "woff2"
|
||||
# Fake keyboard/mouse input and window management for X
|
||||
brew "xdotool"
|
||||
# JavaScript package manager
|
||||
brew "yarn"
|
||||
# Download YouTube videos from the command-line
|
||||
brew "youtube-dl"
|
||||
# Process YAML, JSON, XML, CSV and properties documents from the CLI
|
||||
brew "yq"
|
||||
# Tracks most-used directories to make cd smarter
|
||||
brew "z"
|
||||
# Pluggable terminal workspace, with terminal multiplexer as the base feature
|
||||
brew "zellij"
|
||||
# Plain text note-taking assistant
|
||||
brew "zk"
|
||||
# Shell extension to navigate your filesystem faster
|
||||
brew "zoxide"
|
||||
# UNIX shell (command interpreter)
|
||||
brew "zsh"
|
||||
# Fish shell like syntax highlighting for zsh
|
||||
brew "zsh-syntax-highlighting"
|
||||
# A tasty, self-hostable Git server for the command line🍦
|
||||
brew "charmbracelet/tap/soft-serve"
|
||||
# A tool for recording terminal GIFs
|
||||
brew "charmbracelet/tap/vhs"
|
||||
# The SSH directory
|
||||
brew "charmbracelet/tap/wishlist"
|
||||
# CLI tool for CookLang Recipe Markup Language
|
||||
brew "cooklang/tap/cook"
|
||||
# prettier, on SPEED!
|
||||
brew "fsouza/prettierd/prettierd"
|
||||
# macOS command line utility to configure multi-display resolutions and arrangements. Essentially XRandR for macOS.
|
||||
brew "jakehilborn/jakehilborn/displayplacer"
|
||||
# The scalable code generator that saves you time.
|
||||
brew "jondot/tap/hygen"
|
||||
# Smart terminal session manager
|
||||
brew "joshmedeski/sesh/sesh"
|
||||
# Simple hotkey-daemon for macOS.
|
||||
brew "koekeishiya/formulae/skhd"
|
||||
# A tiling window manager for macOS based on binary space partitioning.
|
||||
brew "koekeishiya/formulae/yabai"
|
||||
# Search and replace | Space Age seD
|
||||
brew "ms-jpq/sad/sad"
|
||||
# Incredibly fast JavaScript runtime, bundler, transpiler and package manager - all in one.
|
||||
brew "oven-sh/bun/bun"
|
||||
# Time tracker
|
||||
cask "activitywatch"
|
||||
# GPU-accelerated terminal emulator
|
||||
cask "alacritty"
|
||||
# Application launcher and productivity software
|
||||
cask "alfred"
|
||||
# Network scanner
|
||||
cask "angry-ip-scanner"
|
||||
# Webcam & audio device software
|
||||
cask "ankerwork"
|
||||
# Application uninstaller
|
||||
cask "appcleaner"
|
||||
# User-friendly GUI app for Homebrew
|
||||
cask "applite"
|
||||
# Chromium based browser
|
||||
cask "arc"
|
||||
# Multi-track audio editor and recorder
|
||||
cask "audacity"
|
||||
# Audio utility
|
||||
cask "background-music"
|
||||
# Menu bar icon organiser
|
||||
cask "bartender"
|
||||
# All-In-One Toolkit for Working Remotely
|
||||
cask "basecamp"
|
||||
# Compact TeX distribution as alternative to the full TeX Live / MacTeX
|
||||
cask "basictex"
|
||||
# Edit and manage bibliographies
|
||||
cask "bibdesk"
|
||||
# Desktop password and login vault
|
||||
cask "bitwarden"
|
||||
# 3D creation suite
|
||||
cask "blender"
|
||||
# Scriptable scratchpad for developers
|
||||
cask "boop"
|
||||
# Web browser focusing on privacy
|
||||
cask "brave-browser"
|
||||
# Automation tool
|
||||
cask "bunch"
|
||||
# E-books management software
|
||||
cask "calibre"
|
||||
# Screen capturing tool
|
||||
cask "cleanshot"
|
||||
cask "color-oracle"
|
||||
# Multi-platform client-side cloud file encryption tool
|
||||
cask "cryptomator"
|
||||
# Disk space visualiser
|
||||
cask "daisydisk"
|
||||
# API documentation browser and code snippet manager
|
||||
cask "dash"
|
||||
# Peer to peer data sharing app built for humans
|
||||
cask "dat"
|
||||
# Browser for SQLite databases
|
||||
cask "db-browser-for-sqlite"
|
||||
# Trains AIs to understand and translate texts
|
||||
cask "deepl"
|
||||
# Collect, organise, edit and annotate documents
|
||||
cask "devonthink"
|
||||
# Voice and text chat software
|
||||
cask "discord"
|
||||
# Client for the Dropbox cloud storage service
|
||||
cask "dropbox"
|
||||
# Find files, folders, or contents in any file
|
||||
cask "easyfind"
|
||||
# Matrix collaboration client
|
||||
cask "element"
|
||||
# Cross-platform Text Expander written in Rust
|
||||
cask "espanso"
|
||||
# Collaborative team software
|
||||
cask "figma"
|
||||
# Web browser
|
||||
cask "firefox"
|
||||
cask "firefox-developer-edition"
|
||||
cask "firefox-nightly"
|
||||
cask "flip4mac"
|
||||
# Download manager with a torrent client
|
||||
cask "folx"
|
||||
cask "font-fira-code"
|
||||
cask "font-fira-code-nerd-font"
|
||||
cask "font-fira-sans"
|
||||
cask "font-fira-sans-condensed"
|
||||
cask "font-ia-writer-duo"
|
||||
cask "font-ia-writer-mono"
|
||||
cask "font-ia-writer-quattro"
|
||||
cask "font-monaspace"
|
||||
cask "font-symbols-only-nerd-font"
|
||||
# Free VPN client for FortiClient
|
||||
cask "forticlient-vpn"
|
||||
# Disk space cleaner that finds and deletes duplicated and similar files
|
||||
cask "gemini"
|
||||
# Desktop client for GitHub repositories
|
||||
cask "github"
|
||||
# Japanese input software
|
||||
cask "google-japanese-ime"
|
||||
# Tools to protect your files
|
||||
cask "gpg-suite-no-mail"
|
||||
# Utility to fix grammar errors and style issues in text
|
||||
cask "grammarly"
|
||||
# GraphQL IDE for better development workflows
|
||||
cask "graphql-playground"
|
||||
# Desktop automation application
|
||||
cask "hammerspoon"
|
||||
# Open-source video transcoder
|
||||
cask "handbrake"
|
||||
# Free and open-source media player
|
||||
cask "iina"
|
||||
# Utility to reduce the size of 24-bit PNG files
|
||||
cask "imagealpha"
|
||||
# Tool to optimise images to a smaller size
|
||||
cask "imageoptim"
|
||||
# Vector graphics editor
|
||||
cask "inkscape"
|
||||
# Tool to scan a website checking for broken links
|
||||
cask "integrity"
|
||||
# Terminal emulator as alternative to Apple's Terminal app
|
||||
cask "iterm2"
|
||||
# Menu bar calendar
|
||||
cask "itsycal"
|
||||
# Jellyfin desktop client
|
||||
cask "jellyfin-media-player"
|
||||
# Spot and merge differences in text and image files or folders
|
||||
cask "kaleidoscope"
|
||||
# Keyboard customiser
|
||||
cask "karabiner-elements"
|
||||
# End-to-end encryption software
|
||||
cask "keybase"
|
||||
# Open-source keystroke visualiser
|
||||
cask "keycastr"
|
||||
# Interface for reading and syncing eBooks
|
||||
cask "kindle"
|
||||
# GPU-based terminal emulator
|
||||
cask "kitty"
|
||||
# Grammar, spelling and style suggestions in all the writing apps
|
||||
cask "languagetool"
|
||||
# Official client for LBRY, a decentralised file-sharing and payment network
|
||||
cask "lbry"
|
||||
# Wallet desktop application to maintain multiple cryptocurrencies
|
||||
cask "ledger-live"
|
||||
# Client for LLaMA models
|
||||
cask "llamachat"
|
||||
# File system integration
|
||||
cask "macfuse"
|
||||
# 8-bit 3D voxel editor and interactive path tracing renderer
|
||||
cask "magicavoxel"
|
||||
# Previewer for Markdown, MultiMarkdown and other text markup languages
|
||||
cask "marked"
|
||||
# Timer application
|
||||
cask "michaelvillar-timer"
|
||||
# Provides updates to various Microsoft products
|
||||
cask "microsoft-auto-update"
|
||||
# Web browser
|
||||
cask "microsoft-edge"
|
||||
# Email client
|
||||
cask "microsoft-outlook"
|
||||
# Remote desktop client
|
||||
cask "microsoft-remote-desktop"
|
||||
# Meet, chat, call, and collaborate in just one place
|
||||
cask "microsoft-teams"
|
||||
# Minimal installer for conda
|
||||
cask "miniconda"
|
||||
# Desktop sync client for Nextcloud software products
|
||||
cask "nextcloud"
|
||||
# VPN client for secure internet access and private browsing
|
||||
cask "nordvpn"
|
||||
# App to write, plan, collaborate, and get organised
|
||||
cask "notion"
|
||||
# Calculator and converter application
|
||||
cask "numi"
|
||||
# Knowledge base that works on top of a local folder of plain text Markdown files
|
||||
cask "obsidian"
|
||||
# Organise all your reference images in one place
|
||||
cask "ogdesign-eagle"
|
||||
# Web browser
|
||||
cask "opera"
|
||||
cask "opera-beta"
|
||||
# Web browser
|
||||
cask "opera@developer"
|
||||
# Play PC games and connect with your friends
|
||||
cask "origin"
|
||||
# Control your smart light system
|
||||
cask "philips-hue-sync"
|
||||
# Colour picker for colours onscreen
|
||||
cask "pika"
|
||||
# Home media player
|
||||
cask "plex"
|
||||
# Collaboration platform for API development
|
||||
cask "postman"
|
||||
# Bridges Proton Mail to email clients supporting IMAP and SMTP protocols
|
||||
cask "protonmail-bridge"
|
||||
# VPN client focusing on security
|
||||
cask "protonvpn"
|
||||
# Quick Look plug-in that renders source code with syntax highlighting
|
||||
cask "qlcolorcode"
|
||||
# Thumbnails, static previews, cover art and metadata for video files
|
||||
cask "qlvideo"
|
||||
# All-in-one bookmark manager
|
||||
cask "raindropio"
|
||||
# Imaging utility to install operating systems to a microSD card
|
||||
cask "raspberry-pi-imager"
|
||||
# Control your tools with a few keystrokes
|
||||
cask "raycast"
|
||||
# Web browser
|
||||
cask "safari-technology-preview"
|
||||
# Store SSH keys in the Secure Enclave
|
||||
cask "secretive"
|
||||
# Tool for sending personal documents to Kindles from Macs
|
||||
cask "send-to-kindle"
|
||||
# MySQL/MariaDB database management platform
|
||||
cask "sequel-pro"
|
||||
# Onion routing based messenger
|
||||
cask "session"
|
||||
# Instant messaging application focusing on security
|
||||
cask "signal"
|
||||
# Draw, paint, & sketch application
|
||||
cask "sketchbook"
|
||||
# Team communication and collaboration software
|
||||
cask "slack"
|
||||
# Displays all open files and sockets in use by all running processes
|
||||
cask "sloth"
|
||||
# Control your Sonos system
|
||||
cask "sonos"
|
||||
# Music streaming service
|
||||
cask "spotify"
|
||||
# Video game digital distribution service
|
||||
cask "steam"
|
||||
# Tool to render realistic skies in real time on the screen
|
||||
cask "stellarium"
|
||||
# Sync and backup service to Synology NAS drives
|
||||
cask "synology-drive"
|
||||
# Desktop client for Telegram messenger
|
||||
cask "telegram-desktop"
|
||||
# JDK from the Eclipse Foundation (Adoptium)
|
||||
cask "temurin8"
|
||||
# General-purpose text editor
|
||||
cask "textmate"
|
||||
# Unpacks archive files
|
||||
cask "the-unarchiver"
|
||||
# Web browser focusing on security
|
||||
cask "tor-browser"
|
||||
# File transfer application
|
||||
cask "transmit"
|
||||
# Free and open-source OpenVPN client
|
||||
cask "tunnelblick"
|
||||
# Font manager application
|
||||
cask "typeface"
|
||||
# Disk encryption software focusing on security based on TrueCrypt
|
||||
cask "veracrypt"
|
||||
# Virtualiser for x86 hardware
|
||||
cask "virtualbox"
|
||||
# Open-source code editor
|
||||
cask "visual-studio-code"
|
||||
# Code editor
|
||||
cask "visual-studio-code-insiders"
|
||||
# Multimedia player
|
||||
cask "vlc"
|
||||
# Web browser plugin
|
||||
cask "vlc-webplugin"
|
||||
# Rust-based terminal
|
||||
cask "warp"
|
||||
# GPU-accelerated cross-platform terminal emulator and multiplexer
|
||||
cask "wezterm"
|
||||
# Network diagnostic utility
|
||||
cask "whatroute"
|
||||
# Open-source version of the X.Org X Window System
|
||||
cask "xquartz"
|
||||
# Multiplayer code editor
|
||||
cask "zed"
|
||||
mas "1-Click Video Converter", id: 717545086
|
||||
mas "Be Focused Pro", id: 961632517
|
||||
mas "Day One", id: 1055511498
|
||||
mas "Deliveries", id: 290986013
|
||||
mas "Free MP4 Converter", id: 693443591
|
||||
mas "Goodnotes", id: 1444383602
|
||||
mas "iA Writer", id: 775737590
|
||||
mas "iFinance 5", id: 1500241909
|
||||
mas "iMovie", id: 408981434
|
||||
mas "IP Friend", id: 1560408065
|
||||
mas "Just Focus", id: 1142151959
|
||||
mas "Key Codes", id: 414568915
|
||||
mas "Keynote", id: 409183694
|
||||
mas "LanguageTool", id: 1534275760
|
||||
mas "Mela", id: 1568924476
|
||||
mas "Microsoft To Do", id: 1274495053
|
||||
mas "MindNode", id: 1289197285
|
||||
mas "Numbers", id: 409203825
|
||||
mas "Pages", id: 409201541
|
||||
mas "Reeder", id: 1529448980
|
||||
mas "Save to Raindrop.io", id: 1549370672
|
||||
mas "Smart Converter", id: 447513724
|
||||
mas "The Unarchiver", id: 425424353
|
||||
mas "Things", id: 904280696
|
||||
mas "Time Sink", id: 404363161
|
||||
mas "Typeface", id: 1062679359
|
||||
mas "Xcode", id: 497799835
|
||||
mas "Yoink", id: 457622435
|
||||
whalebrew "whalebrew/whalesay"
|
||||
vscode "activitywatch.aw-watcher-vscode"
|
||||
vscode "adamvoss.vscode-languagetool"
|
||||
vscode "ahmadalli.vscode-nginx-conf"
|
||||
vscode "akamud.vscode-caniuse"
|
||||
vscode "alefragnani.bookmarks"
|
||||
vscode "alefragnani.project-manager"
|
||||
vscode "anteprimorac.html-end-tag-labels"
|
||||
vscode "arcticicestudio.nord-visual-studio-code"
|
||||
vscode "ardenivanov.svelte-intellisense"
|
||||
vscode "astro-build.astro-vscode"
|
||||
vscode "asvetliakov.snapshot-tools"
|
||||
vscode "azemoh.one-monokai"
|
||||
vscode "bierner.markdown-preview-github-styles"
|
||||
vscode "bradlc.vscode-tailwindcss"
|
||||
vscode "chakrounanas.turbo-console-log"
|
||||
vscode "chrischinchilla.vale-vscode"
|
||||
vscode "christian-kohler.npm-intellisense"
|
||||
vscode "christian-kohler.path-intellisense"
|
||||
vscode "chrmarti.regex"
|
||||
vscode "codeium.codeium"
|
||||
vscode "codesandbox-io.codesandbox-projects"
|
||||
vscode "codezombiech.gitignore"
|
||||
vscode "continue.continue"
|
||||
vscode "csstools.postcss"
|
||||
vscode "cstrachan.vcard"
|
||||
vscode "davidlday.languagetool-linter"
|
||||
vscode "daylerees.rainglow"
|
||||
vscode "dbaeumer.vscode-eslint"
|
||||
vscode "deerawan.vscode-dash"
|
||||
vscode "dendron.dendron"
|
||||
vscode "dendron.dendron-paste-image"
|
||||
vscode "donjayamanne.githistory"
|
||||
vscode "dsznajder.es7-react-js-snippets"
|
||||
vscode "eamodio.gitlens"
|
||||
vscode "ecmel.vscode-html-css"
|
||||
vscode "editorconfig.editorconfig"
|
||||
vscode "enkia.tokyo-night"
|
||||
vscode "equinusocio.vsc-material-theme"
|
||||
vscode "equinusocio.vsc-material-theme-icons"
|
||||
vscode "esbenp.prettier-vscode"
|
||||
vscode "fallenmax.mithril-emmet"
|
||||
vscode "file-icons.file-icons"
|
||||
vscode "foam.foam-vscode"
|
||||
vscode "gerane.theme-tomorrownight"
|
||||
vscode "ginfuru.better-nunjucks"
|
||||
vscode "github.copilot"
|
||||
vscode "github.copilot-chat"
|
||||
vscode "github.github-vscode-theme"
|
||||
vscode "github.vscode-pull-request-github"
|
||||
vscode "gruntfuggly.todo-tree"
|
||||
vscode "hextorgb.hex-to-rgb"
|
||||
vscode "idleberg.applescript"
|
||||
vscode "jasonnutter.search-node-modules"
|
||||
vscode "juanblanco.solidity"
|
||||
vscode "kaleidoscope-app.vscode-ksdiff"
|
||||
vscode "kamikillerto.vscode-colorize"
|
||||
vscode "kotfu.bunch"
|
||||
vscode "kumar-harsh.graphql-for-vscode"
|
||||
vscode "liviuschera.noctis"
|
||||
vscode "mattpocock.ts-error-translator"
|
||||
vscode "mechatroner.rainbow-csv"
|
||||
vscode "mehullakhanpal.file-ops"
|
||||
vscode "mgmcdermott.vscode-language-babel"
|
||||
vscode "miguelsolorio.fluent-icons"
|
||||
vscode "miguelsolorio.min-theme"
|
||||
vscode "miguelsolorio.symbols"
|
||||
vscode "mikestead.dotenv"
|
||||
vscode "morph.rift-vscode"
|
||||
vscode "mrmlnc.vscode-attrs-sorter"
|
||||
vscode "ms-azuretools.vscode-docker"
|
||||
vscode "ms-ceintl.vscode-language-pack-de"
|
||||
vscode "ms-playwright.playwright"
|
||||
vscode "ms-python.debugpy"
|
||||
vscode "ms-python.isort"
|
||||
vscode "ms-python.python"
|
||||
vscode "ms-python.vscode-pylance"
|
||||
vscode "ms-toolsai.jupyter"
|
||||
vscode "ms-toolsai.jupyter-keymap"
|
||||
vscode "ms-toolsai.jupyter-renderers"
|
||||
vscode "ms-toolsai.vscode-jupyter-cell-tags"
|
||||
vscode "ms-toolsai.vscode-jupyter-slideshow"
|
||||
vscode "ms-vscode-remote.remote-containers"
|
||||
vscode "ms-vscode-remote.remote-ssh"
|
||||
vscode "ms-vscode-remote.remote-ssh-edit"
|
||||
vscode "ms-vscode-remote.remote-wsl"
|
||||
vscode "ms-vscode-remote.vscode-remote-extensionpack"
|
||||
vscode "ms-vscode.remote-explorer"
|
||||
vscode "ms-vscode.remote-server"
|
||||
vscode "ms-vsliveshare.vsliveshare"
|
||||
vscode "nrwl.angular-console"
|
||||
vscode "octref.vetur"
|
||||
vscode "perkovec.emoji"
|
||||
vscode "pkief.material-icon-theme"
|
||||
vscode "pnp.polacode"
|
||||
vscode "pomdtr.excalidraw-editor"
|
||||
vscode "prisma.prisma"
|
||||
vscode "quick-lint.quick-lint-js"
|
||||
vscode "raynigon.nginx-formatter"
|
||||
vscode "redhat.vscode-commons"
|
||||
vscode "redhat.vscode-yaml"
|
||||
vscode "rvest.vs-code-prettier-eslint"
|
||||
vscode "sdras.night-owl"
|
||||
vscode "sleistner.vscode-fileutils"
|
||||
vscode "softwaredotcom.swdc-vscode"
|
||||
vscode "styled-components.vscode-styled-components"
|
||||
vscode "svanimpe.stencil"
|
||||
vscode "svelte.svelte-vscode"
|
||||
vscode "tamasfe.even-better-toml"
|
||||
vscode "tchayen.markdown-links"
|
||||
vscode "thenikso.github-plus-theme"
|
||||
vscode "tyriar.sort-lines"
|
||||
vscode "unifiedjs.vscode-mdx"
|
||||
vscode "visualstudioexptteam.intellicode-api-usage-examples"
|
||||
vscode "visualstudioexptteam.vscodeintellicode"
|
||||
vscode "vivaxy.vscode-conventional-commits"
|
||||
vscode "vscode-icons-team.vscode-icons"
|
||||
vscode "vscodevim.vim"
|
||||
vscode "wakatime.vscode-wakatime"
|
||||
vscode "wayou.vscode-todo-highlight"
|
||||
vscode "william-voyek.vscode-nginx"
|
||||
vscode "withfig.fig"
|
||||
vscode "wix.vscode-import-cost"
|
||||
vscode "xabikos.javascriptsnippets"
|
||||
vscode "xadillax.viml"
|
||||
vscode "xyc.vscode-mdx-preview"
|
||||
vscode "yinfei.luahelper"
|
||||
vscode "yutengjing.open-in-external-app"
|
||||
vscode "yzhang.markdown-all-in-one"
|
||||
vscode "zhuangtongfa.material-theme"
|
||||
vscode "znck.grammarly"
|
||||
796
bin/cht.sh
796
bin/cht.sh
@@ -1,796 +0,0 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1117,SC2001
|
||||
#
|
||||
# [X] open section
|
||||
# [X] one shot mode
|
||||
# [X] usage info
|
||||
# [X] dependencies check
|
||||
# [X] help
|
||||
# [X] yank/y/copy/c
|
||||
# [X] Y/C
|
||||
# [X] eof problem
|
||||
# [X] more
|
||||
# [X] stealth mode
|
||||
#
|
||||
# here are several examples for the stealth mode:
|
||||
#
|
||||
# zip lists
|
||||
# list permutation
|
||||
# random list element
|
||||
# reverse a list
|
||||
# read json from file
|
||||
# append string to a file
|
||||
# run process in background
|
||||
# count words in text counter
|
||||
# group elements list
|
||||
|
||||
__CHTSH_VERSION=0.0.4
|
||||
__CHTSH_DATETIME="2021-04-25 12:30:30 +0200"
|
||||
|
||||
# cht.sh configuration loading
|
||||
#
|
||||
# configuration is stored in ~/.cht.sh/ (can be overridden with CHTSH env var.)
|
||||
#
|
||||
CHTSH_HOME=${CHTSH:-"$HOME"/.cht.sh}
|
||||
[ -z "$CHTSH_CONF" ] && CHTSH_CONF=$CHTSH_HOME/cht.sh.conf
|
||||
# shellcheck disable=SC1090,SC2002
|
||||
[ -e "$CHTSH_CONF" ] && source "$CHTSH_CONF"
|
||||
[ -z "$CHTSH_URL" ] && CHTSH_URL=https://cht.sh
|
||||
|
||||
# currently we support only two modes:
|
||||
# * lite = access the server using curl
|
||||
# * auto = try standalone usage first
|
||||
CHTSH_MODE="$(cat "$CHTSH_HOME"/mode 2> /dev/null)"
|
||||
[ "$CHTSH_MODE" != lite ] && CHTSH_MODE=auto
|
||||
CHEATSH_INSTALLATION="$(cat "$CHTSH_HOME/standalone" 2> /dev/null)"
|
||||
|
||||
|
||||
export LESSSECURE=1
|
||||
STEALTH_MAX_SELECTION_LENGTH=5
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin) is_macos=yes ;;
|
||||
*) is_macos=no ;;
|
||||
esac
|
||||
|
||||
# for KSH93
|
||||
# shellcheck disable=SC2034,SC2039,SC2168
|
||||
if echo "$KSH_VERSION" | grep -q ' 93' && ! local foo 2>/dev/null; then
|
||||
alias local=typeset
|
||||
fi
|
||||
|
||||
fatal()
|
||||
{
|
||||
echo "ERROR: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
_say_what_i_do()
|
||||
{
|
||||
[ -n "$LOG" ] && echo "$(date '+[%Y-%m-%d %H:%M%S]') $*" >> "$LOG"
|
||||
|
||||
local this_prompt="\033[0;1;4;32m>>\033[0m"
|
||||
printf "\n${this_prompt}%s\033[0m\n" " $* "
|
||||
}
|
||||
|
||||
cheatsh_standalone_install()
|
||||
{
|
||||
# the function installs cheat.sh with the upstream repositories
|
||||
# in the standalone mode
|
||||
local installdir; installdir="$1"
|
||||
local default_installdir="$HOME/.cheat.sh"
|
||||
|
||||
[ -z "$installdir" ] && installdir=${default_installdir}
|
||||
|
||||
if [ "$installdir" = help ]; then
|
||||
cat <<EOF
|
||||
Install cheat.sh in the standalone mode.
|
||||
|
||||
After the installation, cheat.sh can be used locally, without accessing
|
||||
the public cheat.sh service, or it can be used in the server mode,
|
||||
where the newly installed server could be accessed by external clients
|
||||
in the same fashion as the public cheat.sh server.
|
||||
|
||||
During the installation, cheat.sh code as well as the cheat.sh upstream
|
||||
cheat sheets repositories will be fetched.
|
||||
|
||||
It takes approximately 1G of the disk space.
|
||||
|
||||
Default installation location: ~/.cheat.sh/
|
||||
It can be overridden by a command line parameter to this script:
|
||||
|
||||
${0##*/} --standalone-install DIR
|
||||
|
||||
See cheat.sh/:standalone or https://github.com/chubin/cheat.sh/README.md
|
||||
for more information:
|
||||
|
||||
cht.sh :standalone
|
||||
curl cheat.sh/:standalone
|
||||
|
||||
After the installation is finished, the cht.sh shell client is switched
|
||||
to the auto mode, where it uses the local cheat.sh installation if possible.
|
||||
You can switch the mode with the --mode switch:
|
||||
|
||||
cht.sh --mode lite # use https://cheat.sh/ only
|
||||
cht.sh --mode auto # use local installation
|
||||
|
||||
For intallation and standalone usage, you need \`git\`, \`python\`,
|
||||
and \`virtualenv\` to be installed locally.
|
||||
EOF
|
||||
return
|
||||
fi
|
||||
|
||||
local _exit_code=0
|
||||
|
||||
local dependencies=(python git virtualenv)
|
||||
for dep in "${dependencies[@]}"; do
|
||||
command -v "$dep" >/dev/null || \
|
||||
{ echo "DEPENDENCY: \"$dep\" is needed to install cheat.sh in the standalone mode" >&2; _exit_code=1; }
|
||||
done
|
||||
[ "$_exit_code" -ne 0 ] && return "$_exit_code"
|
||||
|
||||
while true; do
|
||||
local _installdir
|
||||
echo -n "Where should cheat.sh be installed [$installdir]? "; read -r _installdir
|
||||
[ -n "$_installdir" ] && installdir=$_installdir
|
||||
|
||||
if [ "$installdir" = y ] \
|
||||
|| [ "$installdir" = Y ] \
|
||||
|| [ "$(echo "$installdir" | tr "[:upper:]" "[:lower:]")" = yes ]
|
||||
then
|
||||
echo Please enter the directory name
|
||||
echo If it was the directory name already, please prepend it with \"./\": "./$installdir"
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -e "$installdir" ]; then
|
||||
echo "ERROR: Installation directory [$installdir] exists already"
|
||||
echo "Please remove it first before continuing"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! mkdir -p "$installdir"; then
|
||||
echo "ERROR: Could not create the installation directory \"$installdir\""
|
||||
echo "ERROR: Please check the permissions and start the script again"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local space_needed=700
|
||||
local space_available; space_available=$(($(df -k "$installdir" | awk '{print $4}' | tail -1)/1024))
|
||||
|
||||
if [ "$space_available" -lt "$space_needed" ]; then
|
||||
echo "ERROR: Installation directory has no enough space (needed: ${space_needed}M, available: ${space_available}M"
|
||||
echo "ERROR: Please clean up and start the script again"
|
||||
rmdir "$installdir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
_say_what_i_do Cloning cheat.sh locally
|
||||
local url=https://github.com/chubin/cheat.sh
|
||||
rmdir "$installdir"
|
||||
git clone "$url" "$installdir" || fatal Could not clone "$url" with git into "$installdir"
|
||||
cd "$installdir" || fatal "Cannot cd into $installdir"
|
||||
|
||||
# after the repository cloned, we may have the log directory
|
||||
# and we can write our installation log into it
|
||||
mkdir -p "log/"
|
||||
LOG="$PWD/log/install.log"
|
||||
|
||||
# we use tee everywhere so we should set -o pipefail
|
||||
set -o pipefail
|
||||
|
||||
# currently the script uses python 2,
|
||||
# but cheat.sh supports python 3 too
|
||||
# if you want to switch it to python 3
|
||||
# set PYTHON2 to NO:
|
||||
# PYTHON2=NO
|
||||
#
|
||||
PYTHON2=NO
|
||||
if [[ $PYTHON2 = YES ]]; then
|
||||
python="python2"
|
||||
pip="pip"
|
||||
virtualenv_python3_option=()
|
||||
else
|
||||
python="python3"
|
||||
pip="pip3"
|
||||
virtualenv_python3_option=(-p python3)
|
||||
fi
|
||||
|
||||
_say_what_i_do Creating virtual environment
|
||||
virtualenv "${virtualenv_python3_option[@]}" ve \
|
||||
|| fatal "Could not create virtual environment with 'virtualenv ve'"
|
||||
|
||||
export CHEATSH_PATH_WORKDIR=$PWD
|
||||
|
||||
# rapidfuzz does not support Python 2,
|
||||
# so if we are using Python 2, install fuzzywuzzy instead
|
||||
if [[ $PYTHON2 = YES ]]; then
|
||||
sed -i s/rapidfuzz/fuzzywuzzy/ requirements.txt
|
||||
echo "python-Levenshtein" >> requirements.txt
|
||||
fi
|
||||
|
||||
_say_what_i_do Installing python requirements into the virtual environment
|
||||
ve/bin/"$pip" install -r requirements.txt > "$LOG" \
|
||||
|| {
|
||||
|
||||
echo "ERROR:"
|
||||
echo "---"
|
||||
tail -n 10 "$LOG"
|
||||
echo "---"
|
||||
echo "See $LOG for more"
|
||||
fatal Could not install python dependencies into the virtual environment
|
||||
}
|
||||
echo "$(ve/bin/"$pip" freeze | wc -l) dependencies were successfully installed"
|
||||
|
||||
_say_what_i_do Fetching the upstream cheat sheets repositories
|
||||
ve/bin/python lib/fetch.py fetch-all | tee -a "$LOG"
|
||||
|
||||
_say_what_i_do Running self-tests
|
||||
(
|
||||
cd tests || exit
|
||||
|
||||
if CHEATSH_TEST_STANDALONE=YES \
|
||||
CHEATSH_TEST_SKIP_ONLINE=NO \
|
||||
CHEATSH_TEST_SHOW_DETAILS=NO \
|
||||
PYTHON=../ve/bin/python bash run-tests.sh | tee -a "$LOG"
|
||||
then
|
||||
printf "\033[0;32m%s\033[0m\n" "SUCCESS"
|
||||
else
|
||||
printf "\033[0;31m%s\033[0m\n" "FAILED"
|
||||
echo "Some tests were failed. Run the tests manually for further investigation:"
|
||||
echo " cd $PWD; bash run-tests.sh)"
|
||||
fi
|
||||
)
|
||||
|
||||
mkdir -p "$CHTSH_HOME"
|
||||
echo "$installdir" > "$CHTSH_HOME/standalone"
|
||||
echo auto > "$CHTSH_HOME/mode"
|
||||
|
||||
_say_what_i_do Done
|
||||
|
||||
local v1; v1=$(printf "\033[0;1;32m")
|
||||
local v2; v2=$(printf "\033[0m")
|
||||
|
||||
cat <<EOF | sed "s/{/$v1/; s/}/$v2/"
|
||||
|
||||
{ _ }
|
||||
{ \\ \\ } The installation is successfully finished.
|
||||
{ \\ \\ }
|
||||
{ / / } Now you can use cheat.sh in the standalone mode,
|
||||
{ /_/ } or you can start your own cheat.sh server.
|
||||
|
||||
|
||||
Now the cht.sh shell client is switched to the auto mode, where it uses
|
||||
the local cheat.sh installation if possible.
|
||||
You can switch the mode with the --mode switch:
|
||||
|
||||
cht.sh --mode lite # use https://cheat.sh/ only
|
||||
cht.sh --mode auto # use local installation
|
||||
|
||||
You can add your own cheat sheets repository (config is in \`etc/config.yaml\`),
|
||||
or create new cheat sheets adapters (in \`lib/adapters\`).
|
||||
|
||||
To update local copies of cheat sheets repositores on a regular basis,
|
||||
add the following line to your user crontab (crontab -e):
|
||||
|
||||
10 * * * * $installdir/ve/bin/python $installdir/lib/fetch.py update-all
|
||||
|
||||
All cheat sheets will be automatically actualized each hour.
|
||||
|
||||
If you are running a server reachable from the Internet, it can be instantly
|
||||
notified via a HTTP request about any cheat sheets changes. For that, please
|
||||
open an issue on the cheat.sh project repository [github.com/chubin/cheat.sh]
|
||||
with the ENTRY-POINT from the URL https://ENTRY-POINT/:actualize specified
|
||||
EOF
|
||||
}
|
||||
|
||||
chtsh_mode()
|
||||
{
|
||||
local mode="$1"
|
||||
|
||||
local text; text=$(
|
||||
echo " auto use the standalone installation first"
|
||||
echo " lite use the cheat sheets server directly"
|
||||
)
|
||||
|
||||
if [ -z "$mode" ]; then
|
||||
echo "current mode: $CHTSH_MODE ($(printf "%s" "$text" | grep "$CHTSH_MODE" | sed "s/$CHTSH_MODE//; s/^ *//; s/ \+/ /"))"
|
||||
if [ -d "$CHEATSH_INSTALLATION" ]; then
|
||||
echo "cheat.sh standalone installation: $CHEATSH_INSTALLATION"
|
||||
else
|
||||
echo 'cheat.sh standalone installation not found; falling back to the "lite" mode'
|
||||
fi
|
||||
elif [ "$mode" = auto ] || [ "$mode" = lite ]; then
|
||||
if [ "$mode" = "$CHTSH_MODE" ]; then
|
||||
echo "The configured mode was \"$CHTSH_MODE\"; nothing changed"
|
||||
else
|
||||
mkdir -p "$CHTSH_HOME"
|
||||
echo "$mode" > "$CHTSH_HOME/mode"
|
||||
echo "Configured mode: $mode"
|
||||
fi
|
||||
else
|
||||
echo "Unknown mode: $mode"
|
||||
echo Supported modes:
|
||||
echo " auto use the standalone installation first"
|
||||
echo " lite use the cheat sheets server directly"
|
||||
fi
|
||||
}
|
||||
|
||||
get_query_options()
|
||||
{
|
||||
local query="$*"
|
||||
if [ -n "$CHTSH_QUERY_OPTIONS" ]; then
|
||||
case $query in
|
||||
*\?*) query="$query&${CHTSH_QUERY_OPTIONS}";;
|
||||
*) query="$query?${CHTSH_QUERY_OPTIONS}";;
|
||||
esac
|
||||
fi
|
||||
printf "%s" "$query"
|
||||
}
|
||||
|
||||
do_query()
|
||||
{
|
||||
local query="$*"
|
||||
local b_opts=
|
||||
local uri="${CHTSH_URL}/\"\$(get_query_options $query)\""
|
||||
|
||||
if [ -e "$CHTSH_HOME/id" ]; then
|
||||
b_opts="-b \"\$CHTSH_HOME/id\""
|
||||
fi
|
||||
|
||||
eval curl "$b_opts" -s "$uri" > "$TMP1"
|
||||
|
||||
if [ -z "$lines" ] || [ "$(wc -l "$TMP1" | awk '{print $1}')" -lt "$lines" ]; then
|
||||
cat "$TMP1"
|
||||
else
|
||||
${PAGER:-$defpager} "$TMP1"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_query()
|
||||
{
|
||||
local section="$1"; shift
|
||||
local input="$1"; shift
|
||||
local arguments="$1"
|
||||
|
||||
local query
|
||||
if [ -z "$section" ] || [ x"${input}" != x"${input#/}" ]; then
|
||||
query=$(printf %s "$input" | sed 's@ @/@; s@ @+@g')
|
||||
else
|
||||
query=$(printf %s "$section/$input" | sed 's@ @+@g')
|
||||
fi
|
||||
|
||||
[ -n "$arguments" ] && arguments="?$arguments"
|
||||
printf %s "$query$arguments"
|
||||
}
|
||||
|
||||
get_list_of_sections()
|
||||
{
|
||||
curl -s "${CHTSH_URL}"/:list | grep -v '/.*/' | grep '/$' | xargs
|
||||
}
|
||||
|
||||
gen_random_str()
|
||||
(
|
||||
len=$1
|
||||
if command -v openssl >/dev/null; then
|
||||
openssl rand -base64 $((len*3/4)) | awk -v ORS='' //
|
||||
else
|
||||
rdev=/dev/urandom
|
||||
for d in /dev/{srandom,random,arandom}; do
|
||||
test -r "$d" && rdev=$d
|
||||
done
|
||||
if command -v hexdump >/dev/null; then
|
||||
hexdump -vn $((len/2)) -e '1/1 "%02X" 1 ""' "$rdev"
|
||||
elif command -v xxd >/dev/null; then
|
||||
xxd -l $((len/2)) -ps "$rdev" | awk -v ORS='' //
|
||||
else
|
||||
cd /tmp || { echo Cannot cd into /tmp >&2; exit 1; }
|
||||
s=
|
||||
# shellcheck disable=SC2000
|
||||
while [ "$(echo "$s" | wc -c)" -lt "$len" ]; do
|
||||
s="$s$(mktemp -u XXXXXXXXXX)"
|
||||
done
|
||||
printf "%.${len}s" "$s"
|
||||
fi
|
||||
fi
|
||||
)
|
||||
|
||||
if [ "$CHTSH_MODE" = auto ] && [ -d "$CHEATSH_INSTALLATION" ]; then
|
||||
curl() {
|
||||
# ignoring all options
|
||||
# currently the standalone.py does not support them anyway
|
||||
local opt
|
||||
while getopts "b:s" opt; do
|
||||
:
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
local url; url="$1"; shift
|
||||
PYTHONIOENCODING=UTF-8 "$CHEATSH_INSTALLATION/ve/bin/python" "$CHEATSH_INSTALLATION/lib/standalone.py" "${url#"$CHTSH_URL"}" "$@"
|
||||
}
|
||||
elif [ "$(uname -s)" = OpenBSD ] && [ -x /usr/bin/ftp ]; then
|
||||
# any better test not involving either OS matching or actual query?
|
||||
curl() {
|
||||
local opt args="-o -"
|
||||
while getopts "b:s" opt; do
|
||||
case $opt in
|
||||
b) args="$args -c $OPTARG";;
|
||||
s) args="$args -M -V";;
|
||||
*) echo "internal error: unsupported cURL option '$opt'" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
/usr/bin/ftp "$args" "$@"
|
||||
}
|
||||
else
|
||||
command -v curl >/dev/null || { echo 'DEPENDENCY: install "curl" to use cht.sh' >&2; exit 1; }
|
||||
_CURL=$(command -v curl)
|
||||
if [ x"$CHTSH_CURL_OPTIONS" != x ]; then
|
||||
curl() {
|
||||
$_CURL "${CHTSH_CURL_OPTIONS}" "$@"
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = --read ]; then
|
||||
read -r a || a="exit"
|
||||
printf "%s\n" "$a"
|
||||
exit 0
|
||||
elif [ x"$1" = x--help ] || [ -z "$1" ]; then
|
||||
|
||||
n=${0##*/}
|
||||
s=$(echo "$n" | sed "s/./ /"g)
|
||||
|
||||
cat <<EOF
|
||||
Usage:
|
||||
|
||||
$n [OPTIONS|QUERY]
|
||||
|
||||
Options:
|
||||
|
||||
QUERY process QUERY and exit
|
||||
|
||||
--help show this help
|
||||
--shell [LANG] shell mode (open LANG if specified)
|
||||
|
||||
--standalone-install [DIR|help]
|
||||
install cheat.sh in the standalone mode
|
||||
(by default, into ~/.cheat.sh/)
|
||||
|
||||
--mode [auto|lite] set (or display) mode of operation
|
||||
* auto - prefer the local installation
|
||||
* lite - use the cheat sheet server
|
||||
|
||||
EOF
|
||||
exit 0
|
||||
elif [ x"$1" = x--shell ]; then
|
||||
shell_mode=yes
|
||||
shift
|
||||
elif [ x"$1" = x--standalone-install ]; then
|
||||
shift
|
||||
cheatsh_standalone_install "$@"
|
||||
exit "$?"
|
||||
elif [ x"$1" = x--mode ]; then
|
||||
shift
|
||||
chtsh_mode "$@"
|
||||
exit "$?"
|
||||
fi
|
||||
|
||||
prompt="cht.sh"
|
||||
opts=""
|
||||
input=""
|
||||
for o; do
|
||||
if [ x"$o" != x"${o#-}" ]; then
|
||||
opts="${opts}${o#-}"
|
||||
else
|
||||
input="$input $o"
|
||||
fi
|
||||
done
|
||||
query=$(echo "$input" | sed 's@ *$@@; s@^ *@@; s@ @/@; s@ @+@g')
|
||||
|
||||
if [ "$shell_mode" != yes ]; then
|
||||
curl -s "${CHTSH_URL}"/"$(get_query_options "$query")"
|
||||
exit 0
|
||||
else
|
||||
new_section="$1"
|
||||
valid_sections=$(get_list_of_sections)
|
||||
valid=no; for q in $valid_sections; do [ "$q" = "$new_section/" ] && { valid=yes; break; }; done
|
||||
|
||||
if [ "$valid" = yes ]; then
|
||||
section="$new_section"
|
||||
# shellcheck disable=SC2001
|
||||
this_query="$(echo "$input" | sed 's@ *[^ ]* *@@')"
|
||||
this_prompt="\033[0;32mcht.sh/$section>\033[0m "
|
||||
else
|
||||
this_query="$input"
|
||||
this_prompt="\033[0;32mcht.sh>\033[0m "
|
||||
fi
|
||||
if [ -n "$this_query" ] && [ -z "$CHEATSH_RESTART" ]; then
|
||||
printf "$this_prompt$this_query\n"
|
||||
curl -s "${CHTSH_URL}"/"$(get_query_options "$query")"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$is_macos" != yes ]; then
|
||||
if [ "$XDG_SESSION_TYPE" = wayland ]; then
|
||||
command -v wl-copy >/dev/null || echo 'DEPENDENCY: please install "wl-copy" for "copy"' >&2
|
||||
else
|
||||
command -v xsel >/dev/null || echo 'DEPENDENCY: please install "xsel" for "copy"' >&2
|
||||
fi
|
||||
fi
|
||||
command -v rlwrap >/dev/null || { echo 'DEPENDENCY: install "rlwrap" to use cht.sh in the shell mode' >&2; exit 1; }
|
||||
|
||||
mkdir -p "$CHTSH_HOME/"
|
||||
lines=$(tput lines)
|
||||
|
||||
if command -v less >/dev/null; then
|
||||
defpager="less -R"
|
||||
elif command -v more >/dev/null; then
|
||||
defpager="more"
|
||||
else
|
||||
defpager="cat"
|
||||
fi
|
||||
|
||||
cmd_cd() {
|
||||
if [ $# -eq 0 ]; then
|
||||
section=""
|
||||
else
|
||||
new_section=$(echo "$input" | sed 's/cd *//; s@/*$@@; s@^/*@@')
|
||||
if [ -z "$new_section" ] || [ ".." = "$new_section" ]; then
|
||||
section=""
|
||||
else
|
||||
valid_sections=$(get_list_of_sections)
|
||||
valid=no; for q in $valid_sections; do [ "$q" = "$new_section/" ] && { valid=yes; break; }; done
|
||||
if [ "$valid" = no ]; then
|
||||
echo "Invalid section: $new_section"
|
||||
echo "Valid sections:"
|
||||
echo "$valid_sections" \
|
||||
| xargs printf "%-10s\n" \
|
||||
| tr ' ' . \
|
||||
| xargs -n 10 \
|
||||
| sed 's/\./ /g; s/^/ /'
|
||||
else
|
||||
section="$new_section"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
cmd_copy() {
|
||||
if [ -z "$DISPLAY" ]; then
|
||||
echo copy: supported only in the Desktop version
|
||||
elif [ -z "$input" ]; then
|
||||
echo copy: Make at least one query first.
|
||||
else
|
||||
curl -s "${CHTSH_URL}"/"$(get_query_options "$query"?T)" > "$TMP1"
|
||||
if [ "$is_macos" != yes ]; then
|
||||
if [ "$XDG_SESSION_TYPE" = wayland ]; then
|
||||
wl-copy < "$TMP1"
|
||||
else
|
||||
xsel -bi < "$TMP1"
|
||||
fi
|
||||
else
|
||||
pbcopy < "$TMP1"
|
||||
fi
|
||||
echo "copy: $(wc -l "$TMP1" | awk '{print $1}') lines copied to the selection"
|
||||
fi
|
||||
}
|
||||
|
||||
cmd_ccopy() {
|
||||
if [ -z "$DISPLAY" ]; then
|
||||
echo copy: supported only in the Desktop version
|
||||
elif [ -z "$input" ]; then
|
||||
echo copy: Make at least one query first.
|
||||
else
|
||||
curl -s "${CHTSH_URL}"/"$(get_query_options "$query"?TQ)" > "$TMP1"
|
||||
if [ "$is_macos" != yes ]; then
|
||||
if [ "$XDG_SESSION_TYPE" = wayland ]; then
|
||||
wl-copy < "$TMP1"
|
||||
else
|
||||
xsel -bi < "$TMP1"
|
||||
fi
|
||||
else
|
||||
pbcopy < "$TMP1"
|
||||
fi
|
||||
echo "copy: $(wc -l "$TMP1" | awk '{print $1}') lines copied to the selection"
|
||||
fi
|
||||
}
|
||||
|
||||
cmd_exit() {
|
||||
exit 0
|
||||
}
|
||||
|
||||
cmd_help() {
|
||||
cat <<EOF
|
||||
help - show this help
|
||||
hush - do not show the 'help' string at start anymore
|
||||
cd LANG - change the language context
|
||||
copy - copy the last answer in the clipboard (aliases: yank, y, c)
|
||||
ccopy - copy the last answer w/o comments (cut comments; aliases: cc, Y, C)
|
||||
exit - exit the cheat shell (aliases: quit, ^D)
|
||||
id [ID] - set/show an unique session id ("reset" to reset, "remove" to remove)
|
||||
stealth - stealth mode (automatic queries for selected text)
|
||||
update - self update (only if the scriptfile is writeable)
|
||||
version - show current cht.sh version
|
||||
/:help - service help
|
||||
QUERY - space separated query staring (examples are below)
|
||||
cht.sh> python zip list
|
||||
cht.sh/python> zip list
|
||||
cht.sh/go> /python zip list
|
||||
EOF
|
||||
}
|
||||
|
||||
cmd_hush() {
|
||||
mkdir -p "$CHTSH_HOME/" && touch "$CHTSH_HOME/.hushlogin" && echo "Initial 'use help' message was disabled"
|
||||
}
|
||||
|
||||
cmd_id() {
|
||||
id_file="$CHTSH_HOME/id"
|
||||
|
||||
if [ id = "$input" ]; then
|
||||
new_id=""
|
||||
else
|
||||
new_id=$(echo "$input" | sed 's/id *//; s/ *$//; s/ /+/g')
|
||||
fi
|
||||
if [ "$new_id" = remove ]; then
|
||||
if [ -e "$id_file" ]; then
|
||||
rm -f -- "$id_file" && echo "id is removed"
|
||||
else
|
||||
echo "id was not set, so you can't remove it"
|
||||
fi
|
||||
return
|
||||
fi
|
||||
if [ -n "$new_id" ] && [ reset != "$new_id" ] && [ "$(/bin/echo -n "$new_id" | wc -c)" -lt 16 ]; then
|
||||
echo "ERROR: $new_id: Too short id. Minimal id length is 16. Use 'id reset' for a random id"
|
||||
return
|
||||
fi
|
||||
if [ -z "$new_id" ]; then
|
||||
# if new_id is not specified check if we have some id already
|
||||
# if yes, just show it
|
||||
# if not, generate a new id
|
||||
if [ -e "$id_file" ]; then
|
||||
awk '$6 == "id" {print $NF}' <"$id_file" | tail -n 1
|
||||
return
|
||||
else
|
||||
new_id=reset
|
||||
fi
|
||||
fi
|
||||
if [ "$new_id" = reset ]; then
|
||||
new_id=$(gen_random_str 12)
|
||||
else
|
||||
echo WARNING: if someone gueses your id, he can read your cht.sh search history
|
||||
fi
|
||||
if [ -e "$id_file" ] && grep -q '\tid\t[^\t][^\t]*$' "$id_file" 2> /dev/null; then
|
||||
sed -i 's/\tid\t[^\t][^\t]*$/ id '"$new_id"'/' "$id_file"
|
||||
else
|
||||
if ! [ -e "$id_file" ]; then
|
||||
printf '#\n\n' > "$id_file"
|
||||
fi
|
||||
printf ".cht.sh\tTRUE\t/\tTRUE\t0\tid\t$new_id\n" >> "$id_file"
|
||||
fi
|
||||
echo "$new_id"
|
||||
}
|
||||
|
||||
cmd_query() {
|
||||
query=$(prepare_query "$section" "$input")
|
||||
do_query "$query"
|
||||
}
|
||||
|
||||
cmd_stealth() {
|
||||
if [ "$input" != stealth ]; then
|
||||
arguments=$(echo "$input" | sed 's/stealth //; s/ /\&/')
|
||||
fi
|
||||
trap break INT
|
||||
if [ "$is_macos" = yes ]; then
|
||||
past=$(pbpaste)
|
||||
else
|
||||
if [ "$XDG_SESSION_TYPE" = wayland ]; then
|
||||
past=$(wl-paste -p)
|
||||
else
|
||||
past=$(xsel -o)
|
||||
fi
|
||||
fi
|
||||
printf "\033[0;31mstealth:\033[0m you are in the stealth mode; select any text in any window for a query\n"
|
||||
printf "\033[0;31mstealth:\033[0m selections longer than $STEALTH_MAX_SELECTION_LENGTH words are ignored\n"
|
||||
if [ -n "$arguments" ]; then
|
||||
printf "\033[0;31mstealth:\033[0m query arguments: ?$arguments\n"
|
||||
fi
|
||||
printf "\033[0;31mstealth:\033[0m use ^C to leave this mode\n"
|
||||
while true; do
|
||||
if [ "$is_macos" = yes ]; then
|
||||
current=$(pbpaste)
|
||||
else
|
||||
if [ "$XDG_SESSION_TYPE" = wayland ]; then
|
||||
current=$(wl-paste -p)
|
||||
else
|
||||
current=$(xsel -o)
|
||||
fi
|
||||
fi
|
||||
if [ "$past" != "$current" ]; then
|
||||
past=$current
|
||||
current_text="$(echo $current | tr -c '[a-zA-Z0-9]' ' ')"
|
||||
if [ "$(echo "$current_text" | wc -w)" -gt "$STEALTH_MAX_SELECTION_LENGTH" ]; then
|
||||
printf "\033[0;31mstealth:\033[0m selection length is longer than $STEALTH_MAX_SELECTION_LENGTH words; ignoring\n"
|
||||
continue
|
||||
else
|
||||
printf "\n\033[0;31mstealth: \033[7m $current_text\033[0m\n"
|
||||
query=$(prepare_query "$section" "$current_text" "$arguments")
|
||||
do_query "$query"
|
||||
fi
|
||||
fi
|
||||
sleep 1;
|
||||
done
|
||||
trap - INT
|
||||
}
|
||||
|
||||
cmd_update() {
|
||||
[ -w "$0" ] || { echo "The script is readonly; please update manually: curl -s ${CHTSH_URL}/:cht.sh | sudo tee $0"; return; }
|
||||
TMP2=$(mktemp /tmp/cht.sh.XXXXXXXXXXXXX)
|
||||
curl -s "${CHTSH_URL}"/:cht.sh > "$TMP2"
|
||||
if ! cmp "$0" "$TMP2" > /dev/null 2>&1; then
|
||||
if grep -q ^__CHTSH_VERSION= "$TMP2"; then
|
||||
# section was vaildated by us already
|
||||
args=(--shell "$section")
|
||||
cp "$TMP2" "$0" && echo "Updated. Restarting..." && rm "$TMP2" && CHEATSH_RESTART=1 exec "$0" "${args[@]}"
|
||||
else
|
||||
echo "Something went wrong. Please update manually"
|
||||
fi
|
||||
else
|
||||
echo "cht.sh is up to date. No update needed"
|
||||
fi
|
||||
rm -f "$TMP2" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cmd_version() {
|
||||
insttime=$(ls -l -- "$0" | sed 's/ */ /g' | cut -d ' ' -f 6-8)
|
||||
echo "cht.sh version $__CHTSH_VERSION of $__CHTSH_DATETIME; installed at: $insttime"
|
||||
TMP2=$(mktemp /tmp/cht.sh.XXXXXXXXXXXXX)
|
||||
if curl -s "${CHTSH_URL}"/:cht.sh > "$TMP2"; then
|
||||
if ! cmp "$0" "$TMP2" > /dev/null 2>&1; then
|
||||
echo "Update needed (type 'update' for that)".
|
||||
else
|
||||
echo "Up to date. No update needed"
|
||||
fi
|
||||
fi
|
||||
rm -f "$TMP2" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
TMP1=$(mktemp /tmp/cht.sh.XXXXXXXXXXXXX)
|
||||
trap 'rm -f $TMP1 $TMP2' EXIT
|
||||
trap 'true' INT
|
||||
|
||||
if ! [ -e "$CHTSH_HOME/.hushlogin" ] && [ -z "$this_query" ]; then
|
||||
echo "type 'help' for the cht.sh shell help"
|
||||
fi
|
||||
|
||||
while true; do
|
||||
if [ "$section" != "" ]; then
|
||||
full_prompt="$prompt/$section> "
|
||||
else
|
||||
full_prompt="$prompt> "
|
||||
fi
|
||||
|
||||
input=$(
|
||||
rlwrap -H "$CHTSH_HOME/history" -pgreen -C cht.sh -S "$full_prompt" bash "$0" --read | sed 's/ *#.*//'
|
||||
)
|
||||
|
||||
cmd_name=${input%% *}
|
||||
cmd_args=${input#* }
|
||||
case $cmd_name in
|
||||
"") continue;; # skip empty input lines
|
||||
'?'|h|help) cmd_name=help;;
|
||||
hush) cmd_name=hush;;
|
||||
cd) cmd_name="cd";;
|
||||
exit|quit) cmd_name="exit";;
|
||||
copy|yank|c|y) cmd_name=copy;;
|
||||
ccopy|cc|C|Y) cmd_name=ccopy;;
|
||||
id) cmd_name=id;;
|
||||
stealth) cmd_name=stealth;;
|
||||
update) cmd_name=update;;
|
||||
version) cmd_name=version;;
|
||||
*) cmd_name="query"; cmd_args="$input";;
|
||||
esac
|
||||
"cmd_$cmd_name" $cmd_args
|
||||
done
|
||||
72
bin/d
72
bin/d
@@ -1,72 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Shamelessly copied from Josh Medeski
|
||||
# https://github.com/joshmedeski/dotfiles/blob/main/.config/bin/d
|
||||
|
||||
# Get argument for script key/name, default to dev
|
||||
DEV_SCRIPT="${1:-dev}"
|
||||
|
||||
# First, check if the jq command is available
|
||||
# AND there is a package.json file in the current directory
|
||||
if command -v jq &>/dev/null && [[ -f "package.json" ]]; then
|
||||
# if we have jq,
|
||||
# then use it to extract the first occurrence of a key in package.json's scripts object
|
||||
# that starts with the argument passed in (or dev)
|
||||
DEV_SCRIPT="$(jq \
|
||||
-r \
|
||||
--arg ds "$DEV_SCRIPT" \
|
||||
'first(.scripts | keys[] | select(. | test("^\($ds)[^\"]*")))' \
|
||||
package.json)"
|
||||
# if this didn't match anything, fallback to dev
|
||||
DEV_SCRIPT="${DEV_SCRIPT:-dev}"
|
||||
fi
|
||||
|
||||
if [ -f "d" ]; then
|
||||
./d "$@"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f package-lock.json ]; then
|
||||
echo "npm run $DEV_SCRIPT"
|
||||
npm run "$DEV_SCRIPT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f yarn.lock ]; then
|
||||
echo "yarn $DEV_SCRIPT"
|
||||
yarn "$DEV_SCRIPT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f pnpm-lock.yaml ]; then
|
||||
echo "pnpm run $DEV_SCRIPT"
|
||||
pnpm run "$DEV_SCRIPT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f bun.lockb ]; then
|
||||
echo "bun $DEV_SCRIPT"
|
||||
pnpm run "$DEV_SCRIPT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BASE_NAME="$(basename "$(pwd)")"
|
||||
|
||||
cd ..
|
||||
if [ -f pnpm-lock.yaml ]; then
|
||||
cd "$BASE_NAME" || exit
|
||||
pnpm run "$DEV_SCRIPT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PARENT_BASE_NAME="$(basename "$(pwd)")"
|
||||
|
||||
cd ..
|
||||
if [ -f pnpm-lock.yaml ]; then
|
||||
cd "$PARENT_BASE_NAME" || exit
|
||||
cd "$BASE_NAME" || exit
|
||||
pnpm run "$DEV_SCRIPT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo " Node package not detected"
|
||||
exit 1
|
||||
BIN
bin/gitmux
BIN
bin/gitmux
Binary file not shown.
@@ -1,48 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#fetch Gravatars
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use LWP::Simple;
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
|
||||
my $size = 90;
|
||||
my $output_dir = '.git/avatar';
|
||||
|
||||
die("no .git/ directory found in current path\n") unless -d '.git';
|
||||
|
||||
mkdir($output_dir) unless -d $output_dir;
|
||||
|
||||
open(GITLOG, q/git log --pretty=format:"%ae|%an" |/) or die("failed to read git-log: $!\n");
|
||||
|
||||
my %processed_authors;
|
||||
|
||||
while(<GITLOG>) {
|
||||
chomp;
|
||||
my($email, $author) = split(/\|/, $_);
|
||||
|
||||
next if $processed_authors{$author}++;
|
||||
|
||||
my $author_image_file = $output_dir . '/' . $author . '.png';
|
||||
|
||||
#skip images we have
|
||||
next if -e $author_image_file;
|
||||
|
||||
#try and fetch image
|
||||
|
||||
my $grav_url = "http://www.gravatar.com/avatar/".md5_hex(lc $email)."?d=404&size=".$size;
|
||||
|
||||
warn "fetching image for '$author' $email ($grav_url)...\n";
|
||||
|
||||
my $rc = getstore($grav_url, $author_image_file);
|
||||
|
||||
sleep(1);
|
||||
|
||||
if($rc != 200) {
|
||||
unlink($author_image_file);
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
close GITLOG;
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Create a set of screenshots from a URL
|
||||
# Usage: screenshot <url>
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo 1>&2 Usage: screenshot \<url\> \(parameters\)
|
||||
exit 127
|
||||
fi
|
||||
|
||||
pageres 375x667 768x1024 1280x800 $*
|
||||
@@ -1,69 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
git init
|
||||
cat <<EOT > .gitignore
|
||||
node_modules
|
||||
EOT
|
||||
|
||||
npm init -y
|
||||
npm install --save-dev typescript prettier eslint eslint-config-prettier lint-staged
|
||||
# npx eslint --init
|
||||
|
||||
cat <<EOT > .prettierrc.json
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"useTabs": true,
|
||||
"tabWidth": 4,
|
||||
"printWidth": 100,
|
||||
"semi": true,
|
||||
"singleQuote": true
|
||||
}
|
||||
EOT
|
||||
|
||||
cat <<EOT > .eslintrc.json
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
},
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": ["react"],
|
||||
"rules": {
|
||||
"indent": ["warn", "tab"],
|
||||
"quotes": ["error", "single"],
|
||||
"semi": ["error", "always"]
|
||||
}
|
||||
}
|
||||
EOT
|
||||
|
||||
touch .eslintignore
|
||||
|
||||
node -e "let pkg=require('./package.json'); pkg.scripts.build='tsc'; require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2));"
|
||||
|
||||
npx husky-init && npm install
|
||||
|
||||
cat <<EOT > .husky/pre-commit
|
||||
#!/bin/sh
|
||||
. "$(pwd "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
EOT
|
||||
|
||||
|
||||
cat <<EOT > .lintstagedrc.json
|
||||
{
|
||||
"**/*.{js,jsx,ts,tsx}":[
|
||||
"npx prettier --write",
|
||||
"npx eslint --fix"
|
||||
]
|
||||
}
|
||||
EOT
|
||||
|
||||
npx typesync
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# https://youtu.be/hJzqEAf2U4I
|
||||
selected=`cat ~/.tmux-cht-languages ~/.tmux-cht-command | fzf`
|
||||
if [[ -z $selected ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -p "Enter Query: " query
|
||||
|
||||
if grep -qs "$selected" ~/.tmux-cht-languages; then
|
||||
query=`echo $query | tr ' ' '+'`
|
||||
tmux neww bash -c "echo \"curl cht.sh/$selected/$query/\" & curl cht.sh/$selected/$query & while [ : ]; do sleep 1; done"
|
||||
else
|
||||
tmux neww bash -c "curl -s cht.sh/$selected~$query | less"
|
||||
fi
|
||||
6
fish/.gitignore
vendored
6
fish/.gitignore
vendored
@@ -1,6 +0,0 @@
|
||||
completions
|
||||
conf.d
|
||||
functions/_*
|
||||
functions/fisher.fish
|
||||
functions/bass.fish
|
||||
functions/replay.fish
|
||||
236
fish/config.fish
236
fish/config.fish
@@ -1,236 +0,0 @@
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
|
||||
# *** *** Configuration *** ***
|
||||
|
||||
# Base16 Shell
|
||||
# if status --is-interactive
|
||||
# set BASE16_SHELL "$HOME/.config/base16-shell/"
|
||||
# source "$BASE16_SHELL/profile_helper.fish"
|
||||
# end
|
||||
|
||||
# Use wezterm.terminfo
|
||||
# curl https://raw.githubusercontent.com/wez/wezterm/master/termwiz/data/wezterm.terminfo | tic -x -
|
||||
set TERM wezterm
|
||||
|
||||
# SSH
|
||||
set -x SSH_AUTH_SOCK $HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
|
||||
|
||||
# Volta
|
||||
set -gx VOLTA_HOME "$HOME/.volta"
|
||||
set -gx PATH "$VOLTA_HOME/bin" $PATH
|
||||
|
||||
# Neovim as default editor
|
||||
set -U EDITOR nvim
|
||||
|
||||
set PATH /opt/homebrew/bin $PATH
|
||||
set PATH /opt/homebrew/sbin $PATH
|
||||
set PATH /opt/homebrew/opt/libomp/bin $PATH
|
||||
set PATH /opt/homebrew/opt/llvm/bin $PATH
|
||||
set PATH /usr/local/sbin $PATH
|
||||
set PATH ~/.dotfiles/bin $PATH
|
||||
set PATH ~/.dotfiles/private/bin $PATH
|
||||
set PATH ~/.local/bin $PATH
|
||||
|
||||
set -x LIBRARY_PATH (brew --prefix)/opt/libiconv/lib
|
||||
set -x CPATH (brew --prefix)/opt/libiconv/include
|
||||
set -x PKG_CONFIG_PATH (brew --prefix)/opt/libiconv/lib/pkgconfig
|
||||
|
||||
# Homebrew Command Not Found
|
||||
set HB_CNF_HANDLER (brew --repository)"/Library/Taps/homebrew/homebrew-command-not-found/handler.fish"
|
||||
if test -f $HB_CNF_HANDLER
|
||||
source $HB_CNF_HANDLER
|
||||
end
|
||||
|
||||
# Set .config folder
|
||||
set --export XDG_CONFIG_HOME "$HOME/.config"
|
||||
|
||||
set --export KEYTIMEOUT 1
|
||||
set --export RIPGREP_CONFIG_PATH $HOME/.config/ripgrep/ripgreprc
|
||||
set --export GIT_EDITOR nvim
|
||||
set --export EDITOR nvim
|
||||
|
||||
# Stable Diffusion Webui
|
||||
set VIRTUAL_ENV $HOME/Code/AI/stable-diffusion-webui/venv
|
||||
|
||||
|
||||
# FZF
|
||||
set FD_OPTIONS "--follow --exclude .git --exclude node_modules"
|
||||
|
||||
set --export FZF_DEFAULT_COMMAND "git ls-files --cached --others --exclude-standard | fd --hidden --type f --type l $FD_OPTIONS"
|
||||
set --export FZF_DEFAULT_OPTS --no-height
|
||||
|
||||
set --export FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||
set --export FZF_CTRL_T_OPTS "--preview 'bat --color=always --style=numbers {}' --bind shift-up:preview-page-up,shift-down:preview-page-down"
|
||||
|
||||
set --export FZF_CTRL_R_OPTS --reverse
|
||||
set --export FZF_TMUX_OPTS -p
|
||||
|
||||
set --export FZF_ALT_C_COMMAND "fd --type d $FD_OPTIONS --color=never --hidden"
|
||||
set --export FZF_ALT_C_OPTS "--preview 'tree -C {} | head -50'"
|
||||
|
||||
set --export FZF_COMPLETE 0
|
||||
|
||||
# Nix
|
||||
set nix_path /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
if test -f $nix_path
|
||||
bass source $nix_path
|
||||
end
|
||||
|
||||
set --export PATH /run/current-system/sw/bin $PATH
|
||||
set --export PATH /etc/profiles/per-user/$USER/bin $PATH
|
||||
|
||||
# asdf
|
||||
set PATH ~/.asdf/shims $PATH
|
||||
|
||||
# Zoxide
|
||||
zoxide init fish | source
|
||||
|
||||
# Rust
|
||||
set --export PATH "$HOME/.cargo/bin:$PATH"
|
||||
|
||||
# TMUX
|
||||
if set -q TMUX
|
||||
set --export NVIM_LISTEN_ADDRESS (tmux show-environment -s NVIM_LISTEN_ADDRESS 2> /dev/null)
|
||||
else
|
||||
set --export NVIM_LISTEN_ADDRESS /tmp/nvimsocket
|
||||
end
|
||||
|
||||
set --export PATH $HOME/.tmux/plugins/tmux-nvr/bin $PATH
|
||||
set --export PATH $HOME/.tmux/plugins/t-smart-tmux-session-manager/bin $PATH
|
||||
|
||||
# BasicTex
|
||||
set --export PATH /Library/TeX/texbin $PATH
|
||||
|
||||
# Man
|
||||
set --export MANPATH "/usr/local/man:$MANPATH"
|
||||
|
||||
# pnpm
|
||||
set -gx PNPM_HOME "$HOME/Library/pnpm/"
|
||||
set -gx PATH "$PNPM_HOME" $PATH
|
||||
|
||||
# Atuin
|
||||
atuin init fish | source
|
||||
|
||||
# Direnv
|
||||
direnv hook fish | source
|
||||
|
||||
# Enable vi-mode key bindings
|
||||
fish_vi_key_bindings
|
||||
|
||||
# (r)everse history search
|
||||
bind -M viins '^r' fzf-history-widget
|
||||
|
||||
# (f)ile / (t)
|
||||
bind -M viins '^f' fzf-file-widget
|
||||
|
||||
# (z) jump
|
||||
bind -M viins '^z' fzf-cd-widget
|
||||
|
||||
# *** *** Aliases *** ***
|
||||
|
||||
# Fish
|
||||
alias reload 'exec fish'
|
||||
|
||||
# Folders/Lists
|
||||
alias ... 'cd ../..'
|
||||
alias cd.. 'cd ..'
|
||||
alias ls 'eza --git --group-directories-first --icons'
|
||||
alias ll 'eza -l --git --group-directories-first --icons'
|
||||
alias lt 'eza --git --group-directories-first --icons --tree'
|
||||
alias mkdir 'mkdir -p'
|
||||
alias pn pnpm
|
||||
alias px pnpx
|
||||
|
||||
# Git
|
||||
alias ga 'git add'
|
||||
alias gb 'git branch'
|
||||
alias gba 'git branch -a'
|
||||
alias gc 'git commit -v'
|
||||
alias gca 'git commit -v -a'
|
||||
alias gcam 'git commit --amend'
|
||||
alias gcan 'git commit --amend --no-edit'
|
||||
alias gd 'git diff -- . ":(exclude)yarn.lock"'
|
||||
alias gd 'git diff -- . ":(exclude)yarn.lock"' # Show differences between index and working tree
|
||||
alias gdc 'git diff --cached' # Show changes in next commit (differences between index and last commit)
|
||||
alias gdh 'git diff head' # Show difference between files in working tree and last commit
|
||||
alias gdt 'git difftool'
|
||||
alias gfa 'git fetch --all'
|
||||
alias gg 'git log'
|
||||
alias ghi 'git hist'
|
||||
alias gl 'git pull'
|
||||
alias glr 'git pull --rebase'
|
||||
alias glu 'git config user.name "Stefan Imhoff" && git config user.email "gpg@kogakure.8shield.net" && git config user.signingkey "7A7253E8!"'
|
||||
alias glx 'git config user.name "Stefan Imhoff" && git config user.email "stefan.imhoff@xing.com" && git config user.signingkey "73C3E2E3!"'
|
||||
alias gmb 'git merge-base master HEAD'
|
||||
alias gp 'git push'
|
||||
alias gpf 'git push --force-with-lease'
|
||||
alias gpp 'PATCHNAME=`git branch 2> /dev/null | sed -e "/^[^*]/d" -e "s/* \(.*\)/\1/"`-`date "+%Y-%m-%d-%H%M.patch"`; git diff --full-index master > ../patches/$PATCHNAME'
|
||||
alias gpu 'git push -u origin HEAD'
|
||||
alias gpv 'git push --no-verify'
|
||||
alias grb 'git rebase master'
|
||||
alias grbc 'git rebase --continue'
|
||||
alias grbi 'git rebase -i '
|
||||
alias grbs 'git rebase --skip'
|
||||
alias gru 'git remote update'
|
||||
alias gsb 'git show-branch'
|
||||
alias gsl 'git submodule foreach git pull'
|
||||
alias gst 'git status -sb'
|
||||
alias gsu 'git submodule update'
|
||||
alias gu 'git up'
|
||||
alias gw 'git whatchanged'
|
||||
alias gw 'git worktree'
|
||||
alias gwa 'git worktree add' # <folder> <branch/hash>
|
||||
alias gwl 'git worktree list'
|
||||
alias gwp 'git whatchanged -p'
|
||||
alias gwr 'git worktree remove' # <path/name>
|
||||
alias lg lazygit
|
||||
alias gcrb 'git branch --sort=-committerdate | fzf --header "Checkout Recent Branch" --preview "git diff --color=always {1}" --pointer="" | xargs git checkout '
|
||||
|
||||
# Vim/Neovim
|
||||
alias v vim
|
||||
|
||||
if type nvim >/dev/null 2>&1
|
||||
alias vim nvim
|
||||
end
|
||||
|
||||
# TMUX
|
||||
alias t tmux
|
||||
alias mux tmuxinator
|
||||
alias ms 'mux start'
|
||||
alias ta 'tmux attach'
|
||||
|
||||
# Nix
|
||||
alias nxs 'darwin-rebuild switch --flake ~/.dotfiles/nix'
|
||||
|
||||
# Bat
|
||||
alias cat bat
|
||||
|
||||
# TLDR
|
||||
alias tldrf 'tldr --list --single-column | fzf --preview "tldr --color=always {1}" --preview-window=right,70% | xargs tldr'
|
||||
|
||||
# Can't remember the fork name
|
||||
alias youtube-dl yt-dlp
|
||||
|
||||
# Dotfiles Folder
|
||||
alias dotfiles 'cd ~/.dotfiles'
|
||||
|
||||
# iCloud
|
||||
alias icloud "cd ~/Library/Mobile\ Documents/com~apple~CloudDocs"
|
||||
#
|
||||
# Clear the screen
|
||||
alias c clear
|
||||
|
||||
# GitHub Copilot CLI
|
||||
alias cpw copilot_what-the-shell
|
||||
alias cpg copilot_git-assist
|
||||
alias cpgh copilot_github-assist
|
||||
alias wts copilot_what-the-shell
|
||||
|
||||
# Nvim
|
||||
alias :GoToFile "nvim +GoToFile"
|
||||
alias :Grep "nvim +Grep"
|
||||
|
||||
# Prompt
|
||||
starship init fish | source
|
||||
@@ -1,8 +0,0 @@
|
||||
jorgebucaran/fisher
|
||||
jorgebucaran/autopair.fish
|
||||
jorgebucaran/replay.fish
|
||||
edc/bass
|
||||
jethrokuan/z
|
||||
joshmedeski/fish-lf-icons
|
||||
jethrokuan/fzf
|
||||
lilyball/nix-env.fish
|
||||
@@ -1,15 +0,0 @@
|
||||
function copilot_gh-assist --description "GitHub Copilot gh assist"
|
||||
set TMPFILE (mktemp)
|
||||
trap 'rm -f $TMPFILE' EXIT
|
||||
if github-copilot-cli gh-assist $argv --shellout $TMPFILE
|
||||
if test -e "$TMPFILE"
|
||||
set FIXED_CMD (cat $TMPFILE)
|
||||
echo -s "$FIXED_CMD"
|
||||
eval "$FIXED_CMD"
|
||||
else
|
||||
echo "Apologies! Extracting command failed"
|
||||
end
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
@@ -1,15 +0,0 @@
|
||||
function copilot_git-assist --description "GitHub Copilot git assist"
|
||||
set TMPFILE (mktemp)
|
||||
trap 'rm -f $TMPFILE' EXIT
|
||||
if github-copilot-cli git-assist $argv --shellout $TMPFILE
|
||||
if test -e "$TMPFILE"
|
||||
set FIXED_CMD (cat $TMPFILE)
|
||||
echo -s "$FIXED_CMD"
|
||||
eval "$FIXED_CMD"
|
||||
else
|
||||
echo "Apologies! Extracting command failed"
|
||||
end
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
@@ -1,15 +0,0 @@
|
||||
function copilot_what-the-shell --description "GitHub Copilot what the shell"
|
||||
set TMPFILE (mktemp)
|
||||
trap 'rm -f $TMPFILE' EXIT
|
||||
if github-copilot-cli what-the-shell $argv --shellout $TMPFILE
|
||||
if test -e "$TMPFILE"
|
||||
set FIXED_CMD (cat $TMPFILE)
|
||||
echo -s "$FIXED_CMD"
|
||||
eval "$FIXED_CMD"
|
||||
else
|
||||
echo "Apologies! Extracting command failed"
|
||||
end
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
@@ -1,8 +0,0 @@
|
||||
function homebrewBackup --description "Create a snapshot of all currently installed Homebrew, Cask, Mac App Store, and WhaleBrew installations"
|
||||
switch $hostname
|
||||
case mac-mini
|
||||
brew bundle dump --force --describe --file=~/.dotfiles/Brewfile
|
||||
case '*'
|
||||
brew bundle dump --force --describe --file=~/.dotfiles/Brewfile-Work
|
||||
end
|
||||
end
|
||||
@@ -1,8 +0,0 @@
|
||||
function homebrewRestore --description "Install all Homebrew, Cask, Mac App Store, and WhaleBrew applications from a snapshot"
|
||||
switch $hostname
|
||||
case mac-mini
|
||||
brew bundle --file ~/.dotfiles/Brewfile
|
||||
case '*'
|
||||
brew bundle --file ~/.dotfiles/Brewfile-Work
|
||||
end
|
||||
end
|
||||
@@ -1,3 +0,0 @@
|
||||
function pythonBackup --description "Python backup"
|
||||
pip freeze > ~/.dotfiles/python/pip-requirements.txt
|
||||
end
|
||||
@@ -1,3 +0,0 @@
|
||||
function pythonRestore --description "Install Python packages"
|
||||
pip install -r ~/.dotfiles/python/pip-requirements.txt
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
function replaceKittyLogo --description "Set a different icon for Kitty terminal"
|
||||
cp ~/Dropbox/Software/Kitty/kitty-icon/kitty-dark.icns /Applications/kitty.app/Contents/Resources/kitty.icns
|
||||
rm /var/folders/*/*/*/com.apple.dock.iconcache
|
||||
killall Dock
|
||||
end
|
||||
@@ -1,9 +0,0 @@
|
||||
function replaceWeztermLogo --description "Set a different icon for Kitty terminal"
|
||||
cp ~/Dropbox/Software/Wezterm/terminal.icns /Applications/WezTerm.app/Contents/Resources/terminal.icns
|
||||
sudo rm -rfv /Library/Caches/com.apple.iconservices.store
|
||||
sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \;
|
||||
sleep 3;
|
||||
sudo touch /Applications/*;
|
||||
killall Dock;
|
||||
killall Finder;
|
||||
end
|
||||
@@ -18,9 +18,16 @@
|
||||
};
|
||||
environment.systemPackages = [ pkgs.pinentry_mac ];
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
# programs.fish.enable = true;
|
||||
# Shells
|
||||
environment.shells = with pkgs; [
|
||||
bash
|
||||
zsh
|
||||
fish
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.fish.enable = true;
|
||||
programs.bash.enable = true;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
|
||||
@@ -7,22 +7,16 @@
|
||||
"homebrew/services" # Manage background services using the daemon manager launchctl on macOS or systemctl on Linux.
|
||||
];
|
||||
brews = [
|
||||
"bash" # TODO: Migrate to nix
|
||||
"cava" # Console-based Audio Visualizer for ALSA
|
||||
"fileicon" # macOS CLI for managing custom icons for files and folders
|
||||
"fish" # TODO: Migrate to nix
|
||||
"gettext" # INFO: Dependency of Neovim
|
||||
"libiconv" # INFO: Dependency of nixpkgs_fmt
|
||||
"luajit" # INFO: Dependency of Neovim
|
||||
"neovim" # TODO: Migrate to nix
|
||||
"oatmeal" # Terminal UI to chat with large language models (LLM) using backends such as Ollama, and direct integrations with your favourite editor like Neovim!
|
||||
"prettier" # Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML
|
||||
"starship" # TODO: Migrate to nix
|
||||
"tmux" # TODO: Migrate to nix
|
||||
"tree-sitter" # INFO: Dependency of Neovim
|
||||
"urlview" # URL extractor/launcher
|
||||
"zsh" # TODO: Migrate to nix
|
||||
"zsh-syntax-highlighting" # TODO: Migration to nix
|
||||
];
|
||||
casks = [
|
||||
"affinity-designer" # Professional graphic design software
|
||||
@@ -133,4 +127,3 @@
|
||||
"Yoink" = 457622435; # Drag and drop
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@ in
|
||||
./bat
|
||||
./ctags
|
||||
./curl
|
||||
./direnv
|
||||
./editorconfig
|
||||
./fish
|
||||
./fzf
|
||||
./gh
|
||||
./gh-dash
|
||||
@@ -70,12 +72,14 @@ in
|
||||
|
||||
# Volta
|
||||
VOLTA_HOME = "$HOME/.volta";
|
||||
|
||||
# Stable Diffusion
|
||||
# VIRTUAL_ENV = "$HOME/Code/AI/stable-diffusion-webui/venv";
|
||||
};
|
||||
|
||||
# Session Paths
|
||||
home.sessionPath = [
|
||||
# Personal scripts
|
||||
"$HOME/.dotfiles/bin"
|
||||
"$HOME/.dotfiles/private/bin"
|
||||
|
||||
# Homebrew
|
||||
@@ -96,6 +100,9 @@ in
|
||||
|
||||
# Volta
|
||||
"$VOLTA_HOME/bin"
|
||||
|
||||
# ASDF
|
||||
"$HOME/.asdf/shims"
|
||||
];
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
@@ -137,6 +144,7 @@ in
|
||||
jq # Lightweight and flexible command-line JSON processor
|
||||
lynx # Text-mode web browser
|
||||
monolith # Bundle any web page into a single HTML file
|
||||
nix-prefetch-git # Script used to obtain source hashes for fetchgit
|
||||
nixd # Nix language server
|
||||
nixpacks # App source + Nix packages + Docker = Image Resources
|
||||
nixpkgs-fmt # Nix code formatter
|
||||
@@ -159,6 +167,7 @@ in
|
||||
woff2 # Webfont compression reference code
|
||||
yarn # Fast, reliable, and secure dependency management for javascript
|
||||
yt-dlp # Command-line tool to download videos from YouTube.com and other sites (youtube-dl fork)
|
||||
zoxide # A faster way to navigate your filesystem
|
||||
|
||||
# Programming Languages
|
||||
lua # Powerful, fast, lightweight, embeddable scripting language
|
||||
|
||||
8
nix/home/direnv/default.nix
Normal file
8
nix/home/direnv/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
109
nix/home/fish/default.nix
Normal file
109
nix/home/fish/default.nix
Normal file
@@ -0,0 +1,109 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
sharedAliases = import ../shared/shared-aliases.nix { inherit lib; };
|
||||
|
||||
# Function to read a file and return its contents as a string
|
||||
readFile = file: builtins.readFile (./. + "/functions/${file}");
|
||||
|
||||
# List of function files
|
||||
functionFiles = [
|
||||
"dataUrl.fish"
|
||||
"deleteNodeModules.fish"
|
||||
"encodeBase64.fish"
|
||||
"fcd.fish"
|
||||
"fe.fish"
|
||||
"fhcd.fish"
|
||||
"fs.fish"
|
||||
"fwt.fish"
|
||||
"ghpr.fish"
|
||||
"server.fish"
|
||||
"unquarantine.fish"
|
||||
"update.fish"
|
||||
];
|
||||
|
||||
# Create a set of functions, where each key is the function name (without .fish extension)
|
||||
# and the value is the contents of the file
|
||||
fishFunctions = builtins.listToAttrs (map
|
||||
(file: {
|
||||
name = lib.removeSuffix ".fish" file;
|
||||
value = readFile file;
|
||||
})
|
||||
functionFiles
|
||||
);
|
||||
in
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
# Shell options
|
||||
interactiveShellInit = ''
|
||||
# Enable vi-mode key bindings
|
||||
fish_vi_key_bindings
|
||||
|
||||
# Set environment variables
|
||||
set -gx TERM wezterm
|
||||
'';
|
||||
|
||||
shellAliases = sharedAliases.shellAliases;
|
||||
|
||||
functions = fishFunctions;
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "autopair.fish";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jorgebucaran";
|
||||
repo = "autopair.fish";
|
||||
rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2";
|
||||
sha256 = "qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "replay.fish";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jorgebucaran";
|
||||
repo = "replay.fish";
|
||||
rev = "d2ecacd3fe7126e822ce8918389f3ad93b14c86c";
|
||||
sha256 = "TzQ97h9tBRUg+A7DSKeTBWLQuThicbu19DHMwkmUXdg=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "bass";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "edc";
|
||||
repo = "bass";
|
||||
rev = "79b62958ecf4e87334f24d6743e5766475bcf4d0";
|
||||
sha256 = "3d/qL+hovNA4VMWZ0n1L+dSM1lcz7P5CQJyy+/8exTc=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
repo = "z";
|
||||
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
|
||||
sha256 = "+FUBM7CodtZrYKqU542fQD+ZDGrd2438trKM0tIESs0=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "fish-lf-icons";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "joshmedeski";
|
||||
repo = "fish-lf-icons";
|
||||
rev = "d1c47b2088e0ffd95766b61d2455514274865b4f";
|
||||
sha256 = "6po/PYvq4t0K8Jq5/t5hXPLn80iyl3Ymx2Whme/20kc=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nix-env.fish";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "lilyball";
|
||||
repo = "nix-env.fish";
|
||||
rev = "7b65bd228429e852c8fdfa07601159130a818cfa";
|
||||
sha256 = "RG/0rfhgq6aEKNZ0XwIqOaZ6K5S4+/Y5EEMnIdtfPhk=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
102
nix/home/shared/shared-aliases.nix
Normal file
102
nix/home/shared/shared-aliases.nix
Normal file
@@ -0,0 +1,102 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
mkAliases = lib.mapAttrs (name: value: lib.mkForce value);
|
||||
in
|
||||
{
|
||||
shellAliases = mkAliases {
|
||||
# ZSH
|
||||
zshconfig = "vim $HOME/.zshrc";
|
||||
reload = "source $HOME/.zshrc";
|
||||
|
||||
# Folders/Lists
|
||||
"..." = "cd ../..";
|
||||
".." = "cd ..";
|
||||
"cd.." = "cd ..";
|
||||
ls = "eza --git --group-directories-first --icons";
|
||||
ll = "eza -l --git --group-directories-first --icons";
|
||||
lt = "eza --git --group-directories-first --icons --tree";
|
||||
lla = "ll -a";
|
||||
mkdir = "mkdir -p";
|
||||
pn = "pnpm";
|
||||
px = "pnpx";
|
||||
|
||||
# Git
|
||||
ga = "git add";
|
||||
gb = "git branch";
|
||||
gba = "git branch -a";
|
||||
gc = "git commit -v";
|
||||
gca = "git commit -v -a";
|
||||
gcam = "git commit --amend";
|
||||
gcan = "git commit --amend --no-edit";
|
||||
gd = "git diff -- . ':(exclude)yarn.lock'";
|
||||
gdc = "git diff --cached";
|
||||
gdh = "git diff head";
|
||||
gdt = "git difftool";
|
||||
gfa = "git fetch --all";
|
||||
gg = "git log";
|
||||
ghi = "git hist";
|
||||
gl = "git pull";
|
||||
glr = "git pull --rebase";
|
||||
glu = "git config user.name 'Stefan Imhoff' && git config user.email 'gpg@kogakure.8shield.net' && git config user.signingkey '7A7253E8!'";
|
||||
glx = "git config user.name 'Stefan Imhoff' && git config user.email 'stefan.imhoff@xing.com' && git config user.signingkey '73C3E2E3!'";
|
||||
gmb = "git merge-base master HEAD";
|
||||
gp = "git push";
|
||||
gpf = "git push --force-with-lease";
|
||||
gpp = "PATCHNAME=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`-`date '+%Y-%m-%d-%H%M.patch'`; git diff --full-index master > ../patches/$PATCHNAME";
|
||||
gpu = "git push -u origin HEAD";
|
||||
gpv = "git push --no-verify";
|
||||
grb = "git rebase master";
|
||||
grbc = "git rebase --continue";
|
||||
grbi = "git rebase -i ";
|
||||
grbs = "git rebase --skip";
|
||||
gru = "git remote update";
|
||||
gsb = "git show-branch";
|
||||
gsl = "git submodule foreach git pull";
|
||||
gst = "git status -sb";
|
||||
gsu = "git submodule update";
|
||||
gu = "git up";
|
||||
gw = "git whatchanged";
|
||||
gwp = "git whatchanged -p";
|
||||
gwa = "git worktree add"; # <folder> <branch/hash>
|
||||
gwl = "git worktree list";
|
||||
gwr = "git worktree remove"; # <path/name>
|
||||
lg = "lazygit";
|
||||
|
||||
# Vim
|
||||
v = "vim";
|
||||
vim = "nvim";
|
||||
|
||||
# Tmux
|
||||
t = "tmux";
|
||||
ta = "tmux attach";
|
||||
|
||||
# Nix
|
||||
nxs = "darwin-rebuild switch --flake ~/.dotfiles/nix";
|
||||
|
||||
# Bat
|
||||
cat = "bat";
|
||||
|
||||
# TLDR
|
||||
tldrf = "tldr --list --single-column | fzf --preview \"tldr --color=always {1}\" --preview-window=right,70% | xargs tldr";
|
||||
|
||||
# Can't remember the fork name
|
||||
youtube-dl = "yt-dlp";
|
||||
|
||||
# Dotfiles folder
|
||||
dotfiles = "cd ~/.dotfiles";
|
||||
|
||||
# iCloud
|
||||
icloud = "cd ~/Library/Mobile\\ Documents/com~apple~CloudDocs";
|
||||
|
||||
# Recursively delete `.DS_Store` files
|
||||
cleanup = "find . -type f -name '*.DS_Store' -ls -delete";
|
||||
|
||||
# Clear the screen
|
||||
c = "clear";
|
||||
|
||||
# Empty the Trash on all mounted volumes and the main HDD
|
||||
# Also, clear Apple's System Logs to improve shell startup speed
|
||||
emptytrash = "sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl";
|
||||
};
|
||||
}
|
||||
@@ -6,6 +6,7 @@ let
|
||||
text = builtins.readFile ./_cht;
|
||||
destination = "/share/zsh/site-functions/_cht";
|
||||
};
|
||||
sharedAliases = import ../shared/shared-aliases.nix { inherit lib; };
|
||||
in
|
||||
{
|
||||
programs.zsh = {
|
||||
@@ -13,107 +14,16 @@ in
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
shellAliases = {
|
||||
# ZSH
|
||||
zshconfig = "vim $HOME/.zshrc";
|
||||
reload = "source $HOME/.zshrc";
|
||||
|
||||
# Folders
|
||||
"..." = "cd ../..";
|
||||
".." = "cd ..";
|
||||
"cd.." = "cd ..";
|
||||
ls = "eza --git --group-directories-first --icons";
|
||||
ll = "eza -l --git --group-directories-first --icons";
|
||||
lla = "ll -a";
|
||||
mkdir = "mkdir -p";
|
||||
|
||||
# Git aliases
|
||||
ga = "git add";
|
||||
gb = "git branch";
|
||||
gba = "git branch -a";
|
||||
gc = "git commit -v";
|
||||
gca = "git commit -v -a";
|
||||
gcam = "git commit --amend";
|
||||
gcan = "git commit --amend --no-edit";
|
||||
gd = "git diff -- . ':(exclude)yarn.lock'";
|
||||
gdc = "git diff --cached";
|
||||
gdh = "git diff head";
|
||||
gdt = "git difftool";
|
||||
gfa = "git fetch --all";
|
||||
gg = "git log";
|
||||
ghi = "git hist";
|
||||
gl = "git pull";
|
||||
glr = "git pull --rebase";
|
||||
gp = "git push";
|
||||
gpf = "git push --force-with-lease";
|
||||
gpu = "git push -u origin HEAD";
|
||||
gpv = "git push --no-verify";
|
||||
grb = "git rebase master";
|
||||
grbc = "git rebase --continue";
|
||||
grbi = "git rebase -i ";
|
||||
grbs = "git rebase --skip";
|
||||
gru = "git remote update";
|
||||
gsb = "git show-branch";
|
||||
gsl = "git submodule foreach git pull";
|
||||
gst = "git status -sb";
|
||||
gsu = "git submodule update";
|
||||
gu = "git up";
|
||||
gw = "git whatchanged";
|
||||
gwp = "git whatchanged -p";
|
||||
lg = "lazygit";
|
||||
|
||||
# Vim
|
||||
v = "vim";
|
||||
vim = "nvim";
|
||||
|
||||
# Tmux
|
||||
t = "tmux";
|
||||
tn = "tmux new -s $(pwd | sed 's/.*\///g')";
|
||||
|
||||
# Bat
|
||||
cat = "bat";
|
||||
|
||||
# TLDR
|
||||
tldrf = "tldr --list --single-column | fzf --preview \"tldr --color=always {1}\" --preview-window=right,70% | xargs tldr";
|
||||
|
||||
# iA Writer
|
||||
ia = "open $1 -a /Applications/iA\\ Writer.app";
|
||||
|
||||
# Dotfiles folder
|
||||
dotfiles = "cd $HOME/.dotfiles";
|
||||
|
||||
# iCloud
|
||||
icloud = "cd $HOME/Library/Mobile\\ Documents/com~apple~CloudDocs";
|
||||
|
||||
# Get week number
|
||||
week = "date +%V";
|
||||
|
||||
# Stopwatch
|
||||
timer = "echo \"Timer started. Stop with Ctrl-D.\" && date && time cat && date";
|
||||
|
||||
# IP addresses
|
||||
ip = "dig +short myip.opendns.com @resolver1.opendns.com";
|
||||
|
||||
# Flush Directory Service cache
|
||||
flush = "dscacheutil -flushcache && killall -HUP mDNSResponder";
|
||||
|
||||
# Recursively delete `.DS_Store` files
|
||||
cleanup = "find . -type f -name '*.DS_Store' -ls -delete";
|
||||
|
||||
# Clear the screen
|
||||
c = "clear";
|
||||
|
||||
# Empty the Trash on all mounted volumes and the main HDD
|
||||
# Also, clear Apple’s System Logs to improve shell startup speed
|
||||
emptytrash = "sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl";
|
||||
};
|
||||
shellAliases = sharedAliases.shellAliases;
|
||||
initExtra = builtins.readFile ./zshrc.sh;
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "cht-completion";
|
||||
src = chtCompletionScript;
|
||||
}
|
||||
];
|
||||
|
||||
antidote = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
|
||||
Submodule private/bin updated: d4ceb7b36d...6ef81be35a
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
asdf plugin add direnv
|
||||
asdf direnv setup --shell zsh --version latest
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
|
||||
|
||||
fisher install edc/bass
|
||||
fisher install jethrokuan/fzf
|
||||
fisher install jethrokuan/z
|
||||
fisher install jorgebucaran/autopair.fish
|
||||
fisher install jorgebucaran/replay.fish
|
||||
fisher install joshmedeski/fish-lf-icons
|
||||
@@ -7,22 +7,10 @@ sudo -v
|
||||
echo "Installing Xcode Developer Tools"
|
||||
xcode-select --install
|
||||
|
||||
# TMUX Plugin Manager
|
||||
echo "Installing TMUX Plugin Manager"
|
||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||
|
||||
# Fish Plugin Manager
|
||||
echo "Installing Fish Plugin Manager"
|
||||
source ./fisher.sh
|
||||
|
||||
# Neovim
|
||||
echo "Installing Neovim"
|
||||
source ./neovim.sh
|
||||
|
||||
# Direnv
|
||||
echo "Installing Direnv"
|
||||
source ./direnv.sh
|
||||
|
||||
# Node.js
|
||||
echo "Installing Node.js"
|
||||
source ./nodejs.sh
|
||||
@@ -54,9 +42,3 @@ source ./golang.sh
|
||||
# MacOS Default Settings
|
||||
echo "Restoring default settings for MacOS"
|
||||
source ./macos.sh
|
||||
|
||||
# Install Themes
|
||||
cd ~/.dotfiles/bat
|
||||
bat cache --build
|
||||
silicon --build-cache
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user