mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-27 22:45:27 +00:00
Compare commits
125 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb3f4a8f6c | ||
|
|
6395895beb | ||
|
|
fa3dc531a0 | ||
| bb7ba3c919 | |||
| 53d91f8248 | |||
| 745fc9b737 | |||
| dbe5ea3ce0 | |||
| 761671e7f7 | |||
| f4df8623b0 | |||
| 03aacb0639 | |||
| 04c85245cc | |||
| 2ccb74422c | |||
| 3c87ed4d2b | |||
| 4e4ff92ae5 | |||
| ef9bf3864b | |||
| cfb9aa696e | |||
| 1c75e7a53f | |||
| 6e8875e734 | |||
| 70a9237166 | |||
| 59b08f8d1f | |||
| c9bc6e597a | |||
| 5cd720cc4d | |||
| e618f64cf5 | |||
| fed9769640 | |||
|
|
95e213d407 | ||
|
|
29a289bc7b | ||
| 9f133469e0 | |||
| ba90a2e6eb | |||
|
|
af32dd6bf3 | ||
|
|
e519d98a68 | ||
| cde571de69 | |||
| b563ba5cd0 | |||
| f357d23559 | |||
|
|
b183fcbdb2 | ||
| 17ce1c6ee6 | |||
| 66de4b3323 | |||
| b55c1a17ba | |||
|
|
3d708861cf | ||
| 9dc647c4af | |||
|
|
3bd73bbbfb | ||
|
|
0a7d331a57 | ||
|
|
40b399a467 | ||
|
|
65dab98c3e | ||
|
|
64f1d7354e | ||
|
|
0d93f2dbb2 | ||
|
|
9dc1ed8b38 | ||
|
|
75b99dd117 | ||
|
|
305355beaf | ||
| 33a7de2dfc | |||
| f5f4f47655 | |||
|
|
4d8d70d390 | ||
|
|
cacc98a7d3 | ||
|
|
9c05733b5d | ||
| d4e02bbb89 | |||
| 32dbec6476 | |||
|
|
980fc9aa7d | ||
|
|
a2c3de1b3b | ||
|
|
16d455a262 | ||
|
|
9ba66c7734 | ||
|
|
86824d8c45 | ||
| 38d853aa8a | |||
|
|
34a0d7d8c4 | ||
|
|
65bf470c5b | ||
|
|
965c47efef | ||
| 410f5ac2b5 | |||
|
|
b6a18688c4 | ||
| 9f1ba5034f | |||
|
|
4cf956aa17 | ||
|
|
f9142a4780 | ||
|
|
bb921189e2 | ||
| a4eb0b0186 | |||
| 1222b8fdb3 | |||
| cced3a5310 | |||
|
|
6c680a0fa9 | ||
|
|
6746fb5381 | ||
| 7b2831ec94 | |||
| a605d46294 | |||
|
|
5e98f61942 | ||
|
|
e2583f4d91 | ||
| 80b2e542bf | |||
| 9c3ba8f2e8 | |||
| 632424ecf9 | |||
|
|
8c8436254e | ||
|
|
fe6f070beb | ||
|
|
2a5b2400d7 | ||
| e109cca22a | |||
| 1d948f6915 | |||
|
|
14c3e376dc | ||
|
|
75a32331b0 | ||
|
|
a708085dda | ||
|
|
7921e079da | ||
|
|
2369eae0ef | ||
|
|
6dc5849f9c | ||
|
|
5cc0018f1d | ||
| 8fbeca17a4 | |||
| 1d1a95fad2 | |||
| 3acc948c23 | |||
| 0f94386231 | |||
| 5e06a735cc | |||
|
|
9471a63475 | ||
|
|
01328498b6 | ||
|
|
bab6f7daab | ||
| 4baabbdd5d | |||
| d5757d231f | |||
| 6190be3bdd | |||
| 0db64845bc | |||
|
|
8a8699bf0c | ||
|
|
8814c777f5 | ||
| bf4b0c50f4 | |||
| c162452dd9 | |||
| c15965915f | |||
|
|
a53d655fd7 | ||
|
|
0f87411f65 | ||
|
|
af461e7234 | ||
|
|
5af773f931 | ||
|
|
976c0580f0 | ||
|
|
0fd327ab9e | ||
|
|
221777dde0 | ||
|
|
1dc430850d | ||
|
|
209b54e15b | ||
|
|
b15f412107 | ||
|
|
28ecb02549 | ||
|
|
e18785eaa7 | ||
|
|
ef6d004f71 | ||
| 50cd1d17e6 |
34
.editorconfig
Normal file
34
.editorconfig
Normal file
@@ -0,0 +1,34 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.lua]
|
||||
insert_final_newline = true
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
|
||||
[*.sh]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
shell_variant = bash # --language-variant
|
||||
binary_next_line = true
|
||||
switch_case_indent = true # --case-indent
|
||||
space_redirects = false
|
||||
keep_padding = false
|
||||
function_next_line = true # --func-next-line
|
||||
|
||||
[local/bin/antigen.zsh]
|
||||
ignore = true
|
||||
221
.gitattributes
vendored
Normal file
221
.gitattributes
vendored
Normal file
@@ -0,0 +1,221 @@
|
||||
## GITATTRIBUTES FOR WEB PROJECTS
|
||||
#
|
||||
# These settings are for any web project.
|
||||
#
|
||||
# Details per file setting:
|
||||
# text These files should be normalized (i.e. convert CRLF to LF).
|
||||
# binary These files are binary and should be left untouched.
|
||||
#
|
||||
# Note that binary is a macro for -text -diff.
|
||||
######################################################################
|
||||
|
||||
# Auto detect
|
||||
## Handle line endings automatically for files detected as
|
||||
## text and leave all files detected as binary untouched.
|
||||
## This will handle all files NOT defined below.
|
||||
* text=auto
|
||||
|
||||
# Source code
|
||||
*.bash text eol=lf
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
*.coffee text
|
||||
*.css text diff=css
|
||||
*.htm text diff=html
|
||||
*.html text diff=html
|
||||
*.inc text
|
||||
*.ini text
|
||||
*.js text
|
||||
*.json text
|
||||
*.jsx text
|
||||
*.less text
|
||||
*.ls text
|
||||
*.map text -diff
|
||||
*.od text
|
||||
*.onlydata text
|
||||
*.php text diff=php
|
||||
*.pl text
|
||||
*.ps1 text eol=crlf
|
||||
*.py text diff=python
|
||||
*.rb text diff=ruby
|
||||
*.sass text
|
||||
*.scm text
|
||||
*.scss text diff=css
|
||||
*.sh text eol=lf
|
||||
.husky/* text eol=lf
|
||||
*.sql text
|
||||
*.styl text
|
||||
*.tag text
|
||||
*.ts text
|
||||
*.tsx text
|
||||
*.xml text
|
||||
*.xhtml text diff=html
|
||||
|
||||
# Docker
|
||||
Dockerfile text
|
||||
|
||||
# Documentation
|
||||
*.ipynb text
|
||||
*.markdown text diff=markdown
|
||||
*.md text diff=markdown
|
||||
*.mdwn text diff=markdown
|
||||
*.mdown text diff=markdown
|
||||
*.mkd text diff=markdown
|
||||
*.mkdn text diff=markdown
|
||||
*.mdtxt text
|
||||
*.mdtext text
|
||||
*.txt text
|
||||
AUTHORS text
|
||||
CHANGELOG text
|
||||
CHANGES text
|
||||
CONTRIBUTING text
|
||||
COPYING text
|
||||
copyright text
|
||||
*COPYRIGHT* text
|
||||
INSTALL text
|
||||
license text
|
||||
LICENSE text
|
||||
NEWS text
|
||||
readme text
|
||||
*README* text
|
||||
TODO text
|
||||
|
||||
# Templates
|
||||
*.dot text
|
||||
*.ejs text
|
||||
*.erb text
|
||||
*.haml text
|
||||
*.handlebars text
|
||||
*.hbs text
|
||||
*.hbt text
|
||||
*.jade text
|
||||
*.latte text
|
||||
*.mustache text
|
||||
*.njk text
|
||||
*.phtml text
|
||||
*.svelte text
|
||||
*.tmpl text
|
||||
*.tpl text
|
||||
*.twig text
|
||||
*.vue text
|
||||
|
||||
# Configs
|
||||
*.cnf text
|
||||
*.conf text
|
||||
*.config text
|
||||
.editorconfig text
|
||||
.env text
|
||||
.gitattributes text
|
||||
.gitconfig text
|
||||
.htaccess text
|
||||
*.lock text -diff
|
||||
package.json text eol=lf
|
||||
package-lock.json text eol=lf -diff
|
||||
pnpm-lock.yaml text eol=lf -diff
|
||||
.prettierrc text
|
||||
yarn.lock text -diff
|
||||
*.toml text
|
||||
*.yaml text
|
||||
*.yml text
|
||||
browserslist text
|
||||
Makefile text
|
||||
makefile text
|
||||
|
||||
# Heroku
|
||||
Procfile text
|
||||
|
||||
# Graphics
|
||||
*.ai binary
|
||||
*.bmp binary
|
||||
*.eps binary
|
||||
*.gif binary
|
||||
*.gifv binary
|
||||
*.ico binary
|
||||
*.jng binary
|
||||
*.jp2 binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.jpx binary
|
||||
*.jxr binary
|
||||
*.pdf binary
|
||||
*.png binary
|
||||
*.psb binary
|
||||
*.psd binary
|
||||
# SVG treated as an asset (binary) by default.
|
||||
*.svg text
|
||||
# If you want to treat it as binary,
|
||||
# use the following line instead.
|
||||
# *.svg binary
|
||||
*.svgz binary
|
||||
*.tif binary
|
||||
*.tiff binary
|
||||
*.wbmp binary
|
||||
*.webp binary
|
||||
|
||||
# Audio
|
||||
*.kar binary
|
||||
*.m4a binary
|
||||
*.mid binary
|
||||
*.midi binary
|
||||
*.mp3 binary
|
||||
*.ogg binary
|
||||
*.ra binary
|
||||
|
||||
# Video
|
||||
*.3gpp binary
|
||||
*.3gp binary
|
||||
*.as binary
|
||||
*.asf binary
|
||||
*.asx binary
|
||||
*.avi binary
|
||||
*.fla binary
|
||||
*.flv binary
|
||||
*.m4v binary
|
||||
*.mng binary
|
||||
*.mov binary
|
||||
*.mp4 binary
|
||||
*.mpeg binary
|
||||
*.mpg binary
|
||||
*.ogv binary
|
||||
*.swc binary
|
||||
*.swf binary
|
||||
*.webm binary
|
||||
|
||||
# Archives
|
||||
*.7z binary
|
||||
*.gz binary
|
||||
*.jar binary
|
||||
*.rar binary
|
||||
*.tar binary
|
||||
*.zip binary
|
||||
|
||||
# Fonts
|
||||
*.ttf binary
|
||||
*.eot binary
|
||||
*.otf binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
|
||||
# Executables
|
||||
*.exe binary
|
||||
*.pyc binary
|
||||
|
||||
# RC files (like .babelrc or .eslintrc)
|
||||
*.*rc text
|
||||
|
||||
# Ignore files (like .npmignore or .gitignore)
|
||||
*.*ignore text
|
||||
|
||||
*.gitignore text
|
||||
*.gitkeep text
|
||||
.gitattributes export-ignore
|
||||
**/.gitignore export-ignore
|
||||
**/.gitkeep export-ignore
|
||||
|
||||
# Repo specials
|
||||
local/bin/* text eol=lf
|
||||
config/antigen.zsh text
|
||||
git/* text
|
||||
**/git/* text
|
||||
**/alias text
|
||||
ssh/* text
|
||||
39
.github/workflows/linters.yml
vendored
Normal file
39
.github/workflows/linters.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: reviewdog
|
||||
on: [push]
|
||||
jobs:
|
||||
linters:
|
||||
name: Linters
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: GitHub Actions
|
||||
uses: reviewdog/action-actionlint@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
reporter: github-pr-review
|
||||
- name: detect-secrets
|
||||
uses: reviewdog/action-detect-secrets@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
reporter: github-pr-review
|
||||
- name: markdownlint
|
||||
uses: reviewdog/action-markdownlint@v0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
reporter: github-pr-review
|
||||
- name: shfmt
|
||||
uses: reviewdog/action-shfmt@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
shfmt_flags: |
|
||||
--find
|
||||
--list
|
||||
--write
|
||||
--diff
|
||||
--simplify
|
||||
--language-dialect bash
|
||||
--indent 2
|
||||
--binary-next-line
|
||||
--case-indent
|
||||
--space-redirects
|
||||
--func-next-line
|
||||
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
Brewfile.lock.json
|
||||
*.log
|
||||
*-secret
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
43
.gitmodules
vendored
Normal file
43
.gitmodules
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
[submodule "dotbot"]
|
||||
path = dotbot
|
||||
url = https://github.com/anishathalye/dotbot.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-brew"]
|
||||
path = dotbot-brew
|
||||
url = https://github.com/wren/dotbot-brew.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-if"]
|
||||
path = dotbot-if
|
||||
url = https://github.com/wonderbeyond/dotbot-if.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-ifplatform"]
|
||||
path = dotbot-ifplatform
|
||||
url = https://github.com/ssbanerje/dotbot-ifplatform.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-gh-extension"]
|
||||
path = dotbot-gh-extension
|
||||
url = https://github.com/fundor333/dotbot-gh-extension.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-golang"]
|
||||
path = dotbot-golang
|
||||
url = https://github.com/delicb/dotbot-golang.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "config/nvim"]
|
||||
path = config/nvim
|
||||
url = https://github.com/AstroNvim/AstroNvim.git
|
||||
ignore = dirty
|
||||
branch = main
|
||||
update = checkout
|
||||
|
||||
[submodule "config/astronvim/lua/user"]
|
||||
path = config/astronvim/lua/user
|
||||
url = https://github.com/ivuorinen/astronvim_config.git
|
||||
update = rebase
|
||||
branch = main
|
||||
ignore = dirty
|
||||
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3
|
||||
25
.yamlfmt
Normal file
25
.yamlfmt
Normal file
@@ -0,0 +1,25 @@
|
||||
formatter:
|
||||
type: basic
|
||||
indent: 2
|
||||
retain_line_breaks: false
|
||||
disallow_anchors: false
|
||||
max_line_length: 0
|
||||
scan_folded_as_literal: false
|
||||
indentless_arrays: false
|
||||
|
||||
doublestar: true
|
||||
|
||||
extensions:
|
||||
- yaml
|
||||
- yml
|
||||
|
||||
include:
|
||||
- ./*.{yml,yaml}
|
||||
- ./**/*.{yml,yaml}
|
||||
|
||||
exclude:
|
||||
- ./dotbot/**
|
||||
- ./dotbot-*/**
|
||||
- ./config/astronvim/**
|
||||
- ./config/nvim/**
|
||||
|
||||
245
Brewfile
245
Brewfile
@@ -1,118 +1,313 @@
|
||||
tap "1password/tap"
|
||||
tap "anchore/grype"
|
||||
tap "codeclimate/formulae"
|
||||
tap "ddosify/tap"
|
||||
tap "dm3ch/tap"
|
||||
tap "gesquive/tap"
|
||||
tap "github/gh"
|
||||
tap "homebrew/autoupdate"
|
||||
tap "homebrew/bundle"
|
||||
tap "homebrew/cask"
|
||||
tap "homebrew/cask-fonts"
|
||||
tap "homebrew/core"
|
||||
tap "homebrew/services"
|
||||
tap "reviewdog/tap"
|
||||
tap "jesseduffield/lazygit"
|
||||
tap "mongodb/brew"
|
||||
tap "shivammathur/extensions"
|
||||
tap "shivammathur/php"
|
||||
tap "wpscanteam/tap"
|
||||
brew "act"
|
||||
brew "python@3.10"
|
||||
tap "teamookla/speedtest"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.11"
|
||||
# Automate deployment, configuration, and upgrading
|
||||
brew "ansible"
|
||||
brew "aspell"
|
||||
brew "autoconf"
|
||||
brew "bandwhich"
|
||||
brew "brew-php-switcher"
|
||||
brew "glib"
|
||||
brew "pkg-config"
|
||||
brew "coreutils"
|
||||
brew "openldap"
|
||||
# Checks ansible playbooks for practices and behaviour
|
||||
brew "ansible-lint"
|
||||
# Zstandard is a real-time compression algorithm
|
||||
brew "zstd"
|
||||
# Spell checker with better logic than ispell
|
||||
brew "aspell"
|
||||
# Automatic configure script builder
|
||||
brew "autoconf"
|
||||
# Official Amazon AWS command-line interface
|
||||
brew "awscli"
|
||||
# Terminal bandwidth utilization tool
|
||||
brew "bandwhich"
|
||||
# Yet another cross-platform graphical process/system monitor
|
||||
brew "bottom"
|
||||
# Switch Apache / Valet / CLI configs between PHP versions
|
||||
brew "brew-php-switcher"
|
||||
# Core application library for C
|
||||
brew "glib"
|
||||
# Manage compile and link flags for libraries
|
||||
brew "pkg-config"
|
||||
# Cross-platform make
|
||||
brew "cmake"
|
||||
# GNU File, Shell, and Text utilities
|
||||
brew "coreutils"
|
||||
# Get, unpack, build, and install modules from CPAN
|
||||
brew "cpanminus"
|
||||
# Open source suite of directory software
|
||||
brew "openldap"
|
||||
# Get a file from an HTTP, HTTPS or FTP server
|
||||
brew "curl"
|
||||
# Diff that understands syntax
|
||||
brew "difftastic"
|
||||
# Tool for exploring each layer in a docker image
|
||||
brew "dive"
|
||||
# Command-line DNS client
|
||||
brew "dog"
|
||||
# Lightning-fast linter for .env files written in Rust
|
||||
brew "dotenv-linter"
|
||||
# Tool to verify that your files are in harmony with your .editorconfig
|
||||
brew "editorconfig-checker"
|
||||
# Useful examples at the command-line
|
||||
brew "eg-examples"
|
||||
# CLI for templating and/or deploying FaaS functions
|
||||
brew "faas-cli"
|
||||
# Simple, fast and user-friendly alternative to find
|
||||
brew "fd"
|
||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||
brew "freetds"
|
||||
# Monitor a directory for changes and run a shell command
|
||||
brew "fswatch"
|
||||
# Disk usage analyzer with console interface written in Go
|
||||
brew "gdu", link: false
|
||||
# GitHub command-line tool
|
||||
brew "gh"
|
||||
# Distributed revision control system
|
||||
brew "git"
|
||||
# Small git utilities
|
||||
brew "git-extras"
|
||||
# AVH edition of git-flow
|
||||
brew "git-flow-avh"
|
||||
# See your latest local git branches, formatted real fancy
|
||||
brew "git-recent"
|
||||
# Open-source GitLab command-line tool
|
||||
brew "glab"
|
||||
# GNU implementation of the famous stream editor
|
||||
brew "gnu-sed"
|
||||
# Validating, recursive, caching DNS resolver
|
||||
brew "unbound"
|
||||
# GNU Transport Layer Security (TLS) Library
|
||||
brew "gnutls"
|
||||
# GNU Pretty Good Privacy (PGP) package
|
||||
brew "gnupg"
|
||||
brew "goaccess"
|
||||
# Open source programming language to build simple/reliable/efficient software
|
||||
brew "go"
|
||||
# Image manipulation
|
||||
brew "netpbm"
|
||||
# C/C++ and Java libraries for Unicode and globalization
|
||||
brew "icu4c"
|
||||
# OpenType text shaping engine
|
||||
brew "harfbuzz"
|
||||
# Library to render SVG files using Cairo
|
||||
brew "librsvg"
|
||||
# Graph visualization software from AT&T and Bell Labs
|
||||
brew "graphviz"
|
||||
# GNU grep, egrep and fgrep
|
||||
brew "grep"
|
||||
# Popular GNU data compression program
|
||||
brew "gzip"
|
||||
# Smarter Dockerfile linter to validate best practices
|
||||
brew "hadolint"
|
||||
# Improved top (interactive process viewer)
|
||||
brew "htop"
|
||||
# Website copier/offline browser
|
||||
brew "httrack"
|
||||
# Tools and libraries to manipulate images in many formats
|
||||
brew "imagemagick"
|
||||
# Lightweight and flexible command-line JSON processor
|
||||
brew "jq"
|
||||
brew "lastpass-cli"
|
||||
# Lazier way to manage everything docker
|
||||
brew "lazydocker"
|
||||
# Postgres C API library
|
||||
brew "libpq"
|
||||
# Linguistic software and Finnish dictionary
|
||||
brew "libvoikko"
|
||||
# Package manager for the Lua programming language
|
||||
brew "luarocks"
|
||||
# Swiss Army Knife for macOS
|
||||
brew "m-cli"
|
||||
# Mac App Store command-line interface
|
||||
brew "mas"
|
||||
# Terminal-based visual file manager
|
||||
brew "midnight-commander"
|
||||
# Ambitious Vim-fork focused on extensibility and agility
|
||||
brew "neovim"
|
||||
# No Nonsense Neovim Client in Rust
|
||||
brew "neovide"
|
||||
# Port scanning utility for large networks
|
||||
brew "nmap"
|
||||
# Manage multiple Node.js versions
|
||||
brew "nvm"
|
||||
# Development kit for the Java programming language
|
||||
brew "openjdk"
|
||||
# Generate clients, server & docs from an OpenAPI spec (v2, v3)
|
||||
brew "openapi-generator"
|
||||
brew "openfortivpn"
|
||||
brew "phpstan"
|
||||
# Swiss-army knife of markup format conversion
|
||||
brew "pandoc"
|
||||
# Highly capable, feature-rich programming language
|
||||
brew "perl"
|
||||
# General-purpose scripting language
|
||||
brew "php@8.1"
|
||||
# Python version management
|
||||
brew "pyenv"
|
||||
# Migrate pip packages from one Python version to another
|
||||
brew "pyenv-pip-migrate"
|
||||
# Pyenv plugin to manage virtualenv
|
||||
brew "pyenv-virtualenv"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.10"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.8"
|
||||
brew "qcachegrind"
|
||||
brew "qt"
|
||||
# RC file (dotfile) management
|
||||
brew "rcm"
|
||||
# Search tool like grep and The Silver Searcher
|
||||
brew "ripgrep"
|
||||
# Powerful, clean, object-oriented scripting language
|
||||
brew "ruby"
|
||||
# Static analysis and lint tool, for (ba)sh scripts
|
||||
brew "shellcheck"
|
||||
# Autoformat shell script source code
|
||||
brew "shfmt"
|
||||
brew "skopeo"
|
||||
# Cross-shell prompt for astronauts
|
||||
brew "starship"
|
||||
# Version control system designed to be a better CVS
|
||||
brew "subversion"
|
||||
# Send macOS User Notifications from the command-line
|
||||
brew "terminal-notifier", link: false
|
||||
brew "terraform@0.12"
|
||||
# Tool to build, change, and version infrastructure
|
||||
brew "terraform", link: false
|
||||
# Thin wrapper for Terraform e.g. for locking state
|
||||
brew "terragrunt"
|
||||
# Tool which checks for the support of TLS/SSL ciphers and flaws
|
||||
brew "testssl"
|
||||
# Terraform version manager inspired by rbenv
|
||||
brew "tfenv"
|
||||
# Static analysis security scanner for your terraform code
|
||||
brew "tfsec"
|
||||
# Programmatically correct mistyped console commands
|
||||
brew "thefuck"
|
||||
# Simplified and community-driven man pages
|
||||
brew "tldr"
|
||||
# Terminal multiplexer
|
||||
brew "tmux"
|
||||
# Display directories as trees (with optional color/HTML output)
|
||||
brew "tree"
|
||||
# Modern watch command
|
||||
brew "viddy"
|
||||
# Tool for creating isolated virtual python environments
|
||||
brew "virtualenv"
|
||||
# Command-line interface to the WakaTime api
|
||||
brew "wakatime-cli"
|
||||
# Executes a program periodically, showing output fullscreen
|
||||
brew "watch"
|
||||
# Internet file retriever
|
||||
brew "wget"
|
||||
# Personal information dashboard for your terminal
|
||||
brew "wtfutil"
|
||||
# JavaScript package manager
|
||||
brew "yarn"
|
||||
# Tracks most-used directories to make cd smarter
|
||||
brew "z"
|
||||
# A vulnerability scanner for container images and filesystems
|
||||
brew "anchore/grype/grype"
|
||||
# High-performance load testing tool, written in Golang.
|
||||
brew "ddosify/tap/ddosify"
|
||||
# lets you quickly switch between multiple git user profiles
|
||||
brew "gesquive/tap/git-user"
|
||||
brew "reviewdog/tap/reviewdog"
|
||||
# A simple terminal UI for git commands, written in Go
|
||||
brew "jesseduffield/lazygit/lazygit"
|
||||
# High-performance, schema-free, document-oriented database
|
||||
brew "mongodb/brew/mongodb-community"
|
||||
# Xdebug PHP extension
|
||||
brew "shivammathur/extensions/xdebug@7.4"
|
||||
# Xdebug PHP extension
|
||||
brew "shivammathur/extensions/xdebug@8.0"
|
||||
# Xdebug PHP extension
|
||||
brew "shivammathur/extensions/xdebug@8.1"
|
||||
# General-purpose scripting language
|
||||
brew "shivammathur/php/php"
|
||||
# General-purpose scripting language
|
||||
brew "shivammathur/php/php@7.4"
|
||||
# General-purpose scripting language
|
||||
brew "shivammathur/php/php@8.0"
|
||||
brew "wpscanteam/tap/wpscan"
|
||||
# Ookla Speedtest
|
||||
brew "teamookla/speedtest/speedtest"
|
||||
# Command-line helper for the 1Password password manager
|
||||
cask "1password-cli"
|
||||
# Text editor
|
||||
cask "coda"
|
||||
# App to build and share containerized applications and microservices
|
||||
cask "docker"
|
||||
# Reimagine your terminal
|
||||
cask "fig"
|
||||
# Unofficial overcast.fm podcast app
|
||||
cask "fog"
|
||||
# Typeface made for developers
|
||||
cask "font-jetbrains-mono"
|
||||
# Developer targeted fonts with a high number of glyphs
|
||||
cask "font-jetbrains-mono-nerd-font"
|
||||
cask "font-lato"
|
||||
cask "font-open-sans"
|
||||
# Font with a mechanical skeleton and the forms are largely geometric
|
||||
cask "font-roboto"
|
||||
cask "font-source-code-pro"
|
||||
cask "font-source-code-pro-for-powerline"
|
||||
cask "font-source-sans-pro"
|
||||
cask "font-source-serif-pro"
|
||||
# Open Source Webfont Converter
|
||||
cask "fontplop"
|
||||
# GIT client
|
||||
cask "fork"
|
||||
# Set of tools to manage resources and applications hosted on Google Cloud
|
||||
cask "google-cloud-sdk"
|
||||
# HTTP and GraphQL Client
|
||||
cask "insomnia"
|
||||
cask "iterm2"
|
||||
cask "keybase"
|
||||
# JetBrains tools manager
|
||||
cask "jetbrains-toolbox"
|
||||
# Kubernetes IDE
|
||||
cask "lens"
|
||||
# Reverse proxy, secure introspectable tunnels to localhost
|
||||
cask "ngrok"
|
||||
# Collaboration platform for API development
|
||||
cask "postman"
|
||||
# Display image info and preview unsupported formats in QuickLook
|
||||
cask "qlimagesize"
|
||||
# QuickLook generator for Markdown files
|
||||
cask "qlmarkdown"
|
||||
# QuickLook plugin for plaintext files without an extension
|
||||
cask "qlstephen"
|
||||
# QuickLook plugin for JSON files
|
||||
cask "quicklook-json"
|
||||
# QuickLook generator for Adobe Swatch Exchange files
|
||||
cask "quicklookase"
|
||||
# Automatically hides or quits apps after periods of inactivity
|
||||
cask "quitter"
|
||||
# Move and resize windows using keyboard shortcuts or snap areas
|
||||
cask "rectangle"
|
||||
# MySQL/MariaDB database management
|
||||
cask "sequel-ace"
|
||||
# Collection of apps available by subscription
|
||||
cask "setapp"
|
||||
# Team communication and collaboration software
|
||||
cask "slack"
|
||||
# Sound and audio controller
|
||||
cask "soundsource"
|
||||
# Application for inspecting installer packages
|
||||
cask "suspicious-package"
|
||||
# Quicklook extension for source files
|
||||
cask "syntax-highlight"
|
||||
# Open-source code editor
|
||||
cask "visual-studio-code"
|
||||
# Multimedia player
|
||||
cask "vlc"
|
||||
# Spell-checking service for Finnish
|
||||
cask "voikkospellservice"
|
||||
# Rust-based terminal
|
||||
cask "warp"
|
||||
# View output from scripts in the menu bar
|
||||
cask "xbar"
|
||||
mas "1Password for Safari", id: 1569813296
|
||||
mas "Flow", id: 1423210932
|
||||
mas "pullBar", id: 1601913905
|
||||
mas "Tailscale", id: 1475387142
|
||||
|
||||
94
README.md
Normal file
94
README.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# .dotfiles
|
||||
|
||||
Welcome to [ivuorinen](https://github.com/ivuorinen)'s .dotfiles repository.
|
||||
It's a hodgepodge of scripts and configurations, tests and mistakes I'm not
|
||||
aware of yet. As I find more interesting tools, configs and other stuff,
|
||||
this repository will live accordingly.
|
||||
|
||||
Please for the love of everything good do not use these 1:1 as your own dotfiles,
|
||||
fork or download the repo as a zip and go from there with your own configs.
|
||||
|
||||
## Setup
|
||||
|
||||
### First time setup
|
||||
|
||||
1. Clone this repository to `$HOME/.dotfiles`
|
||||
2. `./install`
|
||||
3. ???
|
||||
4. Profit
|
||||
|
||||
## Interesting files and locations
|
||||
|
||||
### Interesting folders
|
||||
|
||||
| Path | Description |
|
||||
| ------------------- | -------------------------------------------- |
|
||||
| `.github` | GitHub Repository configuration files. |
|
||||
| `hosts/{hostname}/` | Configs that should apply to that host only. |
|
||||
| `local/bin` | Helper scripts that I've collected or wrote. |
|
||||
| `scripts` | Setup scripts. |
|
||||
|
||||
### dotfile folders
|
||||
|
||||
| Repo | Destination | Description |
|
||||
| --------- | ----------- | ------------------------------------------- |
|
||||
| `base/` | `.*` | `$HOME` level files. |
|
||||
| `config/` | `.config/` | Configurations for applications. |
|
||||
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
||||
| `ssh/` | `.ssh/` | SSH Configurations. |
|
||||
|
||||
### dfm - the dotfiles manager
|
||||
|
||||
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
||||
|
||||
## Configuration
|
||||
|
||||
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
|
||||
|
||||
### XDG Variables
|
||||
|
||||
| Var | Default |
|
||||
| ------------------ | -------------------- |
|
||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` |
|
||||
| `$XDG_STATE_HOME` | `$HOME/.local/state` |
|
||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` |
|
||||
| `$XDG_BIN_HOME` | `$HOME/.local/bin` |
|
||||
|
||||
- `$XDG_BIN_HOME` is a custom `env` for `.local/bin` folder.
|
||||
- `$XDG_DATA_HOME` defines the base directory relative to which user-specific data
|
||||
files should be stored. If `$XDG_DATA_HOME` is either not set or empty,
|
||||
a default equal to `$HOME/.local/share` should be used.
|
||||
- `$XDG_CONFIG_HOME` defines the base directory relative to which user-specific configuration
|
||||
files should be stored. If `$XDG_CONFIG_HOME` is either not set or empty,
|
||||
a default equal to `$HOME/.config` should be used.
|
||||
- `$XDG_STATE_HOME` defines the base directory relative
|
||||
to which user-specific state files should be stored.
|
||||
If `$XDG_STATE_HOME` is either not set or empty, a default
|
||||
equal to `$HOME/.local/state` should be used.
|
||||
- The `$XDG_STATE_HOME` contains state data that should persist
|
||||
between (application) restarts,
|
||||
but that is not important or portable enough to the user that
|
||||
it should be stored in `$XDG_DATA_HOME`.
|
||||
It may contain:
|
||||
- actions history (logs, history, recently used files, …)
|
||||
- current state of the application that can be reused
|
||||
on a restart (view, layout, open files, undo history, …)
|
||||
- User-specific executable files may be stored in `$HOME/.local/bin`.
|
||||
Distributions should ensure this directory shows up in the UNIX `$PATH`
|
||||
environment variable, at an appropriate place.
|
||||
- `$XDG_DATA_DIRS` defines the preference-ordered set of base directories
|
||||
to search for data files in addition to the `$XDG_DATA_HOME` base directory.
|
||||
The directories in `$XDG_DATA_DIRS` should be seperated with a colon ':'.
|
||||
|
||||
[xdg]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
|
||||
## Interesting links
|
||||
|
||||
### Interesting dotfiles repos
|
||||
|
||||
- [dotfiles.github.io/inspiration/](https://dotfiles.github.io/inspiration)
|
||||
- [frdmn/dotfiles](https://github.com/github.com/frdmn/dotfiles) - Ansible-based
|
||||
dotfile setup for macOS
|
||||
- [mvdan/dotfiles](https://github.com/mvdan/dotfiles) - Here be dragons
|
||||
- [vsouza/dotfiles](https://github.com/vsouza/dotfiles) - 🏡 My dotfiles
|
||||
- [freekmurze/dotfiles](https://github.com/freekmurze/dotfiles) - My personal dotfiles
|
||||
7
add-submodules.sh
Normal file
7
add-submodules.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git dotbot-brew
|
||||
git submodule add --name dotbot-gh-extension -f https://github.com/fundor333/dotbot-gh-extension.git dotbot-gh-extension
|
||||
git submodule add --name dotbot-golang -f https://github.com/delicb/dotbot-golang.git dotbot-golang
|
||||
git submodule add --name dotbot-if -f https://github.com/wonderbeyond/dotbot-if.git dotbot-if
|
||||
git submodule add --name dotbot-ifplatform -f https://github.com/ssbanerje/dotbot-ifplatform.git dotbot-ifplatform
|
||||
42
alias
42
alias
@@ -1,42 +0,0 @@
|
||||
# shellcheck shell=bash
|
||||
# macOS specific
|
||||
if [[ $(uname) == 'Darwin' ]]; then
|
||||
alias file_hide="chflags hidden"
|
||||
alias file_show="chflags nohidden"
|
||||
alias brewUp='brew update && brew outdated && brew upgrade && brew cleanup'
|
||||
|
||||
alias php74='$(brew --prefix php@7.4)/bin/php'
|
||||
alias php80='$(brew --prefix php@8.0)/bin/php -d error_reporting=22527'
|
||||
alias phpc='$(brew --prefix php)/bin/php -d error_reporting=22527'
|
||||
alias php80raw='$(brew --prefix php@8.0)/bin/php'
|
||||
|
||||
alias php-server='php -S localhost:9000'
|
||||
|
||||
alias p74c='$(brew --prefix php@7.4)/bin/php -d error_reporting=22527 $(which composer)'
|
||||
alias p80c='$(brew --prefix php@8.0)/bin/php -d error_reporting=22527 $(which composer)'
|
||||
alias p8c='$(brew --prefix php)/bin/php -d error_reporting=22527 $(which composer)'
|
||||
alias p7a='$(brew --prefix php@7.4)/bin/php artisan'
|
||||
alias p8a='$(brew --prefix php)/bin/php artisan'
|
||||
|
||||
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
|
||||
|
||||
# work related
|
||||
alias geniemvpn='sudo openfortivpn -c ~/.local/openfortivpn.conf'
|
||||
fi
|
||||
|
||||
alias watchx='watch -dpbc'
|
||||
alias zapds='find . -name ".DS_Store" -print -delete'
|
||||
alias t='tail -f'
|
||||
alias dn='du -chd1'
|
||||
|
||||
alias codescanner='docker run --env SOURCE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock registry.gitlab.com/gitlab-org/ci-cd/codequality:${VERSION:-latest} /code'
|
||||
|
||||
alias composerUp='composer global update'
|
||||
alias npmUp='npm -g up'
|
||||
|
||||
alias zedit='code ~/.zshrc ~/.alias'
|
||||
|
||||
if [[ -f "$HOME/.aliases.local" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source "$HOME/.aliases.local"
|
||||
fi
|
||||
113
base/bashrc
Normal file
113
base/bashrc
Normal file
@@ -0,0 +1,113 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||
|
||||
# Homebrew configuration
|
||||
export HOMEBREW="/opt/homebrew"
|
||||
export HOMEBREW_BIN="$HOMEBREW/bin"
|
||||
export HOMEBREW_SBIN="$HOMEBREW/sbin"
|
||||
export HOMEBREW_PKG="$HOMEBREW/opt"
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$HOMEBREW_BIN:$HOMEBREW_SBIN:/usr/local/sbin:$PATH"
|
||||
|
||||
# brew, https://brew.sh
|
||||
if command -v brew &> /dev/null; then
|
||||
BREW_BIN=$(brew --prefix)/bin
|
||||
BREW_SBIN=$(brew --prefix)/sbin
|
||||
|
||||
BREW_PYTHON=$(brew --prefix python@3.8)/bin
|
||||
GNUBIN_DIR=$(brew --prefix coreutils)/libexec/gnubin
|
||||
BREW_RUBY=$(brew --prefix ruby)/bin
|
||||
BREW_GEMS=$(gem environment gemdir)/bin
|
||||
|
||||
export PATH="$BREW_PYTHON:$GNUBIN_DIR:$BREW_GEMS:$BREW_RUBY:$BREW_BIN:$BREW_SBIN:$PATH"
|
||||
fi
|
||||
|
||||
# nvm, the node version manager
|
||||
export NVM_LAZY_LOAD=true
|
||||
export NVM_COMPLETION=true
|
||||
export NVM_AUTO_USE=true
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
|
||||
# If we have go packages, include them to the PATH
|
||||
if command -v go &> /dev/null; then
|
||||
export GOPATH=$(go env GOPATH);
|
||||
if [ -d "$GOPATH/bin" ]; then
|
||||
export PATH="$GOPATH/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if command -v nvim &> /dev/null; then
|
||||
export EDITOR="nvim"
|
||||
fi
|
||||
|
||||
# z, https://github.com/rupa/z
|
||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
if command -v composer &> /dev/null; then
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# gem, rubygems
|
||||
if command -v gem &>/dev/null; then
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export GEM_PATH="$XDG_STATE_HOME/gem"
|
||||
fi
|
||||
|
||||
|
||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
|
||||
# Import ssh keys in keychain
|
||||
ssh-add -A 2>/dev/null;
|
||||
|
||||
# op (1Password cli) is present
|
||||
if hash op 2>/dev/null; then
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
mkdir -p "$OP_CACHE";
|
||||
eval "$(op completion zsh)"; compdef _op op
|
||||
fi
|
||||
|
||||
# Ansible configuration
|
||||
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
|
||||
if hash ansible 2>/dev/null; then
|
||||
export ANSIBLE_HOME="$XDG_STATE_HOME/ansible"
|
||||
mkdir -p "$ANSIBLE_HOME"
|
||||
fi
|
||||
|
||||
# gcloud is present
|
||||
#if hash gcloud 2>/dev/null; then
|
||||
# GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
||||
# [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
||||
# [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
||||
#fi
|
||||
|
||||
# Load iterm2 shell integration
|
||||
# https://iterm2.com/documentation-shell-integration.html
|
||||
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] && source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
|
||||
20
base/ecrc
Normal file
20
base/ecrc
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Version": "2.7.0",
|
||||
"Verbose": false,
|
||||
"Debug": false,
|
||||
"IgnoreDefaults": false,
|
||||
"SpacesAftertabs": false,
|
||||
"NoColor": false,
|
||||
"Exclude": [],
|
||||
"AllowedContentTypes": [],
|
||||
"PassedFiles": [],
|
||||
"Disable": {
|
||||
"EndOfLine": false,
|
||||
"Indentation": false,
|
||||
"InsertFinalNewline": false,
|
||||
"TrimTrailingWhitespace": false,
|
||||
"IndentSize": false,
|
||||
"MaxLineLength": false
|
||||
}
|
||||
}
|
||||
|
||||
8
base/git_profiles
Normal file
8
base/git_profiles
Normal file
@@ -0,0 +1,8 @@
|
||||
[work]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo.vuorinen@vincit.fi
|
||||
|
||||
[home]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo@vuorinen.net
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/bin/env bash
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
alias php="php -d error_reporting=22527"
|
||||
|
||||
16
base/plan
Normal file
16
base/plan
Normal file
@@ -0,0 +1,16 @@
|
||||
. .
|
||||
/ `. .' \
|
||||
.---. < > < > .---.
|
||||
| \ \ - ~ ~ - / / |
|
||||
~-..-~ ~-..-~
|
||||
\~~~\.' `./~~~/
|
||||
.-~~^-. \__/ \__/
|
||||
.' O \ / / \ \
|
||||
(_____, `._.' | } \/~~~/
|
||||
`----. / } | / \__/
|
||||
`-. | / | / `. ,~~|
|
||||
~-.__| /_ - ~ ^| /- _ `..-' f: f:
|
||||
| / | / ~-. `-. _||_||_
|
||||
|_____| |_____| ~ - . _ _ _ _ _>
|
||||
|
||||
|
||||
7
base/shellcheckrc
Normal file
7
base/shellcheckrc
Normal file
@@ -0,0 +1,7 @@
|
||||
# This is shellcheck configuration file.
|
||||
|
||||
# Set whether or not to follow arbitrary file
|
||||
# paths in source statements (since 0.8.0).
|
||||
external-sources=true
|
||||
includeAllWorkspaceSymbols=true
|
||||
|
||||
@@ -20,4 +20,5 @@
|
||||
"cssPreprocessor": "dart-sass"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
174
base/zshrc
Normal file
174
base/zshrc
Normal file
@@ -0,0 +1,174 @@
|
||||
# this is my zsh config. there are many like it, but this one is mine.
|
||||
# shellcheck shell=bash
|
||||
|
||||
autoload -U colors zsh/terminfo
|
||||
colors
|
||||
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||
|
||||
# Homebrew configuration
|
||||
export HOMEBREW="/opt/homebrew"
|
||||
export HOMEBREW_BIN="$HOMEBREW/bin"
|
||||
export HOMEBREW_SBIN="$HOMEBREW/sbin"
|
||||
export HOMEBREW_PKG="$HOMEBREW/opt"
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$HOMEBREW_BIN:$HOMEBREW_SBIN:/usr/local/sbin:$PATH"
|
||||
|
||||
# brew, https://brew.sh
|
||||
if [ command -v brew &> /dev/null ]; then
|
||||
BREW_BIN=$(brew --prefix)/bin
|
||||
BREW_SBIN=$(brew --prefix)/sbin
|
||||
|
||||
BREW_PYTHON=$(brew --prefix python)/bin
|
||||
GNUBIN_DIR=$(brew --prefix coreutils)/libexec/gnubin
|
||||
BREW_RUBY=$(brew --prefix ruby)/bin
|
||||
BREW_GEMS=$(gem environment gemdir)/bin
|
||||
|
||||
export PATH="$BREW_PYTHON:$GNUBIN_DIR:$BREW_GEMS:$BREW_RUBY:$BREW_BIN:$BREW_SBIN:$PATH"
|
||||
fi
|
||||
|
||||
# nvm, the node version manager
|
||||
export NVM_LAZY_LOAD=true
|
||||
export NVM_COMPLETION=true
|
||||
export NVM_AUTO_USE=true
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
# If we have go packages, include them to the PATH
|
||||
if command -v go &> /dev/null; then
|
||||
export GOPATH="$XDG_DATA_HOME/go";
|
||||
export GOBIN="$XDG_BIN_HOME"
|
||||
mkdir -p "$GOPATH"
|
||||
fi
|
||||
|
||||
if command -v nvim &> /dev/null; then
|
||||
export EDITOR="nvim"
|
||||
fi
|
||||
|
||||
# z, https://github.com/rupa/z
|
||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
if command -v composer &> /dev/null; then
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# gem, rubygems
|
||||
if command -v gem &>/dev/null; then
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export GEM_PATH="$XDG_STATE_HOME/gem"
|
||||
fi
|
||||
|
||||
|
||||
# pyenv, python environments
|
||||
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
|
||||
mkdir -p "$PYENV_ROOT"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
if command -v pyenv &>/dev/null; then
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
|
||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
|
||||
# Import ssh keys in keychain
|
||||
ssh-add -A 2>/dev/null;
|
||||
|
||||
# Antigen configuration
|
||||
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||
export ADOTDIR="$XDG_DATA_HOME/antigen"
|
||||
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
|
||||
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||
|
||||
# Try to load antigen, if present
|
||||
[[ -f "$XDG_BIN_HOME/antigen.zsh" ]] && source "$XDG_BIN_HOME/antigen.zsh"
|
||||
|
||||
# antigen is present
|
||||
if command -v antigen &> /dev/null; then
|
||||
antigen use oh-my-zsh
|
||||
|
||||
antigen bundle ssh-agent
|
||||
antigen bundle colored-man-pages
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||
|
||||
hash php 2>/dev/null && antigen bundle php
|
||||
hash nvm 2>/dev/null && antigen bundle nvm
|
||||
hash docker 2>/dev/null && antigen bundle docker
|
||||
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
||||
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
||||
|
||||
# Platform dependant bundles
|
||||
if [[ $(uname) == 'Linux' ]]; then
|
||||
antigen bundle command-not-found
|
||||
elif [[ $(uname) == 'Darwin' ]]; then
|
||||
# If we have brew installed
|
||||
if command -v brew &> /dev/null; then
|
||||
# Only enable brew plugin if brew exists
|
||||
antigen bundle brew
|
||||
# load Z
|
||||
[[ -f "$(brew --prefix z)/etc/profile.d/z.sh" ]] && source "$(brew --prefix z)/etc/profile.d/z.sh"
|
||||
fi
|
||||
fi
|
||||
|
||||
antigen apply
|
||||
fi
|
||||
|
||||
# op (1Password cli) is present
|
||||
if hash op 2>/dev/null; then
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
mkdir -p $OP_CACHE;
|
||||
eval "$(op completion zsh)"; compdef _op op
|
||||
fi
|
||||
|
||||
# Ansible configuration
|
||||
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
|
||||
if hash ansible 2>/dev/null; then
|
||||
export ANSIBLE_HOME="$XDG_STATE_HOME/ansible"
|
||||
mkdir -p "$ANSIBLE_HOME"
|
||||
fi
|
||||
|
||||
# gcloud is present
|
||||
#if hash gcloud 2>/dev/null; then
|
||||
# GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
||||
# [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
||||
# [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
||||
#fi
|
||||
|
||||
# Load iterm2 shell integration
|
||||
# https://iterm2.com/documentation-shell-integration.html
|
||||
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] && source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# Fig pre block. Keep at the top of this file.
|
||||
[[ -f "$HOME/.fig/shell/bash_profile.pre.bash" ]] && builtin source "$HOME/.fig/shell/bash_profile.pre.bash"
|
||||
# shellcheck shell=bash
|
||||
|
||||
export PATH="$HOME/.local/bin:/usr/local/sbin:$PATH"
|
||||
|
||||
# Fig post block. Keep at the bottom of this file.
|
||||
[[ -f "$HOME/.fig/shell/bash_profile.post.bash" ]] && builtin source "$HOME/.fig/shell/bash_profile.post.bash"
|
||||
14
bashrc
14
bashrc
@@ -1,14 +0,0 @@
|
||||
# Fig pre block. Keep at the top of this file.
|
||||
[[ -f "$HOME/.fig/shell/bashrc.pre.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.pre.bash"
|
||||
# shellcheck shell=bash
|
||||
|
||||
PHP_PATH=$(brew --prefix php)/bin
|
||||
|
||||
export PATH="$PHP_PATH:$HOME/.composer/vendor/bin/:/usr/local/opt/ruby/bin:/usr/local/sbin:$PATH"
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
|
||||
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
|
||||
|
||||
# Fig post block. Keep at the bottom of this file.
|
||||
[[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.post.bash"
|
||||
79
config/alias
Normal file
79
config/alias
Normal file
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env bash
|
||||
# macOS specific
|
||||
|
||||
# Get installed php versions from brew and setup aliases
|
||||
function x-set-php-aliases
|
||||
{
|
||||
if command -v brew &> /dev/null; then
|
||||
local php_versions=()
|
||||
while IFS="" read -r line; do php_versions+=("$line"); done < <(brew list | grep '^php')
|
||||
|
||||
php_error_reporting='-d error_reporting=22527'
|
||||
|
||||
for version in "${php_versions[@]}"; do
|
||||
# drop the dot from version (8.0 -> 80)
|
||||
local php_abbr="${version//\./}"
|
||||
# replace "php@" with "p" so "php@80" becomes "p80"
|
||||
local php_alias="${php_abbr//php@/p}"
|
||||
|
||||
# Skip php = php aliasing
|
||||
# if [[ "$php_abbr" == "$php_alias" ]]; then continue; fi;
|
||||
|
||||
# Fetch the exec path once
|
||||
php_exec="$(brew --prefix "$version")/bin/php"
|
||||
|
||||
# Raw PHP without error_reporting flag.
|
||||
# shellcheck disable=SC2139
|
||||
alias "${php_alias}"r="$php_exec"
|
||||
# PHP with error_reporting flag.
|
||||
# shellcheck disable=SC2139
|
||||
alias "$php_alias"="$php_exec $php_error_reporting"
|
||||
# Local PHP Server.
|
||||
# shellcheck disable=SC2139
|
||||
alias "${php_alias}"s="$php_exec -S localhost:9000"
|
||||
# Use composer with specific PHP and error_reporting flag on.
|
||||
# shellcheck disable=SC2139
|
||||
alias "${php_alias}"c="$php_exec $php_error_reporting $(which composer)"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $(uname) == 'Darwin' ]]; then
|
||||
|
||||
x-set-php-aliases
|
||||
|
||||
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
|
||||
|
||||
# Flush Directory Service cache
|
||||
alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder"
|
||||
|
||||
# Lock the screen
|
||||
alias afk="osascript -e 'tell application \"System Events\" to keystroke \"q\" using {command down,control down}'"
|
||||
|
||||
# Empty the Trash on all mounted volumes and the main HDD
|
||||
# Also, clear Apple’s System Logs to improve shell startup speed
|
||||
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||
fi
|
||||
|
||||
alias watchx='watch -dpbc' # watch with: differences, precise, beep and color
|
||||
alias zapds='find . -name ".DS_Store" -print -delete'
|
||||
alias t='tail -f' # tail with follow flag on
|
||||
alias dn='du -chd1' # directory usage, return only the total
|
||||
|
||||
alias code_scanner="docker run \
|
||||
--env SOURCE_CODE='${PWD}' \
|
||||
--volume '${PWD}':/code \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
registry.gitlab.com/gitlab-org/ci-cd/codequality:${CODEQUALITY_VERSION:-latest} \
|
||||
/code"
|
||||
|
||||
alias composerUp='composer global update'
|
||||
alias npmUp='npm -g up'
|
||||
|
||||
alias zedit='$EDITOR ~/.dotfiles'
|
||||
|
||||
if [[ -f "$HOME/.aliases.local" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source "$HOME/.aliases.local"
|
||||
fi
|
||||
|
||||
1
config/astronvim/lua/user
Submodule
1
config/astronvim/lua/user
Submodule
Submodule config/astronvim/lua/user added at 6409f428be
30
config/exports
Normal file
30
config/exports
Normal file
@@ -0,0 +1,30 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
export HIST_STAMPS="yyyy-mm-dd"
|
||||
|
||||
# Larger bash history (allow 32³ entries; default is 500)
|
||||
export HISTSIZE=32768
|
||||
export HISTFILESIZE=$HISTSIZE
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
export HISTCONTROL=ignoreboth
|
||||
|
||||
# Make some commands not show up in history
|
||||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
|
||||
|
||||
# And include the parameter for ZSH
|
||||
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
|
||||
|
||||
# Highlight section titles in manual pages
|
||||
export LESS_TERMCAP_md="$ORANGE"
|
||||
|
||||
# Don’t clear the screen after quitting a manual page
|
||||
export MANPAGER="less -X"
|
||||
|
||||
# Always enable colored `grep` output
|
||||
export GREP_OPTIONS="--color=auto"
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
hash shopt 2>/dev/null && shopt -s checkwinsize
|
||||
|
||||
6
config/flipperdevices.com/qFlipper.ini
Normal file
6
config/flipperdevices.com/qFlipper.ini
Normal file
@@ -0,0 +1,6 @@
|
||||
[General]
|
||||
ApplicationUpdateChannel=release
|
||||
CheckApplicatonUpdates=true
|
||||
FirmwareUpdateChannel=release
|
||||
LastFolderUrl=/Users/ivuorinen
|
||||
ShowHiddenFiles=false
|
||||
68
config/functions
Normal file
68
config/functions
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# shell functions
|
||||
#
|
||||
|
||||
# Weather in Tampere, or other city
|
||||
function weather
|
||||
{
|
||||
# https://github.com/chubin/wttr.in#usage
|
||||
local city="${1:-Tampere}"
|
||||
curl "http://wttr.in/${city// /+}?2nFQM&lang=fi"
|
||||
}
|
||||
|
||||
# Docker
|
||||
function ssh-docker
|
||||
{
|
||||
docker exec -it "$@" bash
|
||||
}
|
||||
|
||||
# Create a new directory and enter it
|
||||
function mkd
|
||||
{
|
||||
mkdir -p "$@" && cd "$@" || exit
|
||||
}
|
||||
|
||||
# All the dig info
|
||||
function digga
|
||||
{
|
||||
dig +nocmd "$1" any +multiline +noall +answer
|
||||
}
|
||||
|
||||
# Rector project to php version 8.0 by default.
|
||||
function rector
|
||||
{
|
||||
local php="${1:-80}"
|
||||
docker run -v "$(pwd)":/project rector/rector:latest process \
|
||||
"/project/$1" \
|
||||
--set "php${php}" \
|
||||
--autoload-file /project/vendor/autoload.php
|
||||
}
|
||||
|
||||
# Commit everything
|
||||
function commit
|
||||
{
|
||||
commitMessage="$*"
|
||||
|
||||
if [ "$commitMessage" = "" ]; then
|
||||
commitMessage="Automated commit"
|
||||
fi
|
||||
|
||||
git add .
|
||||
eval "git commit -a -m '${commitMessage}'"
|
||||
}
|
||||
|
||||
function scheduler
|
||||
{
|
||||
while :; do
|
||||
php artisan schedule:run
|
||||
echo "Sleeping 60 seconds..."
|
||||
sleep 60
|
||||
done
|
||||
}
|
||||
|
||||
function silent
|
||||
{
|
||||
"$@" >&/dev/null
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
git_protocol: ssh
|
||||
git_protocol: https
|
||||
|
||||
59
config/git/config
Normal file
59
config/git/config
Normal file
@@ -0,0 +1,59 @@
|
||||
[user]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo@ivuorinen.net
|
||||
|
||||
[credential]
|
||||
helper = store --file ~/.cache/git/git-credentials
|
||||
helper = cache --timeout 30000
|
||||
|
||||
[core]
|
||||
excludesfile = ~/.config/git/gitignore
|
||||
|
||||
[alias]
|
||||
reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d
|
||||
reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d
|
||||
nah = !git reset --hard && git clean -df
|
||||
undo-commit = reset HEAD~ --soft
|
||||
llog = log --pretty=fuller
|
||||
logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
|
||||
rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)'
|
||||
tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\"
|
||||
branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
|
||||
branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'"
|
||||
|
||||
[diff]
|
||||
tool = difftastic
|
||||
|
||||
[difftool]
|
||||
prompt = false
|
||||
|
||||
[difftool "difftastic"]
|
||||
cmd = difft "$LOCAL" "$REMOTE"
|
||||
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[color]
|
||||
ui = true
|
||||
diff = auto
|
||||
branch = auto
|
||||
status = auto
|
||||
|
||||
[color "status"]
|
||||
added = green bold
|
||||
changed = yellow
|
||||
deleted = red bold strike
|
||||
untracked = cyan
|
||||
branch = yellow black bold ul
|
||||
|
||||
[submodule]
|
||||
recurse = true
|
||||
@@ -4,6 +4,7 @@
|
||||
*.cache
|
||||
*~
|
||||
|
||||
*-secret
|
||||
__secret
|
||||
__ignored
|
||||
__test_*.php
|
||||
@@ -13,15 +14,7 @@ _theme
|
||||
*.sql.gz
|
||||
*.WordPress.*.xml
|
||||
cachegrind.out.*
|
||||
client-*.json
|
||||
composer.phar
|
||||
devops/.infra_ip_cache
|
||||
wp_*.sh
|
||||
|
||||
redirectRules.csv
|
||||
results_redirectRules.csv
|
||||
testRedirect.sh
|
||||
|
||||
uploads-webpc
|
||||
webpc-passthru.php
|
||||
auth.json
|
||||
dfm.sh
|
||||
1
config/nano/nanorc
Normal file
1
config/nano/nanorc
Normal file
@@ -0,0 +1 @@
|
||||
set tabsize 2
|
||||
1
config/nvim
Submodule
1
config/nvim
Submodule
Submodule config/nvim added at 291c43b0bd
9
config/nvm/default-packages
Normal file
9
config/nvm/default-packages
Normal file
@@ -0,0 +1,9 @@
|
||||
blade-formatter
|
||||
corepack
|
||||
editorconfig-checker
|
||||
github-release-notes
|
||||
js-debug
|
||||
neovim
|
||||
prettier
|
||||
standardjs
|
||||
stylelint-lsp
|
||||
35
config/starship.toml
Normal file
35
config/starship.toml
Normal file
@@ -0,0 +1,35 @@
|
||||
# Get editor completions based on the config schema
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the '❯' symbol in the prompt with '➜'
|
||||
[character] # The name of the module we are configuring is 'character'
|
||||
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
|
||||
|
||||
[cmd_duration]
|
||||
disabled = true
|
||||
|
||||
[git_branch]
|
||||
symbol = '🌱 '
|
||||
truncation_length = 20
|
||||
truncation_symbol = '…'
|
||||
ignore_branches = ['master', 'main']
|
||||
|
||||
[git_status]
|
||||
up_to_date = '✓'
|
||||
staged = '[++\($count\)](green)'
|
||||
|
||||
[package]
|
||||
format = '[$symbol($version )]($style)'
|
||||
version_format = '${major}.${minor}'
|
||||
|
||||
[php]
|
||||
format = '[$symbol($version )]($style)'
|
||||
version_format = '${major}.${minor}'
|
||||
|
||||
[nodejs]
|
||||
format = '[$symbol($version )]($style)'
|
||||
version_format = '${major}.${minor}'
|
||||
|
||||
53
config/tmux/tmux.conf
Normal file
53
config/tmux/tmux.conf
Normal file
@@ -0,0 +1,53 @@
|
||||
# ~/.config/tmux/tmux.conf, or .dotfiles/config/tmux/tmux.conf
|
||||
#
|
||||
# Contains configuration from the follwing sources:
|
||||
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
|
||||
# -
|
||||
|
||||
# unbind default prefix and set it to ctrl-a
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
# make delay shorter
|
||||
set -sg escape-time 0
|
||||
|
||||
|
||||
|
||||
#### key bindings ####
|
||||
|
||||
# reload config file
|
||||
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux.conf reloaded!"
|
||||
|
||||
# quickly open a new window
|
||||
bind N new-window
|
||||
|
||||
# synchronize all panes in a window
|
||||
bind y setw synchronize-panes
|
||||
|
||||
# pane movement shortcuts (same as vim)
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# enable mouse support for switching panes/windows
|
||||
#set -g mouse-utf8 on
|
||||
#set -g mouse on
|
||||
|
||||
#### copy mode : vim ####
|
||||
|
||||
# set vi mode for copy mode
|
||||
setw -g mode-keys vi
|
||||
|
||||
# copy mode using 'Esc'
|
||||
unbind [
|
||||
bind Escape copy-mode
|
||||
|
||||
# start selection with 'space' and copy using 'y'
|
||||
#bind -t vi-copy 'y' copy-selection
|
||||
|
||||
# paste using 'p'
|
||||
unbind p
|
||||
bind p paste-buffer
|
||||
|
||||
180
config/wtf/config.yml
Normal file
180
config/wtf/config.yml
Normal file
@@ -0,0 +1,180 @@
|
||||
wtf:
|
||||
colors:
|
||||
background: black
|
||||
border:
|
||||
focusable: darkslateblue
|
||||
focused: orange
|
||||
normal: gray
|
||||
checked: yellow
|
||||
highlight:
|
||||
fore: black
|
||||
back: gray
|
||||
rows:
|
||||
even: yellow
|
||||
odd: white
|
||||
grid:
|
||||
# How _wide_ the columns are, in terminal characters. In this case we have
|
||||
# four columns, each of which are 35 characters wide.
|
||||
columns: [35, 35, 30, 20]
|
||||
# How _high_ the rows are, in terminal lines. In this case we have four rows
|
||||
# that support ten line of text and one of four.
|
||||
rows: [10, 10, 10, 20, 10, 4]
|
||||
refreshInterval: 1
|
||||
openFileUtil: "open"
|
||||
mods:
|
||||
# You can have multiple widgets of the same type.
|
||||
# The "key" is the name of the widget and the type is the actual
|
||||
# widget you want to implement.
|
||||
europe_time:
|
||||
title: "Europe"
|
||||
type: clocks
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
GMT: "Etc/GMT"
|
||||
Amsterdam: "Europe/Amsterdam"
|
||||
Berlin: "Europe/Berlin"
|
||||
Barcelona: "Europe/Madrid"
|
||||
Copenhagen: "Europe/Copenhagen"
|
||||
London: "Europe/London"
|
||||
Rome: "Europe/Rome"
|
||||
Stockholm: "Europe/Stockholm"
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
sort: "alphabetical"
|
||||
americas_time:
|
||||
title: "Americas"
|
||||
type: clocks
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
UTC: "Etc/UTC"
|
||||
Vancouver: "America/Vancouver"
|
||||
New_York: "America/New_York"
|
||||
Sao_Paulo: "America/Sao_Paulo"
|
||||
Denver: "America/Denver"
|
||||
Iqaluit: "America/Iqaluit"
|
||||
Bahamas: "America/Nassau"
|
||||
Chicago: "America/Chicago"
|
||||
position:
|
||||
top: 0
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
sort: "alphabetical"
|
||||
battery:
|
||||
type: power
|
||||
title: "⚡️"
|
||||
enabled: true
|
||||
position:
|
||||
top: 1
|
||||
left: 2
|
||||
height: 1
|
||||
width: 2
|
||||
refreshInterval: 15
|
||||
todolist:
|
||||
type: todo
|
||||
checkedIcon: "X"
|
||||
colors:
|
||||
checked: gray
|
||||
highlight:
|
||||
fore: "black"
|
||||
back: "orange"
|
||||
enabled: true
|
||||
filename: "todo.yml"
|
||||
position:
|
||||
top: 1
|
||||
left: 0
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
ip:
|
||||
type: ipinfo
|
||||
title: "My IP"
|
||||
colors:
|
||||
name: "lightblue"
|
||||
value: "white"
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 2
|
||||
height: 1
|
||||
width: 2
|
||||
refreshInterval: 150
|
||||
security_info:
|
||||
type: security
|
||||
title: "Staying safe"
|
||||
enabled: true
|
||||
position:
|
||||
top: 1
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
readme:
|
||||
type: textfile
|
||||
enabled: true
|
||||
filePaths:
|
||||
- "~/.config/wtf/config.yml"
|
||||
format: true
|
||||
formatStyle: "monokai"
|
||||
position:
|
||||
top: 3
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
news:
|
||||
type: hackernews
|
||||
title: "HackerNews"
|
||||
enabled: true
|
||||
numberOfStories: 10
|
||||
position:
|
||||
top: 3
|
||||
left: 1
|
||||
height: 1
|
||||
width: 3
|
||||
storyType: top
|
||||
refreshInterval: 900
|
||||
resources:
|
||||
type: resourceusage
|
||||
enabled: true
|
||||
position:
|
||||
top: 4
|
||||
left: 0
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 1
|
||||
uptime:
|
||||
type: cmdrunner
|
||||
args: []
|
||||
cmd: "uptime"
|
||||
enabled: true
|
||||
position:
|
||||
top: 5
|
||||
left: 1
|
||||
height: 1
|
||||
width: 3
|
||||
refreshInterval: 30
|
||||
disks:
|
||||
type: cmdrunner
|
||||
cmd: "df"
|
||||
args: ["-h"]
|
||||
enabled: true
|
||||
position:
|
||||
top: 4
|
||||
left: 1
|
||||
height: 1
|
||||
width: 3
|
||||
refreshInterval: 3600
|
||||
1
dotbot
Submodule
1
dotbot
Submodule
Submodule dotbot added at 328bcb3259
1
dotbot-brew
Submodule
1
dotbot-brew
Submodule
Submodule dotbot-brew added at 98e346360b
1
dotbot-gh-extension
Submodule
1
dotbot-gh-extension
Submodule
Submodule dotbot-gh-extension added at 037994ef28
1
dotbot-golang
Submodule
1
dotbot-golang
Submodule
Submodule dotbot-golang added at 4fa60bd487
1
dotbot-if
Submodule
1
dotbot-if
Submodule
Submodule dotbot-if added at 2b4dc56943
1
dotbot-ifplatform
Submodule
1
dotbot-ifplatform
Submodule
Submodule dotbot-ifplatform added at e35b5c0d71
45
gitconfig
45
gitconfig
@@ -1,45 +0,0 @@
|
||||
[user]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo.vuorinen@geniem.com
|
||||
signingkey = 027A74A88B2CC570
|
||||
[core]
|
||||
excludesfile = ~/.gitignore_global
|
||||
[difftool "sourcetree"]
|
||||
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||
path =
|
||||
[mergetool "sourcetree"]
|
||||
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
|
||||
trustExitCode = true
|
||||
[commit]
|
||||
template = ~/.stCommitMsg
|
||||
[alias]
|
||||
reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d
|
||||
reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d
|
||||
nah = !git reset --hard && git clean -df
|
||||
undo-commit = reset HEAD~ --soft
|
||||
llog = log --pretty=fuller
|
||||
logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
|
||||
rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)'
|
||||
tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\"
|
||||
branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
|
||||
branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'"
|
||||
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[init]
|
||||
defaultBranch = master
|
||||
[pull]
|
||||
rebase = false
|
||||
|
||||
[color]
|
||||
ui = true
|
||||
|
||||
[color "status"]
|
||||
added = green bold
|
||||
changed = yellow
|
||||
deleted = red bold strike
|
||||
untracked = cyan
|
||||
branch = yellow black bold ul
|
||||
0
hosts/air/.gitkeep
Normal file
0
hosts/air/.gitkeep
Normal file
3
hosts/air/README.md
Normal file
3
hosts/air/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# .dotfiles/hosts/air
|
||||
|
||||
This is my home computer.
|
||||
243
hosts/lakka/irssi/config
Normal file
243
hosts/lakka/irssi/config
Normal file
@@ -0,0 +1,243 @@
|
||||
# Reduce log fragmentation
|
||||
settings = {
|
||||
core = {
|
||||
write_buffer_size = "2MB";
|
||||
write_buffer_timeout = "5min";
|
||||
real_name = "Ismo Vuorinen";
|
||||
user_name = "viir";
|
||||
nick = "viir";
|
||||
};
|
||||
"fe-text" = { actlist_sort = "refnum"; };
|
||||
};
|
||||
|
||||
servers = (
|
||||
{
|
||||
address = "irc.tdc.fi";
|
||||
chatnet = "IRCnet";
|
||||
port = "6667";
|
||||
own_host = "kapsi.fi";
|
||||
family = "inet";
|
||||
autoconnect = "yes";
|
||||
},
|
||||
{
|
||||
address = "irc.fi.quakenet.org";
|
||||
chatnet = "QuakeNet";
|
||||
port = "6667";
|
||||
own_host = "kapsi.fi";
|
||||
family = "inet";
|
||||
},
|
||||
{ address = "irc.efnet.net"; chatnet = "EFNet"; port = "6667"; },
|
||||
{
|
||||
address = "irc.undernet.org";
|
||||
chatnet = "Undernet";
|
||||
port = "6667";
|
||||
},
|
||||
{ address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
|
||||
{
|
||||
address = "irc.quakenet.org";
|
||||
chatnet = "QuakeNet";
|
||||
port = "6667";
|
||||
},
|
||||
{ address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; },
|
||||
{ address = "irc.nerv.fi"; chatnet = "Nerv"; port = "706"; }
|
||||
);
|
||||
|
||||
chatnets = {
|
||||
IRCnet = {
|
||||
type = "IRC";
|
||||
max_kicks = "4";
|
||||
max_msgs = "5";
|
||||
max_whois = "4";
|
||||
max_query_chans = "5";
|
||||
};
|
||||
EFNet = {
|
||||
type = "IRC";
|
||||
max_kicks = "4";
|
||||
max_msgs = "3";
|
||||
max_whois = "1";
|
||||
};
|
||||
Undernet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
DALnet = {
|
||||
type = "IRC";
|
||||
max_kicks = "4";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
QuakeNet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
SILC = { type = "SILC"; };
|
||||
Nerv = { type = "IRC"; };
|
||||
};
|
||||
|
||||
channels = (
|
||||
{ name = "#kapsi.fi"; chatnet = "IRCNet"; autojoin = "No"; }
|
||||
);
|
||||
|
||||
aliases = {
|
||||
J = "join";
|
||||
WJOIN = "join -window";
|
||||
WQUERY = "query -window";
|
||||
LEAVE = "part";
|
||||
BYE = "quit";
|
||||
EXIT = "quit";
|
||||
SIGNOFF = "quit";
|
||||
DESCRIBE = "action";
|
||||
DATE = "time";
|
||||
HOST = "userhost";
|
||||
LAST = "lastlog";
|
||||
SAY = "msg *";
|
||||
WI = "whois";
|
||||
WII = "whois $0 $0";
|
||||
WW = "whowas";
|
||||
W = "who";
|
||||
N = "names";
|
||||
M = "msg";
|
||||
T = "topic";
|
||||
C = "clear";
|
||||
CL = "clear";
|
||||
K = "kick";
|
||||
KB = "kickban";
|
||||
KN = "knockout";
|
||||
BANS = "ban";
|
||||
B = "ban";
|
||||
MUB = "unban *";
|
||||
UB = "unban";
|
||||
IG = "ignore";
|
||||
UNIG = "unignore";
|
||||
SB = "scrollback";
|
||||
UMODE = "mode $N";
|
||||
WC = "window close";
|
||||
WN = "window new hide";
|
||||
SV = "say Irssi $J ($V) - http://irssi.org/";
|
||||
GOTO = "sb goto";
|
||||
CHAT = "dcc chat";
|
||||
RUN = "SCRIPT LOAD";
|
||||
CALC = "exec - if which bc &>/dev/null\\; then echo '$*' | bc | awk '{print \"$*=\"$$1}'\\; else echo bc was not found\\; fi";
|
||||
SBAR = "STATUSBAR";
|
||||
INVITELIST = "mode $C +I";
|
||||
Q = "QUERY";
|
||||
"MANUAL-WINDOWS" = "set use_status_window off;set autocreate_windows off;set autocreate_query_level none;set autoclose_windows off;set reuse_unused_windows on;save";
|
||||
EXEMPTLIST = "mode $C +e";
|
||||
ATAG = "WINDOW SERVER";
|
||||
};
|
||||
|
||||
statusbar = {
|
||||
# formats:
|
||||
# when using {templates}, the template is shown only if it's argument isn't
|
||||
# empty unless no argument is given. for example {sb} is printed always,
|
||||
# but {sb $T} is printed only if $T isn't empty.
|
||||
|
||||
items = {
|
||||
# start/end text in statusbars
|
||||
barstart = "{sbstart}";
|
||||
barend = "{sbend}";
|
||||
|
||||
topicbarstart = "{topicsbstart}";
|
||||
topicbarend = "{topicsbend}";
|
||||
|
||||
# treated "normally", you could change the time/user name to whatever
|
||||
time = "{sb $Z}";
|
||||
user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";
|
||||
|
||||
# treated specially .. window is printed with non-empty windows,
|
||||
# window_empty is printed with empty windows
|
||||
window = "{sb $winref:$tag/$itemname{sbmode $M}}";
|
||||
window_empty = "{sb $winref{sbservertag $tag}}";
|
||||
prompt = "{prompt $[.15]itemname}";
|
||||
prompt_empty = "{prompt $winname}";
|
||||
topic = " $topic";
|
||||
topic_empty = " Irssi v$J - http://irssi.org/help/";
|
||||
|
||||
# all of these treated specially, they're only displayed when needed
|
||||
lag = "{sb Lag: $0-}";
|
||||
act = "{sb Act: $0-}";
|
||||
more = "-- more --";
|
||||
};
|
||||
|
||||
# there's two type of statusbars. root statusbars are either at the top
|
||||
# of the screen or at the bottom of the screen. window statusbars are at
|
||||
# the top/bottom of each split window in screen.
|
||||
default = {
|
||||
# the "default statusbar" to be displayed at the bottom of the window.
|
||||
# contains all the normal items.
|
||||
window = {
|
||||
disabled = "no";
|
||||
|
||||
# window, root
|
||||
type = "window";
|
||||
# top, bottom
|
||||
placement = "bottom";
|
||||
# number
|
||||
position = "1";
|
||||
# active, inactive, always
|
||||
visible = "active";
|
||||
|
||||
# list of items in statusbar in the display order
|
||||
items = {
|
||||
barstart = { priority = "100"; };
|
||||
time = { };
|
||||
user = { };
|
||||
window = { };
|
||||
window_empty = { };
|
||||
lag = { priority = "-1"; };
|
||||
act = { priority = "10"; };
|
||||
more = { priority = "-1"; alignment = "right"; };
|
||||
barend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
|
||||
# statusbar to use in inactive split windows
|
||||
window_inact = {
|
||||
type = "window";
|
||||
placement = "bottom";
|
||||
position = "1";
|
||||
visible = "inactive";
|
||||
items = {
|
||||
barstart = { priority = "100"; };
|
||||
window = { };
|
||||
window_empty = { };
|
||||
more = { priority = "-1"; alignment = "right"; };
|
||||
barend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
|
||||
# we treat input line as yet another statusbar :) It's possible to
|
||||
# add other items before or after the input line item.
|
||||
prompt = {
|
||||
type = "root";
|
||||
placement = "bottom";
|
||||
# we want to be at the bottom always
|
||||
position = "100";
|
||||
visible = "always";
|
||||
items = {
|
||||
prompt = { priority = "-1"; };
|
||||
prompt_empty = { priority = "-1"; };
|
||||
# treated specially, this is the real input line.
|
||||
input = { priority = "10"; };
|
||||
};
|
||||
};
|
||||
|
||||
# topicbar
|
||||
topic = {
|
||||
type = "root";
|
||||
placement = "top";
|
||||
position = "1";
|
||||
visible = "always";
|
||||
items = {
|
||||
topicbarstart = { priority = "100"; };
|
||||
topic = { };
|
||||
topic_empty = { };
|
||||
topicbarend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
294
hosts/lakka/irssi/default.theme
Normal file
294
hosts/lakka/irssi/default.theme
Normal file
@@ -0,0 +1,294 @@
|
||||
# When testing changes, the easiest way to reload the theme is with /RELOAD.
|
||||
# This reloads the configuration file too, so if you did any changes remember
|
||||
# to /SAVE it first. Remember also that /SAVE overwrites the theme file with
|
||||
# old data so keep backups :)
|
||||
|
||||
# TEMPLATES:
|
||||
|
||||
# The real text formats that irssi uses are the ones you can find with
|
||||
# /FORMAT command. Back in the old days all the colors and texts were mixed
|
||||
# up in those formats, and it was really hard to change the colors since you
|
||||
# might have had to change them in tens of different places. So, then came
|
||||
# this templating system.
|
||||
|
||||
# Now the /FORMATs don't have any colors in them, and they also have very
|
||||
# little other styling. Most of the stuff you need to change is in this
|
||||
# theme file. If you can't change something here, you can always go back
|
||||
# to change the /FORMATs directly, they're also saved in these .theme files.
|
||||
|
||||
# So .. the templates. They're those {blahblah} parts you see all over the
|
||||
# /FORMATs and here. Their usage is simply {name parameter1 parameter2}.
|
||||
# When irssi sees this kind of text, it goes to find "name" from abstracts
|
||||
# block below and sets "parameter1" into $0 and "parameter2" into $1 (you
|
||||
# can have more parameters of course). Templates can have subtemplates.
|
||||
# Here's a small example:
|
||||
# /FORMAT format hello {colorify {underline world}}
|
||||
# abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; }
|
||||
# When irssi expands the templates in "format", the final string would be:
|
||||
# hello %G%Uworld%U%n
|
||||
# ie. underlined bright green "world" text.
|
||||
# and why "$0-", why not "$0"? $0 would only mean the first parameter,
|
||||
# $0- means all the parameters. With {underline hello world} you'd really
|
||||
# want to underline both of the words, not just the hello (and world would
|
||||
# actually be removed entirely).
|
||||
|
||||
# COLORS:
|
||||
|
||||
# You can find definitions for the color format codes in docs/formats.txt.
|
||||
|
||||
# There's one difference here though. %n format. Normally it means the
|
||||
# default color of the terminal (white mostly), but here it means the
|
||||
# "reset color back to the one it was in higher template". For example
|
||||
# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would
|
||||
# print yellow "foo" (as set with %Y) but "bar" would be green, which was
|
||||
# set at the beginning before the {foo} template. If there wasn't the %g
|
||||
# at start, the normal behaviour of %n would occur. If you _really_ want
|
||||
# to use the terminal's default color, use %N.
|
||||
|
||||
#############################################################################
|
||||
|
||||
# default foreground color (%N) - -1 is the "default terminal color"
|
||||
default_color = "-1";
|
||||
|
||||
# print timestamp/servertag at the end of line, not at beginning
|
||||
info_eol = "false";
|
||||
|
||||
# these characters are automatically replaced with specified color
|
||||
# (dark grey by default)
|
||||
replaces = { "[]=" = "%K$*%n"; };
|
||||
|
||||
abstracts = {
|
||||
##
|
||||
## generic
|
||||
##
|
||||
|
||||
# text to insert at the beginning of each non-message line
|
||||
line_start = "%B-%n!%B-%n ";
|
||||
|
||||
# timestamp styling, nothing by default
|
||||
timestamp = "$*";
|
||||
|
||||
# any kind of text that needs hilighting, default is to bold
|
||||
hilight = "%_$*%_";
|
||||
|
||||
# any kind of error message, default is bright red
|
||||
error = "%R$*%n";
|
||||
|
||||
# channel name is printed
|
||||
channel = "%_$*%_";
|
||||
|
||||
# nick is printed
|
||||
nick = "%_$*%_";
|
||||
|
||||
# nick host is printed
|
||||
nickhost = "[$*]";
|
||||
|
||||
# server name is printed
|
||||
server = "%_$*%_";
|
||||
|
||||
# some kind of comment is printed
|
||||
comment = "[$*]";
|
||||
|
||||
# reason for something is printed (part, quit, kick, ..)
|
||||
reason = "{comment $*}";
|
||||
|
||||
# mode change is printed ([+o nick])
|
||||
mode = "{comment $*}";
|
||||
|
||||
##
|
||||
## channel specific messages
|
||||
##
|
||||
|
||||
# highlighted nick/host is printed (joins)
|
||||
channick_hilight = "%C$*%n";
|
||||
chanhost_hilight = "{nickhost %c$*%n}";
|
||||
|
||||
# nick/host is printed (parts, quits, etc.)
|
||||
channick = "%c$*%n";
|
||||
chanhost = "{nickhost $*}";
|
||||
|
||||
# highlighted channel name is printed
|
||||
channelhilight = "%c$*%n";
|
||||
|
||||
# ban/ban exception/invite list mask is printed
|
||||
ban = "%c$*%n";
|
||||
|
||||
##
|
||||
## messages
|
||||
##
|
||||
|
||||
# the basic styling of how to print message, $0 = nick mode, $1 = nick
|
||||
msgnick = "%K<%n$0$1-%K>%n %|";
|
||||
|
||||
# message from you is printed. "msgownnick" specifies the styling of the
|
||||
# nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the
|
||||
# whole line.
|
||||
|
||||
# Example1: You want the message text to be green:
|
||||
# ownmsgnick = "{msgnick $0 $1-}%g";
|
||||
# Example2.1: You want < and > chars to be yellow:
|
||||
# ownmsgnick = "%Y{msgnick $0 $1-%Y}%n";
|
||||
# (you'll also have to remove <> from replaces list above)
|
||||
# Example2.2: But you still want to keep <> grey for other messages:
|
||||
# pubmsgnick = "%K{msgnick $0 $1-%K}%n";
|
||||
# pubmsgmenick = "%K{msgnick $0 $1-%K}%n";
|
||||
# pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n";
|
||||
# ownprivmsgnick = "%K{msgnick $*%K}%n";
|
||||
# privmsgnick = "%K{msgnick %R$*%K}%n";
|
||||
|
||||
# $0 = nick mode, $1 = nick
|
||||
ownmsgnick = "{msgnick $0 $1-}";
|
||||
ownnick = "%_$*%n";
|
||||
|
||||
# public message in channel, $0 = nick mode, $1 = nick
|
||||
pubmsgnick = "{msgnick $0 $1-}";
|
||||
pubnick = "%N$*%n";
|
||||
|
||||
# public message in channel meant for me, $0 = nick mode, $1 = nick
|
||||
pubmsgmenick = "{msgnick $0 $1-}";
|
||||
menick = "%Y$*%n";
|
||||
|
||||
# public highlighted message in channel
|
||||
# $0 = highlight color, $1 = nick mode, $2 = nick
|
||||
pubmsghinick = "{msgnick $1 $0$2-%n}";
|
||||
|
||||
# channel name is printed with message
|
||||
msgchannel = "%K:%c$*%n";
|
||||
|
||||
# private message, $0 = nick, $1 = host
|
||||
privmsg = "[%R$0%K(%r$1-%K)%n] ";
|
||||
|
||||
# private message from you, $0 = "msg", $1 = target nick
|
||||
ownprivmsg = "[%r$0%K(%R$1-%K)%n] ";
|
||||
|
||||
# own private message in query
|
||||
ownprivmsgnick = "{msgnick $*}";
|
||||
ownprivnick = "%_$*%n";
|
||||
|
||||
# private message in query
|
||||
privmsgnick = "{msgnick %R$*%n}";
|
||||
|
||||
##
|
||||
## Actions (/ME stuff)
|
||||
##
|
||||
|
||||
# used internally by this theme
|
||||
action_core = "%_ * $*%n";
|
||||
|
||||
# generic one that's used by most actions
|
||||
action = "{action_core $*} ";
|
||||
|
||||
# own action, both private/public
|
||||
ownaction = "{action $*}";
|
||||
|
||||
# own action with target, both private/public
|
||||
ownaction_target = "{action_core $0}%K:%c$1%n ";
|
||||
|
||||
# private action sent by others
|
||||
pvtaction = "%_ (*) $*%n ";
|
||||
pvtaction_query = "{action $*}";
|
||||
|
||||
# public action sent by others
|
||||
pubaction = "{action $*}";
|
||||
|
||||
|
||||
##
|
||||
## other IRC events
|
||||
##
|
||||
|
||||
# whois
|
||||
whois = "%# $[8]0 : $1-";
|
||||
|
||||
# notices
|
||||
ownnotice = "[%r$0%K(%R$1-%K)]%n ";
|
||||
notice = "%K-%M$*%K-%n ";
|
||||
pubnotice_channel = "%K:%m$*";
|
||||
pvtnotice_host = "%K(%m$*%K)";
|
||||
servernotice = "%g!$*%n ";
|
||||
|
||||
# CTCPs
|
||||
ownctcp = "[%r$0%K(%R$1-%K)] ";
|
||||
ctcp = "%g$*%n";
|
||||
|
||||
# wallops
|
||||
wallop = "%_$*%n: ";
|
||||
wallop_nick = "%n$*";
|
||||
wallop_action = "%_ * $*%n ";
|
||||
|
||||
# netsplits
|
||||
netsplit = "%R$*%n";
|
||||
netjoin = "%C$*%n";
|
||||
|
||||
# /names list
|
||||
names_prefix = "";
|
||||
names_nick = "[%_$0%_$1-] ";
|
||||
names_nick_op = "{names_nick $*}";
|
||||
names_nick_halfop = "{names_nick $*}";
|
||||
names_nick_voice = "{names_nick $*}";
|
||||
names_users = "[%g$*%n]";
|
||||
names_channel = "%G$*%n";
|
||||
|
||||
# DCC
|
||||
dcc = "%g$*%n";
|
||||
dccfile = "%_$*%_";
|
||||
|
||||
# DCC chat, own msg/action
|
||||
dccownmsg = "[%r$0%K($1-%K)%n] ";
|
||||
dccownnick = "%R$*%n";
|
||||
dccownquerynick = "%_$*%n";
|
||||
dccownaction = "{action $*}";
|
||||
dccownaction_target = "{action_core $0}%K:%c$1%n ";
|
||||
|
||||
# DCC chat, others
|
||||
dccmsg = "[%G$1-%K(%g$0%K)%n] ";
|
||||
dccquerynick = "%G$*%n";
|
||||
dccaction = "%_ (*dcc*) $*%n %|";
|
||||
|
||||
##
|
||||
## statusbar
|
||||
##
|
||||
|
||||
# default background for all statusbars. You can also give
|
||||
# the default foreground color for statusbar items.
|
||||
sb_background = "%4%w";
|
||||
|
||||
# default backround for "default" statusbar group
|
||||
#sb_default_bg = "%4";
|
||||
# background for prompt / input line
|
||||
sb_prompt_bg = "%n";
|
||||
# background for info statusbar
|
||||
sb_info_bg = "%8";
|
||||
# background for topicbar (same default)
|
||||
#sb_topic_bg = "%4";
|
||||
|
||||
# text at the beginning of statusbars. sb-item already puts
|
||||
# space there,so we don't use anything by default.
|
||||
sbstart = "";
|
||||
# text at the end of statusbars. Use space so that it's never
|
||||
# used for anything.
|
||||
sbend = " ";
|
||||
|
||||
topicsbstart = "{sbstart $*}";
|
||||
topicsbend = "{sbend $*}";
|
||||
|
||||
prompt = "[$*] ";
|
||||
|
||||
sb = " %c[%n$*%c]%n";
|
||||
sbmode = "(%c+%n$*)";
|
||||
sbaway = " (%GzZzZ%n)";
|
||||
sbservertag = ":$0 (change with ^X)";
|
||||
sbnickmode = "$0";
|
||||
|
||||
# activity in statusbar
|
||||
|
||||
# ',' separator
|
||||
sb_act_sep = "%c$*";
|
||||
# normal text
|
||||
sb_act_text = "%c$*";
|
||||
# public message
|
||||
sb_act_msg = "%W$*";
|
||||
# hilight
|
||||
sb_act_hilight = "%M$*";
|
||||
# hilight with specified color, $0 = color, $1 = text
|
||||
sb_act_hilight_color = "$0$1-%n";
|
||||
};
|
||||
72
hosts/lakka/zshrc
Normal file
72
hosts/lakka/zshrc
Normal file
@@ -0,0 +1,72 @@
|
||||
# Lakka zsh configuration.
|
||||
#
|
||||
# shellcheck shell=bash
|
||||
export PATH="/usr/local/bin:/usr/bin:/usr/sbin:$PATH"
|
||||
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||
|
||||
# z, https://github.com/rupa/z
|
||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
if command -v composer &> /dev/null; then
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# gem, rubygems
|
||||
if command -v gem &>/dev/null; then
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export PATH="$GEM_HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$HOME/bin:$HOME/.rvm/bin:$PATH"
|
||||
export LC_ALL=fi_FI.utf8
|
||||
|
||||
# Antigen configuration
|
||||
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||
export ADOTDIR="$XDG_DATA_HOME/antigen"
|
||||
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
|
||||
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||
|
||||
# Try to load antigen, if present
|
||||
[[ -f "$XDG_BIN_HOME/antigen.zsh" ]] && source "$XDG_BIN_HOME/antigen.zsh"
|
||||
|
||||
# If antigen was loaded
|
||||
if command -v antigen &> /dev/null; then
|
||||
antigen use oh-my-zsh
|
||||
|
||||
hash git 2>/dev/null && antigen bundle git
|
||||
hash php 2>/dev/null && antigen bundle php
|
||||
|
||||
antigen bundle autojump
|
||||
antigen bundle command-not-found
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
antigen bundle unixorn/rvm-plugin
|
||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||
|
||||
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
||||
|
||||
antigen apply
|
||||
fi
|
||||
|
||||
alias t='tail -f'
|
||||
alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
|
||||
alias dn='du -chd1'
|
||||
alias nano='nano -wS -$'
|
||||
alias gpg=gpg2
|
||||
|
||||
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
|
||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" ]] # Load RVM into a shell session *as a function*
|
||||
. "$HOME/.acme.sh/acme.sh.env"
|
||||
118
hosts/tunkki/bashrc
Normal file
118
hosts/tunkki/bashrc
Normal file
@@ -0,0 +1,118 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
0
hosts/v/.gitkeep
Normal file
0
hosts/v/.gitkeep
Normal file
3
hosts/v/README.md
Normal file
3
hosts/v/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# .dotfiles/hosts/v
|
||||
|
||||
This is my work computer.
|
||||
75
hosts/v/config/git/config
Normal file
75
hosts/v/config/git/config
Normal file
@@ -0,0 +1,75 @@
|
||||
[user]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo.vuorinen@vincit.fi
|
||||
signingkey = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLyOvkr1nRqMVv3UAizmk6C+q40H4khvw7qIXXXyOyFmzjwYx/Cuxoi4uZVjX+q4qFYJ+c312uu6YXiEtfyoCao3wub8r1cLBQ3eIvuyWp2K8Ixcd9JmFmLmoeiENpJxqyr0WPZLDkrCWUZCsQQh8zzGFnfciUdUdTiZ7s21AEhhmFRSdFlVfQSlGMFxU321psg1YilcP80bDwFd1FsL4TssSkwlbgP/twqnpZ4436TTo7kp0UnH/RZkfRdDWScKHaWgncBG0CZeQxGWnRp8fvZn/7gDnthcZhvnDALVBE7QFuZ90GxqVw3IGpHryV0mFO6EGQ9Ke9YX7pKVZPUXZjeCN4SVKsqFdVJ6AjaSJ9K7nL98rYK7qNzndT3cKqPNgPteyXWRulH68A51ecQqHrjTttZcdN9hKt9uBHpzuXsby2QObT+VB4MNjZapa+YYF/WgwJCml4lzn2xMFg1vYZD78pfoJ9e5f2cL1MMlUSDb0TNxmEXfDQ77H/pRpKDz0=
|
||||
|
||||
[core]
|
||||
excludesfile = ~/.config/git/gitignore
|
||||
|
||||
[alias]
|
||||
reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d
|
||||
reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d
|
||||
nah = !git reset --hard && git clean -df
|
||||
undo-commit = reset HEAD~ --soft
|
||||
llog = log --pretty=fuller
|
||||
logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
|
||||
rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)'
|
||||
tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\"
|
||||
branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
|
||||
branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'"
|
||||
|
||||
[diff]
|
||||
tool = difftastic
|
||||
|
||||
[difftool]
|
||||
prompt = false
|
||||
|
||||
[difftool "difftastic"]
|
||||
cmd = difft "$LOCAL" "$REMOTE"
|
||||
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[color]
|
||||
ui = true
|
||||
diff = auto
|
||||
branch = auto
|
||||
status = auto
|
||||
|
||||
[color "status"]
|
||||
added = green bold
|
||||
changed = yellow
|
||||
deleted = red bold strike
|
||||
untracked = cyan
|
||||
branch = yellow black bold ul
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[gpg "ssh"]
|
||||
program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign
|
||||
allowedSignersFile = ~/.ssh/allowed_signers
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
[credential "https://github.com"]
|
||||
helper =
|
||||
helper = !/opt/homebrew/bin/gh auth git-credential
|
||||
|
||||
[credential "https://gist.github.com"]
|
||||
helper =
|
||||
helper = !/opt/homebrew/bin/gh auth git-credential
|
||||
|
||||
[submodule]
|
||||
recurse = true
|
||||
|
||||
23
install
Executable file
23
install
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
CONFIG="install.conf.yaml"
|
||||
DOTBOT_DIR="dotbot"
|
||||
|
||||
DOTBOT_BIN="bin/dotbot"
|
||||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
cd "$BASEDIR"
|
||||
git submodule sync --quiet --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" \
|
||||
-d "${BASEDIR}" \
|
||||
--plugin-dir=dotbot-brew \
|
||||
--plugin-dir=dotbot-gh-extension \
|
||||
--plugin-dir=dotbot-golang \
|
||||
--plugin-dir=dotbot-if \
|
||||
--plugin-dir=dotbot-ifplatform \
|
||||
-c "${CONFIG}" \
|
||||
"${@}"
|
||||
25
install-without-plugins
Executable file
25
install-without-plugins
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
CONFIG="install.conf.yaml"
|
||||
DOTBOT_DIR="dotbot"
|
||||
|
||||
DOTBOT_BIN="bin/dotbot"
|
||||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
cd "$BASEDIR"
|
||||
git submodule sync --quiet --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" \
|
||||
-d "${BASEDIR}" \
|
||||
-c "${CONFIG}" \
|
||||
"${@}"
|
||||
|
||||
# --plugin-dir=dotbot-plugins/dotbot-brew \
|
||||
# --plugin-dir=dotbot-plugins/dotbot-gh-extension \
|
||||
# --plugin-dir=dotbot-plugins/dotbot-golang \
|
||||
# --plugin-dir=dotbot-plugins/dotbot-if \
|
||||
# --plugin-dir=dotbot-plugins/dotbot-ifplatform \
|
||||
# -p dotbot-plugins/dotbot-if/if.py \
|
||||
115
install.conf.yaml
Normal file
115
install.conf.yaml
Normal file
@@ -0,0 +1,115 @@
|
||||
- defaults:
|
||||
brewfile:
|
||||
stderr: true
|
||||
stdout: true
|
||||
create:
|
||||
mode: 0755
|
||||
link:
|
||||
create: true
|
||||
relink: true
|
||||
exclude: ["*.md"]
|
||||
- clean:
|
||||
~/:
|
||||
~/.config:
|
||||
recursive: true
|
||||
~/.local:
|
||||
recursive: true
|
||||
- create:
|
||||
~/.config:
|
||||
~/.local:
|
||||
~/.local/share:
|
||||
~/.local/state:
|
||||
~/.ssh:
|
||||
mode: 0700
|
||||
~/Code:
|
||||
- link:
|
||||
~/.config/:
|
||||
glob: true
|
||||
path: config/*
|
||||
~/.local/bin/:
|
||||
glob: true
|
||||
path: local/bin/*
|
||||
~/.ssh/:
|
||||
force: true
|
||||
glob: true
|
||||
mode: 0600
|
||||
path: ssh/*
|
||||
~/:
|
||||
force: true
|
||||
glob: true
|
||||
path: base/*
|
||||
prefix: "."
|
||||
- shell:
|
||||
- [git submodule update --init --recursive --force]
|
||||
- [chsh -s $(which zsh), Making zsh the default shell]
|
||||
- ifmacos:
|
||||
- shell:
|
||||
- [bash scripts/set-macos-defaults.sh]
|
||||
- brewfile:
|
||||
- Brewfile
|
||||
# Go packages what should be included in every system
|
||||
- go:
|
||||
- github.com/skx/sysbox@latest
|
||||
- github.com/dotzero/git-profile
|
||||
- github.com/google/yamlfmt/cmd/yamlfmt@latest
|
||||
# hosts!
|
||||
## hosts: air
|
||||
- if:
|
||||
- cond: "[[ $(hostname) = air ]]"
|
||||
met:
|
||||
- link:
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/air/config/**
|
||||
## hosts: v
|
||||
- if:
|
||||
- cond: "[[ $(hostname) = v ]]"
|
||||
met:
|
||||
- link:
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/v/config/**
|
||||
## hosts: tunkki
|
||||
- if:
|
||||
- cond: "[[ $(hostname) = tunkki ]]"
|
||||
met:
|
||||
- link:
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/tunkki/config/**
|
||||
## hosts: lakka
|
||||
- if:
|
||||
- cond: "[[ $(hostname) = lakka ]]"
|
||||
met:
|
||||
- link:
|
||||
~/.irssi/*:
|
||||
force: true
|
||||
glob: true
|
||||
path: hosts/lakka/irssi/**
|
||||
~/.zshrc:
|
||||
force: true
|
||||
path: hosts/lakka/zshrc
|
||||
# GitHub CLI Extensions
|
||||
- ghe:
|
||||
# GitHub CLI extension for generating a report on repository dependencies.
|
||||
- andyfeller/gh-dependency-report
|
||||
# GitHub CLI extension to generate montage from GitHub user avatars
|
||||
- andyfeller/gh-montage
|
||||
# An opinionated GitHub Cli extension for creating
|
||||
# changelogs that adhere to the keep a changelog specification.
|
||||
- chelnak/gh-changelog
|
||||
# Safely deletes local branches with no upstream and no un-pushed commits
|
||||
- davidraviv/gh-clean-branches
|
||||
# A beautiful CLI dashboard for GitHub 🚀
|
||||
- dlvhdr/gh-dash
|
||||
# A github-cli extension script to clone all repositories
|
||||
# in an organization, optionally filtering by topic.
|
||||
- matt-bartel/gh-clone-org
|
||||
# being an extension to view the overall health of
|
||||
# an organization's use of actions
|
||||
- rsese/gh-actions-status
|
||||
|
||||
#
|
||||
77
install.sh
77
install.sh
@@ -1,77 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# sh install.sh
|
||||
#
|
||||
# Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME.
|
||||
#
|
||||
# env VERBOSE=1 sh install.sh
|
||||
#
|
||||
# DO NOT EDIT THIS FILE
|
||||
#
|
||||
# This file is generated by rcm(7) as:
|
||||
#
|
||||
# rcup -B 0 -g
|
||||
#
|
||||
# To update it, re-run the above command.
|
||||
#
|
||||
: ${VERBOSE:=0}
|
||||
: ${CP:=/bin/cp}
|
||||
: ${LN:=/bin/ln}
|
||||
: ${MKDIR:=/bin/mkdir}
|
||||
: ${RM:=/bin/rm}
|
||||
: ${DIRNAME:=/usr/bin/dirname}
|
||||
verbose() {
|
||||
if [ "$VERBOSE" -gt 0 ]; then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
handle_file_cp() {
|
||||
if [ -e "$2" ]; then
|
||||
printf "%s " "overwrite $2? [yN]"
|
||||
read overwrite
|
||||
case "$overwrite" in
|
||||
y)
|
||||
$RM -rf "$2"
|
||||
;;
|
||||
*)
|
||||
echo "skipping $2"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
verbose "'$1' -> '$2'"
|
||||
$MKDIR -p "$($DIRNAME "$2")"
|
||||
$CP -R "$1" "$2"
|
||||
}
|
||||
handle_file_ln() {
|
||||
if [ -e "$2" ]; then
|
||||
printf "%s " "overwrite $2? [yN]"
|
||||
read overwrite
|
||||
case "$overwrite" in
|
||||
y)
|
||||
$RM -rf "$2"
|
||||
;;
|
||||
*)
|
||||
echo "skipping $2"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
verbose "'$1' -> '$2'"
|
||||
$MKDIR -p "$($DIRNAME "$2")"
|
||||
$LN -sf "$1" "$2"
|
||||
}
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/Brewfile" "/Users/ivuorinen/.Brewfile"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/alias" "/Users/ivuorinen/.alias"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/bash_profile" "/Users/ivuorinen/.bash_profile"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/bashrc" "/Users/ivuorinen/.bashrc"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/config/antigen.zsh" "/Users/ivuorinen/.config/antigen.zsh"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/config/gh/config.yml" "/Users/ivuorinen/.config/gh/config.yml"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/gitconfig" "/Users/ivuorinen/.gitconfig"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/gitignore_global" "/Users/ivuorinen/.gitignore_global"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/huskyrc" "/Users/ivuorinen/.huskyrc"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/install.sh" "/Users/ivuorinen/.install.sh"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/vuerc" "/Users/ivuorinen/.vuerc"
|
||||
handle_file_ln "/Users/ivuorinen/.dotfiles/zshrc" "/Users/ivuorinen/.zshrc"
|
||||
33
local/bin/README.md
Normal file
33
local/bin/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Scripts
|
||||
|
||||
All scripts have been normalized to same code standard using `shfmt`.
|
||||
Some problematic code has been fixed per `shellcheck` suggestions.
|
||||
|
||||
## Homegrown
|
||||
|
||||
- dfm
|
||||
- x-backup-mysql-with-prefix
|
||||
- x-check-git-attributes
|
||||
- x-open-ports
|
||||
|
||||
## Sourced
|
||||
|
||||
| Script | Source |
|
||||
|-------------------------|-------------------|
|
||||
| `x-dupes` | skx/sysadmin-util |
|
||||
| `x-foreach` | mvdan/dotfiles |
|
||||
| `x-multi-ping` | skx/sysadmin-util |
|
||||
| `x-ssl-expiry-date` | skx/sysadmin-util |
|
||||
| `x-until-error` | skx/sysadmin-util |
|
||||
| `x-until-success` | skx/sysadmin-util |
|
||||
| `x-validate-sha256-sum` | onnimonni |
|
||||
| `x-when-down` | skx/sysadmin-util |
|
||||
| `x-when-up` | skx/sysadmin-util |
|
||||
|
||||
- Sources:
|
||||
- [skx/sysadmin-utils](https://github.com/skx/sysadmin-util/)
|
||||
- Tools for Linux/Unix sysadmins.
|
||||
- [Licence](https://github.com/skx/sysadmin-util/blob/master/LICENSE)
|
||||
- [onnimonni](https://github.com/onnimonni)
|
||||
- [validate_sha256sum](https://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1)
|
||||
- [mvdan/dotfiles](https://github.com/mvdan/dotfiles)
|
||||
225
local/bin/dfm
Executable file
225
local/bin/dfm
Executable file
@@ -0,0 +1,225 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Dotfiles manager and install helper
|
||||
# (c) Ismo Vuorinen <https://github.com/ivuorinen> 2022
|
||||
# Licensed under MIT, see LICENSE
|
||||
#
|
||||
# shellcheck source-path=$HOME/.dotfiles/local/bin
|
||||
#
|
||||
# Helper variables, override with ENVs like `VERBOSE=1 dfm help`
|
||||
: "${VERBOSE:=0}"
|
||||
: "${DOTFILES:=$HOME/.dotfiles}"
|
||||
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install-dotfiles.sh}"
|
||||
: "${BREWFILE:=$DOTFILES/Brewfile}"
|
||||
: "${HOSTFILES:=$DOTFILES/hosts}"
|
||||
|
||||
SCRIPT=$(basename "$0")
|
||||
|
||||
# shellcheck source=./../../scripts/shared.sh
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
function section_install
|
||||
{
|
||||
USAGE_PREFIX="$SCRIPT install"
|
||||
|
||||
case "$1" in
|
||||
all)
|
||||
$0 install antigen
|
||||
$0 install starship
|
||||
$0 install nvm
|
||||
$0 install macos
|
||||
$0 install npm
|
||||
;;
|
||||
antigen)
|
||||
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 New antigen installed!"
|
||||
;;
|
||||
starship)
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir ~/.local/bin && msg_done "🎉 starship installed!"
|
||||
;;
|
||||
nvm)
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && msg_done " ^=^n^i nvm installed!"
|
||||
;;
|
||||
macos)
|
||||
bash "$DOTFILES/scripts/set-macos-defaults.sh" && msg_done "🎉 Brewfile defined apps has been installed!"
|
||||
;;
|
||||
npm)
|
||||
bash "$DOTFILES/scripts/install-npm-packages.sh" && msg_done "NPM Packages have been installed!"
|
||||
;;
|
||||
settler)
|
||||
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Settler has been run!"
|
||||
;;
|
||||
*)
|
||||
menu_section "$USAGE_PREFIX" "all | antigen | starship | nvm | npm | macos | settler"
|
||||
menu_item "all" "Installs antigen, macos, brew and ext_gh"
|
||||
menu_item "antigen" "Updates the antigen.zsh file"
|
||||
menu_item "starship" "Install starship.rs"
|
||||
menu_item "nvm" "Install Node Version Manager (nvm)"
|
||||
menu_item "npm" "Install NPM Packages"
|
||||
menu_item "macos" "Setup nice macOS defaults"
|
||||
menu_item "settler" "Runs the WIP settler.sh"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function section_brew
|
||||
{
|
||||
USAGE_PREFIX="$SCRIPT brew"
|
||||
|
||||
if ! command -v brew &> /dev/null; then
|
||||
menu_section "$USAGE_PREFIX" "brew not available on this system"
|
||||
else
|
||||
case "$1" in
|
||||
install)
|
||||
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
|
||||
;;
|
||||
update)
|
||||
brew update && brew outdated && brew upgrade && brew cleanup
|
||||
msg_done "🎉 Done!"
|
||||
;;
|
||||
updatebundle)
|
||||
# Updates .dotfiles/Brewfile with descriptions
|
||||
brew bundle dump \
|
||||
--force \
|
||||
--file="$BREWFILE" \
|
||||
--describe && msg_done "🎉 Done!"
|
||||
;;
|
||||
autoupdate)
|
||||
brew autoupdate delete
|
||||
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
||||
;;
|
||||
*)
|
||||
menu_section "$USAGE_PREFIX" "install | update | updatebundle | autoupdate"
|
||||
menu_item "install" "Installs items defined in Brewfile"
|
||||
menu_item "update" "Updates and upgrades brew packages"
|
||||
menu_item "updatebundle" "Updates Brewfile with descriptions"
|
||||
menu_item "autoupdate" "Setups brew auto-update and runs it immediately"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
function section_dotfiles
|
||||
{
|
||||
USAGE_PREFIX="$SCRIPT dotfiles"
|
||||
|
||||
case "$1" in
|
||||
reset_all)
|
||||
msg_ok "Running all reset commands"
|
||||
$0 dotfiles reset_nvim
|
||||
;;
|
||||
reset_nvim)
|
||||
rm -rf \
|
||||
~/.local/share/nvim \
|
||||
~/.local/state/nvim \
|
||||
~/.cache/nvim \
|
||||
~/.config/astronvim \
|
||||
~/.config/nvim
|
||||
msg_ok "Deleted old nvim files"
|
||||
ln -s ~/.dotfiles/config/astronvim ~/.config/astronvim
|
||||
ln -s ~/.dotfiles/config/nvim ~/.config/nvim
|
||||
msg_ok "Linked nvim and astronvim"
|
||||
hash npm 2> /dev/null && $0 install npm
|
||||
msg_ok "Installed packages"
|
||||
msg_done "...and we are done!"
|
||||
;;
|
||||
yamlfmt)
|
||||
# format yaml files
|
||||
yamlfmt -conf "$DOTFILES/.yamlfmt"
|
||||
;;
|
||||
shfmt)
|
||||
# Format shell scripts according to following rules.
|
||||
find "$DOTFILES" \
|
||||
-type f -perm +111 \
|
||||
-not -path '*/.git/*' \
|
||||
-not -path '*dotbot*' \
|
||||
-not -name '*.pl' \
|
||||
-not -name '*.py' \
|
||||
-exec shfmt \
|
||||
--language-dialect bash \
|
||||
--func-next-line --list --write \
|
||||
--indent 2 --case-indent --space-redirects \
|
||||
--binary-next-line {} \;
|
||||
msg_done "🎉 dotfiles have been formatted!"
|
||||
;;
|
||||
*)
|
||||
menu_section "$USAGE_PREFIX" "reset_all | reset_nvim | yamlfmt | shfmt"
|
||||
menu_item "reset_all" "Reset everything, runs all configured reset actions"
|
||||
menu_item "reset_nvim" "Resets nvim. Deletes caches, removes nvim folders and relinks nvim folders"
|
||||
menu_item "yamlfmt" "Run yamlfmt to all dotfiles, which are in our control"
|
||||
menu_item "shfmt" "Run shfmt to all dotfiles"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function section_check
|
||||
{
|
||||
USAGE_PREFIX="$SCRIPT check"
|
||||
X_HOSTNAME=$(hostname)
|
||||
X_ARCH=$(uname)
|
||||
|
||||
case "$1" in
|
||||
a | arch)
|
||||
[[ "$2" = "" ]] && echo "$X_ARCH" && exit 0
|
||||
[[ $X_ARCH = "$2" ]] && exit 0 || exit 1
|
||||
;;
|
||||
h | host | hostname)
|
||||
[[ "$2" = "" ]] && echo "$X_HOSTNAME" && exit 0
|
||||
[[ $X_HOSTNAME = "$2" ]] && exit 0 || exit 1
|
||||
;;
|
||||
*)
|
||||
menu_section "$USAGE_PREFIX" "arch | host"
|
||||
menu_item "arch <arch>" "Empty returns current. Exit code 0 when match, 1 when not."
|
||||
menu_item "host <host>" "Empty returns current. Exit code 0 when match, 1 when not."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Secret menu for visual tests
|
||||
function section_tests
|
||||
{
|
||||
USAGE_PREFIX="$SCRIPT tests"
|
||||
|
||||
case "$1" in
|
||||
msg)
|
||||
msg "msg"
|
||||
msg_done "msg_done"
|
||||
msg_prompt "msg_prompt"
|
||||
msg_prompt_done "msg_prompt_done"
|
||||
msg_nested "msg_nested"
|
||||
msg_nested_done "msg_nested_done"
|
||||
msg_run "msg_run" "second_param"
|
||||
msg_ok "msg_ok"
|
||||
msg_warn "msg_warn"
|
||||
msg_err "msg_err"
|
||||
;;
|
||||
*)
|
||||
menu_section "$USAGE_PREFIX" "msg"
|
||||
menu_item "msg" "List all log functions from shared.sh"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function usage
|
||||
{
|
||||
echo ""
|
||||
menu_section "Usage: $SCRIPT" "install | reset | brew | check | dotfiles"
|
||||
echo $" All commands have their own subcommands."
|
||||
echo ""
|
||||
section_install
|
||||
echo ""
|
||||
section_brew
|
||||
echo ""
|
||||
section_check
|
||||
echo ""
|
||||
section_dotfiles
|
||||
}
|
||||
|
||||
# The main loop. first keyword after $0 triggers section, or help.
|
||||
case "$1" in
|
||||
install) section_install "$2" ;;
|
||||
brew) section_brew "$2" ;;
|
||||
check) section_check "$2" ;;
|
||||
dotfiles) section_dotfiles "$2" ;;
|
||||
tests) section_tests "$2" ;;
|
||||
*) usage && exit 0 ;;
|
||||
esac
|
||||
82
local/bin/git-dirty
Executable file
82
local/bin/git-dirty
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env bash
|
||||
# Get git repository status for all subdirectories
|
||||
# recursively in specified dir.
|
||||
#
|
||||
# Check the default dir:
|
||||
# `git-dirty.sh`
|
||||
# Check specific dir:
|
||||
# `git-dirty.sh ~/Projects`
|
||||
# Override default dir with env:
|
||||
# `GIT_DIRTY_DIR=$HOME/Projects git-dirty.sh`
|
||||
#
|
||||
# If you want to skip directory from checks, just add `.ignore` file next
|
||||
# to the `.git` folder. ProTip: Add `.ignore` to your global `.gitignore`.
|
||||
#
|
||||
# The script automatically skips folders:
|
||||
# node_modules, vendor
|
||||
#
|
||||
# SET Defaults:
|
||||
# Default dir to check, can be overridden in env (.bashrc, .zshrc, ...)
|
||||
: "${GIT_DIRTY_DIR:=$HOME/Code}"
|
||||
|
||||
# If user has provided folder as a first argument, use it.
|
||||
if [ "$1" != "" ]; then
|
||||
GIT_DIRTY_DIR="$1"
|
||||
fi
|
||||
|
||||
# UTF-8 ftw
|
||||
GITDIRTY="❌ "
|
||||
GITCLEAN="✅ "
|
||||
|
||||
catch()
|
||||
{
|
||||
echo "Error $1 occurred on $2"
|
||||
}
|
||||
|
||||
gitdirty()
|
||||
{
|
||||
local d="$1"
|
||||
trap 'catch $? $LINENO' ERR
|
||||
|
||||
if [[ -d "$d" ]]; then
|
||||
if [[ -e "$d/.ignore" ]]; then
|
||||
echo -e ""
|
||||
else
|
||||
# Check that $d is not '--', 'vendor', or 'node_modules'
|
||||
if [[ "${d:0:2}" == "--" ]] || [[ "$d" == "vendor" ]] || [[ "$d" == "node_modules" ]]; then
|
||||
echo ""
|
||||
else
|
||||
cd "$d" > /dev/null
|
||||
|
||||
# If we have `.git` folder, check it.
|
||||
if [[ -d ".git" ]]; then
|
||||
ISDIRTY=$(git diff --shortstat 2> /dev/null | tail -n1)
|
||||
ICON="$GITCLEAN"
|
||||
|
||||
[[ $ISDIRTY != "" ]] && ICON="$GITDIRTY"
|
||||
|
||||
printf " %s %s\n" "$ICON" "$(pwd)"
|
||||
else
|
||||
# If it wasn't git repository, check subdirectories.
|
||||
gitdirtyrepos -- *
|
||||
fi
|
||||
fi
|
||||
cd .. > /dev/null
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
gitdirtyrepos()
|
||||
{
|
||||
for x in "$@"; do
|
||||
gitdirty "$x"
|
||||
done
|
||||
}
|
||||
|
||||
set -e
|
||||
trap 'case $? in
|
||||
139) echo "segfault occurred";;
|
||||
11) echo "ssegfault occurred";;
|
||||
esac' EXIT
|
||||
|
||||
gitdirtyrepos "$GIT_DIRTY_DIR"
|
||||
188
local/bin/iterm2_shell_integration.zsh
Executable file
188
local/bin/iterm2_shell_integration.zsh
Executable file
@@ -0,0 +1,188 @@
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
if [[ -o interactive ]]; then
|
||||
if [ "${ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX-}""$TERM" != "tmux-256color" -a "${ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX-}""$TERM" != "screen" -a "${ITERM_SHELL_INTEGRATION_INSTALLED-}" = "" -a "$TERM" != linux -a "$TERM" != dumb ]; then
|
||||
ITERM_SHELL_INTEGRATION_INSTALLED=Yes
|
||||
ITERM2_SHOULD_DECORATE_PROMPT="1"
|
||||
# Indicates start of command output. Runs just before command executes.
|
||||
iterm2_before_cmd_executes()
|
||||
{
|
||||
if [ "$TERM_PROGRAM" = "iTerm.app" ]; then
|
||||
printf "\033]133;C;\r\007"
|
||||
else
|
||||
printf "\033]133;C;\007"
|
||||
fi
|
||||
}
|
||||
|
||||
iterm2_set_user_var()
|
||||
{
|
||||
printf "\033]1337;SetUserVar=%s=%s\007" "$1" $(printf "%s" "$2" | base64 | tr -d '\n')
|
||||
}
|
||||
|
||||
# Users can write their own version of this method. It should call
|
||||
# iterm2_set_user_var but not produce any other output.
|
||||
# e.g., iterm2_set_user_var currentDirectory $PWD
|
||||
# Accessible in iTerm2 (in a badge now, elsewhere in the future) as
|
||||
# \(user.currentDirectory).
|
||||
whence -v iterm2_print_user_vars > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
iterm2_print_user_vars()
|
||||
{
|
||||
true
|
||||
}
|
||||
fi
|
||||
|
||||
iterm2_print_state_data()
|
||||
{
|
||||
local _iterm2_hostname="${iterm2_hostname-}"
|
||||
if [ -z "${iterm2_hostname:-}" ]; then
|
||||
_iterm2_hostname=$(hostname -f 2> /dev/null)
|
||||
fi
|
||||
printf "\033]1337;RemoteHost=%s@%s\007" "$USER" "${_iterm2_hostname-}"
|
||||
printf "\033]1337;CurrentDir=%s\007" "$PWD"
|
||||
iterm2_print_user_vars
|
||||
}
|
||||
|
||||
# Report return code of command; runs after command finishes but before prompt
|
||||
iterm2_after_cmd_executes()
|
||||
{
|
||||
printf "\033]133;D;%s\007" "$STATUS"
|
||||
iterm2_print_state_data
|
||||
}
|
||||
|
||||
# Mark start of prompt
|
||||
iterm2_prompt_mark()
|
||||
{
|
||||
printf "\033]133;A\007"
|
||||
}
|
||||
|
||||
# Mark end of prompt
|
||||
iterm2_prompt_end()
|
||||
{
|
||||
printf "\033]133;B\007"
|
||||
}
|
||||
|
||||
# There are three possible paths in life.
|
||||
#
|
||||
# 1) A command is entered at the prompt and you press return.
|
||||
# The following steps happen:
|
||||
# * iterm2_preexec is invoked
|
||||
# * PS1 is set to ITERM2_PRECMD_PS1
|
||||
# * ITERM2_SHOULD_DECORATE_PROMPT is set to 1
|
||||
# * The command executes (possibly reading or modifying PS1)
|
||||
# * iterm2_precmd is invoked
|
||||
# * ITERM2_PRECMD_PS1 is set to PS1 (as modified by command execution)
|
||||
# * PS1 gets our escape sequences added to it
|
||||
# * zsh displays your prompt
|
||||
# * You start entering a command
|
||||
#
|
||||
# 2) You press ^C while entering a command at the prompt.
|
||||
# The following steps happen:
|
||||
# * (iterm2_preexec is NOT invoked)
|
||||
# * iterm2_precmd is invoked
|
||||
# * iterm2_before_cmd_executes is called since we detected that iterm2_preexec was not run
|
||||
# * (ITERM2_PRECMD_PS1 and PS1 are not messed with, since PS1 already has our escape
|
||||
# sequences and ITERM2_PRECMD_PS1 already has PS1's original value)
|
||||
# * zsh displays your prompt
|
||||
# * You start entering a command
|
||||
#
|
||||
# 3) A new shell is born.
|
||||
# * PS1 has some initial value, either zsh's default or a value set before this script is sourced.
|
||||
# * iterm2_precmd is invoked
|
||||
# * ITERM2_SHOULD_DECORATE_PROMPT is initialized to 1
|
||||
# * ITERM2_PRECMD_PS1 is set to the initial value of PS1
|
||||
# * PS1 gets our escape sequences added to it
|
||||
# * Your prompt is shown and you may begin entering a command.
|
||||
#
|
||||
# Invariants:
|
||||
# * ITERM2_SHOULD_DECORATE_PROMPT is 1 during and just after command execution, and "" while the prompt is
|
||||
# shown and until you enter a command and press return.
|
||||
# * PS1 does not have our escape sequences during command execution
|
||||
# * After the command executes but before a new one begins, PS1 has escape sequences and
|
||||
# ITERM2_PRECMD_PS1 has PS1's original value.
|
||||
iterm2_decorate_prompt()
|
||||
{
|
||||
# This should be a raw PS1 without iTerm2's stuff. It could be changed during command
|
||||
# execution.
|
||||
ITERM2_PRECMD_PS1="$PS1"
|
||||
ITERM2_SHOULD_DECORATE_PROMPT=""
|
||||
|
||||
# Add our escape sequences just before the prompt is shown.
|
||||
# Use ITERM2_SQUELCH_MARK for people who can't mdoify PS1 directly, like powerlevel9k users.
|
||||
# This is gross but I had a heck of a time writing a correct if statetment for zsh 5.0.2.
|
||||
local PREFIX=""
|
||||
if [[ $PS1 == *"$(iterm2_prompt_mark)"* ]]; then
|
||||
PREFIX=""
|
||||
elif [[ "${ITERM2_SQUELCH_MARK-}" != "" ]]; then
|
||||
PREFIX=""
|
||||
else
|
||||
PREFIX="%{$(iterm2_prompt_mark)%}"
|
||||
fi
|
||||
PS1="$PREFIX$PS1%{$(iterm2_prompt_end)%}"
|
||||
ITERM2_DECORATED_PS1="$PS1"
|
||||
}
|
||||
|
||||
iterm2_precmd()
|
||||
{
|
||||
local STATUS="$?"
|
||||
if [ -z "${ITERM2_SHOULD_DECORATE_PROMPT-}" ]; then
|
||||
# You pressed ^C while entering a command (iterm2_preexec did not run)
|
||||
iterm2_before_cmd_executes
|
||||
if [ "$PS1" != "${ITERM2_DECORATED_PS1-}" ]; then
|
||||
# PS1 changed, perhaps in another precmd. See issue 9938.
|
||||
ITERM2_SHOULD_DECORATE_PROMPT="1"
|
||||
fi
|
||||
fi
|
||||
|
||||
iterm2_after_cmd_executes "$STATUS"
|
||||
|
||||
if [ -n "$ITERM2_SHOULD_DECORATE_PROMPT" ]; then
|
||||
iterm2_decorate_prompt
|
||||
fi
|
||||
}
|
||||
|
||||
# This is not run if you press ^C while entering a command.
|
||||
iterm2_preexec()
|
||||
{
|
||||
# Set PS1 back to its raw value prior to executing the command.
|
||||
PS1="$ITERM2_PRECMD_PS1"
|
||||
ITERM2_SHOULD_DECORATE_PROMPT="1"
|
||||
iterm2_before_cmd_executes
|
||||
}
|
||||
|
||||
# If hostname -f is slow on your system set iterm2_hostname prior to
|
||||
# sourcing this script. We know it is fast on macOS so we don't cache
|
||||
# it. That lets us handle the hostname changing like when you attach
|
||||
# to a VPN.
|
||||
if [ -z "${iterm2_hostname-}" ]; then
|
||||
if [ "$(uname)" != "Darwin" ]; then
|
||||
iterm2_hostname=$(hostname -f 2> /dev/null)
|
||||
# Some flavors of BSD (i.e. NetBSD and OpenBSD) don't have the -f option.
|
||||
if [ $? -ne 0 ]; then
|
||||
iterm2_hostname=$(hostname)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -z ${precmd_functions-} ]] && precmd_functions=()
|
||||
precmd_functions=($precmd_functions iterm2_precmd)
|
||||
|
||||
[[ -z ${preexec_functions-} ]] && preexec_functions=()
|
||||
preexec_functions=($preexec_functions iterm2_preexec)
|
||||
|
||||
iterm2_print_state_data
|
||||
printf "\033]1337;ShellIntegrationVersion=14;shell=zsh\007"
|
||||
fi
|
||||
fi
|
||||
25
local/bin/x-backup-folder.sh
Executable file
25
local/bin/x-backup-folder.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIRECTORY=$1
|
||||
FILENAME=$2
|
||||
|
||||
if [ -z "${DIRECTORY}" ]; then
|
||||
echo "DIRECTORY (first argument) is missing"
|
||||
echo "Usage: $0 folder_to_backup"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z "${FILENAME}" ]; then
|
||||
FILENAME=$DIRECTORY
|
||||
fi
|
||||
|
||||
FILENAME=${FILENAME} \
|
||||
| tr '/' _ \
|
||||
| iconv -t ascii//TRANSLIT \
|
||||
| sed -r s/[^a-zA-Z0-9]+/_/g \
|
||||
| sed -r s/^_+\|-+$//g
|
||||
|
||||
TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
|
||||
FILENAME_TIMESTAMP="${FILENAME}_${TIMESTAMP}"
|
||||
|
||||
tar cvzf "${FILENAME_TIMESTAMP}.tar.gz" "${DIRECTORY}/"
|
||||
43
local/bin/x-backup-mysql-with-prefix.sh
Executable file
43
local/bin/x-backup-mysql-with-prefix.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Backup local MySQL Database tables with certain prefix.
|
||||
# Ismo Vuorinen <https://github.com/ivuorinen> 2018
|
||||
#
|
||||
|
||||
SCRIPT=$(basename "$0")
|
||||
PREFIX=$1
|
||||
FILENAME=$2
|
||||
DATABASE=$3
|
||||
|
||||
: "${VERBOSE:=0}"
|
||||
: "${DEFAULT_DATABASE:="wordpress"}"
|
||||
|
||||
if [ -z "${PREFIX}" ]; then
|
||||
echo "(!) TABLE_PREFIX (first argument) is missing"
|
||||
echo "(>) Usage: $SCRIPT <TABLE_PREFIX> <FILENAME_PREFIX> [<DATABASE>]"
|
||||
echo " * <TABLE_PREFIX> = database table prefix, e.g. 'wp_'"
|
||||
echo " * <FILENAME_PREFIX> = FILENAME prefix, defaults to table prefix. Use something descriptive e.g. 'wordpress'"
|
||||
echo " * <DATABASE> = [optional] Third argument DATABASE, defaults to '$DEFAULT_DATABASE'."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "${FILENAME}" ]; then
|
||||
# echo "FILENAME (second argument) is missing, using PREFIX ($PREFIX)"
|
||||
FILENAME=$PREFIX
|
||||
fi
|
||||
|
||||
if [ -z "${DATABASE}" ]; then
|
||||
# echo "DATABASE (third argument) is missing, using default ($DEFAULT_DATABASE)"
|
||||
DATABASE=$DEFAULT_DATABASE
|
||||
fi
|
||||
|
||||
TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
|
||||
FILENAME_TIMESTAMP="${DATABASE}_${FILENAME}_${TIMESTAMP}.sql"
|
||||
|
||||
mysqldump \
|
||||
"${DATABASE}" \
|
||||
"$(
|
||||
echo "show tables like '${PREFIX}%';" \
|
||||
| mysql "${DATABASE}" \
|
||||
| sed '/Tables_in/d'
|
||||
)" > "${FILENAME_TIMESTAMP}"
|
||||
19
local/bin/x-check-git-attributes
Executable file
19
local/bin/x-check-git-attributes
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Check git repo's files .gitattributes and are all of them mapped.
|
||||
# Ismo Vuorinen <https://github.com/ivuorinen> 2022
|
||||
#
|
||||
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo "git could not be found, please install it first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
missing_attributes=$(git ls-files | git check-attr -a --stdin | grep "text: auto")
|
||||
|
||||
if [[ "$missing_attributes" ]]; then
|
||||
echo ".gitattributes rule missing for the following files:"
|
||||
echo "$missing_attributes"
|
||||
else
|
||||
echo "All files have a corresponding rule in .gitattributes"
|
||||
fi
|
||||
209
local/bin/x-dupes.pl
Executable file
209
local/bin/x-dupes.pl
Executable file
@@ -0,0 +1,209 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
=head1 NAME
|
||||
|
||||
dupes - Report on files with duplicate contents, via SHA1 hash.
|
||||
|
||||
=cut
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
dupes [options] directory
|
||||
|
||||
General Options:
|
||||
|
||||
--help Show the help information for this script.
|
||||
--verbose Show useful debugging information.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
=head1 ABOUT
|
||||
|
||||
dupes is a simple script to report upon files that are identical,
|
||||
recursively.
|
||||
|
||||
The process involves calculating the SHA1 hash of the file contents
|
||||
and reporting on anything collisions we see.
|
||||
|
||||
Note that a collision might be caused by a symbolic link, or hardlink,
|
||||
so blindly deleting duplicates without investigation is almost certainly
|
||||
a mistake.
|
||||
|
||||
=cut
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Steve
|
||||
--
|
||||
http://www.steve.org.uk/
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Copyright (c) 2013 by Steve Kemp. All rights reserved.
|
||||
|
||||
This script is free software;you can redistribute it and/or modify it under
|
||||
the same terms as Perl itself.
|
||||
|
||||
The LICENSE file contains the full text of the license.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use File::Find;
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
|
||||
|
||||
#
|
||||
# Parse the arguments
|
||||
#
|
||||
my %config = parsedOptions();
|
||||
|
||||
|
||||
#
|
||||
# The path to examine.
|
||||
#
|
||||
my $path = $ARGV[0] || '.';
|
||||
|
||||
|
||||
#
|
||||
# Get the hashing object, dynamically.
|
||||
#
|
||||
my $ctx = getHashObject();
|
||||
my %digest;
|
||||
|
||||
|
||||
#
|
||||
# Find files and store the hash of their contents.
|
||||
#
|
||||
find( {
|
||||
'wanted' => sub {
|
||||
if ( -f $_ )
|
||||
{
|
||||
lstat;
|
||||
if ( ( -r _ ) && ( !-l _ ) )
|
||||
{
|
||||
$ctx->reset;
|
||||
$ctx->addfile($_);
|
||||
my $md5 = $ctx->hexdigest;
|
||||
if ( exists $digest{ $md5 } )
|
||||
{
|
||||
push @{ $digest{ $md5 }->{ 'dupes' } }, $_;
|
||||
}
|
||||
else
|
||||
{
|
||||
$digest{ $md5 } = { 'file' => $_,
|
||||
'dupes' => [] };
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$config{ 'verbose' } && print "Entering $_\n";
|
||||
}
|
||||
},
|
||||
'no_chdir' => 1
|
||||
},
|
||||
$path
|
||||
);
|
||||
|
||||
|
||||
#
|
||||
# Report upon collisions.
|
||||
#
|
||||
foreach my $hash ( keys %digest )
|
||||
{
|
||||
my $dupes = $digest{ $hash }->{ 'dupes' };
|
||||
my $src = $digest{ $hash }->{ 'file' };
|
||||
|
||||
if (@$dupes)
|
||||
{
|
||||
print $src . "\n";
|
||||
foreach my $dupe (@$dupes)
|
||||
{
|
||||
print "\t$dupe\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# All done.
|
||||
#
|
||||
exit(0);
|
||||
|
||||
|
||||
=begin doc
|
||||
|
||||
Load one of M<Digest::SHA> and M<Digest::SHA1>, depending on what is available.
|
||||
|
||||
=end doc
|
||||
|
||||
=cut
|
||||
|
||||
sub getHashObject
|
||||
{
|
||||
my $hash = undef;
|
||||
|
||||
foreach my $module (qw! Digest::SHA Digest::SHA1 !)
|
||||
{
|
||||
|
||||
# If we succeeded in calculating the hash we're done.
|
||||
next if ( defined($hash) );
|
||||
|
||||
# Attempt to load the module
|
||||
my $eval = "use $module;";
|
||||
|
||||
## no critic (Eval)
|
||||
eval($eval);
|
||||
## use critic
|
||||
|
||||
if ( !$@ )
|
||||
{
|
||||
$hash = $module->new;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($hash)
|
||||
{
|
||||
return ($hash);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Failed to load either DIgest::SHA or Digest::SHA1\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
=begin doc
|
||||
|
||||
Parse the options and return suitable values.
|
||||
|
||||
=end doc
|
||||
|
||||
=cut
|
||||
|
||||
sub parsedOptions
|
||||
{
|
||||
my %vars;
|
||||
|
||||
exit
|
||||
if (
|
||||
!GetOptions( "help" => \$vars{ 'help' },
|
||||
"verbose" => \$vars{ 'verbose' } ) );
|
||||
|
||||
pod2usage(1) if ( $vars{ 'help' } );
|
||||
|
||||
return (%vars);
|
||||
|
||||
}
|
||||
|
||||
16
local/bin/x-foreach
Executable file
16
local/bin/x-foreach
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# foreach <folder> <commands that should be run to each file>
|
||||
#
|
||||
# Source: https://github.com/mvdan/dotfiles/blob/master/.bin/foreach
|
||||
|
||||
cmd=$1
|
||||
shift
|
||||
|
||||
for dir in $($cmd); do
|
||||
(
|
||||
echo "$dir"
|
||||
cd "$dir" || exit 1
|
||||
eval "$@" # allow multiple commands like "foo && bar"
|
||||
)
|
||||
done
|
||||
166
local/bin/x-git-largest-files.py
Executable file
166
local/bin/x-git-largest-files.py
Executable file
@@ -0,0 +1,166 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Python script to find the largest files in a git repository.
|
||||
# The general method is based on the script in this blog post:
|
||||
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
|
||||
#
|
||||
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch
|
||||
# of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects.
|
||||
#
|
||||
# The MIT License (MIT)
|
||||
# Copyright (c) 2015 Nick Kocharhook
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
# associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
# including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all copies or
|
||||
# substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
||||
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
|
||||
# OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
from subprocess import check_output, CalledProcessError, Popen, PIPE
|
||||
import argparse
|
||||
import signal
|
||||
import sys
|
||||
|
||||
sortByOnDiskSize = False
|
||||
|
||||
def main():
|
||||
global sortByOnDiskSize
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
args = parseArguments()
|
||||
sortByOnDiskSize = args.sortByOnDiskSize
|
||||
sizeLimit = 1024*args.filesExceeding
|
||||
|
||||
if args.filesExceeding > 0:
|
||||
print "Finding objects larger than {}kB…".format(args.filesExceeding)
|
||||
else:
|
||||
print "Finding the {} largest objects…".format(args.matchCount)
|
||||
|
||||
blobs = getTopBlobs(args.matchCount, sizeLimit)
|
||||
|
||||
populateBlobPaths(blobs)
|
||||
printOutBlobs(blobs)
|
||||
|
||||
def getTopBlobs(count, sizeLimit):
|
||||
sortColumn = 4
|
||||
|
||||
if sortByOnDiskSize:
|
||||
sortColumn = 3
|
||||
|
||||
verifyPack = "git verify-pack -v `git rev-parse --git-dir`/objects/pack/pack-*.idx | grep blob | sort -k{}nr".format(sortColumn)
|
||||
output = check_output(verifyPack, shell=True).split("\n")[:-1]
|
||||
|
||||
blobs = dict()
|
||||
compareBlob = Blob("a b {} {} c".format(sizeLimit, sizeLimit)) # use __lt__ to do the appropriate comparison
|
||||
|
||||
for objLine in output:
|
||||
blob = Blob(objLine)
|
||||
|
||||
if sizeLimit > 0:
|
||||
if compareBlob < blob:
|
||||
blobs[blob.sha1] = blob
|
||||
else:
|
||||
break
|
||||
else:
|
||||
blobs[blob.sha1] = blob
|
||||
|
||||
if len(blobs) == count:
|
||||
break
|
||||
|
||||
return blobs
|
||||
|
||||
|
||||
def populateBlobPaths(blobs):
|
||||
if len(blobs):
|
||||
print "Finding object paths…"
|
||||
|
||||
# Only include revs which have a path. Other revs aren't blobs.
|
||||
revList = "git rev-list --all --objects | awk '$2 {print}'"
|
||||
allObjectLines = check_output(revList, shell=True).split("\n")[:-1]
|
||||
|
||||
outstandingKeys = blobs.keys()
|
||||
|
||||
for line in allObjectLines:
|
||||
cols = line.split()
|
||||
sha1, path = cols[0], " ".join(cols[1:])
|
||||
|
||||
if (sha1 in outstandingKeys):
|
||||
outstandingKeys.remove(sha1)
|
||||
blobs[sha1].path = path
|
||||
|
||||
# short-circuit the search if we're done
|
||||
if not len(outstandingKeys):
|
||||
break
|
||||
|
||||
|
||||
def printOutBlobs(blobs):
|
||||
if len(blobs):
|
||||
csvLines = ["size,pack,hash,path"]
|
||||
|
||||
for blob in sorted(blobs.values(), reverse=True):
|
||||
csvLines.append(blob.csvLine())
|
||||
|
||||
p = Popen(["column", "-t", "-s", "','"], stdin=PIPE, stdout=PIPE, stderr=PIPE)
|
||||
stdout, stderr = p.communicate("\n".join(csvLines)+"\n")
|
||||
|
||||
print "\nAll sizes in kB. The pack column is the compressed size of the object inside the pack file.\n"
|
||||
print stdout.rstrip('\n')
|
||||
else:
|
||||
print "No files found which match those criteria."
|
||||
|
||||
|
||||
def parseArguments():
|
||||
parser = argparse.ArgumentParser(description='List the largest files in a git repository')
|
||||
parser.add_argument('-c', '--match-count', dest='matchCount', type=int, default=10,
|
||||
help='The number of files to return. Default is 10. Ignored if --files-exceeding is used.')
|
||||
parser.add_argument('--files-exceeding', dest='filesExceeding', type=int, default=0,
|
||||
help='The cutoff amount, in KB. Files with a pack size (or pyhsical size, with -p) larger than this will be printed.')
|
||||
parser.add_argument('-p', '--physical-sort', dest='sortByOnDiskSize', action='store_true', default=False,
|
||||
help='Sort by the on-disk size of the files. Default is to sort by the pack size.')
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def signal_handler(signal, frame):
|
||||
print('Caught Ctrl-C. Exiting.')
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
class Blob(object):
|
||||
sha1 = ''
|
||||
size = 0
|
||||
packedSize = 0
|
||||
path = ''
|
||||
|
||||
def __init__(self, line):
|
||||
cols = line.split()
|
||||
self.sha1, self.size, self.packedSize = cols[0], int(cols[2]), int(cols[3])
|
||||
|
||||
def __repr__(self):
|
||||
return '{} - {} - {} - {}'.format(self.sha1, self.size, self.packedSize, self.path)
|
||||
|
||||
def __lt__(self, other):
|
||||
if (sortByOnDiskSize):
|
||||
return self.size < other.size
|
||||
else:
|
||||
return self.packedSize < other.packedSize
|
||||
|
||||
def csvLine(self):
|
||||
return "{},{},{},{}".format(self.size/1024, self.packedSize/1024, self.sha1, self.path)
|
||||
|
||||
|
||||
# Default function is main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
229
local/bin/x-multi-ping.pl
Executable file
229
local/bin/x-multi-ping.pl
Executable file
@@ -0,0 +1,229 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
=head1 NAME
|
||||
|
||||
multi-ping - Multi-protocol ping wrapper
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
multi-ping [--loop|--forever] [--sleep=N] hostname1 hostname2 .. hostnameN
|
||||
|
||||
=cut
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This wrapper script will invoke one of 'ping' or 'ping6', as appropriate,
|
||||
to test the connectivity of a remote host and your route to it.
|
||||
|
||||
=cut
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Steve
|
||||
--
|
||||
http://www.steve.org.uk/
|
||||
|
||||
=cut
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Copyright (c) 2013-2014 by Steve Kemp. All rights reserved.
|
||||
|
||||
This script is free software; you can redistribute it and/or modify it under
|
||||
the same terms as Perl itself.
|
||||
|
||||
The LICENSE file contains the full text of the license.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
|
||||
|
||||
#
|
||||
# Check the dependencies.
|
||||
#
|
||||
checkSystem();
|
||||
|
||||
#
|
||||
# Parse the command-line.
|
||||
#
|
||||
my %config = parsedOptions();
|
||||
|
||||
|
||||
#
|
||||
# We could parse arguments here, for the moment we will hard-wire
|
||||
# a timeout of five seconds.
|
||||
#
|
||||
my $timeout = 5;
|
||||
|
||||
|
||||
#
|
||||
# If we didn't get any arguments then we should complain.
|
||||
#
|
||||
if ( scalar @ARGV < 1 )
|
||||
{
|
||||
print "Usage: multi-ping hostname1 hostname2 .. hostnameN\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Process each hostname specified upon the command-line.
|
||||
#
|
||||
# Looping if applicable.
|
||||
#
|
||||
do
|
||||
{
|
||||
foreach my $host (@ARGV)
|
||||
{
|
||||
pingHost($host);
|
||||
}
|
||||
|
||||
sleep( $config{ 'sleep' } );
|
||||
|
||||
} until ( !$config{ 'loop' } );
|
||||
|
||||
|
||||
|
||||
|
||||
=begin doc
|
||||
|
||||
Given a hostname lookup both the AAAA & A records. For each result
|
||||
perform the appropriate ping request.
|
||||
|
||||
=end doc
|
||||
|
||||
=cut
|
||||
|
||||
sub pingHost
|
||||
{
|
||||
my ($hostname) = (@_);
|
||||
|
||||
#
|
||||
# If we've been given an URI then we'll remove the leading-scheme
|
||||
# and use the hostname only.
|
||||
#
|
||||
if ( $hostname =~ m!^([a-z]+:\/\/)([^/]+)/?!i )
|
||||
{
|
||||
$hostname = $2;
|
||||
|
||||
#
|
||||
# Port might be specified too, drop that if present.
|
||||
#
|
||||
if ( $hostname =~ /^(.*):([0-9]+)$/ )
|
||||
{
|
||||
$hostname = $1;
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Lookup the IP for the name specified
|
||||
#
|
||||
my $res = Net::DNS::Resolver->new;
|
||||
|
||||
#
|
||||
# The two types we'll lookup.
|
||||
#
|
||||
# NOTE: This shouldn't be required but my laptop resolver seems to
|
||||
# struggle with lookups of the type "ANY". Sigh.
|
||||
#
|
||||
#
|
||||
foreach my $type (qw! A AAAA !)
|
||||
{
|
||||
my $query = $res->query( $hostname, $type );
|
||||
|
||||
if ($query)
|
||||
{
|
||||
foreach my $rr ( $query->answer )
|
||||
{
|
||||
my $ping_binary =
|
||||
$rr->type eq "A" ? "ping" :
|
||||
$rr->type eq "AAAA" ? "ping6" :
|
||||
"";
|
||||
if ($ping_binary)
|
||||
{
|
||||
my $result = system(
|
||||
"$ping_binary -c1 -w$timeout -W$timeout $hostname >/dev/null 2>/dev/null"
|
||||
);
|
||||
|
||||
print "Host $hostname - " . $rr->address() .
|
||||
( ( $result == 0 ) ? " - alive" : " - FAILED" ) . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "WARNING: Failed to resolve $hostname [$type]\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
=begin doc
|
||||
|
||||
Test that we have the required perl dependencies present.
|
||||
|
||||
=end doc
|
||||
|
||||
=cut
|
||||
|
||||
sub checkSystem
|
||||
{
|
||||
my $eval = "use Net::DNS;";
|
||||
|
||||
## no critic (Eval)
|
||||
eval($eval);
|
||||
## use critic
|
||||
|
||||
#
|
||||
# If we don't have Net::DNS we're out of luck.
|
||||
#
|
||||
if ($@)
|
||||
{
|
||||
print "The required Net::DNS module is missing. Aborting.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
=begin doc
|
||||
|
||||
Parse the options and return suitable values.
|
||||
|
||||
=end doc
|
||||
|
||||
=cut
|
||||
|
||||
sub parsedOptions
|
||||
{
|
||||
my %vars;
|
||||
|
||||
#
|
||||
# Defaults
|
||||
#
|
||||
$vars{ 'loop' } = 0;
|
||||
$vars{ 'sleep' } = 1;
|
||||
|
||||
exit
|
||||
if (
|
||||
!GetOptions( "help" => \$vars{ 'help' },
|
||||
"verbose" => \$vars{ 'verbose' },
|
||||
"forever" => \$vars{ 'loop' },
|
||||
"loop" => \$vars{ 'loop' },
|
||||
"sleep=i" => \$vars{ 'sleep' },
|
||||
) );
|
||||
|
||||
pod2usage(1) if ( $vars{ 'help' } );
|
||||
|
||||
return (%vars);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,18 +3,19 @@
|
||||
# List open (listened) ports, without the crud that
|
||||
# usually comes with `lsof -i`
|
||||
#
|
||||
# Modified by: Ismo Vuorinen <https://github.com/ivuorinen> 2020
|
||||
# Originally from: https://www.commandlinefu.com/commands/view/8951
|
||||
# Original author: https://www.commandlinefu.com/commands/by/wickedcpj
|
||||
#
|
||||
echo 'User: Command: Port:';
|
||||
echo '=====================================================';
|
||||
echo 'User: Command: PID: Port:'
|
||||
echo '========================================================='
|
||||
|
||||
lsof -i 4 -P -n +c 0 | \
|
||||
grep -i 'listen' | \
|
||||
awk '{print $3, $1, $9}' | \
|
||||
sed 's/ [a-z0-9\.\*]*:/ /' | \
|
||||
sort -k 3 -n | \
|
||||
xargs printf '%-20s %-25s %-5s\n' | uniq
|
||||
|
||||
echo "";
|
||||
lsof -i 4 -P -n +c 0 \
|
||||
| grep -i 'listen' \
|
||||
| awk '{print $3, $1, $2, $9}' \
|
||||
| sed 's/ [a-z0-9\.\*]*:/ /' \
|
||||
| sort -k 3 -n \
|
||||
| xargs printf '%-15s %-25s %-8s %-5s\n' \
|
||||
| uniq
|
||||
|
||||
echo ""
|
||||
|
||||
85
local/bin/x-quota-usage.php
Executable file
85
local/bin/x-quota-usage.php
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$debug = false;
|
||||
|
||||
$quota = '';
|
||||
$output = [];
|
||||
$fsCharLenght = 0;
|
||||
|
||||
if ($debug) {
|
||||
$quota = "Disk quotas for user viir (uid 2913):
|
||||
Filesystem blocks quota limit grace files quota limit grace
|
||||
10.0.0.89:/www/webroots/2 8277615 52428800 52428800 0 0 0
|
||||
10.0.0.179:/users1/users/2 1999431 52428800 52428800 0 0 0
|
||||
10.0.0.90:/siilo/2 24835106 524288000 524288000 0 0 0";
|
||||
} else {
|
||||
// $quota = system("quota -w");
|
||||
$quota = shell_exec("quota -w");
|
||||
}
|
||||
|
||||
function pad($i, $n = 3, $p = ' ') {
|
||||
return str_pad($i, $n, $p, STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
if (empty($quota)) {
|
||||
var_dump($quota);
|
||||
die("quota was empty\n");
|
||||
}
|
||||
|
||||
$quota = explode("\n", $quota);
|
||||
$quota = array_map('trim', $quota);
|
||||
|
||||
foreach ($quota as $lineNum => $line) {
|
||||
if ($lineNum < 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$values = array_filter(explode(" ", $line));
|
||||
|
||||
if (count($values) != 4) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$result = array_combine(['fs', 'used', 'quota', 'limit'], $values);
|
||||
|
||||
$result['used_percentage'] = round($result['used'] / $result['quota'] * 100, 3);
|
||||
$result['used_gb'] = round($result['used'] / 1024 / 1024, 2);
|
||||
$result['quota_gb'] = round($result['quota'] / 1024 / 1024, 2);
|
||||
|
||||
$char = strlen($result['fs']);
|
||||
if ($char > $fsCharLenght) {
|
||||
$fsCharLenght = $char;
|
||||
}
|
||||
|
||||
$output[] = $result;
|
||||
}
|
||||
|
||||
if (!empty($output)) {
|
||||
|
||||
$header = sprintf("%s | %s | %s | %s",
|
||||
str_pad("Mount", $fsCharLenght),
|
||||
'Usage%',
|
||||
'Used/Total',
|
||||
'Bar'
|
||||
);
|
||||
$headerWidth = strlen($header);
|
||||
|
||||
echo "\n" . $header . "\n";
|
||||
echo str_repeat('-', $headerWidth + 24) . "\n";
|
||||
|
||||
foreach ($output as $i) {
|
||||
$barUsed = round($i['used_percentage']) / 4;
|
||||
echo sprintf(
|
||||
"%s | %s | %s | [%s]",
|
||||
str_pad($i['fs'], $fsCharLenght),
|
||||
str_pad(round($i['used_percentage'], 1) . '%', 6, ' ', STR_PAD_LEFT),
|
||||
str_pad($i['used_gb'] . '/' . $i['quota_gb'], 10, ' ', STR_PAD_LEFT),
|
||||
str_pad(str_repeat('#', $barUsed), 25, '_')
|
||||
) . "\n";
|
||||
}
|
||||
|
||||
echo "\n\n";
|
||||
}
|
||||
|
||||
106
local/bin/x-ssl-expiry-date
Executable file
106
local/bin/x-ssl-expiry-date
Executable file
@@ -0,0 +1,106 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# About
|
||||
# -----
|
||||
# Check the expiry date of the SSL certificate on the given host.
|
||||
#
|
||||
# License
|
||||
# -------
|
||||
# Copyright (c) 2013-2015 by Steve Kemp. All rights reserved.
|
||||
#
|
||||
# This script is free software; you can redistribute it and/or modify it under
|
||||
# the same terms as Perl itself.
|
||||
#
|
||||
# The LICENSE file contains the full text of the license.
|
||||
|
||||
# Simple function to show usage information, and exit.
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 [-d] [-p 443] domain1.org domain2.com .. domainN"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Default settings for flags set by the command-line arguments
|
||||
days=0
|
||||
port=443
|
||||
|
||||
# Parse the argument(s) - i.e. look for "-d" / "-p 443".
|
||||
while getopts "h?dp:" opt; do
|
||||
case $opt in
|
||||
h)
|
||||
usage
|
||||
;;
|
||||
\?)
|
||||
usage
|
||||
;;
|
||||
d)
|
||||
days=1
|
||||
;;
|
||||
p)
|
||||
port=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
# Ensure we have some arguments
|
||||
if [ "$#" = "0" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# For each domain-name on the command-line.
|
||||
for name in "$@"; do
|
||||
|
||||
# Make a temporary file
|
||||
# Test if we have BSD or GNU version of mktemp
|
||||
if (strings "$(which mktemp)" | grep -q GNU); then
|
||||
# We have the GNU version
|
||||
tmp=$(mktemp)
|
||||
else
|
||||
# We have the BSD version
|
||||
tmp=$(mktemp -t tmp)
|
||||
fi
|
||||
|
||||
# Download the certificate
|
||||
if (! echo "" | openssl s_client -connect "$name:$port" > "$tmp" 2> /dev/null); then
|
||||
echo "Failed to get cert from https://$name:$port/"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# Get the expiry date
|
||||
date=$(openssl x509 -in "$tmp" -noout -enddate | awk -F= '{print $2}')
|
||||
|
||||
# Remove the temporary file
|
||||
rm -f "$tmp"
|
||||
|
||||
# Convert the expiry date + todays date to seconds-past epoch
|
||||
# Check if we have the BSD or the GNU version of date
|
||||
if (strings "$(which date)" | grep -q GNU); then
|
||||
# We have GNU this is easy
|
||||
then=$(date --date "$date" +%s)
|
||||
else
|
||||
# We have BSD now it is getting complicated
|
||||
year=$(echo "$date" | awk '{print $4}')
|
||||
month=$(echo "$date" | awk '{print $1}')
|
||||
day=$(echo "$date" | awk '{print $2}')
|
||||
hour=$(echo "$date" | awk '{print $3}' | awk -F: '{print $1}')
|
||||
minute=$(echo "$date" | awk '{print $3}' | awk -F: '{print $2}')
|
||||
second=$(echo "$date" | awk '{print $3}' | awk -F: '{print $3}')
|
||||
then=$(date -v${year}y -v${month} -v${day}d -v${hour}H -v${minute}M -v${second}S -u +%s)
|
||||
fi
|
||||
|
||||
now=$(date +%s)
|
||||
|
||||
# Day diff
|
||||
diff=$(("$then" - "$now"))
|
||||
diff=$($diff / 86400)
|
||||
|
||||
# All done
|
||||
if [ "$days" = "1" ]; then
|
||||
echo "${name}: ${diff}"
|
||||
else
|
||||
echo "$name"
|
||||
echo " Expires: ${date}"
|
||||
echo " Days: ${diff}"
|
||||
fi
|
||||
done
|
||||
12
local/bin/x-until-error
Executable file
12
local/bin/x-until-error
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# About
|
||||
# -----
|
||||
# Repeat the command until it fails - always run at least once.
|
||||
|
||||
"$@"
|
||||
|
||||
# If the status code was zero then repeat.
|
||||
while [ $? -eq 0 ]; do
|
||||
"$@"
|
||||
done
|
||||
24
local/bin/x-until-success
Executable file
24
local/bin/x-until-success
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# About
|
||||
# -----
|
||||
# Repeat the command until it succeeds - always run at least once.
|
||||
#
|
||||
#
|
||||
# License
|
||||
# -------
|
||||
#
|
||||
# Copyright (c) 2013 by Steve Kemp. All rights reserved.
|
||||
#
|
||||
# This script is free software; you can redistribute it and/or modify it under
|
||||
# the same terms as Perl itself.
|
||||
#
|
||||
# The LICENSE file contains the full text of the license.
|
||||
|
||||
# Run the first time.
|
||||
"$@"
|
||||
|
||||
# If the status code was not zero then repeat.
|
||||
while [ $? -ne 0 ]; do
|
||||
"$@"
|
||||
done
|
||||
52
local/bin/x-validate-sha256sum.sh
Executable file
52
local/bin/x-validate-sha256sum.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
##
|
||||
# This script contains helper for sha256 validating your downloads
|
||||
#
|
||||
# Source: https://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1
|
||||
# Author: Onni Hakala
|
||||
# License: MIT
|
||||
#
|
||||
# Updated by Ismo Vuorinen <https://github.com/ivuorinen> 2022
|
||||
##
|
||||
|
||||
if ! command -v sha256 &> /dev/null; then
|
||||
echo "git could not be found, please install it first"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Stop program and give error message
|
||||
# $1 - error message (string)
|
||||
function error
|
||||
{
|
||||
echo "(!) ERROR: $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# return sha256sum for file
|
||||
# $1 - filename (string)
|
||||
function get_sha256sum
|
||||
{
|
||||
sha256sum "$1" | head -c 64
|
||||
}
|
||||
|
||||
# Good variable names pls
|
||||
filename=$1
|
||||
file_hash=$2
|
||||
|
||||
# Check input
|
||||
if [ -z "$filename" ]; then
|
||||
error "You need to provide filename in first parameter"
|
||||
fi
|
||||
|
||||
if [ -z "$file_hash" ]; then
|
||||
error "You need to provide sha256sum in second parameter"
|
||||
fi
|
||||
|
||||
# Check if the file is valid
|
||||
if [ ! -f "$filename" ]; then
|
||||
error "File $filename doesn't exist"
|
||||
elif [ "$(get_sha256sum "$filename")" = "$file_hash" ]; then
|
||||
echo "(*) Success: $filename matches provided sha256sum"
|
||||
else
|
||||
error "$filename doesn't match provided sha256sum"
|
||||
fi
|
||||
32
local/bin/x-when-down
Executable file
32
local/bin/x-when-down
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Wait until a given host is down (determined by ping) then execute the
|
||||
# given command
|
||||
#
|
||||
# Usage:
|
||||
# ./when-down HOST COMMAND...
|
||||
#
|
||||
# Example
|
||||
# ./when-down 1.2.3.4 ssh 1.2.3.4
|
||||
#
|
||||
|
||||
#
|
||||
# Ensure we received the correct number of arguments.
|
||||
#
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage: $0 HOST COMMAND..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HOST=$1
|
||||
|
||||
echo "Waiting for $HOST to get down..."
|
||||
|
||||
true
|
||||
while [ $? -ne 1 ]; do
|
||||
ping -c 1 -W 1 "$HOST" > /dev/null
|
||||
done
|
||||
|
||||
shift
|
||||
|
||||
"$@"
|
||||
45
local/bin/x-when-up
Executable file
45
local/bin/x-when-up
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Wait until a given host is online (determined by ping) then execute the
|
||||
# given command
|
||||
#
|
||||
# Usage:
|
||||
# ./when-up HOST COMMAND...
|
||||
#
|
||||
# Example
|
||||
# ./when-up 1.2.3.4 ssh 1.2.3.4
|
||||
#
|
||||
# Special case:
|
||||
# when using when-up to ssh to a host, this host does not need to be given twice
|
||||
# ./when-up ssh 1.2.3.4
|
||||
#
|
||||
|
||||
#
|
||||
# Ensure we received the correct number of arguments.
|
||||
#
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage: $0 HOST COMMAND..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "ssh" ]; then
|
||||
HOST=$2
|
||||
else
|
||||
HOST=$1
|
||||
fi
|
||||
|
||||
echo "Waiting for $HOST to come online..."
|
||||
|
||||
ping -c 1 -W 1 "$HOST" > /dev/null
|
||||
while [ $? -ne 0 ]; do
|
||||
sleep 1
|
||||
ping -c 1 -W 1 "$HOST" > /dev/null
|
||||
done
|
||||
|
||||
# By the time we reach here the ping-command has completed successfully
|
||||
# so we can launch the command we were given - along with any arguments.
|
||||
if [ "$1" != "ssh" ]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
"$@"
|
||||
6
renovate.json
Normal file
6
renovate.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"local>ivuorinen/.github:renovate-config"
|
||||
]
|
||||
}
|
||||
38
scripts/install-npm-packages.sh
Executable file
38
scripts/install-npm-packages.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install npm packages globally.
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
||||
|
||||
if ! command -v npm &> /dev/null; then
|
||||
msg_err "npm could not be found."
|
||||
else
|
||||
packages=(
|
||||
# This is a tool to check if your files consider your .editorconfig rules.
|
||||
"editorconfig-checker"
|
||||
# Node module to create a release or a changelog from
|
||||
# a tag and uses issues or commits to creating the release notes.
|
||||
"github-release-notes"
|
||||
"neovim"
|
||||
"prettier"
|
||||
"@bchatard/alfred-jetbrains"
|
||||
"@johnnymorganz/stylua-bin"
|
||||
"js-debug"
|
||||
"stylelint-lsp"
|
||||
"blade-formatter"
|
||||
"@loopback/cli"
|
||||
"corepack"
|
||||
"standardjs"
|
||||
)
|
||||
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
|
||||
msg_run "Installing npm package:" "$pkg"
|
||||
npm install -g --no-fund --no-progress --no-timing "$pkg"
|
||||
echo ""
|
||||
done
|
||||
fi
|
||||
38
scripts/install-xcode-cli-tools.sh
Executable file
38
scripts/install-xcode-cli-tools.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Install XCode CLI Tools with osascript magic.
|
||||
# Ismo Vuorinen <https://github.com/ivuorinen> 2018
|
||||
#
|
||||
|
||||
# Ask for the administrator password upfront
|
||||
sudo -v
|
||||
|
||||
# Keep-alive: update existing `sudo` time stamp until `settler` has finished
|
||||
while true; do
|
||||
sudo -n true
|
||||
sleep 60
|
||||
kill -0 "$$" || exit
|
||||
done 2> /dev/null &
|
||||
|
||||
# https://unix.stackexchange.com/a/408305
|
||||
# check if user has git installed and propose to install if not installed
|
||||
if [ "$(which git)" ]; then
|
||||
echo "You already have git. Continuing..."
|
||||
else
|
||||
XCODE_MESSAGE="$(
|
||||
osascript -e \
|
||||
'tell app "System Events" to display dialog "Please click install when Command Line Developer Tools appears"'
|
||||
)"
|
||||
|
||||
if [ "$XCODE_MESSAGE" = "button returned:OK" ]; then
|
||||
xcode-select --install
|
||||
else
|
||||
echo "You have cancelled the installation, please rerun the installer."
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
until [ "$(which git)" ]; do
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
301
scripts/set-macos-defaults.sh
Executable file
301
scripts/set-macos-defaults.sh
Executable file
@@ -0,0 +1,301 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# set-macos-defaults.sh - Sets macOS Defaults that I like
|
||||
#
|
||||
# This script contains large portions from following scripts:
|
||||
# - https://github.com/freekmurze/dotfiles/blob/main/macos/set-defaults.sh
|
||||
#
|
||||
|
||||
[ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0
|
||||
|
||||
# Ask for the administrator password upfront
|
||||
sudo -v
|
||||
|
||||
# Keep-alive: update existing `sudo` time stamp
|
||||
# until this script has finished
|
||||
while true; do
|
||||
sudo -n true
|
||||
sleep 60
|
||||
kill -0 "$$" || exit
|
||||
done 2> /dev/null &
|
||||
|
||||
###############################################################################
|
||||
# General UI/UX #
|
||||
###############################################################################
|
||||
|
||||
# Disable the sound effects on boot
|
||||
sudo nvram SystemAudioVolume=" "
|
||||
|
||||
# Menu bar: disable transparency
|
||||
#defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
|
||||
|
||||
# Set sidebar icon size to small
|
||||
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 1
|
||||
|
||||
# Increase window resize speed for Cocoa applications
|
||||
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
|
||||
|
||||
# Expand save panel by default
|
||||
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
|
||||
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
|
||||
|
||||
# Expand print panel by default
|
||||
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
|
||||
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
|
||||
|
||||
# Save to disk (not to iCloud) by default
|
||||
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
|
||||
|
||||
# Automatically quit printer app once the print jobs complete
|
||||
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
|
||||
|
||||
# Disable the “Are you sure you want to open this application?” dialog
|
||||
defaults write com.apple.LaunchServices LSQuarantine -bool false
|
||||
|
||||
# Disable Resume system-wide
|
||||
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
|
||||
|
||||
# Disable automatic termination of inactive apps
|
||||
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
|
||||
|
||||
# Disable the crash reporter
|
||||
#defaults write com.apple.CrashReporter DialogType -string "none"
|
||||
|
||||
# Reveal IP address, hostname, OS version, etc. when clicking the clock
|
||||
# in the login window
|
||||
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
|
||||
|
||||
# Disable smart quotes as they’re annoying when typing code
|
||||
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
|
||||
|
||||
# Disable smart dashes as they’re annoying when typing code
|
||||
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
|
||||
|
||||
###############################################################################
|
||||
# SSD-specific tweaks #
|
||||
###############################################################################
|
||||
|
||||
# Disable hibernation (speeds up entering sleep mode)
|
||||
sudo pmset -a hibernatemode 0
|
||||
|
||||
# Disable the sudden motion sensor as it’s not useful for SSDs
|
||||
sudo pmset -a sms 0
|
||||
|
||||
###############################################################################
|
||||
# Trackpad, mouse, keyboard, Bluetooth accessories, and input #
|
||||
###############################################################################
|
||||
|
||||
# Increase sound quality for Bluetooth headphones/headsets
|
||||
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
|
||||
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
|
||||
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
|
||||
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
|
||||
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
|
||||
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80
|
||||
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80
|
||||
|
||||
# Enable full keyboard access for all controls
|
||||
# (e.g. enable Tab in modal dialogs)
|
||||
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
|
||||
|
||||
# Set language and text formats
|
||||
# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
|
||||
# `Inches`, `en_GB` with `en_US`, and `true` with `false`.
|
||||
defaults write NSGlobalDomain AppleLanguages -array "en"
|
||||
defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
|
||||
defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
|
||||
defaults write NSGlobalDomain AppleMetricUnits -bool true
|
||||
|
||||
# Set the timezone; see `systemsetup -listtimezones` for other values
|
||||
systemsetup -settimezone "Europe/Helsinki" > /dev/null
|
||||
|
||||
# Disable auto-correct
|
||||
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
|
||||
|
||||
# Stop iTunes from responding to the keyboard media keys
|
||||
#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null
|
||||
|
||||
###############################################################################
|
||||
# Screen #
|
||||
###############################################################################
|
||||
|
||||
# Require password immediately after sleep or screen saver begins
|
||||
defaults write com.apple.screensaver askForPassword -int 1
|
||||
defaults write com.apple.screensaver askForPasswordDelay -int 0
|
||||
|
||||
###############################################################################
|
||||
# Finder #
|
||||
###############################################################################
|
||||
|
||||
# Set Desktop as the default location for new Finder windows
|
||||
# For other paths, use `PfLo` and `file:///full/path/here/`
|
||||
defaults write com.apple.finder NewWindowTarget -string "PfDe"
|
||||
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/"
|
||||
|
||||
# Show icons for external hard drives, servers, and removable media on the desktop
|
||||
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
|
||||
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
|
||||
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
|
||||
|
||||
# Finder: show all filename extensions
|
||||
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
|
||||
|
||||
# Finder: allow text selection in Quick Look
|
||||
defaults write com.apple.finder QLEnableTextSelection -bool true
|
||||
|
||||
# Display full POSIX path as Finder window title
|
||||
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
|
||||
|
||||
# When performing a search, search the current folder by default
|
||||
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
|
||||
|
||||
# Disable the warning when changing a file extension
|
||||
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
|
||||
|
||||
# Avoid creating .DS_Store files on network volumes
|
||||
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
|
||||
|
||||
# Disable disk image verification
|
||||
defaults write com.apple.frameworks.diskimages skip-verify -bool true
|
||||
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
|
||||
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
|
||||
|
||||
# Use list view in all Finder windows by default
|
||||
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
|
||||
defaults write com.apple.finder FXPreferredViewStyle -string "icnv"
|
||||
|
||||
# Disable the warning before emptying the Trash
|
||||
defaults write com.apple.finder WarnOnEmptyTrash -bool false
|
||||
|
||||
# Show the ~/Library folder
|
||||
# chflags nohidden ~/Library
|
||||
|
||||
# Show the ~/Users folder
|
||||
# chflags nohidden /Users
|
||||
|
||||
# Expand the following File Info panes:
|
||||
# “General”, “Open with”, and “Sharing & Permissions”
|
||||
defaults write com.apple.finder FXInfoPanesExpanded -dict \
|
||||
General -bool true \
|
||||
OpenWith -bool true \
|
||||
Privileges -bool true
|
||||
|
||||
###############################################################################
|
||||
# Screenshots #
|
||||
###############################################################################
|
||||
|
||||
# Set default screenshot location
|
||||
#defaults write com.apple.screencapture "location" -string "~/Documents/Screenshots"
|
||||
|
||||
# Exclude date and time in screenshot filenames
|
||||
defaults write com.apple.screencapture "include-date" -bool true
|
||||
|
||||
# Change the default screenshot file name
|
||||
defaults write com.apple.screencapture "name" -string "screenshot"
|
||||
|
||||
###############################################################################
|
||||
# Dock, Dashboard, and hot corners #
|
||||
###############################################################################
|
||||
|
||||
# Prevent applications from bouncing in Dock
|
||||
defaults write com.apple.dock no-bouncing -bool true
|
||||
|
||||
# Set the icon size of Dock items to 30 pixels
|
||||
defaults write com.apple.dock tilesize -int 30
|
||||
|
||||
# Hide indicator lights for open applications in the Dock
|
||||
defaults write com.apple.dock show-process-indicators -bool true
|
||||
|
||||
# Wipe all (default) app icons from the Dock
|
||||
# This is only really useful when setting up a new Mac, or if you don’t use
|
||||
# the Dock to launch apps.
|
||||
# defaults write com.apple.dock persistent-apps -array ""
|
||||
|
||||
# Disable Dashboard
|
||||
defaults write com.apple.dashboard mcx-disabled -bool true
|
||||
|
||||
# Don’t show Dashboard as a Space
|
||||
defaults write com.apple.dock dashboard-in-overlay -bool true
|
||||
|
||||
# Don’t automatically rearrange Spaces based on most recent use
|
||||
defaults write com.apple.dock mru-spaces -bool false
|
||||
|
||||
# Make Dock icons of hidden applications translucent
|
||||
defaults write com.apple.dock showhidden -bool true
|
||||
|
||||
###############################################################################
|
||||
# Safari & WebKit #
|
||||
###############################################################################
|
||||
|
||||
# Enable Safari’s debug menu
|
||||
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
|
||||
|
||||
# Enable the Develop menu and the Web Inspector in Safari
|
||||
defaults write com.apple.Safari IncludeDevelopMenu -bool true
|
||||
defaults write com.apple.Safari \
|
||||
WebKitDeveloperExtrasEnabledPreferenceKey -bool true
|
||||
defaults write com.apple.Safari \
|
||||
com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled \
|
||||
-bool true
|
||||
|
||||
# Don’t display the annoying prompt when quitting iTerm
|
||||
#defaults write com.googlecode.iterm2 PromptOnQuit -bool false
|
||||
|
||||
# Prevent Time Machine from prompting to use new hard drives as backup volume
|
||||
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
|
||||
|
||||
###############################################################################
|
||||
# Activity Monitor #
|
||||
###############################################################################
|
||||
|
||||
# Show the main window when launching Activity Monitor
|
||||
defaults write com.apple.ActivityMonitor OpenMainWindow -bool true
|
||||
|
||||
# Visualize CPU usage in the Activity Monitor Dock icon
|
||||
defaults write com.apple.ActivityMonitor IconType -int 5
|
||||
|
||||
# Show all processes in Activity Monitor
|
||||
defaults write com.apple.ActivityMonitor ShowCategory -int 0
|
||||
|
||||
# Sort Activity Monitor results by CPU usage
|
||||
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
|
||||
defaults write com.apple.ActivityMonitor SortDirection -int 0
|
||||
|
||||
###############################################################################
|
||||
# Address Book, Dashboard, iCal, TextEdit, and Disk Utility #
|
||||
###############################################################################
|
||||
|
||||
# Use plain text mode for new TextEdit documents
|
||||
defaults write com.apple.TextEdit RichText -int 0
|
||||
|
||||
# Open and save files as UTF-8 in TextEdit
|
||||
defaults write com.apple.TextEdit PlainTextEncoding -int 4
|
||||
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
|
||||
|
||||
###############################################################################
|
||||
# Messages #
|
||||
###############################################################################
|
||||
|
||||
# Disable smart quotes as it’s annoying for messages that contain code
|
||||
defaults write com.apple.messageshelper.MessageController \
|
||||
SOInputLineSettings \
|
||||
-dict-add "automaticQuoteSubstitutionEnabled" \
|
||||
-bool false
|
||||
|
||||
# Disable continuous spell checking
|
||||
defaults write com.apple.messageshelper.MessageController \
|
||||
SOInputLineSettings \
|
||||
-dict-add "continuousSpellCheckingEnabled" \
|
||||
-bool false
|
||||
|
||||
###############################################################################
|
||||
# Kill affected applications #
|
||||
###############################################################################
|
||||
|
||||
for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \
|
||||
"Dock" "Finder" "Mail" "Messages" "Safari" "SizeUp" "SystemUIServer" \
|
||||
"Terminal" "Transmission" "Twitter" "iCal"; do
|
||||
killall "${app}" > /dev/null 2>&1
|
||||
done
|
||||
echo "Done. Note that some of these changes require a logout/restart to take effect."
|
||||
113
scripts/shared.sh
Executable file
113
scripts/shared.sh
Executable file
@@ -0,0 +1,113 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Shared bash functions and helpers
|
||||
# that can be sourced to other scripts.
|
||||
#
|
||||
|
||||
# -- Colors -- #
|
||||
CLR_RED="\033[1;31m"
|
||||
CLR_YELLOW="\033[1;33m"
|
||||
CLR_GREEN="\033[1;32m"
|
||||
CLR_BLUE="\033[1;34m"
|
||||
CLR_RESET="\033[0m"
|
||||
|
||||
# -- Helpers -- #
|
||||
function __log_marker()
|
||||
{
|
||||
echo -e "${CLR_BLUE}➜${CLR_RESET}"
|
||||
}
|
||||
|
||||
function __log_marker_ok()
|
||||
{
|
||||
echo -e "${CLR_GREEN}✔${CLR_RESET}"
|
||||
}
|
||||
|
||||
function __log_marker_ok_blue()
|
||||
{
|
||||
echo -e "${CLR_BLUE}✔${CLR_RESET}"
|
||||
}
|
||||
|
||||
function __log_marker_warn()
|
||||
{
|
||||
echo -e "${CLR_YELLOW}⁕${CLR_RESET}"
|
||||
}
|
||||
|
||||
function __log_marker_err()
|
||||
{
|
||||
echo -e "${CLR_RED}⛌${CLR_RESET}"
|
||||
}
|
||||
|
||||
function __log_indent()
|
||||
{
|
||||
echo " "
|
||||
}
|
||||
|
||||
# -- Log -- #
|
||||
function msg()
|
||||
{
|
||||
echo -e "$(__log_marker) $1"
|
||||
}
|
||||
|
||||
function msg_done()
|
||||
{
|
||||
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||
}
|
||||
|
||||
function msg_prompt()
|
||||
{
|
||||
echo -e "$(__log_marker) $1"
|
||||
}
|
||||
|
||||
function msg_prompt_done()
|
||||
{
|
||||
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||
}
|
||||
|
||||
function msg_nested()
|
||||
{
|
||||
echo -e "$(__log_indent)$(__log_marker) $1"
|
||||
}
|
||||
|
||||
function msg_nested_done()
|
||||
{
|
||||
echo -e "$(__log_indent)$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||
}
|
||||
|
||||
function msg_run()
|
||||
{
|
||||
echo -e "${CLR_GREEN}➜ $1${CLR_RESET} $2"
|
||||
}
|
||||
|
||||
function msg_ok()
|
||||
{
|
||||
echo -e "$(__log_marker_ok) $1"
|
||||
}
|
||||
|
||||
function msg_warn()
|
||||
{
|
||||
echo -e "$(__log_marker_warn) $1"
|
||||
}
|
||||
|
||||
function msg_err()
|
||||
{
|
||||
echo -e "$(__log_marker_err) $1"
|
||||
}
|
||||
|
||||
# -- Menu builder -- #
|
||||
function menu_section()
|
||||
{
|
||||
LINE=$(printf '%-18s [ %-15s ]\n' "$1" "$2")
|
||||
echo -e " $(__log_marker) $LINE"
|
||||
}
|
||||
function menu_item()
|
||||
{
|
||||
LINE=$(printf '%-15s %-30s\n' "$1" "$2")
|
||||
echo -e "$(__log_indent)$(__log_marker) $LINE"
|
||||
}
|
||||
|
||||
# https://stackoverflow.com/a/85932
|
||||
function fn_exists()
|
||||
{
|
||||
declare -f -F "$1" > /dev/null
|
||||
return $?
|
||||
}
|
||||
0
ssh/allowed_signers
Normal file
0
ssh/allowed_signers
Normal file
11
ssh/config
Normal file
11
ssh/config
Normal file
@@ -0,0 +1,11 @@
|
||||
Host github.com
|
||||
User git
|
||||
|
||||
Host lakka
|
||||
User viir
|
||||
HostName lakka.kapsi.fi
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
|
||||
Host *
|
||||
# IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
|
||||
73
zshrc
73
zshrc
@@ -1,73 +0,0 @@
|
||||
# Fig pre block. Keep at the top of this file.
|
||||
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
|
||||
# shellcheck shell=bash
|
||||
|
||||
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
|
||||
|
||||
LOCAL_BIN="$HOME/.local/bin"
|
||||
OPT_FOLDER="/usr/local/opt"
|
||||
PHP_74=$(brew --prefix php@7.4)/bin
|
||||
PHP_80=$(brew --prefix php@8.0)/bin
|
||||
PHP_CUR=$(brew --prefix php)/bin
|
||||
PYTHON_38="$HOME/Library/Python/3.8/bin"
|
||||
COMPOSER_DIR="$HOME/.composer/vendor/bin"
|
||||
BREW_PYTHON=$(brew --prefix python@3.8)/bin
|
||||
GNUBIN_DIR=$(brew --prefix coreutils)/libexec/gnubin
|
||||
BREW_RUBY=$(brew --prefix ruby)/bin
|
||||
USR_SBIN=/usr/local/sbin
|
||||
|
||||
export PATH="$LOCAL_BIN:$PYTHON_38:$COMPOSER_DIR:$BREW_PYTHON:$GNUBIN_DIR:$BREW_RUBY:$USR_SBIN:$PATH"
|
||||
source "$HOME/.config/antigen.zsh"
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
export NVM_LAZY_LOAD=true
|
||||
export NVM_COMPLETION=true
|
||||
export NVM_AUTO_USE=true
|
||||
|
||||
antigen use oh-my-zsh
|
||||
|
||||
antigen bundle php
|
||||
antigen bundle nvm
|
||||
# antigen bundle ruby
|
||||
antigen bundle docker
|
||||
antigen bundle ssh-agent
|
||||
# antigen bundle git-auto-fetch
|
||||
|
||||
antigen bundle colored-man-pages
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
|
||||
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||
antigen bundle reegnz/jq-zsh-plugin
|
||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||
antigen bundle sroze/docker-compose-zsh-plugin
|
||||
# antigen bundle voronkovich/phpcs.plugin.zsh
|
||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||
|
||||
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
||||
|
||||
# Platform dependant bundles
|
||||
if [[ $(uname) == 'Linux' ]]
|
||||
then
|
||||
antigen bundle command-not-found
|
||||
elif [[ $(uname) == 'Darwin' ]]
|
||||
then
|
||||
# Only enable brew plugin if brew exists
|
||||
hash brew 2>/dev/null && antigen bundle brew
|
||||
fi
|
||||
|
||||
antigen apply
|
||||
|
||||
export HIST_STAMPS="yyyy-mm-dd"
|
||||
|
||||
source "$HOME/.alias"
|
||||
|
||||
GCLOUD_INSTALL_LOCATION=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
||||
|
||||
source "$GCLOUD_INSTALL_LOCATION/path.zsh.inc"
|
||||
source "$GCLOUD_INSTALL_LOCATION/completion.zsh.inc"
|
||||
source "$(brew --prefix z)/etc/profile.d/z.sh"
|
||||
|
||||
# Fig post block. Keep at the bottom of this file.
|
||||
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
|
||||
Reference in New Issue
Block a user