├── Cursor ├── snippets │ └── .keep ├── keybindings.json └── settings.json ├── cursor ├── snippets │ └── .keep ├── keybindings.json └── settings.json ├── misc ├── .task │ ├── hooks │ │ └── .keep │ └── nord.theme ├── .asdfrc ├── .editrc ├── .encrypted │ ├── raycast.rayconfig │ ├── security-passwd.asc │ ├── codes.asc │ ├── security.asc │ └── zshenv.asc ├── .git-template │ └── hooks │ │ ├── post-rewrite │ │ ├── post-checkout │ │ ├── post-commit │ │ ├── post-merge │ │ └── ctags ├── .config │ ├── mpv │ │ ├── script-opts │ │ │ └── osc.conf │ │ ├── mpv.conf │ │ └── input.conf │ ├── chrome-flags.conf │ ├── youtube-dl │ │ └── config │ ├── htop │ │ └── htoprc │ ├── user-dirs.dirs │ └── rclone │ │ └── rclone.conf ├── .irbrc ├── .bin │ ├── os.sh │ ├── security.sh │ ├── open-lifeos.sh │ ├── sync-onedrive.sh │ ├── strip-ansi.perl │ ├── import_gnupg.sh │ ├── get-current-finder.applescript │ ├── generate-random-text.sh │ ├── play-in-iina.sh │ ├── serve-local-port │ ├── color-columns.sh │ ├── fzf-preview.zsh │ ├── new-terminal.applescript │ ├── run-zsh-benchmark │ ├── get-current-url-of-browser.applescript │ └── sysinfo ├── .curlrc ├── .fdignore ├── .gemrc ├── .stow-local-ignore ├── .rsyncignore ├── .ctags.d │ └── defaults.ctags ├── .wgetrc ├── .gitignore ├── .inputrc ├── .rtorrent.rc └── .taskrc ├── .tool-versions ├── vim └── .config │ ├── nvim │ ├── lua │ │ ├── config │ │ │ ├── commands.lua │ │ │ ├── autocmds.lua │ │ │ ├── options.lua │ │ │ ├── lazy.lua │ │ │ └── keymaps.lua │ │ └── plugins │ │ │ ├── lazyvim.lua │ │ │ ├── treesitter.lua │ │ │ ├── lsp.lua │ │ │ ├── gnupg.lua │ │ │ ├── tmux.lua │ │ │ ├── git.lua │ │ │ ├── telescope.lua │ │ │ ├── misc.lua │ │ │ ├── colors.lua │ │ │ └── example.lua │ ├── stylua.toml │ ├── .gitignore │ ├── init.lua │ ├── README.md │ ├── lazyvim.json │ ├── .neoconf.json │ ├── performance │ │ ├── superminivimrc │ │ └── minivimrc │ ├── lazy-lock.json │ └── LICENSE │ └── neovide │ └── config.toml ├── gpg ├── gpg-agent.conf └── sshcontrol ├── .gitignore ├── terminal ├── .tmux │ └── status_line ├── .config │ └── kitty │ │ ├── catpuccin.conf │ │ ├── ayu.conf │ │ ├── snazzy.conf │ │ ├── nord.conf │ │ ├── toggle_term.py │ │ ├── tokyonight.conf │ │ ├── catpuccin-latte.conf │ │ ├── catpuccin-mocha.conf │ │ ├── catpuccin-frappee.conf │ │ └── catpuccin-macchiato.conf └── .tmux.conf ├── tasks.md ├── .cursorignore ├── __install ├── stow.sh ├── asdf.sh ├── secrets.sh ├── run └── brew.sh ├── zsh ├── .zsh │ ├── plugs.txt │ ├── macos.zsh │ ├── dotfiles.zsh │ ├── downloaders.zsh │ ├── languages.zsh │ ├── tmux.zsh │ ├── completion.zsh │ ├── utils.sh │ ├── fzf.zsh │ ├── aliases.zsh │ └── prompt.zsh ├── .zshenv └── .zshrc ├── README.md └── _copied └── .gitconfig /Cursor/snippets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cursor/snippets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/.task/hooks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | ruby 3.2.0 2 | -------------------------------------------------------------------------------- /misc/.asdfrc: -------------------------------------------------------------------------------- 1 | legacy_version_file = yes 2 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/config/commands.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/.editrc: -------------------------------------------------------------------------------- 1 | bind -v 2 | bind "^R" em-inc-search-prev 3 | bind \\t rl_complete 4 | -------------------------------------------------------------------------------- /vim/.config/nvim/stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | indent_width = 2 3 | column_width = 120 -------------------------------------------------------------------------------- /vim/.config/nvim/.gitignore: -------------------------------------------------------------------------------- 1 | tt.* 2 | .tests 3 | doc/tags 4 | debug 5 | .repro 6 | foo.* 7 | *.log 8 | data 9 | -------------------------------------------------------------------------------- /misc/.encrypted/raycast.rayconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikhgupta/dotfiles/HEAD/misc/.encrypted/raycast.rayconfig -------------------------------------------------------------------------------- /misc/.git-template/hooks/post-rewrite: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | case "$1" in 3 | rebase) exec .git/hooks/post-merge ;; 4 | esac 5 | -------------------------------------------------------------------------------- /vim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | -- bootstrap lazy.nvim, LazyVim and your plugins 2 | require("config.lazy") 3 | require("config.commands") 4 | -------------------------------------------------------------------------------- /misc/.git-template/hooks/post-checkout: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # echo "Generating Ctags for the repository.." 3 | .git/hooks/ctags >/dev/null 2>&1 & 4 | -------------------------------------------------------------------------------- /misc/.git-template/hooks/post-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # echo "Generating Ctags for the repository.." 3 | .git/hooks/ctags >/dev/null 2>&1 & 4 | -------------------------------------------------------------------------------- /misc/.git-template/hooks/post-merge: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # echo "Generating Ctags for the repository.." 3 | .git/hooks/ctags >/dev/null 2>&1 & 4 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/lazyvim.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "LazyVim/LazyVim", 3 | opts = { 4 | colorscheme = "catppuccin", 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /misc/.config/mpv/script-opts/osc.conf: -------------------------------------------------------------------------------- 1 | layout=bottombar 2 | seekbarstyle=slider 3 | valign=0.9 4 | deadzonesize=0.9 5 | hidetimeout=500 6 | minmousemove=1 7 | -------------------------------------------------------------------------------- /misc/.config/chrome-flags.conf: -------------------------------------------------------------------------------- 1 | --start-maximized 2 | --process-per-site 3 | --enable-dom-distiller 4 | --force-dark-mode 5 | --enable-features=WebUIDarkMode 6 | -------------------------------------------------------------------------------- /gpg/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | default-cache-ttl 43200 2 | max-cache-ttl 43200 3 | enable-ssh-support 4 | disable-scdaemon 5 | pinentry-program /opt/homebrew/bin/pinentry-mac 6 | -------------------------------------------------------------------------------- /misc/.irbrc: -------------------------------------------------------------------------------- 1 | # begin 2 | # gem "pry" 3 | # rescue => ex 4 | # $stderr.puts ex.message 5 | # else 6 | # require "pry" 7 | # Pry.start 8 | # exit! 9 | # end 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.lnk 2 | .localrc 3 | vim/.vim/autoload 4 | vim/.vim/bundle 5 | vim/.vim/tmp 6 | *.decrypted-cache 7 | vim/.vim/plugged/ 8 | phoenix/node_modules/ 9 | .aider* 10 | -------------------------------------------------------------------------------- /terminal/.tmux/status_line: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | source $DOTCASTLE/zsh/utils.sh 4 | source $DOTCASTLE/zsh/prompt.zsh 5 | 6 | [[ "$1" == "battery" ]] && print -P "$(_battery_remaining)" 7 | -------------------------------------------------------------------------------- /vim/.config/nvim/README.md: -------------------------------------------------------------------------------- 1 | # 💤 LazyVim 2 | 3 | A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). 4 | Refer to the [documentation](https://lazyvim.github.io/installation) to get started. 5 | -------------------------------------------------------------------------------- /tasks.md: -------------------------------------------------------------------------------- 1 | # Tasks 2 | 3 | - [ ] #vim Neotree and opening directories 4 | - [ ] #vim Copilot integration 5 | - [ ] #vim Extract more features from previous config 6 | - [ ] #vim Learn to use LazyGit or install fugitive 7 | -------------------------------------------------------------------------------- /vim/.config/nvim/lazyvim.json: -------------------------------------------------------------------------------- 1 | { 2 | "extras": [ 3 | "lazyvim.plugins.extras.lang.json", 4 | "lazyvim.plugins.extras.lang.markdown" 5 | ], 6 | "news": { 7 | "NEWS.md": "6077" 8 | }, 9 | "version": 6 10 | } -------------------------------------------------------------------------------- /vim/.config/neovide/config.toml: -------------------------------------------------------------------------------- 1 | fork = true 2 | frame = "full" 3 | idle = true 4 | maximized = true 5 | no-multigrid = false 6 | srgb = false 7 | tabs = true 8 | theme = "auto" 9 | title-hidden = true 10 | vsync = true 11 | wsl = false 12 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/config/autocmds.lua: -------------------------------------------------------------------------------- 1 | -- Autocmds are automatically loaded on the VeryLazy event 2 | -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua 3 | -- Add any additional autocmds here 4 | -------------------------------------------------------------------------------- /.cursorignore: -------------------------------------------------------------------------------- 1 | # Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv) 2 | *.lnk 3 | *.decrypted-cache 4 | .localrc 5 | .aider* 6 | misc/.encrypted/*.* 7 | vim/.vim/autoload 8 | vim/.vim/bundle 9 | vim/.vim/tmp 10 | vim/.vim/plugged/ 11 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/nvim-treesitter", 3 | opts = function(_, opts) 4 | vim.list_extend(opts.ensure_installed, { 5 | "tsx", 6 | "typescript", 7 | "vue", 8 | }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /misc/.bin/os.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source ~/.zsh/utils.sh 4 | 5 | _name=$(os_release) 6 | 7 | if is_macosx; then 8 | echo "mac" 9 | elif is_ubuntu; then 10 | echo "ubuntu" 11 | elif is_wsl; then 12 | echo "wsl/$_name" 13 | else 14 | echo $_name 15 | fi 16 | -------------------------------------------------------------------------------- /vim/.config/nvim/.neoconf.json: -------------------------------------------------------------------------------- 1 | { 2 | "neodev": { 3 | "library": { 4 | "enabled": true, 5 | "plugins": true 6 | } 7 | }, 8 | "neoconf": { 9 | "plugins": { 10 | "lua_ls": { 11 | "enabled": true 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /misc/.curlrc: -------------------------------------------------------------------------------- 1 | # Disguise as IE 9 on Windows 7. 2 | user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" 3 | 4 | # When following a redirect, automatically set the previous URL as referer. 5 | referer = ";auto" 6 | 7 | # Wait 60 seconds before timing out. 8 | connect-timeout = 60 -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/lsp.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "neovim/nvim-lspconfig", 4 | opts = { 5 | servers = { 6 | pyright = {}, 7 | rubocop = {}, 8 | solargraph = {}, 9 | volar = {}, 10 | }, 11 | }, 12 | }, 13 | { import = "lazyvim.plugins.extras.lang.typescript" }, 14 | } 15 | -------------------------------------------------------------------------------- /misc/.fdignore: -------------------------------------------------------------------------------- 1 | /* 2 | !/Code 3 | !/.* 4 | 5 | /.gem/ 6 | /.npm/ 7 | /.asdf/ 8 | /.vscode/ 9 | /.vim/tmp/ 10 | /.vim/bundle/ 11 | /.zcache/ 12 | /.local/share/ 13 | /.dropbox/ 14 | /.cache/ 15 | 16 | /.gnupg/* 17 | !/.gnupg/gpg.conf 18 | !/.gnupg/gpg-agent.conf 19 | !/.gnupg/sshcontrol 20 | 21 | .git/ 22 | .Trash/ 23 | node_modules/ 24 | 25 | **/.DS_Store 26 | -------------------------------------------------------------------------------- /__install/stow.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | root=$HOME/Code/dotfiles 4 | source $root/zsh/.zsh/utils.sh 5 | 6 | stow -t $HOME -R zsh 7 | stow -t $HOME -R misc 8 | stow -t $HOME -R vim 9 | stow -t $HOME -R terminal 10 | mkdir -p $HOME/.gnupg && stow -t $HOME/.gnupg -R gpg 11 | stow -t "$HOME/Library/Application Support/Cursor/User" -R cursor 12 | cp $root/_copied/.gitconfig $HOME/.gitconfig 13 | -------------------------------------------------------------------------------- /misc/.bin/security.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # --- 3 | # summary: | 4 | # decrypts $DOTCASTLE/.encrypted/security.asc to provide some 5 | # super secret functions written in ruby. 6 | 7 | _file=$HOME/.encrypted/security.asc 8 | _destin=$HOME/.decrypted/security.rb 9 | 10 | mkdir -p $(dirname $_destin) 11 | gpg --decrypt $_file 2>/dev/null >$_destin 12 | 13 | ruby $_destin $@ 14 | rm -f $_destin 15 | -------------------------------------------------------------------------------- /misc/.bin/open-lifeos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Open LifeOS 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon 🧬 10 | # @raycast.packageName NIK Workflow 11 | 12 | # Documentation: 13 | # @raycast.author Nikhil Gupta 14 | # @raycast.authorURL nikhgupta.com 15 | 16 | code ~/Code/LifeOS/LifeOS.code-workspace 17 | -------------------------------------------------------------------------------- /misc/.bin/sync-onedrive.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # utility: rclone and onedrive 3 | # sync pictures and videos with onedrive storage 4 | onedrivesync() { 5 | orig=$1 6 | shift 7 | dest=$1 8 | shift 9 | rclone sync $orig $dest -P --delete-excluded --fast-list --log-level=INFO --no-check-certificate --no-update-modtime $@ 10 | } 11 | 12 | onedrivesync "${1:-/Volumes/Pictures}" "${2:-onedrive:Photography}" 13 | -------------------------------------------------------------------------------- /misc/.bin/strip-ansi.perl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | ## uncolor — remove terminal escape sequences such as color changes 3 | while (<>) { 4 | s/ \e[ #%()*+\-.\/]. | 5 | (?:\e\[|\x9b) [ -?]* [@-~] | # CSI ... Cmd 6 | (?:\e\]|\x9d) .*? (?:\e\\|[\a\x9c]) | # OSC ... (ST|BEL) 7 | (?:\e[P^_]|[\x90\x9e\x9f]) .*? (?:\e\\|\x9c) | # (DCS|PM|APC) ... ST 8 | \e.|[\x80-\x9f] //xg; 9 | print; 10 | } 11 | -------------------------------------------------------------------------------- /terminal/.config/kitty/catpuccin.conf: -------------------------------------------------------------------------------- 1 | # tab_bar_min_tabs 1 2 | # tab_bar_edge bottom 3 | # tab_bar_style powerline 4 | # tab_powerline_style slanted 5 | # tab_title_template {title}{' :{}:'.format(num_windows) if num_windows > 1 else ''} 6 | 7 | font_features FiraCodeNerdFontComplete-Retina +cv02 +cv05 +cv09 +cv14 +ss04 +cv16 +cv31 +cv25 +cv26 +cv32 +cv28 +ss10 +zero +onum 8 | -------------------------------------------------------------------------------- /misc/.gemrc: -------------------------------------------------------------------------------- 1 | # Configuration inside `~/.gemrc` is used by `gem` command, and 2 | # defines the options for installing new gems. Primarily, `rdoc`, and 3 | # `ri` documentations are not installed along with the gem. 4 | 5 | --- 6 | :verbose: true 7 | :gem: --no-document --no-ri --no-rdoc 8 | :update_sources: true 9 | :benchmark: false 10 | :backtrace: false 11 | :bulk_threshold: 1000 12 | :ssl_verify_mode: 0 13 | :sources: 14 | - https://rubygems.org 15 | -------------------------------------------------------------------------------- /misc/.git-template/hooks/ctags: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is copied to the git repo upon initialization. 3 | set -e 4 | PATH="/usr/local/bin:$PATH" 5 | dir="`git rev-parse --git-dir`" 6 | trap "rm -f \"$dir/$$.tags\"" EXIT 7 | # git ls-files | ctags --tag-relative -L - -f"$dir/$$.tags" --languages=-javascript,sql --exclude=.git --exclude=log --exclude=tmp 8 | ripper-tags --tag-relative=yes --extra=q -f "$dir/$$.tags" $(git ls-files | grep --color=never '.*\.rb$') 9 | mv "$dir/$$.tags" "$dir/tags" 10 | -------------------------------------------------------------------------------- /zsh/.zsh/plugs.txt: -------------------------------------------------------------------------------- 1 | # ohmyzsh/ohmyzsh path:plugins/asdf 2 | ohmyzsh/ohmyzsh path:plugins/z 3 | ohmyzsh/ohmyzsh path:plugins/bundler 4 | ohmyzsh/ohmyzsh path:plugins/extract 5 | ohmyzsh/ohmyzsh path:plugins/last-working-dir 6 | ohmyzsh/ohmyzsh path:lib/history.zsh 7 | ohmyzsh/ohmyzsh path:plugins/taskwarrior 8 | djui/alias-tips 9 | Aloxaf/fzf-tab 10 | 11 | # bobsoppe/zsh-ssh-agent 12 | # zsh-users/zsh-autosuggestions 13 | zsh-users/zsh-history-substring-search 14 | # zsh-users/zsh-syntax-highlighting 15 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/gnupg.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "jamessan/vim-gnupg", 4 | config = function() 5 | -- encryption support 6 | vim.g.GPGPreferSign = 1 7 | vim.g.GPGPreferArmor = 1 8 | vim.g.GPGDefaultRecipients = { 9 | os.getenv("EMAIL"), 10 | os.getenv("EMAIL_PERSONAL"), 11 | os.getenv("EMAIL_WORK"), 12 | } 13 | if vim.fn.exists("&cryptmethod") == 1 then 14 | vim.opt.cryptmethod = "blowfish" 15 | end 16 | end, 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/config/options.lua: -------------------------------------------------------------------------------- 1 | -- Options are automatically loaded before lazy.nvim startup 2 | -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua 3 | -- Add any additional options here 4 | vim.opt.guifont = "FiraCode Nerd Font:h16" 5 | 6 | -- resolve health check issues 7 | vim.g.loaded_perl_provider = 0 8 | vim.g.python3_host_prog = vim.env.HOME .. "/.asdf/shims/python3" 9 | vim.g.ruby_host_prog = vim.env.HOME .. "/.asdf/installs/ruby/3.2.0/bin/neovim-ruby-host" 10 | -------------------------------------------------------------------------------- /misc/.bin/import_gnupg.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # summary: restore gnupg data from backup 3 | 4 | _dir=${1:-$XDG_ONEDRIVE_BACKUP_DIR/workstation/gpg} 5 | 6 | gpg --import $_dir/secret.key 7 | gpg --import-ownertrust $_dir/trustdb.txt 8 | gpg --refresh-keys 9 | 10 | # echo 11 | # echo "=> You should now add keygrip of your SSH KEY to ~/.gnupg/sshcontrol" 12 | # echo 13 | # 14 | # gpg --list-keys --with-keygrip --fingerprint --keyid-format long $GPGKEY 15 | # 16 | # echo 17 | # echo '=> Afterwards, you can verify your key is present via: `ssh-add -L`' 18 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/tmux.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "christoomey/vim-tmux-navigator", 3 | cmd = { 4 | "TmuxNavigateLeft", 5 | "TmuxNavigateDown", 6 | "TmuxNavigateUp", 7 | "TmuxNavigateRight", 8 | "TmuxNavigatePrevious", 9 | }, 10 | keys = { 11 | { "", "TmuxNavigateLeft" }, 12 | { "", "TmuxNavigateDown" }, 13 | { "", "TmuxNavigateUp" }, 14 | { "", "TmuxNavigateRight" }, 15 | { "", "TmuxNavigatePrevious" }, 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /Cursor/keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "ctrl+alt+cmd+\\ ctrl+alt+cmd+f", 4 | "command": "editor.action.formatDocument", 5 | "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor" 6 | }, 7 | { 8 | "key": "shift+alt+f", 9 | "command": "-editor.action.formatDocument", 10 | "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor" 11 | }, 12 | { 13 | "key": "ctrl+alt+cmd+c", 14 | "command": "github.copilot.toggleCopilot" 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /cursor/keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "ctrl+alt+cmd+\\ ctrl+alt+cmd+f", 4 | "command": "editor.action.formatDocument", 5 | "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor" 6 | }, 7 | { 8 | "key": "shift+alt+f", 9 | "command": "-editor.action.formatDocument", 10 | "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor" 11 | }, 12 | { 13 | "key": "ctrl+alt+cmd+c", 14 | "command": "github.copilot.toggleCopilot" 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/git.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "tpope/vim-fugitive", 4 | cmd = "G", 5 | lazy = false, 6 | }, 7 | { "tpope/vim-rhubarb", lazy = false }, 8 | { 9 | "NeogitOrg/neogit", 10 | dependencies = { 11 | "nvim-lua/plenary.nvim", 12 | "sindrets/diffview.nvim", 13 | "nvim-telescope/telescope.nvim", 14 | }, 15 | init = function() 16 | require("neogit").setup({}) 17 | end, 18 | config = function() 19 | vim.keymap.set("n", "gn", "Neogit", { desc = "Open NeoGit" }) 20 | end, 21 | }, 22 | } 23 | -------------------------------------------------------------------------------- /misc/.config/youtube-dl/config: -------------------------------------------------------------------------------- 1 | # Configuration values for Youtube-DL. 2 | # 3 | --ignore-errors 4 | --mark-watched 5 | --no-playlist 6 | --min-filesize 50k 7 | --retries 5 8 | --download-archive $XDG_CACHE_HOME/youtube-dl/archive.txt 9 | # --restrict-filenames 10 | --continue 11 | --console-title 12 | # --print-traffic 13 | --no-check-certificate 14 | --prefer-ffmpeg 15 | --output "%(title)s.%(ext)s" 16 | -f bestvideo[width>=1920]+bestaudio[ext!=webm]/bestvideo[ext!=webm]+bestaudio[ext!=webm]/best[ext!=webm] 17 | # --external-downloader aria2c --external-downloader-args "-j 8 -s 8 -x 8 -k 5M --file-allocation=none" 18 | --add-metadata 19 | --xattrs 20 | -------------------------------------------------------------------------------- /misc/.bin/get-current-finder.applescript: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Get Current Finder window 6 | # @raycast.mode compact 7 | 8 | # Optional parameters: 9 | # @raycast.icon ?? 10 | # @raycast.packageName NIK Utils 11 | 12 | # Documentation: 13 | # @raycast.author Nikhil Gupta 14 | # @raycast.authorURL nikhgupta.com 15 | 16 | tell application "Finder" 17 | if exists Finder window 1 then 18 | set currentDir to target of Finder window 1 as alias 19 | else 20 | set currentDir to desktop as alias 21 | end if 22 | end tell 23 | 24 | return POSIX path of currentDir 25 | -------------------------------------------------------------------------------- /misc/.bin/generate-random-text.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Generate Random AlphaNumeric Data 6 | # @raycast.mode fullOutput 7 | # @raycast.argument1 { "type": "text", "placeholder": "length (default: 1024)", "optional": true } 8 | 9 | # Optional parameters: 10 | # @raycast.icon ?? 11 | # @raycast.packageName NIK Workflow 12 | 13 | # Documentation: 14 | # @raycast.author Nikhil Gupta 15 | # @raycast.authorURL nikhgupta.com 16 | 17 | cat /dev/urandom | 18 | gtr -dc 'a-zA-Z0-9\{\}\[\]\<\>,\.\/?;:\-=_\+\!@#$%\^\&\*\(\)~' | 19 | gtr -d '[:space:]' | 20 | gtr -dc "${2:-'\11\12\40-\176'}" | 21 | head -c "${1:-1024}" 22 | echo -ne "\n" 23 | -------------------------------------------------------------------------------- /terminal/.config/kitty/ayu.conf: -------------------------------------------------------------------------------- 1 | background #fafafa 2 | foreground #5b6673 3 | cursor #ff6900 4 | selection_background #f0ede4 5 | color0 #000000 6 | color8 #323232 7 | color1 #ff3333 8 | color9 #ff6565 9 | color2 #86b200 10 | color10 #b8e532 11 | color3 #f19618 12 | color11 #ffc849 13 | color4 #41a6d9 14 | color12 #73d7ff 15 | color5 #f07078 16 | color13 #ffa3aa 17 | color6 #4cbe99 18 | color14 #7ff0cb 19 | color7 #ffffff 20 | color15 #ffffff 21 | selection_foreground #fafafa 22 | -------------------------------------------------------------------------------- /zsh/.zsh/macos.zsh: -------------------------------------------------------------------------------- 1 | # Flush Directory Service cache 2 | alias remove_dns_cache="dscacheutil -flushcache && killall -HUP mDNSResponder" 3 | 4 | # Recursively delete `.DS_Store` files 5 | alias remove_dsstore_files="find . -type f -name '*.DS_Store' -ls -delete" 6 | 7 | # battery percentage 8 | function battery_percent() { pmset -g batt | egrep "([0-9]+\%).*" -o --colour=auto | cut -f1 -d';' | tr -d '%'; } 9 | 10 | # change architecture 11 | function xarch() { 12 | is_intel_macos && { 13 | echo "=> running command in arm64 architecture.." 14 | if (( $# )); then arch -arm64 $@; else exec arch -arm64 zsh -li; fi 15 | } 16 | 17 | is_arm_macos && { 18 | echo "=> running command in i386 (x86_64) architecture.." 19 | if (( $# )); then arch -x86_64 $@; else exec arch -x86_64 zsh -li; fi 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /zsh/.zsh/dotfiles.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # quickly create a script that is available globally 4 | create_bin_script() { 5 | local file="$HOME/.bin/$1" 6 | touch "$file" 7 | chmod +x "$file" 8 | vim "$file" 9 | } 10 | 11 | # Update antibody config 12 | update_antibody_config() { 13 | antibody bundle <~/.zsh/plugs.txt >~/.zsh/plugs 14 | } 15 | 16 | # check that our XDG dirs are correctly set. 17 | check_xdg_directories() { 18 | for _var in $( 19 | typeset -p | 20 | grep -E "export XDG_.*_(DIR|HOME)=" | 21 | cut -d ' ' -f2 | cut -d '=' -f1 22 | ); do 23 | _rpath="$(eval echo \${$_var})" 24 | _dir="$(realpath "$_rpath" 2>/dev/null)" 25 | [[ -z "${_dir}" ]] && _dir="$_rpath" 26 | [[ -d "${_dir}" ]] && echo -e "\e[32m$_var ===== $_dir" || echo -e "\e[31m$_var ==!== $_dir" 27 | done 28 | } 29 | -------------------------------------------------------------------------------- /misc/.bin/play-in-iina.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Play files in IINA 6 | # @raycast.mode fullOutput 7 | # @raycast.argument1 { "type": "text", "placeholder": "directory" } 8 | # @raycast.argument2 { "type": "text", "placeholder": "search params", "optional": true } 9 | 10 | # Optional parameters: 11 | # @raycast.icon ?? 12 | # @raycast.packageName NIK Workflow 13 | 14 | # Documentation: 15 | # @raycast.author Nikhil Gupta 16 | # @raycast.authorURL nikhgupta.com 17 | 18 | if [[ "$__CFBundleIdentifier" == "com.raycast.macos" ]]; then 19 | open -a iina "$(fd "${2:-*.mp4}" -tf "${1:-$HOME}" -gH1)" 20 | else 21 | cd "${1:-$HOME}" && rgf --files | fzf --query "${2:-.mp4}" --multi --select-1 --bind "ctrl-x:execute(iina {})" --preview-window=down,0% --print0 | xargs -0 -o iina 22 | fi 23 | -------------------------------------------------------------------------------- /terminal/.config/kitty/snazzy.conf: -------------------------------------------------------------------------------- 1 | # Snazzy Colorscheme for Kitty 2 | # Based on https://github.com/sindresorhus/hyper-snazzy 3 | 4 | foreground #eff0eb 5 | background #282a36 6 | selection_foreground #000000 7 | selection_background #FFFACD 8 | url_color #0087BD 9 | cursor #97979B 10 | cursor_text_color #282A36 11 | 12 | # black 13 | color0 #282a36 14 | color8 #686868 15 | 16 | # red 17 | color1 #FF5C57 18 | color9 #FF5C57 19 | 20 | # green 21 | color2 #5AF78E 22 | color10 #5AF78E 23 | 24 | # yellow 25 | color3 #F3F99D 26 | color11 #F3F99D 27 | 28 | # blue 29 | color4 #57C7FF 30 | color12 #57C7FF 31 | 32 | # magenta 33 | color5 #FF6AC1 34 | color13 #FF6AC1 35 | 36 | # cyan 37 | color6 #9AEDFE 38 | color14 #9AEDFE 39 | 40 | # white 41 | color7 #F1F1F0 42 | color15 #EFF0EB 43 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/telescope.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-telescope/telescope.nvim", 3 | keys = { 4 | -- add a keymap to browse plugin files 5 | -- stylua: ignore 6 | { 7 | "si", 8 | function() require("telescope.builtin").builtin() end, 9 | desc = "Telescope Builtins", 10 | }, 11 | { "", require("telescope.builtin").buffers, "Find Buffers" }, 12 | { "", require("telescope.builtin").git_files, "Find Files" }, 13 | { "", require("telescope.builtin").live_grep, "Search by Grep" }, 14 | { "", require("telescope.builtin").resume, "Resume Search" }, 15 | { "??", LazyVim.pick("grep_string", { word_match = "-w" }), "Search Word under Cursor" }, 16 | }, 17 | opts = { 18 | defaults = { 19 | layout_strategy = "horizontal", 20 | winblend = 0, 21 | }, 22 | }, 23 | } 24 | -------------------------------------------------------------------------------- /misc/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | # It's important that .gitignore is absent from this list, so 2 | # that the .gitignore in this repo gets installed by stow as 3 | # ~/.gitignore. 4 | 5 | # However, .git must be in this list: 6 | \.git 7 | /bin/git-deps 8 | 9 | .*,v 10 | RCS 11 | CVS 12 | Attic 13 | .*~ 14 | \.\#.* 15 | \#.*\# 16 | .*\.orig 17 | .*\.old 18 | .*\.rej 19 | .*\.bak 20 | .*\.o 21 | .*\.elc 22 | .*\.pyc 23 | .*\.class 24 | .*\.flc 25 | .*\.zwc 26 | \.hg 27 | _darcs 28 | \{arch\} 29 | \.arch-ids 30 | \.arch-inventory 31 | ,,.* 32 | \.svn 33 | BitKeeper 34 | \.pcl-cvs-cache 35 | pm_to_blib 36 | blib 37 | \.nfs.+ 38 | pod2html-.+cache 39 | tags 40 | TAGS 41 | \.xvpics 42 | \.emacs\.desktop 43 | \.emacs\.backup 44 | \+\+build 45 | _build 46 | Build 47 | \.zshhistory 48 | \.bash_history 49 | .*\.rpmsave 50 | .*\.cfgsave\. 51 | config\.log 52 | autom4te\.cache 53 | .*\.log 54 | README.* 55 | COPYING -------------------------------------------------------------------------------- /zsh/.zsh/downloaders.zsh: -------------------------------------------------------------------------------- 1 | # utility: youtube-dl 2 | alias ydl=youtube-dl 3 | 4 | # playlist 5 | alias download_playlist="youtube-dl --yes-playlist" 6 | alias ydlpl=download_playlist 7 | 8 | # download MP3 music to proper directory 9 | function download_mp3() { 10 | destin="${2:-mixed}" 11 | youtube-dl --extract-audio --audio-format mp3 \ 12 | -o "${XDG_DOWNLOAD_MUSIC_DIR}/$destin/%(title)s.%(ext)s" \ 13 | --download-archive $XDG_CACHE_HOME/youtube-dl/mp3-archive.txt $1 14 | } 15 | 16 | # download a song video to proper directory 17 | function download_song() { 18 | destin="${2:-mixed}" 19 | youtube-dl -o "${XDG_DOWNLOAD_VIDEO_DIR}/$destin/%(title)s.%(ext)s" \ 20 | --download-archive $XDG_CACHE_HOME/youtube-dl/songs-archive.txt $1 21 | } 22 | 23 | # Download all images from a website 24 | alias download_images_from_website="wget -r -l1 --no-parent -nH -nd -P/tmp -A\".jpg,.png,.jpeg\"" 25 | -------------------------------------------------------------------------------- /misc/.bin/serve-local-port: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Serve Local Port 6 | # @raycast.mode compact 7 | 8 | # Optional parameters: 9 | # @raycast.icon 🤖 10 | # @raycast.argument1 { "type": "text", "placeholder": "Port" } 11 | # @raycast.packageName NIK Workflows 12 | 13 | # Documentation: 14 | # @raycast.description Serve a local port on the remote server at in.codewithsense.com 15 | # @raycast.author Nikhil Gupta 16 | # @raycast.authorURL nikhgupta.com 17 | 18 | if [ -z "$1" ]; then 19 | echo "Please provide a port number as an argument." 20 | exit 1 21 | fi 22 | 23 | autossh -f -M 0 -R "in.codewithsense.com:2${1}:localhost:${1}" dev \ 24 | -o ServerAliveInterval=60 -o ServerAliveCountMax=2 -o StrictHostKeyChecking=no -N 25 | echo "http://in.codewithsense.com:2${1}" | pbcopy 26 | open -a 'Arc' "http://in.codewithsense.com:2${1}" 27 | -------------------------------------------------------------------------------- /terminal/.config/kitty/nord.conf: -------------------------------------------------------------------------------- 1 | # Nord Colorscheme for Kitty 2 | # Based on: 3 | # - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192 4 | # - https://github.com/arcticicestudio/nord-hyper 5 | 6 | foreground #D8DEE9 7 | background #2E3440 8 | selection_foreground #000000 9 | selection_background #FFFACD 10 | url_color #0087BD 11 | cursor #81A1C1 12 | 13 | # black 14 | color0 #3B4252 15 | color8 #4C566A 16 | 17 | # red 18 | color1 #BF616A 19 | color9 #BF616A 20 | 21 | # green 22 | color2 #A3BE8C 23 | color10 #A3BE8C 24 | 25 | # yellow 26 | color3 #EBCB8B 27 | color11 #EBCB8B 28 | 29 | # blue 30 | color4 #81A1C1 31 | color12 #81A1C1 32 | 33 | # magenta 34 | color5 #B48EAD 35 | color13 #B48EAD 36 | 37 | # cyan 38 | color6 #88C0D0 39 | color14 #8FBCBB 40 | 41 | # white 42 | color7 #E5E9F0 43 | color15 #ECEFF4 44 | -------------------------------------------------------------------------------- /terminal/.config/kitty/toggle_term.py: -------------------------------------------------------------------------------- 1 | from kittens.tui.handler import result_handler 2 | 3 | 4 | def main(args): 5 | pass 6 | 7 | 8 | def toggle_term(boss): 9 | tab = boss.active_tab 10 | 11 | all_another_wins = tab.all_window_ids_except_active_window 12 | have_only_one = len(all_another_wins) == 0 13 | 14 | if have_only_one: 15 | boss.launch('--cwd=current', '--location=hsplit') 16 | tab.neighboring_window("bottom") 17 | else: 18 | if tab.current_layout.name == 'stack': 19 | tab.last_used_layout() 20 | tab.neighboring_window("bottom") 21 | else: 22 | tab.neighboring_window("top") 23 | tab.goto_layout('stack') 24 | 25 | 26 | @result_handler(no_ui=True) 27 | def handle_result(args, result, target_window_id, boss): 28 | window = boss.window_id_map.get(target_window_id) 29 | 30 | if window is None: 31 | return 32 | 33 | toggle_term(boss) -------------------------------------------------------------------------------- /misc/.bin/color-columns.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Display Color Columns 6 | # @raycast.mode fullOutput 7 | 8 | # Optional parameters: 9 | # @raycast.icon 🎨 10 | 11 | # Documentation: 12 | # @raycast.description Display a table of color codes in the terminal. 13 | # @raycast.packageName NIK Utils 14 | # @raycast.author Nikhil Gupta 15 | # @raycast.authorURL https://nikhgupta.com 16 | 17 | T='TiP' # The test text 18 | 19 | echo -e "\n 40m 41m 42m 43m\ 20 | 44m 45m 46m 47m" 21 | 22 | for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ 23 | '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ 24 | ' 36m' '1;36m' ' 37m' '1;37m'; do 25 | FG=${FGs// /} 26 | echo -en " $FGs \033[$FG $T " 27 | for BG in 40m 41m 42m 43m 44m 45m 46m 47m; do 28 | echo -en "\033[$FG\033[$BG $T \033[0m" 29 | done 30 | echo 31 | done 32 | echo 33 | -------------------------------------------------------------------------------- /misc/.bin/fzf-preview.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | local _theme=Nord 4 | 5 | IFS=':' read -rA INPUT <<< "$@" 6 | file=$(echo ${INPUT[1]} | perl -pe 's/\e\[[0-9;]*m(?:\e\[K)?//g') 7 | line=$(echo ${INPUT[2]} | perl -pe 's/\e\[[0-9;]*m(?:\e\[K)?//g') 8 | # echo "============" 9 | # echo "$@" 10 | # echo $file 11 | # echo $line 12 | # echo "============" 13 | 14 | if [[ -f "${file}" ]]; then 15 | if hash bat 2>/dev/null; then 16 | if ! [ -z "${line}" ]; then 17 | topline=$(($line - 10)) 18 | botline=$(($line + 10)) 19 | [ $topline -lt 1 ] && topline=1 20 | bat --style=numbers --color=always --theme=$_theme --line-range $topline:$botline --highlight-line $line "$file" 21 | else 22 | bat --style=numbers --color=always --theme=$_theme "$file" 23 | fi 24 | else 25 | cat "$file" 26 | fi 27 | elif [[ -d "${file}" ]]; then 28 | tree -C "${file}" | less 29 | else 30 | echo "${1}" 2>/dev/null | head -200 31 | fi 32 | -------------------------------------------------------------------------------- /zsh/.zsh/languages.zsh: -------------------------------------------------------------------------------- 1 | # language: python 2 | export PIP_REQUIRE_VIRTUALENV=true 3 | export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache 4 | gpip2() { PIP_REQUIRE_VIRTUALENV="" pip2 "$@"; } 5 | gpip3() { PIP_REQUIRE_VIRTUALENV="" pip3 "$@"; } 6 | alias venv="python -m env" 7 | alias venv3="python3 -m env" 8 | 9 | # language: go 10 | export GOPATH=$HOME/.golang 11 | path_append "${GOPATH}/bin" 12 | 13 | # language: elixir 14 | export ERL_AFLAGS="-kernel shell_history enabled" 15 | touch ~/.iex_history # needed for up/down key support in IEx sessions 16 | 17 | # language: ruby 18 | alias be='bundle exec' 19 | alias rspecff='rspec --fail-fast' 20 | alias rspecof='rspec --only-failures' 21 | alias rspecffof='rspec --fail-fast --only-failures' 22 | alias bundled="bundle install --local || bundle install || bundle update" 23 | 24 | # framework: rails 25 | export RUBY_CONFIGURE_OPTS=--with-readline-dir="$(brew --prefix readline)" 26 | alias c="bundle exec rails c" 27 | alias s="bundle exec rails s" 28 | -------------------------------------------------------------------------------- /vim/.config/nvim/performance/superminivimrc: -------------------------------------------------------------------------------- 1 | " set nobackup " do not keep backup files - it's 70's style cluttering 2 | " set nowritebackup " do not make a write backup 3 | " set noswapfile " do not write annoying intermediate swap files 4 | " set noerrorbells " don't beep 5 | " set visualbell t_vb= " don't beep, remove visual bell char 6 | " set backspace=indent,eol,start " allow backspacing over everything in insert mode 7 | set hidden " means that current buffer can be put to background without being written; and that marks and undo history are preserved. 8 | set number " always show line numbers 9 | 10 | " let mapleader = "<\Space>" " change mapleader key from / to space 11 | " let maplocalleader = "," " used inside filetype settings 12 | 13 | " Enable syntax colors 14 | syntax on 15 | 16 | " Enable file type detection and do language-dependent indenting. 17 | filetype plugin indent on 18 | -------------------------------------------------------------------------------- /misc/.rsyncignore: -------------------------------------------------------------------------------- 1 | - /dev/* 2 | - /etc/fstab 3 | - /home/linuxbrew 4 | - /lib/modules/*/volatile/.mounted 5 | - /lost+found 6 | - /media/* 7 | - /mnt/* 8 | - /proc/* 9 | - /run/* 10 | - /sys/* 11 | - /tmp/* 12 | - /var/cache/apt/archives/* 13 | - /var/cache/abrt-di/* 14 | - /var/lib/snapd/cache/* 15 | - /var/lock/* 16 | - /var/run/* 17 | - /Volumes/* 18 | - /Users/*/.gvfs 19 | - /Users/*/.local/share/Trash 20 | - /Users/*/.cache/chromium/*/*Cache 21 | - /Users/*/.mozilla/firefox/*/*Cache 22 | - /Users/*/.cache/google-chrome/*/*Cache 23 | - /Users/*/.cache/mozilla 24 | - /Users/*/.cache/yarn 25 | - /Users/*/.cache/thumbnails 26 | - /Users/*/.thumbnails 27 | - /Users/*/Dropbox 28 | - /Users/*/OneDrive 29 | - /Users/*/.dropbox-dist 30 | + /Users/**/.emacs.d 31 | + /Users/**/.vim/bundle/* 32 | + /Users/**/.vim/tmp/* 33 | + /Users/*/.atom/blob-store 34 | + /Users/*/.atom/compile-cache 35 | + /Users/*/.cache/* 36 | + /Users/*/.gem/* 37 | + /Users/*/.local/lib/python*/site-packages/* 38 | + /Users/*/.npm/* 39 | + /Users/*/.nv 40 | + /Users/*/.weechat/logs/* 41 | -------------------------------------------------------------------------------- /misc/.encrypted/security-passwd.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | hQGMA+f6fZk6E8cmAQv7BkixBCy1FkZUkwEvMSf4i8R+Irjfr6VlE/my5yh8p+xI 4 | uPN7ud5+IJ+p/Nasui/ayi02G2UJ0jnVPGmCnxAYppvy9mJMT3YmS6oo2fVkL3yc 5 | oPVZPgt3MdZI5Zk62VoNLOm0Rn83mAZuO5kc8++eieTWjQ6PqfbIqgW73f/L6dOa 6 | lGAFlTRcAqQFYUPe6FJQCD1ecFpEyE39QijnYGqfjDVm0pDHh6z6frTCE1HdOVDn 7 | L8V/I1yOr/sHOEWl+vt1e8oEdpY7q7rhi8RmikHXWEtCElBonxrwPqLvY3bL76qa 8 | 8xFEX2l1sd7E37iUR1aGEHR4U1ZPtct2ZRCFz3vbs+vKPZ/VGJEXJ3O8gM54u9md 9 | PCEJpVVmE8/9PY9eND89CRIPq6inTtNMYT2XmNiMe5ysMvdRzRG7koqOBZt6xgEr 10 | hx/MkyFWVAx9JlChNlovv8aGcQDvk6NhAb8L7RDxI+1Kp+94a5FCqOnVI6+vcPxT 11 | S20S5IR7YXcylmb12Mfm0sBFAdPzbNZqn5Lc2F7kgsiDn1XmZlFTClswk+eUjmI8 12 | Cg+jV7Gc6/0xC+iPoe5USXcXZTs0243QiILhNQstv7FGmBzND93zRZtXczb/AIqF 13 | UXLpTESpr609Uy0JeXsNdJEaGYi+VXAoXSq37FOpEgaZeZvSzi52bIQ38csNGgNS 14 | CxKZK4rxXIrebYUCAnBbH1qqx7JHVh+BdVE6v96R8AgCcIndm0yl+NF5Eh611VgU 15 | 75f8mpjAp9Rs11RiriqhI81SKnWbv1FzdNpHLE6ctYBbB5j4JaF9qGV8P/3ZJuoD 16 | s4l4aKOs9kRR6Htquj4kY8D73J49v3gfBWVdVskhpVl5XPPq7k5u 17 | =7RSL 18 | -----END PGP MESSAGE----- 19 | -------------------------------------------------------------------------------- /__install/asdf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | _root=$(dirname $(dirname $0)) 4 | source $_root/zsh/utils.sh 5 | 6 | highlight "Installing asdf" 7 | brew install asdf 8 | asdfin() { asdf install $@ && asdf global $@; } 9 | 10 | highlight "Installing node.js" 11 | asdf plugin add nodejs 12 | bash -c '${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring' 13 | asdfin nodejs 12.9.1 14 | asdfin nodejs 18.9.1 15 | asdfin nodejs 22.2.0 16 | 17 | # highlight "Installing erlang/elixir" 18 | # asdf plugin add erlang 19 | # asdf plugin add elixir 20 | # brew install autoconf wxmac 21 | # export KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl)" 22 | # asdfin erlang 24.0.6 23 | # asdfin elixir 1.12.3-otp-24 24 | # unset KERL_CONFIGURE_OPTIONS 25 | 26 | highlight "Installing ruby" 27 | asdf plugin add ruby 28 | asdfin ruby 2.7.2 29 | asdfin ruby latest 30 | asdf global ruby latest 2.7.2 31 | gem install neovim maid 32 | asdf reshim ruby 33 | 34 | highlight "Installing python" 35 | asdf plugin add python 36 | asdfin python 2.7.18 37 | asdfin python latest 38 | asdf global python latest 2.7.18 39 | 40 | highlight "Installing Lua" 41 | asdf plugin add lua 42 | asdfin lua latest 43 | -------------------------------------------------------------------------------- /misc/.config/htop/htoprc: -------------------------------------------------------------------------------- 1 | # Beware! This file is rewritten by htop when settings are changed in the interface. 2 | # The parser is also very primitive, and not human-friendly. 3 | htop_version=3.1.2 4 | config_reader_min_version=2 5 | fields=0 48 17 18 38 39 2 46 47 49 1 6 | sort_key=46 7 | sort_direction=-1 8 | tree_sort_key=0 9 | tree_sort_direction=1 10 | hide_kernel_threads=1 11 | hide_userland_threads=0 12 | shadow_other_users=0 13 | show_thread_names=0 14 | show_program_path=1 15 | highlight_base_name=0 16 | highlight_deleted_exe=1 17 | highlight_megabytes=1 18 | highlight_threads=1 19 | highlight_changes=0 20 | highlight_changes_delay_secs=5 21 | find_comm_in_cmdline=1 22 | strip_exe_from_cmdline=1 23 | show_merged_command=0 24 | tree_view=0 25 | tree_view_always_by_pid=0 26 | all_branches_collapsed=0 27 | header_margin=1 28 | detailed_cpu_time=0 29 | cpu_count_from_one=0 30 | show_cpu_usage=1 31 | show_cpu_frequency=0 32 | update_process_names=0 33 | account_guest_in_cpu_meter=0 34 | color_scheme=0 35 | enable_mouse=1 36 | delay=15 37 | hide_function_bar=0 38 | header_layout=two_50_50 39 | column_meters_0=LeftCPUs Memory Swap 40 | column_meter_modes_0=1 1 1 41 | column_meters_1=RightCPUs Tasks LoadAverage Uptime 42 | column_meter_modes_1=1 2 2 2 43 | -------------------------------------------------------------------------------- /misc/.bin/new-terminal.applescript: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript 2 | 3 | on is_running(appName) 4 | tell application "System Events" to (name of processes) contains appName 5 | end is_running 6 | 7 | on run argv 8 | set kittyRunning to is_running("kitty") 9 | 10 | tell application "System Events" 11 | if kittyRunning then 12 | tell application "kitty" to activate 13 | keystroke "n" using {command down} 14 | set visible of process "kitty" to true 15 | else 16 | tell application "kitty" to activate 17 | end if 18 | end tell 19 | 20 | if (count of argv) >= 1 21 | if item 1 of argv is "finder" 22 | tell application "Finder" 23 | set pathList to (quoted form of POSIX path of (folder of the front window as alias)) 24 | set textToType to "clear; cd " & pathList 25 | end tell 26 | else if item 1 of argv is "nick" 27 | set textToType to "clear; ssh nick; exit" 28 | else if item 1 of argv is "iacm" 29 | set textToType to "clear; ssh iacm; exit" 30 | else 31 | set textToType to "clear; cd " & (quoted form of item 1 of argv) 32 | end if 33 | 34 | tell application "System Events" 35 | keystroke textToType 36 | keystroke return 37 | end tell 38 | 39 | return textToType 40 | end if 41 | end run 42 | -------------------------------------------------------------------------------- /misc/.config/user-dirs.dirs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Run check_xdg_dirs afterwards to make sure all vars point to correct dirs 3 | 4 | set_xdg_dir() { 5 | export $1=$2 6 | [[ -z $ZSH_NAME ]] && is_macosx && [[ -z "${TMUX}" ]] && launchctl setenv $1 "$2" 7 | } 8 | 9 | set_xdg_dir XDG_DESKTOP_DIR "$HOME/Desktop" 10 | set_xdg_dir XDG_DOCUMENTS_DIR "$HOME/Documents" 11 | set_xdg_dir XDG_DOWNLOAD_DIR "$HOME/Downloads" 12 | set_xdg_dir XDG_MUSIC_DIR "$HOME/Music" 13 | set_xdg_dir XDG_PICTURES_DIR "$HOME/Pictures" 14 | set_xdg_dir XDG_VIDEOS_DIR "$HOME/Videos" 15 | # set_xdg_dir XDG_BACKUP_DIR "$HOME/Backups" 16 | set_xdg_dir XDG_ONEDRIVE_DIR "$HOME/OneDrive" 17 | set_xdg_dir XDG_DROPBOX_DIR "$HOME/Dropbox" 18 | 19 | set_xdg_dir XDG_USER_HOME "$HOME" 20 | set_xdg_dir XDG_CACHE_HOME "$HOME/.cache" 21 | set_xdg_dir XDG_CONFIG_HOME "$HOME/.config" 22 | 23 | set_xdg_dir XDG_ONEDRIVE_BACKUP_DIR "$XDG_ONEDRIVE_DIR/Backup" 24 | set_xdg_dir XDG_WALLPAPER_DIR "$XDG_PICTURES_DIR/Wallpapers" 25 | set_xdg_dir XDG_SCREENSHOT_DIR "$XDG_PICTURES_DIR/Screenshots" 26 | set_xdg_dir XDG_SCREENCAST_DIR "$XDG_VIDEOS_DIR/Screencasts" 27 | set_xdg_dir XDG_DOWNLOAD_MUSIC_DIR "$XDG_MUSIC_DIR/__DOWNLOADS__" 28 | set_xdg_dir XDG_DOWNLOAD_VIDEO_DIR "$XDG_VIDEOS_DIR/__DOWNLOADS__" 29 | set_xdg_dir XDG_DOWNLOAD_PICTURE_DIR "$XDG_PICTURES_DIR/DUMP/__DOWNLOADS__" 30 | 31 | # set_xdg_dir XDG_TEMPLATES_DIR "$HOME/Templates" 32 | set_xdg_dir XDG_PUBLICSHARE_DIR "$HOME/Public" 33 | -------------------------------------------------------------------------------- /gpg/sshcontrol: -------------------------------------------------------------------------------- 1 | # List of allowed ssh keys. Only keys present in this file are used 2 | # in the SSH protocol. The ssh-add tool may add new entries to this 3 | # file to enable them; you may also add them manually. Comment 4 | # lines, like this one, as well as empty lines are ignored. Lines do 5 | # have a certain length limit but this is not serious limitation as 6 | # the format of the entries is fixed and checked by gpg-agent. A 7 | # non-comment line starts with optional white spaces, followed by the 8 | # keygrip of the key given as 40 hex digits, optionally followed by a 9 | # caching TTL in seconds, and another optional field for arbitrary 10 | # flags. Prepend the keygrip with an '!' mark to disable it. 11 | # Ed25519 key added on: 2024-06-04 23:10:34 12 | # Fingerprints: MD5:ff:d6:20:95:d4:d4:3f:22:ee:2f:51:d9:63:a2:66:69 13 | # SHA256:6kGaEhn0FcO/a7g2G7Qk7kPRTJ/14Z4sLuT0S2rexkg 14 | C462C2623D82E85BCF36BB9986106C68D23FBABF 0 15 | 8172678A5E6D69785DAE60608542B22DAABEA72E 16 | # RSA key added on: 2021-08-05 23:36:11 17 | # Fingerprints: MD5:29:59:ac:9d:2c:cf:dc:46:ee:58:0a:e6:19:14:38:8e 18 | # SHA256:N4VESsab7xtn9aSbhBNKVhz4FgKucK3dg8uL30HFQjw 19 | 922B394A248011E5B9A1252F54247F93AA49DA2D 0 20 | # Ed25519 key added on: 2024-04-22 16:12:42 21 | # Fingerprints: MD5:5c:97:ed:4e:56:97:d8:c2:9e:20:34:a1:5c:46:31:4a 22 | # SHA256:CgdpjphQwMIXdnZ1Jf/zb2tMj063H6furslSl/hUy5I 23 | B6393652234604101334DB657BC5DEA6F7CBC5BD 0 24 | -------------------------------------------------------------------------------- /zsh/.zsh/tmux.zsh: -------------------------------------------------------------------------------- 1 | # tmux run command 2 | #th(){ tmux split -h "$@"; } 3 | tv() { tmux split -v "$@"; } 4 | tw() { tmux new-window "$@"; } 5 | alias tl="tmux list-sessions" 6 | alias tko="tmux detach -a" 7 | 8 | # start a tmux session in current directory 9 | function ts() { 10 | name="${1:-$(basename $(realpath .))}" 11 | if tmux list-sessions | grep "${name}" >/dev/null; then 12 | tmux attach -t "${name}" 13 | else 14 | tmux new-session -s "${name}" 15 | fi 16 | } 17 | 18 | # work on a given tmuxinator project 19 | function workon() { 20 | local session_name="${1:-$(basename $(realpath .))}" 21 | local other_session_name="${1:-$(basename $(dirname $(realpath .)))}" 22 | if tmuxinator list | grep "${session_name}" &>/dev/null; then 23 | tmuxinator start "${session_name}" 24 | elif tmuxinator list | grep "${other_session_name}" &>/dev/null; then 25 | tmuxinator start "${other_session_name}" 26 | else 27 | ts "${session_name}" 28 | fi 29 | 30 | } 31 | 32 | # sign off from working on a project - take some rest! 33 | function workoff() { 34 | tmuxkill 35 | if [[ -n "${1}" ]] && tmuxinator list | grep $1 &>/dev/null; then 36 | tmuxinator stop $1 37 | else 38 | local session_name="$(tmux display-message -p '#S')" 39 | tmuxinator stop $session_name || tmux kill-session -t $session_name 40 | fi 41 | } 42 | 43 | tmuxkill() { 44 | tmux list-panes -s -F "#{pane_pid} #{pane_current_command}" | grep -v tmux | awk '{print $1}' | xargs kill 45 | } 46 | -------------------------------------------------------------------------------- /__install/secrets.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | _root=$(dirname $(dirname $0)) 4 | source $_root/zsh/.zsh/utils.sh 5 | 6 | highlight "Obtaining your GPG keys from OneDrive" 7 | [[ -d ~/.gnupg ]] || { 8 | mkdir /tmp/gpg-backup 9 | rclone copy onedrive:Backup/workstation/gpg /tmp/gpg-backup 10 | $_root/bin/import_gnupg.sh /tmp/gpg-backup 11 | rm -rf /tmp/gpg-backup 12 | } 13 | 14 | highlight "Using GPG for SSH authentications" 15 | killall gpg-agent 16 | export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) 17 | gpg-agent --daemon --options ~/.gnupg/gpg-agent.conf &>/dev/null 18 | 19 | highlight "Checking if I can access git@github.com with newly set GPG key" 20 | ssh -T git@github.com 2>&1 | grep $(whoami) || error "SSH from GPG did not work!" 21 | 22 | highlight "Checking if I can source secret files.." 23 | source_secret $DOTCASTLE/.encrypted/zshenv.asc 24 | source $_root/zsh/aliases.zsh 2>/dev/null 25 | 26 | highlight "Setting up global gitconfig" 27 | git config --global core.editor $EDITOR 28 | git config --global user.name $NICK 29 | git config --global user.email $EMAIL 30 | git config --global user.signingkey $GPGKEY 31 | git config --global github.user $NICK 32 | git config --global github.token $GITHUB_TOKEN 33 | git config --global github.password $GITHUB_TOKEN 34 | git config --global github.oauth-token $GITHUB_TOKEN 35 | git config --global commit.gpgsign true 36 | 37 | highlight "Updating dotfiles repo origin URL" 38 | pushd $_root 39 | git remote set-url origin "git@github.com:nikhgupta/dotfiles.git" 40 | popd 41 | -------------------------------------------------------------------------------- /zsh/.zsh/completion.zsh: -------------------------------------------------------------------------------- 1 | # Add tab completion for many zsh commands 2 | is_installed brew && FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH 3 | 4 | ## zsh completion stuff 5 | # zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' 6 | zstyle ':compinstall' filename '$HOME/.zshrc' 7 | 8 | zcachedir="$HOME/.zcache" 9 | [[ -d "$zcachedir" ]] || mkdir -p "$zcachedir" 10 | 11 | _update_zcomp() { 12 | setopt local_options 13 | setopt extendedglob 14 | autoload -Uz compinit -u 15 | local zcompf="$1/zcompdump" 16 | # use a separate file to determine when to regenerate, as compinit doesn't 17 | # always need to modify the compdump 18 | local zcompf_a="${zcompf}.augur" 19 | 20 | if [[ -e "$zcompf_a" && -f "$zcompf_a(#qN.md-1)" ]]; then 21 | compinit -u -C -d "$zcompf" 22 | else 23 | compinit -u -d "$zcompf" 24 | touch "$zcompf_a" 25 | fi 26 | # if zcompdump exists (and is non-zero), and is older than the .zwc file, 27 | # then regenerate 28 | if [[ -s "$zcompf" && (! -s "${zcompf}.zwc" || "$zcompf" -nt "${zcompf}.zwc") ]]; then 29 | # since file is mapped, it might be mapped right now (current shells), so 30 | # rename it then make a new one 31 | [[ -e "$zcompf.zwc" ]] && mv -f "$zcompf.zwc" "$zcompf.zwc.old" 32 | # compile it mapped, so multiple shells can share it (total mem reduction) 33 | # run in background 34 | zcompile -M "$zcompf" &! 35 | fi 36 | } 37 | _update_zcomp "$zcachedir" 38 | unfunction _update_zcomp 39 | -------------------------------------------------------------------------------- /zsh/.zshenv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # source our utilities 4 | source ~/.zsh/utils.sh 5 | 6 | # => basic locales and ZSH options 7 | setenv LANG en_US.UTF-8 8 | setenv LC_ALL en_US.UTF-8 9 | setenv LC_CTYPE en_US.UTF-8 10 | setenv LANGUAGE en_US.UTF-8 11 | 12 | # dont wait for long timeouts when switching vi modes 13 | export KEYTIMEOUT=1 14 | export GPG_TTY=$(tty) 15 | 16 | # editor and browser 17 | setenv EDITOR nvim 18 | setenv VISUAL nvim 19 | setenv GUIEDITOR $EDITOR 20 | setenv BROWSER "open -a 'Arc'" 21 | 22 | # brew 23 | _PREFIX="/opt/homebrew" 24 | is_intel_macos && _PREFIX="/usr/local" 25 | is_ubuntu && _PREFIX="/home/linuxbrew/.linuxbrew" 26 | setenv HOMEBREW_PREFIX $_PREFIX 27 | setenv HOMEBREW_CELLAR "$HOMEBREW_PREFIX/Cellar" 28 | setenv HOMEBREW_REPOSITORY $HOMEBREW_PREFIX 29 | setenv MANPATH="$HOMEBREW_PREFIX/share/man${MANPATH+:$MANPATH}:" 30 | setenv INFOPATH="$HOMEBREW_PREFIX/share/info:${INFOPATH:-}" 31 | setenv HOMEBREW_NO_AUTO_UPDATE 1 32 | alias brew="${HOMEBREW_PREFIX}/bin/brew" 33 | path_prepend "${HOMEBREW_PREFIX}/bin" 34 | path_prepend "${HOMEBREW_PREFIX}/sbin" 35 | 36 | # asdf, rbenv, pyenv, yarn, etc. 37 | path_append $(yarn global bin) 38 | . $HOMEBREW_PREFIX/opt/asdf/libexec/asdf.sh 39 | [[ -f "$HOME/.cargo/env" ]] && source "$HOME/.cargo/env" 40 | 41 | # other apps 42 | setenv OLLAMA_HOST "0.0.0.0" 43 | 44 | # source secret credentials 45 | source ~/.config/user-dirs.dirs 46 | source ~/.zsh/fzf.zsh # allow source here so that macvim can read these 47 | source_secret $HOME/.encrypted/zshenv.asc 48 | 49 | # add custom scripts from dotcastle to $PATH 50 | path_append ~/.bin/raycast ~/.bin/macos ~/.bin ~/.local/bin 51 | -------------------------------------------------------------------------------- /misc/.ctags.d/defaults.ctags: -------------------------------------------------------------------------------- 1 | # Configuration inside `~/.ctags` is used by `ctags` command, and 2 | # defines the regexes for matching tag names. 3 | 4 | # Basic options 5 | --recurse=yes 6 | --tag-relative=yes 7 | 8 | --exclude=.git 9 | --exclude=*.min.* 10 | --exclude=*.spec.* 11 | --exclude=*.test.* 12 | --exclude=*.stories.* 13 | --exclude=*.tar.* 14 | --exclude=.*bundle.* 15 | --exclude=.Master 16 | --exclude=.bak 17 | --exclude=.cache 18 | --exclude=.class 19 | --exclude=.csproj 20 | --exclude=.csproj.user 21 | --exclude=.dll 22 | --exclude=.map 23 | --exclude=.pdb 24 | --exclude=.pyc 25 | --exclude=.sln 26 | --exclude=.swp 27 | --exclude=.tmp 28 | --exclude=bower_components 29 | --exclude=coverage 30 | --exclude=cscope.* 31 | --exclude=dist 32 | --exclude=min 33 | --exclude=node_modules 34 | --exclude=tags 35 | --exclude=test 36 | --exclude=tests 37 | 38 | # PHP 39 | --langmap=php:.engine.inc.module.theme.install.php --PHP-kinds=+cf-v--langdef=Elixir 40 | 41 | --langdef=less 42 | --langmap=less:.less 43 | --regex-less=/^[ \t&]*#([A-Za-z0-9_-]+)/\1/i,id,ids/ 44 | --regex-less=/^[ \t&]*\.([A-Za-z0-9_-]+)/\1/c,class,classes/ 45 | --regex-less=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/ 46 | --regex-less=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/ 47 | --regex-less=/^[ \t]*(@[A-Za-z0-9_-]+):/\1/v,variable,variables/ 48 | --regex-less=/\/\/[ \t]*(FIXME|TODO)[ \t]*\:*(.*)/\1/T,Tag,Tags/ 49 | 50 | --langmap=vim:+(vimrc).vim 51 | 52 | --langdef=dockerfile 53 | --langmap=dockerfile:+(Dockerfile) 54 | --regex-dockerfile=/^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)/\1/d,dockerfile,dockerfiles/ 55 | -------------------------------------------------------------------------------- /terminal/.config/kitty/tokyonight.conf: -------------------------------------------------------------------------------- 1 | # Tokyo Night color scheme for kitty terminal emulator 2 | # https://github.com/davidmathers/tokyo-night-kitty-theme 3 | # 4 | # Based on Tokyo Night color theme for Visual Studio Code 5 | # https://github.com/enkia/tokyo-night-vscode-theme 6 | 7 | foreground #a9b1d6 8 | background #1a1b26 9 | 10 | # Black 11 | color0 #414868 12 | color8 #414868 13 | 14 | # Red 15 | color1 #f7768e 16 | color9 #f7768e 17 | 18 | # Green 19 | color2 #73daca 20 | color10 #73daca 21 | 22 | # Yellow 23 | color3 #e0af68 24 | color11 #e0af68 25 | 26 | # Blue 27 | color4 #7aa2f7 28 | color12 #7aa2f7 29 | 30 | # Magenta 31 | color5 #bb9af7 32 | color13 #bb9af7 33 | 34 | # Cyan 35 | color6 #7dcfff 36 | color14 #7dcfff 37 | 38 | # White 39 | color7 #c0caf5 40 | color15 #c0caf5 41 | 42 | # Cursor 43 | cursor #c0caf5 44 | cursor_text_color #1a1b26 45 | 46 | # Selection highlight 47 | selection_foreground none 48 | selection_background #28344a 49 | 50 | # The color for highlighting URLs on mouse-over 51 | url_color #9ece6a 52 | 53 | # Window borders 54 | active_border_color #3d59a1 55 | inactive_border_color #101014 56 | bell_border_color #e0af68 57 | 58 | # Tab bar 59 | tab_bar_style fade 60 | tab_fade 1 61 | active_tab_foreground #3d59a1 62 | active_tab_background #16161e 63 | active_tab_font_style bold 64 | inactive_tab_foreground #787c99 65 | inactive_tab_background #16161e 66 | inactive_tab_font_style bold 67 | tab_bar_background #101014 68 | 69 | # Title bar 70 | macos_titlebar_color #16161e 71 | 72 | # Storm 73 | # background #24283b 74 | # cursor_text_color #24283b 75 | # active_tab_background #1f2335 76 | # inactive_tab_background #1f2335 77 | # macos_titlebar_color #1f2335 78 | -------------------------------------------------------------------------------- /misc/.wgetrc: -------------------------------------------------------------------------------- 1 | # Reference: http://www.gnu.org/software/wget/manual/html_node/Wgetrc-Commands.html 2 | # --------------------------------------------------------------------------------- 3 | 4 | # Use the server-provided last modification date, if available 5 | timestamping = on 6 | 7 | # Do not go up in the directory structure when downloading recursively 8 | no_parent = on 9 | 10 | # Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!) 11 | timeout = 60 12 | 13 | # Retry a few times when a download fails, but don’t overdo it. (The default is 20!) 14 | tries = 3 15 | 16 | # Retry even when the connection was refused 17 | retry_connrefused = on 18 | 19 | # Use the last component of a redirection URL for the local file name 20 | trust_server_names = on 21 | 22 | # Follow FTP links from HTML documents by default 23 | follow_ftp = on 24 | 25 | # Add a `.html` extension to `text/html` or `application/xhtml+xml` files that lack one, or a `.css` extension to `text/css` files that lack one 26 | adjust_extension = on 27 | 28 | # Use UTF-8 as the default system encoding 29 | # Disabled as it makes `wget` builds that don’t support this feature unusable. 30 | # Does anyone know how to conditionally configure a wget setting? 31 | # http://unix.stackexchange.com/q/34730/6040 32 | #local_encoding = UTF-8 33 | 34 | # Ignore `robots.txt` and `` 35 | robots = off 36 | 37 | # Print the HTTP and FTP server responses 38 | server_response = on 39 | 40 | # Disguise as IE 9 on Windows 7 41 | user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) 42 | 43 | # continue downloading partially retrieved files 44 | continue = on 45 | -------------------------------------------------------------------------------- /__install/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | root=$HOME/Code/dotfiles 4 | source $root/zsh/.zsh/utils.sh 5 | 6 | # ensure that we are using the correct version of dotfiles 7 | is_archlinux && error "Please checkout last supported version for Archlinux - v4.0" 8 | is_wsl && error "Please checkout last supported version for WSL systems - v3.0" 9 | is_debian && error "Please checkout last supported version for Ubuntu/Debian systems - v2.0" 10 | is_macosx || error "v5 of these dotfiles target Mac OSX. Please, use earlier versions on this system." 11 | 12 | mkdir -p ~/.cache 13 | 14 | highlight "Stowing" 15 | source $root/__install/stow.sh 16 | 17 | highlight "Setting up secrets" 18 | source $root/__install/secrets.sh 19 | 20 | highlight "Installing Homebrew packages" 21 | source $root/__install/brew.sh 22 | 23 | highlight "Installing asdf, plugins and languages" 24 | source $root/__install/asdf.sh 25 | 26 | highlight "Configuring macOS" 27 | source $root/__install/macos.sh 28 | 29 | highlight "Fixing permissions" 30 | find ~/.ssh -type f -exec chmod 600 {} \; 31 | find ~/.gnupg -type f -exec chmod 600 {} \; 32 | find ~/.ssh -type d -exec chmod 700 {} \; 33 | find ~/.gnupg -type d -exec chmod 700 {} \; 34 | 35 | highlight "Installing VIM plugins" 36 | \vim +PlugInstall +qall 37 | nvim +PlugInstall +UpdateRemotePlugins +qall 38 | 39 | highlight "Installing AntiBody for ZSH" 40 | is_installed antibody || brew install antibody 41 | antibody bundle <~/.zsh/plugs.txt >~/.zshplugs 42 | 43 | action "Enable ntfs-3g support by overriding CSF and replace mount_ntfs script" 44 | action "Setup OneDrive and Dropbox for backups and sync" 45 | action "Check if XDG directories are propertly setup" 46 | source ~/.zshrc && check_xdg_directories 47 | echo 48 | 49 | info "Done." 50 | -------------------------------------------------------------------------------- /misc/.bin/run-zsh-benchmark: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # --- 3 | # summary: benchmark zsh startup time 4 | # author: Nikhil Gupta 5 | # --- 6 | 7 | # Required parameters: 8 | # @raycast.schemaVersion 1 9 | # @raycast.title Run ZSH Benchmark 10 | # @raycast.mode fullOutput 11 | # @raycast.argument1 { "type": "text", "placeholder": "zsh script to benchmark", "optional": true } 12 | 13 | # Optional parameters: 14 | # @raycast.icon 🤖 15 | # @raycast.packageName NIK Utils 16 | 17 | # Documentation: 18 | # @raycast.author Nikhil Gupta 19 | # @raycast.authorURL nikhgupta.com 20 | 21 | logfile=/tmp/zsh.profiler.log 22 | summaryfile=/tmp/zsh.profiler.summary 23 | rm -f $logfile 24 | rm -f $summaryfile 25 | 26 | zmodload zsh/zprof 27 | zmodload zsh/datetime 28 | setopt PROMPT_SUBST 29 | PS4='+$EPOCHREALTIME %N:%i> ' 30 | echo "Logging to $logfile" 31 | exec 3>&2 2>$logfile 32 | setopt XTRACE 33 | 34 | if [[ -z "$1" ]]; then 35 | source ~/.zshenv 36 | source ~/.zshrc 37 | else 38 | for f; do source $f; done 39 | fi 40 | 41 | unsetopt XTRACE 42 | exec 2>&3 3>&- 43 | 44 | typeset -i prev_time=0 45 | typeset prev_command 46 | 47 | while read line; do 48 | if [[ $line =~ '^.*\+([0-9]{10})\.([0-9]{6})[0-9]* (.+)' ]]; then 49 | integer this_time=$match[1]$match[2] 50 | 51 | if [[ $prev_time -gt 0 ]]; then 52 | time_difference=$(($this_time - $prev_time)) 53 | echo "$time_difference $prev_command" >>$summaryfile 54 | fi 55 | 56 | prev_time=$this_time 57 | 58 | local this_command=$match[3] 59 | prev_command=$this_command 60 | fi 61 | done <$logfile 62 | cat $summaryfile | sort -nr | head 63 | 64 | if [[ -z "$1" ]]; then 65 | rm -rf ~/.zcache 66 | rm -rf ~/.zcompdump* 67 | time zsh -ic exit 68 | time zsh -ic exit 69 | fi 70 | -------------------------------------------------------------------------------- /misc/.bin/get-current-url-of-browser.applescript: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Get Current URL of Browser 6 | # @raycast.mode compact 7 | # @raycast.argument1 { "type": "dropdown", "placeholder": "Browser", "data": [{"title": "Arc Browser", "value": "Arc"}, {"title": "Chrome Browser", "value": "Chrome"}, {"title": "Firefox Browser", "value": "Firefox"}, {"title": "Safari Browser", "value": "Safari"}] } 8 | 9 | # Optional parameters: 10 | # @raycast.icon ?? 11 | # @raycast.packageName NIK Utils 12 | 13 | # Documentation: 14 | # @raycast.author Nikhil Gupta 15 | # @raycast.authorURL nikhgupta.com 16 | 17 | on run argv 18 | if (count of argv) >= 1 then 19 | set inp to item 1 of argv 20 | else if application "Safari" is running then 21 | set inp to "Safari" 22 | else if application "Google Chrome" is running then 23 | set inp to "Google Chrome" 24 | -- else if application "Firefox" is running then 25 | -- set inp to "Firefox" 26 | else 27 | set inp to "Arc" 28 | end if 29 | 30 | tell application "System Events" 31 | if inp is "Arc" then 32 | tell application "Arc" to return URL of active tab of front window 33 | else if inp is "Google Chrome" then 34 | tell application "Google Chrome" to return URL of active tab of front window 35 | -- else if inp is "Firefox" then 36 | -- tell application "Firefox" to activate 37 | -- tell application "System Events" 38 | -- keystroke "l" using command down 39 | -- keystroke "c" using command down 40 | -- end tell 41 | -- delay 0.5 42 | -- return the clipboard 43 | else if inp is "Safari" then 44 | tell application "Safari" to return URL of front document 45 | else 46 | return 47 | end if 48 | end tell 49 | end argv 50 | -------------------------------------------------------------------------------- /terminal/.config/kitty/catpuccin-latte.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Latte 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/latte.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | 10 | 11 | # The basic colors 12 | foreground #4c4f69 13 | background #eff1f5 14 | selection_foreground #eff1f5 15 | selection_background #dc8a78 16 | 17 | # Cursor colors 18 | cursor #dc8a78 19 | cursor_text_color #eff1f5 20 | 21 | # URL underline color when hovering with mouse 22 | url_color #dc8a78 23 | 24 | # Kitty window border colors 25 | active_border_color #7287fd 26 | inactive_border_color #9ca0b0 27 | bell_border_color #df8e1d 28 | 29 | # OS Window titlebar colors 30 | wayland_titlebar_color system 31 | macos_titlebar_color system 32 | 33 | # Tab bar colors 34 | active_tab_foreground #eff1f5 35 | active_tab_background #8839ef 36 | inactive_tab_foreground #4c4f69 37 | inactive_tab_background #9ca0b0 38 | tab_bar_background #bcc0cc 39 | 40 | # Colors for marks (marked text in the terminal) 41 | mark1_foreground #eff1f5 42 | mark1_background #7287fd 43 | mark2_foreground #eff1f5 44 | mark2_background #8839ef 45 | mark3_foreground #eff1f5 46 | mark3_background #209fb5 47 | 48 | # The 16 terminal colors 49 | 50 | # black 51 | color0 #5c5f77 52 | color8 #6c6f85 53 | 54 | # red 55 | color1 #d20f39 56 | color9 #d20f39 57 | 58 | # green 59 | color2 #40a02b 60 | color10 #40a02b 61 | 62 | # yellow 63 | color3 #df8e1d 64 | color11 #df8e1d 65 | 66 | # blue 67 | color4 #1e66f5 68 | color12 #1e66f5 69 | 70 | # magenta 71 | color5 #ea76cb 72 | color13 #ea76cb 73 | 74 | # cyan 75 | color6 #179299 76 | color14 #179299 77 | 78 | # white 79 | color7 #acb0be 80 | color15 #bcc0cc 81 | -------------------------------------------------------------------------------- /terminal/.config/kitty/catpuccin-mocha.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Mocha 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | 10 | 11 | # The basic colors 12 | foreground #cdd6f4 13 | background #1e1e2e 14 | selection_foreground #1e1e2e 15 | selection_background #f5e0dc 16 | 17 | # Cursor colors 18 | cursor #f5e0dc 19 | cursor_text_color #1e1e2e 20 | 21 | # URL underline color when hovering with mouse 22 | url_color #f5e0dc 23 | 24 | # Kitty window border colors 25 | active_border_color #b4befe 26 | inactive_border_color #6c7086 27 | bell_border_color #f9e2af 28 | 29 | # OS Window titlebar colors 30 | wayland_titlebar_color system 31 | macos_titlebar_color system 32 | 33 | # Tab bar colors 34 | active_tab_foreground #11111b 35 | active_tab_background #cba6f7 36 | inactive_tab_foreground #cdd6f4 37 | inactive_tab_background #181825 38 | tab_bar_background #11111b 39 | 40 | # Colors for marks (marked text in the terminal) 41 | mark1_foreground #1e1e2e 42 | mark1_background #b4befe 43 | mark2_foreground #1e1e2e 44 | mark2_background #cba6f7 45 | mark3_foreground #1e1e2e 46 | mark3_background #74c7ec 47 | 48 | # The 16 terminal colors 49 | 50 | # black 51 | color0 #45475a 52 | color8 #585b70 53 | 54 | # red 55 | color1 #f38ba8 56 | color9 #f38ba8 57 | 58 | # green 59 | color2 #a6e3a1 60 | color10 #a6e3a1 61 | 62 | # yellow 63 | color3 #f9e2af 64 | color11 #f9e2af 65 | 66 | # blue 67 | color4 #89b4fa 68 | color12 #89b4fa 69 | 70 | # magenta 71 | color5 #f5c2e7 72 | color13 #f5c2e7 73 | 74 | # cyan 75 | color6 #94e2d5 76 | color14 #94e2d5 77 | 78 | # white 79 | color7 #bac2de 80 | color15 #a6adc8 81 | -------------------------------------------------------------------------------- /terminal/.config/kitty/catpuccin-frappee.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Frappé 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/frappe.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | 10 | 11 | # The basic colors 12 | foreground #c6d0f5 13 | background #303446 14 | selection_foreground #303446 15 | selection_background #f2d5cf 16 | 17 | # Cursor colors 18 | cursor #f2d5cf 19 | cursor_text_color #303446 20 | 21 | # URL underline color when hovering with mouse 22 | url_color #f2d5cf 23 | 24 | # Kitty window border colors 25 | active_border_color #babbf1 26 | inactive_border_color #737994 27 | bell_border_color #e5c890 28 | 29 | # OS Window titlebar colors 30 | wayland_titlebar_color system 31 | macos_titlebar_color system 32 | 33 | # Tab bar colors 34 | active_tab_foreground #232634 35 | active_tab_background #ca9ee6 36 | inactive_tab_foreground #c6d0f5 37 | inactive_tab_background #292c3c 38 | tab_bar_background #232634 39 | 40 | # Colors for marks (marked text in the terminal) 41 | mark1_foreground #303446 42 | mark1_background #babbf1 43 | mark2_foreground #303446 44 | mark2_background #ca9ee6 45 | mark3_foreground #303446 46 | mark3_background #85c1dc 47 | 48 | # The 16 terminal colors 49 | 50 | # black 51 | color0 #51576d 52 | color8 #626880 53 | 54 | # red 55 | color1 #e78284 56 | color9 #e78284 57 | 58 | # green 59 | color2 #a6d189 60 | color10 #a6d189 61 | 62 | # yellow 63 | color3 #e5c890 64 | color11 #e5c890 65 | 66 | # blue 67 | color4 #8caaee 68 | color12 #8caaee 69 | 70 | # magenta 71 | color5 #f4b8e4 72 | color13 #f4b8e4 73 | 74 | # cyan 75 | color6 #81c8be 76 | color14 #81c8be 77 | 78 | # white 79 | color7 #b5bfe2 80 | color15 #a5adce 81 | -------------------------------------------------------------------------------- /terminal/.config/kitty/catpuccin-macchiato.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Macchiato 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/macchiato.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | 10 | 11 | # The basic colors 12 | foreground #cad3f5 13 | background #24273a 14 | selection_foreground #24273a 15 | selection_background #f4dbd6 16 | 17 | # Cursor colors 18 | cursor #f4dbd6 19 | cursor_text_color #24273a 20 | 21 | # URL underline color when hovering with mouse 22 | url_color #f4dbd6 23 | 24 | # Kitty window border colors 25 | active_border_color #b7bdf8 26 | inactive_border_color #6e738d 27 | bell_border_color #eed49f 28 | 29 | # OS Window titlebar colors 30 | wayland_titlebar_color system 31 | macos_titlebar_color system 32 | 33 | # Tab bar colors 34 | active_tab_foreground #181926 35 | active_tab_background #c6a0f6 36 | inactive_tab_foreground #cad3f5 37 | inactive_tab_background #1e2030 38 | tab_bar_background #181926 39 | 40 | # Colors for marks (marked text in the terminal) 41 | mark1_foreground #24273a 42 | mark1_background #b7bdf8 43 | mark2_foreground #24273a 44 | mark2_background #c6a0f6 45 | mark3_foreground #24273a 46 | mark3_background #7dc4e4 47 | 48 | # The 16 terminal colors 49 | 50 | # black 51 | color0 #494d64 52 | color8 #5b6078 53 | 54 | # red 55 | color1 #ed8796 56 | color9 #ed8796 57 | 58 | # green 59 | color2 #a6da95 60 | color10 #a6da95 61 | 62 | # yellow 63 | color3 #eed49f 64 | color11 #eed49f 65 | 66 | # blue 67 | color4 #8aadf4 68 | color12 #8aadf4 69 | 70 | # magenta 71 | color5 #f5bde6 72 | color13 #f5bde6 73 | 74 | # cyan 75 | color6 #8bd5ca 76 | color14 #8bd5ca 77 | 78 | # white 79 | color7 #b8c0e0 80 | color15 #a5adcb 81 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/config/lazy.lua: -------------------------------------------------------------------------------- 1 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 | 3 | if not (vim.uv or vim.loop).fs_stat(lazypath) then 4 | -- bootstrap lazy.nvim 5 | -- stylua: ignore 6 | vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) 7 | end 8 | vim.opt.rtp:prepend(lazypath) 9 | 10 | require("lazy").setup({ 11 | spec = { 12 | -- add LazyVim and import its plugins 13 | { "LazyVim/LazyVim", import = "lazyvim.plugins" }, 14 | -- import any extras modules here 15 | -- { import = "lazyvim.plugins.extras.lang.typescript" }, 16 | -- { import = "lazyvim.plugins.extras.lang.json" }, 17 | -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, 18 | { import = "plugins" }, 19 | }, 20 | defaults = { 21 | -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. 22 | -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. 23 | lazy = true, 24 | -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, 25 | -- have outdated releases, which may break your Neovim install. 26 | version = false, -- always use the latest git commit 27 | -- version = "*", -- try installing the latest stable version for plugins that support semver 28 | }, 29 | install = { colorscheme = { "tokyonight", "habamax" } }, 30 | checker = { enabled = true, notify = false, frequency = 86400 }, -- automatically check for plugin updates once a day 31 | performance = { 32 | rtp = { 33 | -- disable some rtp plugins 34 | disabled_plugins = { 35 | "gzip", 36 | -- "matchit", 37 | -- "matchparen", 38 | -- "netrwPlugin", 39 | "tarPlugin", 40 | "tohtml", 41 | "tutor", 42 | "zipPlugin", 43 | }, 44 | }, 45 | }, 46 | }) 47 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/misc.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- // CODING 3 | { import = "lazyvim.plugins.extras.coding.copilot" }, -- copilot ai 4 | { import = "lazyvim.plugins.extras.coding.copilot-chat" }, --copilot ai chat 5 | { import = "lazyvim.plugins.extras.coding.luasnip" }, -- snippets 6 | { import = "lazyvim.plugins.extras.coding.mini-comment" }, -- comment toggler 7 | { import = "lazyvim.plugins.extras.coding.neogen" }, -- annotation generator 8 | -- { import = "lazyvim.plugins.extras.coding.codeium" }, -- codeium ai 9 | 10 | -- // LANGUAGES 11 | { import = "lazyvim.plugins.extras.lang.python" }, 12 | { import = "lazyvim.plugins.extras.lang.ruby" }, 13 | { import = "lazyvim.plugins.extras.lang.rust" }, 14 | { import = "lazyvim.plugins.extras.lang.sql" }, 15 | { import = "lazyvim.plugins.extras.lang.json" }, 16 | { import = "lazyvim.plugins.extras.lang.tailwind" }, 17 | { import = "lazyvim.plugins.extras.lang.toml" }, 18 | { import = "lazyvim.plugins.extras.lang.vue" }, 19 | { import = "lazyvim.plugins.extras.lang.typescript" }, 20 | { import = "lazyvim.plugins.extras.lang.yaml" }, 21 | { import = "lazyvim.plugins.extras.linting.eslint" }, 22 | -- { import = "lazyvim.plugins.extras.lang.svelte" }, 23 | 24 | -- // UI / ENHANCEMENTS 25 | { import = "lazyvim.plugins.extras.coding.yanky" }, -- better yanking 26 | { import = "lazyvim.plugins.extras.editor.aerial" }, -- code outline 27 | { import = "lazyvim.plugins.extras.editor.harpoon2" }, -- quick move to file in project 28 | { import = "lazyvim.plugins.extras.util.octo" }, -- github management 29 | { import = "lazyvim.plugins.extras.util.project" }, -- projects management 30 | -- { import = "lazyvim.plugins.extras.editor.leap" }, 31 | -- { import = "lazyvim.plugins.extras.editor.mini-move" }, 32 | 33 | { import = "lazyvim.plugins.extras.lsp.none-ls" }, 34 | 35 | { 36 | "ahmedkhalf/project.nvim", 37 | lazy = false, 38 | opts = { 39 | manual_mode = false, -- automactically add 40 | detection_methods = { "pattern" }, 41 | patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", ".source_me.zsh" }, 42 | }, 43 | }, 44 | } 45 | -------------------------------------------------------------------------------- /misc/.gitignore: -------------------------------------------------------------------------------- 1 | # `~/.gitignore` is set as the global exclude file for `git`, via the git 2 | 3 | # # configuration variables, which means that files in this configuration will 4 | 5 | # always be ignored by `git` command, as if the following lines were specified 6 | 7 | # within the project's `.gitignore` file 8 | 9 | # Special File # 10 | 11 | ################ 12 | 13 | # Common files # 14 | 15 | ################ 16 | *~ 17 | *.un~ 18 | *.sw[a-z] 19 | *.rbc 20 | .svn 21 | .tissues 22 | Session.vim 23 | 24 | # Compiled source # 25 | 26 | ################### 27 | *.com 28 | *.class 29 | *.dll 30 | *.exe 31 | *.o 32 | *.so 33 | __pycache__/ 34 | 35 | # Packages # 36 | 37 | ############ 38 | 39 | # it's better to unpack these files and commit the raw source 40 | 41 | # git has its own built in compression methods 42 | 43 | *.7z 44 | *.dmg 45 | *.gz 46 | *.iso 47 | *.jar 48 | *.rar 49 | *.tar 50 | *.zip 51 | 52 | # Logs and databases # 53 | 54 | ###################### 55 | *.log 56 | # *.sql 57 | *.sqlite 58 | 59 | # OS generated files # 60 | 61 | ###################### 62 | ._* 63 | .DS_Store* 64 | .Trashes 65 | .Spotlight-V100 66 | ehthumbs.db 67 | Icon? 68 | !Icon?/ 69 | Thumbs.db 70 | Desktop.ini 71 | 72 | # scm revert files 73 | 74 | *.orig 75 | 76 | # Netbeans project directory 77 | 78 | /nbproject/ 79 | 80 | # RubyMine project files 81 | 82 | .idea 83 | 84 | # Textmate project files 85 | 86 | /*.tmproj 87 | 88 | # Ruby On Rails 89 | 90 | .rake_tasks 91 | zeus.json 92 | custom_plan.rb 93 | .pry_history 94 | 95 | # miscelleneous/cache files 96 | 97 | .sass-cache 98 | 99 | # Tags: Ignore tags created by ctags, etags, etc 100 | 101 | .tags 102 | !.tags/ 103 | TAGS 104 | !TAGS/ 105 | tags 106 | tags.lock 107 | tags.temp 108 | tags.tmp 109 | !tags/ 110 | gtags.files 111 | GTAGS 112 | GRTAGS 113 | GPATH 114 | cscope.files 115 | cscope.out 116 | cscope.in.out 117 | cscope.po.out 118 | 119 | # never ignore files that are named .notempty or .gitkeep 120 | 121 | !.notempty 122 | !.gitkeep 123 | !.keep 124 | 125 | # emacs per directory configuration 126 | 127 | .dir-locals.el 128 | 129 | # other directories 130 | 131 | vendor/bundle 132 | -------------------------------------------------------------------------------- /misc/.bin/sysinfo: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title sysinfo 6 | # @raycast.mode fullOutput 7 | # @raycast.argument1 { "type": "dropdown", "placeholder": "type", "data": [{"title": "Local IP", "value": "local-ip"}, {"title": "Remote IPv4", "value": "remote-ip"}, {"title": "All IPs", "value": "all-ips"}, {"title": "Consuming Network", "value": "consuming-net"}, {"title": "Local Ports", "value": "local-ports"}, {"title": "Disk Eating", "value": "disk-eating"}, {"title": "Active Interfaces", "value": "active-interfaces"}, {"title": "Processes Matching", "value": "processes-matching"}] } 8 | # @raycast.argument2 { "type": "text", "placeholder": "process name (for processes-matching)", "optional": true } 9 | 10 | # Optional parameters: 11 | # @raycast.icon 🌐 12 | # @raycast.packageName NIK Utils 13 | 14 | # Documentation: 15 | # @raycast.author Nikhil Gupta 16 | # @raycast.authorURL nikhgupta.com 17 | 18 | # Function to show IPs based on the selected option 19 | sysinfo() { 20 | local option=$1 21 | 22 | case $option in 23 | local-ip) 24 | ipconfig getifaddr en0 25 | ;; 26 | remote-ip) 27 | timeout 3s echo $(curl -4s ipecho.net/plain) 28 | ;; 29 | all-ips) 30 | ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, ""); print }' 31 | ;; 32 | consuming-net) 33 | lsof -PbwnR +c15 -sTCP:LISTEN -iTCP 34 | ;; 35 | local-ports) 36 | lsof -bwaRPiTCP@127.0.0.1 -sTCP:LISTEN 37 | ;; 38 | disk-eating) 39 | du -sm {*,.*} NOERR | sort -n | tail 40 | ;; 41 | active-interfaces) 42 | ifconfig | pcregrep -M -o '^[^\t:]+:([^\n]|\n\t)*status: active' 43 | ;; 44 | processes-matching) 45 | if [[ -z "$2" ]]; then 46 | echo "Please provide a process name to match." 47 | return 1 48 | fi 49 | pgrep "$2" && top $(pgrep "$2" | sed 's|^|-pid |g') || { 50 | echo "Found no process with name matching: $2" 51 | exit 1 52 | } 53 | ;; 54 | *) 55 | echo "Invalid option. Please choose from: local-ip, remote-ip, all-ips, consuming-net, local-ports, disk-eating, active-interfaces, processes-matching." 56 | return 1 57 | ;; 58 | esac 59 | } 60 | 61 | sysinfo $@ 62 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/colors.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "folke/tokyonight.nvim", 4 | lazy = true, 5 | opts = { style = "night" }, 6 | }, 7 | { 8 | "shaunsingh/nord.nvim", 9 | name = "nord", 10 | lazy = true, 11 | config = function() 12 | -- g.nord_contrast = false 13 | -- g.nord_borders = true 14 | -- g.nord_disable_background = false 15 | vim.g.nord_bold = false 16 | vim.g.nord_italic = false 17 | vim.g.nord_uniform_diff_background = true 18 | 19 | -- Load the colorscheme 20 | require("nord").set() 21 | end, 22 | }, 23 | { 24 | "rose-pine/neovim", 25 | name = "rose-pine", 26 | config = function() 27 | require("rose-pine").setup({ 28 | variant = "auto", -- auto, main, moon, or dawn 29 | dark_variant = "moon", -- main, moon, or dawn 30 | styles = { italic = true }, 31 | }) 32 | 33 | -- vim.cmd("colorscheme rose-pine") 34 | end, 35 | }, 36 | { 37 | "catppuccin/nvim", 38 | lazy = false, 39 | priority = 1000, 40 | name = "catppuccin", 41 | opts = { 42 | flavour = "macchiato", 43 | background = { 44 | light = "latte", 45 | dark = "macchiato", 46 | }, 47 | integrations = { 48 | aerial = true, 49 | alpha = true, 50 | cmp = true, 51 | dashboard = true, 52 | flash = true, 53 | gitsigns = true, 54 | headlines = true, 55 | illuminate = true, 56 | indent_blankline = { enabled = true }, 57 | leap = true, 58 | lsp_trouble = true, 59 | mason = true, 60 | markdown = true, 61 | mini = true, 62 | native_lsp = { 63 | enabled = true, 64 | underlines = { 65 | errors = { "undercurl" }, 66 | hints = { "undercurl" }, 67 | warnings = { "undercurl" }, 68 | information = { "undercurl" }, 69 | }, 70 | }, 71 | navic = { enabled = true, custom_bg = "lualine" }, 72 | neotest = true, 73 | neotree = true, 74 | noice = true, 75 | notify = true, 76 | semantic_tokens = true, 77 | telescope = true, 78 | treesitter = true, 79 | treesitter_context = true, 80 | which_key = true, 81 | }, 82 | }, 83 | }, 84 | } 85 | -------------------------------------------------------------------------------- /misc/.encrypted/codes.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | 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 37 | =73FR 38 | -----END PGP MESSAGE----- 39 | -------------------------------------------------------------------------------- /misc/.task/nord.theme: -------------------------------------------------------------------------------- 1 | # Originally adapted from https://github.com/arcticicestudio/igloo 2 | # License: MIT 3 | 4 | # References: 5 | # https://taskwarrior.org/docs/themes.html 6 | # task-color(5) 7 | # taskrc(5) 8 | 9 | # rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda. 10 | 11 | #+---------+ 12 | #+ General + 13 | #+---------+ 14 | color.label= 15 | color.label.sort= 16 | color.alternate= 17 | color.header=bold magenta 18 | color.footnote=rgb542 # yellow 19 | color.warning=bold black on yellow 20 | color.error=bold white on red 21 | color.debug=magenta 22 | 23 | #+-------------+ 24 | #+ Task States + 25 | #+-------------+ 26 | color.completed=gray8 27 | color.deleted=bold gray6 28 | color.active=bold black on green 29 | color.recurring=bold green 30 | color.scheduled=cyan 31 | color.until=cyan 32 | color.blocking=magenta 33 | color.blocked=bold black on cyan 34 | 35 | #+----------+ 36 | #+ Projects + 37 | #+----------+ 38 | color.project.work=bold 39 | 40 | #+----------+ 41 | #+ Priority + 42 | #+----------+ 43 | color.uda.priority.H=bold yellow 44 | color.uda.priority.M=yellow 45 | color.uda.priority.L=gray18 46 | 47 | #+------+ 48 | #+ Tags + 49 | #+------+ 50 | color.tag.next= 51 | color.tag.none= 52 | color.tagged= 53 | 54 | #+-----+ 55 | #+ Due + 56 | #+-----+ 57 | color.due=rgb433 58 | color.due.today=bold red 59 | color.overdue=bold red 60 | 61 | #+---------+ 62 | #+ Reports + 63 | #+---------+ 64 | color.burndown.done=inverse color0 65 | color.burndown.pending=inverse blue 66 | color.burndown.started=inverse color8 67 | 68 | color.history.add=inverse blue 69 | color.history.delete=inverse color0 70 | color.history.done=inverse color8 71 | 72 | color.summary.background=inverse color0 73 | color.summary.bar=inverse blue 74 | 75 | #+----------+ 76 | #+ Calendar + 77 | #+----------+ 78 | color.calendar.due=red 79 | color.calendar.due.today=bold red 80 | color.calendar.holiday=cyan 81 | color.calendar.overdue=bold red on color0 82 | color.calendar.today=bold yellow 83 | color.calendar.weekend=bold gray9 84 | color.calendar.weeknumber=color0 85 | 86 | #+-----------------+ 87 | #+ Synchronization + 88 | #+-----------------+ 89 | color.sync.added=green 90 | color.sync.changed=yellow 91 | color.sync.rejected=red 92 | 93 | #+------+ 94 | #+ Undo + 95 | #+------+ 96 | color.undo.after=green 97 | color.undo.before=red 98 | -------------------------------------------------------------------------------- /misc/.encrypted/security.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | 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 39 | q9aJQcyh7+9J 40 | =A58U 41 | -----END PGP MESSAGE----- 42 | -------------------------------------------------------------------------------- /misc/.config/rclone/rclone.conf: -------------------------------------------------------------------------------- 1 | # Encrypted rclone configuration File 2 | 3 | RCLONE_ENCRYPT_V0: 4 | 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 -------------------------------------------------------------------------------- /zsh/.zsh/utils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | [[ -n "$ZSH_UTILS_SOURCED" ]] && return 4 | ZSH_UTILS_SOURCED=1 5 | 6 | # export dotcastle environment var 7 | export DOTCASTLE=$HOME/Code/dotfiles 8 | export _ARCH=$(arch) 9 | export ZSH_CACHE_DIR=$HOME/.zcache 10 | 11 | # Check OS for various features 12 | os_release() { lsb_release -i | cut -d: -f2 | tr '[:upper:]' '[:lower:]' | sed -e 's/[[:space:]]*//'; } 13 | is_ubuntu() { [[ "$(uname -a)" = *Ubuntu* ]]; } 14 | is_debian() { [[ -f "/etc/debian" ]]; } 15 | is_archlinux() { [[ -f /etc/arch-release ]]; } 16 | is_wsl() { [[ "$(uname -a)" = *microsoft* ]]; } 17 | is_wsl_ubuntu() { is_wsl && os_release == "ubuntu" >/dev/null; } 18 | is_macosx() { [[ "$OSTYPE" = darwin* ]]; } 19 | is_arm_macos() { is_macosx && [[ "$_ARCH" = arm64* ]]; } 20 | is_intel_macos() { is_macosx && [[ "$_ARCH" == "i386" ]]; } 21 | 22 | # check repository features 23 | is_svn() { [[ -d '.svn' ]]; } 24 | is_hg() { [[ -d '.hg' ]] || command hg root &>/dev/null; } 25 | is_git() { [[ -d '.git' ]] || \ command git rev-parse --git-dir &>/dev/null || \ command git symbolic-ref HEAD &>/dev/null; } 26 | 27 | # check editor features 28 | is_vim() { env | grep VIM >/dev/null; } 29 | is_emacs() { echo $TERMINFO | grep -o emacs >/dev/null; } 30 | is_vscode() { [[ "$TERM_PROGRAM" == "vscode" ]]; } 31 | 32 | # check package manager features 33 | has_yum() { is_installed yum; } 34 | has_pac() { is_installed pacman; } 35 | has_apt() { is_installed apt-get; } 36 | is_installed() { type $1 &>/dev/null; } 37 | 38 | # Use consistent debug logs in scripts that we create 39 | ok() { echo -ne "👍 \x1b[32m$@\x1b[0m\n"; } 40 | warn() { echo -ne "🤦 \x1b[33m$@\x1b[m\n"; } 41 | info() { echo -ne "📣 \x1b[36m$@\x1b[0m\n"; } 42 | action() { echo -ne "🏃 \x1b[35m$@\x1b[0m\n"; } 43 | highlight() { echo -ne "👉 \x1b[34m$@\x1b[0m\n"; } 44 | error() { 45 | echo -ne "🔥 \x1b[31m$@\x1b[0m\n" 46 | exit 1 47 | } 48 | 49 | # useful snippets for zsh related config 50 | source_if_exists() { [[ -s "$1" ]] && source "$1"; } 51 | setenv() { 52 | export $1=$2 && [[ -z $ZSH_NAME ]] && is_macosx && [[ -z "${TMUX}" ]] && launchctl setenv $1 "$2" 53 | echo -ne "" 54 | } 55 | path_append() { 56 | for p in $@; do [[ -n "$p" && -d $p ]] && setenv PATH "$PATH:$p"; done 57 | typeset -U path 58 | } 59 | path_prepend() { 60 | for p in $@; do [[ -n "$p" && -d $p ]] && setenv PATH "$p:$PATH"; done 61 | typeset -U path 62 | } 63 | init_cache() { 64 | file_name=$HOME/.init-cache/$1 65 | if [[ -f $file_name ]]; then 66 | . $file_name 67 | else 68 | mkdir -p $HOME/.init-cache 69 | eval "$(echo $2)" >$file_name 70 | . $file_name 71 | fi 72 | } 73 | modify_secret_config() { 74 | vim $1 75 | rm -f $HOME/.decrypted/${1:t:r}.decrypted-cache 76 | } 77 | source_secret() { 78 | name="${1:t:r}" 79 | [[ -z "$name" ]] && name=$(basename ${1%.*}) 80 | destin=$HOME/.decrypted/${name}.decrypted-cache 81 | if [[ -s $destin ]]; then 82 | source $destin 83 | elif [[ -f $1 ]]; then 84 | mkdir -p $HOME/.decrypted 85 | gpg --decrypt $1 2>/dev/null >$destin 86 | chmod +x $destin 87 | source $destin 88 | else 89 | echo "No such secret file found: $1" 90 | fi 91 | } 92 | 93 | setenv DOTCASTLE $HOME/Code/dotfiles 94 | setenv ZSH_CACHE_DIR $HOME/.zcache 95 | setenv _ARCH "$(arch)" 96 | -------------------------------------------------------------------------------- /zsh/.zsh/fzf.zsh: -------------------------------------------------------------------------------- 1 | # source fzf keybindings 2 | export BAT_THEME=Nord 3 | export FZF_DEFAULT_COMMAND="fd --hidden --follow --exclude .git" 4 | export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" 5 | export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND --type d" 6 | export FZF_PREVIEW_COMMAND="$HOME/.bin/fzf-preview.zsh {}" 7 | export FZF_DEFAULT_OPTS=" 8 | --sort 100000 9 | --ansi 10 | --layout=reverse 11 | --info=inline 12 | --height=60% 13 | --multi 14 | --preview-window='right:60%' 15 | --color='hl:148,hl+:154,pointer:032,marker:010,bg+:237,gutter:008' 16 | --prompt='$ ' --pointer='▶' --marker='✓' 17 | --bind 'ctrl-\\:toggle-preview' 18 | --bind 'ctrl-a:select-all' 19 | --bind 'ctrl-y:execute-silent(echo {+} | pbcopy)' 20 | --bind 'ctrl-e:execute(echo {+} | xargs -o vim)' 21 | --bind 'ctrl-x:execute(code {+})' 22 | " 23 | 24 | # source fzf default config 25 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 26 | 27 | # fzf with previews 28 | alias fzfpr="fzf --preview='$FZF_PREVIEW_COMMAND'" 29 | 30 | # search for a needle in all files 31 | alias rgc='rg -S --color=always --no-messages --hidden --smart-case -g "!{.git,node_modules,vendor}/*"' 32 | alias rgf='rgc -l --color=never' 33 | 34 | _fzf_compgen_path() { fd . "$1"; } 35 | _fzf_compgen_dir() { fd --type d . "$1"; } 36 | 37 | # quick open files with editor or visual editor 38 | alias vf="_fuzzy_execute_command_on_files_in_directory $EDITOR ." 39 | alias gvf="_fuzzy_execute_command_on_files_in_directory $VISUAL ." 40 | alias vfd="_fuzzy_execute_command_on_files_in_directory $EDITOR $DOTCASTLE -H" 41 | alias gvfd="_fuzzy_execute_command_on_files_in_directory $VISUAL $DOTCASTLE -H" 42 | _fuzzy_execute_command_on_files_in_directory() { 43 | _exe=$1 44 | _dir=$2 45 | shift 46 | shift 47 | cd ${_dir:-.} && fd . -tf $@ | fzfpr --print0 | xargs -0 -o "${_exe:-vim}" 48 | } 49 | 50 | # fe [SEARCH TERM] - Open the selected file with the default editor 51 | # - Bypass fuzzy finder if there's only one match (--select-1) 52 | # - Exit if there's no match (--exit-0) 53 | fe() { _fuzzy_execute_command_on_files_matching_pattern $EDITOR $@; } 54 | gfe() { _fuzzy_execute_command_on_files_matching_pattern $VISUAL $@; } 55 | _fuzzy_execute_command_on_files_matching_pattern() { 56 | _exe="$1" 57 | shift 58 | IFS=$'\n' _files=($(rgf --files | fzfpr --query "$1" --multi --select-1 --exit-0)) 59 | [[ -n "$_files" ]] && ${_exe:-edit} "${_files[@]}" 60 | } 61 | 62 | # find-in-file - usage: fif 63 | fif() { _fuzzy_execute_command_on_files_containing_pattern $EDITOR $@; } 64 | gfif() { _fuzzy_execute_command_on_files_containing_pattern $VISUAL $@; } 65 | _fuzzy_execute_command_on_files_containing_pattern() { 66 | _exe="$1" 67 | shift 68 | if [ ! "$#" -gt 0 ]; then 69 | echo "Need a string to search for!" 70 | return 1 71 | fi 72 | IFS=$'\n' _files=($(rgf --files-with-matches $@ | fzf $FZF_PREVIEW_WINDOW --preview "rg --ignore-case --pretty --context 10 '$1' {}")) 73 | [[ -n "$_files" ]] && ${_exe:-edit} "${_files[@]}" 74 | } 75 | 76 | # like normal z when used with arguments but displays an fzf prompt when used without. 77 | unalias z 2>/dev/null 78 | z() { 79 | [ $# -gt 0 ] && _z "$*" && return 80 | cd "$(_z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-* }" | sed 's/^[0-9,.]* *//')" 81 | } 82 | -------------------------------------------------------------------------------- /__install/brew.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | _root=$(dirname $(dirname $0)) 4 | source $_root/zsh/.zsh/utils.sh 5 | export HOMEBREW_NO_AUTO_UPDATE=1 6 | 7 | highlight "Installing/Upgrading brew" 8 | is_installed brew || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 9 | HOMEBREW_NO_AUTO_UPDATE= brew upgrade 10 | 11 | highlight "Installing utilities using brew" 12 | brew install antibody 13 | brew install aria2 14 | brew install automake 15 | brew install cmake 16 | brew install coreutils 17 | brew install curl 18 | brew install fasd 19 | brew install fd 20 | brew install ffmpeg 21 | brew install findutils 22 | brew install fzf 23 | brew install git 24 | brew install gnu-sed 25 | brew install gnu-tar 26 | brew install gnupg 27 | brew install htop 28 | brew install imagemagick 29 | brew install ispell 30 | brew install jq 31 | # brew install libtool 32 | brew install lunchy 33 | # brew install media-info 34 | # brew install moreutils 35 | # brew install mpc 36 | # brew install mpd 37 | # brew install mysql 38 | brew install ncdu 39 | brew install ncmpcpp 40 | brew install ntfs-3g 41 | brew install openssh 42 | brew install openssl 43 | brew install pinentry-mac 44 | brew install postgresql 45 | brew install pv 46 | brew install rclone 47 | brew install readline 48 | brew install reattach-to-user-namespace 49 | brew install redis 50 | brew install rename 51 | brew install ripgrep 52 | brew install rsync 53 | brew install sqlite 54 | # brew install sshfs 55 | # brew install svn 56 | brew install terminal-notifier 57 | brew install tmux 58 | brew install tmuxinator 59 | brew install wget 60 | brew install youtube-dl 61 | brew install zsh 62 | # brew install fontconfig 63 | # brew install freetype 64 | # brew install ta-lib 65 | # brew install unison 66 | # brew install weechat 67 | # brew tap heroku/brew && brew install heroku 68 | 69 | highlight "Installing apps/casks using brew" 70 | brew install arc 71 | # brew install alacritty 72 | # brew install alfred 73 | # brew install atom 74 | brew install cursor 75 | # brew install dropbox 76 | # brew install google-chrome 77 | # brew install iterm2 78 | brew install kitty 79 | # brew install nvalt 80 | # brew install osxfuse 81 | # brew install skype 82 | brew install slack 83 | # brew install ubersicht 84 | # brew install upwork 85 | # brew install vimr 86 | # brew install visual-studio-code 87 | brew install vlc 88 | brew install whatsapp 89 | brew install qlimagesize qlmarkdown qlvideo quicklook-csv quicklook-json 90 | 91 | highlight "Enable brew managed services" 92 | brew tap homebrew/services 93 | # brew services restart mysql 94 | brew services restart postgresql 95 | brew services restart redis 96 | 97 | highlight "Install some fonts" 98 | brew tap homebrew/cask-fonts 99 | brew install font-fira-code 100 | brew install font-fira-code-nerd-eont 101 | brew install font-droid-sans-mono-for-powerline 102 | brew install font-fira-mono-for-powerline 103 | brew install font-noto-mono-for-powerline 104 | brew install font-powerline-symbols 105 | brew install font-source-code-pro-for-powerline 106 | 107 | # cleanup 108 | brew cleanup 109 | 110 | highlight 'Switch to using brew-installed zsh as default shell' 111 | if ! fgrep -q "${BREW_PREFIX}/bin/zsh" /etc/shells; then 112 | echo "${BREW_PREFIX}/bin/zsh" | sudo tee -a /etc/shells 113 | chsh -s "${BREW_PREFIX}/bin/zsh" 114 | fi 115 | -------------------------------------------------------------------------------- /vim/.config/nvim/lua/config/keymaps.lua: -------------------------------------------------------------------------------- 1 | -- Keymaps are automatically loaded on the VeryLazy event 2 | -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua 3 | -- Add any additional keymaps here 4 | -- 5 | local km = function(mode, lhs, rhs, desc, opts) 6 | return vim.keymap.set( 7 | mode, 8 | lhs, 9 | rhs, 10 | vim.tbl_extend("force", opts or {}, { 11 | desc = desc, 12 | noremap = true, 13 | }) 14 | ) 15 | end 16 | 17 | local setup_search_for_directory = function(name, find_keys, grep_keys, directory, hidden) 18 | if find_keys then 19 | km("n", find_keys, function() 20 | require("telescope.builtin").find_files({ 21 | cwd = directory, 22 | hidden = true, 23 | file_ignore_patterns = { "node_modules", ".git" }, 24 | }) 25 | end, "Find " .. name) 26 | end 27 | km("n", grep_keys, function() 28 | require("telescope.builtin").live_grep({ 29 | cwd = directory, 30 | file_ignore_patterns = { "node_modules", ".git" }, 31 | additional_args = function(opts) 32 | if hidden then 33 | return { "--hidden" } 34 | else 35 | return {} 36 | end 37 | end, 38 | }) 39 | end, "Search " .. name) 40 | end 41 | 42 | ----------------------------------------------------------- 43 | -- Common Overrides 44 | ----------------------------------------------------------- 45 | km("i", "jj", "", "Quit insert mode") 46 | km("i", "jk", "", "Quit insert mode") 47 | km("n", "Y", "yy", "Yank full line") 48 | 49 | ----------------------------------------------------------- 50 | -- Window Navigation 51 | ----------------------------------------------------------- 52 | km("n", "m", "999+999>", "Maximize current split") 53 | 54 | ----------------------------------------------------------- 55 | -- Editor: Formatting, Folding, etc. 56 | ----------------------------------------------------------- 57 | km("v", "=", "gq", "Format visual selection", { silent = true }) 58 | 59 | -- fold levels 60 | km("n", "z1", "set foldlevel=1", "Fold level 1") 61 | km("n", "z2", "set foldlevel=2", "Fold level 2") 62 | km("n", "z3", "set foldlevel=3", "Fold level 3") 63 | km("n", "z4", "set foldlevel=4", "Fold level 4") 64 | km("n", "z5", "set foldlevel=5", "Fold level 5") 65 | 66 | ----------------------------------------------------------- 67 | -- Terminals 68 | ----------------------------------------------------------- 69 | km("n", "!o", "Yp!!$SHELL", "[TERM] Insert output of current line below") 70 | km("v", "!", "y`P`[mx`]mygv!gpg -aer $EMAIL`xv`y", "[GPG] insert encrypted text for selection below") 71 | 72 | ----------------------------------------------------------- 73 | -- Useful Enhancements 74 | ----------------------------------------------------------- 75 | setup_search_for_directory("dotfiles", "fd", "fD", vim.env.DOTCASTLE, true) 76 | setup_search_for_directory("dotfiles", nil, "sud", vim.env.DOTCASTLE, true) 77 | setup_search_for_directory("dotfiles", "fl", "fL", vim.env.HOME .. "/Code/LunchBox", false) 78 | setup_search_for_directory("dotfiles", nil, "sul", vim.env.HOME .. "/Code/LunchBox", false) 79 | 80 | ----------------------------------------------------------- 81 | -- Fun 82 | ----------------------------------------------------------- 83 | km("n", "no", "mzggg?G'z", "Obfuscate buffer") 84 | -------------------------------------------------------------------------------- /misc/.config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | ########### 2 | # General # 3 | ########### 4 | 5 | save-position-on-quit 6 | no-border # no window title bar 7 | msg-module # prepend module name to log messages 8 | msg-color # color log messages on terminal 9 | term-osd-bar # display a progress bar on the terminal 10 | use-filedir-conf # look for additional config files in the directory of the opened file 11 | keep-open # keep the player open when a file's end is reached 12 | autofit-larger=100%x95% # resize window in case it's larger than W%xH% of the screen 13 | cursor-autohide-fs-only # don't autohide the cursor in window mode, only fullscreen 14 | cursor-autohide=1000 # autohide the curser after 1s 15 | 16 | screenshot-format=png 17 | screenshot-png-compression=8 18 | screenshot-directory=~/Pictures/Screenshots 19 | screenshot-template='%F (%P) %n' 20 | 21 | hls-bitrate=max # use max quality for HLS streams 22 | ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash_segments]+bestaudio/best #[protocol!=http_dash_segments][protocol!=rtmp] 23 | 24 | ######### 25 | # Cache # 26 | ######### 27 | 28 | cache=yes 29 | #cache-default=50000 # size in KB 30 | #cache-backbuffer=25000 # size in KB 31 | #cache-initial=0 # start playback when your cache is filled up with x kB 32 | cache-secs=10 # how many seconds of audio/video to prefetch if the cache is active 33 | 34 | ############# 35 | # OSD / OSC # 36 | ############# 37 | 38 | osd-level=1 # enable osd and display --osd-status-msg on interaction 39 | osd-duration=2500 # hide the osd after x ms 40 | osd-status-msg='${time-pos} / ${duration}${?percent-pos: (${percent-pos}%)}${?frame-drop-count:${!frame-drop-count==0: Dropped: ${frame-drop-count}}}\n${?chapter:Chapter: ${chapter}}' 41 | 42 | osd-font='Ubuntu' 43 | osd-font-size=32 44 | osd-color='#CCFFFFFF' # ARGB format 45 | osd-border-color='#DD322640' # ARGB format 46 | osd-bar-align-y=0 # progress bar y alignment (-1 top, 0 centered, 1 bottom) 47 | osd-border-size=2 # size for osd text and progress bar 48 | osd-bar-h=2 # height of osd bar as a fractional percentage of your screen height 49 | osd-bar-w=60 # width of " " " 50 | 51 | ############# 52 | # Subtitles # 53 | ############# 54 | 55 | sub-use-margins 56 | 57 | demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking 58 | sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload 59 | sub-file-paths=ass:srt:sub:subs:subtitles # search for external subs in the listed subdirectories 60 | embeddedfonts=yes # use embedded fonts for SSA/ASS subs 61 | sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases) 62 | 63 | ######### 64 | # Audio # 65 | ######### 66 | 67 | audio-file-auto=fuzzy # external audio doesn't has to match the file name exactly to autoload 68 | audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed 69 | volume=100 # default volume, 100 = unchanged 70 | 71 | ################ 72 | # Video Output # 73 | ################ 74 | 75 | # Active VOs (and some other options) are set conditionally 76 | # See here for more information: https://github.com/wm4/mpv-scripts/blob/master/auto-profiles.lua 77 | # The script was modified to import functions from scripts/auto-profiles-functions.lua 78 | 79 | # Defaults for all profiles 80 | vo=gpu 81 | hwdec=nvdec 82 | 83 | ## OTHERS 84 | input-ipc-server=/tmp/mpvsocket 85 | watch-later-directory=/tmp/mpv 86 | shuffle 87 | loop-playlist 88 | -------------------------------------------------------------------------------- /vim/.config/nvim/performance/minivimrc: -------------------------------------------------------------------------------- 1 | set autoread " watch for file changes 2 | set noautochdir " do not auto change the working directory 3 | set noautowrite " do not auto write file when moving away from it. 4 | scriptencoding utf-8 5 | set encoding=utf-8 nobomb " BOM often causes trouble 6 | set termencoding=utf-8 7 | set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1 8 | set nobackup " do not keep backup files - it's 70's style cluttering 9 | set nowritebackup " do not make a write backup 10 | set noswapfile " do not write annoying intermediate swap files 11 | set noerrorbells " don't beep 12 | set visualbell t_vb= " don't beep, remove visual bell char 13 | set backspace=indent,eol,start " allow backspacing over everything in insert mode 14 | set fileformats="unix,dos,mac" " EOL that will be tried when reading buffers 15 | set tabstop=2 " a tab is two spaces 16 | set softtabstop=2 " when , pretend tab is removed, even if spaces 17 | set expandtab " expand tabs, by default 18 | set list " show invisible characters like spaces 19 | set listchars=tab:▸\ ,trail:·,extends:❯,precedes:❮,nbsp:· 20 | set wrap " don't wrap lines 21 | set linebreak " break long lines at words, when wrap is on 22 | set whichwrap=b,s,h,l,<,>,[,] " allow & cursor keys to move to prev/next line 23 | let &showbreak="\u21aa " " string to put at the starting of wrapped lines 24 | set textwidth=120 " wrap after this many characters in a line 25 | set hidden " means that current buffer can be put to background without being written; and that marks and undo history are preserved. 26 | set splitbelow " puts new split windows to the bottom of the current 27 | set splitright " puts new vsplit windows to the right of the current 28 | set equalalways " split windows are always of eqal size 29 | set switchbuf=useopen,split " use existing buffer or else split current window 30 | set tabpagemax=15 31 | set autoindent " always set autoindenting on 32 | set shiftwidth=2 " number of spaces to use for autoindenting 33 | set copyindent " copy the previous indentation on autoindenting 34 | set shiftround " use multiple of 'sw' when indenting with '<' and '>' 35 | set smarttab " insert tabs on start of line acc to 'sw' not 'ts' 36 | set showmatch " set show matching parenthesis 37 | set nofoldenable " do not enable folding, by default 38 | set foldlevel=0 " folds with a higher level will be closed 39 | set foldlevelstart=10 " start out with everything open 40 | set foldmethod=indent " create folds based on indentation 41 | set foldnestmax=7 " deepest fold is 7 levels 42 | set ttyfast " always use a fast terminal 43 | set number " always show line numbers 44 | set numberwidth=4 " number of culumns for line numbers 45 | set cursorline " highlight the current line for quick orientation 46 | set nocursorcolumn " do not highlight the current column 47 | set synmaxcol=800 " don't try to highlight lines longer than 800 characters 48 | 49 | if has("nvim-0.5.0") || has("patch-8.1.1564") 50 | set signcolumn=number 51 | else 52 | set signcolumn=yes 53 | endif 54 | 55 | " Stop fucking netrw 56 | let g:netrw_silent = 1 57 | let g:netrw_quiet = 1 58 | let g:loaded_netrw = 1 " prevents loading of netrw, but messes 'gx' 59 | let g:loaded_netrwPlug = 1 " ^ ..same.. and therefore, commented 60 | 61 | let mapleader = "<\Space>" " change mapleader key from / to space 62 | let maplocalleader = "," " used inside filetype settings 63 | 64 | " Enable syntax colors 65 | syntax on 66 | 67 | " Enable file type detection and do language-dependent indenting. 68 | filetype plugin indent on 69 | -------------------------------------------------------------------------------- /zsh/.zshrc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # source utils 4 | source ~/.zsh/utils.sh 5 | 6 | # Reference: http://zsh.sourceforge.net/Doc/Release/Options.html 7 | unsetopt rm_star_silent # Query the user on removing all files in a path 8 | unsetopt nomatch 9 | unsetopt correct_all 10 | unsetopt flowcontrol 11 | setopt no_beep # do not beep 12 | setopt auto_pushd # cd pushes the old directory onto directory stack 13 | setopt pushd_silent # be quiet when using pushd 14 | setopt pushd_ignore_dups # only push unique values in directorys stack 15 | # setopt menu_complete # complete first option when ambiguous 16 | setopt hist_expire_dups_first # expire older dup commands first in history 17 | setopt hist_find_no_dups # do not find dupes when searching history 18 | setopt hist_ignore_space # do not add commands with a leading space in history 19 | setopt hist_no_store # do not add 'history' command in history 20 | setopt rm_star_wait # wait for 10 seconds before accepting the answer 21 | setopt auto_menu # show completion menu on successive tab press 22 | setopt complete_in_word 23 | setopt always_to_end 24 | setopt pushdminus 25 | setopt interactivecomments 26 | 27 | # Terminal settings 28 | typeset -U path # set $path variable to only have unique values 29 | export MAILCHECK=0 # no mailcheck messages 30 | export TERM=screen-256color # 256 color support 31 | export DISABLE_AUTO_TITLE=true # otherwise, causes issues with terminal inside editors 32 | export GREP_COLORS=${GREP_COLORS:-31} # grep should use red for highlighting matches 33 | 34 | # set vim bindings for zsh 35 | bindkey -v 36 | bindkey "^?" backward-delete-char 37 | bindkey "^W" backward-kill-word 38 | bindkey "^H" backward-delete-char # Control-h also deletes the previous char 39 | bindkey "^U" backward-kill-line 40 | 41 | # history 42 | bindkey "^[[A" history-substring-search-up 43 | bindkey "^[[B" history-substring-search-down 44 | 45 | # autosuggest 46 | bindkey '^ ' autosuggest-execute 47 | export ZSH_AUTOSUGGEST_USE_ASYNC=1 48 | export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 49 | export ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history completion) 50 | 51 | # miscelleneous 52 | unalias run-help &>/dev/null 53 | autoload run-help 54 | HELPDIR=$HOMEBREW_PREFIX/share/zsh/help 55 | 56 | # NOTE: brew doctor complaints about putting coreutils/findutils in path 57 | # # make sure we use gnu version of commands like ls, etc. 58 | # # rehash -f # gnu-utils OMZ plugin 59 | # for package in coreutils gnu-sed gnu-tar findutils moreutils; do 60 | # if [[ -d $HOMEBREW_PREFIX/opt/$package/libexec/gnubin ]]; then 61 | # PATH="$HOMEBREW_PREFIX/opt/$package/libexec/gnubin:$PATH" 62 | # MANPATH="$HOMEBREW_PREFIX/opt/$package/libexec/gnuman:$MANPATH" 63 | # fi 64 | # done 65 | 66 | # dircolors 67 | [[ -r $XDG_CONFIG_DIR/user-dirs.dirs ]] && source $XDG_CONFIG_DIR/user-dirs.dirs 68 | # [[ -f ~/.dir_colors ]] && init_cache dircolors "gdircolors -b ~/.dir_colors" 69 | 70 | # ssh setup using GnuPG 71 | export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) 72 | gpg-agent --daemon --options ~/.gnupg/gpg-agent.conf --pinentry-program $HOMEBREW_PREFIX/bin/pinentry-mac &>/dev/null 73 | 74 | # source other zsh scripts 75 | source ~/.zshenv 76 | source ~/.zshplugs 77 | source ~/.zsh/aliases.zsh 78 | source ~/.zsh/dotfiles.zsh 79 | source ~/.zsh/downloaders.zsh 80 | source ~/.zsh/fzf.zsh 81 | source ~/.zsh/languages.zsh 82 | source ~/.zsh/macos.zsh 83 | source ~/.zsh/tmux.zsh 84 | source ~/.zsh/prompt.zsh 85 | source ~/.zsh/completion.zsh 86 | source_if_exists ~/.zshrc.local 87 | 88 | # FIX: use ncurses pinentry when inside SSH connection 89 | [[ -n "$SSH_CONNECTION" || -n "$TMUX" ]] && export PINENTRY_USER_DATA="USE_CURSES=1" || true 90 | 91 | # when cd'ing into a directory, source the .source_me.zsh file if it exists 92 | autoload -U add-zsh-hook 93 | load-local-conf() { 94 | # check file exists, is regular file and is readable: 95 | if [[ -f .source_me.zsh && -r .source_me.zsh ]]; then 96 | source .source_me.zsh 97 | fi 98 | } 99 | add-zsh-hook chpwd load-local-conf 100 | -------------------------------------------------------------------------------- /misc/.inputrc: -------------------------------------------------------------------------------- 1 | set editing-mode vi 2 | # carries over site-wide readline configuration to the user configuration 3 | # $include /etc/inputrc 4 | 5 | # This line sets readline to display possible completions using different 6 | # colors to indicate their file types. The colors are determined by the 7 | # environmental variable LS_COLORS, which can be nicely configured. 8 | set colored-stats On 9 | 10 | # This line sets auto completion to ignore cases. 11 | set completion-ignore-case On 12 | 13 | # Treat hyphens and underscores as equivalent 14 | set completion-map-case on 15 | 16 | # This line sets 3 to be the maximum number of characters to be the common 17 | # prefix to display for completions. If the common prefix has more than 18 | # 3 characters, they are replaced by ellipsis 19 | # 20 | # set completion-prefix-display-length 3 21 | 22 | # This line sets every completion which is a symbolic link to a directory to 23 | # have a slash appended. 24 | set mark-symlinked-directories On 25 | 26 | # This line sets the completions to be listed immediately instead of ringing 27 | # the bell, when the completing word has more than one possible completion. 28 | set show-all-if-ambiguous On 29 | 30 | # This line sets the completions to be listed immediately instead of ringing 31 | # the bell, when the completing word has more than one possible completion but 32 | # no partial completion can be made. 33 | set show-all-if-unmodified On 34 | 35 | # This lines sets completions to be appended by characters that indicate their 36 | # file types reported by the stat system call. 37 | set visible-stats On 38 | 39 | # Do not autocomplete hidden files unless the pattern explicitly begins with a dot 40 | set match-hidden-files off 41 | 42 | # Show all autocomplete results at once 43 | set page-completions off 44 | 45 | # If there are more than 200 possible completions for a word, ask to show them all 46 | set completion-query-items 200 47 | 48 | # Be more intelligent when autocompleting by also looking at the text after 49 | # the cursor. For example, when the current line is "cd ~/src/mozil", and 50 | # the cursor is on the "z", pressing Tab will not autocomplete it to "cd 51 | # ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the 52 | # Readline used by Bash 4.) 53 | set skip-completed-text on 54 | 55 | # Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456' 56 | set input-meta on 57 | set output-meta on 58 | set convert-meta off 59 | 60 | # # Show the current mode (insert/command) in the bash prompt 61 | set show-mode-in-prompt on 62 | set vi-ins-mode-string \1\e[5 q\2 63 | set vi-cmd-mode-string \1\e[2 q\2 64 | 65 | # mode specific keybindings 66 | $if mode=emacs 67 | # Readline specific functions 68 | "\e[1~": beginning-of-line # CTRL + A 69 | "\e[4~": end-of-line # CTRL + E 70 | "\e[5C": forward-word # Control + Right 71 | "\e[5D": backward-word # Control + Left 72 | "\e[3~": delete-char # Delete 73 | "\e[2~": quoted-insert # CTRL + v 74 | "\e[5~": history-search-backward # Page Up 75 | "\e[6~": history-search-forward # Page Down 76 | #"\t": menu-complete # Tab cycles through completions 77 | 78 | # If the above prevents Left and Right from working, try this: 79 | #"\e[C": forward-char # Move forward one character. 80 | #"\e[D": backward-char # Move backwards one character. 81 | $endif 82 | 83 | # Avoid binding ^J, ^M, ^C, ^?, ^S, ^Q, etc. 84 | $if mode=vi 85 | set keymap vi-command 86 | "gg": beginning-of-history 87 | "G": end-of-history 88 | "k": history-incremental-search-backward 89 | "j": history-incremental-search-forward 90 | "?": reverse-search-history 91 | "/": forward-search-history 92 | 93 | set keymap vi-insert 94 | "\C-l": clear-screen 95 | "\C-w": backward-kill-word 96 | "\C-a": beginning-of-line 97 | "\C-e": end-of-line 98 | "\C-?": backward-delete-char 99 | "\e[A": history-beginning-search-backward 100 | "\e[B": history-beginning-search-forward 101 | 102 | $endif 103 | 104 | # IPython needs this to appear at the bottom of the 105 | # file for clear-screen to work 106 | # set keymap vi 107 | -------------------------------------------------------------------------------- /zsh/.zsh/aliases.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # speed up parent directories 4 | alias -g ...='../..' 5 | alias -g ....='../../..' 6 | alias -g .....='../../../..' 7 | 8 | # redirect stdout/stderr easily 9 | alias -g NOERR='2> /dev/null' 10 | alias -g NOOUT='1> /dev/null' 11 | alias -g QUIET='&> /dev/null' 12 | alias -g ERR='2> >(while read line; do echo -e "\e[01;31m$line\e[0m"; done)' 13 | 14 | # shortcuts to some frequently used commands 15 | alias -g G='| rg' 16 | alias -g RG=G 17 | alias -g GREP=G 18 | 19 | # copy and paste 20 | alias -g COPY="| pbcopy" 21 | alias -g PASTE="| pbpaste" 22 | 23 | # Decolorize command output - useful in scripts 24 | alias -g NOCOLOR="| perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' | col -b" 25 | 26 | # Open the output of command in VIM [colorless] 27 | alias -g VIM="NOCOLOR | vim -R -" 28 | 29 | # Share command output over HTTP 30 | alias -g SHARE="| tee >(cat) NOCOLOR| curl -sF 'sprunge=<-' http://sprunge.us | pbcopy" 31 | 32 | # process each line of output 33 | function process_each_line() { while read line; do $@ $line; done; } 34 | alias -g PROCESS_EACH_LINE="| process_each_line" 35 | 36 | # editor related 37 | alias e=edit 38 | alias vim=edit 39 | alias edit="${EDITOR}" 40 | alias ge=gedit 41 | alias gvim=gedit 42 | alias gedit="${VISUAL}" 43 | 44 | # chmod 45 | alias w+="sudo chmod +w" # quickly make a file writeable 46 | alias w-="sudo chmod -w" # quickly make a file un-writeable 47 | alias x+="sudo chmod +x" # quickly make a file executable 48 | alias x-="sudo chmod -x" # quickly make a file un-executable 49 | 50 | # ls 51 | alias ls='gls -F --color=always --group-directories-first' 52 | alias la="ls -alh" # list all files and folders 53 | alias lS='ls -1FSsh | sort -r' # sort by size 54 | alias lx='ls -lAFhXB' # sort by extension - GNU only 55 | alias lR='ls -AFtrd *(R)' # show readable files 56 | alias lRnot='ls -AFtrd *(^R)' # show non-readable files 57 | 58 | # better defaults 59 | alias md="mkdir -p" 60 | alias du1='du -hd 1' # disk usage with human sizes and minimal depth (prefer: dsize) 61 | alias history="fc -il 1" # show timestamps in history 62 | alias reload=" exec zsh -li" # reload zsh 63 | 64 | take() { mkdir -p $@ && cd $@; } # create and cd into a directory 65 | cp_p() { rsync -WavP --human-readable --progress $1 $2; } # Copy w/ progress 66 | is_installed git && function diff() { git diff --no-index --color-words "$@"; } 67 | 68 | # READ THE FUCKING MANUAL!! 69 | rtfm() { help $@ 2>/dev/null || man $@ 2>/dev/null || browse "http://www.google.com/search?q=$@"; } 70 | 71 | # useful commands 72 | alias mux=tmuxinator 73 | alias copy_gpg_key="gpg -a --export $GPGKEY COPY" 74 | alias copy_ssh_key="gpg --export-ssh-key $SSHKEY COPY" 75 | alias download="aria2c --file-allocation=none -s 8 -x 8" 76 | 77 | # browse files easily 78 | function browse() { eval "${BROWSER} '$1'"; } 79 | 80 | # find a process in the activity monitor 81 | alias p="ps -eo pid,command|grep -v grep|grep -i" 82 | 83 | # check disk space using ncdu 84 | alias check_disk_space='sudo ncdu / --exclude=/media/* --exclude=/mnt/* --exclude=/Volumes/*' 85 | 86 | function flushdns() { 87 | sudo dscacheutil -flushcache 88 | sudo killall -HUP mDNSResponder 89 | } 90 | 91 | kill_processes_on_port() { 92 | for port in "$@"; do 93 | sudo lsof -i tcp:$port | awk 'NR!=1 {print $2}' | xargs kill -9 94 | done 95 | sudo lsof -i tcp:$port 96 | } 97 | 98 | # fkill - kill processes - list only the ones you can kill. 99 | kp() { 100 | if [ "$UID" != "0" ]; then 101 | _pid=$(ps -f -u $UID | sed 1d | fzf --query "$1" -m | awk '{print $2}') 102 | else 103 | _pid=$(ps -ef | sed 1d | fzf --query "$1" -m | awk '{print $2}') 104 | fi 105 | 106 | if [ -n "$_pid" ]; then 107 | echo $_pid | xargs kill -${1:-9} 108 | fi 109 | } 110 | 111 | # source the environment from the current directory or a git repo 112 | function envsource() { 113 | local _current="$(pwd)" 114 | if [[ -f "./.source_me.zsh" ]]; then 115 | cd 116 | cd $_current 117 | echo "sourced env from current dir." 118 | else 119 | local _from="${1:-$(dirname $(git rev-parse --show-toplevel))}" 120 | if [[ -f "${_from}/.source_me.zsh" ]]; then 121 | cd $_from 122 | echo "sourced env from $_from" 123 | cd $_current 124 | else 125 | echo "Could not find the env at: ${_from}/.source_me.zsh" 126 | fi 127 | fi 128 | } 129 | -------------------------------------------------------------------------------- /misc/.rtorrent.rc: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # A minimal rTorrent configuration that provides the basic features 3 | # you want to have in addition to the built-in defaults. 4 | # 5 | # See https://github.com/rakshasa/rtorrent/wiki/CONFIG-Template 6 | # for an up-to-date version. 7 | ############################################################################# 8 | 9 | 10 | ## Instance layout (base paths) 11 | method.insert = cfg.basedir, private|const|string, (cat,"/home/nikhgupta/Torrents/") 12 | method.insert = cfg.download, private|const|string, (cat,(cfg.basedir),"download/") 13 | method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/") 14 | method.insert = cfg.logfile, private|const|string, (cat,(cfg.logs),"rtorrent-",(system.time),".log") 15 | method.insert = cfg.session, private|const|string, (cat,(cfg.basedir),".session/") 16 | method.insert = cfg.watch, private|const|string, (cat,(cfg.basedir),"watch/") 17 | 18 | 19 | ## Create instance directories 20 | execute.throw = sh, -c, (cat,\ 21 | "mkdir -p \"",(cfg.download),"\" ",\ 22 | "\"",(cfg.logs),"\" ",\ 23 | "\"",(cfg.session),"\" ",\ 24 | "\"",(cfg.watch),"/load\" ",\ 25 | "\"",(cfg.watch),"/start\" ") 26 | 27 | 28 | ## Listening port for incoming peer traffic (fixed; you can also randomize it) 29 | network.port_range.set = 50000-50000 30 | network.port_random.set = no 31 | 32 | 33 | ## Tracker-less torrent and UDP tracker support 34 | ## (conservative settings for 'private' trackers, change for 'public') 35 | dht.mode.set = disable 36 | protocol.pex.set = no 37 | 38 | trackers.use_udp.set = no 39 | 40 | 41 | ## Peer settings 42 | throttle.max_uploads.set = 100 43 | throttle.max_uploads.global.set = 250 44 | 45 | throttle.min_peers.normal.set = 20 46 | throttle.max_peers.normal.set = 60 47 | throttle.min_peers.seed.set = 30 48 | throttle.max_peers.seed.set = 80 49 | trackers.numwant.set = 80 50 | 51 | protocol.encryption.set = allow_incoming,try_outgoing,enable_retry 52 | 53 | 54 | ## Limits for file handle resources, this is optimized for 55 | ## an `ulimit` of 1024 (a common default). You MUST leave 56 | ## a ceiling of handles reserved for rTorrent's internal needs! 57 | network.http.max_open.set = 50 58 | network.max_open_files.set = 600 59 | network.max_open_sockets.set = 300 60 | 61 | 62 | ## Memory resource usage (increase if you have a large number of items loaded, 63 | ## and/or the available resources to spend) 64 | pieces.memory.max.set = 1800M 65 | network.xmlrpc.size_limit.set = 4M 66 | 67 | 68 | ## Basic operational settings (no need to change these) 69 | session.path.set = (cat, (cfg.session)) 70 | directory.default.set = (cat, (cfg.download)) 71 | log.execute = (cat, (cfg.logs), "execute.log") 72 | #log.xmlrpc = (cat, (cfg.logs), "xmlrpc.log") 73 | execute.nothrow = sh, -c, (cat, "echo >",\ 74 | (session.path), "rtorrent.pid", " ",(system.pid)) 75 | 76 | 77 | ## Other operational settings (check & adapt) 78 | encoding.add = utf8 79 | system.umask.set = 0027 80 | system.cwd.set = (directory.default) 81 | network.http.dns_cache_timeout.set = 25 82 | schedule2 = monitor_diskspace, 15, 60, ((close_low_diskspace, 1000M)) 83 | #pieces.hash.on_completion.set = no 84 | #view.sort_current = seeding, greater=d.ratio= 85 | #keys.layout.set = qwerty 86 | #network.http.capath.set = "/etc/ssl/certs" 87 | #network.http.ssl_verify_peer.set = 0 88 | #network.http.ssl_verify_host.set = 0 89 | 90 | 91 | ## Some additional values and commands 92 | method.insert = system.startup_time, value|const, (system.time) 93 | method.insert = d.data_path, simple,\ 94 | "if=(d.is_multi_file),\ 95 | (cat, (d.directory), /),\ 96 | (cat, (d.directory), /, (d.name))" 97 | method.insert = d.session_file, simple, "cat=(session.path), (d.hash), .torrent" 98 | 99 | 100 | ## Watch directories (add more as you like, but use unique schedule names) 101 | ## Add torrent 102 | schedule2 = watch_load, 11, 10, ((load.verbose, (cat, (cfg.watch), "load/*.torrent"))) 103 | ## Add & download straight away 104 | schedule2 = watch_start, 10, 10, ((load.start_verbose, (cat, (cfg.watch), "start/*.torrent"))) 105 | 106 | 107 | ## Run the rTorrent process as a daemon in the background 108 | ## (and control via XMLRPC sockets) 109 | #system.daemon.set = true 110 | #network.scgi.open_local = (cat,(session.path),rpc.socket) 111 | #execute.nothrow = chmod,770,(cat,(session.path),rpc.socket) 112 | 113 | 114 | ## Logging: 115 | ## Levels = critical error warn notice info debug 116 | ## Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_* 117 | print = (cat, "Logging to ", (cfg.logfile)) 118 | log.open_file = "log", (cfg.logfile) 119 | log.add_output = "info", "log" 120 | #log.add_output = "tracker_debug", "log" 121 | 122 | ### END of rtorrent.rc ### 123 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My Dot Castle 2 | 3 | ![DotCastle](https://github.com/nikhgupta/dotfiles/raw/master/screenshots/dotcastle.png) 4 | 5 | **castle for my dotfiles** - the cornetstone of _dev-kind_ ! :) 6 | 7 | This repository contains the dotfiles _(stolen/compiled/created)_ by me. 8 | Major inspirations from [@holman](http://github.com/holman) and 9 | [@mathiasybnens](http://github.com/mathiasbynens). More inspirations 10 | from [dotfiles repository](http://github.com/skwp/dotfiles) by 11 | [@skwp](http://github.com/skwp). Credit has been given where I could. :) 12 | 13 | To install, run: 14 | 15 | git clone https://github.com/nikhgupta/dotfiles ~/.dotfiles 16 | ~/.dotfiles/install/run.sh 17 | 18 | ## Version 5 - Back to OSX 19 | 20 | ### Pre Setup 21 | 22 | I had to buy a Macbook Pro due to work requirements. Although, I loved using 23 | my Legion Y530 running ArchLinux OS with `bspwm` as tiling window manager, 24 | Macbooks have their own USPs. Primarily, ease of development and longer 25 | battery backup over the Legion Y530. 26 | 27 | I am using the Macbook Pro as a primary machine now (as mentioned - due to 28 | work requirements). These dotfiles target setup of my Macbook Pro along with 29 | (upcoming) `BetterTouchTool` automation and TouchBar customizations. 30 | 31 | My Macbook has a physical Escape key unlike the most unfortunate previous 32 | generation Macbooks with an Escape key on the TouchBar!!! 33 | 34 | I have tried my best to use apps that allow me to backup their settings / 35 | config in my dotfiles repo. Primarily, I use `yabai` for window management 36 | (like `bspwm` on arch), `skhd` for key-bindings (with SIP disabled), and 37 | `MTMR` for touch bar customization. 38 | 39 | I would like to switch to `hammerspoon` app as that would provide additional 40 | features over `skhd`, but `hammerspoon` at the moment has problems 41 | interfacing with `yabai` (it seems), and hence, I will revisit it at a later 42 | time. 43 | 44 | I have remapped by `Caps Lock` key to send `F19` key code instead. I use 45 | vim-like modal key-bindings, which use this `F19` key code as leader, and vim 46 | like movements, e.g. I can move a window to next space using `F19 m w ]` or 47 | `F19 m w r` (move window next or right). 48 | 49 | > Choice of tools is influenced by whether the rules/config can be setup using 50 | > a simple text file. If so, we can add that config to version control for 51 | > easier setups later. 52 | 53 | ## Version 4 - Archlinux/Manjaro 54 | 55 | ### Pre-setup 56 | 57 | These dotfiles used to target osx (`v1`), ubuntu/archlinux (`v2`), WSL 58 | (`v3`), etc., but with `v4` - I have exclusively settled on using 59 | Archlinux base now. For a quick setup, I do employ Manjaro Architect at 60 | times, which sets up a base Archlinux install for me with a minimal 61 | Gnome shell. 62 | 63 | At the moment, I am using a Lenovo Legion Y530 laptop, which I have 64 | really started liking as opposed to my earlier Macbook Airs. The Legion 65 | Y530 laptop has 2 graphic cards, which makes me favor Manjaro vs Arch, 66 | due to automatic hardware detection and drivers setup. 67 | 68 | These dotfiles expect a minimal Gnome setup with either Archlinux or 69 | Manjaro, but do allow setting up a tiling window manager - which I use 70 | primarily. The Gnome session is serves as a backup, if needed. 71 | 72 | ### Screenshots 73 | 74 | #### Home (with default wallpaper) 75 | 76 | ![desktop](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/desktop.png) 77 | 78 | #### This system is currently busy 79 | 80 | ![Busy](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/busy-sys.png) 81 | 82 | #### a nice app launcher 83 | 84 | ![launcher](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/launcher.png) 85 | 86 | #### my favorite alfred alternative 87 | 88 | ![run menu](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/rofi-run.png) 89 | 90 | #### a scratch terminal 91 | 92 | ![scratch terminal](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/scratch-term.png) 93 | 94 | #### rofi menu for all configured keybindings 95 | 96 | ![keybindings](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/rofi-custom.png) 97 | 98 | #### more directory colors 99 | 100 | ![dircolors](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/dircolors.png) 101 | 102 | #### and notifications 103 | 104 | ![notifications](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/notifications-v2-1.png) 105 | 106 | #### and a nice screen lock 107 | 108 | ![screen lock](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/screen-lock.png) 109 | 110 | #### Other goodies 111 | 112 | ##### icons hardcoded and also, autoguessed via font-awesome 113 | 114 | ![window icons](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/window-icons.png) 115 | 116 | ##### screencasts, screenshots, wallpaper changer and a real tray 117 | 118 | ![notifications](https://github.com/nikhgupta/dotfiles/raw/v4.0/screenshots/notification-area.png) 119 | -------------------------------------------------------------------------------- /Cursor/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "vsicons.dontShowNewVersionMessage": true, 3 | "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", 4 | "workbench.iconTheme": "vscode-icons", 5 | "workbench.colorTheme": "Catppuccin Macchiato", 6 | "workbench.editor.enablePreview": false, 7 | "workbench.startupEditor": "newUntitledFile", 8 | "editor.fontSize": 16, 9 | "editor.fontLigatures": true, 10 | "editor.suggestSelection": "first", 11 | "editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback','Font Awesome 5 Free', 'Font Awesome 5 Brands','FontAwesome'", 12 | "vim.useCtrlKeys": true, 13 | "customizeUI.titleBar": "inline", 14 | "customizeUI.activityBar": "wide", 15 | "customizeUI.statusBarPosition": "under-panel", 16 | "explorer.confirmDelete": false, 17 | "explorer.confirmDragAndDrop": false, 18 | "redhat.telemetry.enabled": false, 19 | "editor.formatOnSave": true, 20 | "files.associations": { 21 | "skhdrc": "editorconfig", 22 | "*.toml": "toml", 23 | "*.rhai": "rhai" 24 | }, 25 | "[scss]": { 26 | "editor.defaultFormatter": "vscode.css-language-features" 27 | }, 28 | "[javascript]": { 29 | "editor.tabSize": 2, 30 | "editor.defaultFormatter": "esbenp.prettier-vscode" 31 | }, 32 | "javascript.format.semicolons": "insert", 33 | "javascript.updateImportsOnFileMove.enabled": "always", 34 | "javascript.preferences.importModuleSpecifier": "relative", 35 | "javascript.preferences.importModuleSpecifierEnding": "minimal", 36 | "javascript.preferences.quoteStyle": "double", 37 | "javascript.referencesCodeLens.showOnAllFunctions": true, 38 | "javascript.suggest.paths": true, 39 | "prettier.printWidth": 120, 40 | "prettier.enable": true, 41 | "typescript.updateImportsOnFileMove.enabled": "never", 42 | "[json]": { 43 | "editor.defaultFormatter": "esbenp.prettier-vscode" 44 | }, 45 | "[python]": { 46 | "editor.defaultFormatter": "ms-python.autopep8", 47 | "editor.formatOnType": true 48 | }, 49 | "python.venvFolders": [".venv"], 50 | "python.languageServer": "Pylance", 51 | "python.venvPath": "~/.venv", 52 | "python.terminal.activateEnvInCurrentTerminal": true, 53 | "terminal.integrated.fontSize": 14, 54 | "security.workspace.trust.untrustedFiles": "open", 55 | "editor.minimap.enabled": false, 56 | "[ruby]": { 57 | "editor.tabSize": 2, 58 | "editor.defaultFormatter": "rubocop.vscode-rubocop" 59 | }, 60 | "[erb]": { 61 | "editor.defaultFormatter": "aliariff.vscode-erb-beautify" 62 | }, 63 | "vscode-erb-beautify.keepBlankLines": 1, 64 | "vscode-erb-beautify.tabStops": 4, 65 | "[typescript]": { 66 | "editor.defaultFormatter": "esbenp.prettier-vscode" 67 | }, 68 | "[typescriptreact]": { 69 | "editor.defaultFormatter": "esbenp.prettier-vscode" 70 | }, 71 | "[html]": { 72 | "editor.defaultFormatter": "vscode.html-language-features" 73 | }, 74 | "python.analysis.diagnosticMode": "workspace", 75 | "python.analysis.diagnosticSeverityOverrides": { 76 | "reportUnknownArgumentType": "information", 77 | "reportUnknownMemberType": "none", 78 | "reportUnknownParameterType": "information", 79 | "reportUnknownVariableType": "information", 80 | "reportMissingTypeStubs": "none", 81 | "reportUnusedImport": "information", 82 | "reportImportCycles": "information" 83 | }, 84 | "files.exclude": { 85 | "**/__pycache__/": true, 86 | "**/.vscode/": true 87 | }, 88 | "search.exclude": { 89 | "**/{tag,TAG,tags,TAGS}": true 90 | }, 91 | "vim.enableNeovim": true, 92 | "workbench.view.alwaysShowHeaderActions": true, 93 | "editor.inlineSuggest.enabled": true, 94 | "[markdown]": { 95 | "vim.textwidth": 80, 96 | "editor.formatOnSave": true, 97 | "editor.defaultFormatter": "DavidAnson.vscode-markdownlint" 98 | }, 99 | "git.enableSmartCommit": true, 100 | "editor.tabSize": 2, 101 | "python.analysis.typeCheckingMode": "strict", 102 | "ctagsSupport.ctagsFilename": "tags", 103 | "editor.foldingStrategy": "auto", 104 | "editor.defaultFoldingRangeProvider": "zokugun.explicit-folding", 105 | "explicitFolding.rules": { 106 | "*": { 107 | "begin": "{{{", 108 | "end": "}}}" 109 | } 110 | }, 111 | "beancount.mainBeanFile": "/Users/nikhgupta/OneDrive/Finances/beancount/personal/personal.beancount", 112 | "beancount.runFavaOnActivate": true, 113 | "beancount.separatorColumn": 60, 114 | "beancountFormatter.currencyColumn": 72, 115 | "[dockerfile]": { 116 | "editor.defaultFormatter": "ms-azuretools.vscode-docker" 117 | }, 118 | "[jsonc]": { 119 | "editor.defaultFormatter": "esbenp.prettier-vscode" 120 | }, 121 | "git.openRepositoryInParentFolders": "always", 122 | "[css]": { 123 | "editor.defaultFormatter": "esbenp.prettier-vscode" 124 | }, 125 | "jupyter.askForKernelRestart": false, 126 | "editor.wordWrap": "bounded", 127 | "editor.wordWrapColumn": 120, 128 | "svelte.enable-ts-plugin": true, 129 | "editor.inlayHints.enabled": "offUnlessPressed", 130 | "[svelte]": { 131 | "editor.defaultFormatter": "svelte.svelte-vscode" 132 | }, 133 | "cursor.cpp.disabledLanguages": ["plaintext", "scminput"], 134 | "workbench.settings.applyToAllProfiles": [], 135 | "vim.neovimConfigPath": "~/.config/nvim/init-old.vim" 136 | } 137 | -------------------------------------------------------------------------------- /cursor/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "vsicons.dontShowNewVersionMessage": true, 3 | "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", 4 | "workbench.iconTheme": "vscode-icons", 5 | "workbench.colorTheme": "Catppuccin Macchiato", 6 | "workbench.editor.enablePreview": false, 7 | "workbench.startupEditor": "newUntitledFile", 8 | "editor.fontSize": 16, 9 | "editor.fontLigatures": true, 10 | "editor.suggestSelection": "first", 11 | "editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback','Font Awesome 5 Free', 'Font Awesome 5 Brands','FontAwesome'", 12 | "vim.useCtrlKeys": true, 13 | "customizeUI.titleBar": "inline", 14 | "customizeUI.activityBar": "wide", 15 | "customizeUI.statusBarPosition": "under-panel", 16 | "explorer.confirmDelete": false, 17 | "explorer.confirmDragAndDrop": false, 18 | "redhat.telemetry.enabled": false, 19 | "editor.formatOnSave": true, 20 | "files.associations": { 21 | "skhdrc": "editorconfig", 22 | "*.toml": "toml", 23 | "*.rhai": "rhai" 24 | }, 25 | "[scss]": { 26 | "editor.defaultFormatter": "vscode.css-language-features" 27 | }, 28 | "[javascript]": { 29 | "editor.tabSize": 2, 30 | "editor.defaultFormatter": "esbenp.prettier-vscode" 31 | }, 32 | "javascript.format.semicolons": "insert", 33 | "javascript.updateImportsOnFileMove.enabled": "always", 34 | "javascript.preferences.importModuleSpecifier": "relative", 35 | "javascript.preferences.importModuleSpecifierEnding": "minimal", 36 | "javascript.preferences.quoteStyle": "double", 37 | "javascript.referencesCodeLens.showOnAllFunctions": true, 38 | "javascript.suggest.paths": true, 39 | "prettier.printWidth": 120, 40 | "prettier.enable": true, 41 | "typescript.updateImportsOnFileMove.enabled": "never", 42 | "[json]": { 43 | "editor.defaultFormatter": "esbenp.prettier-vscode" 44 | }, 45 | "[python]": { 46 | "editor.defaultFormatter": "ms-python.autopep8", 47 | "editor.formatOnType": true 48 | }, 49 | "python.venvFolders": [".venv"], 50 | "python.languageServer": "Pylance", 51 | "python.venvPath": "~/.venv", 52 | "python.terminal.activateEnvInCurrentTerminal": true, 53 | "terminal.integrated.fontSize": 14, 54 | "security.workspace.trust.untrustedFiles": "open", 55 | "editor.minimap.enabled": false, 56 | "[ruby]": { 57 | "editor.tabSize": 2, 58 | "editor.defaultFormatter": "rubocop.vscode-rubocop" 59 | }, 60 | "[erb]": { 61 | "editor.defaultFormatter": "aliariff.vscode-erb-beautify" 62 | }, 63 | "vscode-erb-beautify.keepBlankLines": 1, 64 | "vscode-erb-beautify.tabStops": 4, 65 | "[typescript]": { 66 | "editor.defaultFormatter": "esbenp.prettier-vscode" 67 | }, 68 | "[typescriptreact]": { 69 | "editor.defaultFormatter": "esbenp.prettier-vscode" 70 | }, 71 | "[html]": { 72 | "editor.defaultFormatter": "vscode.html-language-features" 73 | }, 74 | "python.analysis.diagnosticMode": "workspace", 75 | "python.analysis.diagnosticSeverityOverrides": { 76 | "reportUnknownArgumentType": "information", 77 | "reportUnknownMemberType": "none", 78 | "reportUnknownParameterType": "information", 79 | "reportUnknownVariableType": "information", 80 | "reportMissingTypeStubs": "none", 81 | "reportUnusedImport": "information", 82 | "reportImportCycles": "information" 83 | }, 84 | "files.exclude": { 85 | "**/__pycache__/": true, 86 | "**/.vscode/": true 87 | }, 88 | "search.exclude": { 89 | "**/{tag,TAG,tags,TAGS}": true 90 | }, 91 | "vim.enableNeovim": true, 92 | "workbench.view.alwaysShowHeaderActions": true, 93 | "editor.inlineSuggest.enabled": true, 94 | "[markdown]": { 95 | "vim.textwidth": 80, 96 | "editor.formatOnSave": true, 97 | "editor.defaultFormatter": "DavidAnson.vscode-markdownlint" 98 | }, 99 | "git.enableSmartCommit": true, 100 | "editor.tabSize": 2, 101 | "python.analysis.typeCheckingMode": "strict", 102 | "ctagsSupport.ctagsFilename": "tags", 103 | "editor.foldingStrategy": "auto", 104 | "editor.defaultFoldingRangeProvider": "zokugun.explicit-folding", 105 | "explicitFolding.rules": { 106 | "*": { 107 | "begin": "{{{", 108 | "end": "}}}" 109 | } 110 | }, 111 | "beancount.mainBeanFile": "/Users/nikhgupta/OneDrive/Finances/beancount/personal/personal.beancount", 112 | "beancount.runFavaOnActivate": true, 113 | "beancount.separatorColumn": 60, 114 | "beancountFormatter.currencyColumn": 72, 115 | "[dockerfile]": { 116 | "editor.defaultFormatter": "ms-azuretools.vscode-docker" 117 | }, 118 | "[jsonc]": { 119 | "editor.defaultFormatter": "esbenp.prettier-vscode" 120 | }, 121 | "git.openRepositoryInParentFolders": "always", 122 | "[css]": { 123 | "editor.defaultFormatter": "esbenp.prettier-vscode" 124 | }, 125 | "jupyter.askForKernelRestart": false, 126 | "editor.wordWrap": "bounded", 127 | "editor.wordWrapColumn": 120, 128 | "svelte.enable-ts-plugin": true, 129 | "editor.inlayHints.enabled": "offUnlessPressed", 130 | "[svelte]": { 131 | "editor.defaultFormatter": "svelte.svelte-vscode" 132 | }, 133 | "cursor.cpp.disabledLanguages": ["plaintext", "scminput"], 134 | "workbench.settings.applyToAllProfiles": [], 135 | "vim.neovimConfigPath": "~/.config/nvim/init-old.vim" 136 | } 137 | -------------------------------------------------------------------------------- /misc/.taskrc: -------------------------------------------------------------------------------- 1 | # [Created by task 2.6.2 2/5/2023 15:52:32] 2 | # Taskwarrior program configuration file. 3 | # For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color', 4 | # 'man task-sync' or 'man taskrc' 5 | # 6 | # read more: https://manpages.ubuntu.com/manpages/bionic/man5/taskrc.5.html 7 | 8 | include nord.theme 9 | news.version=2.6.0 10 | data.location=$HOME/Code/plaintxt/taskwarrior 11 | hooks.location=$HOME/Code/dotfiles/misc/.task/hooks 12 | 13 | # defaults 14 | next=4 15 | bulk=2 16 | due=7 17 | active.indicator=* 18 | tag.indicator=+ 19 | recurrence.indicator=R 20 | recurrence.limit=1 21 | confirmation=yes 22 | 23 | # others 24 | exit.on.missing.db=yes 25 | allow.empty.filter=no 26 | 27 | regex=on 28 | search.case.sensitive=no 29 | 30 | list.all.tags=yes 31 | list.all.projects=yes 32 | complete.all.tags=yes 33 | 34 | dateformat=d/m/Y 35 | dateformat.annotation=d/m/Y 36 | dateformat.report=d/m/Y 37 | weekstart=Monday 38 | displayweeknumber=true 39 | calendar.legend=false 40 | # dateformat.holiday=DMY 41 | 42 | # default.command=long 43 | default.command=next +READY limit:page 44 | 45 | # priorities 46 | default.priority=L 47 | uda.priority.values = H,M,,L 48 | 49 | # urgencies 50 | urgency.inherit = on 51 | urgency.tags.coefficient = 0 52 | urgency.project.coefficient = 0 53 | urgency.blocked.coefficient = -0.4 54 | urgency.blocking.coefficient = 0.4 55 | urgency.user.tag.iacm.coefficient = 2.0 56 | urgency.user.tag.health.coefficient = 2.4 57 | urgency.user.tag.dotfiles.coefficient = 0.8 58 | urgency.user.tag.capture.coefficient = 1.2 59 | urgency.user.tag.organize.coefficient = 1.2 60 | urgency.user.tag.code.coefficient = 0.8 61 | urgency.user.tag.mit.coefficient = 10 62 | urgency.user.project.work.coefficient = 1.8 63 | urgency.user.project.idea.coefficient = 1.2 64 | urgency.uda.priority.L.coefficient=0 65 | urgency.uda.priority..coefficient=1.0 66 | urgency.user.tag.next.coefficient=2.0 67 | 68 | # report used in summary view for other programs 69 | report.summarize.columns=id,priority,project,tags,description.count,urgency 70 | report.summarize.labels=ID,P,Project,Tags,Description,Urg 71 | report.summarize.sort=urgency- 72 | report.summarize.filter=+READY status:pending -BLOCKED limit:page 73 | 74 | # next report: don't show annotations 75 | report.next.columns=id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description.count,urgency 76 | 77 | # Ready report: don't show annotations. Don't show depends.indicator 78 | report.ready.columns=id,start.age,entry.age,priority,project,tags,recur.indicator,scheduled.countdown,due.relative,until.remaining,description.count,urgency 79 | report.ready.labels=ID,Active,Age,P,Project,Tags,R,S,Due,Until,Description,Urg 80 | 81 | # OMG completed report, don't show me annotations. 82 | report.completed.columns=id,uuid.short,entry,end,entry.age,depends,priority,project,tags,recur.indicator,due,description.count 83 | report.completed.labels=ID,UUID,Created,Completed,Age,Deps,P,Project,Tags,R,Due,Description 84 | 85 | # No. Nothing should show annotations. No. Also relative dates please. 86 | report.waiting.labels=ID,A,Age,D,P,Project,Tags,R,Waiting,Sched,Due,Until,Description 87 | report.waiting.columns=id,start.active,entry.age,depends.indicator,priority,project,tags,recur.indicator,wait.remaining,scheduled,due.relative,until,description.count 88 | report.waiting.sort=wait+,due+,entry+ 89 | 90 | # Let's make our own scheduled report. 91 | report.scheduled.description=Scheduled tasks 92 | report.scheduled.columns=id,start.age,entry.age,priority,project,tags,recur.indicator,scheduled.relative,due.relative,until.remaining,description.count,urgency 93 | report.scheduled.labels=ID,Active,Age,P,Project,Tags,R,S,Due,Until,Description,Urg 94 | report.scheduled.sort=scheduled 95 | report.scheduled.filter=+SCHEDULED -COMPLETED -DELETED 96 | 97 | # I never really got into the review system in `tasksh`, but here's the config from when I tried. 98 | uda.reviewed.type=date 99 | uda.reviewed.label=Reviewed 100 | report._reviewed.description=Tasksh review report. Adjust the filter to your needs. 101 | report._reviewed.columns=uuid 102 | report._reviewed.sort=reviewed+,modified+ 103 | report._reviewed.filter=( reviewed.none: or reviewed.before:now-12h ) and (+PENDING and -WAITING) 104 | 105 | # gimme just one thing to do 106 | report.top.description=The Top Task - Do it now! 107 | report.top.columns=id,project,due,description 108 | report.top.labels=ID,Project,Due,Description 109 | report.top.sort=urgency- 110 | report.top.filter=limit:1 status:pending -BLOCKED 111 | 112 | report.work.description="Work tasks" 113 | report.work.labels=ID,A,Age,D,P,Project,Tags,R,Waiting,Sched,Due,Until,Description 114 | report.work.columns=id,start.active,entry.age,depends.indicator,priority,project,tags,recur.indicator,wait.remaining,scheduled,due.relative,until,description.count 115 | report.work.sort=urgency- 116 | report.work.filter=pro:work status:pending -BLOCKED 117 | 118 | report.iacm.description="IACM tasks" 119 | report.iacm.labels=ID,A,Age,D,P,Project,Tags,R,Waiting,Sched,Due,Until,Description 120 | report.iacm.columns=id,start.active,entry.age,depends.indicator,priority,project,tags,recur.indicator,wait.remaining,scheduled,due.relative,until,description.count 121 | report.iacm.sort=urgency- 122 | report.iacm.filter=pro:work +iacm status:pending -BLOCKED 123 | 124 | report.idea.description="Idea based tasks" 125 | report.idea.labels=ID,A,Age,D,P,Project,Tags,R,Waiting,Sched,Due,Until,Description 126 | report.idea.columns=id,start.active,entry.age,depends.indicator,priority,project,tags,recur.indicator,wait.remaining,scheduled,due.relative,until,description.count 127 | report.idea.sort=urgency- 128 | report.idea.filter=pro:idea status:pending -BLOCKED 129 | -------------------------------------------------------------------------------- /misc/.encrypted/zshenv.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | 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 96 | =dAp9 97 | -----END PGP MESSAGE----- 98 | -------------------------------------------------------------------------------- /vim/.config/nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "CopilotChat.nvim": { "branch": "canary", "commit": "82923efe22b604cf9c0cad0bb2a74aa9247755ab" }, 3 | "LazyVim": { "branch": "main", "commit": "26e3e39f2eb1251841f5574f29c7eecb55fef816" }, 4 | "LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" }, 5 | "SchemaStore.nvim": { "branch": "main", "commit": "493250022db69edd8afe8e6d0f17105756a3b721" }, 6 | "aerial.nvim": { "branch": "master", "commit": "75de06f8edbd0006997a19b760045753d4f6693c" }, 7 | "bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" }, 8 | "catppuccin": { "branch": "main", "commit": "cc8e290d4c0d572171243087f8541e49be2c8764" }, 9 | "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, 10 | "cmp-git": { "branch": "main", "commit": "8dfbc33fb32c33e5c0be9dcc8176a4f4d395f95e" }, 11 | "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, 12 | "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, 13 | "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, 14 | "conform.nvim": { "branch": "master", "commit": "07d1298739cd7c616cb683bfd848f6b369f93297" }, 15 | "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, 16 | "copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" }, 17 | "crates.nvim": { "branch": "main", "commit": "0c8436cb10e9ac62354baa5874a4a3413f2432c1" }, 18 | "dashboard-nvim": { "branch": "master", "commit": "5346d023afc4bfc7ff63d05c70bcdb0784bb657a" }, 19 | "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, 20 | "dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" }, 21 | "flash.nvim": { "branch": "main", "commit": "43f67935d388fbb540f8b40e8cbfd80de54f978a" }, 22 | "friendly-snippets": { "branch": "main", "commit": "700c4a25caacbb4648c9a27972c2fe203948e0c2" }, 23 | "gitsigns.nvim": { "branch": "main", "commit": "4a143f13e122ab91abdc88f89eefbe70a4858a56" }, 24 | "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, 25 | "headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" }, 26 | "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, 27 | "lazy.nvim": { "branch": "main", "commit": "fafe1f7c640aed75e70a10e6649612cd96f39149" }, 28 | "lazydev.nvim": { "branch": "main", "commit": "7cbb524c85f87017df9c1ea2377a1d840ad8ed51" }, 29 | "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, 30 | "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, 31 | "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, 32 | "mason-lspconfig.nvim": { "branch": "main", "commit": "8db12610bcb7ce67013cfdfaba4dd47a23c6e851" }, 33 | "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, 34 | "mini.ai": { "branch": "main", "commit": "a7e90f110e6274262616311b93cef12cd2667a2d" }, 35 | "mini.comment": { "branch": "main", "commit": "c8406379987c321ecdef9f53e1ca741a55002104" }, 36 | "mini.pairs": { "branch": "main", "commit": "40261dfcec7623cd57be3c3beb50fa73f2650cdf" }, 37 | "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, 38 | "neogen": { "branch": "main", "commit": "6de0add4805165317ab7d3d36b5cef48b1b865f3" }, 39 | "neogit": { "branch": "master", "commit": "71eb98630b5cb2277636fdccc74a7358e910c01b" }, 40 | "noice.nvim": { "branch": "main", "commit": "e5cb20c6e14305d24025ecb77d7d4dd9d61f1a64" }, 41 | "none-ls.nvim": { "branch": "main", "commit": "8691504118b252d64fc5023a104aedd100ab754a" }, 42 | "nord": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" }, 43 | "nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" }, 44 | "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, 45 | "nvim-lint": { "branch": "master", "commit": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce" }, 46 | "nvim-lspconfig": { "branch": "master", "commit": "4d38bece98300e3e5cd24a9aa0d0ebfea4951c16" }, 47 | "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, 48 | "nvim-spectre": { "branch": "master", "commit": "ec67d4b5370094b923dfcf6b09b39142f2964861" }, 49 | "nvim-treesitter": { "branch": "master", "commit": "9a7ad2ff7a7ea81016aca2fc89c9b2c1a5365421" }, 50 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, 51 | "nvim-ts-autotag": { "branch": "main", "commit": "2692808eca8a4ac3311516a1c4a14bb97ecc6482" }, 52 | "nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" }, 53 | "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, 54 | "octo.nvim": { "branch": "master", "commit": "22f34582a4eb1fb221eafd0daa9eb1b2bacfb813" }, 55 | "persistence.nvim": { "branch": "main", "commit": "5fe077056c821aab41f87650bd6e1c48cd7dd047" }, 56 | "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, 57 | "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, 58 | "rose-pine": { "branch": "main", "commit": "8c4660cfe697621bcc61d37b3651ffed94fe7fed" }, 59 | "rustaceanvim": { "branch": "master", "commit": "2fa45427c01ded4d3ecca72e357f8a60fd8e46d4" }, 60 | "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, 61 | "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, 62 | "telescope.nvim": { "branch": "master", "commit": "f12b15e1b3a33524eb06a1ae7bc852fb1fd92197" }, 63 | "todo-comments.nvim": { "branch": "main", "commit": "9c104cf7868f1c739b43a07e5593666cc9de2d67" }, 64 | "tokyonight.nvim": { "branch": "main", "commit": "0283787031ef9878a2b80300de0d22e938771998" }, 65 | "trouble.nvim": { "branch": "main", "commit": "5e45bb78f8da3444d35616934c180fce3742c439" }, 66 | "ts-comments.nvim": { "branch": "main", "commit": "c075b4ee00f6e111b44bf99a8cfd5a4cfce9258a" }, 67 | "venv-selector.nvim": { "branch": "regexp", "commit": "d946b1e86212f38ff9c42e3b622a8178bbc93461" }, 68 | "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, 69 | "vim-dadbod-completion": { "branch": "master", "commit": "5d5ad196fcde223509d7dabbade0148f7884c5e3" }, 70 | "vim-dadbod-ui": { "branch": "master", "commit": "0dc68d9225a70d42f8645049482e090c1a8dce25" }, 71 | "vim-fugitive": { "branch": "master", "commit": "64d6cafb9dcbacce18c26d7daf617ebb96b273f3" }, 72 | "vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" }, 73 | "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, 74 | "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, 75 | "which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" }, 76 | "yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" } 77 | } -------------------------------------------------------------------------------- /vim/.config/nvim/lua/plugins/example.lua: -------------------------------------------------------------------------------- 1 | -- since this is just an example spec, don't actually load anything here and return an empty spec 2 | -- stylua: ignore 3 | if true then return {} end 4 | 5 | -- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim 6 | -- 7 | -- In your plugin files, you can: 8 | -- * add extra plugins 9 | -- * disable/enabled LazyVim plugins 10 | -- * override the configuration of LazyVim plugins 11 | return { 12 | -- add gruvbox 13 | { "ellisonleao/gruvbox.nvim" }, 14 | 15 | -- Configure LazyVim to load gruvbox 16 | { 17 | "LazyVim/LazyVim", 18 | opts = { 19 | colorscheme = "gruvbox", 20 | }, 21 | }, 22 | 23 | -- change trouble config 24 | { 25 | "folke/trouble.nvim", 26 | -- opts will be merged with the parent spec 27 | opts = { use_diagnostic_signs = true }, 28 | }, 29 | 30 | -- disable trouble 31 | { "folke/trouble.nvim", enabled = false }, 32 | 33 | -- override nvim-cmp and add cmp-emoji 34 | { 35 | "hrsh7th/nvim-cmp", 36 | dependencies = { "hrsh7th/cmp-emoji" }, 37 | ---@param opts cmp.ConfigSchema 38 | opts = function(_, opts) 39 | table.insert(opts.sources, { name = "emoji" }) 40 | end, 41 | }, 42 | 43 | -- change some telescope options and a keymap to browse plugin files 44 | { 45 | "nvim-telescope/telescope.nvim", 46 | keys = { 47 | -- add a keymap to browse plugin files 48 | -- stylua: ignore 49 | { 50 | "fp", 51 | function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, 52 | desc = "Find Plugin File", 53 | }, 54 | }, 55 | -- change some options 56 | opts = { 57 | defaults = { 58 | layout_strategy = "horizontal", 59 | layout_config = { prompt_position = "top" }, 60 | sorting_strategy = "ascending", 61 | winblend = 0, 62 | }, 63 | }, 64 | }, 65 | 66 | -- add pyright to lspconfig 67 | { 68 | "neovim/nvim-lspconfig", 69 | ---@class PluginLspOpts 70 | opts = { 71 | ---@type lspconfig.options 72 | servers = { 73 | -- pyright will be automatically installed with mason and loaded with lspconfig 74 | pyright = {}, 75 | }, 76 | }, 77 | }, 78 | 79 | -- add tsserver and setup with typescript.nvim instead of lspconfig 80 | { 81 | "neovim/nvim-lspconfig", 82 | dependencies = { 83 | "jose-elias-alvarez/typescript.nvim", 84 | init = function() 85 | require("lazyvim.util").lsp.on_attach(function(_, buffer) 86 | -- stylua: ignore 87 | vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) 88 | vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) 89 | end) 90 | end, 91 | }, 92 | ---@class PluginLspOpts 93 | opts = { 94 | ---@type lspconfig.options 95 | servers = { 96 | -- tsserver will be automatically installed with mason and loaded with lspconfig 97 | tsserver = {}, 98 | }, 99 | -- you can do any additional lsp server setup here 100 | -- return true if you don't want this server to be setup with lspconfig 101 | ---@type table 102 | setup = { 103 | -- example to setup with typescript.nvim 104 | tsserver = function(_, opts) 105 | require("typescript").setup({ server = opts }) 106 | return true 107 | end, 108 | -- Specify * to use this function as a fallback for any server 109 | -- ["*"] = function(server, opts) end, 110 | }, 111 | }, 112 | }, 113 | 114 | -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, 115 | -- treesitter, mason and typescript.nvim. So instead of the above, you can use: 116 | { import = "lazyvim.plugins.extras.lang.typescript" }, 117 | 118 | -- add more treesitter parsers 119 | { 120 | "nvim-treesitter/nvim-treesitter", 121 | opts = { 122 | ensure_installed = { 123 | "bash", 124 | "html", 125 | "javascript", 126 | "json", 127 | "lua", 128 | "markdown", 129 | "markdown_inline", 130 | "python", 131 | "query", 132 | "regex", 133 | "tsx", 134 | "typescript", 135 | "vim", 136 | "yaml", 137 | }, 138 | }, 139 | }, 140 | 141 | -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above 142 | -- would overwrite `ensure_installed` with the new value. 143 | -- If you'd rather extend the default config, use the code below instead: 144 | { 145 | "nvim-treesitter/nvim-treesitter", 146 | opts = function(_, opts) 147 | -- add tsx and treesitter 148 | vim.list_extend(opts.ensure_installed, { 149 | "tsx", 150 | "typescript", 151 | }) 152 | end, 153 | }, 154 | 155 | -- the opts function can also be used to change the default opts: 156 | { 157 | "nvim-lualine/lualine.nvim", 158 | event = "VeryLazy", 159 | opts = function(_, opts) 160 | table.insert(opts.sections.lualine_x, "😄") 161 | end, 162 | }, 163 | 164 | -- or you can return new options to override all the defaults 165 | { 166 | "nvim-lualine/lualine.nvim", 167 | event = "VeryLazy", 168 | opts = function() 169 | return { 170 | --[[add your custom lualine config here]] 171 | } 172 | end, 173 | }, 174 | 175 | -- use mini.starter instead of alpha 176 | { import = "lazyvim.plugins.extras.ui.mini-starter" }, 177 | 178 | -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc 179 | { import = "lazyvim.plugins.extras.lang.json" }, 180 | 181 | -- add any tools you want to have installed below 182 | { 183 | "williamboman/mason.nvim", 184 | opts = { 185 | ensure_installed = { 186 | "stylua", 187 | "shellcheck", 188 | "shfmt", 189 | "flake8", 190 | }, 191 | }, 192 | }, 193 | 194 | -- Use for completion and snippets (supertab) 195 | { 196 | "hrsh7th/nvim-cmp", 197 | dependencies = { 198 | "hrsh7th/cmp-emoji", 199 | }, 200 | ---@param opts cmp.ConfigSchema 201 | opts = function(_, opts) 202 | local has_words_before = function() 203 | unpack = unpack or table.unpack 204 | local line, col = unpack(vim.api.nvim_win_get_cursor(0)) 205 | return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil 206 | end 207 | 208 | local cmp = require("cmp") 209 | 210 | opts.mapping = vim.tbl_extend("force", opts.mapping, { 211 | [""] = cmp.mapping(function(fallback) 212 | if cmp.visible() then 213 | cmp.select_next_item() 214 | elseif vim.snippet.active({ direction = 1 }) then 215 | vim.schedule(function() 216 | vim.snippet.jump(1) 217 | end) 218 | elseif has_words_before() then 219 | cmp.complete() 220 | else 221 | fallback() 222 | end 223 | end, { "i", "s" }), 224 | [""] = cmp.mapping(function(fallback) 225 | if cmp.visible() then 226 | cmp.select_prev_item() 227 | elseif vim.snippet.active({ direction = -1 }) then 228 | vim.schedule(function() 229 | vim.snippet.jump(-1) 230 | end) 231 | else 232 | fallback() 233 | end 234 | end, { "i", "s" }), 235 | }) 236 | end, 237 | }, 238 | } 239 | -------------------------------------------------------------------------------- /_copied/.gitconfig: -------------------------------------------------------------------------------- 1 | [core] 2 | # nano is set as default, but when running the bootstrap it is changed to $EDITOR 3 | editor = nvim 4 | pager = "less -FRSX" 5 | filemode = true 6 | logallrefupdates = true 7 | whitespace = "space-before-tab, trailing-space" 8 | excludesfile = /Users/nikhgupta/.gitignore 9 | 10 | [status] 11 | relativePaths = false 12 | 13 | [apply] 14 | whitespace = nowarn 15 | 16 | [branch] 17 | autosetupmerge = true 18 | 19 | [diff] 20 | renames = copies 21 | mnemonicprefix = true 22 | algorithm = patience 23 | 24 | [sendemail] 25 | smtpserver = "smtp.gmail.com" 26 | smtpserverport = 587 27 | smtpencryption = tls 28 | 29 | [diff] 30 | tool = vimdiff 31 | 32 | [merge] 33 | tool = vimdiff 34 | summary = true 35 | verbosity = 1 36 | 37 | [difftool] 38 | prompt = false 39 | 40 | [mergetool] 41 | prompt = false 42 | keepbackup = false 43 | 44 | [push] 45 | default = current 46 | 47 | [help] 48 | browser = open 49 | 50 | [color] 51 | pager = true 52 | ui = auto 53 | status = auto 54 | diff = auto 55 | branch = auto 56 | showBranch = auto 57 | interactive = auto 58 | grep = auto 59 | 60 | [color "status"] 61 | header = black bold 62 | branch = cyan 63 | nobranch = red 64 | unmerged = red 65 | untracked = cyan 66 | added = green 67 | changed = red bold 68 | 69 | [color "diff"] 70 | meta = red bold 71 | frag = black bold 72 | func = blue 73 | old = red strike 74 | new = green 75 | commit = blue 76 | whitespace = red 77 | context = normal 78 | 79 | [color "branch"] 80 | current = cyan 81 | local = blue 82 | remote = magenta 83 | upstream = magenta 84 | plain = normal 85 | 86 | [color "decorate"] 87 | branch = blue 88 | remoteBranch = magenta 89 | tag = magenta 90 | stash = cyan 91 | HEAD = blue 92 | 93 | [color "interactive"] 94 | prompt = red 95 | header = red bold 96 | error = red 97 | help = black bold 98 | 99 | [color "grep"] 100 | context = normal 101 | match = cyan 102 | filename = blue 103 | function = blue 104 | selected = normal 105 | separator = red bold 106 | linenumber = normal 107 | 108 | [rerere] 109 | enabled = 1 110 | 111 | [format] 112 | pretty = format:%C(green)%ad%Creset %C(red)%h%C(yellow)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset 113 | 114 | [gist] 115 | private = no 116 | browse = no 117 | extension = rb 118 | 119 | [alias] 120 | a = add 121 | chunkyadd = add --patch # stage commits chunk by chunk 122 | c = commit -m # commit with message 123 | ca = commit -am # commit all with message 124 | ci = commit # commit 125 | cp = cherry-pick -x # grab a change from a branch 126 | b = branch -v 127 | r = remote -v # show remotes (verbose) 128 | co = checkout # checkout 129 | nb = checkout -b # create and switch to a new branch 130 | s = status -sb -uno --ignore-submodules=untracked # simple status 131 | sa = status -sb --ignore-submodules=untracked # simple status, all files 132 | st = status 133 | t = tag -n # show tags with lines of each tag message 134 | uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state 135 | 136 | # Find commits by source code 137 | fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" 138 | # Find commits by commit message 139 | fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" 140 | 141 | # Diff 142 | d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat" 143 | # `git di $number` shows the diff between the state `$number` revisions ago and the current state 144 | di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" 145 | dc = diff --cached # diff staged changes 146 | 147 | # Pull in remote changes for the current repository and all its submodules 148 | p = !"git pull; git submodule foreach git pull origin master" 149 | 150 | # Interactive rebase with the given number of latest commits 151 | reb = "!r() { git rebase -i HEAD~$1; }; r" 152 | rc = rebase --continue # continue rebase 153 | rs = rebase --skip # skip rebase 154 | 155 | # generate ctags, quickly 156 | ctags = ![[ -f ./.git/hooks/ctags ]] && ./.git/hooks/ctags || echo 'No ctags hook found.' 157 | 158 | # git flow 159 | new = !git pull origin develop && git flow feature start 160 | done = !git pull origin develop && git flow feature finish "$(git symbolic-ref --short HEAD | sed -n 's/^feature\\///p')" 161 | go = !git checkout $1 && pull 162 | master = !git checkout master && pull 163 | develop = !git checkout develop && pull 164 | mmm = !git fetch origin master && git rebase origin/master 165 | ddd = !git fetch origin develop && git rebase origin/develop 166 | 167 | # via http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/ 168 | snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}" 169 | snapshots = !git stash list --grep snapshot 170 | 171 | #via http://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit 172 | recent-branches = !git for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(refname:short)' 173 | 174 | # logs 175 | l = log --graph --date=short 176 | short = log --pretty=format:\"%h %cr %Cgreen%s%Creset %cn\" 177 | simple = log --pretty=format:\" * %s\" 178 | shortnocolor = log --pretty=format:\"%h %cr %s %cn\" 179 | recent = log --pretty=oneline --abbrev-commit --max-count=15 180 | changes = log --graph --pretty=format:\"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\" --abbrev-commit --date=relative 181 | 182 | [advice] 183 | statusHints = false 184 | [diff] 185 | # Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject 186 | # instead of a/b/c/d as prefixes for patches 187 | mnemonicprefix = true 188 | algorithm = patience 189 | [rerere] 190 | # Remember my merges 191 | # http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/ 192 | enabled = true 193 | [include] 194 | path = .gitconfig.user 195 | 196 | [ghi "highlight"] 197 | style = colorful 198 | 199 | [init] 200 | templatedir = ~/.git-template 201 | defaultBranch = main 202 | 203 | [url "https://bitbucket.org/"] 204 | insteadOf = bb: 205 | 206 | [url "https://github.com/"] 207 | insteadOf = gh: 208 | 209 | [url "https://gist.github.com/"] 210 | insteadOf = gist: 211 | [commit] 212 | gpgSign = true 213 | template = /Users/nikhgupta/.stCommitMsg 214 | [gpg] 215 | program = /opt/homebrew/bin/gpg 216 | 217 | [instaweb] 218 | local = true 219 | httpd = python 220 | port = 4321 221 | browser = $BROWSER 222 | [difftool "sourcetree"] 223 | cmd = opendiff \"$LOCAL\" \"$REMOTE\" 224 | path = 225 | [mergetool "sourcetree"] 226 | cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" 227 | trustExitCode = true 228 | [filter "lfs"] 229 | clean = git-lfs clean -- %f 230 | smudge = git-lfs smudge -- %f 231 | process = git-lfs filter-process 232 | required = true 233 | [credential] 234 | helper = store 235 | [safe] 236 | directory = /Users/nikhgupta/OneDrive/LifeOS/PlainTxt 237 | 238 | [includeIf "gitdir/i:~/Code/LunchBox/"] 239 | path = ~/Code/Lunchbox/.gitconfig 240 | -------------------------------------------------------------------------------- /terminal/.tmux.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Configuration inside `~/.tmux.conf` is used by `tmux` program, and 3 | # can be used to define various configurations for it. This configuration 4 | # attempts to add vimification, as well as easier navigation and looks for 5 | # tmux. 6 | # 7 | 8 | # run-shell "which kitty &>/dev/null && kitty @ set-spacing padding=0" 9 | 10 | # default termtype. ZSH plugin 'tmux', also, sets this value. 11 | # set -g default-terminal screen-256color 12 | # set-option -g default-terminal screen-256color 13 | set -g default-terminal "screen-256color" 14 | set-option -ga terminal-overrides ",screen-256color:Tc" 15 | 16 | # ring the bell if any background window rang a bell 17 | set -g bell-action any 18 | set -g visual-bell off 19 | 20 | # use vi keybindings for tmux commandline input. 21 | # NOTE: To get command mode, hit ESC twice. 22 | set -g status-keys vi 23 | 24 | # use vi keybindings in copy and choice modes 25 | set -gw mode-keys vi 26 | 27 | # set first window to index 1 (not 0) to map more to the keyboard layout 28 | set -g base-index 1 29 | set -gw pane-base-index 1 30 | 31 | # no escape time for vi mode 32 | set -gs escape-time 0 33 | 34 | # bigger history 35 | set -g history-limit 20000 36 | 37 | # allow mouse click to select panes, scroll, etc. 38 | setw -g mouse on 39 | set-option -g focus-events on 40 | # set -g mouse-select-pane on 41 | # set -gw mode-mouse on 42 | 43 | # use `^o` as tmux prefix 44 | unbind-key C-b 45 | set -g prefix C-o 46 | 47 | # allow sending tmux commands to inner mutiplexer via `^o a` 48 | bind-key a send-prefix 49 | 50 | # detach from the tmux client with a simple `^o ^d` 51 | bind-key ^D detach-client 52 | 53 | # jump to last window with `^o ^o` 54 | unbind-key l # default: last-window 55 | bind-key C-o last-window 56 | 57 | # new windows should be created within PWD 58 | bind-key c new-window -c "#{pane_current_path}" 59 | bind-key C-c new-window -c "#{pane_current_path}" 60 | 61 | # create splits and vertical splits 62 | unbind-key % 63 | unbind-key _ 64 | unbind-key | 65 | 66 | bind-key | split-window -h -c "#{pane_current_path}" 67 | bind-key _ split-window -v -c "#{pane_current_path}" 68 | bind-key ^V split-window -h -c "#{pane_current_path}" 69 | bind-key ^S split-window -v -c "#{pane_current_path}" 70 | 71 | # resize panes easily using vi bindings 72 | # mapped to Shift-Ctrl- in iTerm. 73 | bind-key -r H resize-pane -L 5 74 | bind-key -r J resize-pane -D 5 75 | bind-key -r K resize-pane -U 5 76 | bind-key -r L resize-pane -R 5 77 | 78 | # easily toggle synchronization 79 | # sends input to all panes in a given window. 80 | bind-key ^E setw synchronize-panes on \; display " Turning on all-pane sync.." 81 | bind-key ^L setw synchronize-panes off \; display " Turned off all-pane sync." 82 | 83 | # force a reload of the config file 84 | unbind r # default: refresh-client 85 | # bind r source-file ~/.tmux.conf \; display " Reloaded!" \; refresh-client 86 | bind r source-file ~/.tmux.conf 87 | 88 | # rename a window easily 89 | bind-key ^R command-prompt "rename-window %%" 90 | 91 | # connect to a SSH session easily 92 | bind-key S command-prompt -p ssh: "new-window -n %1 'ssh %1'" 93 | 94 | # Better defaults for moving and renaming windows 95 | # bind-key , previous-window 96 | # bind-key . next-window 97 | # bind-key m move-window 98 | # bind-key n command-prompt "rename-window %%" 99 | 100 | # Use Vi-style keys for copying and pasting 101 | # unbind-key v 102 | # bind-key v copy-mode 103 | # unbind-key p 104 | # bind-key p paste-buffer 105 | 106 | # pane movement 107 | bind-key h resize-pane -Z 108 | bind-key ^M resize-pane -Z 109 | bind-key j command-prompt -p "join pane from:" "join-pane -hs '%%'" 110 | bind-key s command-prompt -p "send pane to:" "join-pane -ht '%%'" 111 | 112 | # messages should be displayed in a distinctive bg color to notice them easily 113 | # bg: blue, fg: white 114 | set -g message-command-style fg=colour0,bg=colour4 115 | # set -g message-style fg=colour0,bg=colour2 116 | # set -g message-attr bold 117 | 118 | # pane borders should distinguish between active and inactive panes 119 | # set -g pane-border-style fg=colour5 120 | # set -g pane-active-border-style fg=colour2 121 | set -g pane-border-style 'bg=#24273a,fg=#6e738d' 122 | set -g pane-active-border-style 'bg=#24273a,fg=#b7bdf8' 123 | 124 | # have a beautiful statusline that mimics vim airline 125 | set -g status on 126 | # set -g status-style bg=colour214,none 127 | set -g status-style 'bg=#181926,fg=#c6a0f6' 128 | set -g status-justify left 129 | set -g status-interval 30 130 | set -g status-left-style none 131 | set -g status-right-style none 132 | set -g status-left-length 100 133 | set -g status-right-length 100 134 | set -g status-position bottom 135 | 136 | if-shell 'test -n "$SSH_CLIENT"' \ 137 | 'set -g status-position top' 138 | 139 | 140 | set -gw main-pane-width 100 141 | set -gw main-pane-height 36 142 | set -gw aggressive-resize on 143 | set -gw window-status-separator " " 144 | 145 | # show a beautiful powerline and display a notification when `prefix` is typed 146 | set -g status-left "#[bg=colour#{?client_prefix,1,3},fg=#181926] #S #[bg=#181926,fg=colour#{?client_prefix,1,3},none] " 147 | set -g status-right "#[fg=colour#{?client_prefix,1,3},bg=#181926,none]#[fg=#181926,bg=colour#{?client_prefix,1,3}] %d/%m/%Y %H:%M #[fg=#181926,bg=colour#{?client_prefix,1,3},none]#[bg=#2427a,fg=colour3,none]" 148 | # set -g status-left "#[bg=colour#{?client_prefix,1,3},fg=colour0] tmux  #S #[bg=colour241,fg=colour#{?client_prefix,1,3},none]" 149 | # set -g status-right "#[fg=colour#{?client_prefix,1,3},bg=colour241,none]#[fg=colour0,bg=colour#{?client_prefix,1,3}] %Y-%m-%d  %H:%M #[fg=colour19,bg=colour#{?client_prefix,1,3},none]#[bg=colour19,fg=colour20] #($DOTCASTLE/tmux/status_line battery) #[bg=colour19,fg=colour#{?client_prefix,1,3},none]#[bg=colour#{?client_prefix,1,3},fg=colour0] #h  #(curl http://ipecho.net/plain || echo 'OFFLINE') " 150 | # set -gw window-status-format "#[bg=colour241]#[fg=colour21]#I#[fg=colour19]#[fg=colour20]#W" 151 | set -gw window-status-format "#[bg=#181926]#[fg=#{?client_prefix,1,3}]#I #[fg=#181926]#[fg=#{?client_prefix,1,3}]#W#[fg=#{?client_prefix,1,3}] " 152 | set -gw window-status-current-format "#[bg=#{?client_prefix,1,3},fg=#181926,none]#[fg=#181926,bg=#{?client_prefix,1,3}] #I  #W #[fg=#{?client_prefix,1,3},bg=#181926,none]" 153 | 154 | set -wg mode-style 'bg=cyan,fg=black' 155 | set -g message-style 'bg=black,fg=cyan' 156 | set -g clock-mode-colour cyan 157 | # set-window-option -g window-status-current-bg '#1E272C' 158 | # set-window-option -g window-status-current-fg cyan 159 | 160 | # patch for OS X pbpaste and pbcopy under tmux. 161 | set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL" 162 | if-shell "[ -f ~/.tmux.conf.user ]" 'source ~/.tmux.conf.user' 163 | 164 | # tmuxinator fix 165 | set-environment -gu BUNDLE_BIN_PATH 166 | set-environment -gu BUNDLE_GEMFILE 167 | set-environment -gu GEM_HOME 168 | set-environment -gu GEM_PATH 169 | set-environment -gu RUBYLIB 170 | set-environment -gu RUBYOPT 171 | 172 | # Smart pane switching with awareness of Vim splits. 173 | # See: https://github.com/christoomey/vim-tmux-navigator 174 | is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ 175 | | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'" 176 | bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' 177 | bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' 178 | bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' 179 | bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' 180 | tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' 181 | if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ 182 | "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" 183 | if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ 184 | "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" 185 | bind-key -T copy-mode-vi 'C-h' select-pane -L 186 | bind-key -T copy-mode-vi 'C-j' select-pane -D 187 | bind-key -T copy-mode-vi 'C-k' select-pane -U 188 | bind-key -T copy-mode-vi 'C-l' select-pane -R 189 | bind-key -T copy-mode-vi 'C-\' select-pane -l 190 | -------------------------------------------------------------------------------- /misc/.config/mpv/input.conf: -------------------------------------------------------------------------------- 1 | # mpv keybindings 2 | # 3 | # Location of user-defined bindings: ~/.config/mpv/input.conf 4 | # 5 | # Lines starting with # are comments. Use SHARP to assign the # key. 6 | # Copy this file and uncomment and edit the bindings you want to change. 7 | # 8 | # List of commands and further details: DOCS/man/input.rst 9 | # List of special keys: --input-keylist 10 | # Keybindings testing mode: mpv --input-test --force-window --idle 11 | # 12 | # Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore'). 13 | # 14 | # Strings need to be quoted and escaped: 15 | # KEY show-text "This is a single backslash: \\ and a quote: \" !" 16 | # 17 | # You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with 18 | # the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal). 19 | # 20 | # The default keybindings are hardcoded into the mpv binary. 21 | # You can disable them completely with: --no-input-default-bindings 22 | 23 | # Developer note: 24 | # On compilation, this file is baked into the mpv binary, and all lines are 25 | # uncommented (unless '#' is followed by a space) - thus this file defines the 26 | # default key bindings. 27 | 28 | # If this is enabled, treat all the following bindings as default. 29 | #default-bindings start 30 | 31 | #MBTN_LEFT ignore # don't do anything 32 | #MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen on/off 33 | #MBTN_RIGHT cycle pause # toggle pause on/off 34 | #MBTN_BACK playlist-prev 35 | #MBTN_FORWARD playlist-next 36 | 37 | # Mouse wheels, touchpad or other input devices that have axes 38 | # if the input devices supports precise scrolling it will also scale the 39 | # numeric value accordingly 40 | #WHEEL_UP seek 10 41 | #WHEEL_DOWN seek -10 42 | #WHEEL_LEFT add volume -2 43 | #WHEEL_RIGHT add volume 2 44 | 45 | ## Seek units are in seconds, but note that these are limited by keyframes 46 | #RIGHT seek 5 47 | #LEFT seek -5 48 | #UP seek 60 49 | #DOWN seek -60 50 | # Do smaller, always exact (non-keyframe-limited), seeks with shift. 51 | # Don't show them on the OSD (no-osd). 52 | #Shift+RIGHT no-osd seek 1 exact 53 | #Shift+LEFT no-osd seek -1 exact 54 | #Shift+UP no-osd seek 5 exact 55 | #Shift+DOWN no-osd seek -5 exact 56 | # Skip to previous/next subtitle (subject to some restrictions; see manpage) 57 | #Ctrl+LEFT no-osd sub-seek -1 58 | #Ctrl+RIGHT no-osd sub-seek 1 59 | # Adjust timing to previous/next subtitle 60 | #Ctrl+Shift+LEFT sub-step -1 61 | #Ctrl+Shift+RIGHT sub-step 1 62 | # Move video rectangle 63 | #Alt+left add video-pan-x 0.1 64 | #Alt+right add video-pan-x -0.1 65 | #Alt+up add video-pan-y 0.1 66 | #Alt+down add video-pan-y -0.1 67 | # Zoom/unzoom video 68 | #Alt++ add video-zoom 0.1 69 | #Alt+- add video-zoom -0.1 70 | # Reset video zoom/pan settings 71 | #Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 72 | #PGUP add chapter 1 # skip to next chapter 73 | #PGDWN add chapter -1 # skip to previous chapter 74 | #Shift+PGUP seek 600 75 | #Shift+PGDWN seek -600 76 | #[ multiply speed 1/1.1 # scale playback speed 77 | #] multiply speed 1.1 78 | #{ multiply speed 0.5 79 | #} multiply speed 2.0 80 | #BS set speed 1.0 # reset speed to normal 81 | #Shift+BS revert-seek # undo previous (or marked) seek 82 | #Shift+Ctrl+BS revert-seek mark # mark position for revert-seek 83 | #q quit 84 | #Q quit-watch-later 85 | #q {encode} quit 4 86 | #ESC set fullscreen no 87 | #ESC {encode} quit 4 88 | #p cycle pause # toggle pause/playback mode 89 | #. frame-step # advance one frame and pause 90 | #, frame-back-step # go back by one frame and pause 91 | #SPACE cycle pause 92 | #> playlist-next # skip to next file 93 | #ENTER playlist-next # skip to next file 94 | #< playlist-prev # skip to previous file 95 | #O no-osd cycle-values osd-level 3 1 # cycle through OSD mode 96 | #o show-progress 97 | #P show-progress 98 | #i script-binding stats/display-stats 99 | #I script-binding stats/display-stats-toggle 100 | #` script-binding console/enable 101 | #z add sub-delay -0.1 # subtract 100 ms delay from subs 102 | #Z add sub-delay +0.1 # add 103 | #x add sub-delay +0.1 # same as previous binding (discouraged) 104 | #ctrl++ add audio-delay 0.100 # this changes audio/video sync 105 | #ctrl+- add audio-delay -0.100 106 | #Shift+g add sub-scale +0.1 # increase subtitle font size 107 | #Shift+f add sub-scale -0.1 # decrease subtitle font size 108 | #9 add volume -2 109 | #/ add volume -2 110 | #0 add volume 2 111 | #* add volume 2 112 | #m cycle mute 113 | #1 add contrast -1 114 | #2 add contrast 1 115 | #3 add brightness -1 116 | #4 add brightness 1 117 | #5 add gamma -1 118 | #6 add gamma 1 119 | #7 add saturation -1 120 | #8 add saturation 1 121 | #Alt+0 set window-scale 0.5 122 | #Alt+1 set window-scale 1.0 123 | #Alt+2 set window-scale 2.0 124 | # toggle deinterlacer (automatically inserts or removes required filter) 125 | #d cycle deinterlace 126 | #r add sub-pos -1 # move subtitles up 127 | #R add sub-pos +1 # down 128 | #t add sub-pos +1 # same as previous binding (discouraged) 129 | #v cycle sub-visibility 130 | # stretch SSA/ASS subtitles with anamorphic videos to match historical 131 | #V cycle sub-ass-vsfilter-aspect-compat 132 | # switch between applying no style overrides to SSA/ASS subtitles, and 133 | # overriding them almost completely with the normal subtitle style 134 | #u cycle-values sub-ass-override "force" "no" 135 | #j cycle sub # cycle through subtitles 136 | #J cycle sub down # ...backwards 137 | #SHARP cycle audio # switch audio streams 138 | #_ cycle video 139 | #T cycle ontop # toggle video window ontop of other windows 140 | #f cycle fullscreen # toggle fullscreen 141 | #s screenshot # take a screenshot 142 | #S screenshot video # ...without subtitles 143 | #Ctrl+s screenshot window # ...with subtitles and OSD, and scaled 144 | #Alt+s screenshot each-frame # automatically screenshot every frame 145 | #w add panscan -0.1 # zoom out with -panscan 0 -fs 146 | #W add panscan +0.1 # in 147 | #e add panscan +0.1 # same as previous binding (discouraged) 148 | # cycle video aspect ratios; "-1" is the container aspect 149 | #A cycle-values video-aspect-override "16:9" "4:3" "2.35:1" "-1" 150 | #POWER quit 151 | #PLAY cycle pause 152 | #PAUSE cycle pause 153 | #PLAYPAUSE cycle pause 154 | #PLAYONLY set pause no 155 | #PAUSEONLY set pause yes 156 | #STOP quit 157 | #FORWARD seek 60 158 | #REWIND seek -60 159 | #NEXT playlist-next 160 | #PREV playlist-prev 161 | #VOLUME_UP add volume 2 162 | #VOLUME_DOWN add volume -2 163 | #MUTE cycle mute 164 | #CLOSE_WIN quit 165 | #CLOSE_WIN {encode} quit 4 166 | #ctrl+w quit 167 | #E cycle edition # next edition 168 | #l ab-loop # Set/clear A-B loop points 169 | #L cycle-values loop-file "inf" "no" # toggle infinite looping 170 | #ctrl+c quit 4 171 | #DEL script-binding osc/visibility # cycle OSC display 172 | #ctrl+h cycle-values hwdec "auto" "no" # cycle hardware decoding 173 | #F8 show_text ${playlist} # show playlist 174 | #F9 show_text ${track-list} # show list of audio/sub streams 175 | 176 | # 177 | # Legacy bindings (may or may not be removed in the future) 178 | # 179 | #! add chapter -1 # skip to previous chapter 180 | #@ add chapter 1 # next 181 | 182 | # 183 | # Not assigned by default 184 | # (not an exhaustive list of unbound commands) 185 | # 186 | 187 | # ? cycle angle # switch DVD/Bluray angle 188 | # ? cycle sub-forced-only # toggle DVD forced subs 189 | # ? cycle program # cycle transport stream programs 190 | # ? stop # stop playback (quit or enter idle mode) 191 | 192 | # tagging and organizing media files 193 | D run "/Users/nikhgupta/.bin/mpv-control.rb" "destroy" 194 | n run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Red" 195 | N run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Red" 196 | k run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Gray" 197 | K run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Gray" 198 | a run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Purple" 199 | A run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Purple" "Red" 200 | b run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Green" 201 | B run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Green" "Red" 202 | h run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Blue" 203 | H run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Blue" "Red" 204 | w run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Yellow" 205 | W run "/Users/nikhgupta/.bin/mpv-control.rb" "tag" "Yellow" "Red" 206 | 207 | # redefine overridden functionality 208 | X cycle-values video-aspect-override "16:9" "4:3" "2.35:1" "-1" 209 | -------------------------------------------------------------------------------- /zsh/.zsh/prompt.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | source ~/.zsh/utils.sh 4 | autoload -U colors && colors 5 | setopt promptsubst 6 | 7 | # Updates editor information when the keymap changes. 8 | function zle-line-init zle-keymap-select { 9 | RPS1="${${KEYMAP/vicmd/◉}/(main|viins)/}" 10 | RPS2=$RPS1 11 | zle reset-prompt 12 | } 13 | 14 | zle -N zle-line-init 15 | zle -N zle-keymap-select 16 | 17 | PROMPT_BREAKPOINTS=(60 0) 18 | PROMPT_FILE=~/.zsh/prompt.zsh 19 | 20 | # => various environment variables used within this script {{{ 21 | GIT_PS1_SHOWUPSTREAM=verbose 22 | 23 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}[ " 24 | ZSH_THEME_GIT_PROMPT_SUFFIX=" %{$fg[blue]%}] " 25 | ZSH_THEME_GIT_PROMPT_DIRTY=": %{$fg[red]%}✗" 26 | ZSH_THEME_GIT_PROMPT_CLEAN=": %{$fg[cyan]%}✔" 27 | 28 | ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" 29 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹" 30 | ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" 31 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" 32 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" 33 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✰" 34 | # }}} 35 | # => function: set prompt character based on repo and SSH status {{{ 36 | _set_prompt_char() { 37 | if is_git; then echo -ne '± '; 38 | elif is_hg; then echo -ne '☿ '; 39 | elif is_svn; then echo -ne '⑆ '; 40 | fi 41 | } 42 | # }}} 43 | # => function: prompt entry for time since last git commit {{{ 44 | _git_time_since_commit() { 45 | 46 | # Get the last commit. 47 | last_commit=$(command git log --pretty=format:'%at' -1 2>/dev/null) 48 | (( $? )) && return # probably, not a git repo. 49 | 50 | now=$(date +%s) 51 | seconds_since_last_commit=$((now - last_commit)) 52 | 53 | # Totals 54 | MINUTES=$((seconds_since_last_commit / 60)) 55 | HOURS=$((seconds_since_last_commit/3600)) 56 | 57 | # Sub-hours and sub-minutes 58 | DAYS=$((seconds_since_last_commit / 86400)) 59 | SUB_HOURS=$((HOURS % 24)) 60 | SUB_MINUTES=$((MINUTES % 60)) 61 | 62 | if [[ -n $(command git status -s 2>/dev/null) ]]; then 63 | if [ "$MINUTES" -gt 60 ]; then 64 | COLOR="%{$fg[red]%}" 65 | elif [ "$MINUTES" -gt 10 ]; then 66 | COLOR="%{$fg[yellow]%}" 67 | else 68 | COLOR="%{$fg[cyan]%}" 69 | fi 70 | else 71 | COLOR="%{$fg[green]%}" 72 | fi 73 | 74 | if [ "$HOURS" -gt 24 ]; then 75 | echo "$COLOR${DAYS}d " 76 | elif [ "$MINUTES" -gt 60 ]; then 77 | echo "$COLOR${HOURS}h${SUB_MINUTES}m " 78 | else 79 | echo "$COLOR${MINUTES}m " 80 | fi 81 | } 82 | # }}} 83 | # => function: prompt entry for the return status of last command {{{ 84 | _return_code() { echo "%(?..%{$fg[red]%}⏎ %? %{$reset_color%})"; } 85 | # }}} 86 | # => function: prompt entry for pending jobs {{{ 87 | _pending_jobs() { 88 | [[ $(jobs | wc -l) -gt 0 ]] && echo "%{$fg_bold[red]%}${job_nos}JP%{$reset_color%}" 89 | } 90 | # }}} 91 | # => function: prompt entry for time taken to run last command {{{ 92 | _prompt_timer_preexec() { 93 | unset timer_show 94 | timer=${timer:-$SECONDS} 95 | } 96 | # Wed Oct 22 23:42:48 IST 2014: 97 | # - added bell for commands that take more than 20 seconds to run. 98 | _prompt_timer_precmd() { 99 | unset timer_show # only show time for a single prompt 100 | # i.e. ENTER in shell should reset the timer. 101 | local bell="%{$(echo '\a')%}" 102 | if [ $timer ]; then 103 | timer_result=$(($SECONDS - $timer)) 104 | unset timer 105 | if [[ $timer_result -ge 3600 ]]; then 106 | let "timer_hours = $timer_result / 3600" 107 | let "remainder = $timer_result % 3600" 108 | let "timer_minutes = $remainder / 60" 109 | let "timer_seconds = $remainder % 60" 110 | timer_show="%B%F{red}${timer_hours}h${timer_minutes}m${timer_seconds}s%b${bell} " 111 | elif [[ $timer_result -ge 60 ]]; then 112 | let "timer_minutes = $timer_result / 60" 113 | let "timer_seconds = $timer_result % 60" 114 | timer_show="%B%F{yellow}${timer_minutes}m${timer_seconds}s%b${bell} " 115 | elif [[ $timer_result -gt 20 ]]; then 116 | timer_show="%B%F{green}${timer_result}s%b${bell} " 117 | elif [[ $timer_result -gt 5 ]]; then 118 | timer_show="%B%F{green}${timer_result}s%b " 119 | fi 120 | fi 121 | } 122 | is_installed add-zsh-hook && add-zsh-hook preexec _prompt_timer_preexec 123 | is_installed add-zsh-hook && add-zsh-hook precmd _prompt_timer_precmd 124 | # }}} 125 | # => function: prompt entry for battery remaining (in percent) {{{ 126 | _battery_remaining() { 127 | if is_macosx; then 128 | battery_data=$(ioreg -rc "AppleSmartBattery") 129 | if echo $battery_data | grep -e '"FullyCharged"\s*=\s*Yes' &>/dev/null; then 130 | echo -ne "🔌 " # fully charged 131 | elif echo $battery_data | grep -e '"ExternalConnected"\s*=\s*Yes' &>/dev/null; then 132 | echo -ne "⚡ " # external connected 133 | elif echo $battery_data | grep -e '"IsCharging"\s*=\s*Yes' &>/dev/null; then 134 | echo -ne "⚡ " # being charged 135 | else 136 | current=$(echo $battery_data|grep --color=never -e '"CurrentCapacity"\s*=\s*'|sed -e 's/^.*"CurrentCapacity"\ =\ //' ) 137 | maxcapc=$(echo $battery_data|grep -e '"MaxCapacity"\s*=\s*'|sed -e 's/^.*"MaxCapacity"\ =\ //' ) 138 | (( battery_pct = (current * 100 ) / maxcapc )) 139 | [[ $battery_pct -gt 20 ]] && color='yellow' 140 | [[ $battery_pct -gt 50 ]] && color='green' 141 | echo -ne "🔋 %{$fg[${color:-red}]%}[$battery_pct%%]%{$reset_color%}" 142 | fi 143 | elif is_installed acpi; then 144 | battery_data=$(acpi 2&>/dev/null) 145 | if echo $battery_data | grep -e '^Battery.*Discharging' &>/dev/null; then 146 | battery_pct=$(echo $battery_data | cut -f2 -d ',' | tr -cd '[:digit:]') 147 | [ $battery_pct -gt 20 ] && color='yellow' 148 | [ $battery_pct -gt 50 ] && color='green' 149 | echo -ne "🔋 %{$fg[${color:-red}]%}[$battery_pct%%]%{$reset_color%}" 150 | else 151 | echo -ne "⚡ " # external connected 152 | fi 153 | fi 154 | } 155 | # }}} 156 | # => function: prompt entry for current time {{{ 157 | _current_time() { 158 | echo "$(emoji-clock) %{$fg_bold[blue]%}[%*]%{$reset_color%}" 159 | # echo "%{$fg_bold[blue]%}[%*]%{$reset_color%}" # faster 160 | } 161 | # }}} 162 | # => function: prompt entry for host and user name in SSH connection {{{ 163 | _ssh_user_info(){ 164 | [[ -z "$SSH_CONNECTION" ]] && return 165 | echo -ne "%{$fg[magenta]%}%n%{$reset_color%} at " 166 | echo -ne "%{$fg[yellow]%}%m%{$reset_color%} in " 167 | } 168 | # }}} 169 | # => function: prompt entry for virtual environemnt {{{ 170 | export VIRTUAL_ENV_DISABLE_PROMPT=1 171 | function virtualenv_prompt_info(){ 172 | [[ -n ${VIRTUAL_ENV} ]] || return 173 | python -V 2>&1 | grep -E 'Python\s3\.' 2>&1 &>/dev/null && version=py3 || version=py2 174 | echo "\e[32m${version}${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}\e[0m " 175 | } 176 | # }}} 177 | # => function: check for active proxy {{{ 178 | function proxy_info(){ 179 | [[ -n "${http_proxy}" ]] || return 180 | echo "\e[32m෴ \e[0m " 181 | } 182 | # }}} 183 | 184 | function git_prompt_info() { 185 | local ref 186 | ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ 187 | ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 188 | ref=${ref#refs/heads/} 189 | [ "${#ref}" -gt 32 ] && ref="${ref:0:16}…" 190 | echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" 191 | } 192 | 193 | # Checks if working tree is dirty 194 | function parse_git_dirty() { 195 | local STATUS 196 | local -a FLAGS 197 | FLAGS=('--porcelain') 198 | if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then 199 | FLAGS+='--untracked-files=no' 200 | fi 201 | case "$GIT_STATUS_IGNORE_SUBMODULES" in 202 | git) 203 | # let git decide (this respects per-repo config in .gitmodules) 204 | ;; 205 | *) 206 | # if unset: ignore dirty submodules 207 | # other values are passed to --ignore-submodules 208 | FLAGS+="--ignore-submodules=${GIT_STATUS_IGNORE_SUBMODULES:-dirty}" 209 | ;; 210 | esac 211 | STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1) 212 | if [[ -n $STATUS ]]; then 213 | echo "$ZSH_THEME_GIT_PROMPT_DIRTY" 214 | else 215 | echo "$ZSH_THEME_GIT_PROMPT_CLEAN" 216 | fi 217 | } 218 | 219 | _prompt_0(){ 220 | RPROMPT="" 221 | before_prompt="" 222 | PROMPT="" 223 | PROMPT='$(proxy_info)' # prompt icon for proxy 224 | [[ "$(arch)" == "i386" ]] && PROMPT+="🌱 " 225 | PROMPT+="%{$fg[magenta]%}%c%{$reset_color%} " # cwd name 226 | PROMPT+='$(git_prompt_info)$(_git_time_since_commit)'"%{$reset_color%}" 227 | 228 | # == every prompt should display the following information 229 | # display a telephone icon when we are in a SSH session. 230 | [[ -n $SSH_CONNECTION ]] && PROMPT+="%{$fg[cyan]%}☎️%{$reset_color%} " # <-- CAREFUL. emoji here. 231 | 232 | # PROMPT+='$(_set_prompt_char)' # prompt icon for repo 233 | PROMPT+='$timer_show' # time taken to run last command 234 | PROMPT+='$(_return_code)' # return code for last command 235 | PROMPT+='%{$fg[red]%}☿%{$reset_color%} ' 236 | 237 | # if is_macosx; then PROMPT+="%(!.!.➲) %{$reset_color%}"; else PROMPT+="➲ %{$reset_color%}"; fi 238 | } 239 | 240 | _prompt_60(){ 241 | PROMPT='$(proxy_info)' # prompt icon for proxy 242 | PROMPT+="$(_ssh_user_info)" 243 | [[ "$(arch)" -eq "i386" ]] && PROMPT+="🌱 " 244 | PROMPT+="%{$fg_bold[cyan]%}"'${PWD/#$HOME/~}'"%{$reset_color%} " 245 | PROMPT+='$(git_prompt_info)$(_git_time_since_commit)'"%{$reset_color%}" 246 | PROMPT+='$(virtualenv_prompt_info)'"%{$reset_color%}" 247 | 248 | # emacs gui messes up command ouputs unless columns size is specified manually 249 | is_emacs && let COLUMNS=COLUMNS-2 250 | 251 | RPROMPT+='$(_pending_jobs) ' 252 | # NOTE: I never look at this info, anyways and this takes a 60-70ms each time. 253 | RPROMPT+='$(git_prompt_status)'"%{$reset_color%} " 254 | [[ -z "$TMUX" ]] && RPROMPT+='$(_current_time) ' 255 | [[ -z "$TMUX" ]] && RPROMPT+='$(_battery_remaining)' 256 | 257 | # intelligently, add a new line char in prompt 258 | PROMPT+='$prompt_newline' 259 | 260 | # == every prompt should display the following information 261 | # display a telephone icon when we are in a SSH session. 262 | [[ -n $SSH_CONNECTION ]] && PROMPT+="%{$fg[cyan]%}☎ %{$reset_color%} " # <-- CAREFUL. emoji here. 263 | 264 | PROMPT+='$(_set_prompt_char)' # prompt icon for repo 265 | PROMPT+='$timer_show' # time taken to run last command 266 | PROMPT+='$(_return_code)' # return code for last command 267 | if is_macosx; then PROMPT+="%(!.!.➲) "; else PROMPT+="➲ "; fi 268 | before_prompt="$(printf "-"%.0s {1..${COLUMNS}})\n" 269 | } 270 | 271 | precmd() { 272 | # print -P "%{%(?.$FG[253].$FG[124])%}$before_prompt%{$reset_color%}" 273 | print -Pn "\x1b[38;2;%(?.70;70;70.200;100;100)m${before_prompt}\x1b[0m" 274 | } 275 | 276 | alias miniprompt=_prompt_0; 277 | 278 | # [[ $COLUMNS -gt 80 ]] && _prompt_60 || _prompt_0 279 | miniprompt 280 | 281 | # when in emacs, let the user know. 282 | is_vim && clear && miniprompt && echo "\e[33mYou're inside VIM Z-shell.\e[0m" || true 283 | is_emacs && clear && miniprompt && echo "\e[33mYou're inside Emacs Multi-Term Z-shell.\e[0m" || true 284 | is_vscode && clear && miniprompt && echo "\e[33mYou're inside VSCode Z-shell.\e[0m" || true 285 | -------------------------------------------------------------------------------- /vim/.config/nvim/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------