├── .editorconfig ├── .eslintrc.js ├── .github ├── FUNDING.yml ├── renovate.json5 └── workflows │ ├── dispatch.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .ignore ├── .markdownlint.jsonc ├── .npmrc ├── .shellcheckrc ├── .vintrc.yaml ├── .yamlfmt ├── .yamllint ├── README.md ├── ack ├── README.md └── dot.ackrc ├── ag ├── README.md └── dot.ignore ├── aws └── config ├── bash ├── dot.bash_profile ├── dot.bashrc └── prompt.bash ├── bat └── config ├── bin ├── 24bit ├── 8bit ├── README.md ├── addcert ├── brew-repair ├── colortest ├── curlperf ├── dko-center ├── dko-fix-git-completion ├── dko-header ├── dko-java_home ├── dko-line ├── dko-maybemkdir ├── dko-open ├── dko-same ├── dko-symlink ├── dkosourced ├── dot ├── e ├── edark ├── egr ├── elight ├── enginx ├── ephp ├── flatten ├── fs ├── fu ├── fzf-audio ├── fzf-git-branch ├── fzf-git-latest-branches ├── fzf-git-worktree ├── fzf-xcode ├── get-nvim ├── get-wezterm ├── git-committers ├── git-copy-branch ├── git-dirsha ├── git-in ├── git-key ├── git-lp ├── git-open ├── git-sbs ├── git-today ├── giteditor ├── joingroup ├── localip ├── lockscreen ├── maybe-git-root ├── osc9-notify ├── path ├── pokecolor ├── prune ├── rln ├── rmtags ├── serve ├── ssid ├── steam-find-missing-lib32 ├── steam-find-missing-lib64 ├── termcolors ├── togglemousescaling ├── wifi-passwords └── xcw ├── bootstrap ├── cleanup ├── mac ├── pipx-packages ├── pyenv ├── symlink ├── symlink-bash └── xdg ├── checkstyle └── google_checks.xml ├── git ├── aliases.gitconfig ├── commit-template ├── dot.gitconfig ├── dot.gitignore ├── gtk.gitconfig ├── hook-pre-commit-no-master.sh ├── kaleidoscope.gitconfig ├── kde.gitconfig └── mac.gitconfig ├── harper-ls └── dictionary.txt ├── ideavim └── dot.ideavimrc ├── lib ├── helpers.sh ├── plain.sh ├── pretty.bash └── sources.js ├── linux ├── gnupg │ └── gpg-agent.conf ├── magic-keyboard.md ├── write_hid_apple └── xresources │ ├── .Xresources │ └── base16-twilight.dark.256.xresources ├── local └── .gitkeep ├── logs └── .gitkeep ├── mac ├── Brewfile ├── LoginItems │ └── DelayedDropbox.app │ │ └── Contents │ │ ├── Info.plist │ │ ├── MacOS │ │ └── applet │ │ ├── PkgInfo │ │ └── Resources │ │ ├── Scripts │ │ └── main.scpt │ │ ├── applet.icns │ │ ├── applet.rsrc │ │ └── description.rtfd │ │ └── TXT.rtf ├── README.md ├── base16-tomorrow.dark.256.terminal ├── defaults ├── dot.hushlogin ├── hammerspoon │ ├── .luarc.json │ ├── .null-ls-root │ ├── Spoons │ │ ├── Caffeine.spoon │ │ │ ├── caffeine-off.pdf │ │ │ ├── caffeine-on.pdf │ │ │ ├── docs.json │ │ │ └── init.lua │ │ ├── Lunette.spoon │ │ │ ├── command.lua │ │ │ ├── init.lua │ │ │ ├── resize.lua │ │ │ └── validator.lua │ │ └── Seal.spoon │ │ │ ├── docs.json │ │ │ ├── init.lua │ │ │ ├── seal_apps.lua │ │ │ ├── seal_calc.lua │ │ │ ├── seal_pasteboard.lua │ │ │ ├── seal_rot13.lua │ │ │ ├── seal_safari_bookmarks.lua │ │ │ ├── seal_screencapture.lua │ │ │ ├── seal_urlformats.lua │ │ │ ├── seal_useractions.lua │ │ │ ├── seal_viscosity.lua │ │ │ ├── seal_vpn.lua │ │ │ ├── viscosity_locked.png │ │ │ └── viscosity_unlocked.png │ ├── clipboard │ │ └── type.lua │ ├── init.lua │ ├── launcher │ │ ├── apps.lua │ │ └── seal.lua │ ├── menubar │ │ ├── audiosource.lua │ │ └── caffeine.lua │ ├── seal_plugins │ │ └── seal_myapps.lua │ ├── selene.toml │ └── window │ │ ├── lunette.lua │ │ └── throw.lua ├── iterm2 │ ├── base16-solarized.light.256.itermcolors │ ├── base16-solarized.light.itermcolors │ └── base16-tomorrownight.dark.256.itermcolors └── personal.Brewfile ├── markdownlint └── dot.markdownlintrc ├── meta ├── dotfiles-logo.png ├── motd.png ├── nvim-potatosff.png └── terminal-potatosff.png ├── mise └── config.toml ├── nvim ├── .gitignore ├── .ignore ├── .luarc.json ├── README.md ├── after │ ├── ftplugin │ │ ├── gitcommit.lua │ │ ├── less.lua │ │ ├── systemd.lua │ │ └── tiltfile.lua │ ├── lsp │ │ ├── basedpyright.lua │ │ ├── cssmodules_ls.lua │ │ ├── dartls.lua │ │ ├── efm.lua │ │ ├── harper_ls.lua │ │ ├── jsonls.lua │ │ ├── lua_ls.lua │ │ ├── ruff.lua │ │ ├── ts_ls.lua │ │ ├── vtsls.lua │ │ └── yamlls.lua │ ├── plugin │ │ ├── clipboard.lua │ │ └── highlights.vim │ └── syntax │ │ ├── gitcommit.vim │ │ ├── markdown.vim │ │ └── sh │ │ └── embed-awk.vim ├── coc-settings.json ├── ftplugin │ ├── conf.lua │ ├── html.lua │ ├── javascript.lua │ ├── json.lua │ ├── jsonc.lua │ ├── just.lua │ ├── liquid.lua │ ├── lua.lua │ ├── make.lua │ ├── markdown.lua │ ├── starlark.lua │ ├── tiltfile.lua │ ├── typescript.lua │ ├── typescriptreact.lua │ └── yaml.lua ├── init.lua ├── lua │ └── dko │ │ ├── behaviors.lua │ │ ├── behaviors │ │ ├── escesc.lua │ │ ├── git.lua │ │ ├── lsp.lua │ │ └── qfloclist.lua │ │ ├── bench │ │ ├── dirname.lua │ │ ├── env.lua │ │ ├── filename.lua │ │ ├── filereadable.lua │ │ └── readfile.lua │ │ ├── builtin-syntax.lua │ │ ├── colors.lua │ │ ├── commands.lua │ │ ├── diagnostic.lua │ │ ├── doctor.lua │ │ ├── editing.lua │ │ ├── filetypes.lua │ │ ├── heirline │ │ ├── clipboard.lua │ │ ├── coc.lua │ │ ├── doctor.lua │ │ ├── lazy.lua │ │ ├── mode.lua │ │ ├── remote.lua │ │ ├── ruler.lua │ │ ├── searchterm.lua │ │ ├── statusline-default.lua │ │ ├── tabline-branch.lua │ │ ├── tabline-bufferstats.lua │ │ ├── tabline-cwd.lua │ │ ├── tabline.lua │ │ ├── tabs.lua │ │ ├── utils.lua │ │ ├── winbar-diagnostics.lua │ │ ├── winbar-filename.lua │ │ ├── winbar-filepath.lua │ │ ├── winbar-filetype.lua │ │ ├── winbar-formatters.lua │ │ ├── winbar-terminal.lua │ │ └── winbar.lua │ │ ├── icons.lua │ │ ├── lazy.lua │ │ ├── lsp.lua │ │ ├── mappings.lua │ │ ├── mappings │ │ ├── finder.lua │ │ ├── lsp.lua │ │ └── lua.lua │ │ ├── notify.lua │ │ ├── opt.lua │ │ ├── plugins │ │ ├── ai.lua │ │ ├── clipboard.lua │ │ ├── coc.lua │ │ ├── colorscheme.lua │ │ ├── completion.lua │ │ ├── components.lua │ │ ├── fixes.lua │ │ ├── fzf.lua │ │ ├── git.lua │ │ ├── heirline.lua │ │ ├── init.lua │ │ ├── js_ts.lua │ │ ├── lsp.lua │ │ ├── markdown.lua │ │ ├── notify.lua │ │ ├── tools.lua │ │ └── treesitter.lua │ │ ├── settings.lua │ │ ├── terminal.lua │ │ ├── tools.lua │ │ ├── tools │ │ ├── csharp.lua │ │ ├── dart.lua │ │ ├── docker.lua │ │ ├── generic.lua │ │ ├── go.lua │ │ ├── html.lua │ │ ├── javascript-typescript.lua │ │ ├── json.lua │ │ ├── lua.lua │ │ ├── markdown.lua │ │ ├── python.lua │ │ ├── qml.lua │ │ ├── rust.lua │ │ ├── sh.lua │ │ ├── text.lua │ │ ├── tiltfile.lua │ │ ├── vim.lua │ │ └── yaml.lua │ │ ├── types.lua │ │ ├── utils │ │ ├── autocmd.lua │ │ ├── buffer.lua │ │ ├── buffers.lua │ │ ├── clipboard.lua │ │ ├── file.lua │ │ ├── format.lua │ │ ├── format │ │ │ ├── efm.lua │ │ │ └── javascript.lua │ │ ├── help.lua │ │ ├── hr.lua │ │ ├── jsts.lua │ │ ├── loclist.lua │ │ ├── lsp.lua │ │ ├── movemode.lua │ │ ├── node.lua │ │ ├── notify.lua │ │ ├── object.lua │ │ ├── path.lua │ │ ├── project.lua │ │ ├── runtime.lua │ │ ├── selection.lua │ │ ├── string.lua │ │ ├── table.lua │ │ ├── treesitter.lua │ │ ├── typescript.lua │ │ ├── ui.lua │ │ ├── url.lua │ │ ├── vte.lua │ │ └── window.lua │ │ └── zsh │ │ └── nameddirs.lua ├── selene.toml ├── spell │ ├── en.utf-8.add │ ├── en.utf-8.add.spl │ ├── en.utf-8.spl │ └── en.utf-8.sug └── vim.yaml ├── package-lock.json ├── package.json ├── prettier └── prettier.config.js ├── r └── dot.Renviron ├── scss-lint └── dot.scss-lint.yaml ├── shell ├── after.sh ├── aliases-archlinux.sh ├── aliases-debian.sh ├── aliases.sh ├── dko-wait-for-dotfiles-lock ├── dot.inputrc ├── dot.profile ├── functions.sh ├── go.sh ├── ibus ├── interactive-darwin.zsh ├── interactive-linux.sh ├── interactive.sh ├── java.sh ├── node.sh ├── path.sh ├── python.sh ├── ruby.sh ├── rust.sh ├── vars.sh └── vendor │ └── base16-tomorrow-night.sh ├── tests ├── README.md ├── colors.css ├── conflict.txt ├── importjsx.js ├── js.js ├── jshtml.html ├── jsphp.php ├── jsxfile.jsx ├── langs.md ├── php.php ├── php2.php ├── phpblank.php ├── rainglow.php ├── tsobj.ts ├── tsxfile.tsx └── x.coffee ├── tmux └── tmux.conf ├── wezterm ├── dko │ ├── mappings.lua │ ├── notifier.lua │ ├── panes.lua │ ├── theme.lua │ └── typography.lua ├── fonts │ ├── FiraCode-License.txt │ ├── FiraCode-VF.ttf │ ├── MapleMonoNormalNL-NF-CN-Regular--LICENSE.txt │ ├── MapleMonoNormalNL-NF-CN-Regular.ttf │ ├── unifont-16.0.03.ttf │ └── unifont-License-OFL-1.1.txt ├── selene.toml └── wezterm.lua ├── yamlfmt └── .yamlfmt ├── yamllint └── config └── zsh ├── .ignore ├── .zkbd └── xterm-256color-italic.tmp ├── .zshrc ├── dot.zshenv ├── dot.zshrc ├── prompt-linedrawing.zsh ├── prompt-vcs.zsh ├── prompt-vimode.zsh ├── prompt.zsh ├── title.zsh └── zinit.zsh /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = LF 6 | indent_size = 2 7 | indent_style = space 8 | 9 | [{.gitconfig,*.gitconfig}] 10 | indent_style = tab 11 | 12 | [*.ini] 13 | indent_size = 4 14 | 15 | # html is not minified so reduce character output by using real tabs 16 | # use indent size 4 for parity with PHP 17 | [*.{erb,hbs,html,marko,mustache,xml}] 18 | indent_style = tab 19 | 20 | [*.{css,less,sass,scss}] 21 | insert_final_newline = true 22 | 23 | [*.{coffee,js,json,jsx,ts,tsx}] 24 | insert_final_newline = true 25 | 26 | [*.lua] 27 | indent_style = space 28 | indent_size = 2 29 | call_arg_parentheses = keep 30 | call_parentheses = Always 31 | collapse_simple_statement = Never 32 | max_line_length = 80 33 | quote_type = double 34 | 35 | [*.md] 36 | indent_style = space 37 | 38 | # PHP http://make.wordpress.org/core/handbook/coding-standards/php/ 39 | [*.{blade,php}] 40 | indent_size = 4 41 | insert_final_newline = true 42 | 43 | [*.py] 44 | indent_size = 4 45 | 46 | # shfmt 47 | # https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd#examples 48 | [*.sh] 49 | switch_case_indent = true # --case-indent 50 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'extends': [ 3 | 'davidosomething/lib/node.js', 4 | ], 5 | 'env': { 6 | 'es6': true, 7 | }, 8 | 'parserOptions': { 9 | 'sourceType': 'module', 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [davidosomething] 2 | -------------------------------------------------------------------------------- /.github/renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | extends: ["config:base"], 3 | baseBranches: ["dev"], 4 | ignoreNpmrcFile: true, 5 | packageRules: [ 6 | { 7 | automerge: true, 8 | matchDepTypes: ["devDependencies"], 9 | matchPackagePatterns: ["^eslint"], 10 | stabilityDays: 3, 11 | }, 12 | { 13 | automerge: true, 14 | paths: ["requirements.txt"], 15 | stabilityDays: 3, 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /.github/workflows/dispatch.yml: -------------------------------------------------------------------------------- 1 | name: dispatch 2 | 3 | on: 4 | workflow_run: 5 | workflows: [release] 6 | types: 7 | - completed 8 | 9 | jobs: 10 | dispatch-on-release-success: 11 | if: ${{ github.event.workflow_run.conclusion == 'success' }} 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | repo: ['davidosomething/devcon'] 16 | steps: 17 | - name: dispatch to devcon 18 | # yamllint disable rule:line-length 19 | run: | 20 | curl \ 21 | -H "Accept: application/vnd.github.everest-preview+json" \ 22 | -H "Authorization: token ${{ secrets.DISPATCH_TOKEN }}" \ 23 | --request POST \ 24 | --data '{"event_type": "dotfiles_update", "client_payload": { "doit": true }}' \ 25 | https://api.github.com/repos/${{ matrix.repo }}/dispatches 26 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | workflow_run: 5 | workflows: [test] 6 | types: 7 | - completed 8 | 9 | jobs: 10 | release: 11 | if: ${{ github.event.workflow_run.conclusion == 'success' }} 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Check out repository code 15 | uses: actions/checkout@v4 16 | 17 | - name: Merge dev -> master 18 | uses: devmasx/merge-branch@1.4.0 19 | with: 20 | type: now 21 | from_branch: dev 22 | target_branch: master 23 | github_token: ${{ github.token }} 24 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: test 3 | 4 | on: 5 | push: 6 | branches: [dev] 7 | 8 | jobs: 9 | test: 10 | runs-on: ${{ matrix.os }} 11 | 12 | strategy: 13 | matrix: 14 | os: ["ubuntu-latest", "macos-latest"] 15 | 16 | env: 17 | TERM: xterm 18 | 19 | steps: 20 | - name: Check out repository code 21 | uses: actions/checkout@v4 22 | with: 23 | ref: dev 24 | 25 | - name: Provision dotfiles 26 | run: ./bootstrap/symlink 27 | 28 | - name: Install Node.js 29 | uses: actions/setup-node@v4 30 | with: 31 | node-version-file: 'package.json' 32 | 33 | - name: Install node packages via npm 34 | run: npm ci 35 | 36 | - name: Install pipx via Brew 37 | if: matrix.os == 'macos-latest' 38 | run: brew install pipx && pipx ensurepath 39 | 40 | - name: Install neovim nightly 41 | uses: rhysd/action-setup-vim@v1 42 | with: 43 | neovim: true 44 | version: stable 45 | 46 | - name: Run tests 47 | run: npm test --silent 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # locks 2 | Brewfile.lock.json 3 | 4 | # managed 5 | linux/konsole/bookmarks.xml* 6 | mac/bitbar/enabled/ 7 | node_modules/ 8 | tmux/plugins/ 9 | !tmux/plugins/tpm 10 | 11 | # secrets 12 | local/ 13 | logs/ 14 | 15 | # deprecated 16 | z/.z 17 | z/.z.* 18 | zsh/.zinit 19 | zsh/antibody 20 | 21 | # cache + logs 22 | .bash_history 23 | .lesshst 24 | .nvimlog 25 | .tox 26 | .zcache 27 | .zcompdump* 28 | .zhistory 29 | .zsh_history 30 | .zsh_sessions 31 | .zshrc.zwc 32 | *.log 33 | *.tbcache 34 | -------------------------------------------------------------------------------- /.ignore: -------------------------------------------------------------------------------- 1 | *.crt 2 | *.pub 3 | .tox/ 4 | base16/ 5 | certs/ 6 | fonts/ 7 | logs/ 8 | mac/*.terminal 9 | mac/iterm2/ 10 | mac/hammerspoon/Spoons/ 11 | tmux/plugins/ 12 | weechat/ 13 | -------------------------------------------------------------------------------- /.markdownlint.jsonc: -------------------------------------------------------------------------------- 1 | markdownlint/dot.markdownlintrc -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.com/ 2 | -------------------------------------------------------------------------------- /.shellcheckrc: -------------------------------------------------------------------------------- 1 | external-sources=false 2 | 3 | # https://github.com/koalaman/shellcheck/wiki/SC1090 4 | disable=SC1090 5 | 6 | # https://github.com/koalaman/shellcheck/wiki/SC1091 7 | disable=SC1091 8 | 9 | # pgrep is NOT all that great 10 | # https://github.com/koalaman/shellcheck/wiki/SC2009 11 | disable=SC2009 12 | -------------------------------------------------------------------------------- /.vintrc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | cmdargs: 3 | severity: style_problem 4 | env: 5 | neovim: true 6 | 7 | -------------------------------------------------------------------------------- /.yamlfmt: -------------------------------------------------------------------------------- 1 | --- 2 | formatter: 3 | type: basic 4 | include_document_start: true 5 | indentless_arrays: false 6 | pad_line_comments: 2 7 | retain_line_breaks: true 8 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | rules: 4 | comments: 5 | ignore-shebangs: true 6 | require-starting-space: true 7 | document-start: disable 8 | empty-lines: 9 | max-end: 1 10 | truthy: 11 | check-keys: false 12 | ignore: | 13 | node_modules/ 14 | tmux/plugins/ 15 | zsh/.zinit/ 16 | pnpm-lock.yaml 17 | -------------------------------------------------------------------------------- /ack/README.md: -------------------------------------------------------------------------------- 1 | .ackrc is not symlinked, the path is defined via ACKRC env var 2 | -------------------------------------------------------------------------------- /ack/dot.ackrc: -------------------------------------------------------------------------------- 1 | --color 2 | --group 3 | --smart-case 4 | --sort-files 5 | 6 | --type-add=css=.less,.sass,.scss,.styl 7 | --type-set=sass=.sass,.scss 8 | --type-set=less=.less 9 | 10 | --type-add=html=.ejs,.erb,.handlebars,.hbs,.html.erb,.html.slim,.html.haml,.jst,.marko,.mustache,.twig 11 | 12 | --type-add=js=.bowerrc,.coffee,.js.erb,.jshintrc,.json 13 | 14 | --type-add=ruby=.haml,.rake,.ru,.palette 15 | 16 | --type-add=vim=.vim,.snippets 17 | 18 | --type-set=md=.markdown,.md,.mkd,.txt 19 | 20 | --ignore-dir=bundle 21 | --ignore-dir=bower_components 22 | --ignore-dir=log 23 | --ignore-dir=tmp 24 | --ignore-dir=node_modules 25 | --ignore-dir=assets/components 26 | 27 | --ignore-file=ext:log 28 | --ignore-file=is:tags 29 | -------------------------------------------------------------------------------- /ag/README.md: -------------------------------------------------------------------------------- 1 | # the_silver_searcher AND ripgrep 2 | 3 | - `ag` looks for `.ignore` files upwards from pwd as of 0.33.0. 4 | - `~/.agignore` is still used as the global ignore file 5 | 6 | -------------------------------------------------------------------------------- /ag/dot.ignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | .jscpd/ 3 | .next/ 4 | .tox/ 5 | build/ 6 | compass-css/ 7 | coverage/ 8 | dist/ 9 | node_modules/ 10 | vendor/ 11 | zsh/.zinit/ 12 | 13 | *~ 14 | *.crt 15 | *.csv 16 | *.lock 17 | *.map 18 | *.marko.js 19 | *.min.* 20 | *.po 21 | *.svg 22 | *.vim.old 23 | *-min.* 24 | *.xcbkptlist 25 | .bash_history 26 | .classpath 27 | .zcompdump 28 | bash_history 29 | zsh_history 30 | COPYING* 31 | LICENSE* 32 | jquery.* 33 | jquery-ui* 34 | 35 | TAGS 36 | GTAGS 37 | GRTAGS 38 | GPATH 39 | tags.log 40 | 41 | # vim: ft=gitignore 42 | -------------------------------------------------------------------------------- /aws/config: -------------------------------------------------------------------------------- 1 | [default] 2 | region = us-east-1 3 | output = json 4 | -------------------------------------------------------------------------------- /bash/dot.bash_profile: -------------------------------------------------------------------------------- 1 | # bash/dot.bash_profile 2 | 3 | # Sourced on login shells only 4 | # Sourced INSTEAD OF ~/.profile 5 | # macOS always starts a login shell. 6 | # @see http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html 7 | 8 | # @FIXME There are discrepancies on some shells where this is sourced AFTER 9 | # bashrc 10 | 11 | export DKO_SOURCE="${DKO_SOURCE} -> bash/dot.bash_profile[login] {" 12 | 13 | DOTFILES_OS="$(uname)" 14 | export DOTFILES_OS 15 | 16 | this="${BASH_SOURCE[0]}" 17 | if [[ "$OSTYPE" == *'arwin'* ]]; then 18 | BDOTDIR="$(dirname "$(realpath "$this")")" 19 | else 20 | BDOTDIR="$(dirname "$(readlink -f "$this")")" 21 | fi 22 | export BDOTDIR 23 | 24 | . "$BDOTDIR/dot.bashrc" 25 | 26 | DKO_SOURCE="${DKO_SOURCE} }" 27 | # vim: ft=sh 28 | -------------------------------------------------------------------------------- /bat/config: -------------------------------------------------------------------------------- 1 | --paging="never" 2 | --style="numbers" 3 | --theme="base16" 4 | 5 | --map-syntax .ignore:.gitignore 6 | -------------------------------------------------------------------------------- /bin/addcert: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | [[ "$OSTYPE" == *'arwin'* ]] || exit 1 4 | 5 | if [[ -n $1 ]] && [[ -n $2 ]]; then 6 | certutil -d "sql:${HOME}/.pki/nssdb" -A -t TC -n "$1" -i "$2" 7 | else 8 | >&2 echo "Provide a nickname as arg1 and certfile.pem as arg2" 9 | fi 10 | -------------------------------------------------------------------------------- /bin/brew-repair: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Repair brew repo via hard reset 4 | 5 | [[ "$OSTYPE" == *'arwin'* ]] && 6 | command -v brew >/dev/null && 7 | cd -- "$(brew --repo)" && 8 | git fetch && 9 | git reset --hard origin/master && 10 | brew update 11 | -------------------------------------------------------------------------------- /bin/colortest: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | theme=${1:-base16-default.dark.sh} 4 | if [ -f $theme ]; then 5 | # get the color declarations in said theme, assumes there is a block of text that starts with color00= and ends with new line 6 | eval $(awk '/^color00=/,/^$/ {print}' $theme | sed 's/#.*//') 7 | else 8 | printf "No theme file %s found\n" $theme 9 | fi; 10 | ansi_mappings=( 11 | Black 12 | Red 13 | Green 14 | Yellow 15 | Blue 16 | Magenta 17 | Cyan 18 | White 19 | Bright_Black 20 | Bright_Red 21 | Bright_Green 22 | Bright_Yellow 23 | Bright_Blue 24 | Bright_Magenta 25 | Bright_Cyan 26 | Bright_White 27 | ) 28 | colors=( 29 | base00 30 | base08 31 | base0B 32 | base0A 33 | base0D 34 | base0E 35 | base0C 36 | base05 37 | base03 38 | base08 39 | base0B 40 | base0A 41 | base0D 42 | base0E 43 | base0C 44 | base07 45 | base09 46 | base0F 47 | base01 48 | base02 49 | base04 50 | base06 51 | ) 52 | for padded_value in `seq -w 0 21`; do 53 | color_variable="color${padded_value}" 54 | eval current_color=\$${color_variable} 55 | current_color=$(echo ${current_color//\//} | tr '[:lower:]' '[:upper:]') # get rid of slashes, and uppercase 56 | non_padded_value=$((10#$padded_value)) 57 | base16_color_name=${colors[$non_padded_value]} 58 | current_color_label=${current_color:-unknown} 59 | ansi_label=${ansi_mappings[$non_padded_value]} 60 | block=$(printf "\x1b[48;5;${non_padded_value}m___________________________") 61 | foreground=$(printf "\x1b[38;5;${non_padded_value}m$color_variable") 62 | printf "%s %s %s %-30s %s\x1b[0m\n" $foreground $base16_color_name $current_color_label ${ansi_label:-""} $block 63 | done; 64 | -------------------------------------------------------------------------------- /bin/curlperf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # curlperf 4 | # 5 | # Simple alternative to apachebench to get request time for a URL 6 | # 7 | 8 | # @param $1 url 9 | __curlperf() { 10 | curl \ 11 | -o /dev/null \ 12 | -s \ 13 | -w "%{time_connect} + %{time_starttransfer} = %{time_total}\n" \ 14 | "$1" 15 | } 16 | 17 | [ -n "$#" ] && __curlperf "$1" 18 | -------------------------------------------------------------------------------- /bin/dko-center: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | columns="$(tput cols)" 4 | while IFS= read -r line; do 5 | printf "%*s\n" $(((${#line} + columns) / 2)) "$line" 6 | done <<<"$1" 7 | -------------------------------------------------------------------------------- /bin/dko-fix-git-completion: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | _main() { 4 | local site_functions="${HOMEBREW_PREFIX}/share/zsh/site-functions" 5 | local zsh_git_completion="${site_functions}/_git" 6 | [[ -e "$zsh_git_completion" ]] && 7 | [[ -e "${site_functions}/git-completion.bash" ]] && 8 | rm "$zsh_git_completion" 9 | } 10 | 11 | _main 12 | -------------------------------------------------------------------------------- /bin/dko-header: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | p=$(dirname "${BASH_SOURCE[0]}") 4 | "${p}/dko-line" 5 | "${p}/dko-center" "$1" 6 | "${p}/dko-line" 7 | -------------------------------------------------------------------------------- /bin/dko-java_home: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Unlike OSX java_home this gets the JRE home 4 | # http://sbndev.astro.umd.edu/wiki/Finding_and_Setting_JAVA_HOME 5 | 6 | # Routine to get system property settings from default java installation 7 | # and return the value of java.home (for setting JAVA_HOME environment 8 | # variable). 9 | # 20 March 2015, A.C.Raugh 10 | # 11 | #======================================================================= 12 | 13 | open (INP, "java -XshowSettings:properties 2>&1 |") || 14 | die "Could not open input pipe to get Java settings, "; 15 | 16 | while ($line = ) 17 | { if ($line =~ /java\.home./) 18 | { chomp $line; 19 | $line =~ s/^\s*java\.home\s*=\s*//; 20 | print ($line,$/); 21 | close(INP); 22 | last; 23 | } 24 | } 25 | exit; 26 | -------------------------------------------------------------------------------- /bin/dko-line: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | columns="$(tput cols)" 4 | printf %"$columns"s | tr " " "=" 5 | printf "\n" 6 | -------------------------------------------------------------------------------- /bin/dko-maybemkdir: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd -- "$(dirname "$0")/.." || exit 1 4 | __dotfiles_dir="$PWD" 5 | . "${__dotfiles_dir}/lib/pretty.bash" 6 | 7 | __maybemkdir() { 8 | if [[ ! -d "$1" ]]; then 9 | __dko_status "Directory ${1} does not exist." 10 | 11 | if [[ -z "$DKO_AUTO" ]] && [[ -z "$CI" ]]; then 12 | read -p " Create? [y/N] " -r 13 | [[ ! $REPLY =~ ^[Yy]$ ]] && return 1 14 | fi 15 | 16 | mkdir -p -- "$1" && __dko_ok "Created ${1}" 17 | fi 18 | } 19 | 20 | __maybemkdir "$1" 21 | -------------------------------------------------------------------------------- /bin/dko-open: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ "$OSTYPE" = *'arwin'* ]]; then 4 | open "$@" 5 | else 6 | xdg-open "$@" >/dev/null 7 | fi 8 | 9 | -------------------------------------------------------------------------------- /bin/dko-same: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd -- "$(dirname "$0")/.." || exit 1 4 | __dotfiles_dir="$PWD" 5 | . "${__dotfiles_dir}/lib/helpers.sh" 6 | . "${__dotfiles_dir}/lib/pretty.bash" 7 | 8 | # $1 source file path 9 | # $2 dest file path 10 | # return success if fulltargetpath is resolvedpath 11 | __dko_same() { 12 | local sourcepath="$1" 13 | local targetpath="$2" 14 | 15 | if [[ -f "$targetpath" ]] || [[ -d "$targetpath" ]]; then 16 | local resolvedpath 17 | 18 | if __dko_has "realpath"; then 19 | realsourcepath=$(realpath "$sourcepath") 20 | resolvedpath=$(realpath "$targetpath") 21 | elif __dko_has "readlink" && [[ "${OSTYPE}" == *'arwin'* ]]; then 22 | # lazy case insensitive :p 23 | realsourcepath=$(readlink "$sourcepath") 24 | resolvedpath=$(readlink "$targetpath") 25 | else 26 | __dko_err "$targetpath exists but unable to determine if it is properly linked." 27 | # http://www.tldp.org/LDP/abs/html/exitcodes.html 28 | return 126 29 | fi 30 | 31 | [[ "$resolvedpath" == "$realsourcepath" ]] && { 32 | __dko_status "${targetpath} already linked to ${resolvedpath}" 33 | return 0 34 | } 35 | 36 | __dko_warn "${targetpath}" 37 | __dko_warn_ "is a symlink to ${resolvedpath}" 38 | __dko_warn_ "but should be ${realsourcepath}" 39 | return 10 40 | fi 41 | 42 | # does not exist 43 | __dko_status "${targetpath} not found" 44 | return 20 45 | } 46 | 47 | __dko_same "$@" 48 | -------------------------------------------------------------------------------- /bin/dko-symlink: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd -- "$(dirname "$0")/.." || exit 1 4 | __dotfiles_dir="$PWD" 5 | . "${__dotfiles_dir}/lib/pretty.bash" 6 | 7 | __dko_symlinking() { 8 | printf '\033[0;32m==> OK: \033[0;35m%s\033[0;m -> %s\033[0;m\n' "$1" "$2" 9 | } 10 | 11 | # symlinking helper function for ~/.dotfiles 12 | # $1 source file in $DOTFILES, assuming ${HOME}/.dotfiles 13 | # $2 dest file relative to $HOME 14 | __dko_symlink() { 15 | local sourcepath="${__dotfiles_dir}/${1}" 16 | local fulltargetpath="${HOME}/${2}" 17 | local targetdir 18 | 19 | dko-same "$sourcepath" "$fulltargetpath" 20 | local result=$? 21 | 22 | if (( result == 0 )); then 23 | # properly symlinked 24 | return 25 | elif (( result == 10 )); then 26 | if [[ -n "$CI" ]]; then 27 | __dko_ok_ "CI run: skipping ${fulltargetpath}" 28 | return 29 | fi 30 | if [[ -z "$DKO_AUTO" ]]; then 31 | read -p " Overwrite? [y/N] " -r 32 | if [[ ! $REPLY =~ ^[Yy]$ ]]; then 33 | __dko_warn "Skipped ${fulltargetpath}" 34 | return 35 | fi 36 | fi 37 | # OVERWRITE! 38 | elif (( result != 20 )); then 39 | # could not determine status 40 | return 41 | fi 42 | 43 | __dko_symlinking "${fulltargetpath}" "${sourcepath}" 44 | 45 | targetdir="$(dirname "$fulltargetpath")" 46 | dko-maybemkdir "$targetdir" || return 1 47 | ln -fns "$sourcepath" "$fulltargetpath" 48 | } 49 | 50 | __dko_symlink "$@" 51 | -------------------------------------------------------------------------------- /bin/dkosourced: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('../lib/sources.js')(); 4 | -------------------------------------------------------------------------------- /bin/edark: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | nvim --server "${XDG_STATE_HOME}/nvim/nvim.sock" --remote-expr "execute('DKODark')" 4 | -------------------------------------------------------------------------------- /bin/egr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | __maybe_git_root() { 6 | local git_root="." 7 | 8 | # check for git root 9 | if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 10 | git_root="$(git rev-parse --show-toplevel)" 11 | fi 12 | 13 | printf '%s\n' "$git_root" 14 | } 15 | 16 | # find and edit file from git root 17 | # 18 | __egr() { 19 | local filename="${1:-README.md}" 20 | local git_root 21 | git_root=$(__maybe_git_root) 22 | 23 | if [ -f "${git_root}/${filename}" ]; then 24 | eval "${EGR_EDITOR:-$EDITOR} \"${git_root}/${filename}\"" 25 | else 26 | >&2 echo "No file to edit." 27 | return 1 28 | fi 29 | } 30 | 31 | __egr "$1" 32 | 33 | -------------------------------------------------------------------------------- /bin/elight: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | nvim --server "${XDG_STATE_HOME}/nvim/nvim.sock" --remote-expr "execute('DKOLight')" 4 | -------------------------------------------------------------------------------- /bin/enginx: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # enginx 4 | # 5 | # Locate and edit the main nginx configuration file as root 6 | # 7 | 8 | _enginx() { 9 | local nginx_conf 10 | 11 | nginx_conf="$(sudo nginx -t 2>&1 | grep -Eom1 "configuration file (\S*) " | awk 'END { print $NF }')" 12 | if [ -f "$nginx_conf" ]; then 13 | printf 'Editing %s...\n' "$nginx_conf" 14 | sudo -e "$nginx_conf" 15 | else 16 | >&2 echo "No nginx.conf file found" 17 | exit 1 18 | fi 19 | } 20 | 21 | _enginx 22 | -------------------------------------------------------------------------------- /bin/ephp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | phpini="$(php -d display_startup_errors=0 -r 'echo php_ini_loaded_file();' 2>/dev/null)" 4 | if [ -w "${phpini}" ]; then 5 | eval "${EDITOR:-vim} ${phpini}" 6 | else 7 | sudo -e "${phpini}" 8 | fi 9 | -------------------------------------------------------------------------------- /bin/flatten: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # flatten a dir 4 | __flatten() { 5 | if [[ -n "$1" ]]; then 6 | read -r "reply?Flatten folder: are you sure? [y] " 7 | else 8 | local _reply=y 9 | fi 10 | 11 | [[ "$_reply" = "y" ]] && mv ./*/* . 12 | } 13 | 14 | __flatten "$@" 15 | -------------------------------------------------------------------------------- /bin/fs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Determine size of a file or total size of a directory 4 | __fs() { 5 | local arg 6 | if du -b /dev/null > /dev/null 2>&1; then 7 | arg=-sbh 8 | else 9 | arg=-sh 10 | fi 11 | 12 | if (( $# > 0 )); then 13 | du "$arg" -- "$@" 14 | else 15 | du "$arg" .[^.]* ./* 16 | fi 17 | } 18 | 19 | __fs "$@" 20 | -------------------------------------------------------------------------------- /bin/fu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Look upwards from $PWD for filename $1, output to stdout if found. 4 | # Does not follow symlinks. 5 | # 6 | # MIT License 7 | # 8 | 9 | set -eu 10 | 11 | __fu() { 12 | local current_path="$PWD" 13 | local filename="$1" 14 | local filepath 15 | while :; do 16 | filepath="${current_path}/${filename}" 17 | [ -f "$filepath" ] && printf '%s\n' "$filepath" && break 18 | if [[ "$current_path" == '/' ]] || [[ ! -e "$current_path" ]]; then 19 | return 1 20 | fi 21 | current_path=$(dirname "$current_path") 22 | done 23 | } 24 | __fu "$@" 25 | -------------------------------------------------------------------------------- /bin/fzf-audio: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # 3 | # fzf-audio - fzf interface for SwitchAudioSource 4 | 5 | __fzf-audio() { 6 | SwitchAudioSource -s \ 7 | "$(SwitchAudioSource -a | grep "(output)" |\ 8 | fzf --height=8 --cycle --no-mouse --no-multi |\ 9 | cut -f1 -d'(' | xargs)" 10 | } 11 | 12 | command -v SwitchAudioSource >/dev/null && __fzf-audio 13 | -------------------------------------------------------------------------------- /bin/fzf-git-branch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # fzf-git-branch - checkout git branch 4 | # Uses fzf 5 | # @see 6 | 7 | # get_local_branches 8 | # 9 | # Proper way to get a porcelain list of local branches for shell script use 10 | # 11 | __get_local_branches() { 12 | local fmt 13 | fmt=" 14 | r=%(refname) 15 | refname_without_prefix=\${r#refs/heads/} 16 | printf \"%s\\t%s\\n\" \"\$refname_without_prefix\" 17 | " 18 | 19 | local cmd_get_local_branches 20 | cmd_get_local_branches=$( 21 | git for-each-ref --shell --format="$fmt" refs/heads 22 | ) 23 | 24 | eval "$cmd_get_local_branches" 25 | } 26 | 27 | __fzf-git-branch() { 28 | local current 29 | current=$(git rev-parse --abbrev-ref HEAD) 30 | if [ -z "$current" ]; then 31 | >&2 echo "You must be in a git repo to get branches." 32 | return 1 33 | fi 34 | 35 | local branches 36 | branches="$(__get_local_branches)" 37 | if [ -z "$branches" ]; then 38 | >&2 echo "No branches found." 39 | return 1 40 | fi 41 | 42 | local out 43 | out=$(fzf \ 44 | +m \ 45 | --cycle \ 46 | --exit-0 \ 47 | --expect=ctrl-y \ 48 | --height=25% --no-hscroll --no-multi \ 49 | --no-mouse \ 50 | --nth=1 \ 51 | --preview="git log {1} --abbrev-commit --oneline --max-count 25" \ 52 | --prompt="${current}> " <<<"$branches") 53 | 54 | local branch 55 | branch="$(head -2 <<<"$out" | tail -1)" 56 | branch="${branch//[[:blank:]]/}" # strip spaces 57 | [ -z "$branch" ] && return 1 58 | 59 | local key 60 | key="$(head -1 <<<"$out")" 61 | 62 | if [[ "$key" == "ctrl-y" ]]; then 63 | printf '%s' "$branch" | pbcopy 64 | printf '"%s" copied into clipboard\n' "$branch" 65 | return 66 | fi 67 | 68 | git checkout "$branch" 69 | } 70 | __fzf-git-branch 71 | -------------------------------------------------------------------------------- /bin/fzf-git-latest-branches: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # fzf-git-latest-branches - checkout git branch (including remote branches), 4 | # sorted by most recent commit, limit 30 last branches 5 | # Uses fzf. This is a modified fzf-git-branch from the fzf examples 6 | # @see 7 | 8 | __fzf-git-latest-branches() { 9 | local current 10 | current=$(git rev-parse --abbrev-ref HEAD) 11 | if [ -z "$current" ]; then 12 | >&2 echo "You must be in a git repo to get branches." 13 | return 1 14 | fi 15 | 16 | local branches 17 | branches=$(git for-each-ref \ 18 | --count=30 \ 19 | --sort=-committerdate \ 20 | --format="%(refname:short)" \ 21 | refs/heads/ | grep -v "$current") 22 | if [ -z "$branches" ]; then 23 | >&2 echo "No branches found." 24 | return 1 25 | fi 26 | 27 | local out 28 | out=$(fzf \ 29 | +m \ 30 | --cycle \ 31 | --delimiter="$(( 2 + $(wc -l <<< "$branches") ))" \ 32 | --exit-0 \ 33 | --expect=ctrl-y \ 34 | --height=25% --no-hscroll --no-mouse --no-multi \ 35 | --preview="git log {1} --abbrev-commit --oneline --max-count 25" \ 36 | --prompt="${current}> " <<< "$branches") \ 37 | 38 | local branch 39 | branch="$(head -2 <<< "$out" | tail -1)" 40 | branch="${branch//[[:blank:]]/}" # strip spaces 41 | branch="$(printf '%s' "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##")" 42 | [ -z "$branch" ] && return 1 43 | 44 | local key 45 | key="$(head -1 <<< "$out")" 46 | if [[ "$key" == "ctrl-y" ]]; then 47 | printf '%s' "$branch" | pbcopy 48 | printf '"%s" copied into clipboard\n' "$branch" 49 | return 50 | fi 51 | 52 | git checkout "$branch" 53 | } 54 | __fzf-git-latest-branches 55 | -------------------------------------------------------------------------------- /bin/fzf-git-worktree: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # fzf-git-worktree - switch to worktree directory 4 | # Uses fzf 5 | # @see 6 | 7 | __fzf-git-worktree() { 8 | local current 9 | current=$(git rev-parse --abbrev-ref HEAD) 10 | if [ -z "$current" ]; then 11 | >&2 echo "You must be in a git repo to get worktrees." 12 | return 1 13 | fi 14 | 15 | local out 16 | out=$(fzf \ 17 | +m \ 18 | --cycle \ 19 | --exit-0 \ 20 | --expect=ctrl-y \ 21 | --height=25% --no-hscroll --no-mouse --no-multi \ 22 | --prompt="${current}> " <<<"$(git worktree list)") 23 | 24 | local worktree 25 | worktree="$(head -2 <<<"$out" | tail -1)" 26 | worktree="$(cut -f 1 -d " " <<<"$worktree")" 27 | [ -z "$worktree" ] && return 1 28 | 29 | local key 30 | key="$(head -1 <<<"$out")" 31 | 32 | if [[ "$key" == "ctrl-y" ]]; then 33 | printf '%s' "$worktree" | pbcopy 34 | printf '"%s" copied into clipboard\n' "$worktree" 35 | return 36 | fi 37 | 38 | # remember, can't cd inside a script! 39 | printf '%s\n' "$worktree" 40 | } 41 | __fzf-git-worktree 42 | -------------------------------------------------------------------------------- /bin/fzf-xcode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # 3 | # fzf-xcode - XCode version switcher 4 | # Uses fzf 5 | # @see 6 | 7 | __main() { 8 | local current 9 | local version 10 | 11 | command -v fzf >/dev/null || return 1 12 | command -v xcode-select >/dev/null || return 1 13 | 14 | current=$(xcode-select --print-path) 15 | version=$(find /Applications -maxdepth 1 -iname 'Xcode*.app' | fzf \ 16 | +m \ 17 | --cycle \ 18 | --exit-0 \ 19 | --height=25% --no-hscroll --no-mouse --no-multi \ 20 | --nth=1 \ 21 | --prompt="$current> ") \ 22 | && sudo xcode-select --switch "${version}" \ 23 | && printf 'Now using %s' "$version" 24 | } 25 | 26 | [[ "$OSTYPE" == *'arwin'* ]] && __main 27 | -------------------------------------------------------------------------------- /bin/get-nvim: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | __main() { 4 | local image 5 | 6 | local architecture 7 | architecture="$(dpkg-architecture -q DEB_BUILD_ARCH)" 8 | case "$architecture" in 9 | amd64) 10 | image="https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.appimage" 11 | ;; 12 | *) 13 | image="https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-arm64.appimage" 14 | ;; 15 | esac 16 | 17 | curl -L -o ~/.local/bin/nvim "$image" 18 | chmod ug+x ~/.local/bin/nvim 19 | } 20 | __main 21 | -------------------------------------------------------------------------------- /bin/get-wezterm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | curl -L -o ~/.local/bin/wezterm \ 4 | https://github.com/wez/wezterm/releases/download/nightly/WezTerm-nightly-Ubuntu20.04.AppImage 5 | chmod ug+x ~/.local/bin/wezterm 6 | -------------------------------------------------------------------------------- /bin/git-committers: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | git ls-tree --name-only -r HEAD \ 6 | | xargs -n1 git blame --line-porcelain \ 7 | | grep "^author " \ 8 | | sort \ 9 | | uniq -c \ 10 | | sort -nr 11 | 12 | -------------------------------------------------------------------------------- /bin/git-copy-branch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | main() { 4 | if command -v pbcopy >/dev/null; then 5 | git rev-parse --abbrev-ref HEAD | tr -d '[:space:]' | pbcopy 6 | else 7 | git rev-parse --abbrev-ref HEAD | tr -d '[:space:]' | xsel --clipboard 8 | fi 9 | } 10 | main 11 | -------------------------------------------------------------------------------- /bin/git-dirsha: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | git log -1 --format=format:%H $@ 4 | -------------------------------------------------------------------------------- /bin/git-in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # git-in v0.1.0 4 | # 5 | # Show whether or not a given path is in a git repository 6 | # 7 | # Usage: 8 | # 9 | # git in $some_path 10 | # 11 | 12 | 13 | # Exits with error if not a git repository 14 | __check_in_repository() { 15 | git rev-parse --git-dir > /dev/null 2>&1 16 | } 17 | 18 | 19 | # exit with message if invalid usage 20 | __check_args() { 21 | if (( $# == 0 )); then 22 | >&2 echo "ERROR: Please provide a path argument." 23 | exit 1 24 | fi 25 | 26 | if [ ! -f "$1" ] && [ ! -d "$1" ]; then 27 | >&2 echo "ERROR: Path does not exist." 28 | exit 1 29 | fi 30 | } 31 | 32 | 33 | # cd into path's directory and exit with check_in_repository status 34 | # so either 0 (in git) or 128 (not in git) 35 | __git_in() { 36 | local dir_path=$1 37 | local remote 38 | 39 | if [ -f "$1" ]; then 40 | dir_path="$(dirname "$1")" 41 | fi 42 | 43 | dir_path="$(realpath "$dir_path")" 44 | cd -- "$dir_path" || { 45 | >&2 printf 'ERROR: Could not enter %s\ns' "$dir_path" 46 | exit 1 47 | } 48 | 49 | if __check_in_repository; then 50 | printf 'local repo %s\n' "$(git rev-parse --show-toplevel)" 51 | 52 | remote="$(git config --get remote.origin.url)" 53 | if [ -n "$remote" ]; then 54 | printf 'with origin %s\n' "$remote" 55 | fi 56 | else 57 | >&2 echo "ERROR: Path is not in a repo." 58 | exit 1 59 | fi 60 | } 61 | 62 | 63 | __check_args "$@" 64 | __git_in "$1" 65 | -------------------------------------------------------------------------------- /bin/git-key: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Get SSH Key from GitHub 4 | # 5 | # MIT License 6 | # 7 | 8 | set -eu 9 | 10 | __git_key() { 11 | local gituser 12 | gituser="${1:-$(git config --includes --get github.user)}" 13 | curl "https://github.com/${gituser}.keys" 14 | } 15 | 16 | __git_key "$@" 17 | -------------------------------------------------------------------------------- /bin/git-lp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # List pull requests since last tag 4 | # 5 | 6 | set -eu 7 | 8 | _lastprs() { 9 | local has_tags 10 | local last_tag 11 | local search 12 | 13 | has_tags="$(git tag)" 14 | if [ -z "$has_tags" ]; then 15 | echo "No tags found." 16 | exit 0 17 | fi 18 | 19 | last_tag="$(git describe --tags --abbrev=0)" 20 | search="pull request.*" 21 | git log --pretty=format:'%s' "${last_tag}..HEAD" | grep "${search}" 22 | } 23 | 24 | _lastprs 25 | 26 | -------------------------------------------------------------------------------- /bin/git-open: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | __git_open() { 6 | local origin 7 | origin="$(git remote get-url origin)" 8 | case "$origin" in 9 | *github*) 10 | if command -v gh >/dev/null; then 11 | gh repo view --web >/dev/null 12 | elif command -v hub >/dev/null; then 13 | hub browse >/dev/null 14 | else 15 | >&2 echo "[ERROR] Install gh-cli or hub to open GitHub repos" 16 | return 1 17 | fi 18 | ;; 19 | *gitlab*) 20 | if command -v lab >/dev/null; then 21 | lab project browse >/dev/null 22 | else 23 | >&2 echo "[ERROR] Install zaquestion/lab to open GitLab repos" 24 | return 1 25 | fi 26 | ;; 27 | https://*) 28 | dko-open "$origin" >/dev/null & 29 | ;; 30 | *) 31 | printf "[ERROR] Unrecognized origin %s" "$origin" >&2 32 | return 1 33 | ;; 34 | esac 35 | } 36 | __git_open 37 | -------------------------------------------------------------------------------- /bin/git-sbs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | GIT_PAGER=delta DELTA_FEATURES='+side-by-side' git diff "$@" 4 | -------------------------------------------------------------------------------- /bin/git-today: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # git-today 4 | # 5 | # Show my commits for today 6 | # 7 | 8 | __main() { 9 | local author 10 | author="${1:-${GIT_AUTHOR_EMAIL:-${GIT_COMMITTER_EMAIL}}}" 11 | [ -z "$author" ] && author="$(git config --includes --global user.email)" 12 | [ -z "$author" ] && return 1 13 | 14 | printf "%s's commits today:\n" "$author" 15 | git log --since=00:00:00 \ 16 | --all --no-merges --oneline \ 17 | --author="$author" 18 | } 19 | __main "$@" 20 | -------------------------------------------------------------------------------- /bin/giteditor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # giteditor - Custom EDITOR provider 4 | # Uses nvim, fallback to vim, fallback to vi 5 | 6 | log() { 7 | echo "[e] ${1}" 8 | } 9 | 10 | main() { 11 | ! command -v nvim >/dev/null && { 12 | local fallback 13 | fallback="vim" 14 | ! command -v vim >/dev/null && fallback="vi" 15 | 16 | [[ "$E_DEBUG" != "" ]] && log "Use fallback editor ${fallback}" 17 | "$fallback" "$@" 18 | return 19 | } 20 | 21 | typeset -a files=() 22 | for file in "$@"; do 23 | # don't prepend PWD for absolute paths 24 | case "$file" in 25 | /*) ;; 26 | *) file="${PWD}/${file}" ;; 27 | esac 28 | files+=("$file") 29 | done 30 | 31 | # -i means no shada 32 | [[ "$E_DEBUG" != "" ]] && log "nvim -i NONE ${files[*]}" 33 | nvim -i NONE "${files[@]}" 34 | } 35 | 36 | main "$@" 37 | -------------------------------------------------------------------------------- /bin/joingroup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | if [[ -n $1 ]]; then 6 | # add self to group 7 | sudo gpasswd -a "$USER" "$1" 8 | # ensure current env recognizes it without re-logging in 9 | newgrp "$1" 10 | else 11 | echo "USAGE: joingroup GROUP" 12 | fi 13 | -------------------------------------------------------------------------------- /bin/localip: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Get local ip 4 | # 5 | 6 | set -eu 7 | 8 | # silently determine existence of executable 9 | __has() { 10 | command -v "$1" >/dev/null 2>&1 11 | } 12 | 13 | # type localip to get ethernet or wireless ip 14 | __localip() { 15 | # VERIFIED on OS X El Capitan (10.11) via wifi 16 | # VERIFIED on OS X Yosemite (10.10.5) via wifi 17 | # VERIFIED on Mavericks 18 | if __has "ifconfig"; then 19 | ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}' 20 | return 21 | fi 22 | 23 | # OSTYPE is not set on debian chroot 24 | if [[ -n "$OSTYPE" && "$OSTYPE" == *'arwin'* ]]; then 25 | local ethernet 26 | ethernet=$(ipconfig getifaddr en0) 27 | [ -n "$ethernet" ] && printf '%s\n' "$ethernet" && return 0 28 | 29 | local wireless 30 | wireless=$(ipconfig getifaddr en1) 31 | [ -n "$wireless" ] && printf '%s\n' "$wireless" && return 0 32 | 33 | return 1 34 | fi 35 | 36 | # this would be used for debian chroot 37 | if __has "ip"; then 38 | ip addr | grep "inet 192" | awk '{print $2}' | cut -d'/' -f1 39 | return 40 | fi 41 | 42 | # on my debian chroot this yields internal IP, not unchroot'ed ip 43 | __has "hostname" && hostname -i && return 44 | } 45 | 46 | __localip 47 | -------------------------------------------------------------------------------- /bin/lockscreen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Adapted from 4 | # https://github.com/unixorn/tumult.plugin.zsh/blob/master/bin/lockscreen 5 | 6 | [[ "$OSTYPE" == *'arwin'* ]] && \ 7 | exec "/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession" -suspend 8 | -------------------------------------------------------------------------------- /bin/maybe-git-root: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # echo git root if in a git repo, otherwise echo pwd 4 | 5 | set -e 6 | 7 | __maybe_git_root() { 8 | local git_root="." 9 | 10 | # check for git root 11 | git rev-parse --is-inside-work-tree >/dev/null 2>&1 && 12 | git_root="$(git rev-parse --show-toplevel)" 13 | 14 | printf '%s\n' "$git_root" 15 | } 16 | __maybe_git_root 17 | -------------------------------------------------------------------------------- /bin/osc9-notify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | printf "\e]9;%s\e\\" "${1}" 4 | -------------------------------------------------------------------------------- /bin/path: -------------------------------------------------------------------------------- 1 | # NOTE no shebang, this needs access to current shell 2 | # 3 | # _path 4 | # adapted from https://github.com/myfreeweb/zshuery/blob/master/zshuery.sh 5 | 6 | __parse_args() { 7 | local the_path 8 | 9 | # concat array with semicolon to support array paths like fpath 10 | if [ "$1" = "-a" ]; then 11 | the_path=$(echo "${*:2}" | tr " " ":") 12 | 13 | # use path 14 | elif (( $# == 0 )); then 15 | the_path=$PATH 16 | 17 | # use var in $1 18 | else 19 | the_path=$1 20 | 21 | fi 22 | 23 | # return 24 | echo $the_path 25 | } 26 | 27 | __path() { 28 | # split, also split over ; for joined array in ZSH 29 | echo $1 | tr ":" "\n" | tr " " "\n" 30 | } 31 | 32 | __colorize() { 33 | local reset=$(tput sgr0) 34 | local red=$(tput setaf 1 || tput AF 1) 35 | local green=$(tput setaf 2 || tput AF 2) 36 | local yellow=$(tput setaf 3 || tput AF 3) 37 | local blue=$(tput setaf 4 || tput AF 4) 38 | local magenta=$(tput setaf 5 || tput AF 5) 39 | local cyan=$(tput setaf 6 || tput AF 6) 40 | local white=$(tput setaf 7 || tput AF 7) 41 | 42 | # exception for /opt since may have /options 43 | awk "{ sub(\"/usr\", \"${green}/usr${reset}\"); \ 44 | sub(\"/bin\", \"${blue}/bin${reset}\"); \ 45 | sub(\"/sbin\", \"${blue}/sbin${reset}\"); \ 46 | sub(\"/local\", \"${yellow}/local${reset}\"); \ 47 | sub(\"/opt/\", \"${cyan}/opt${reset}/\"); \ 48 | sub(\"/Users\", \"${red}/Users${reset}\"); \ 49 | sub(\"/home\", \"${red}/home${reset}\"); \ 50 | print }" 51 | } 52 | 53 | __path $(__parse_args $@) | __colorize 54 | 55 | # vim: syn=sh : 56 | -------------------------------------------------------------------------------- /bin/prune: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # delete empty subdirs 4 | __prune() { 5 | if [[ -n "$1" ]]; then 6 | read -r "reply?Prune empty directories: are you sure? [y] " 7 | else 8 | local _reply=y 9 | fi 10 | 11 | [[ "$_reply" = y ]] && find . -type d -empty -delete 12 | } 13 | __prune "$@" 14 | -------------------------------------------------------------------------------- /bin/rln: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # rln 4 | # 5 | # Rename symlink's original file and re-symlink 6 | # 7 | 8 | 9 | _usage() { 10 | cat <&2 printf 'ERROR: Invalid target_file %s\n' "$1" 57 | exit 1 58 | else 59 | _rln "$1" "$2" 60 | fi 61 | 62 | -------------------------------------------------------------------------------- /bin/rmtags: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | __maybe_git_root() { 6 | local git_root="." 7 | 8 | # check for git root 9 | if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 10 | git_root="$(git rev-parse --show-toplevel)" 11 | fi 12 | 13 | printf '%s' "$git_root" 14 | } 15 | 16 | # find and edit file from git root 17 | # 18 | __rmtags() { 19 | local git_root 20 | git_root=$(__maybe_git_root) 21 | 22 | if [ -f "${git_root}/.git/tags" ]; then 23 | rm "${git_root}/.git/tags" 24 | else 25 | >&2 echo "Not a git repository." 26 | return 1 27 | fi 28 | } 29 | 30 | __rmtags 31 | 32 | -------------------------------------------------------------------------------- /bin/serve: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd -- "$(dirname "$0")/.." || exit 1 4 | __dotfiles_dir="$PWD" 5 | . "${__dotfiles_dir}/lib/helpers.sh" 6 | . "${__dotfiles_dir}/lib/pretty.bash" 7 | 8 | __serve() { 9 | local port 10 | port="${1:-8888}" 11 | 12 | __dko_has 'python3' && __dko_status "Using python3 http.server" && \ 13 | python3 -m http.server "$port" && \ 14 | return 0 15 | 16 | __dko_has 'python2' && __dko_status "Using python2 SimpleHTTPServer" && \ 17 | python2 -m SimpleHTTPServer "$port" && \ 18 | return 0 19 | 20 | __dko_has 'http-server' && __dko_status "Using node http-server" && \ 21 | http-server -p "$port" && \ 22 | return 0 23 | } 24 | 25 | __serve "$@" 26 | -------------------------------------------------------------------------------- /bin/ssid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Only for macOS 4 | [[ "$OSTYPE" == *'arwin'* ]] && 5 | /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I \ 6 | | awk '/ SSID/ {print substr($0, index($0, $2))}' 7 | -------------------------------------------------------------------------------- /bin/steam-find-missing-lib32: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | __main() { 4 | cd "${XDG_DATA_HOME}/Steam/ubuntu12_32" || return 1 5 | file ./* | 6 | grep ELF | 7 | cut -d: -f1 | 8 | LD_LIBRARY_PATH=. xargs ldd | 9 | grep 'not found' | 10 | sort | 11 | uniq 12 | } 13 | __main 14 | -------------------------------------------------------------------------------- /bin/steam-find-missing-lib64: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | __main() { 4 | cd "${XDG_DATA_HOME}/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu" || return 1 5 | file ./* | 6 | grep ELF | 7 | cut -d: -f1 | 8 | LD_LIBRARY_PATH=. xargs ldd | 9 | grep 'not found' | 10 | sort | 11 | uniq 12 | } 13 | __main 14 | -------------------------------------------------------------------------------- /bin/termcolors: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | readonly s='gYw' 4 | 5 | echo 6 | printf ' ' 7 | printf ' %sm' 40 41 42 43 44 45 46 47 8 | echo 9 | 10 | for FG in '0m' '1m' \ 11 | '30m' '1;30m' '31m' '1;31m' '32m' '1;32m' '33m' '1;33m' \ 12 | '34m' '1;34m' '35m' '1;35m' '36m' '1;36m' '37m' '1;37m'; 13 | do 14 | printf '%6s \033[%s %s ' "$FG" "$FG" "$s"; 15 | for BG in 40m 41m 42m 43m 44m 45m 46m 47m; do 16 | printf ' \033[%s\033[%s %s \033[0m' "$FG" "$BG" "$s" 17 | done 18 | echo 19 | done 20 | echo 21 | -------------------------------------------------------------------------------- /bin/togglemousescaling: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | set -e 4 | 5 | __togglemousescaling() { 6 | local current 7 | local desired 8 | 9 | if (( $# > 0 )); then 10 | if [[ $1 =~ ^[0-3]$ ]]; then 11 | desired="$1" 12 | else 13 | >&2 echo "Invalid value, expected 0, 1, 2 or 3." 14 | return 1 15 | fi 16 | else 17 | current="$(defaults read .GlobalPreferences com.apple.mouse.scaling)" 18 | if [[ "$current" = -1 ]]; then 19 | echo "Mouse scaling was was off, setting to 1" 20 | desired=1 21 | else 22 | echo "Mouse scaling was on, turning off" 23 | desired=-1 24 | fi 25 | fi 26 | 27 | defaults write .GlobalPreferences com.apple.mouse.scaling "$desired" 28 | } 29 | 30 | [[ "$OSTYPE" == *'arwin'* ]] && __togglemousescaling $@ 31 | -------------------------------------------------------------------------------- /bin/wifi-passwords: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Get plaintext saved wifi passwords 4 | 5 | __main() { 6 | if [[ "$OSTYPE" == *'arwin'* ]]; then 7 | security find-generic-password -D "AirPort network password" -g -w 8 | return 9 | fi 10 | 11 | if command -v nmcli >/dev/null; then 12 | local connection 13 | connection="$(nmcli connection show --active | grep wifi | head -n1)" 14 | local connection_name 15 | # first column 16 | connection_name="${connection%% *}" 17 | [ -z "$connection_name" ] && return 1 18 | 19 | local secret 20 | secret="$(nmcli connection show --show-secrets "$connection_name" | grep psk:)" 21 | # last column 22 | echo "${secret##* }" 23 | return 24 | fi 25 | 26 | if [[ -d /etc/NetworkManager/system-connections/ ]]; then 27 | sudo grep -H '^psk=' /etc/NetworkManager/system-connections/* 28 | fi 29 | } 30 | __main 31 | -------------------------------------------------------------------------------- /bin/xcw: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Find first *.xcworkspace and open it in the current Xcode 4 | __xcw() { 5 | local xcode_path 6 | xcode_path="$(xcode-select --print-path)" 7 | [[ -z "$xcode_path" ]] && echo 'Xcode not found' && exit 1 8 | 9 | local xcode_app 10 | xcode_app="${xcode_path/\/Contents\/Developer/}" 11 | 12 | local xcworkspace 13 | xcworkspace=$(find . -depth 1 -type d -iname '*.xcworkspace' | head -n 1) 14 | [[ -z "$xcworkspace" ]] && echo 'No xcworkspaces found' && exit 1 15 | 16 | open -a "${xcode_app}" "$xcworkspace" 17 | } 18 | 19 | [[ "$OSTYPE" == *'arwin'* ]] && __xcw 20 | -------------------------------------------------------------------------------- /bootstrap/mac: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | echo "Use scutil --set XName newname to update these:" 4 | echo "- HostName: $(scutil --get HostName)" 5 | echo "- LocalHostName: $(scutil --get LocalHostName)" 6 | echo "- ComputerName: $(scutil --get ComputerName)" 7 | echo "Ideally they should all be the same" 8 | -------------------------------------------------------------------------------- /bootstrap/pipx-packages: -------------------------------------------------------------------------------- 1 | ansible-lint 2 | bashate 3 | pylint 4 | vim-vint 5 | vulture 6 | yamllint 7 | -------------------------------------------------------------------------------- /bootstrap/symlink-bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # BASH symlinks, safe to run on any system 4 | # 5 | 6 | # ============================================================================ 7 | # initialize script and dependencies 8 | # ============================================================================ 9 | 10 | if [[ -z "$DOTFILES" ]]; then 11 | cd -- "$(dirname "$0")/.." || exit 1 12 | DOTFILES="$PWD" 13 | fi 14 | . "${DOTFILES}/lib/helpers.sh" 15 | . "${DOTFILES}/lib/pretty.bash" 16 | export PATH="${DOTFILES}/bin:${PATH}" 17 | 18 | # ============================================================================ 19 | # Create paths (slow) 20 | # ============================================================================ 21 | 22 | mkdir -p -- "${HOME}/.cache" 23 | mkdir -p -- "${HOME}/.config" 24 | 25 | # ============================================================================ 26 | # Main 27 | # ============================================================================ 28 | 29 | __symlink() { 30 | __dko_status "Symlinking dotfiles for bash" 31 | dko-symlink "bash/dot.bashrc" \ 32 | ".bashrc" 33 | dko-symlink "bash/dot.bash_profile" \ 34 | ".bash_profile" 35 | 36 | __dko_status "Done! [${0}.sh]" 37 | } 38 | __symlink 39 | -------------------------------------------------------------------------------- /bootstrap/xdg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Initially create XDG dirs 4 | # Run after shell/vars sourced 5 | # 6 | 7 | set -eu 8 | 9 | mkdir -p -- "$XDG_STATE_HOME" 10 | mkdir -p -- "$BZR_PLUGIN_PATH" 11 | mkdir -p -- "$BZR_HOME" 12 | mkdir -p -- "$COMPOSER_CACHE_DIR" 13 | mkdir -p -- "$GNUPGHOME" 14 | -------------------------------------------------------------------------------- /git/commit-template: -------------------------------------------------------------------------------- 1 | ${BRANCH} 2 | 3 | ; tokens are replaced in ~/.dotfiles/nvim/lua/dko/behaviors.lua 4 | 5 | ; [ci skip] 6 | ; [skip Scrutinizer] 7 | 8 | ; ============================================================================== 9 | ; Conventional changelog format 10 | ; @see {@link https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y} 11 | ; ============================================================================== 12 | 13 | ; REQUIRED
(scope): lowercase present tense subject no period 14 | ;feat(pencil): add 'graphiteWidth' option 15 | ;fix(graphite): stop graphite breaking when width < 0.1 16 | ;perf(pencil): remove graphiteWidth option 17 | ;docs() 18 | ;chore() 19 | ;refactor() 20 | ;test() 21 | ;revert: feat(pencil): add 'graphiteWidth' option 22 | 23 | ; OPTIONAL present tense body 24 | 25 | ; OPTIONAL