Compare commits

...

25 Commits

Author SHA1 Message Date
2b9ddc232b chore(config): tweak oh-my-posh config 2024-09-16 16:42:34 +03:00
1a244ce0b1 chore(deps): asdf update 2024-09-16 09:12:46 +03:00
fdc0f45b23 chore(workflows): tweak gh workflows 2024-09-16 09:12:30 +03:00
3fa90eef3b chore(bin): dfm, update install-* scripts 2024-09-15 17:46:42 +03:00
7ea7c12f0b chore(nvim): update lazyvim 2024-09-15 17:46:13 +03:00
f76492b942 chore(deps): update asdf deps, rearrange order 2024-09-15 17:45:58 +03:00
7947340663 chore(config): alias and shared git config 2024-09-15 17:00:04 +03:00
300c48b1e9 feat(bin): x-term-colors to test term colors 2024-09-15 16:59:38 +03:00
772527cc66 chore(asdf): update versions, clean plugins 2024-09-15 16:58:51 +03:00
renovate[bot]
370fdcbcbe fix(container): update image python ( 3.12.5 → 3.12.6 ) (#26)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-10 09:21:57 +03:00
b32c86bac2 chore(deps): update nvim-kickstart submodule 2024-09-05 10:44:25 +03:00
8d85809b1c fix(dfm): asdf install parameter + asdf updates 2024-09-05 10:36:10 +03:00
7fc40e3eab chore(nvim): update keymaps, update lazyvim 2024-09-04 13:20:59 +03:00
renovate[bot]
1aca769ebf chore(deps): update node to v22.8.0 (#25) 2024-09-04 12:43:33 +03:00
57df4edf6c chore(config): add .phpactor.json to .gitignore 2024-08-29 14:47:28 +03:00
240ac35aa8 chore(config): add brew autocompletion to fpath 2024-08-29 14:46:38 +03:00
ad0ba59b67 chore(deps): upgrade asdf package versions 2024-08-29 14:46:05 +03:00
bbc26e66dd chore: disable antigen tmux, add xdg-ninja alias 2024-08-29 13:19:22 +03:00
1803d41969 feat(config): rework exports, fix virtualenv location 2024-08-29 13:18:17 +03:00
34d547433f feat(asdf): rework installer, add python, markdownlint-cli2 2024-08-29 13:16:20 +03:00
dff4b9a9c5 feat(config): direnv config 2024-08-29 13:15:11 +03:00
c33404eb27 chore(lint): markdown linting fixes, ignore file 2024-08-29 13:14:27 +03:00
99e7578d60 feat(config): oh-my-posh autoupgrade 2024-08-29 13:13:21 +03:00
d8011728c7 chore(config): no more cheat theme 2024-08-29 13:12:30 +03:00
2f67d4a2e2 fix(shell): eza works now, oh-my-zsh was the cause 2024-08-29 13:11:56 +03:00
37 changed files with 588 additions and 396 deletions

View File

@@ -19,7 +19,7 @@ indent_size = 1
indent_size = 1 indent_size = 1
indent_style = tab indent_style = tab
[{local/bin/*,**/*.sh,**/zshrc,config/*}] [{local/bin/*,**/*.sh,**/zshrc,config/*,scripts/*}]
shell_variant = bash # --language-variant shell_variant = bash # --language-variant
binary_next_line = true binary_next_line = true
switch_case_indent = true # --case-indent switch_case_indent = true # --case-indent

View File

@@ -1,3 +1,4 @@
---
name: Debug Changelog # Workflow name displayed on GitHub name: Debug Changelog # Workflow name displayed on GitHub
on: on:
workflow_dispatch: # Trigger manually workflow_dispatch: # Trigger manually

View File

@@ -1,3 +1,4 @@
---
name: reviewdog name: reviewdog
on: [push] on: [push]
jobs: jobs:

View File

@@ -1,13 +1,14 @@
---
name: Release Daily State # Workflow name displayed on GitHub name: Release Daily State # Workflow name displayed on GitHub
on: on:
workflow_dispatch: # Trigger manually workflow_dispatch: # Trigger manually
schedule: schedule:
- cron: '30 20 * * *' # UTC is 2-3 hours behind Europe/Helsinki, my timezone - cron: '30 20 * * *' # UTC is 2-3 hours behind Europe/Helsinki, my timezone
permissions:
contents: write
jobs: jobs:
new-daily-release: new-daily-release:
runs-on: self-hosted runs-on: self-hosted
permissions:
contents: write
outputs: outputs:
created: ${{ steps.daily-version.outputs.created }} created: ${{ steps.daily-version.outputs.created }}
version: ${{ steps.daily-version.outputs.version }} version: ${{ steps.daily-version.outputs.version }}

View File

@@ -1,3 +1,4 @@
---
name: Semantic PR name: Semantic PR
on: on:

View File

@@ -1,13 +1,14 @@
---
name: Update submodules name: Update submodules
on: on:
schedule: [{ cron: 0 3 * * * }] schedule: [{ cron: 0 3 * * * }]
workflow_dispatch: workflow_dispatch:
jobs:
update-submodules:
permissions: permissions:
contents: write contents: write
issues: write issues: write
pull-requests: write pull-requests: write
jobs:
update-submodules:
runs-on: self-hosted runs-on: self-hosted
steps: steps:
- name: Checkout repository - name: Checkout repository

View File

@@ -1,6 +1,8 @@
# only care about files that are under our control # only care about files that are directly under our control
config/cheat/cheatsheets/community/* config/cheat/cheatsheets/community/*
config/cheat/cheatsheets/tldr/*
config/tmux/plugins/* config/tmux/plugins/*
local/bin/asdf/*
tools/* tools/*
node_modules/* node_modules/*

2
.nvmrc
View File

@@ -1 +1 @@
22.7.0 22.8.0

View File

@@ -1 +1 @@
3.12 3.12.6

View File

@@ -1,29 +1,30 @@
asdf-plugin-manager 1.3.1
nodejs 22.8.0
golang 1.23.1
python 3.12.6
ruby 3.3.4
rust 1.81.0
direnv 2.34.0
eza 0.19.3
fd 10.2.0
1password-cli 2.30.0 1password-cli 2.30.0
age 1.2.0 age 1.2.0
asdf-plugin-manager 1.3.1
bottom 0.10.2 bottom 0.10.2
direnv 2.34.0
dotenv-linter 3.3.0 dotenv-linter 3.3.0
editorconfig-checker 2.8.0 editorconfig-checker 2.8.0
eza 0.19.0 github-cli 2.56.0
fd 10.1.0
github-cli 2.55.0
golang 1.23.0
hadolint 2.12.0 hadolint 2.12.0
kubectl 1.31.0 kubectl 1.31.1
lazygit 0.43.1 pipx 1.7.1
nodejs 22.6.0
pipx 1.6.0
pre-commit 3.8.0 pre-commit 3.8.0
ripgrep 14.1.0 ripgrep 14.1.1
ruby 3.3.4
rust 1.80.1
semgrep system
shellcheck 0.10.0 shellcheck 0.10.0
shfmt 3.8.0 shfmt 3.9.0
terraform-lsp 0.0.12 terragrunt 0.67.5
terragrunt 0.66.3
tf-summarize 0.3.10 tf-summarize 0.3.10
vault 1.17.3+ent
yamllint 1.35.1 yamllint 1.35.1
yq 4.44.3 yq 4.44.3
bats 1.11.0
gitleaks 8.18.4
delta 0.18.1
lazygit 0.44.0

View File

@@ -23,15 +23,20 @@ load_antigen()
antigen use oh-my-zsh antigen use oh-my-zsh
# Disable ls colors to avoid issues with eza
export DISABLE_LS_COLORS=true
export ZSH_TMUX_AUTOSTART=false export ZSH_TMUX_AUTOSTART=false
export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf" export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf"
export ZSH_TMUX_UNICODE=true export ZSH_TMUX_UNICODE=true
export ZSH_TMUX_AUTOQUIT=false export ZSH_TMUX_AUTOQUIT=false
export ZSH_TMUX_DEFAULT_SESSION_NAME=main export ZSH_TMUX_DEFAULT_SESSION_NAME=main
zstyle :omz:plugins:eza 'dirs-first' yes zstyle ':omz:plugins:eza' 'dirs-first' yes
zstyle :omz:plugins:eza 'git-status' yes zstyle ':omz:plugins:eza' 'git-status' yes
zstyle :omz:plugins:eza 'icons' yes zstyle ':omz:plugins:eza' 'icons' yes
zstyle ':omz:plugins:eza' 'ls' yes
zstyle ':omz:plugins:eza' 'prompt' yes
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* ]]; then
zstyle :omz:plugins:ssh-agent keychain yes zstyle :omz:plugins:ssh-agent keychain yes
@@ -51,7 +56,7 @@ load_antigen()
antigen bundle ssh-agent antigen bundle ssh-agent
antigen bundle gpg-agent antigen bundle gpg-agent
antigen bundle brew antigen bundle brew
antigen bundle tmux # antigen bundle tmux
antigen bundle colored-man-pages antigen bundle colored-man-pages
antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-completions
antigen bundle eza antigen bundle eza

View File

@@ -61,6 +61,9 @@ alias ta='tmux attach || tmux'
alias nvim-ks='NVIM_APPNAME="nvim-kickstart" nvim' alias nvim-ks='NVIM_APPNAME="nvim-kickstart" nvim'
alias ks='NVIM_APPNAME="nvim-kickstart" nvim' alias ks='NVIM_APPNAME="nvim-kickstart" nvim'
# xdg-ninja aliases for better experience
alias xdg='xdg-ninja --skip-ok --skip-unsupported'
# watch with: differences, precise, beep and color # watch with: differences, precise, beep and color
alias watchx='watch -dpbc' alias watchx='watch -dpbc'
# delete .DS_Store files # delete .DS_Store files
@@ -119,6 +122,7 @@ X_ALIAS_FILES=(
"$HOME/.config/alias-$(hostname)-secret" "$HOME/.config/alias-$(hostname)-secret"
) )
for aliasFile in "${X_ALIAS_FILES[@]}"; do for aliasFile in "${X_ALIAS_FILES[@]}"; do
# shellcheck source=$HOME/.config/alias-secret
[ -f "$aliasFile" ] && source "$aliasFile" && msg "Sourced $aliasFile" [ -f "$aliasFile" ] && source "$aliasFile" && msg "Sourced $aliasFile"
done done
unset X_ALIAS_FILES unset X_ALIAS_FILES

3
config/asdf-direnv/zshrc Normal file
View File

@@ -0,0 +1,3 @@
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
export ASDF_DIRENV_BIN="$(asdf where direnv)/bin/direnv"
eval "$($ASDF_DIRENV_BIN hook zsh)"

View File

@@ -1,28 +1,27 @@
1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab 1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab
age https://github.com/threkk/asdf-age.git 4df80a0 age https://github.com/threkk/asdf-age.git 4df80a0
asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git 50d2735 asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git ecd1642
bottom https://github.com/carbonteq/asdf-btm.git fd8a55a bottom https://github.com/carbonteq/asdf-btm.git fd8a55a
direnv https://github.com/asdf-community/asdf-direnv.git a2219c2
dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53 dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53
editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5 editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5
eza https://github.com/lwiechec/asdf-eza.git 08c1b65 eza https://github.com/lwiechec/asdf-eza.git eee3d59
fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0 fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0
github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7 github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7
golang https://github.com/asdf-community/asdf-golang.git 0e86b1d
hadolint https://github.com/devlincashman/asdf-hadolint.git 335e230 hadolint https://github.com/devlincashman/asdf-hadolint.git 335e230
kubectl https://github.com/asdf-community/asdf-kubectl.git cbe6df4 kubectl https://github.com/asdf-community/asdf-kubectl.git cbe6df4
lazygit https://github.com/nklmilojevic/asdf-lazygit.git 78e04f1 lazygit https://github.com/nklmilojevic/asdf-lazygit.git 78e04f1
neovim https://github.com/richin13/asdf-neovim d6118ad
nodejs https://github.com/asdf-vm/asdf-nodejs.git c5b7c40 nodejs https://github.com/asdf-vm/asdf-nodejs.git c5b7c40
pipx https://github.com/yozachar/asdf-pipx.git 31db618 pipx https://github.com/yozachar/asdf-pipx.git 31db618
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42 pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42
python https://github.com/asdf-community/asdf-python 7b0af87
ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665 ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665
ruby https://github.com/asdf-vm/asdf-ruby.git 27f78c9
rust https://github.com/code-lever/asdf-rust.git 95acf4f rust https://github.com/code-lever/asdf-rust.git 95acf4f
semgrep https://github.com/brentjanderson/asdf-semgrep.git 13ff78b
shellcheck https://github.com/luizm/asdf-shellcheck.git 780d78d shellcheck https://github.com/luizm/asdf-shellcheck.git 780d78d
shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff
terraform-ls https://github.com/asdf-community/asdf-hashicorp.git f1602b6 terragrunt https://github.com/ohmer/asdf-terragrunt.git 4a6651a
terraform-lsp https://github.com/bartlomiejdanek/asdf-terraform-lsp.git bba7106
terragrunt https://github.com/ohmer/asdf-terragrunt 4a6651a
tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26 tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26
vault https://github.com/asdf-community/asdf-hashicorp.git f1602b6 yamllint https://github.com/ericcornelissen/asdf-yamllint.git 2f4fd4c
yamllint https://github.com/ericcornelissen/asdf-yamllint.git d5c3161
yq https://github.com/sudermanjr/asdf-yq.git 772992f yq https://github.com/sudermanjr/asdf-yq.git 772992f

View File

@@ -0,0 +1,2 @@
ansible
pipenv

View File

@@ -7,7 +7,7 @@ colorize: false
# Which 'chroma' colorscheme should be applied to the output? # Which 'chroma' colorscheme should be applied to the output?
# Options are available here: # Options are available here:
# https://github.com/alecthomas/chroma/tree/master/styles # https://github.com/alecthomas/chroma/tree/master/styles
style: 'tokyonight' # style: 'tokyonight-day'
# Which 'chroma' "formatter" should be applied? # Which 'chroma' "formatter" should be applied?
# One of: "terminal", "terminal256", "terminal16m" # One of: "terminal", "terminal256", "terminal16m"
formatter: terminal256 formatter: terminal256

11
config/direnv/direnv.toml Normal file
View File

@@ -0,0 +1,11 @@
[global]
disable_stdin = true
[whitelist]
prefix = [
"~/Code/ivuorinen/"
]
exact = [
"~/.dotfiles/.envrc"
]

View File

@@ -0,0 +1,4 @@
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
use_asdf() {
source_env "$(asdf direnv envrc "$@")"
}

View File

@@ -15,6 +15,12 @@
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
# Load bash completions if available for zsh
if [[ -n "$ZSH_VERSION" ]]; then
autoload bashcompinit
bashcompinit
fi
# Load asdf # Load asdf
export ASDF_DIR="$XDG_BIN_HOME/asdf" export ASDF_DIR="$XDG_BIN_HOME/asdf"
if [[ -d $ASDF_DIR ]]; then if [[ -d $ASDF_DIR ]]; then
@@ -322,13 +328,17 @@ export ASDF_CONFIG_FILE="${XDG_CONFIG_HOME}/asdf/asdfrc"
export ASDF_DATA_DIR="${ASDF_DIR}" export ASDF_DATA_DIR="${ASDF_DIR}"
export ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME="${XDG_CONFIG_HOME}/asdf/plugin-versions" export ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME="${XDG_CONFIG_HOME}/asdf/plugin-versions"
export ASDF_LOG_FILE="${XDG_CACHE_HOME}/asdf/asdf.log" export ASDF_LOG_FILE="${XDG_CACHE_HOME}/asdf/asdf.log"
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY="latest_available" ## Default package files
export ASDF_NPM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/npm-packages"
export ASDF_GOLANG_MOD_VERSION_ENABLED=true
export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/golang-packages"
export ASDF_CRATE_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/cargo-packages" export ASDF_CRATE_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/cargo-packages"
export ASDF_GEM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/gem-packages" export ASDF_GEM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/gem-packages"
export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/golang-packages"
export ASDF_NPM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/npm-packages"
export ASDF_PYTHON_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/python-packages"
## Plugin configuration
export ASDF_DIRENV_IGNORE_MISSING_PLUGINS=1 export ASDF_DIRENV_IGNORE_MISSING_PLUGINS=1
export ASDF_GOLANG_MOD_VERSION_ENABLED=true
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY="latest_available"
## Add asdf to path
export PATH="${ASDF_DIR}/bin:${PATH}" export PATH="${ASDF_DIR}/bin:${PATH}"
# bob manages nvim versions # bob manages nvim versions
@@ -346,6 +356,8 @@ export HOMEBREW_NO_ENV_HINTS=true
export HOMEBREW_BUNDLE_MAS_SKIP=true export HOMEBREW_BUNDLE_MAS_SKIP=true
export HOMEBREW_BUNDLE_FILE="$XDG_CONFIG_HOME/homebrew/Brewfile" export HOMEBREW_BUNDLE_FILE="$XDG_CONFIG_HOME/homebrew/Brewfile"
x-have brew && { x-have brew && {
# Add brew autocompletion to fpath
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
eval "$(brew shellenv)" eval "$(brew shellenv)"
} }
@@ -410,6 +422,8 @@ export OP_CACHE="$XDG_STATE_HOME/1password"
msg "Setting up Python configuration" msg "Setting up Python configuration"
export WORKON_HOME="$XDG_DATA_HOME/virtualenvs" export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"
export PYENV_ROOT="$XDG_STATE_HOME/pyenv" export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
## for MichaelAquilina/zsh-autoswitch-virtualenv
export AUTOSWITCH_VIRTUAL_ENV_DIR="$WORKON_HOME"
export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH" export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
x-have pyenv && { x-have pyenv && {
eval "$(pyenv init -)" eval "$(pyenv init -)"
@@ -434,6 +448,7 @@ msg "Setting up Rust/Cargo configuration"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup" export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export CARGO_HOME="$XDG_DATA_HOME/cargo" export CARGO_HOME="$XDG_DATA_HOME/cargo"
export PATH="$CARGO_HOME/bin:$PATH" export PATH="$CARGO_HOME/bin:$PATH"
export RUST_WITHOUT=rust-docs
# screen # screen
# https://www.gnu.org/software/screen/manual/screen.html # https://www.gnu.org/software/screen/manual/screen.html

View File

@@ -19,3 +19,4 @@ wp_*.sh
auth.json auth.json
dfm.sh dfm.sh
.scannerwork .scannerwork
.phpactor.json

View File

@@ -17,11 +17,12 @@
llog = log --pretty=fuller 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 logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
nah = !git reset --hard && git clean -df nah = !git reset --hard && git clean -df
recent = "!r() { count=$1; git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' --color=always --count=${count:=10} | column -ts'|';}; r"
reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d 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 reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d
recent = "!r() { count=$1; git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' --color=always --count=${count:=10} | column -ts'|';}; r"
rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)' 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\" tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\"
undo = reset --soft HEAD^
undo-commit = reset HEAD~ --soft undo-commit = reset HEAD~ --soft
[filter "lfs"] [filter "lfs"]
@@ -30,15 +31,6 @@
process = git-lfs filter-process process = git-lfs filter-process
required = true required = true
[diff]
tool = difftastic
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[color] [color]
ui = true ui = true
diff = auto diff = auto

View File

@@ -6,17 +6,11 @@ local wk = require("which-key")
-- ╭──────────────────────────────────────────────────────────╮ -- ╭──────────────────────────────────────────────────────────╮
-- │ Comment box │ -- │ Comment box │
-- ╰──────────────────────────────────────────────────────────╯ -- ╰──────────────────────────────────────────────────────────╯
wk.register({ wk.add({
["<Leader>"] = { { "<Leader>bc", group = "□ Comment box" },
b = { { "<Leader>bcb", "<Cmd>CBccbox<CR>", desc = "Box Title" },
c = { { "<Leader>bcd", "<Cmd>CBd<CR>", desc = "Remove a box" },
name = "□ Comment boxes", { "<Leader>bcl", "<Cmd>CBline<CR>", desc = "Simple Line" },
b = { "<Cmd>CBccbox<CR>", "Box Title" }, { "<Leader>bcm", "<Cmd>CBllbox14<CR>", desc = "Marked" },
t = { "<Cmd>CBllline<CR>", "Titled Line" }, { "<Leader>bct", "<Cmd>CBllline<CR>", desc = "Titled Line" },
l = { "<Cmd>CBline<CR>", "Simple Line" },
m = { "<Cmd>CBllbox14<CR>", "Marked" },
d = { "<Cmd>CBd<CR>", "Remove a box" },
},
},
},
}) })

View File

@@ -1,7 +0,0 @@
blade-formatter
corepack
editorconfig-checker
github-release-notes
neovim
stylelint-lsp

View File

@@ -2,6 +2,7 @@
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": true, "final_space": true,
"console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}", "console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}",
"auto_upgrade": true,
"blocks": [ "blocks": [
{ {
"alignment": "left", "alignment": "left",
@@ -111,7 +112,9 @@
{ {
"background": "transparent", "background": "transparent",
"foreground": "lightGreen", "foreground": "lightGreen",
"foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"], "foreground_templates": [
"{{ if gt .Code 0 }}red{{ end }}"
],
"properties": { "properties": {
"always_enabled": true "always_enabled": true
}, },
@@ -126,7 +129,9 @@
"transient_prompt": { "transient_prompt": {
"background": "transparent", "background": "transparent",
"foreground": "lightGreen", "foreground": "lightGreen",
"foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"], "foreground_templates": [
"{{ if gt .Code 0 }}red{{ end }}"
],
"template": "\u279c " "template": "\u279c "
}, },
"version": 2 "version": 2

View File

@@ -2,6 +2,7 @@
final_space = true final_space = true
console_title_template = "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}" console_title_template = "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}"
version = 2 version = 2
auto_upgrade = true
[[blocks]] [[blocks]]
alignment = "left" alignment = "left"
@@ -28,13 +29,15 @@ type = "prompt"
style = "mixed" style = "mixed"
[blocks.segments.mapped_locations] [blocks.segments.mapped_locations]
"~/Code/*" = "" "~/Code/*" = ""
"~/Code/ivuorinen/" = ""
[[blocks.segments]] [[blocks.segments]]
type = "git" type = "git"
style = "plain" style = "plain"
foreground = "lightGreen" foreground = "lightGreen"
template = "{{ .UpstreamIcon }}{{ if or (.Staging.Changed) (.Working.Changed) }}({{if .Behind }}\u2193 {{ .Behind }} {{ end }}{{if .Staging.Changed }}\uF046 {{ .Staging.String }} {{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }}| {{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}){{ end }}" # template = "{{ .UpstreamIcon }}{{ .HEAD }} {{ if or (.Staging.Changed) (.Working.Changed) }}({{if .Behind }}\u2193 {{ .Behind }} {{ end }}{{if .Staging.Changed }}\uF046 {{ .Staging.String }} {{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }}| {{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}){{ end }}"
template = "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}"
[blocks.segments.properties] [blocks.segments.properties]
fetch_status = true fetch_status = true

View File

@@ -3,6 +3,7 @@
version = 2 version = 2
final_space = true final_space = true
console_title_template = '{{ .Shell }} in {{ .Folder }}' console_title_template = '{{ .Shell }} in {{ .Folder }}'
auto_upgrade = true
[[blocks]] [[blocks]]
type = 'prompt' type = 'prompt'

View File

@@ -79,4 +79,3 @@ Leader: `<ctrl><space>`
S-Left Move the visible part of the window left S-Left Move the visible part of the window left
S-Right Move the visible part of the window right S-Right Move the visible part of the window right
``` ```

View File

@@ -161,7 +161,7 @@ section_install()
;; ;;
asdf) asdf)
msg "Installing asdf..." msg "Installing asdf..."
bash "$DOTFILES/scripts/install-asdf.sh" \ bash "$DOTFILES/scripts/install-asdf.sh both" \
&& msg_yay "asdf installed!" && msg_yay "asdf installed!"
;; ;;
cargo) cargo)

99
local/bin/x-term-colors Executable file
View File

@@ -0,0 +1,99 @@
#!/usr/bin/env bash
#
# This file echoes a bunch of 24-bit color codes
# to the terminal to demonstrate its functionality.
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
# <r> <g> <b> range from 0 to 255 inclusive.
# The escape sequence ^[0m returns output to default
setBackgroundColor()
{
echo -en "\x1b[48;2;$1;$2;$3""m"
}
resetOutput()
{
echo -en "\x1b[0m\n"
}
# Gives a color $1/255 % along HSV
# Who knows what happens when $1 is outside 0-255
# Echoes "$red $green $blue" where
# $red $green and $blue are integers
# ranging between 0 and 255 inclusive
rainbowColor()
{
let h=$1/43
let f=$1-43*$h
let t=$f*255/43
let q=255-t
if [ $h -eq 0 ]
then
echo "255 $t 0"
elif [ $h -eq 1 ]
then
echo "$q 255 0"
elif [ $h -eq 2 ]
then
echo "0 255 $t"
elif [ $h -eq 3 ]
then
echo "0 $q 255"
elif [ $h -eq 4 ]
then
echo "$t 0 255"
elif [ $h -eq 5 ]
then
echo "255 0 $q"
else
# execution should never reach here
echo "0 0 0"
fi
}
for i in $(seq 0 127); do
setBackgroundColor "$i" 0 0
echo -en " "
done
resetOutput
for i in $(seq 255 128); do
setBackgroundColor "$i" 0 0
echo -en " "
done
resetOutput
for i in $(seq 0 127); do
setBackgroundColor 0 "$i" 0
echo -n " "
done
resetOutput
for i in $(seq 255 128); do
setBackgroundColor 0 "$i" 0
echo -n " "
done
resetOutput
for i in $(seq 0 127); do
setBackgroundColor 0 0 "$i"
echo -n " "
done
resetOutput
for i in $(seq 255 128); do
setBackgroundColor 0 0 "$i"
echo -n " "
done
resetOutput
for i in $(seq 0 127); do
setBackgroundColor $(rainbowColor "$i")
echo -n " "
done
resetOutput
for i in $(seq 255 128); do
setBackgroundColor $(rainbowColor "$i")
echo -n " "
done
resetOutput

View File

@@ -1,6 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Install asdf # Install asdf and plugins I use
#
# It also updates asdf and the plugins, and then reshim asdf.
#
# Usage: ./install-asdf.sh [both|install|add_plugins]
# Author: Ismo Vuorinen <https://github.com/ivuorinen>
# License: MIT
#
source "${DOTFILES}/config/shared.sh" source "${DOTFILES}/config/shared.sh"
export ASDF_DIR="${XDG_BIN_HOME}/asdf" export ASDF_DIR="${XDG_BIN_HOME}/asdf"
@@ -12,8 +19,6 @@ msg "Sourcing asdf in your shell"
# Function to update asdf and plugins # Function to update asdf and plugins
update_asdf() update_asdf()
{ {
asdf update
asdf plugin add asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git asdf plugin add asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git
asdf install asdf-plugin-manager latest asdf install asdf-plugin-manager latest
asdf global asdf-plugin-manager "$(asdf latest asdf-plugin-manager)" asdf global asdf-plugin-manager "$(asdf latest asdf-plugin-manager)"
@@ -21,8 +26,13 @@ update_asdf()
asdf-plugin-manager add-all asdf-plugin-manager add-all
asdf install asdf install
return 0
} }
# Function to install asdf plugins
install_asdf_plugins()
{
ASDF_INSTALLABLES=( ASDF_INSTALLABLES=(
"1password-cli:github.com/NeoHsu/asdf-1password-cli.git" "1password-cli:github.com/NeoHsu/asdf-1password-cli.git"
"age:github.com/threkk/asdf-age.git" "age:github.com/threkk/asdf-age.git"
@@ -40,39 +50,67 @@ ASDF_INSTALLABLES=(
"nodejs:github.com/asdf-vm/asdf-nodejs.git" "nodejs:github.com/asdf-vm/asdf-nodejs.git"
"pipx:github.com/yozachar/asdf-pipx.git" "pipx:github.com/yozachar/asdf-pipx.git"
"pre-commit:github.com/jonathanmorley/asdf-pre-commit.git" "pre-commit:github.com/jonathanmorley/asdf-pre-commit.git"
"python:github.com/asdf-community/asdf-python.git"
"ripgrep:gitlab.com/wt0f/asdf-ripgrep.git" "ripgrep:gitlab.com/wt0f/asdf-ripgrep.git"
"rust:github.com/code-lever/asdf-rust.git" "rust:github.com/code-lever/asdf-rust.git"
"semgrep:github.com/brentjanderson/asdf-semgrep.git"
"shellcheck:github.com/luizm/asdf-shellcheck.git" "shellcheck:github.com/luizm/asdf-shellcheck.git"
"shfmt:github.com/luizm/asdf-shfmt.git" "shfmt:github.com/luizm/asdf-shfmt.git"
"terraform-ls:github.com/asdf-community/asdf-hashicorp.git"
"terraform-lsp:github.com/bartlomiejdanek/asdf-terraform-lsp.git"
"terragrunt:github.com/ohmer/asdf-terragrunt.git" "terragrunt:github.com/ohmer/asdf-terragrunt.git"
"tf-summarize:github.com/adamcrews/asdf-tf-summarize.git" "tf-summarize:github.com/adamcrews/asdf-tf-summarize.git"
"vault:github.com/asdf-community/asdf-hashicorp.git"
"yamllint:github.com/ericcornelissen/asdf-yamllint.git" "yamllint:github.com/ericcornelissen/asdf-yamllint.git"
"yq:github.com/sudermanjr/asdf-yq.git" "yq:github.com/sudermanjr/asdf-yq.git"
) )
# Function to install asdf plugins msg "Installing asdf plugins"
install_asdf_plugins()
{
msg "Installing asdf plugins, if not already installed"
for item in "${ASDF_INSTALLABLES[@]}"; do for item in "${ASDF_INSTALLABLES[@]}"; do
CMD=$(echo "${item}" | awk -F ":" '{print $1}') CMD=$(echo "${item}" | awk -F ":" '{print $1}')
URL=$(echo "${item}" | awk -F ":" '{print $2}') URL=$(echo "${item}" | awk -F ":" '{print $2}')
asdf plugin add "${CMD}" "https://${URL}" asdf plugin add "${CMD}" "https://${URL}"
asdf install "${CMD}" latest asdf install "${CMD}" latest
asdf global "${CMD}" "$(asdf latest "${CMD}")" asdf global "${CMD}" "$(asdf latest "${CMD}")"
done done
msg "Exporting asdf plugin versions"
asdf-plugin-manager export > "${XDG_CONFIG_HOME}/asdf/plugin-versions"
return 0
}
reshim()
{
msg "Reshim asdf"
asdf reshim
return 0
}
# create usage function
usage()
{
echo "Usage: $0 [both|install|add_plugins]"
exit 1
} }
main() main()
{ {
update_asdf case $1 in
"both")
install_asdf_plugins install_asdf_plugins
msg "Reshim asdf" update_asdf
asdf reshim reshim
;;
"install")
update_asdf
reshim
;;
"add_plugins")
install_asdf_plugins
reshim
;;
*)
usage
;;
esac
} }
main "$@" main "$@"

View File

@@ -2,6 +2,10 @@
# Install cargo/rust packages. # Install cargo/rust packages.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead."
exit 0
eval "$HOME/.dotfiles/config/shared.sh" eval "$HOME/.dotfiles/config/shared.sh"
msg "Starting to install rust/cargo packages" msg "Starting to install rust/cargo packages"

View File

@@ -2,6 +2,10 @@
# Install Go packages # Install Go packages
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead."
exit 0
eval "$DOTFILES/config/shared.sh" eval "$DOTFILES/config/shared.sh"
# Enable verbosity with VERBOSE=1 # Enable verbosity with VERBOSE=1

View File

@@ -2,6 +2,10 @@
# Install npm packages globally. # Install npm packages globally.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead."
exit 0
eval "$DOTFILES/config/shared.sh" eval "$DOTFILES/config/shared.sh"
# Enable verbosity with VERBOSE=1 # Enable verbosity with VERBOSE=1

View File

@@ -2,6 +2,10 @@
# Install python/pip packages. # Install python/pip packages.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead."
exit 0
source "${DOTFILES}/config/shared.sh" source "${DOTFILES}/config/shared.sh"
# Enable verbosity with VERBOSE=1 # Enable verbosity with VERBOSE=1