Compare commits

...

109 Commits

Author SHA1 Message Date
c3aa6b77e5 Chore: Fixes, repo dotfiles 2023-04-30 14:56:30 +03:00
66739fa765 Fix: Make sure personal cheatsheet folder exists 2023-04-28 14:53:43 +03:00
ff01a27b3c Chore: Deleted install-without-plugins 2023-04-28 14:50:57 +03:00
383855f23a Feat: fzf, configs and installer 2023-04-27 22:58:34 +03:00
a5db6a465e Chore: Catppuccin config, alpha-nvim header 2023-04-27 22:53:22 +03:00
293b847f79 Fix: Formatting, chmod +x magick 2023-04-27 16:39:06 +03:00
df14c71c17 Feat: Install neofetch 2023-04-27 16:38:26 +03:00
29d46c5790 Feat: nvim neo-tree configuration 2023-04-27 15:29:27 +03:00
d6565761ab Chore: Codestyle changes, split lines that went over limit 2023-04-27 15:27:17 +03:00
0feb7a47ae Chore: Document go packages, add glow 2023-04-27 15:09:34 +03:00
161d0b8875 Chore: Package maintenance 2023-04-27 11:57:27 +03:00
d7f7240348 Fix: tmux colors 2023-04-27 11:56:25 +03:00
7de714161c Feat: Update iTerm2 config, add itermcolors 2023-04-27 11:56:11 +03:00
263fca5839 Feat: Configuration updates 2023-04-27 01:12:31 +03:00
02577547ce Feat: Removed js-debug, added tldr 2023-04-26 23:55:49 +03:00
7f11a7073e Fix: Removed dotbot-gh-extension 2023-04-26 23:54:48 +03:00
af38f7aa45 Chore: cheat color scheme is now catppuccin-mocha 2023-04-26 23:47:50 +03:00
74df61ed1d Feat: tmux config + plugin manager 2023-04-26 23:45:28 +03:00
6126827503 Feat: Moved astronvim user config from submodule 2023-04-26 23:44:19 +03:00
fb48a86b27 Chore: Move renovate config under .github 2023-04-24 23:10:39 +03:00
f84d70ea61 Chore: Update nvim user config 2023-04-24 22:27:01 +03:00
14f02a2b93 Config: Disable snyk ad 2023-04-24 22:17:49 +03:00
9f60efee33 Chore: Update nvim 2023-04-24 22:16:59 +03:00
a834a9138a CI: Shellcheck ignore 1091 2023-04-24 16:58:57 +03:00
3a9ca6edab Chore: Update Brewfile 2023-04-24 16:24:20 +03:00
d8292ca033 fmt + brewfile update 2023-04-22 14:57:27 +03:00
e929b85669 brew: fzf 2023-04-22 14:56:34 +03:00
775d2abf13 tools: cheat configs & dirs 2023-04-22 11:17:36 +03:00
740ad17207 Tool: cheat, yamllint configs 2023-04-21 01:45:43 +03:00
c9d0284c91 dfm: Install command improvements 2023-04-18 07:44:01 +03:00
ac8b7beb9b scripts: x-hr & x-welxome-banner 2023-04-17 23:16:33 +03:00
2fa6c69e4a Submodule updates 2023-04-17 09:05:33 +03:00
c1287c4ea8 dfm: menu rework, docs. codestyle fixes. 2023-04-14 10:10:32 +03:00
7b63afd4f5 dfm: Fix imagick installation 2023-04-14 00:48:37 +03:00
e5d6cb37fd shell: have, path_(append|prepend|remove)
- have: command -v shorthand
- path_append: appends dir to PATH
- path_prepend: prepends dir to PATH
- path_remove: removes dir from PATH
2023-04-14 00:42:08 +03:00
4492c386b6 dfm: rewrote the usage menu generation 2023-04-14 00:01:58 +03:00
5f5f79d270 misc: dfm tweaks, documentation, code style 2023-04-13 22:23:22 +03:00
dcd042262f dotbot: removed gh-extension, use old script 2023-04-13 22:21:49 +03:00
268fd35bdb scripts: formatting, x-thumbgen, imagick installer 2023-04-13 16:31:39 +03:00
38a6f6f8e4 nvim: update to v3.10.2 2023-04-13 16:19:41 +03:00
d504fc5f2b misc: .screenrc, config, functions & new scripts! 2023-04-13 08:41:14 +03:00
4b1feb16fc zsh: PATH and shellcheck stuff 2023-04-12 10:07:51 +03:00
9331b2b643 formatters, go packages and examples 2023-04-08 10:02:44 +03:00
5ce9906ff1 shell: split exports, reorg them. add x-dc script 2023-04-08 03:38:09 +03:00
dbadcc3b6c zsh: enable colors in listings, enable gcloud 2023-04-04 14:15:59 +03:00
Ismo Vuorinen
4f2fd3cfd6 Merge 2023-04-03 11:15:08 +03:00
9621c67866 Brew: bundle update 2023-04-02 23:37:24 +03:00
5e59893281 DRY, codestyle, z installation, misc 2023-04-02 23:21:49 +03:00
ea292de853 Ignore dirty submodule 2023-04-02 04:37:43 +03:00
d2cedd0fee Host specific files should now work 2023-04-02 04:17:15 +03:00
995cc569e7 Moved exports to config/exports, fixed codestyles 2023-04-02 03:56:51 +03:00
cceeba3f8e Add docker config, fix glob paths 2023-04-01 22:32:27 +03:00
dd3640586e Dropped dotbot-ifplatform and dotbot-golang 2023-04-01 22:26:03 +03:00
Ismo Vuorinen
11969bf791 Fixes, configs and scripts 2023-03-30 16:32:30 +03:00
Ismo Vuorinen
bb3f4a8f6c Many updates and improvements
- yamllint
- shfmt config
- fix Go bin path
- fix git credentials config
- add nvm default packages
- updated Brewfile
2023-03-28 15:27:44 +03:00
Ismo Vuorinen
6395895beb nvim: Update 2023-03-27 10:01:02 +03:00
Ismo Vuorinen
fa3dc531a0 Tweaks & EOL's added 2023-03-27 10:01:02 +03:00
bb7ba3c919 Currect GOPATH, added the right git-profile package 2023-03-26 23:43:29 +00:00
53d91f8248 dotbot: Removed some gh plugins 2023-03-27 02:31:43 +03:00
745fc9b737 Moved dotbot plugins to root 2023-03-19 03:32:03 +02:00
dbe5ea3ce0 tweaks, antigen.zsh server version 2023-03-19 02:59:04 +02:00
761671e7f7 dfm: install nvm 2023-03-19 02:57:52 +02:00
f4df8623b0 bin: old scripts 2023-03-19 02:56:54 +02:00
03aacb0639 dotbot: fix glob error in python < v3.5 2023-03-19 02:10:04 +02:00
04c85245cc dfm: starship install dir fix 2023-03-19 01:37:17 +02:00
2ccb74422c configuration fixes 2023-03-19 01:28:28 +02:00
3c87ed4d2b dotbot: config, ifplatform, formatting 2023-03-19 01:14:14 +02:00
4e4ff92ae5 dotbot: config, ifplatform, formatting 2023-03-19 00:52:43 +02:00
ef9bf3864b meta: add dotbot-ifplatform, update astronvim cfg 2023-03-19 00:46:49 +02:00
cfb9aa696e gh: switched gh from ssh to https 2023-03-18 01:51:20 +02:00
1c75e7a53f nvim: updates 2023-03-18 01:10:36 +02:00
6e8875e734 git: brew path to gh 2023-03-17 19:51:09 +02:00
70a9237166 Switched git submodules to https 2023-03-17 19:43:32 +02:00
59b08f8d1f README fixes and ssh/config cleanup 2023-03-17 14:08:59 +02:00
c9bc6e597a host-* to hosts/*, dfm rework, renaming and stuff 2023-03-17 13:37:58 +02:00
5cd720cc4d Moved $HOME root dotfiles to base folder 2023-03-17 10:54:58 +02:00
e618f64cf5 Tweak configurations 2023-03-17 10:34:31 +02:00
fed9769640 dotbot config, submodules and cleanup 2023-03-17 08:52:24 +02:00
renovate[bot]
95e213d407 chore(deps): update actions/checkout action to v3 (#3)
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 00:24:23 +02:00
renovate[bot]
29a289bc7b chore(deps): add renovate.json (#2)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 00:21:08 +02:00
9f133469e0 linux: fixes to everything when using linux 2023-03-10 15:07:44 +02:00
ba90a2e6eb nvim: update user config 2023-03-09 08:17:02 +02:00
Ismo Vuorinen
af32dd6bf3 Formatting, updated user config, tweaks 2023-03-08 09:24:36 +02:00
Ismo Vuorinen
e519d98a68 zshrc: op and ansible config locations 2023-03-07 10:49:19 +02:00
cde571de69 zsh: iterm2 shell integration 2023-03-05 18:53:48 +02:00
b563ba5cd0 starship: git branch truncation 2023-03-04 22:10:36 +02:00
f357d23559 zsh: export GEM_PATH and WAKATIME_HOME 2023-03-03 16:10:50 +02:00
Ismo Vuorinen
b183fcbdb2 nvim: update astronvim 2023-02-27 10:20:58 +02:00
17ce1c6ee6 zshrc: More configurations! 2023-02-27 03:34:33 +02:00
66de4b3323 zsh: Update main and lakka zshrc 2023-02-27 02:04:41 +02:00
b55c1a17ba dfm: Reset nvim command fixes 2023-02-27 01:35:54 +02:00
Ismo Vuorinen
3d708861cf feat(dotfiles): Added lakka host configs 2023-02-22 22:36:46 +02:00
9dc647c4af dfm: New section "reset" 2023-02-22 20:53:12 +02:00
Ismo Vuorinen
3bd73bbbfb git: Updated astronvim config 2023-02-22 09:44:21 +02:00
Ismo Vuorinen
0a7d331a57 scripts: update install-npm-packages.sh 2023-02-22 09:42:16 +02:00
Ismo Vuorinen
40b399a467 nvim: astronvim v3 2023-02-21 12:34:11 +02:00
Ismo Vuorinen
65dab98c3e git: Update git/config 2023-02-21 10:20:32 +02:00
Ismo Vuorinen
64f1d7354e git: Update user config 2023-02-16 17:13:19 +02:00
Ismo Vuorinen
0d93f2dbb2 Configs, npm packages, updated astronvim user conf 2023-02-16 16:21:19 +02:00
Ismo Vuorinen
9dc1ed8b38 rcm: New links, .shellcheckrc 2023-02-16 08:29:29 +02:00
Ismo Vuorinen
75b99dd117 dfm: Added install-npm-packages.sh 2023-02-16 08:28:53 +02:00
Ismo Vuorinen
305355beaf scripts: chmods & npm package helper 2023-02-14 13:01:48 +02:00
33a7de2dfc nvim: astronvim user config 2023-02-13 21:54:52 +02:00
f5f4f47655 git submodule fix, dropped default mac apps 2023-02-13 20:53:26 +02:00
Ismo Vuorinen
4d8d70d390 nvim: Switched to Astronvim, added as submodule 2023-02-13 17:12:45 +02:00
Ismo Vuorinen
cacc98a7d3 zsh: updated starship config 2023-02-13 10:32:43 +02:00
Ismo Vuorinen
9c05733b5d zsh: Starship config, removed rb and py bundles 2023-02-07 09:35:18 +02:00
d4e02bbb89 zsh: Added brew sbin to path 2023-02-06 23:20:41 +02:00
32dbec6476 nvim: Plugins cleanup 2023-02-06 22:32:27 +02:00
132 changed files with 7350 additions and 1755 deletions

19
.ecrc Normal file
View File

@@ -0,0 +1,19 @@
{
"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
}
}

View File

@@ -8,5 +8,6 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[local/bin/antigen.zsh]
ignore = true
[.git{ignore,modules}]
indent_style = tab
indent_size = 1

6
.github/renovate.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>ivuorinen/.github:renovate-config"
]
}

View File

@@ -1,30 +1,26 @@
name: reviewdog
on: [ push ]
on: [push]
jobs:
linters:
name: Linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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:

6
.gitignore vendored
View File

@@ -1 +1,7 @@
Brewfile.lock.json
*.log
*-secret
*cache
.idea
.vscode
config/fzf

31
.gitmodules vendored Normal file
View File

@@ -0,0 +1,31 @@
# vim: set expandtab:
[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-include"]
path = dotbot-include
url = https://gitlab.com/gnfzdz/dotbot-include.git
ignore = dirty
[submodule "config/nvim"]
path = config/nvim
url = https://github.com/AstroNvim/AstroNvim.git
ignore = dirty
branch = main
update = checkout
[submodule "cheat-community"]
path = config/cheat/cheatsheets/community
url = https://github.com/cheat/cheatsheets.git
ignore = dirty
[submodule "tmux/tpm"]
path = config/tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm.git

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3

7
.shellcheckrc Normal file
View 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

7
.stylua.toml Normal file
View File

@@ -0,0 +1,7 @@
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
call_parentheses = "None"
collapse_simple_statement = "Always"

24
.yamlfmt Normal file
View File

@@ -0,0 +1,24 @@
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/**

2
.yamlignore Normal file
View File

@@ -0,0 +1,2 @@
# .yamlignore

105
Brewfile
View File

@@ -10,60 +10,79 @@ tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/core"
tap "homebrew/services"
tap "jesseduffield/lazygit"
tap "mongodb/brew"
tap "shivammathur/extensions"
tap "shivammathur/php"
tap "teamookla/speedtest"
# Interpreted, interactive, object-oriented programming language
brew "python@3.11"
# Automate deployment, configuration, and upgrading
brew "ansible"
# 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"
# Open Source Kubernetes Marketplace
brew "arkade"
# Automatic configure script builder
brew "autoconf"
# GNU File, Shell, and Text utilities
brew "coreutils"
# Extendable version manager with support for Ruby, Node.js, Erlang & more
brew "asdf"
# Spell checker with better logic than ispell
brew "aspell"
# Official Amazon AWS command-line interface
brew "awscli"
# Terminal bandwidth utilization tool
brew "bandwhich"
# Clone of cat(1) with syntax highlighting and Git integration
brew "bat"
# 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"
# Human-friendly and fast alternative to cut and (sometimes) awk
brew "choose-rust"
# Cross-platform make
brew "cmake"
# 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"
# Libraries to talk to Microsoft SQL Server and Sybase databases
brew "freetds"
# C/C++ and Java libraries for Unicode and globalization
brew "icu4c"
# Postgres C API library
brew "libpq"
# General-purpose scripting language
brew "php"
# Dependency Manager for PHP
brew "composer"
# GNU File, Shell, and Text utilities
brew "coreutils"
# Get, unpack, build, and install modules from CPAN
brew "cpanminus"
# 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"
# Banner-like program prints strings as ASCII art
brew "figlet"
# Libraries to talk to Microsoft SQL Server and Sybase databases
brew "freetds"
# Monitor a directory for changes and run a shell command
brew "fswatch"
# Command-line fuzzy finder written in Go
brew "fzf"
# Disk usage analyzer with console interface written in Go
brew "gdu", link: false
# GitHub command-line tool
brew "gh"
# Distributed revision control system
@@ -76,6 +95,8 @@ brew "git-flow-avh"
brew "git-recent"
# Open-source GitLab command-line tool
brew "glab"
# Render markdown on the CLI
brew "glow"
# GNU implementation of the famous stream editor
brew "gnu-sed"
# Validating, recursive, caching DNS resolver
@@ -88,6 +109,8 @@ brew "gnupg"
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
@@ -110,8 +133,14 @@ brew "imagemagick"
brew "jq"
# Lazier way to manage everything docker
brew "lazydocker"
# Postgres C API library
brew "libpq"
# Linguistic software and Finnish dictionary
brew "libvoikko"
# Rainbows and unicorns in your console!
brew "lolcat"
# Package manager for the Lua programming language
brew "luarocks"
# Swiss Army Knife for macOS
brew "m-cli"
# Mac App Store command-line interface
@@ -120,8 +149,6 @@ brew "mas"
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
@@ -134,6 +161,16 @@ brew "openapi-generator"
brew "pandoc"
# Highly capable, feature-rich programming language
brew "perl"
# General-purpose scripting language
brew "php@8.1"
# Simple Python style checker in one Python file
brew "pycodestyle"
# 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
@@ -162,6 +199,8 @@ brew "terragrunt"
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
@@ -170,24 +209,32 @@ brew "tldr"
brew "tmux"
# Display directories as trees (with optional color/HTML output)
brew "tree"
# Vulnerability scanner for container images, file systems, and Git repos
brew "trivy"
# 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"
# Check your $HOME for unwanted files and directories
brew "xdg-ninja"
# 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"
# 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
@@ -208,6 +255,8 @@ brew "teamookla/speedtest/speedtest"
cask "1password-cli"
# Text editor
cask "coda"
# Universal database tool and SQL client
cask "dbeaver-community"
# App to build and share containerized applications and microservices
cask "docker"
# Reimagine your terminal
@@ -238,8 +287,14 @@ cask "insomnia"
cask "jetbrains-toolbox"
# Kubernetes IDE
cask "lens"
# Keep all tasks from your todo apps on your menu bar
cask "monofocus"
# Neovim Client
cask "neovide"
# Reverse proxy, secure introspectable tunnels to localhost
cask "ngrok"
# Scheduling application focusing on organization
cask "omnifocus"
# Collaboration platform for API development
cask "postman"
# Display image info and preview unsupported formats in QuickLook
@@ -254,6 +309,8 @@ cask "quicklook-json"
cask "quicklookase"
# Automatically hides or quits apps after periods of inactivity
cask "quitter"
# Control your tools with a few keystrokes
cask "raycast"
# Move and resize windows using keyboard shortcuts or snap areas
cask "rectangle"
# MySQL/MariaDB database management
@@ -276,14 +333,10 @@ cask "vlc"
cask "voikkospellservice"
# Rust-based terminal
cask "warp"
# Mastodon, Pleroma, and Misskey client
cask "whalebird"
# View output from scripts in the menu bar
cask "xbar"
mas "1Password for Safari", id: 1569813296
mas "Flow", id: 1423210932
mas "GarageBand", id: 682658836
mas "iMovie", id: 408981434
mas "Keynote", id: 409183694
mas "Numbers", id: 409203825
mas "Pages", id: 409201541
mas "pullBar", id: 1601913905
mas "Tailscale", id: 1475387142

View File

@@ -1,8 +1,9 @@
# .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.
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.
@@ -12,42 +13,34 @@ fork or download the repo as a zip and go from there with your own configs.
### First time setup
1. Clone this repository to `$HOME/.dotfiles`
2. `bash $HOME/.dotfiles/scripts/settler.sh`
2. `./install`
3. ???
4. Profit
Note: there's a bit chicken/egg situation, because settler assumes you don't have git,
and you need git to clone the repo. This will change soon&trade;.
## Interesting files and locations
### Special folders
### Interesting folders
| Path | Description |
|--------------------|-------------------------------------------------------------------------------------|
| `.github` | GitHub Repository configuration files. Not part of the dotfiles per se. |
| `host-{hostname}/` | Host specific dotfiles. Configurations that should apply to that host only. |
| `local/bin` | Helper scripts that I've collected or wrote to make life easier. |
| `scripts` | Setup scripts. Some can be run many times, some are meant only for the first round. |
| 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 |
|-----------|-------------|------------------------------------------------------------------|
| `config/` | `.config/` | Configurations for applications. |
| `local/` | `.local/` | XDG Base folder, contains `bin`, `share` and `state` for example |
| `ssh/` | `.ssh/` | SSH Configurations. |
| 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.
### `scripts/install-dotfiles.sh` - dotfiles linker
The `scripts/install-dotfiles.sh` is a `rcm` generated shell script that does all the necessary linking.
To refresh the file, you can run `dfm dotfiles update`
## Configuration
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
@@ -55,29 +48,37 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
### XDG Variables
| Var | Default |
|--------------------|----------------------|
| Executables | `$HOME/.local/bin` |
| ------------------ | -------------------- |
| `$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`.
- `$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 ':'.
- 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
@@ -85,12 +86,9 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
### Interesting dotfiles repos
- https://dotfiles.github.io/inspiration/
- https://github.com/frdmn/dotfiles - Ansible-based dotfile setup for macOS
- https://github.com/mvdan/dotfiles - Here be dragons
- https://github.com/vsouza/dotfiles - 🏡 My dotfiles
- https://github.com/freekmurze/dotfiles - My personal dotfiles
### Interesting dotfiles tools
- https://github.com/zero-sh/zero.sh - Radically simple personal bootstrapping tool for macOS.
- [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 Executable file
View 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-include -f https://gitlab.com/gnfzdz/dotbot-include.git dotbot-include
git submodule add --name cheat-community -f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
git submodule add --name tmux/tpm -f https://github.com/tmux-plugins/tpm.git config/tmux/plugins/tpm

6
base/angular-config.json Normal file
View File

@@ -0,0 +1,6 @@
{
"version": 1,
"cli": {
"analytics": false
}
}

23
base/bashrc Normal file
View File

@@ -0,0 +1,23 @@
# this is my bashrc config. there are many like it, but this one is mine.
# shellcheck shell=bash
# Defaults
export DOTFILES="$HOME/.dotfiles"
# 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;
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash

19
base/ecrc Normal file
View File

@@ -0,0 +1,19 @@
{
"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
}
}

View File

@@ -5,4 +5,3 @@ email = ismo.vuorinen@vincit.fi
[home]
name = Ismo Vuorinen
email = ismo@vuorinen.net

View File

@@ -5,3 +5,4 @@ export NVM_DIR="$HOME/.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
View File

@@ -0,0 +1,16 @@
. .
/ `. .' \
.---. < > < > .---.
| \ \ - ~ ~ - / / |
~-..-~ ~-..-~
\~~~\.' `./~~~/
.-~~^-. \__/ \__/
.' O \ / / \ \
(_____, `._.' | } \/~~~/
`----. / } | / \__/
`-. | / | / `. ,~~|
~-.__| /_ - ~ ^| /- _ `..-' f: f:
| / | / ~-. `-. _||_||_
|_____| |_____| ~ - . _ _ _ _ _>

7
base/shellcheckrc Normal file
View 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

View File

46
base/zshrc Normal file
View File

@@ -0,0 +1,46 @@
# this is my zsh config. there are many like it, but this one is mine.
# shellcheck shell=bash
autoload -U colors zsh/terminfo
colors
setopt correct
# Defaults
export DOTFILES="$HOME/.dotfiles"
# shellcheck source=shared.sh
source "$DOTFILES/scripts/shared.sh"
# 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
[ -f "$file" ] && source "$file"
[ -f "$file-secret" ] && source "$file-secret"
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
[ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
done
}
x-load-configs
# Import ssh keys in keychain
ssh-add -A 2>/dev/null;
# Try to load antigen, if present
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
# antigen is present
have antigen && {
antigen use oh-my-zsh
# config/functions
x-default-antigen-bundles
antigen apply
}
# starship is present
have starship && eval "$(starship init zsh)"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh

View File

@@ -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
View File

@@ -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"

90
config/alias Normal file → Executable file
View File

@@ -1,45 +1,46 @@
# shellcheck shell=bash
# macOS specific
#!/usr/bin/env bash
# shellcheck source="../scripts/shared.sh"
source "$DOTFILES/scripts/shared.sh"
# Get installed php versions from brew and setup aliases
function x-set-php-aliases
{
local php_versions=()
while IFS="" read -r line; do php_versions+=("$line"); done < <(brew list | grep '^php')
have brew && {
local php_versions=()
while IFS="" read -r line; do php_versions+=("$line"); done < <(brew list | grep '^php')
php_error_reporting='-d error_reporting=22527'
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}"
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"
# 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
# Raw PHP without error_reporting flag.
# shellcheck disable=SC2139
alias "${php_alias}"r="$php_exec"
# PHP with error_reporting flag.
# shellcheck disable=SC2139,SC2140
alias "$php_alias"="$php_exec $php_error_reporting"
# Local PHP Server.
# shellcheck disable=SC2139,SC2140
alias "${php_alias}s"="$php_exec -S localhost:9000"
# Use composer with specific PHP and error_reporting flag on.
# shellcheck disable=SC2139,SC2140
alias "${php_alias}c"="$php_exec $php_error_reporting $(which composer)"
done
}
}
if [[ $(uname) == 'Darwin' ]]; then
x-set-php-aliases
# Laravel Sail shortcut
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
# Flush Directory Service cache
@@ -53,25 +54,32 @@ if [[ $(uname) == 'Darwin' ]]; then
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
# watch with: differences, precise, beep and color
alias watchx='watch -dpbc'
# delete .DS_Store files
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
# tail with follow flag on
alias t='tail -f'
# directory usage, return only the total
alias dn='du -chd1'
# Mirror site with wget
alias mirror_site='wget -m -k -K -E -e robots=off'
# Mirror stdout to stderr, useful for seeing data going through a pipe
alias peek='tee >(cat 1>&2)'
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 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 zedit='$EDITOR ~/.dotfiles'
have irssi \
&& alias irssi="irssi --config='$IRSSI_CONFIG_FILE' --home='$IRSSI_CONFIG_HOME'"
if [[ -f "$HOME/.aliases.local" ]]; then
# shellcheck disable=SC1091
source "$HOME/.aliases.local"
fi

View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 3 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, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -0,0 +1,3 @@
return { -- a table of overrides/changes to the duskfox theme
Normal = { bg = "#000000" },
}

View File

@@ -0,0 +1,3 @@
return { -- this table overrides highlights in all themes
-- Normal = { bg = "#000000" },
}

View File

@@ -0,0 +1,94 @@
return {
-- Configure AstroNvim updates
updater = {
remote = "origin", -- remote to use
channel = "stable", -- "stable" or "nightly"
version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY)
branch = "nightly", -- branch name (NIGHTLY ONLY)
commit = nil, -- commit hash (NIGHTLY ONLY)
pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only)
skip_prompts = false, -- skip prompts about breaking changes
show_changelog = true, -- show the changelog after performing an update
auto_quit = true, -- automatically quit the current session after a successful update
remotes = { -- easily add new remotes to track
-- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url
-- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut,
-- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork
},
},
-- Set colorscheme to use
colorscheme = "catppuccin", -- or astrondark
-- Diagnostics configuration (for vim.diagnostics.config({...}))
-- when diagnostics are on
diagnostics = {
virtual_text = false,
underline = true,
},
lsp = {
-- customize lsp formatting options
formatting = {
-- control auto formatting on save
format_on_save = {
-- enable or disable format on save globally
enabled = true,
-- enable format on save for specified filetypes only
allow_filetypes = {
-- "go",
},
-- disable format on save for specified filetypes
ignore_filetypes = {
-- "python",
},
},
-- disable formatting capabilities for the listed language servers
disabled = {
-- "sumneko_lua",
},
-- default format timeout
timeout_ms = 1000,
-- -- fully override the default formatting function
-- filter = function(client) -- fully override the default formatting function
-- return true
-- end
},
-- enable servers that you already have installed without mason
servers = {
-- "pyright"
},
},
-- Configure require("lazy").setup() options
lazy = {
defaults = { lazy = true },
performance = {
rtp = {
-- customize default disabled vim plugins
disabled_plugins = {
"tohtml",
"gzip",
"matchit",
"zipPlugin",
"netrwPlugin",
"tarPlugin",
"matchparen",
},
},
},
},
-- This function is run last and is a good place to configuring
-- augroups/autocommands and custom filetypes also this just pure lua so
-- anything that doesn't fit in the normal config locations above can go here
polish = function()
-- Set up custom filetypes
-- vim.filetype.add {
-- extension = {
-- foo = "fooscript",
-- },
-- filename = {
-- ["Foofile"] = "fooscript",
-- },
-- pattern = {
-- ["~/%.config/foo/.*"] = "fooscript",
-- },
-- }
end,
}

View File

@@ -0,0 +1,30 @@
-- Mapping data with "desc" stored directly by vim.keymap.set().
--
-- Please use this mappings table to set keyboard mapping since this is the
-- lower level configuration and more robust one. (which-key will
-- automatically pick-up stored data by this setting.)
return {
-- first key is the mode
n = {
-- second key is the lefthand side of the map
-- mappings seen under group name "Buffer"
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
["<leader>bD"] = {
function()
require("astronvim.utils.status").heirline.buffer_picker(
function(bufnr) require("astronvim.utils.buffer").close(bufnr) end
)
end,
desc = "Pick to close",
},
-- tables with the `name` key will be registered with which-key if it's installed
-- this is useful for naming menus
["<leader>b"] = { name = "Buffers" },
-- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
},
t = {
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
},
}

View File

@@ -0,0 +1,38 @@
-- set vim options here (vim.<first_key>.<second_key> = value)
return {
opt = {
-- set to true or false etc.
relativenumber = true, -- sets vim.opt.relativenumber
number = true, -- sets vim.opt.number
spell = false, -- sets vim.opt.spell
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
wrap = true, -- sets vim.opt.wrap
},
g = {
-- sets vim.g.mapleader
mapleader = " ",
-- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
autoformat_enabled = true,
-- enable completion at start
cmp_enabled = true,
-- enable autopairs at start
autopairs_enabled = true,
-- set the visibility of diagnostics in the UI
-- (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
diagnostics_mode = 3,
-- disable icons in the UI (disable if no nerd font is available,
-- requires :PackerSync after changing)
icons_enabled = true,
-- disable notifications when toggling UI elements
ui_notifications_enabled = true,
},
}
-- If you need more control, you can use the function()...end notation
-- return function(local_vim)
-- local_vim.opt.relativenumber = true
-- local_vim.g.mapleader = " "
-- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list
-- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list
--
-- return local_vim
-- end

View File

@@ -0,0 +1,40 @@
return { -- Add the community repository of plugin specifications
"AstroNvim/astrocommunity", -- example of imporing a plugin, comment out to use it or add your own
-- available plugins can be found at
-- https://github.com/AstroNvim/astrocommunity
{
import = "astrocommunity.colorscheme.catppuccin",
opts = {
flavour = "mocha",
transparent_background = false,
dim_inactive = {
enabled = true,
shade = "dark",
percentage = 0.15,
},
}
},
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
{ import = "astrocommunity.bars-and-lines.smartcolumn-nvim" },
{
"m4xshen/smartcolumn.nvim",
opts = {
colorcolumn = { "80", "100", "120" },
disabled_filetypes = { "help", "text", "markdown" },
},
},
{ import = "astrocommunity.code-runner.overseer-nvim" },
--- { import = "astrocommunity.diagnostics.lsp_lines-nvim" },
{ import = "astrocommunity.diagnostics.trouble-nvim" },
{ import = "astrocommunity.editing-support.refactoring-nvim" },
{ import = "astrocommunity.editing-support.neogen" },
{ import = "astrocommunity.editing-support.nvim-regexplainer" },
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
{ import = "astrocommunity.indent.mini-indentscope" },
{ import = "astrocommunity.markdown-and-latex.glow-nvim" },
{ import = "astrocommunity.pack.php" },
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.project.neoconf-nvim" },
{ import = "astrocommunity.test.neotest" },
{ import = "astrocommunity.utility.neodim" },
}

View File

@@ -0,0 +1,107 @@
return {
-- customize alpha options
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░",
"░░░░░░░░░░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄░░░░░░░░░",
"░░░░░░░░▄▀░░░░░░░░░░░░▄░░░░░░░▀▄░░░░░░░",
"░░░░░░░░█░░▄░░░░▄░░░░░░░░░░░░░░█░░░░░░░",
"░░░░░░░░█░░░░░░░░░░░░▄█▄▄░░▄░░░█░▄▄▄░░░",
"░▄▄▄▄▄░░█░░░░░░▀░░░░▀█░░▀▄░░░░░█▀▀░██░░",
"░██▄▀██▄█░░░▄░░░░░░░██░░░░▀▀▀▀▀░░░░██░░",
"░░▀██▄▀██░░░░░░░░▀░██▀░░░░░░░░░░░░░▀██░",
"░░░░▀████░▀░░░░▄░░░██░░░▄█░░░░▄░▄█░░██░",
"░░░░░░░▀█░░░░▄░░░░░██░░░░▄░░░▄░░▄░░░██░",
"░░░░░░░▄█▄░░░░░░░░░░░▀▄░░▀▀▀▀▀▀▀▀░░▄▀░░",
"░░░░░░█▀▀█████████▀▀▀▀████████████▀░░░░",
"░░░░░░████▀░░███▀░░░░░░▀███░░▀██▀░░░░░░",
"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
}
return opts
end,
},
-- You can disable default plugins as follows:
-- { "max397574/better-escape.nvim", enabled = false },
--
-- You can also easily customize additional setup of plugins
-- that is outside of the plugin's setup call
{
"L3MON4D3/LuaSnip",
config = function(plugin, opts)
-- include the default astronvim config that calls the setup call
require "plugins.configs.luasnip" (plugin, opts)
-- add more custom luasnip configuration such
-- as filetype extend or custom snippets
local luasnip = require "luasnip"
luasnip.filetype_extend("javascript", { "javascriptreact" })
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
opts = function(_, opts)
require "plugins.neo-tree"
opts.filesystem.filtered_items = {
visible = false,
show_hidden_count = true,
hide_dotfiles = false,
hide_gitignored = true,
hide_by_name = {
},
never_show = {
'.git',
'.DS_Store',
'thumbs.db'
},
}
return opts
end,
},
-- {
-- "windwp/nvim-autopairs",
-- config = function(plugin, opts)
-- -- include the default astronvim config that calls the setup call
-- require "plugins.configs.nvim-autopairs"(plugin, opts)
-- -- add more custom autopairs configuration such as custom rules
-- local npairs = require "nvim-autopairs"
-- local Rule = require "nvim-autopairs.rule"
-- local cond = require "nvim-autopairs.conds"
-- npairs.add_rules(
-- {
-- Rule("$", "$", { "tex", "latex" })
-- -- don't add a pair if the next character is %
-- :with_pair(cond.not_after_regex "%%")
-- -- don't add a pair if the previous character is xxx
-- :with_pair(
-- cond.not_before_regex("xxx", 3)
-- )
-- -- don't move right when repeat character
-- :with_move(cond.none())
-- -- don't delete if the next character is xx
-- :with_del(cond.not_after_regex "xx")
-- -- disable adding a newline when you press <cr>
-- :with_cr(cond.none()),
-- },
-- -- disable for .vim files, but it work for another filetypes
-- Rule("a", "a", "-vim")
-- )
-- end,
-- },
-- By adding to the which-key config and using our helper
-- function you can add more which-key registered bindings
{
"folke/which-key.nvim",
config = function(plugin, opts)
-- include the default astronvim config that calls the setup call
require "plugins.configs.which-key" (plugin, opts)
-- Add bindings which show up as group name
local wk = require "which-key"
wk.register({
b = { name = "Buffer" },
}, { mode = "n", prefix = "<leader>" })
end,
},
}

View File

@@ -0,0 +1,50 @@
-- customize mason plugins
return { -- use mason-lspconfig to configure LSP installations
{
"williamboman/mason-lspconfig.nvim",
-- overrides `require("mason-lspconfig").setup(...)`
opts = {
ensure_installed = {
"ansiblels",
"bashls",
"clangd",
"codeqlls",
"cssls",
"diagnosticls",
"docker_compose_language_service",
"dockerls",
"emmet_ls",
"eslint",
"graphql",
"html",
"intelephense",
"jsonls",
"marksman",
"psalm",
"stylelint_lsp",
"sqlls",
"tailwindcss",
"tsserver",
"vuels",
"yamlls",
},
},
}, -- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
{
"jay-babu/mason-null-ls.nvim",
-- overrides `require("mason-null-ls").setup(...)`
opts = {
automatic_setup = true,
automatic_installation = true,
},
},
{
"jay-babu/mason-nvim-dap.nvim",
-- overrides `require("mason-nvim-dap").setup(...)`
opts = {
automatic_installation = true,
automatic_setup = true,
ensure_installed = { "python", "php", "js", "bash" },
},
},
}

View File

@@ -0,0 +1,68 @@
return {
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, config)
-- config variable is the default configuration table for the setup function call
local null_ls = require "null-ls"
-- Check supported formatters and linters
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
config.sources = {
-- Set a formatter
null_ls.builtins.code_actions.eslint,
null_ls.builtins.code_actions.refactoring,
null_ls.builtins.code_actions.shellcheck,
null_ls.builtins.code_actions.xo,
null_ls.builtins.diagnostics.actionlint,
null_ls.builtins.diagnostics.alex,
null_ls.builtins.diagnostics.ansiblelint,
null_ls.builtins.diagnostics.dotenv_linter,
null_ls.builtins.diagnostics.editorconfig_checker,
null_ls.builtins.diagnostics.eslint,
null_ls.builtins.diagnostics.jsonlint,
null_ls.builtins.diagnostics.luacheck,
null_ls.builtins.diagnostics.markdownlint,
null_ls.builtins.diagnostics.mypy,
null_ls.builtins.diagnostics.php,
null_ls.builtins.diagnostics.phpcs,
null_ls.builtins.diagnostics.phpstan,
null_ls.builtins.diagnostics.psalm,
null_ls.builtins.diagnostics.pydocstyle,
null_ls.builtins.diagnostics.semgrep,
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.standardjs,
null_ls.builtins.diagnostics.stylelint,
null_ls.builtins.diagnostics.tfsec,
null_ls.builtins.diagnostics.trail_space,
null_ls.builtins.diagnostics.tsc,
null_ls.builtins.diagnostics.vacuum,
null_ls.builtins.diagnostics.vint,
null_ls.builtins.diagnostics.vulture,
null_ls.builtins.diagnostics.xo,
null_ls.builtins.diagnostics.yamllint,
null_ls.builtins.diagnostics.zsh,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.blade_formatter,
null_ls.builtins.formatting.cbfmt,
null_ls.builtins.formatting.clang_format,
null_ls.builtins.formatting.eslint,
null_ls.builtins.formatting.fixjson,
null_ls.builtins.formatting.isort,
null_ls.builtins.formatting.jq,
null_ls.builtins.formatting.markdownlint,
null_ls.builtins.formatting.nginx_beautifier,
null_ls.builtins.formatting.pg_format,
null_ls.builtins.formatting.phpcsfixer,
null_ls.builtins.formatting.prettier_eslint,
null_ls.builtins.formatting.prettier,
null_ls.builtins.formatting.puppet_lint,
null_ls.builtins.formatting.rome,
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.shfmt.with {
args = { "-i", "1", "-bn", "-ci", "-sr", "-kb", "-fn" },
},
null_ls.builtins.formatting.stylelint,
}
return config -- return final config table
end,
}

View File

@@ -0,0 +1,33 @@
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"c",
"cmake",
"comment",
"diff",
"dockerfile",
"gitignore",
"graphql",
"html",
"javascript",
"json",
"json5",
"latex",
"lua",
"markdown",
"php",
"phpdoc",
"python",
"scss",
"terraform",
"todotxt",
"toml",
"typescript",
"vim",
"vue",
"yaml",
},
},
}

View File

@@ -0,0 +1,15 @@
return {
-- You can also add new plugins here as well:
-- Add plugins, the lazy syntax
"andweeb/presence.nvim",
{
"ray-x/lsp_signature.nvim",
event = "BufRead",
config = function() require("lsp_signature").setup() end,
},
{
"wakatime/vim-wakatime",
lazy = false,
enabled = true,
},
}

83
config/cheat/conf.yml Normal file
View File

@@ -0,0 +1,83 @@
---
# The editor to use with 'cheat -e <sheet>'. Defaults to $EDITOR or $VISUAL.
editor: $EDITOR
# Should 'cheat' always colorize output?
colorize: true
# Which 'chroma' colorscheme should be applied to the output?
# Options are available here:
# https://github.com/alecthomas/chroma/tree/master/styles
style: catppuccin-mocha
# Which 'chroma' "formatter" should be applied?
# One of: "terminal", "terminal256", "terminal16m"
formatter: terminal256
# Through which pager should output be piped?
# 'less -FRX' is recommended on Unix systems
# 'more' is recommended on Windows
pager: less -FRX
# Cheatpaths are paths at which cheatsheets are available on your local
# filesystem.
#
# It is useful to sort cheatsheets into different cheatpaths for organizational
# purposes. For example, you might want one cheatpath for community
# cheatsheets, one for personal cheatsheets, one for cheatsheets pertaining to
# your day job, one for code snippets, etc.
#
# Cheatpaths are scoped, such that more "local" cheatpaths take priority over
# more "global" cheatpaths. (The most global cheatpath is listed first in this
# file; the most local is listed last.) For example, if there is a 'tar'
# cheatsheet on both global and local paths, you'll be presented with the local
# one by default. ('cheat -p' can be used to view cheatsheets from alternative
# cheatpaths.)
#
# Cheatpaths can also be tagged as "read only". This instructs cheat not to
# automatically create cheatsheets on a read-only cheatpath. Instead, when you
# would like to edit a read-only cheatsheet using 'cheat -e', cheat will
# perform a copy-on-write of that cheatsheet from a read-only cheatpath to a
# writeable cheatpath.
#
# This is very useful when you would like to maintain, for example, a
# "pristine" repository of community cheatsheets on one cheatpath, and an
# editable personal reponsity of cheatsheets on another cheatpath.
#
# Cheatpaths can be also configured to automatically apply tags to cheatsheets
# on certain paths, which can be useful for querying purposes.
# Example: 'cheat -t work jenkins'.
#
# Community cheatsheets must be installed separately, though you may have
# downloaded them automatically when installing 'cheat'. If not, you may
# download them here:
#
# https://github.com/cheat/cheatsheets
cheatpaths:
# Cheatpath properties mean the following:
# 'name': the name of the cheatpath
# (view with 'cheat -d', filter with 'cheat -p')
# 'path': the filesystem path of the cheatsheet directory
# (view with 'cheat -d')
# 'tags': tags that should be automatically applied to sheets on this path
# 'readonly': shall user-created ('cheat -e') cheatsheets be saved here?
- name: community
path: ~/.config/cheat/cheatsheets/community
tags: [community]
readonly: true
# If you have personalized cheatsheets, list them last. They will take
# precedence over the more global cheatsheets.
- name: personal
path: ~/.config/cheat/cheatsheets/personal
tags: [personal]
readonly: false
# While it requires no configuration here, it's also worth noting that
# cheat will automatically append directories named '.cheat' within the
# current working directory to the 'cheatpath'. This can be very useful if
# you'd like to closely associate cheatsheets with, for example, a directory
# containing source code.
#
# Such "directory-scoped" cheatsheets will be treated as the most "local"
# cheatsheets, and will override less "local" cheatsheets. Similarly,
# directory-scoped cheatsheets will always be editable ('readonly: false').

233
config/dircolors Normal file
View File

@@ -0,0 +1,233 @@
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996-2023 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
#
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Global config options can be specified before TERM or COLORTERM entries
# ===================================================================
# Terminal filters
# ===================================================================
# Below are TERM or COLORTERM entries, which can be glob patterns, which
# restrict following config to systems with matching environment variables.
COLORTERM ?*
TERM Eterm
TERM ansi
TERM *color*
TERM con[0-9]*x[0-9]*
TERM cons25
TERM console
TERM cygwin
TERM *direct*
TERM dtterm
TERM gnome
TERM hurd
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mlterm
TERM putty
TERM rxvt*
TERM screen*
TERM st
TERM terminator
TERM tmux*
TERM vt100
TERM xterm*
# ===================================================================
# Basic file attributes
# ===================================================================
# Below are the color init strings for the basic file types.
# One can use codes for 256 or more colors supported by modern terminals.
# The default color codes use the capabilities of an 8 color terminal
# with some additional attributes as per the following codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
MISSING 00 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 00 # file with capability (very expensive to lookup)
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;32
# ===================================================================
# File extension attributes
# ===================================================================
# List any file extensions like '.gz' or '.tar' that you would like ls
# to color below. Put the suffix, a space, and the color init string.
# (and any comments you want to add after a '#').
# Suffixes are matched case insensitively, but if you define different
# init strings for separate cases, those will be honored.
#
# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (bright green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
# Or if you want to color scripts even if they do not have the
# executable bit actually set.
#.sh 01;32
#.csh 01;32
# archives or compressed (bright red)
.tar 01;31
.tgz 01;31
.arc 01;31
.arj 01;31
.taz 01;31
.lha 01;31
.lz4 01;31
.lzh 01;31
.lzma 01;31
.tlz 01;31
.txz 01;31
.tzo 01;31
.t7z 01;31
.zip 01;31
.z 01;31
.dz 01;31
.gz 01;31
.lrz 01;31
.lz 01;31
.lzo 01;31
.xz 01;31
.zst 01;31
.tzst 01;31
.bz2 01;31
.bz 01;31
.tbz 01;31
.tbz2 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
.war 01;31
.ear 01;31
.sar 01;31
.rar 01;31
.alz 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31
.7z 01;31
.rz 01;31
.cab 01;31
.wim 01;31
.swm 01;31
.dwm 01;31
.esd 01;31
# image formats
.avif 01;35
.jpg 01;35
.jpeg 01;35
.mjpg 01;35
.mjpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.svg 01;35
.svgz 01;35
.mng 01;35
.pcx 01;35
.mov 01;35
.mpg 01;35
.mpeg 01;35
.m2v 01;35
.mkv 01;35
.webm 01;35
.webp 01;35
.ogm 01;35
.mp4 01;35
.m4v 01;35
.mp4v 01;35
.vob 01;35
.qt 01;35
.nuv 01;35
.wmv 01;35
.asf 01;35
.rm 01;35
.rmvb 01;35
.flc 01;35
.avi 01;35
.fli 01;35
.flv 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
.cgm 01;35
.emf 01;35
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
.ogv 01;35
.ogx 01;35
# audio formats
.aac 00;36
.au 00;36
.flac 00;36
.m4a 00;36
.mid 00;36
.midi 00;36
.mka 00;36
.mp3 00;36
.mpc 00;36
.ogg 00;36
.ra 00;36
.wav 00;36
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
.oga 00;36
.opus 00;36
.spx 00;36
.xspf 00;36
# backup files
*~ 00;90
*# 00;90
.bak 00;90
.old 00;90
.orig 00;90
.part 00;90
.rej 00;90
.swp 00;90
.tmp 00;90
.dpkg-dist 00;90
.dpkg-old 00;90
.ucf-dist 00;90
.ucf-new 00;90
.ucf-old 00;90
.rpmnew 00;90
.rpmorig 00;90
.rpmsave 00;90
#
# Subsequent TERM or COLORTERM entries, can be used to add / override
# config specific to those matching environment variables.

52
config/exports Normal file → Executable file
View File

@@ -1,23 +1,43 @@
# shellcheck shell=bash
#!/usr/bin/env bash
# shellcheck shell=zsh
# vim: filetype=zsh
export HIST_STAMPS="yyyy-mm-dd"
export DOTFILES="$HOME/.dotfiles"
source "$DOTFILES/scripts/shared.sh"
path_append "$DOTFILES/local/bin"
# Larger bash history (allow 32³ entries; default is 500)
export HISTSIZE=32768
export HISTFILESIZE=$HISTSIZE
export HISTCONTROL=ignoredups
# Explicitly set XDG folders
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
# Make some commands not show up in history
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
# custom variables
export XDG_BIN_HOME="$HOME/.local/bin"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_RUNTIME_DIR="$HOME/.local/run"
# And include the parameter for ZSH
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
# 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
# Highlight section titles in manual pages
export LESS_TERMCAP_md="$ORANGE"
path_append "/usr/local/bin"
path_append "$HOMEBREW_SBIN"
path_append "$HOMEBREW_BIN"
path_append "$XDG_BIN_HOME"
# Dont clear the screen after quitting a manual page
export MANPAGER="less -X"
# brew, https://brew.sh
have brew && {
path_append "$(brew --prefix python)/bin"
path_append "$(brew --prefix coreutils)/libexec/gnubin"
path_append "$(brew --prefix ruby)/bin"
path_append "$(gem environment gemdir)/bin"
}
# Always enable colored `grep` output
export GREP_OPTIONS="--color=auto"
source "$DOTFILES/config/exports-shell"
source "$DOTFILES/config/exports-apps"
have nvim && export EDITOR="nvim"

111
config/exports-apps Executable file
View File

@@ -0,0 +1,111 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck enable=external-sources
# shellcheck disable=1091
# vim: filetype=zsh
source "$DOTFILES/scripts/shared.sh"
# 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"
# Ansible configuration
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
have ansible && {
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
x-dc "$ANSIBLE_HOME"
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
}
# composer, https://getcomposer.org/
have composer && {
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
export PATH="$COMPOSER_BIN:$PATH"
}
# docker, https://docs.docker.com/engine/reference/commandline/cli/
have docker && {
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
x-dc "$DOCKER_CONFIG"
# Docker: Disable snyk ad
export DOCKER_SCAN_SUGGEST=false
}
# ffmpeg
have ffmpeg && {
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
x-dc "$FFMPEG_DATADIR"
}
# gcloud
have gcloud && {
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"
}
# gem, rubygems
have gem && {
export GEM_HOME="$XDG_STATE_HOME/gem"
export GEM_PATH="$XDG_STATE_HOME/gem"
export PATH="$GEM_HOME/bin:$PATH"
path_append "$GEM_PATH/bin"
}
# If we have go packages, include them to the PATH
have go && {
export GOPATH="$XDG_DATA_HOME/go"
export GOBIN="$XDG_BIN_HOME"
x-dc "$GOPATH"
}
# irssi
have irssi && {
# These variables are used in ./alias with --config and --home
export IRSSI_CONFIG_HOME="$XDG_CONFIG_HOME/irssi"
export IRSSI_CONFIG_FILE="$IRSSI_CONFIG_HOME/config"
x-dc "$IRSSI_CONFIG_HOME"
}
# nvm, the node version manager
export NVM_LAZY_LOAD=true
export NVM_COMPLETION=true
export NVM_AUTO_USE=true
export NVM_DIR="$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
# op (1Password cli) is present
have op && {
export OP_CACHE="$XDG_STATE_HOME/1password"
x-dc "$OP_CACHE"
eval "$(op completion zsh)"
compdef _op op
}
# pyenv, python environments
have pyenv && {
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
x-dc "$PYENV_ROOT"
path_append "$PYENV_ROOT/bin"
eval "$(pyenv init -)"
}
# wakatime, https://github.com/wakatime/wakatime-cli
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
x-dc "$WAKATIME_HOME"
# z, https://github.com/rupa/z
export _Z_DATA="$XDG_STATE_HOME/z"
[[ -f "$XDG_BIN_HOME/z/z.sh" ]] && source "$XDG_BIN_HOME/z/z.sh"
# Misc
export ANDROID_HOME="$XDG_DATA_HOME/android"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
#
# This file is secret and wont be added to the git repo.
export GITLAB_API_TOKEN=""
export GREN_GITHUB_TOKEN=""

63
config/exports-shell Executable file
View File

@@ -0,0 +1,63 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=1091,2046
# vim: filetype=zsh
source "$DOTFILES/scripts/shared.sh"
export LC_ALL=fi_FI.utf8
# Bash completion file location
export BASH_COMPLETION_USER_FILE="${XDG_CONFIG_HOME}/bash-completion/bash_completion"
# History env variables
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"
# Dont 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
# 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"
# Set dircolors based on the file, if it exists
have dircolors && eval $(dircolors "$XDG_CONFIG_HOME/dircolors")
# If we are using zsh, color our dir lists and such
if [ "$SHELL" = "$(which zsh)" ]; then
x-dc "$XDG_CACHE_HOME/zsh"
x-dc "$XDG_STATE_HOME/zsh"
export HISTFILE="$XDG_STATE_HOME/zsh/history"
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache"
zstyle ':completion:*' list-colors "$LS_COLORS"
# fzf
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
fi
# If we are using bash
if [ "$SHELL" = "$(which bash)" ]; then
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] \
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
fi

58
config/functions Normal file → Executable file
View File

@@ -1,10 +1,12 @@
# shellcheck shell=bash
#!/usr/bin/env bash
#
# shell functions
#
# shellcheck source="../scripts/shared.sh"
source "$DOTFILES/scripts/shared.sh"
# Weather in Tampere, or other city
function weather
weather()
{
# https://github.com/chubin/wttr.in#usage
local city="${1:-Tampere}"
@@ -12,25 +14,25 @@ function weather
}
# Docker
function ssh-docker
ssh-docker()
{
docker exec -it "$@" bash
}
# Create a new directory and enter it
function mkd
mkd()
{
mkdir -p "$@" && cd "$@" || exit
}
# All the dig info
function digga
digga()
{
dig +nocmd "$1" any +multiline +noall +answer
}
# Rector project to php version 8.0 by default.
function rector
rector()
{
local php="${1:-80}"
docker run -v "$(pwd)":/project rector/rector:latest process \
@@ -40,7 +42,7 @@ function rector
}
# Commit everything
function commit
commit()
{
commitMessage="$*"
@@ -52,7 +54,7 @@ function commit
eval "git commit -a -m '${commitMessage}'"
}
function scheduler
scheduler()
{
while :; do
php artisan schedule:run
@@ -61,7 +63,45 @@ function scheduler
done
}
function silent
silent()
{
"$@" >&/dev/null
}
ask()
{
while true; do
read -p "$1 ([y]/n) " -r
REPLY=${REPLY:-"y"}
if [[ $REPLY =~ ^[Yy]$ ]]; then
return 1
elif [[ $REPLY =~ ^[Nn]$ ]]; then
return 0
fi
done
}
# Defines default antigen bundles
x-default-antigen-bundles()
{
# these should be always available
antigen bundle colored-man-pages
antigen bundle command-not-found
antigen bundle ssh-agent
antigen bundle MichaelAquilina/zsh-you-should-use
antigen bundle Sparragus/zsh-auto-nvm-use
antigen bundle jreese/zsh-titles
antigen bundle unixorn/autoupdate-antigen.zshplugin
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-syntax-highlighting
# these should be available if there's need
have brew && antigen bundle brew
have docker && antigen bundle docker
have docker-compose && antigen bundle sroze/docker-compose-zsh-plugin
have jq && antigen bundle reegnz/jq-zsh-plugin
have nvm && antigen bundle nvm
have php && antigen bundle php
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
have rvm && antigen bundle unixorn/rvm-plugin
}

13
config/fzf/fzf.bash Normal file
View File

@@ -0,0 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
fi
# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.bash" 2> /dev/null
# Key bindings
# ------------
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.bash"

13
config/fzf/fzf.zsh Normal file
View File

@@ -0,0 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
fi
# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.zsh" 2> /dev/null
# Key bindings
# ------------
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.zsh"

View File

@@ -1 +1 @@
git_protocol: ssh
git_protocol: https

View File

@@ -1,52 +1,59 @@
[user]
name = Ismo Vuorinen
email = ismo@ivuorinen.net
name = Ismo Vuorinen
email = ismo@ivuorinen.net
[credential]
helper = store --file ~/.cache/git/git-credentials
helper = cache --timeout 30000
[core]
excludesfile = ~/.config/git/gitignore
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]++'"
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
tool = difftastic
[difftool]
prompt = false
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
cmd = difft "$LOCAL" "$REMOTE"
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = master
defaultBranch = main
[pull]
rebase = false
rebase = true
[color]
ui = true
diff = auto
branch = auto
status = auto
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
added = green bold
changed = yellow
deleted = red bold strike
untracked = cyan
branch = yellow black bold ul
[submodule]
recurse = true

View File

@@ -0,0 +1,331 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.27058823529411763</real>
<key>Green Component</key>
<real>0.2784313725490196</real>
<key>Blue Component</key>
<real>0.35294117647058826</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9529411764705882</real>
<key>Green Component</key>
<real>0.5450980392156862</real>
<key>Blue Component</key>
<real>0.6588235294117647</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.8901960784313725</real>
<key>Blue Component</key>
<real>0.6313725490196078</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9764705882352941</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.6862745098039216</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.7058823529411765</real>
<key>Blue Component</key>
<real>0.9803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.9058823529411765</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5803921568627451</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.8352941176470589</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.7294117647058823</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.8705882352941177</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.34509803921568627</real>
<key>Green Component</key>
<real>0.3568627450980392</real>
<key>Blue Component</key>
<real>0.4392156862745098</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9529411764705882</real>
<key>Green Component</key>
<real>0.5450980392156862</real>
<key>Blue Component</key>
<real>0.6588235294117647</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.8901960784313725</real>
<key>Blue Component</key>
<real>0.6313725490196078</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9764705882352941</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.6862745098039216</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.7058823529411765</real>
<key>Blue Component</key>
<real>0.9803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.9058823529411765</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5803921568627451</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.8352941176470589</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.6784313725490196</real>
<key>Blue Component</key>
<real>0.7843137254901961</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Background Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.11764705882352941</real>
<key>Green Component</key>
<real>0.11764705882352941</real>
<key>Blue Component</key>
<real>0.1803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Link Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.8627450980392157</real>
<key>Blue Component</key>
<real>0.9215686274509803</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Bold Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.8784313725490196</real>
<key>Blue Component</key>
<real>0.8627450980392157</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Guide Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>0.07</real>
</dict>
<key>Selection Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.34509803921568627</real>
<key>Green Component</key>
<real>0.3568627450980392</real>
<key>Blue Component</key>
<real>0.4392156862745098</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
</dict>
</plist>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,417 @@
{
"Badge Text" : "",
"Working Directory" : "\/Users\/ivuorinen\/Code",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 1,
"Green Component" : 0.83921568627450982
},
"Rows" : 25,
"Ansi 11 Color" : {
"Red Component" : 0.97647058823529409,
"Color Space" : "sRGB",
"Blue Component" : 0.68627450980392157,
"Alpha Component" : 1,
"Green Component" : 0.88627450980392153
},
"Use Italic Font" : true,
"Foreground Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 1,
"Green Component" : 0.83921568627450982
},
"Right Option Key Sends" : 0,
"Character Encoding" : 4,
"Selection Color" : {
"Red Component" : 0.34509803921568627,
"Color Space" : "sRGB",
"Blue Component" : 0.4392156862745098,
"Alpha Component" : 1,
"Green Component" : 0.35686274509803922
},
"Blend" : 0.24709154211956524,
"Mouse Reporting" : true,
"Cursor Boost" : 0,
"Ansi 4 Color" : {
"Red Component" : 0.53725490196078429,
"Color Space" : "sRGB",
"Blue Component" : 0.98039215686274506,
"Alpha Component" : 1,
"Green Component" : 0.70588235294117652
},
"Non-ASCII Anti Aliased" : true,
"Sync Title" : false,
"Badge Font" : "JetBrainsMonoNerdFontCompleteM-Bold",
"Disable Window Resizing" : true,
"Description" : "Default",
"Close Sessions On End" : true,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Scrollback Lines" : 0,
"Draw Powerline Glyphs" : true,
"Flashing Bell" : true,
"Cursor Guide Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 0.070000000000000007,
"Green Component" : 0.83921568627450982
},
"BM Growl" : true,
"Ansi 3 Color" : {
"Red Component" : 0.97647058823529409,
"Color Space" : "sRGB",
"Blue Component" : 0.68627450980392157,
"Alpha Component" : 1,
"Green Component" : 0.88627450980392153
},
"Icon" : 1,
"Use Non-ASCII Font" : false,
"Link Color" : {
"Red Component" : 0.53725490196078429,
"Color Space" : "sRGB",
"Blue Component" : 0.92156862745098034,
"Alpha Component" : 1,
"Green Component" : 0.86274509803921573
},
"Shortcut" : "",
"Background Image Location" : "",
"Bold Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 1,
"Green Component" : 0.83921568627450982
},
"Use Cursor Guide" : false,
"Unlimited Scrollback" : true,
"Custom Command" : "No",
"Title Components" : 512,
"Keyboard Map" : {
"0xf700-0x260000" : {
"Action" : 10,
"Text" : "[1;6A"
},
"0x37-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0x32-0x40000" : {
"Action" : 11,
"Text" : "0x00"
},
"0xf709-0x20000" : {
"Action" : 10,
"Text" : "[17;2~"
},
"0xf70c-0x20000" : {
"Action" : 10,
"Text" : "[20;2~"
},
"0xf729-0x20000" : {
"Action" : 10,
"Text" : "[1;2H"
},
"0xf72b-0x40000" : {
"Action" : 10,
"Text" : "[1;5F"
},
"0xf705-0x20000" : {
"Action" : 10,
"Text" : "[1;2Q"
},
"0xf703-0x260000" : {
"Action" : 10,
"Text" : "[1;6C"
},
"0xf700-0x220000" : {
"Action" : 10,
"Text" : "[1;2A"
},
"0xf701-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x42"
},
"0x38-0x40000" : {
"Action" : 11,
"Text" : "0x7f"
},
"0x33-0x40000" : {
"Action" : 11,
"Text" : "0x1b"
},
"0xf703-0x220000" : {
"Action" : 10,
"Text" : "[1;2C"
},
"0xf701-0x240000" : {
"Action" : 10,
"Text" : "[1;5B"
},
"0xf70d-0x20000" : {
"Action" : 10,
"Text" : "[21;2~"
},
"0xf702-0x260000" : {
"Action" : 10,
"Text" : "[1;6D"
},
"0xf729-0x40000" : {
"Action" : 10,
"Text" : "[1;5H"
},
"0xf706-0x20000" : {
"Action" : 10,
"Text" : "[1;2R"
},
"0x34-0x40000" : {
"Action" : 11,
"Text" : "0x1c"
},
"0xf700-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x41"
},
"0x2d-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0xf70e-0x20000" : {
"Action" : 10,
"Text" : "[23;2~"
},
"0xf702-0x220000" : {
"Action" : 10,
"Text" : "[1;2D"
},
"0xf703-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x43"
},
"0xf700-0x240000" : {
"Action" : 10,
"Text" : "[1;5A"
},
"0xf707-0x20000" : {
"Action" : 10,
"Text" : "[1;2S"
},
"0xf70a-0x20000" : {
"Action" : 10,
"Text" : "[18;2~"
},
"0x35-0x40000" : {
"Action" : 11,
"Text" : "0x1d"
},
"0xf70f-0x20000" : {
"Action" : 10,
"Text" : "[24;2~"
},
"0xf703-0x240000" : {
"Action" : 10,
"Text" : "[1;5C"
},
"0xf701-0x260000" : {
"Action" : 10,
"Text" : "[1;6B"
},
"0xf702-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x44"
},
"0xf72b-0x20000" : {
"Action" : 10,
"Text" : "[1;2F"
},
"0x36-0x40000" : {
"Action" : 11,
"Text" : "0x1e"
},
"0xf708-0x20000" : {
"Action" : 10,
"Text" : "[15;2~"
},
"0xf701-0x220000" : {
"Action" : 10,
"Text" : "[1;2B"
},
"0xf70b-0x20000" : {
"Action" : 10,
"Text" : "[19;2~"
},
"0xf702-0x240000" : {
"Action" : 10,
"Text" : "[1;5D"
},
"0xf704-0x20000" : {
"Action" : 10,
"Text" : "[1;2P"
}
},
"Ansi 14 Color" : {
"Red Component" : 0.58039215686274515,
"Color Space" : "sRGB",
"Blue Component" : 0.83529411764705885,
"Alpha Component" : 1,
"Green Component" : 0.88627450980392153
},
"Ansi 2 Color" : {
"Red Component" : 0.65098039215686276,
"Color Space" : "sRGB",
"Blue Component" : 0.63137254901960782,
"Alpha Component" : 1,
"Green Component" : 0.8901960784313725
},
"Send Code When Idle" : false,
"ASCII Anti Aliased" : true,
"Tags" : [
],
"Ansi 9 Color" : {
"Red Component" : 0.95294117647058818,
"Color Space" : "sRGB",
"Blue Component" : 0.6588235294117647,
"Alpha Component" : 1,
"Green Component" : 0.54509803921568623
},
"Badge Right Margin" : 10,
"Use Bold Font" : true,
"Silence Bell" : false,
"Ansi 12 Color" : {
"Red Component" : 0.53725490196078429,
"Color Space" : "sRGB",
"Blue Component" : 0.98039215686274506,
"Alpha Component" : 1,
"Green Component" : 0.70588235294117652
},
"Window Type" : 0,
"Use Bright Bold" : true,
"Cursor Text Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 1,
"Green Component" : 0.83921568627450982
},
"Default Bookmark" : "No",
"Cursor Color" : {
"Red Component" : 0.96078431372549022,
"Color Space" : "sRGB",
"Blue Component" : 0.86274509803921573,
"Alpha Component" : 1,
"Green Component" : 0.8784313725490196
},
"Ansi 1 Color" : {
"Red Component" : 0.95294117647058818,
"Color Space" : "sRGB",
"Blue Component" : 0.6588235294117647,
"Alpha Component" : 1,
"Green Component" : 0.54509803921568623
},
"Name" : "Default",
"Blinking Cursor" : false,
"Guid" : "82636119-EA17-4A26-9AA7-408172F4A9C8",
"Badge Max Width" : 0.45000000000000001,
"Idle Code" : 0,
"Ansi 10 Color" : {
"Red Component" : 0.65098039215686276,
"Color Space" : "sRGB",
"Blue Component" : 0.63137254901960782,
"Alpha Component" : 1,
"Green Component" : 0.8901960784313725
},
"Ansi 8 Color" : {
"Red Component" : 0.34509803921568627,
"Color Space" : "sRGB",
"Blue Component" : 0.4392156862745098,
"Alpha Component" : 1,
"Green Component" : 0.35686274509803922
},
"Badge Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 0.5,
"Green Component" : 0.14910030364990234
},
"Smart Cursor Color" : true,
"Ambiguous Double Width" : false,
"Blur Radius" : 9.5927277260638313,
"Badge Max Height" : 0.10000000000000001,
"Ansi 0 Color" : {
"Red Component" : 0.27058823529411763,
"Color Space" : "sRGB",
"Blue Component" : 0.35294117647058826,
"Alpha Component" : 1,
"Green Component" : 0.27843137254901962
},
"Blur" : true,
"Normal Font" : "JetBrainsMonoNerdFontCompleteM-Light 15",
"Vertical Spacing" : 1,
"Ansi 7 Color" : {
"Red Component" : 0.72941176470588232,
"Color Space" : "sRGB",
"Blue Component" : 0.87058823529411766,
"Alpha Component" : 1,
"Green Component" : 0.76078431372549016
},
"Command" : "",
"Terminal Type" : "xterm-256color",
"Horizontal Spacing" : 1,
"Option Key Sends" : 0,
"Only The Default BG Color Uses Transparency" : true,
"Minimum Contrast" : 0.14973958333333334,
"Ansi 15 Color" : {
"Red Component" : 0.65098039215686276,
"Color Space" : "sRGB",
"Blue Component" : 0.78431372549019607,
"Alpha Component" : 1,
"Green Component" : 0.67843137254901964
},
"Ansi 6 Color" : {
"Red Component" : 0.58039215686274515,
"Color Space" : "sRGB",
"Blue Component" : 0.83529411764705885,
"Alpha Component" : 1,
"Green Component" : 0.88627450980392153
},
"Badge Top Margin" : 10,
"Transparency" : 0.10293218085106381,
"Background Color" : {
"Red Component" : 0.11764705882352941,
"Color Space" : "sRGB",
"Blue Component" : 0.1803921568627451,
"Alpha Component" : 1,
"Green Component" : 0.11764705882352941
},
"Screen" : -2,
"Non Ascii Font" : "Monaco 12",
"Ansi 13 Color" : {
"Red Component" : 0.96078431372549022,
"Color Space" : "sRGB",
"Blue Component" : 0.90588235294117647,
"Alpha Component" : 1,
"Green Component" : 0.76078431372549016
},
"Columns" : 120,
"Visual Bell" : true,
"ASCII Ligatures" : false,
"Ansi 5 Color" : {
"Red Component" : 0.96078431372549022,
"Color Space" : "sRGB",
"Blue Component" : 0.90588235294117647,
"Alpha Component" : 1,
"Green Component" : 0.76078431372549016
},
"Custom Directory" : "Yes"
}

16
config/misc/screenrc Normal file
View File

@@ -0,0 +1,16 @@
# Disable the startup message
startup_message off
# Set a large scrollback buffer
defscrollback 32000
# Always start `screen` with UTF-8 enabled (`screen -U`)
defutf8 on
# Scroll with mouse wheel (http://stackoverflow.com/a/1125947)
termcapinfo xterm* ti@:te@
# Some settings for screen + vim
term xterm-256color
maptimeout 10

1
config/nano/nanorc Normal file
View File

@@ -0,0 +1 @@
set tabsize 2

864
config/neofetch/config.conf Normal file
View File

@@ -0,0 +1,864 @@
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
info title
info underline
info "OS" distro
info "Host" model
# info "Kernel" kernel
info "Uptime" uptime
# info "Packages" packages
info "Shell" shell
info "Resolution" resolution
# info "DE" de
# info "WM" wm
# info "WM Theme" wm_theme
info "Theme" theme
info "Icons" icons
info "Terminal" term
info "Terminal Font" term_font
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
# info "GPU Driver" gpu_driver # Linux/macOS only
# info "CPU Usage" cpu_usage
# info "Disk" disk
# info "Battery" battery
# info "Font" font
# info "Song" song
# [[ "$player" ]] && prin "Music Player" "$player"
info "Local IP" local_ip
# info "Public IP" public_ip
# info "Users" users
info "Locale" locale # This only works on glibc systems.
info cols
}
# Title
# Hide/Show Fully qualified domain name.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --title_fqdn
title_fqdn="off"
# Kernel
# Shorten the output of the kernel function.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --kernel_shorthand
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
#
# Example:
# on: '4.8.9-1-ARCH'
# off: 'Linux 4.8.9-1-ARCH'
kernel_shorthand="on"
# Distro
# Shorten the output of the distro function
#
# Default: 'off'
# Values: 'on', 'tiny', 'off'
# Flag: --distro_shorthand
# Supports: Everything except Windows and Haiku
distro_shorthand="on"
# Show/Hide OS Architecture.
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --os_arch
#
# Example:
# on: 'Arch Linux x86_64'
# off: 'Arch Linux'
os_arch="on"
# Uptime
# Shorten the output of the uptime function
#
# Default: 'on'
# Values: 'on', 'tiny', 'off'
# Flag: --uptime_shorthand
#
# Example:
# on: '2 days, 10 hours, 3 mins'
# tiny: '2d 10h 3m'
# off: '2 days, 10 hours, 3 minutes'
uptime_shorthand="tiny"
# Memory
# Show memory pecentage in output.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --memory_percent
#
# Example:
# on: '1801MiB / 7881MiB (22%)'
# off: '1801MiB / 7881MiB'
memory_percent="on"
# Change memory output unit.
#
# Default: 'mib'
# Values: 'kib', 'mib', 'gib'
# Flag: --memory_unit
#
# Example:
# kib '1020928KiB / 7117824KiB'
# mib '1042MiB / 6951MiB'
# gib: ' 0.98GiB / 6.79GiB'
memory_unit="gib"
# Packages
# Show/Hide Package Manager names.
#
# Default: 'tiny'
# Values: 'on', 'tiny' 'off'
# Flag: --package_managers
#
# Example:
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
# tiny: '908 (pacman, flatpak, snap)'
# off: '908'
package_managers="on"
# Shell
# Show the path to $SHELL
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --shell_path
#
# Example:
# on: '/bin/bash'
# off: 'bash'
shell_path="off"
# Show $SHELL version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --shell_version
#
# Example:
# on: 'bash 4.4.5'
# off: 'bash'
shell_version="on"
# CPU
# CPU speed type
#
# Default: 'bios_limit'
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
# Flag: --speed_type
# Supports: Linux with 'cpufreq'
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit"
# CPU speed shorthand
#
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
# off: 'i7-6500U (4) @ 3.100GHz'
speed_shorthand="off"
# Enable/Disable CPU brand in output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_brand
#
# Example:
# on: 'Intel i7-6500U'
# off: 'i7-6500U (4)'
cpu_brand="on"
# CPU Speed
# Hide/Show CPU speed.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_speed
#
# Example:
# on: 'Intel i7-6500U (4) @ 3.1GHz'
# off: 'Intel i7-6500U (4)'
cpu_speed="on"
# CPU Cores
# Display CPU cores in output
#
# Default: 'logical'
# Values: 'logical', 'physical', 'off'
# Flag: --cpu_cores
# Support: 'physical' doesn't work on BSD.
#
# Example:
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
# off: 'Intel i7-6500U @ 3.1GHz'
cpu_cores="logical"
# CPU Temperature
# Hide/Show CPU temperature.
# Note the temperature is added to the regular CPU function.
#
# Default: 'off'
# Values: 'C', 'F', 'off'
# Flag: --cpu_temp
# Supports: Linux, BSD
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
# coretemp kernel module. This only supports newer Intel processors.
#
# Example:
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
# off: 'Intel i7-6500U (4) @ 3.1GHz'
cpu_temp="off"
# GPU
# Enable/Disable GPU Brand
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gpu_brand
#
# Example:
# on: 'AMD HD 7950'
# off: 'HD 7950'
gpu_brand="on"
# Which GPU to display
#
# Default: 'all'
# Values: 'all', 'dedicated', 'integrated'
# Flag: --gpu_type
# Supports: Linux
#
# Example:
# all:
# GPU1: AMD HD 7950
# GPU2: Intel Integrated Graphics
#
# dedicated:
# GPU1: AMD HD 7950
#
# integrated:
# GPU1: Intel Integrated Graphics
gpu_type="all"
# Resolution
# Display refresh rate next to each monitor
# Default: 'off'
# Values: 'on', 'off'
# Flag: --refresh_rate
# Supports: Doesn't work on Windows.
#
# Example:
# on: '1920x1080 @ 60Hz'
# off: '1920x1080'
refresh_rate="off"
# Gtk Theme / Icons / Font
# Shorten output of GTK Theme / Icons / Font
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --gtk_shorthand
#
# Example:
# on: 'Numix, Adwaita'
# off: 'Numix [GTK2], Adwaita [GTK3]'
gtk_shorthand="off"
# Enable/Disable gtk2 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk2
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Adwaita [GTK3]'
gtk2="on"
# Enable/Disable gtk3 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk3
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Numix [GTK2]'
gtk3="on"
# IP Address
# Website to ping for the public IP
#
# Default: 'http://ident.me'
# Values: 'url'
# Flag: --ip_host
public_ip_host="http://ident.me"
# Public IP timeout.
#
# Default: '2'
# Values: 'int'
# Flag: --ip_timeout
public_ip_timeout=2
# Desktop Environment
# Show Desktop Environment version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --de_version
de_version="on"
# Disk
# Which disks to display.
# The values can be any /dev/sdXX, mount point or directory.
# NOTE: By default we only show the disk info for '/'.
#
# Default: '/'
# Values: '/', '/dev/sdXX', '/path/to/drive'.
# Flag: --disk_show
#
# Example:
# disk_show=('/' '/dev/sdb1'):
# 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
#
# disk_show=('/'):
# 'Disk (/): 74G / 118G (66%)'
#
disk_show=('/')
# Disk subtitle.
# What to append to the Disk subtitle.
#
# Default: 'mount'
# Values: 'mount', 'name', 'dir', 'none'
# Flag: --disk_subtitle
#
# Example:
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
#
# mount: 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
#
# dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)'
#
# none: 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
disk_subtitle="mount"
# Disk percent.
# Show/Hide disk percent.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --disk_percent
#
# Example:
# on: 'Disk (/): 74G / 118G (66%)'
# off: 'Disk (/): 74G / 118G'
disk_percent="on"
# Song
# Manually specify a music player.
#
# Default: 'auto'
# Values: 'auto', 'player-name'
# Flag: --music_player
#
# Available values for 'player-name':
#
# amarok
# audacious
# banshee
# bluemindo
# clementine
# cmus
# deadbeef
# deepin-music
# dragon
# elisa
# exaile
# gnome-music
# gmusicbrowser
# gogglesmm
# guayadeque
# io.elementary.music
# iTunes
# juk
# lollypop
# mocp
# mopidy
# mpd
# muine
# netease-cloud-music
# olivia
# playerctl
# pogo
# pragha
# qmmp
# quodlibet
# rhythmbox
# sayonara
# smplayer
# spotify
# strawberry
# tauonmb
# tomahawk
# vlc
# xmms2d
# xnoise
# yarock
music_player="auto"
# Format to display song information.
#
# Default: '%artist% - %album% - %title%'
# Values: '%artist%', '%album%', '%title%'
# Flag: --song_format
#
# Example:
# default: 'Song: Jet - Get Born - Sgt Major'
song_format="%artist% - %album% - %title%"
# Print the Artist, Album and Title on separate lines
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --song_shorthand
#
# Example:
# on: 'Artist: The Fratellis'
# 'Album: Costello Music'
# 'Song: Chelsea Dagger'
#
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
song_shorthand="off"
# 'mpc' arguments (specify a host, password etc).
#
# Default: ''
# Example: mpc_args=(-h HOST -P PASSWORD)
mpc_args=()
# Text Colors
# Text Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --colors
#
# Each number represents a different part of the text in
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
#
# Example:
# colors=(distro) - Text is colored based on Distro colors.
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
colors=(distro)
# Text Options
# Toggle bold text
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bold
bold="on"
# Enable/Disable Underline
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --underline
underline_enabled="on"
# Underline character
#
# Default: '-'
# Values: 'string'
# Flag: --underline_char
underline_char="-"
# Info Separator
# Replace the default separator with the specified string.
#
# Default: ':'
# Flag: --separator
#
# Example:
# separator="->": 'Shell-> bash'
# separator=" =": 'WM = dwm'
separator=":"
# Color Blocks
# Color block range
# The range of colors to print.
#
# Default: '0', '15'
# Values: 'num'
# Flag: --block_range
#
# Example:
#
# Display colors 0-7 in the blocks. (8 colors)
# neofetch --block_range 0 7
#
# Display colors 0-15 in the blocks. (16 colors)
# neofetch --block_range 0 15
block_range=(0 15)
# Toggle color blocks
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --color_blocks
color_blocks="on"
# Color block width in spaces
#
# Default: '3'
# Values: 'num'
# Flag: --block_width
block_width=3
# Color block height in lines
#
# Default: '1'
# Values: 'num'
# Flag: --block_height
block_height=1
# Color Alignment
#
# Default: 'auto'
# Values: 'auto', 'num'
# Flag: --col_offset
#
# Number specifies how far from the left side of the terminal (in spaces) to
# begin printing the columns, in case you want to e.g. center them under your
# text.
# Example:
# col_offset="auto" - Default behavior of neofetch
# col_offset=7 - Leave 7 spaces then print the colors
col_offset="auto"
# Progress Bars
# Bar characters
#
# Default: '-', '='
# Values: 'string', 'string'
# Flag: --bar_char
#
# Example:
# neofetch --bar_char 'elapsed' 'total'
# neofetch --bar_char '-' '='
bar_char_elapsed="-"
bar_char_total="="
# Toggle Bar border
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bar_border
bar_border="on"
# Progress bar length in spaces
# Number of chars long to make the progress bars.
#
# Default: '15'
# Values: 'num'
# Flag: --bar_length
bar_length=15
# Progress bar colors
# When set to distro, uses your distro's logo colors.
#
# Default: 'distro', 'distro'
# Values: 'distro', 'num'
# Flag: --bar_colors
#
# Example:
# neofetch --bar_colors 3 4
# neofetch --bar_colors distro 5
bar_color_elapsed="distro"
bar_color_total="distro"
# Info display
# Display a bar with the info.
#
# Default: 'off'
# Values: 'bar', 'infobar', 'barinfo', 'off'
# Flags: --cpu_display
# --memory_display
# --battery_display
# --disk_display
#
# Example:
# bar: '[---=======]'
# infobar: 'info [---=======]'
# barinfo: '[---=======] info'
# off: 'info'
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
# Backend Settings
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend
image_backend="ascii"
# Image Source
#
# Which image or ascii file to display.
#
# Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
# Flag: --source
#
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
# In ascii mode, distro ascii art will be used and in an image mode, your
# wallpaper will be used.
image_source="auto"
# Ascii Options
# Ascii distro
# Which distro's ascii art to display.
#
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
# and IRIX have ascii logos
# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
# Use '{distro name}_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
# postmarketOS, and Void have a smaller logo variant.
# Use '{distro name}_small' to use the small variants.
ascii_distro="auto"
# Ascii Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
#
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
# Image Options
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --loop
image_loop="off"
# Thumbnail directory
#
# Default: '~/.cache/thumbnails/neofetch'
# Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
# Crop mode
#
# Default: 'normal'
# Values: 'normal', 'fit', 'fill'
# Flag: --crop_mode
#
# See this wiki page to learn about the fit and fill options.
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
crop_mode="normal"
# Crop offset
# Note: Only affects 'normal' crop mode.
#
# Default: 'center'
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
# 'east', 'southwest', 'south', 'southeast'
# Flag: --crop_offset
crop_offset="center"
# Image size
# The image is half the terminal width by default.
#
# Default: 'auto'
# Values: 'auto', '00px', '00%', 'none'
# Flags: --image_size
# --size
image_size="auto"
# Gap between image and text
#
# Default: '3'
# Values: 'num', '-num'
# Flag: --gap
gap=3
# Image offsets
# Only works with the w3m backend.
#
# Default: '0'
# Values: 'px'
# Flags: --xoffset
# --yoffset
yoffset=0
xoffset=0
# Image background color
# Only works with the w3m backend.
#
# Default: ''
# Values: 'color', 'blue'
# Flag: --bg_color
background_color=
# Misc Options
# Stdout mode
# Turn off all colors and disables image backend (ASCII/Image).
# Useful for piping into another command.
# Default: 'off'
# Values: 'on', 'off'
stdout="off"

1
config/nvim Submodule

Submodule config/nvim added at 9e22e24124

View File

@@ -1,732 +0,0 @@
-- Install packer
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
local is_bootstrap = false
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
is_bootstrap = true
vim.fn.system {
'git', 'clone', '--depth', '1',
'https://github.com/wbthomason/packer.nvim',
install_path
}
vim.cmd [[packadd packer.nvim]]
end
require('packer').startup(function(use)
-- Package manager
use 'wbthomason/packer.nvim'
use { -- LSP Configuration & Plugins
'neovim/nvim-lspconfig',
requires = {
-- Automatically install LSPs to stdpath for neovim
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
-- Useful status updates for LSP
'j-hui/fidget.nvim',
},
}
use { -- Autocompletion
'hrsh7th/nvim-cmp',
requires = {
'hrsh7th/cmp-nvim-lsp',
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
},
}
use { -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
run = function()
pcall(require('nvim-treesitter.install').update { with_sync = true })
end,
}
use { -- Additional text objects via treesitter
'nvim-treesitter/nvim-treesitter-textobjects',
after = 'nvim-treesitter',
}
-- Git related plugins
use 'tpope/vim-fugitive'
use 'tpope/vim-rhubarb'
use 'lewis6991/gitsigns.nvim'
-- Theme based off the Material Pale Night
use 'drewtempelmeyer/palenight.vim'
-- Fancier statusline
use 'nvim-lualine/lualine.nvim'
-- Add indentation guides even on blank lines.
use 'lukas-reineke/indent-blankline.nvim'
-- "gc" to comment visual regions/lines
use 'numToStr/Comment.nvim'
-- Detect tabstop and shiftwidth automatically.
use 'tpope/vim-sleuth'
-- Fuzzy Finder (files, lsp, etc)
use { 'nvim-telescope/telescope.nvim',
branch = '0.1.x', requires = { 'nvim-lua/plenary.nvim' } }
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available
use { 'nvim-telescope/telescope-fzf-native.nvim',
run = 'make', cond = vim.fn.executable 'make' == 1 }
-- Add custom plugins to packer from
-- ~/.config/nvim/lua/custom/plugins.lua
local has_plugins, plugins = pcall(require, 'custom.plugins')
if has_plugins then
plugins(use)
end
if is_bootstrap then
require('packer').sync()
end
end)
-- When we are bootstrapping a configuration, it doesn't
-- make sense to execute the rest of the init.lua.
--
-- You'll need to restart nvim, and then it will work.
if is_bootstrap then
print '=================================='
print ' Plugins are being installed'
print ' Wait until Packer completes,'
print ' then restart nvim'
print '=================================='
return
end
-- Automatically source and re-compile packer
-- whenever you save this init.lua, or packages.lua
local packer_group = vim.api.nvim_create_augroup('Packer', { clear = true })
vim.api.nvim_create_autocmd('BufWritePost', {
command = 'source <afile> | PackerCompile',
group = packer_group,
pattern = { vim.fn.expand '$MYVIMRC' },
})
-- Automatically run PackerSync for plugins.lua files.
vim.api.nvim_create_autocmd('BufWritePost', {
command = 'source <afile> | PackerSync | PackerCompile',
group = packer_group,
pattern = { '~/.dotfiles/config/nvim/**/plugins.lua' },
})
-- [[ Setting options ]]
-- See `:help vim.o`
-- Set highlight on search
vim.o.hlsearch = false
-- Make line numbers default, enabled relative line numbers
vim.wo.number = true
vim.opt.relativenumber = true
-- Enable mouse mode
vim.o.mouse = 'a'
-- Enable break indent
vim.o.breakindent = true
-- Save undo history
vim.o.undofile = true
-- Case insensitive searching UNLESS /C or capital in search
vim.o.ignorecase = true
vim.o.smartcase = true
-- Decrease update time
vim.o.updatetime = 250
vim.wo.signcolumn = 'yes'
-- Set colorscheme
vim.o.termguicolors = true
vim.cmd.colorscheme('palenight')
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
-- Configure and disable providers.
vim.g.python3_host_prog = '/opt/homebrew/bin/python3'
vim.g.loaded_ruby_provider = 0
-- Setup winbar
-- See :h statusline
vim.o.winbar = '%=%m %f'
-- [[ Basic Keymaps ]]
-- Set <space> as the leader key
-- See `:help mapleader`
-- NOTE: Must happen before plugins are required
-- (otherwise wrong leader will be used)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- Misc options.
vim.o.incsearch = true
-- Keymap settings, etc.
-- ~/.config/nvim/lua/custom/keymaps.lua
local map = vim.api.nvim_set_keymap
local default_options_table = {
expr = true,
silent = true,
noremap = true,
}
-- normal mode keymap setter
---@param keys string Trigger keys
---@param func string Function or command to run
---@param opts table Optional table of vim.keymap.set options.
---@param desc string Optional description
local nmap = function(keys, func, opts, desc)
if desc then
desc = 'keymaps.nmap: ' .. desc
end
local options = default_options_table
-- If we have options, merge them to the local options table
if opts then
for k, v in pairs(opts) do
options[k] = v
end
end
vim.keymap.set('n', keys, func, options)
end
-- visual mode keymap setter
---@param keys string Trigger keys
---@param func string Function or command to run
---@param opts table Optional table of vim.keymap.set options.
---@param desc string Optional description
local vmap = function(keys, func, opts, desc)
if desc then
desc = 'keymaps.vmap: ' .. desc
end
local options = default_options_table
-- If we have options, merge them to the local options table
if opts then
for k, v in pairs(opts) do
options[k] = v
end
end
vim.keymap.set('v', keys, func, options)
end
-- Format document
nmap("<leader>D", ":Format")
-- Deal with word wrap
nmap('k', "v:count == 0 ? 'gk' : 'k'")
nmap('j', "v:count == 0 ? 'gj' : 'j'")
-- Diagnostic keymaps
nmap('dz', vim.diagnostic.goto_prev)
nmap('dx', vim.diagnostic.goto_next)
nmap('<leader>e', vim.diagnostic.open_float)
nmap('<leader>q', vim.diagnostic.setloclist)
--
-- ThePrimeagen/refactoring.nvim
-- https://github.com/ThePrimeagen/refactoring.nvim
--
-- Remaps for the refactoring operations currently offered by the plugin
local rf = { noremap = true, silent = true, expr = false }
vmap("<leader>re", [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Function')<CR>]], rf)
vmap("<leader>rf", [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Function To File')<CR>]], rf)
vmap("<leader>rv", [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Variable')<CR>]], rf)
vmap("<leader>ri", [[ <Esc><Cmd>lua require('refactoring').refactor('Inline Variable')<CR>]], rf)
-- Extract block doesn't need visual mode
nmap("<leader>rb", [[ <Cmd>lua require('refactoring').refactor('Extract Block')<CR>]], rf)
nmap("<leader>rbf", [[ <Cmd>lua require('refactoring').refactor('Extract Block To File')<CR>]], rf)
-- Inline variable can also pick up the identifier currently under the cursor without visual mode
nmap("<leader>ri", [[ <Cmd>lua require('refactoring').refactor('Inline Variable')<CR>]], rf)
-- prompt for a refactor to apply when the remap is triggered
vmap("<leader>rr", ":lua require('refactoring').select_refactor()<CR>", rf)
--
--
--
-- barbar keymaps
local barbar_opts = { noremap = true, silent = true }
-- Move to previous/next
map('n', '<C-,>', '<Cmd>BufferPrevious<CR>', barbar_opts)
map('n', '<C-.>', '<Cmd>BufferNext<CR>', barbar_opts)
-- Re-order to previous/next
map('n', '<C-<>', '<Cmd>BufferMovePrevious<CR>', barbar_opts)
map('n', '<C->>', '<Cmd>BufferMoveNext<CR>', barbar_opts)
-- Goto buffer in position...
map('n', '<leader>b1', '<Cmd>BufferGoto 1<CR>', barbar_opts)
map('n', '<leader>b2', '<Cmd>BufferGoto 2<CR>', barbar_opts)
map('n', '<leader>b3', '<Cmd>BufferGoto 3<CR>', barbar_opts)
map('n', '<leader>b4', '<Cmd>BufferGoto 4<CR>', barbar_opts)
map('n', '<leader>b5', '<Cmd>BufferGoto 5<CR>', barbar_opts)
map('n', '<leader>b6', '<Cmd>BufferGoto 6<CR>', barbar_opts)
map('n', '<leader>b7', '<Cmd>BufferGoto 7<CR>', barbar_opts)
map('n', '<leader>b8', '<Cmd>BufferGoto 8<CR>', barbar_opts)
map('n', '<leader>b9', '<Cmd>BufferGoto 9<CR>', barbar_opts)
map('n', '<leader>b0', '<Cmd>BufferLast<CR>', barbar_opts)
-- Pin/unpin buffer
map('n', '<A-p>', '<Cmd>BufferPin<CR>', barbar_opts)
-- Close buffer
map('n', '<A-c>', '<Cmd>BufferClose<CR>', barbar_opts)
-- Wipeout buffer
-- :BufferWipeout
-- Close commands
-- :BufferCloseAllButCurrent
-- :BufferCloseAllButPinned
-- :BufferCloseAllButCurrentOrPinned
-- :BufferCloseBuffersLeft
-- :BufferCloseBuffersRight
-- Magic buffer-picking mode
map('n', '<C-p>', '<Cmd>BufferPick<CR>', barbar_opts)
-- Sort automatically by...
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', barbar_opts)
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', barbar_opts)
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', barbar_opts)
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', barbar_opts)
-- Other:
-- :BarbarEnable - enables barbar (enabled by default)
-- :BarbarDisable - very bad command, should never be used
local highlight_group = vim.api.nvim_create_augroup(
'YankHighlight', { clear = true }
)
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = '*',
})
-- Set lualine as statusline
-- See `:help lualine.txt`
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = '|',
section_separators = '',
},
}
-- Enable Comment.nvim
require('Comment').setup()
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt`
require('indent_blankline').setup {
-- char = '┊',
show_trailing_blankline_indent = true,
space_char_blankline = " ",
show_current_context = true,
show_current_context_start = true,
}
-- Gitsigns
-- See `:help gitsigns.txt`
require('gitsigns').setup {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
}
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require('telescope').setup {
defaults = {
mappings = {
i = {
['<C-u>'] = false,
['<C-d>'] = false,
},
},
},
}
-- Enable telescope fzf native, if installed
pcall(require('telescope').load_extension, 'fzf')
local ks = vim.keymap.set
local tl = require('telescope.builtin')
-- See `:help telescope.builtin`
ks('n', '<leader>?', tl.oldfiles, { desc = '[?] Find recently opened files' })
ks('n', '<leader><space>', tl.buffers, { desc = '[ ] Find existing buffers' })
ks('n', '<leader>/', function()
-- You can pass additional configuration to telescope to
-- change theme, layout, etc.
tl.current_buffer_fuzzy_find(
require('telescope.themes').get_dropdown {
winblend = 10,
previewer = false,
})
end, { desc = '[/] Fuzzily search in current buffer]' })
ks('n', '<leader>sf', tl.find_files, { desc = '[S]earch [F]iles' })
ks('n', '<leader>sh', tl.help_tags, { desc = '[S]earch [H]elp' })
ks('n', '<leader>sw', tl.grep_string, { desc = '[S]earch current [W]ord' })
ks('n', '<leader>sg', tl.live_grep, { desc = '[S]earch by [G]rep' })
ks('n', '<leader>sd', tl.diagnostics, { desc = '[S]earch [D]iagnostics' })
-- Add harpoon to telescope
require("telescope").load_extension('harpoon')
-- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter`
require('nvim-treesitter.configs').setup {
-- Add languages to be installed here that you want
-- installed for treesitter
ensure_installed = {
'bash',
'c', 'comment', 'cpp',
'diff', 'dockerfile',
'gitattributes', 'gitignore', 'go',
'html', 'http',
'javascript', 'jq', 'jsdoc', 'json',
'lua',
'markdown',
'org',
'php', 'phpdoc', 'python',
'regex', 'rust',
'scss', 'sql',
'typescript',
'vim', 'vue',
'yaml',
'help',
},
highlight = {
enable = true,
-- Required for spellcheck, some LaTex highlights and
-- code block highlights that do not have ts grammar
additional_vim_regex_highlighting = { 'org' },
},
indent = { enable = true, disable = { 'python' } },
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<c-space>',
node_incremental = '<c-space>',
scope_incremental = '<c-s>',
node_decremental = '<c-backspace>',
},
},
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
['aa'] = '@parameter.outer',
['ia'] = '@parameter.inner',
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
},
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
[']m'] = '@function.outer',
[']]'] = '@class.outer',
},
goto_next_end = {
[']M'] = '@function.outer',
[']['] = '@class.outer',
},
goto_previous_start = {
['[m'] = '@function.outer',
['[['] = '@class.outer',
},
goto_previous_end = {
['[M'] = '@function.outer',
['[]'] = '@class.outer',
},
},
swap = {
enable = true,
swap_next = {
['<leader>a'] = '@parameter.inner',
},
swap_previous = {
['<leader>A'] = '@parameter.inner',
},
},
},
}
-- Load custom treesitter grammar for org filetype
require('orgmode').setup_ts_grammar()
require('orgmode').setup({
org_agenda_files = {
vim.fn.expand '~/.local/share/_nvalt/**/*',
vim.fn.expand '~/.dotfiles/local/org/**/*'
},
org_default_notes_file = vim.fn.expand '~/.local/share/_nvalt/refile.org',
})
-- LSP settings.
-- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(_, bufnr)
-- NOTE: Remember that lua is a real programming language,
-- and as such it is possible to define small helper and
-- utility functions so you don't have to repeat yourself
-- many times.
--
-- In this case, we create a function that lets us more
-- easily define mappings specific for LSP related items.
-- It sets the mode, buffer and description for us each time.
local nm = function(keys, func, desc)
if desc then
desc = 'LSP: ' .. desc
end
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
end
local t = require('telescope.builtin')
local vbuf = vim.lsp.buf
nm('<leader>rn', vbuf.rename, '[R]e[n]ame')
nm('<leader>ca', vbuf.code_action, '[C]ode [A]ction')
nm('gd', vbuf.definition, '[G]oto [D]efinition')
nm('gr', t.lsp_references, '[G]oto [R]eferences')
nm('gI', vbuf.implementation, '[G]oto [I]mplementation')
nm('<leader>D', vbuf.type_definition, 'Type [D]efinition')
nm('<leader>ds', t.lsp_document_symbols, '[D]ocument [S]ymbols')
nm('<leader>ws', t.lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
-- See `:help K` for why this keymap
nm('K', vbuf.hover, 'Hover Documentation')
nm('<C-k>', vbuf.signature_help, 'Signature Documentation')
-- Lesser used LSP functionality
nm('gD', vbuf.declaration, '[G]oto [D]eclaration')
nm('<leader>wa', vbuf.add_workspace_folder, '[W]orkspace [A]dd Folder')
nm('<leader>wr', vbuf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
nm('<leader>wl', function()
print(vim.inspect(vbuf.list_workspace_folders()))
end, '[W]orkspace [L]ist Folders')
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
if vim.lsp.buf.format then
vim.lsp.buf.format()
elseif vim.lsp.buf.formatting then
vim.lsp.buf.formatting()
end
end, { desc = 'Format current buffer with LSP' })
end
-- Setup mason so it can manage external tooling
require('mason').setup()
require("null-ls").setup()
-- Enable the following language servers.
-- Feel free to add/remove any LSPs that you want here.
-- They will automatically be installed.
-- https://github.com/williamboman/mason-lspconfig.nvim#available-lsp-servers
local servers = {
-- a
'angularls',
'ansiblels',
-- b
'bashls',
-- c
'clangd',
'cssls',
-- d
'dockerls',
-- e
'eslint',
'emmet_ls',
-- f
-- g
'gopls',
'graphql',
-- h
'html',
-- i
-- j
'quick_lint_js', -- js
'jsonls',
-- k
-- l
'sumneko_lua', -- lua
-- m
'marksman', -- markdown
-- n
-- o
-- p
'intelephense', 'phpactor', 'psalm',
'pyright',
-- q
-- r
'rust_analyzer',
-- s
'sqlls',
'stylelint_lsp',
-- t
'tailwindcss',
'terraformls',
'tflint',
'tsserver',
-- u
-- v / w
'volar', -- vue
'vuels', -- vue
-- x / y / z
'lemminx', -- xml
'yamlls', -- yaml
}
-- Ensure the servers above are installed
require('mason-lspconfig').setup {
ensure_installed = servers,
}
require("mason-lspconfig").setup_handlers {
-- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
function(server_name)
-- default handler (optional)
require("lspconfig")[server_name].setup {}
end,
}
-- nvim-cmp supports additional completion capabilities
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
for _, lsp in ipairs(servers) do
require('lspconfig')[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
}
end
-- Turn on lsp status information
require('fidget').setup()
-- Example custom configuration for lua.
-- Make runtime files discoverable to the server
local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, 'lua/?.lua')
table.insert(runtime_path, 'lua/?/init.lua')
require('lspconfig').sumneko_lua.setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're
-- using (most likely LuaJIT)
version = 'LuaJIT',
-- Setup your lua path
path = runtime_path,
},
diagnostics = {
globals = { 'vim' },
},
workspace = {
library = vim.api.nvim_get_runtime_file('', true),
checkThirdParty = false,
},
-- Do not send telemetry data containing a randomized
-- but unique identifier
telemetry = { enable = false },
},
},
}
-- nvim-cmp setup
local cmp = require 'cmp'
local luasnip = require 'luasnip'
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert {
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
},
}
vim.api.nvim_create_autocmd("BufWritePost",
{ pattern = "plugins.lua", command = "source <afile> | PackerSync" })
vim.api.nvim_create_autocmd("BufRead",
{ pattern = "*/node_modules/*", command = "lua vim.diagnostic.disable(0)" })
vim.api.nvim_create_autocmd("BufNewFile",
{ pattern = "*/node_modules/*", command = "lua vim.diagnostic.disable(0)" })
-- Enable spell checking for certain file types
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" },
{ pattern = { "*.txt", "*.md", "*.tex" },
command = "setlocal spell" })
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -1,210 +0,0 @@
return function(use)
-- 💥 Create key bindings that stick.
-- WhichKey is a lua plugin that displays a popup with
-- possible keybindings of the command you started typing.
-- https://github.com/folke/which-key.nvim
use({
"folke/which-key.nvim",
config = function()
require("which-key").setup({})
end
})
-- 🍨 Soothing pastel theme for (Neo)vim
-- https://github.com/catppuccin/nvim
-- use { "catppuccin/nvim", as = "catppuccin" }
-- vim.cmd.colorscheme('catppuccin-latte')
-- markdown preview plugin for (neo)vim
-- https://github.com/iamcco/markdown-preview.nvim
use({
"iamcco/markdown-preview.nvim",
run = function()
vim.fn["mkdp#util#install"]()
end,
})
-- The neovim tabline plugin.
-- https://github.com/romgrk/barbar.nvim
use 'nvim-tree/nvim-web-devicons'
use { 'romgrk/barbar.nvim', wants = 'nvim-web-devicons' }
--
-- Pretty UI
--
-- Neovim plugin to improve the default vim.ui interfaces
use 'stevearc/dressing.nvim'
-- A fancy, configurable, notification manager for NeoVim
use 'rcarriga/nvim-notify'
-- Non-intrusive notification system for neovim
use 'vigoux/notifier.nvim'
-- ✅ Highlight, list and search todo comments in your projects
use {
'folke/todo-comments.nvim',
requires = 'nvim-lua/plenary.nvim',
config = function()
require('todo-comments').setup {}
end,
}
-- The Refactoring library based off the Refactoring book by Martin Fowler
-- https://github.com/ThePrimeagen/refactoring.nvim
use {
"ThePrimeagen/refactoring.nvim",
requires = {
{ "nvim-lua/plenary.nvim" },
{ "nvim-treesitter/nvim-treesitter" }
}
}
-- harpoon, by ThePrimeagen
-- https://github.com/ThePrimeagen/harpoon
use {
"ThePrimeagen/harpoon",
requires = { { "nvim-lua/plenary.nvim" } }
}
-- An asynchronous linter plugin for Neovim complementary to
-- the built-in Language Server Protocol support.
-- https://github.com/mfussenegger/nvim-lint
use 'mfussenegger/nvim-lint'
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()
end,
})
-- nvim orgmode, to get me use nvim even more.
use({
"nvim-orgmode/orgmode",
config = function()
require('orgmode').setup_ts_grammar()
end,
})
-- Markdown support
use 'preservim/vim-markdown'
use 'godlygeek/tabular'
-- obsidian plugin for nvim
-- https://github.com/epwalsh/obsidian.nvim
use({
"epwalsh/obsidian.nvim",
config = function()
require("obsidian").setup({
dir = '~/.local/share/_nvalt',
notes_subdir = "notes",
daily_notes = {
folder = "_daily"
},
completion = {
nvim_cmp = true, -- if using nvim-cmp, otherwise set to false
}
})
end
})
-- Creates missing folders on save
-- https://github.com/jghauser/mkdir.nvim
use { 'jghauser/mkdir.nvim' }
-- Neovim plugin for dimming the highlights of unused
-- functions, variables, parameters, and more
-- https://github.com/zbirenbaum/neodim
use {
"zbirenbaum/neodim",
event = "LspAttach",
config = function()
require("neodim").setup({
alpha = 0.75,
blend_color = "#000000",
update_in_insert = {
enable = true,
delay = 100,
},
hide = {
virtual_text = true,
signs = true,
underline = true,
}
})
end
}
-- EditorConfig plugin for Neovim
-- https://github.com/gpanders/editorconfig.nvim
use { 'gpanders/editorconfig.nvim' }
-- Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
-- https://github.com/jose-elias-alvarez/null-ls.nvim
use {
"jose-elias-alvarez/null-ls.nvim",
config = function()
local n = require("null-ls")
local b = n.builtins
require("null-ls").setup({
b.code_actions.eslint,
b.code_actions.shellcheck,
b.code_actions.xo,
b.completion.luasnip,
b.completion.spell,
b.diagnostics.actionlint,
b.diagnostics.alex,
b.diagnostics.ansiblelint,
b.diagnostics.codespell,
b.diagnostics.dotenv_linter,
b.diagnostics.editorconfig_checker,
b.diagnostics.eslint,
b.diagnostics.hadolint,
b.diagnostics.jsonlint,
b.diagnostics.luacheck,
b.diagnostics.markdownlint,
b.diagnostics.php,
b.diagnostics.phpcs,
b.diagnostics.phpstan,
b.diagnostics.psalm,
b.diagnostics.shellcheck,
b.diagnostics.spectral,
b.diagnostics.stylelint,
b.diagnostics.todo_comments,
b.diagnostics.trail_space,
b.diagnostics.xo,
b.diagnostics.yamllint,
b.formatting.blade_formatter,
b.formatting.eslint,
b.formatting.fixjson,
b.formatting.lua_format,
b.formatting.markdownlint,
b.formatting.prettier,
b.formatting.shfmt,
b.formatting.stylelint,
-- b.formatting.stylua,
b.formatting.terraform_fmt,
b.formatting.trim_whitespace,
b.formatting.yamlfmt,
})
end,
requires = { "nvim-lua/plenary.nvim" }
}
-- mason-null-ls bridges mason.nvim with the null-ls plugin
-- - making it easier to use both plugins together.
-- https://github.com/jay-babu/mason-null-ls.nvim
use {
"jayp0521/mason-null-ls.nvim",
config = function()
require("mason-null-ls").setup({
ensure_installed = nil,
automatic_installation = true,
automatic_setup = false,
})
end,
requires = { "jose-elias-alvarez/null-ls.nvim" }
}
-- WakaTime Support
use { "wakatime/vim-wakatime" }
end

View File

@@ -1 +0,0 @@
packer_compiled.lua

View File

@@ -0,0 +1,10 @@
blade-formatter
corepack
editorconfig-checker
github-release-notes
neovim
prettier
standardjs
stylelint-lsp
tldr

37
config/starship.toml Normal file
View File

@@ -0,0 +1,37 @@
# 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
# Timeout for commands executed by starship (in milliseconds).
command_timeout = 1000
# 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}'

View File

@@ -2,44 +2,81 @@
#
# Contains configuration from the follwing sources:
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
# -
# - https://github.com/dreamsofcode-io/tmux/blob/main/tmux.conf
# unbind default prefix and set it to ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
set-option -sa terminal-overrides ",xterm*:Tc"
# make delay shorter
# Mouse support
set -g mouse on
# Make delay shorter
set -sg escape-time 0
# Set <prefix> to Control + Space
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
#### 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)
# Vim style pane selection
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
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
# Reload tmux config with <prefix> + r
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux cfg reloaded!"
# Open a new window with <prefix> + N
bind N new-window
# Plugins related configurations
## https://github.com/catppuccin/tmux
set -g @catppuccin_flavour 'mocha' # latte/frappe/macchiato/mocha
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# synchronize all panes in a window
bind y setw synchronize-panes
#### copy mode : vim ####
# set vi mode for copy mode
setw -g mode-keys vi
# copy mode using 'Esc'
unbind [
bind Escape copy-mode
@@ -51,3 +88,6 @@ bind Escape copy-mode
unbind p
bind p paste-buffer
# Finally run the tmux plugin manager
run '~/.config/tmux/plugins/tpm/tpm'

View File

@@ -177,4 +177,4 @@ wtf:
left: 1
height: 1
width: 3
refreshInterval: 3600
refreshInterval: 3600

32
config/yamllint/config Normal file
View File

@@ -0,0 +1,32 @@
---
extends: default
ignore-from-file: [.gitignore, .yamlignore]
rules:
braces:
level: warning
max-spaces-inside: 1
brackets:
level: warning
max-spaces-inside: 1
colons:
level: warning
commas:
level: warning
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
level: warning
hyphens:
level: warning
indentation:
level: warning
indent-sequences: consistent
line-length:
level: warning
allow-non-breakable-inline-mappings: true
max: 120
truthy: disable

1
dotbot Submodule

Submodule dotbot added at 328bcb3259

1
dotbot-brew Submodule

Submodule dotbot-brew added at 98e346360b

1
dotbot-include Submodule

Submodule dotbot-include added at 88e6471cd6

View File

@@ -1,66 +0,0 @@
[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 = master
[pull]
rebase = false
[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

View File

@@ -1,3 +1,3 @@
# .dotfiles/host-air
# .dotfiles/hosts/air
This is my home computer.

0
hosts/air/base/.gitkeep Normal file
View File

View File

View File

@@ -0,0 +1,15 @@
- include: 'hosts/defaults.yaml'
- shell:
- echo "Configuring air"
- brewfile:
- Brewfile
- link:
~/:
force: true
glob: true
path: hosts/air/base/**
prefix: "."
~/.config/:
glob: true
force: true
path: hosts/air/config/**

9
hosts/defaults.yaml Normal file
View File

@@ -0,0 +1,9 @@
- defaults:
create:
mode: 0755
link:
create: true
relink: true
exclude: ["*.md", "*renovate*"]
shell:
stdout: true

View File

50
hosts/lakka/base/zshrc Normal file
View File

@@ -0,0 +1,50 @@
# Lakka zsh configuration.
#
# shellcheck shell=bash
export PATH="$HOME/bin:/usr/local/bin:/usr/bin:/usr/sbin:$PATH"
# Defaults
export DOTFILES="$HOME/.dotfiles"
# 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
export PATH="$XDG_BIN_HOME:$PATH"
export LC_ALL=fi_FI.utf8
export RVM_PATH="$HOME/.rvm"
export PATH="$RVM_PATH/bin:$PATH"
[[ -s "$RVM_PATH/scripts/rvm" ]] && source "$RVM_PATH/scripts/rvm" # Load RVM into a shell session *as a function*
# Try to load antigen, if present
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
# If antigen was loaded
if command -v antigen &> /dev/null; then
antigen use oh-my-zsh
# config/functions
x-default-antigen-bundles
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
antigen apply
fi
alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
alias nano='nano -wS -$'
alias gpg=gpg2
ACME_PATH="$HOME/.acme.sh"
[[ -s "$ACME_PATH/acme.sh.env" ]] && . "$ACME_PATH/acme.sh.env"

View File

View File

@@ -0,0 +1,17 @@
- include: 'hosts/defaults.yaml'
- shell:
- echo "Configuring lakka"
- link:
~/:
force: true
glob: true
path: hosts/lakka/base/**
prefix: "."
~/.config/:
glob: true
force: true
path: hosts/lakka/config/**
~/.irssi/:
glob: true
force: true
path: hosts/lakka/irssi/**

243
hosts/lakka/irssi/config Normal file
View 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"; };
};
};
};
};

View 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";
};

View File

View File

View File

@@ -0,0 +1,13 @@
- include: 'hosts/defaults.yaml'
- shell:
- echo "Configuring tunkki"
- link:
~/:
force: true
glob: true
path: hosts/tunkki/base/**
prefix: "."
~/.config/:
glob: true
force: true
path: hosts/tunkki/config/**

0
hosts/v/.gitkeep Normal file
View File

View File

@@ -1,3 +1,3 @@
# .dotfiles/host-v
# .dotfiles/hosts/v
This is my work computer.

0
hosts/v/base/.gitkeep Normal file
View File

0
hosts/v/config/.gitkeep Normal file
View File

75
hosts/v/config/git/config Normal file
View 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

15
hosts/v/install.conf.yaml Normal file
View File

@@ -0,0 +1,15 @@
- include: 'hosts/defaults.yaml'
- shell:
- echo "Configuring v"
- brewfile:
- Brewfile
- link:
~/:
force: true
glob: true
path: hosts/v/base/**
prefix: "."
~/.config/:
glob: true
force: true
path: hosts/v/config/**

36
install Executable file
View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -e
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
DOTBOT_HOST="$(hostname -s)" || ''
cd "$BASEDIR"
git submodule sync --quiet --recursive
git submodule update --init --recursive
"${DOTBOT_BIN_PATH}" \
-d "${BASEDIR}" \
--plugin-dir=dotbot-brew \
--plugin-dir=dotbot-include \
-c "${CONFIG}" \
"${@}"
if [ "${DOTBOT_HOST}" != "" ]; then
DOTBOT_HOST_CONFIG="${BASEDIR}/hosts/${DOTBOT_HOST}/${CONFIG}"
echo "-> Trying if host config can be found: ${DOTBOT_HOST_CONFIG}"
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] \
&& echo "(!) Found $DOTBOT_HOST_CONFIG" \
&& "$DOTBOT_BIN_PATH" \
-d "$BASEDIR" \
--plugin-dir=dotbot-brew \
--plugin-dir=dotbot-include \
-c "$DOTBOT_HOST_CONFIG" \
"${@}"
fi

39
install.conf.yaml Normal file
View File

@@ -0,0 +1,39 @@
- include: "hosts/defaults.yaml"
- clean:
~/:
~/.config:
recursive: true
~/.local:
recursive: true
- create:
~/.cache:
~/.cache/git:
~/.config:
~/.config/cheat/cheatsheets/personal:
~/.local:
~/.local/run:
~/.local/share:
~/.local/state:
~/.ssh:
mode: 0700
~/Code:
- link:
~/:
force: true
glob: true
path: base/**
prefix: "."
~/.config/:
glob: true
path: config/**
~/.local/bin/:
glob: true
path: local/bin/**
~/.ssh/:
force: true
glob: true
mode: 0600
path: ssh/**
- shell:
- git submodule update --init --recursive --force
- bash local/bin/dfm install all

View File

@@ -25,9 +25,9 @@ Some problematic code has been fixed per `shellcheck` suggestions.
| `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://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1
- [mvdan/dotfiles](https://github.com/mvdan/dotfiles)
- [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)

View File

@@ -24,7 +24,7 @@ if [[ $ANTIGEN_CACHE != false ]]; then
for config in $ANTIGEN_CHECK_FILES; do
if [[ "$config" -nt "$config.zwc" ]]; then
# Flag configuration file as newer
{ zcompile "$config"; } &!
{ zcompile "$config" } &!
# Kill cache file in order to force full loading (see a few lines below)
[[ -f "$ANTIGEN_CACHE" ]] && rm -f "$ANTIGEN_CACHE"
fi
@@ -151,7 +151,7 @@ antigen () {
# String if record is found
-antigen-find-record () {
local bundle=$1
if [[ $# -eq 0 ]]; then
return 1
fi
@@ -255,7 +255,7 @@ antigen () {
return 0
}
# This function check ZSH_EVAL_CONTEXT to determine if running in interactive shell.
# This function check ZSH_EVAL_CONTEXT to determine if running in interactive shell.
#
# Usage
# -antigen-interactive-mode
@@ -283,7 +283,7 @@ antigen () {
# Branch name
-antigen-parse-branch () {
local url="$1" branch="$2" branches
local match mbegin mend MATCH MBEGIN MEND
if [[ "$branch" =~ '\*' ]]; then
@@ -466,7 +466,7 @@ antigen () {
# Compatibility with oh-my-zsh themes.
-antigen-set-default _ANTIGEN_THEME_COMPAT true
# Add default built-in extensions to load at start up
-antigen-set-default _ANTIGEN_BUILTIN_EXTENSIONS 'lock parallel defer cache'
@@ -555,7 +555,7 @@ antigen () {
if [[ $#list == 0 ]]; then
return 1
fi
# Using a for rather than `source $list` as we need to check for zsh-themes
# In order to create antigen-compat file. This is only needed for interactive-mode
# theme switching, for static loading (cache) there is no need.
@@ -643,7 +643,7 @@ antigen () {
shift
done
# Check if url is just the plugin name. Super short syntax.
if [[ "${args[url]}" != */* ]]; then
case "$ANTIGEN_DEFAULT_REPO_URL" in
@@ -728,13 +728,13 @@ antigen () {
# if it's local then path is just the "url" argument, loc remains the same
args[dir]=${args[url]}
fi
# Escape url and branch (may contain semver-like and pipe characters)
args[url]="${(qq)args[url]}"
if [[ -n "${args[branch]}" ]]; then
args[branch]="${(qq)args[branch]}"
fi
# Escape bundle name (may contain semver-like characters)
args[name]="${(qq)args[name]}"
@@ -821,7 +821,7 @@ antigen-bundle () {
printf "Seems %s is already installed!\n" ${bundle[name]}
return 1
fi
# Clone bundle if we haven't done do already.
if [[ ! -d "${bundle[dir]}" ]]; then
if ! -antigen-bundle-install ${(kv)bundle}; then
@@ -835,7 +835,7 @@ antigen-bundle () {
printf "Antigen: Failed to load %s.\n" ${bundle[btype]} >&2
return 1
fi
# Only add it to the record if it could be installed and loaded.
_ANTIGEN_BUNDLE_RECORD+=("$record")
}
@@ -1326,7 +1326,7 @@ antigen-update () {
local url=""
local make_local_clone=""
local start=$(date +'%s')
if [[ $# -eq 0 ]]; then
printf "Antigen: Missing argument.\n" >&2
return 1
@@ -1340,14 +1340,14 @@ antigen-update () {
url="$(echo "$record" | cut -d' ' -f1)"
make_local_clone=$(echo "$record" | cut -d' ' -f4)
local branch="master"
if [[ $url == *\|* ]]; then
branch="$(-antigen-parse-branch ${url%|*} ${url#*|})"
fi
printf "Updating %s... " $(-antigen-bundle-short-name "$url" "$branch")
if [[ $make_local_clone == "false" ]]; then
printf "Bundle has no local clone. Will not be updated.\n" >&2
return 1
@@ -1358,7 +1358,7 @@ antigen-update () {
printf "Error! Activate logging and try again.\n" >&2
return 1
fi
local took=$(( $(date +'%s') - $start ))
printf "Done. Took %ds.\n" $took
}
@@ -1410,7 +1410,7 @@ typeset -g _ANTIGEN_EXTENSIONS; _ANTIGEN_EXTENSIONS=()
# -antigen-add-hook antigen-apply antigen-apply-hook ["replace"|"pre"|"post"] ["once"|"repeat"]
antigen-add-hook () {
local target="$1" hook="$2" type="$3" mode="${4:-repeat}"
if (( ! $+functions[$target] )); then
printf "Antigen: Function %s doesn't exist.\n" $target
return 1
@@ -1428,7 +1428,7 @@ antigen-add-hook () {
fi
_ANTIGEN_HOOKS_META[$hook]="target $target type $type mode $mode called 0"
# Do shadow for this function if there is none already
local hook_function="${_ANTIGEN_HOOK_PREFIX}$target"
if (( ! $+functions[$hook_function] )); then
@@ -1441,7 +1441,7 @@ antigen-add-hook () {
return \$?
}"
fi
return 0
}
@@ -1454,7 +1454,7 @@ antigen-add-hook () {
typeset -a pre_hooks replace_hooks post_hooks;
typeset -a hooks; hooks=(${(s|:|)_ANTIGEN_HOOKS[$target]})
typeset -A meta;
for hook in $hooks; do
meta=(${(s: :)_ANTIGEN_HOOKS_META[$hook]})
@@ -1500,7 +1500,7 @@ antigen-add-hook () {
[[ $? == -1 ]] && WARN "$hook shortcircuited" && return $ret
fi
done
if [[ $replace_hook == 0 ]]; then
WARN "${_ANTIGEN_HOOK_PREFIX}$target $args"
noglob ${_ANTIGEN_HOOK_PREFIX}$target $args
@@ -1514,7 +1514,7 @@ antigen-add-hook () {
noglob $hook $args
[[ $? == -1 ]] && WARN "$hook shortcircuited" && return $ret
done
LOG "Return from hook ${target} with ${ret}"
return $ret
@@ -1533,7 +1533,7 @@ antigen-remove-hook () {
hooks[$hooks[(I)$hook]]=()
fi
_ANTIGEN_HOOKS[${target}]="${(j|:|)hooks}"
if [[ $#hooks == 0 ]]; then
# Destroy base hook
eval "function $(functions -- ${_ANTIGEN_HOOK_PREFIX}$target | sed s/${_ANTIGEN_HOOK_PREFIX}//)"
@@ -1554,7 +1554,7 @@ antigen-remove-hook () {
eval "function $(functions -- ${_ANTIGEN_HOOK_PREFIX}$target | sed s/${_ANTIGEN_HOOK_PREFIX}//)"
unfunction -- "${_ANTIGEN_HOOK_PREFIX}$target" 2> /dev/null
done
_ANTIGEN_HOOKS=()
_ANTIGEN_HOOKS_META=()
_ANTIGEN_EXTENSIONS=()
@@ -1570,14 +1570,14 @@ antigen-ext () {
eval $func
local ret=$?
WARN "$func return code was $ret"
if (( $ret == 0 )); then
if (( $ret == 0 )); then
LOG "LOADED EXTENSION $ext" EXT
-antigen-$ext-execute && _ANTIGEN_EXTENSIONS+=($ext)
else
WARN "IGNORING EXTENSION $func" EXT
return 1
fi
else
printf "Antigen: No extension defined or already loaded: %s\n" $func >&2
return 1
@@ -1617,7 +1617,7 @@ antigen-ext-init () {
return -1 # Stop right there
}
antigen-add-hook antigen-bundle antigen-bundle-defer replace
# Hooks antigen-apply in order to release hooked functions
antigen-apply-defer () {
WARN "Defer pre-apply" DEFER PRE-APPLY
@@ -1639,14 +1639,14 @@ antigen-ext-init () {
# Default lock path.
-antigen-set-default ANTIGEN_LOCK $ADOTDIR/.lock
typeset -g _ANTIGEN_LOCK_PROCESS=false
# Use env variable to determine if we should load this extension
-antigen-set-default ANTIGEN_MUTEX true
# Set ANTIGEN_MUTEX to false to avoid loading this extension
if [[ $ANTIGEN_MUTEX == true ]]; then
return 0;
fi
# Do not use mutex
return 1;
}
@@ -1714,7 +1714,7 @@ antigen-ext-init () {
else
WARN "Bundle ${bundle[name]} already cloned locally." PARALLEL
fi
repositories+=(${bundle[url]})
done
@@ -1734,7 +1734,7 @@ antigen-ext-init () {
for bundle in ${_PARALLEL_BUNDLE[@]}; do
antigen-bundle $bundle
done
WARN "Parallel install done" PARALLEL
}
@@ -1751,7 +1751,7 @@ antigen-ext-init () {
antigen-add-hook antigen-bundle antigen-bundle-parallel replace
}
antigen-add-hook antigen-apply antigen-apply-parallel pre once
antigen-apply-parallel-execute () {
WARN "Parallel replace-apply" PARALLEL REPLACE-APPLY
antigen-remove-hook antigen-bundle-parallel
@@ -1872,14 +1872,14 @@ EOC
# Cache auto config files to check for changes (.zshrc, .antigenrc etc)
-antigen-set-default ANTIGEN_AUTO_CONFIG true
# Default cache path.
-antigen-set-default ANTIGEN_CACHE $ADOTDIR/init.zsh
-antigen-set-default ANTIGEN_RSRC $ADOTDIR/.resources
if [[ $ANTIGEN_CACHE == false ]]; then
return 1
fi
return 0
}
@@ -1911,21 +1911,21 @@ EOC
antigen-remove-hook -antigen-load-source-cached
antigen-remove-hook antigen-bundle-cached
}
antigen-add-hook antigen-apply antigen-apply-cached post once
# Defer antigen-bundle.
antigen-bundle-cached () {
_ZCACHE_CAPTURE_BUNDLE+=("${(j: :)${@}}")
}
antigen-add-hook antigen-bundle antigen-bundle-cached pre
# Defer loading.
-antigen-load-env-cached () {
local bundle
typeset -A bundle; bundle=($@)
local location=${bundle[dir]}/${bundle[loc]}
# Load to path if there is no sourceable
if [[ ${bundle[loc]} == "/" ]]; then
_ZCACHE_BUNDLE_SOURCE+=("${location}")
@@ -1935,13 +1935,13 @@ EOC
_ZCACHE_BUNDLE_SOURCE+=("${location}")
}
antigen-add-hook -antigen-load-env -antigen-load-env-cached replace
# Defer sourcing.
-antigen-load-source-cached () {
_ZCACHE_BUNDLE_SOURCE+=($@)
}
antigen-add-hook -antigen-load-source -antigen-load-source-cached replace
return 0
}

View File

@@ -9,124 +9,251 @@
# Helper variables, override with ENVs like `VERBOSE=1 dfm help`
: "${VERBOSE:=0}"
: "${DOTFILES:=$HOME/.dotfiles}"
: "${SHARED_SCRIPT:=$DOTFILES/scripts/shared.sh}"
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install-dotfiles.sh}"
: "${BREWFILE:=$DOTFILES/Brewfile}"
: "${HOSTFILES:=$DOTFILES/hosts}"
SCRIPT=$(basename "$0")
source "$DOTFILES/scripts/shared.sh"
VERSION_NVM="v0.39.3"
# shellcheck source=./../../scripts/shared.sh
source "$SHARED_SCRIPT"
function section_install
{
USAGE_PREFIX="$SCRIPT install"
USAGE_PREFIX="$SCRIPT install <command>"
MENU=(
"all:Installs everything in the correct order"
"antigen:Updates the antigen.zsh file"
"composer:Install composer"
"dotenv:Install dotenv-linter"
"gh:Install GitHub CLI Extensions"
"go:Install Go Packages"
"imagick:Install ImageMagick CLI"
"starship:Install starship.rs"
"macos:Setup nice macOS defaults"
"neofetch:Install neofetch"
"nvm:Install Node Version Manager (nvm)"
"npm:Install NPM Packages"
"ntfy:Install ntfy"
"z:Install z"
)
case "$1" in
all)
$0 install antigen
$0 install macos
$0 install brew
$0 install ext_gh
$0 install ext_go
$0 install antigen
$0 install starship
$0 brew install
$0 install composer
$0 install dotenv
$0 install fzf
$0 install gh
$0 install go
$0 install imagick
$0 install neofetch
$0 install nvm
$0 install npm
$0 install ntfy
$0 install z
;;
antigen)
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 New antigen installed!"
curl -sSfL git.io/antigen -o "$DOTFILES/local/bin/antigen.zsh" \
&& msg_yay "New antigen installed!"
;;
brew)
brew bundle install --file="$BREWFILE" && msg_done "🎉 macOS Defaults set!"
composer)
bash "$DOTFILES/scripts/install-composer.sh" \
&& msg_yay "composer installed!"
;;
dotenv)
curl -sSfL \
https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh \
| sh -s -- -b "$XDG_BIN_HOME" \
&& msg_yay "dotenv-linter installed!"
;;
fzf)
bash "$DOTFILES/scripts/install-fzf.sh" \
&& msg_yay "fzf installed!"
;;
gh)
bash "$DOTFILES/scripts/install-gh-extensions.sh" \
&& msg_yay "github cli extensions installed!"
;;
go)
bash "$DOTFILES/scripts/install-go-packages.sh" \
&& msg_yay "go packages installed!"
;;
imagick)
curl -L https://imagemagick.org/archive/binaries/magick > "$XDG_BIN_HOME/magick" \
&& chmod +x "$XDG_BIN_HOME/magick" \
&& msg_yay "imagick installed!"
;;
starship)
curl -sS https://starship.rs/install.sh | sh -s -- \
--bin-dir ~/.local/bin \
--yes \
&& msg_yay "starship installed!"
;;
macos)
bash "$DOTFILES/scripts/set-macos-defaults.sh" && msg_done "🎉 Brewfile defined apps has been installed!"
bash "$DOTFILES/scripts/set-macos-defaults.sh" \
&& msg_yay "Brewfile defined apps has been installed!"
;;
ext_go)
bash "$DOTFILES/scripts/install-go-packages.sh" && msg_done "🎉 Go packages have been installed!"
neofetch)
bash "$DOTFILES/scripts/install-neofetch.sh" \
&& msg_yay "neofetch installed!"
;;
ext_gh)
bash "$DOTFILES/scripts/install-gh-extensions.sh" && msg_done "🎉 Extensions for GitHub CLI have been installed!"
nvm)
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash \
&& nvm install --lts --latest-npm --default
git checkout "$DOTFILES/base/zshrc"
msg_yay "nvm installed!"
;;
settler)
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Settler has been run!"
npm)
bash "$DOTFILES/scripts/install-npm-packages.sh" \
&& msg_yay "NPM Packages have been installed!"
;;
ntfy)
bash "$DOTFILES/scripts/install-ntfy.sh" \
&& msg_yay "ntfy installed!"
;;
z)
bash "$DOTFILES/scripts/install-z.sh" \
&& msg_yay "z has been installed!"
;;
*)
menu_section "$USAGE_PREFIX" "all | antigen | brew | ext_gh | ext_go | macos | settler"
menu_item "all" "Installs antigen, macos, brew, ext_gh and ext_go"
menu_item "antigen" "Updates the antigen.zsh file"
menu_item "brew" "Install Brewfile contents"
menu_item "ext_gh" "Install GitHub CLI Extensions"
menu_item "ext_go" "Install Go Packages"
menu_item "macos" "Setup nice macOS defaults"
menu_item "settler" "Runs the WIP settler.sh"
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
}
function section_brew
{
USAGE_PREFIX="$SCRIPT brew"
USAGE_PREFIX="$SCRIPT brew <command>"
if ! command -v brew &> /dev/null; then
echo "brew could not be found, please install it first"
exit
fi
MENU=(
"install:Installs items defined in Brewfile"
"update:Updates and upgrades brew packages"
"updatebundle:Updates Brewfile with descriptions"
"autoupdate:Setups brew auto-update and runs it immediately"
)
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
have brew && {
case "$1" in
install)
brew bundle install --file="$BREWFILE" && msg_yay "Done!"
;;
update)
brew update && brew outdated && brew upgrade && brew cleanup
msg_yay "Done!"
;;
updatebundle)
# Updates .dotfiles/Brewfile with descriptions
brew bundle dump \
--force \
--file="$BREWFILE" \
--describe && msg_yay "Done!"
;;
autoupdate)
brew autoupdate delete
brew autoupdate start 43200 --upgrade --cleanup --immediate
;;
*)
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
} || menu_section "$USAGE_PREFIX" "brew not available on this system"
}
function section_dotfiles
{
USAGE_PREFIX="$SCRIPT dotfiles"
USAGE_PREFIX="$SCRIPT dotfiles <command>"
MENU=(
"fmt:Run all formatters"
"yamlfmt:Run yamlfmt to all dotfiles, which are in our control"
"shfmt:Run shfmt to all dotfiles"
"reset_all:Reset everything, runs all configured reset actions"
"reset_nvim:Resets nvim. Deletes caches, removes nvim folders and relinks nvim folders"
)
case "$1" in
link)
rcup -B "$HOSTNAME" -f -v && msg_done "🎉 dotfiles have been linked!"
;;
update)
# Updates .dotfiles/scripts/install.sh and formats it
rcup -B 0 -g \
| tee "$INSTALL_SCRIPT" 1> /dev/null \
&& sed -i '' "s|$HOME|\$HOME|g" "$INSTALL_SCRIPT" \
&& sed -i '' "s|install.sh|$(basename "$INSTALL_SCRIPT")|g" "$INSTALL_SCRIPT"
fmt)
msg_ok "Running all formatters"
$0 dotfiles yamlfmt
$0 dotfiles shfmt
$0 dotfiles link
msg_done "🎉 dotfiles updated and linked!"
msg_done "...done!"
;;
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"
have npm && $0 install npm
msg_ok "Installed packages"
msg_done "nvim reset!"
;;
yamlfmt)
# format yaml files
have yamlfmt && yamlfmt -conf "$DOTFILES/.yamlfmt" || msg_err "yamlfmt not found"
;;
shfmt)
# Format shell scripts according to following rules.
find "$DOTFILES" \
\( -name '*.sh' -or -name '*.zsh' -or -name 'x-*' -or -not '*.pl' \) \
-exec shfmt -fn -l -w -i 2 -ci -sr -bn {} \;
msg_done "🎉 dotfiles have been formatted!"
-type f -perm +111 \
-not -path '*/.git/*' \
-not -path '*dotbot*' \
-not -name '*.pl' \
-not -name '*.py' \
-not -name '*.php' \
-not -name '*.zsh' \
-exec shfmt \
--language-dialect bash \
--func-next-line --list --write \
--indent 2 --case-indent --space-redirects \
--binary-next-line {} \;
msg_yay "dotfiles have been shfmt formatted!"
;;
*)
menu_section "$USAGE_PREFIX" "link | update | shfmt"
menu_item "link" "Use rcrc to update dotfile links"
menu_item "update" "Updates dotfile links (scripts/install.sh), formats it and runs it."
menu_item "shfmt" "Run shfmt to all dotfiles"
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
}
function section_check
{
USAGE_PREFIX="$SCRIPT check <command>"
X_HOSTNAME=$(hostname)
X_ARCH=$(uname)
MENU=(
"arch <arch>:Empty <arch> returns current. Exit code 0=match to current, 1=no match."
"host <host>:Empty <host> returns current. Exit code 0=match to current, 1=no match."
)
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_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
}
@@ -134,24 +261,31 @@ function section_dotfiles
# Secret menu for visual tests
function section_tests
{
USAGE_PREFIX="$SCRIPT tests"
USAGE_PREFIX="$SCRIPT tests <command>"
MENU=(
"msg:List all log functions from shared.sh"
)
case "$1" in
msg)
msg "msg"
msg_done "msg_done"
msg_prompt "msg_prompt"
msg_prompt_done "msg_prompt_done"
msg_done_suffix "msg_done_suffix"
msg_err "msg_err"
msg_nested "msg_nested"
msg_nested_done "msg_nested_done"
msg_run "msg_run" "second_param"
msg_ok "msg_ok"
msg_prompt "msg_prompt"
msg_prompt_done "msg_prompt_done"
msg_run "msg_run" "second_param"
msg_run_done "msg_run_done" "second_param"
msg_warn "msg_warn"
msg_err "msg_err"
msg_yay "msg_yay"
msg_yay_done "msg_yay_done"
;;
*)
menu_section "$USAGE_PREFIX" "msg"
menu_item "msg" "List all log functions from shared.sh"
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
}
@@ -159,13 +293,15 @@ function section_tests
function usage
{
echo ""
menu_section "Usage: $SCRIPT" "install | brew | dotfiles"
echo $" All commands have their own subcommands."
msg_prompt "Usage: $SCRIPT <section> <command>"
echo $" Empty <command> prints <section> help."
echo ""
section_install
echo ""
section_brew
echo ""
section_check
echo ""
section_dotfiles
}
@@ -173,7 +309,8 @@ function usage
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 1 ;;
*) usage && exit 0 ;;
esac

View 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
View 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}/"

View File

@@ -35,9 +35,9 @@ TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
FILENAME_TIMESTAMP="${DATABASE}_${FILENAME}_${TIMESTAMP}.sql"
mysqldump \
${DATABASE} \
"${DATABASE}" \
"$(
echo "show tables like '${PREFIX}%';" \
| mysql ${DATABASE} \
| mysql "${DATABASE}" \
| sed '/Tables_in/d'
)" > "${FILENAME_TIMESTAMP}"

Some files were not shown because too many files have changed in this diff Show More