Compare commits

...

56 Commits

Author SHA1 Message Date
ivuorinen
a4d5b87272 chore(git): Update submodules (automated)
tmux/tmux-continuum v3.1.0
2024-03-02 03:04:30 +00:00
f953bff183 chore(git): Update submodules 2024-03-01 13:39:17 +02:00
aba33a20a4 fix: Use pyenv instead of local/bin/python hack 2024-03-01 12:43:53 +02:00
a20e1e1419 fix(tmux): Use tilde instead of $HOME in tmux.conf 2024-03-01 12:42:59 +02:00
8328f4cd19 feat(tmux): Use my fork of tmux-window-name 2024-03-01 12:42:04 +02:00
4383b130a9 chore(brew): Clean up and update Brewfile 2024-03-01 12:11:56 +02:00
8143999f2a chore: update cheat/tldr submodule 2024-02-23 20:31:28 +02:00
523bec769f feat(config): add tldr to cheat as a submodule 2024-02-21 14:21:29 +02:00
dee215a29e chore(config): remove tldr from cheatsheets 2024-02-21 14:15:20 +02:00
755ac0fa2c feat(config): alias for trivy_scan using docker 2024-02-21 13:44:09 +02:00
a69f1f9f9c chore(deps): updated yarn packages 2024-02-19 03:31:15 +02:00
934ecb2335 chore(tmux): tweak configuration 2024-02-19 03:28:29 +02:00
4b6b887ca8 feat(shell): use oh-my-posh if available 2024-02-12 14:15:37 +02:00
fb0b9044eb chore(shell): tweak git segment in ohmyposh config 2024-02-08 23:05:09 +02:00
74ca882192 chore(shell): tweaked oh-my-posh git output 2024-02-08 14:46:43 +02:00
b904f0b60e fix(shell): run tmux hook only if tmux is active 2024-02-06 12:55:55 +02:00
13764775ca feat: switch from starship to oh-my-posh 2024-02-06 10:10:59 +02:00
1f7b92285b feat: make zsh faster, update brewfile 2024-02-06 10:09:09 +02:00
1f22aee5e3 feat(nvim): laytan/tailwind-sorter.nvim 2024-01-25 15:07:16 +02:00
7dddf3ed75 feat(nvim): add lazyvim extra yanky 2024-01-22 00:45:21 +02:00
62cd8cbda4 feat(nvim): use plugin versions, where available 2024-01-22 00:44:53 +02:00
7dcebc8615 feat(nvim): laytan/cloak.nvim 2024-01-22 00:44:15 +02:00
2e6a1582bf fix(nvim): comment box keymappings 2024-01-22 00:43:45 +02:00
c316a8eb2f feat(tmux): tmux-current-pane-hostname 2024-01-11 22:33:30 +02:00
4a493abedf chore(deps): updated yarn packages 2024-01-03 02:42:33 +02:00
a395397a02 chore(config): ignore sonarqube .scannerwork 2023-12-31 01:04:51 +02:00
33f839c842 fix(lint): fixes to codestyle 2023-12-31 01:04:08 +02:00
8b55ac1bba chore(lint): added yaml doc start lines, spelling 2023-12-31 01:02:44 +02:00
856ca00f1b feat(config): migrated alacritty config to toml 2023-12-30 08:08:30 +02:00
c5bbe4add5 chore(config): update github client config 2023-12-22 02:18:43 +02:00
d2904274cb feat(config): xdg user dirs 2023-12-08 02:26:25 +02:00
7ce8c78920 fix(cargo): change cargo-clean to cargo-cache 2023-12-07 01:43:32 +02:00
71301a6436 feat(scripts): add cache clearing operations 2023-12-07 01:37:39 +02:00
e4f925e5b0 fix(dfm): base/* files not reverted 2023-12-07 01:37:00 +02:00
63ebd6df47 chore(config): alias cleanup and rename ip 2023-12-05 03:09:57 +02:00
d598aade16 chore(scripts): update cargo install script 2023-11-27 19:08:51 +02:00
1b49de9645 chore(shell): bash configs 2023-11-27 19:08:16 +02:00
d56338e233 chore(shell): quote paths 2023-11-22 00:52:47 +02:00
ef6ccb92c0 chore(deps): update yarn packages 2023-11-20 11:29:50 +02:00
16bb91dd81 feat(shell): use starship in bash 2023-11-18 02:33:13 +02:00
e7f078fe96 fix(nvim): merge mason ensure_installed defs 2023-11-16 15:34:22 +02:00
49778fe936 chore: update alacritty, nvim and tmux colors 2023-11-16 15:18:40 +02:00
6a718a41b1 feat(config): config loading changes and fixes 2023-11-16 14:07:22 +02:00
f392938e9e fix(dfm): have to x-have 2023-11-13 12:44:28 +02:00
7fb38fe8f3 feat(tmux): update theme, fix plugins, update docs 2023-11-13 12:44:09 +02:00
639cbe4939 chore(lint): dfm dotfiles fmt 2023-11-13 12:24:12 +02:00
1dc84a9cc5 chore(deps): updated Brewfile 2023-11-13 09:31:03 +02:00
6ae753d257 feat(cargo): added bottom 2023-11-13 09:28:37 +02:00
b7c9d4851a chore(scripts): mkd -> x-mkd 2023-11-13 09:28:15 +02:00
4699233d46 chore(shell): touching the paths again, no regrats 2023-11-13 09:25:58 +02:00
a5895abfa0 chore(config): update terraform config 2023-11-10 14:52:52 +02:00
fae34d10ef chore(config): update tmux config 2023-11-10 14:52:32 +02:00
c0448b5e7f feat(scripts): update pip install script 2023-11-10 14:51:57 +02:00
4d7cc568af feat(config): terraform configs 2023-11-10 14:06:58 +02:00
01a2815a68 chore(repo): added .nvmrc with lts/* 2023-11-10 08:38:54 +02:00
39e896f331 chore(deps): updated brewfile 2023-11-09 15:19:06 +02:00
71 changed files with 2253 additions and 2277 deletions

BIN
.github/screenshots/oh-my-posh.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

8
.gitmodules vendored
View File

@@ -41,7 +41,7 @@
ignore = dirty ignore = dirty
[submodule "tmux/tmux-window-name"] [submodule "tmux/tmux-window-name"]
path = config/tmux/plugins/tmux-window-name path = config/tmux/plugins/tmux-window-name
url = https://github.com/ofirgall/tmux-window-name.git url = https://github.com/ivuorinen/tmux-window-name.git
ignore = dirty ignore = dirty
[submodule "dotbot-pip"] [submodule "dotbot-pip"]
path = tools/dotbot-pip path = tools/dotbot-pip
@@ -52,3 +52,9 @@
[submodule "tmux/tmux-mode-indicator"] [submodule "tmux/tmux-mode-indicator"]
path = config/tmux/plugins/tmux-mode-indicator path = config/tmux/plugins/tmux-mode-indicator
url = https://github.com/MunifTanjim/tmux-mode-indicator.git url = https://github.com/MunifTanjim/tmux-mode-indicator.git
[submodule "tmux/tmux-current-pane-hostname"]
path = config/tmux/plugins/tmux-current-pane-hostname
url = https://github.com/soyuka/tmux-current-pane-hostname.git
[submodule "cheat-tldr"]
path = config/cheat/cheatsheets/tldr
url = https://github.com/ivuorinen/cheatsheet-tldr.git

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
lts/*

View File

@@ -13,6 +13,8 @@ git submodule add --name dotbot-pip \
# other repos # other repos
git submodule add --name cheat-community \ git submodule add --name cheat-community \
-f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community -f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
git submodule add --name cheat-tldr \
-f https://github.com/ivuorinen/cheatsheet-tldr.git config/cheat/cheatsheets/tldr
# tmux plugin manager and plugins # tmux plugin manager and plugins
git submodule add --name tmux/tmux-continuum \ git submodule add --name tmux/tmux-continuum \
@@ -28,9 +30,11 @@ git submodule add --name tmux/tmux-sessionist \
git submodule add --name tmux/tmux-suspend \ git submodule add --name tmux/tmux-suspend \
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend -f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend
git submodule add --name tmux/tmux-window-name \ git submodule add --name tmux/tmux-window-name \
-f https://github.com/ofirgall/tmux-window-name.git config/tmux/plugins/tmux-window-name -f https://github.com/ivuorinen/tmux-window-name.git config/tmux/plugins/tmux-window-name
git submodule add --name tmux/tmux-yank \ git submodule add --name tmux/tmux-yank \
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank -f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
git submodule add --name tmux/tmux-current-pane-hostname \
-f https://github.com/soyuka/tmux-current-pane-hostname.git config/tmux/plugins/tmux-current-pane-hostname
# Takes submodules and sets them to ignore all changes # Takes submodules and sets them to ignore all changes
for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do

View File

@@ -18,11 +18,10 @@ export XDG_RUNTIME_DIR="$HOME/.local/run"
# Paths # Paths
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$HOME/.local/go/bin:$XDG_DATA_HOME/cargo/bin:$PATH" export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$HOME/.local/go/bin:$XDG_DATA_HOME/cargo/bin:$PATH"
# shellcheck source=scripts/shared.sh
# source "$DOTFILES/scripts/shared.sh"
source "$DOTFILES/config/exports" source "$DOTFILES/config/exports"
source "$DOTFILES/config/functions"
source "$DOTFILES/config/alias" source "$DOTFILES/config/alias"
x-load-configs
# shellcheck source=../config/fzf/fzf.bash # shellcheck source=../config/fzf/fzf.bash
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] && [ -f "${DOTFILES}/config/fzf/fzf.bash" ] &&
@@ -31,78 +30,12 @@ source "$DOTFILES/config/alias"
# Import ssh keys in keychain # Import ssh keys in keychain
ssh-add -A 2>/dev/null ssh-add -A 2>/dev/null
# Enable the subsequent settings only in interactive sessions x-have rbenv && {
case $- in eval "$(rbenv init - bash)"
*i*) ;;
*) return ;;
esac
# Path to your oh-my-bash installation.
export OSH="$HOME/.local/share/oh-my-bash"
[ -d "$OSH" ] && {
export OSH_THEME="powerline-multiline"
# PowerLine theme config
export POWERLINE_LEFT_PROMPT="cwd scm"
export POWERLINE_RIGHT_PROMPT="python_venv ruby in_vim battery user_info"
# Display red dots whilst waiting for completion.
export COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
export DISABLE_UNTRACKED_FILES_DIRTY="true"
# To disable the uses of "sudo" by oh-my-bash, please set "false" to
# this variable. The default behavior for the empty value is "true".
export OMB_USE_SUDO=true
# To enable/disable display of Python virtualenv and condaenv
export OMB_PROMPT_SHOW_PYTHON_VENV=true # enable
# OMB_PROMPT_SHOW_PYTHON_VENV=false # disable
# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)
# Custom completions may be added to ~/.oh-my-bash/custom/completions/
# Example format: completions=(ssh git bundler gem pip pip3)
# Add wisely, as too many completions slow down shell startup.
export completions=(
git
composer
ssh
)
# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)
# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/
# Example format: aliases=(vagrant composer git-avh)
# Add wisely, as too many aliases slow down shell startup.
export aliases=(
general
)
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
export plugins=(
git
bashmarks
)
# Which plugins would you like to conditionally load? (plugins can be found in ~/.oh-my-bash/plugins/*)
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
# Example format:
# if [ "$DISPLAY" ] || [ "$SSH" ]; then
# plugins+=(tmux-autoattach)
# fi
source "$OSH/oh-my-bash.sh"
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
} }
# eval "$(starship init bash)"
x-have oh-my-posh && {
eval "$(oh-my-posh init bash --config $XDG_CONFIG_HOME/oh-my-posh.omp.json)"
}
source "$DOTFILES/config/alias"

View File

@@ -14,28 +14,17 @@ export XDG_BIN_HOME="$HOME/.local/bin"
export XDG_CACHE_HOME="$HOME/.cache" export XDG_CACHE_HOME="$HOME/.cache"
export XDG_RUNTIME_DIR="$HOME/.local/run" export XDG_RUNTIME_DIR="$HOME/.local/run"
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$HOME/.local/go/bin:$XDG_DATA_HOME/cargo/bin:$PATH" export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$HOME/.local/go/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
source "$DOTFILES/config/exports" x-load-configs
source "$DOTFILES/config/alias"
source "$DOTFILES/config/functions"
source "$DOTFILES/scripts/shared.sh"
export COMPLETION_WAITING_DOTS=true export COMPLETION_WAITING_DOTS=true
path_append "/opt/homebrew/bin"
if type brew &> /dev/null; then if type brew &> /dev/null; then
eval "$(brew shellenv)" eval "$(brew shellenv)"
FPATH="$HOMEBREW_PREFIX/share/zsh/site-functions:${FPATH}" FPATH="$HOMEBREW_PREFIX/share/zsh/site-functions:${FPATH}"
fi fi
path_append "/usr/local/bin"
path_prepend "$XDG_DATA_HOME/cargo/bin"
path_prepend "$XDG_BIN_HOME"
path_prepend "$HOME/.local/go/bin"
path_prepend "$XDG_DATA_HOME/bob/nvim-bin"
export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion" export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion"
x-dc "$ZSH_CUSTOM_COMPLETION_PATH" x-dc "$ZSH_CUSTOM_COMPLETION_PATH"
@@ -72,9 +61,9 @@ antigen bundle jreese/zsh-titles
antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-completions
# these should be available if there's need # these should be available if there's need
have brew && antigen bundle brew # x-have brew && antigen bundle brew
have php && antigen bundle php # x-have php && antigen bundle php
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv x-have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
# nvm is a strange beast # nvm is a strange beast
zstyle ':omz:plugins:nvm' autoload yes zstyle ':omz:plugins:nvm' autoload yes
@@ -82,7 +71,7 @@ antigen bundle nvm
# antigen bundle "$DOTFILES/config/zsh/plugins/nvm-auto-use" # antigen bundle "$DOTFILES/config/zsh/plugins/nvm-auto-use"
# nice to have stuff # nice to have stuff
antigen bundle gcloud # antigen bundle gcloud
# this needs to be the last item # this needs to be the last item
antigen bundle zsh-users/zsh-syntax-highlighting antigen bundle zsh-users/zsh-syntax-highlighting
@@ -92,5 +81,32 @@ antigen apply
[ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \ [ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \
&& source "${DOTFILES}/config/fzf/fzf.zsh" && source "${DOTFILES}/config/fzf/fzf.zsh"
# Start starship x-have rbenv && {
eval "$(starship init zsh)" eval "$(rbenv init - zsh)"
}
x-have pyenv && {
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
}
# Run only if tmux is active
[[ -n "$TMUX" ]] && {
# Autoupdate tmux window name
TMUX_WINDOW_NAME_PLUGIN="$DOTFILES/config/tmux/plugins/tmux-window-name/scripts/rename_session_windows.py"
[ -f "$TMUX_WINDOW_NAME_PLUGIN" ] && {
tmux-window-name()
{
($TMUX_WINDOW_NAME_PLUGIN &)
}
add-zsh-hook chpwd tmux-window-name
tmux-window-name
}
}
# eval "$(starship init zsh)"
x-have oh-my-posh && {
eval "$(oh-my-posh init zsh --config $XDG_CONFIG_HOME/oh-my-posh.omp.json)"
}
source "$DOTFILES/config/alias"

View File

@@ -0,0 +1,345 @@
[colors]
draw_bold_text_with_bright_colors = true
[colors.bright]
black = "0x414868"
blue = "0x7aa2f7"
cyan = "0x7dcfff"
green = "0x9ece6a"
magenta = "0xbb9af7"
red = "0xf7768e"
white = "0xc0caf5"
yellow = "0xe0af68"
[colors.normal]
black = "0x1d202f"
blue = "0x7aa2f7"
cyan = "0x7dcfff"
green = "0x9ece6a"
magenta = "0xbb9af7"
red = "0xf7768e"
white = "0xa9b1d6"
yellow = "0xe0af68"
[colors.primary]
background = "0x24283b"
foreground = "0xc0caf5"
[env]
TERM = "xterm-256color"
[font]
size = 14.0
[font.bold]
family = "JetBrainsMonoNL Nerd Font Mono"
style = "Bold"
[font.glyph_offset]
x = 0
y = 0
[font.italic]
family = "JetBrainsMonoNL Nerd Font Mono"
style = "Italic"
[font.normal]
family = "JetBrainsMonoNL Nerd Font Mono"
style = "ExtraLight"
[font.offset]
x = 0
y = 0
[[keyboard.bindings]]
action = "Paste"
key = "V"
mods = "Command"
[[keyboard.bindings]]
action = "Copy"
key = "C"
mods = "Command"
[[keyboard.bindings]]
action = "Quit"
key = "Q"
mods = "Command"
[[keyboard.bindings]]
action = "Quit"
key = "W"
mods = "Command"
[[keyboard.bindings]]
action = "SpawnNewInstance"
key = "N"
mods = "Command"
[[keyboard.bindings]]
chars = "\u001BOH"
key = "Home"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[1~"
key = "Home"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOF"
key = "End"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[4~"
key = "End"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001B[5;2~"
key = "PageUp"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[5;5~"
key = "PageUp"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[5~"
key = "PageUp"
[[keyboard.bindings]]
chars = "\u001B[6;2~"
key = "PageDown"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[6;5~"
key = "PageDown"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[6~"
key = "PageDown"
[[keyboard.bindings]]
chars = "\u001B[1;2D"
key = "Left"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[1;5D"
key = "Left"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[1;3D"
key = "Left"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[D"
key = "Left"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOD"
key = "Left"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[1;2C"
key = "Right"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[1;5C"
key = "Right"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[1;3C"
key = "Right"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[C"
key = "Right"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOC"
key = "Right"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[1;2A"
key = "Up"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[1;5A"
key = "Up"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[1;3A"
key = "Up"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[A"
key = "Up"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOA"
key = "Up"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[1;2B"
key = "Down"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[1;5B"
key = "Down"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[1;3B"
key = "Down"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[B"
key = "Down"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOB"
key = "Down"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[Z"
key = "Tab"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001BOP"
key = "F1"
[[keyboard.bindings]]
chars = "\u001BOQ"
key = "F2"
[[keyboard.bindings]]
chars = "\u001BOR"
key = "F3"
[[keyboard.bindings]]
chars = "\u001BOS"
key = "F4"
[[keyboard.bindings]]
chars = "\u001B[15~"
key = "F5"
[[keyboard.bindings]]
chars = "\u001B[17~"
key = "F6"
[[keyboard.bindings]]
chars = "\u001B[18~"
key = "F7"
[[keyboard.bindings]]
chars = "\u001B[19~"
key = "F8"
[[keyboard.bindings]]
chars = "\u001B[20~"
key = "F9"
[[keyboard.bindings]]
chars = "\u001B[21~"
key = "F10"
[[keyboard.bindings]]
chars = "\u001B[23~"
key = "F11"
[[keyboard.bindings]]
chars = "\u001B[24~"
key = "F12"
[[keyboard.bindings]]
key = "Back"
action = "ReceiveChar"
[[keyboard.bindings]]
chars = "\u001B[2~"
key = "Insert"
[[keyboard.bindings]]
chars = "\u001B[3~"
key = "Delete"
[[keyboard.bindings]]
chars = "\u0002&"
key = "W"
mods = "Command"
[[keyboard.bindings]]
chars = "\u0002c"
key = "T"
mods = "Command"
[[keyboard.bindings]]
chars = "\u0002n"
key = "RBracket"
mods = "Command|Shift"
[[keyboard.bindings]]
chars = "\u0002p"
key = "LBracket"
mods = "Command|Shift"
[[keyboard.bindings]]
chars = "\u0002o"
key = "RBracket"
mods = "Command"
[[keyboard.bindings]]
chars = "\u0002;"
key = "LBracket"
mods = "Command"
[[keyboard.bindings]]
chars = "\u0002/"
key = "F"
mods = "Command"
[[mouse.bindings]]
action = "PasteSelection"
mouse = "Middle"
[selection]
semantic_escape_chars = ",│`|:\"' ()[]{}<>"
[window]
decorations = "none"
dynamic_title = true
opacity = 0.98
[window.dimensions]
columns = 200
lines = 100
[window.padding]
x = 5
y = 5

View File

@@ -1,206 +0,0 @@
---
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
#
# Note that some xterm terminfo databases don't declare support for italics.
# You can verify this by checking for the presence of `smso` and `sitm` in
# `infocmp xterm-256color`.
TERM: xterm-256color
# Window dimensions in character columns and lines
# (changes require restart)
window:
dynamic_title: true
dimensions:
columns: 130
lines: 40
# Adds this many blank pixels of padding around the window
# Units are physical pixels; this is not DPI aware.
# (change requires restart)
padding:
x: 5
y: 5
decorations: buttonless
opacity: 0.97
# When true, bold text is drawn using the bright variant of colors.
draw_bold_text_with_bright_colors: true
# Font configuration (changes require restart)
font:
# The normal (roman) font face to use.
normal:
family: JetBrainsMonoNL Nerd Font Mono
# Style can be specified to pick a specific face.
style: ExtraLight
# The bold font face
bold:
family: JetBrainsMonoNL Nerd Font Mono
# Style can be specified to pick a specific face.
style: Bold
# The italic font face
italic:
family: JetBrainsMonoNL Nerd Font Mono
# Style can be specified to pick a specific face.
style: Italic
# Point size of the font
size: 14.0
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
offset:
x: 0
y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increase the x offset to move the glyph to
# the right, increase the y offset to move the glyph upward.
glyph_offset:
x: 0
y: 0
# Should display the render timer
debug.render_timer: false
# TokyoNight Alacritty Colors (storm)
colors:
# Default colors
primary:
background: '0x24283b'
foreground: '0xc0caf5'
# Normal colors
normal:
black: '0x1d202f'
red: '0xf7768e'
green: '0x9ece6a'
yellow: '0xe0af68'
blue: '0x7aa2f7'
magenta: '0xbb9af7'
cyan: '0x7dcfff'
white: '0xa9b1d6'
# Bright colors
bright:
black: '0x414868'
red: '0xf7768e'
green: '0x9ece6a'
yellow: '0xe0af68'
blue: '0x7aa2f7'
magenta: '0xbb9af7'
cyan: '0x7dcfff'
white: '0xc0caf5'
indexed_colors:
- { index: 16, color: '0xff9e64' }
- { index: 17, color: '0xdb4b4b' }
key_bindings:
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: Q, mods: Command, action: Quit }
- { key: W, mods: Command, action: Quit }
- { key: N, mods: Command, action: SpawnNewInstance }
- { key: Home, chars: "\eOH", mode: AppCursor }
- { key: Home, chars: "\e[1~", mode: ~AppCursor }
- { key: End, chars: "\eOF", mode: AppCursor }
- { key: End, chars: "\e[4~", mode: ~AppCursor }
- { key: PageUp, mods: Shift, chars: "\e[5;2~" }
- { key: PageUp, mods: Control, chars: "\e[5;5~" }
- { key: PageUp, chars: "\e[5~" }
- { key: PageDown, mods: Shift, chars: "\e[6;2~" }
- { key: PageDown, mods: Control, chars: "\e[6;5~" }
- { key: PageDown, chars: "\e[6~" }
- { key: Left, mods: Shift, chars: "\e[1;2D" }
- { key: Left, mods: Control, chars: "\e[1;5D" }
- { key: Left, mods: Alt, chars: "\e[1;3D" }
- { key: Left, chars: "\e[D", mode: ~AppCursor }
- { key: Left, chars: "\eOD", mode: AppCursor }
- { key: Right, mods: Shift, chars: "\e[1;2C" }
- { key: Right, mods: Control, chars: "\e[1;5C" }
- { key: Right, mods: Alt, chars: "\e[1;3C" }
- { key: Right, chars: "\e[C", mode: ~AppCursor }
- { key: Right, chars: "\eOC", mode: AppCursor }
- { key: Up, mods: Shift, chars: "\e[1;2A" }
- { key: Up, mods: Control, chars: "\e[1;5A" }
- { key: Up, mods: Alt, chars: "\e[1;3A" }
- { key: Up, chars: "\e[A", mode: ~AppCursor }
- { key: Up, chars: "\eOA", mode: AppCursor }
- { key: Down, mods: Shift, chars: "\e[1;2B" }
- { key: Down, mods: Control, chars: "\e[1;5B" }
- { key: Down, mods: Alt, chars: "\e[1;3B" }
- { key: Down, chars: "\e[B", mode: ~AppCursor }
- { key: Down, chars: "\eOB", mode: AppCursor }
- { key: Tab, mods: Shift, chars: "\e[Z" }
- { key: F1, chars: "\eOP" }
- { key: F2, chars: "\eOQ" }
- { key: F3, chars: "\eOR" }
- { key: F4, chars: "\eOS" }
- { key: F5, chars: "\e[15~" }
- { key: F6, chars: "\e[17~" }
- { key: F7, chars: "\e[18~" }
- { key: F8, chars: "\e[19~" }
- { key: F9, chars: "\e[20~" }
- { key: F10, chars: "\e[21~" }
- { key: F11, chars: "\e[23~" }
- { key: F12, chars: "\e[24~" }
- { key: Back, chars: '' }
- { key: Back, mods: Alt, chars: "\e" }
- { key: Insert, chars: "\e[2~" }
- { key: Delete, chars: "\e[3~" }
# shortcuts for tmux. the leader key is control-b (0x02)
- { key: W, mods: Command, chars: "\x02&" } # close tab (kill)
- { key: T, mods: Command, chars: "\x02c" } # new tab
- { key: RBracket, mods: Command|Shift, chars: "\x02n" } # select next tab
- { key: LBracket, mods: Command|Shift, chars: "\x02p" } # select previous tab
- { key: RBracket, mods: Command, chars: "\x02o" } # select next pane
- { key: LBracket, mods: Command, chars: "\x02;" } # select last (previously used) pane
- { key: F, mods: Command, chars: "\x02/" } # search (upwards) (see tmux.conf)
# Mouse bindings
#
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
# be specified.
#
# Values for `mouse`:
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# Values for `action`:
# - Paste
# - PasteSelection
# - Copy (TODO)
mouse_bindings:
- { mouse: Middle, action: PasteSelection }
mouse:
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
selection:
semantic_escape_chars: ',│`|:"'' ()[]{}<>'
# Shell
#
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
# Entries in shell.args are passed unmodified as arguments to the shell.
#
#shell:
# program: /bin/bash
# args:
# - --login

View File

@@ -1,69 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck source="../scripts/shared.sh" # shellcheck source="../scripts/shared.sh"
# shellcheck disable=1091,2139 # shellcheck disable=1091,2139
DOTFILES="$HOME/.dotfiles"
# Get installed php versions from brew and setup aliases
function x-set-php-aliases
{
x-have brew && {
local php_versions=()
while IFS="" read -r line; do php_versions+=("$line"); done < <(bkt -- brew list | grep '^php')
php_error_reporting='-d error_reporting=22527'
for version in "${php_versions[@]}"; do
# drop the dot from version (8.0 -> 80)
local php_abbr="${version//\./}"
# replace "php@" with "p" so "php@80" becomes "p80"
local php_alias="${php_abbr//php@/p}"
# 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,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
alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder"
# Lock the screen
alias afk="osascript -e 'tell application \"System Events\" to keystroke \"q\" using {command down,control down}'"
# Empty the Trash on all mounted volumes and the main HDD
# Also, clear Apples System Logs to improve shell startup speed
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
fi
# Be nice
alias please="sudo "
# Color the grep output # Color the grep output
alias grep='grep --color' alias grep="grep --color"
! x-have eza && alias ls='ls --color=auto'
x-have eza && { x-have eza && {
alias ls='eza -h -s=type --git --icons --group-directories-first' alias ls="eza -h -s=type --git --icons --group-directories-first"
} }
# Easier navigation: .., ..., .... # Easier navigation: .., ..., ....
@@ -86,7 +29,7 @@ alias sl="ls"
alias lsd="ls -lF | grep '^d'" alias lsd="ls -lF | grep '^d'"
# IP addresses # IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com" alias x-ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1" alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'" alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
@@ -103,9 +46,6 @@ alias flush="dscacheutil -flushcache"
# Update locatedb # Update locatedb
alias updatedb="sudo /usr/libexec/locate.updatedb" alias updatedb="sudo /usr/libexec/locate.updatedb"
# Always return full history
alias history="history 1"
# tmux: automatically attach or create session with name 'main' # tmux: automatically attach or create session with name 'main'
alias tmux='tmux new-session -A -s main' alias tmux='tmux new-session -A -s main'
# tmux: attach or create new session # tmux: attach or create new session
@@ -135,18 +75,33 @@ alias code_scanner='docker run
registry.gitlab.com/gitlab-org/ci-cd/codequality:"${CODEQUALITY_VERSION:-latest}" registry.gitlab.com/gitlab-org/ci-cd/codequality:"${CODEQUALITY_VERSION:-latest}"
/code' /code'
alias trivy_scan='docker run -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/Library/Caches:/root/.cache/ aquasec/trivy'
alias zedit='$EDITOR ~/.dotfiles' alias zedit='$EDITOR ~/.dotfiles'
alias irssi="irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_CONFIG_HOME/irssi" alias irssi="irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_CONFIG_HOME/irssi"
if [[ -f "$HOME/.aliases.local" ]]; then
# shellcheck disable=SC1091
source "$HOME/.aliases.local"
fi
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts" alias wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts"
alias svn="svn --config-dir $XDG_CONFIG_HOME/subversion" alias svn="svn --config-dir $XDG_CONFIG_HOME/subversion"
if [[ $(uname) == 'Darwin' ]]; then
# Laravel Sail shortcut
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
# Flush Directory Service cache
alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder"
# Lock the screen
alias afk="osascript -e 'tell application \"System Events\" to keystroke \"q\" using {command down,control down}'"
# Empty the Trash on all mounted volumes and the main HDD
# Also, clear Apple's System Logs to improve shell startup speed
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
x-set-php-aliases
fi
# Alacritty preexec hook to update dynamic title # Alacritty preexec hook to update dynamic title
preexec() preexec()
{ {
@@ -175,12 +130,6 @@ ssh-docker()
docker exec -it "$@" bash docker exec -it "$@" bash
} }
# All the dig info
digga()
{
dig +nocmd "$1" any +multiline +noall +answer
}
# Rector project to php version 8.2 by default. # Rector project to php version 8.2 by default.
rector() rector()
{ {

View File

@@ -1,19 +1,23 @@
---
# Default settings for amethyst # Default settings for amethyst
# Repo: `https://github.com/ianyh/Amethyst` # Repo: `https://github.com/ianyh/Amethyst`
# #
# Note due to issue 1419 (https://github.com/ianyh/Amethyst/issues/1419) some # Note due to issue 1419 (https://github.com/ianyh/Amethyst/issues/1419) some
# config values may conflict and not work if they are the same as the default # config values may conflict and not work if they are the same as the default
# values for amathyst. You can see these values on github at # values for amathyst. You can see these values on GitHub at
# https://github.com/ianyh/Amethyst/blob/development/Amethyst/default.amethyst # https://github.com/ianyh/Amethyst/blob/development/Amethyst/default.amethyst
# If you're experiencing conflicts and the settings are the same as the default, # If you're experiencing conflicts and the settings are the same as the default,
# comment out the commands in this file. # comment out the commands in this file.
# #
# Move this file to: `~/.amethyst.yml` # Move this file to: `~/.amethyst.yml`
# In order to register changes restart Amethyst. # In order to register changes restart Amethyst.
# If you experience issues pulling in the changes you can also quit Amethyst and run: `defaults delete com.amethyst.Amethyst.plist` # If you experience issues pulling in the changes you can also
# This removes the current preferences and causes Amethyst to restart with default preferences and pull configs from this file. # quit Amethyst and run: `defaults delete com.amethyst.Amethyst.plist`
# This removes the current preferences and causes Amethyst to restart
# with default preferences and pull configs from this file.
# layouts - Ordered list of layouts to use by layout key (default tall, wide, fullscreen, and column). # layouts - Ordered list of layouts to use by layout key
# (default tall, wide, fullscreen, and column).
layouts: layouts:
- bsp - bsp
- tall - tall
@@ -71,39 +75,49 @@ cycle-layout-backward:
mod: mod2 mod: mod2
key: space key: space
# Shrink the main pane by a percentage of the screen dimension as defined by window-resize-step. Note that not all layouts respond to this command. # Shrink the main pane by a percentage of the screen
# dimension as defined by window-resize-step.
# Note that not all layouts respond to this command.
shrink-main: shrink-main:
mod: mod1 mod: mod1
key: h key: h
# Expand the main pane by a percentage of the screen dimension as defined by window-resize-step. Note that not all layouts respond to this command. # Expand the main pane by a percentage of the screen dimension
# as defined by window-resize-step. Note that not all layouts
# respond to this command.
expand-main: expand-main:
mod: mod1 mod: mod1
key: l key: l
# Increase the number of windows in the main pane. Note that not all layouts respond to this command. # Increase the number of windows in the main pane.
# Note that not all layouts respond to this command.
increase-main: increase-main:
mod: mod1 mod: mod1
key: ',' key: ','
# Decrease the number of windows in the main pane. Note that not all layouts respond to this command. # Decrease the number of windows in the main pane.
# Note that not all layouts respond to this command.
decrease-main: decrease-main:
mod: mod1 mod: mod1
key: '.' key: '.'
# General purpose command for custom layouts. Functionality is layout-dependent. # General purpose command for custom layouts.
# Functionality is layout-dependent.
# command1: # command1:
# mod: <NONE> # mod: <NONE>
# key: <NONE> # key: <NONE>
# General purpose command for custom layouts. Functionality is layout-dependent. # General purpose command for custom layouts.
# Functionality is layout-dependent.
# command2: # command2:
# mod: <NONE> # mod: <NONE>
# key: <NONE> # key: <NONE>
# General purpose command for custom layouts. Functionality is layout-dependent. # General purpose command for custom layouts.
# Functionality is layout-dependent.
# command3: # command3:
# mod: <NONE> # mod: <NONE>
# key: <NONE> # key: <NONE>
# General purpose command for custom layouts. Functionality is layout-dependent. # General purpose command for custom layouts.
# Functionality is layout-dependent.
# command4: # command4:
# mod: <NONE> # mod: <NONE>
# key: <NONE> # key: <NONE>
@@ -133,42 +147,51 @@ focus-screen-cw:
mod: mod1 mod: mod1
key: n key: n
# Move the currently focused window onto the next screen in the list going counter-clockwise. # Move the currently focused window onto the next
# screen in the list going counter-clockwise.
swap-screen-ccw: swap-screen-ccw:
mod: mod2 mod: mod2
key: h key: h
# Move the currently focused window onto the next screen in the list going clockwise. # Move the currently focused window onto the next
# screen in the list going clockwise.
swap-screen-cw: swap-screen-cw:
mod: mod2 mod: mod2
key: l key: l
# Swap the position of the currently focused window with the next window in the list going counter-clockwise. # Swap the position of the currently focused window with
# the next window in the list going counter-clockwise.
swap-ccw: swap-ccw:
mod: mod2 mod: mod2
key: j key: j
# Swap the position of the currently focused window with the next window in the list going clockwise. # Swap the position of the currently focused window with
# the next window in the list going clockwise.
swap-cw: swap-cw:
mod: mod2 mod: mod2
key: k key: k
# Swap the position of the currently focused window with the main window in the list. # Swap the position of the currently focused window
# with the main window in the list.
swap-main: swap-main:
mod: mod1 mod: mod1
key: enter key: enter
# Move focus to the n-th screen in the list; e.g., focus-screen-3 will move mouse focus to the 3rd screen. Note that the main window in the given screen will be focused. # Move focus to the n-th screen in the list; e.g.,
# focus-screen-3 will move mouse focus to the 3rd screen.
# Note that the main window in the given screen will be focused.
#focus-screen-n: #focus-screen-n:
# focus-screen-<screen-number>: # focus-screen-<screen-number>:
# mod: mod1 # mod: mod1
# key: y # key: y
# Move the currently focused window to the n-th screen; e.g., throw-screen-3 will move the window to the 3rd screen. # Move the currently focused window to the n-th screen;
# e.g., throw-screen-3 will move the window to the 3rd screen.
# throw-screen-n: # throw-screen-n:
# throw-screen-<screen-number>: # throw-screen-<screen-number>:
# mod: mod1 # mod: mod1
# key: u # key: u
# Move the currently focused window to the n-th space; e.g., throw-space-3 will move the window to the 3rd space. # Move the currently focused window to the n-th space;
# e.g., throw-space-3 will move the window to the 3rd space.
# throw-space-<screen-number>: # throw-space-<screen-number>:
# mod: mod1 # mod: mod1
# key: i # key: i
@@ -203,7 +226,9 @@ throw-space-right:
mod: mod2 mod: mod2
key: right key: right
# Toggle the floating state of the currently focused window; i.e., if it was floating make it tiled and if it was tiled make it floating. # Toggle the floating state of the currently focused window;
# i.e., if it was floating make it tiled and if it was
# tiled make it floating.
toggle-float: toggle-float:
mod: mod1 mod: mod1
key: t key: t
@@ -236,10 +261,13 @@ relaunch-amethyst:
# disable screen padding on builtin display # disable screen padding on builtin display
disable-padding-on-builtin-display: false disable-padding-on-builtin-display: false
# Boolean flag for whether or not to add margins betwen windows (default false). # Boolean flag for whether to add margins between
# windows (default false).
window-margins: false window-margins: false
# Boolean flag for whether or not to set window margins if there is only one window on the screen, assuming window margins are enabled (default false). # Boolean flag for whether to set window margins if there is
# only one window on the screen, assuming window margins
# are enabled (default false).
smart-window-margins: true smart-window-margins: true
# # Add 10px margin between windows # # Add 10px margin between windows
@@ -248,39 +276,53 @@ smart-window-margins: true
# The size of the margins between windows (in px, default 0). # The size of the margins between windows (in px, default 0).
window-margin-size: 0 window-margin-size: 0
# The max number of windows that may be visible on a screen at one time before # The max number of windows that may be visible on a screen
# additional windows are minimized. A value of 0 disables the feature. # at one time before additional windows are minimized.
# A value of 0 disables the feature.
window-max-count: 0 window-max-count: 0
# The smallest height that a window can be sized to regardless of its layout frame (in px, default 0). # The smallest height that a window can be sized to
# regardless of its layout frame (in px, default 0).
window-minimum-height: 0 window-minimum-height: 0
# The smallest width that a window can be sized to regardless of its layout frame (in px, default 0) # The smallest width that a window can be sized to
# regardless of its layout frame (in px, default 0)
window-minimum-width: 0 window-minimum-width: 0
# List of bundle identifiers for applications to either be automatically floating or automatically tiled based on floating-is-blacklist (default []). # List of bundle identifiers for applications to either be automatically
# floating or automatically tiled based on floating-is-blacklist (default []).
floating: [] floating: []
# Boolean flag determining behavior of the floating list. # Boolean flag determining behavior of the floating list.
# true if the applications should be floating and all others tiled. false if the applications should be tiled and all others floating (default true). # true if the applications should be floating and all others tiled.
# false if the applications should be tiled and all others floating (default true).
floating-is-blacklist: false floating-is-blacklist: false
# true if screen frames should exclude the status bar. false if the screen frames should include the status bar (default false). # true if screen frames should exclude the status bar.
# false if the screen frames should include the status bar (default false).
ignore-menu-bar: false ignore-menu-bar: false
# true if windows smaller than a 500px square should be floating by default (default true) # true if windows smaller than a 500px square should
# be floating by default (default true)
float-small-windows: true float-small-windows: true
# true if the mouse should move position to the center of a window when it becomes focused (default false). Note that this is largely incompatible with focus-follows-mouse. # true if the mouse should move position to the center of a window
# when it becomes focused (default false).
# Note that this is largely incompatible with focus-follows-mouse.
mouse-follows-focus: false mouse-follows-focus: false
# true if the windows underneath the mouse should become focused as the mouse moves (default false). Note that this is largely incompatible with mouse-follows-focus # true if the windows underneath the mouse should become focused as
# the mouse moves (default false). Note that this is largely
# incompatible with mouse-follows-focus
focus-follows-mouse: false focus-follows-mouse: false
# true if dragging and dropping windows on to each other should swap their positions (default false). # true if dragging and dropping windows on to each other
# should swap their positions (default false).
mouse-swaps-windows: true mouse-swaps-windows: true
# true if changing the frame of a window with the mouse should update the layout to accommodate the change (default false). Note that not all layouts will be able to respond to the change. # true if changing the frame of a window with the mouse should update the
# layout to accommodate the change (default false).
# Note that not all layouts will be able to respond to the change.
mouse-resizes-windows: true mouse-resizes-windows: true
# true to display the name of the layout when a new layout is selected (default true). # true to display the name of the layout when a new layout is selected (default true).
@@ -292,13 +334,15 @@ enables-layout-hud-on-space-change: true
# true to get updates to beta versions of the software (default false). # true to get updates to beta versions of the software (default false).
use-canary-build: false use-canary-build: false
# true to insert new windows into the first position and false to insert new windows into the last position (default false). # true to insert new windows into the first position and
# false to insert new windows into the last position (default false).
new-windows-to-main: false new-windows-to-main: false
# true to automatically move to a space when throwing a window to it (default true). # true to automatically move to a space when throwing a window to it (default true).
follow-space-thrown-windows: true follow-space-thrown-windows: true
# The integer percentage of the screen dimension to increment and decrement main pane ratios by (default 5). # The integer percentage of the screen dimension to increment
# and decrement main pane ratios by (default 5).
window-resize-step: 5 window-resize-step: 5
# Padding to apply between windows and the left edge of the screen (in px, default 0). # Padding to apply between windows and the left edge of the screen (in px, default 0).

View File

@@ -1,3 +1,4 @@
---
# The editor to use with 'cheat -e <sheet>'. Defaults to $EDITOR or $VISUAL. # The editor to use with 'cheat -e <sheet>'. Defaults to $EDITOR or $VISUAL.
# editor: $EDITOR # editor: $EDITOR
@@ -37,7 +38,7 @@ pager: less -FRX
# #
# This is very useful when you would like to maintain, for example, a # This is very useful when you would like to maintain, for example, a
# "pristine" repository of community cheatsheets on one cheatpath, and an # "pristine" repository of community cheatsheets on one cheatpath, and an
# editable personal reponsity of cheatsheets on another cheatpath. # editable personal repository of cheatsheets on another cheatpath.
# #
# Cheatpaths can be also configured to automatically apply tags to cheatsheets # Cheatpaths can be also configured to automatically apply tags to cheatsheets
# on certain paths, which can be useful for querying purposes. # on certain paths, which can be useful for querying purposes.
@@ -71,7 +72,7 @@ cheatpaths:
tags: [pure-bash-bible] tags: [pure-bash-bible]
readonly: true readonly: true
- name: tldr - name: tldr
path: ~/.dotfiles/config/cheat/cheatsheets/tldr path: ~/.dotfiles/config/cheat/cheatsheets/tldr/tldr
tags: [tldr] tags: [tldr]
readonly: true readonly: true
# While it requires no configuration here, it's also worth noting that # While it requires no configuration here, it's also worth noting that

View File

@@ -2,11 +2,6 @@
# shellcheck shell=bash # shellcheck shell=bash
# vim: filetype=zsh # vim: filetype=zsh
# if cargo directory exists, add it to path
if [[ -d "$HOME/.local/share/cargo/bin" ]]; then
export PATH="$HOME/.local/share/cargo/bin:$PATH"
fi
# Cache commands using bkt if installed # Cache commands using bkt if installed
if command -v bkt >&/dev/null; then if command -v bkt >&/dev/null; then
bkt() bkt()
@@ -26,7 +21,7 @@ fi
# shorthand for checking if the system has the bin in path, # shorthand for checking if the system has the bin in path,
# this version does not use caching # this version does not use caching
# usage: have_command php && php -v # usage: have_command php && php -v
function have_command have_command()
{ {
command -v "$1" >&/dev/null command -v "$1" >&/dev/null
} }
@@ -34,21 +29,21 @@ function have_command
# shorthand for checking if the system has the bin in path, # shorthand for checking if the system has the bin in path,
# this version uses caching # this version uses caching
# usage: have php && php -v # usage: have php && php -v
function have have()
{ {
bkt -- which "$1" >&/dev/null bkt -- which "$1" >&/dev/null
} }
function brew_installed brew_installed()
{ {
bkt -- brew list bkt -- brew list
} }
# shorthand for checking if brew package is installed # shorthand for checking if brew package is installed
# usage: have_brew php && php -v # usage: have_brew php && php -v
function have_brew have_brew()
{ {
! have brew && return 125 ! x-have brew && return 125
if bkt -- brew list "$1" &> /dev/null; then if bkt -- brew list "$1" &> /dev/null; then
return 0 return 0
@@ -59,4 +54,3 @@ function have_brew
source "$DOTFILES/config/exports-shell" source "$DOTFILES/config/exports-shell"
source "$DOTFILES/config/exports-apps" source "$DOTFILES/config/exports-apps"

View File

@@ -7,6 +7,7 @@
# Antigen configuration # Antigen configuration
# https://github.com/zsh-users/antigen/wiki/Configuration # https://github.com/zsh-users/antigen/wiki/Configuration
export ADOTDIR="$XDG_DATA_HOME/antigen" export ADOTDIR="$XDG_DATA_HOME/antigen"
export ANTIGEN_CACHE="$XDG_CACHE_HOME/antigen"
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate" export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate" export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
@@ -21,15 +22,18 @@ x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
export ANDROID_HOME="$XDG_DATA_HOME/android" export ANDROID_HOME="$XDG_DATA_HOME/android"
# bob manages nvim versions # bob manages nvim versions
x-path-prepend "$XDG_DATA_HOME/bob/nvim-bin" export PATH="$XDG_DATA_HOME/bob/nvim-bin:$PATH"
x-have nvim && export EDITOR="nvim"
# bkt (shell command caching tool) configuration
export BKT_TTL=1m
# brew, https://docs.brew.sh/Manpage
export HOMEBREW_NO_ENV_HINTS=true export HOMEBREW_NO_ENV_HINTS=true
# composer, https://getcomposer.org/ # composer, https://getcomposer.org/
export COMPOSER_HOME="$XDG_STATE_HOME/composer" export COMPOSER_HOME="$XDG_STATE_HOME/composer"
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin" export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
x-path-append "$COMPOSER_BIN" export PATH="$COMPOSER_BIN:$PATH"
# docker, https://docs.docker.com/engine/reference/commandline/cli/ # docker, https://docs.docker.com/engine/reference/commandline/cli/
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker" export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
@@ -55,17 +59,11 @@ export NB_DIR="$XDG_STATE_HOME/nb"
# NPM: Add npm packages to path # NPM: Add npm packages to path
x-have node && { x-have node && {
NVM_NODE_BIN_DIR="$(dirname "$(which node)")" NVM_NODE_BIN_DIR="$(dirname "$(which node)")"
x-path-append "$NVM_NODE_BIN_DIR" export PATH="$NVM_NODE_BIN_DIR:$PATH"
} }
# op (1Password cli) is present # op (1Password cli) is present
export OP_CACHE="$XDG_STATE_HOME/1password" export OP_CACHE="$XDG_STATE_HOME/1password"
x-have op && {
[ "$DOTFILES_CURRENT_SHELL" = "zsh" ] && {
eval "$(op completion zsh)"
compdef _op op
}
}
# Python # Python
# #
@@ -73,7 +71,7 @@ x-have op && {
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"
x-have pyenv && { x-have pyenv && {
x-path-append "$PYENV_ROOT/shims" export PATH="$PYENV_ROOT/shims:$PATH"
eval "$(pyenv init -)" eval "$(pyenv init -)"
} }
@@ -87,16 +85,12 @@ export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
export RBENV_ROOT="$XDG_STATE_HOME/rbenv" export RBENV_ROOT="$XDG_STATE_HOME/rbenv"
x-dc "$RBENV_ROOT" x-dc "$RBENV_ROOT"
x-have gem && x-path-append "${GEM_HOME}/bin" x-have gem && export PATH="${GEM_HOME}/bin:$PATH"
x-have rbenv && {
[ "$DOTFILES_CURRENT_SHELL" = "zsh" ] && eval "$(rbenv init - zsh)"
[ "$DOTFILES_CURRENT_SHELL" = "bash" ] && eval "$(rbenv init - bash)"
}
# Rust / cargo # Rust / cargo
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"
x-path-append "$CARGO_HOME/bin" export PATH="$CARGO_HOME/bin:$PATH"
# screen # screen
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc" export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
@@ -104,6 +98,13 @@ export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
# sonarlint # sonarlint
export SONARLINT_USER_HOME="$XDG_DATA_HOME/sonarlint" export SONARLINT_USER_HOME="$XDG_DATA_HOME/sonarlint"
# terraform
# https://www.terraform.io/docs/cli/config/config-file.html
# https://www.terraform.io/docs/cli/config/environment-variables.html
export TF_DATA_DIR="$XDG_STATE_HOME/terraform"
export TF_CLI_CONFIG_FILE="$XDG_CONFIG_HOME/terraform/terraformrc"
export TF_PLUGIN_CACHE_DIR="$XDG_CACHE_HOME/terraform/plugin-cache"
# tldr / tealdeer # tldr / tealdeer
export TEALDEER_CONFIG_DIR="$XDG_CONFIG_HOME/tealdeer/" export TEALDEER_CONFIG_DIR="$XDG_CONFIG_HOME/tealdeer/"

View File

@@ -1,9 +1,9 @@
# lakka exports # lakka exports
## LUA ## LUA
have luarocks && $(luarocks path --bin) x-have luarocks && $(luarocks path --bin)
path_prepend "$HOME/.local/go/bin" export PATH="$HOME/.local/go/bin:$PATH"
alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state' alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
alias nano='nano -wS -$' alias nano='nano -wS -$'
@@ -17,4 +17,3 @@ export RVM_PATH="$HOME/.rvm"
export PATH="$RVM_PATH/bin:$PATH" export PATH="$RVM_PATH/bin:$PATH"
# shellcheck source=$HOME/.rvm/scripts/rvm # shellcheck source=$HOME/.rvm/scripts/rvm
[[ -s "$RVM_PATH/scripts/rvm" ]] && source "$RVM_PATH/scripts/rvm" # Load RVM into a shell session *as a function* [[ -s "$RVM_PATH/scripts/rvm" ]] && source "$RVM_PATH/scripts/rvm" # Load RVM into a shell session *as a function*

View File

@@ -3,21 +3,6 @@
# shellcheck disable=1091,2046 # shellcheck disable=1091,2046
# vim: filetype=bash # vim: filetype=bash
export DOTFILES="$HOME/.dotfiles"
# 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"
# custom variables
export XDG_BIN_HOME="$HOME/.local/bin"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_RUNTIME_DIR="$HOME/.local/run"
export LC_ALL=fi_FI.UTF-8
# Bash completion file location # Bash completion file location
export BASH_COMPLETION_USER_FILE="${XDG_CONFIG_HOME}/bash-completion/bash_completion" export BASH_COMPLETION_USER_FILE="${XDG_CONFIG_HOME}/bash-completion/bash_completion"
@@ -38,13 +23,13 @@ export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
export LESSHISTFILE="$XDG_STATE_HOME"/less/history export LESSHISTFILE="$XDG_STATE_HOME"/less/history
# Highlight section titles in manual pages # Highlight section titles in manual pages
export LESS_TERMCAP_md="$ORANGE" # export LESS_TERMCAP_md="$ORANGE"
# zsh autoloaded terminfo # zsh autoloaded terminfo
export TERMINFO="$XDG_DATA_HOME"/terminfo export TERMINFO="${XDG_DATA_HOME}/terminfo"
export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo export TERMINFO_DIRS="${XDG_DATA_HOME}/terminfo":/usr/share/terminfo
# Dont clear the screen after quitting a manual page # Don't clear the screen after quitting a manual page
export MANPAGER="less -X" export MANPAGER="less -X"
# Always enable colored `grep` output # Always enable colored `grep` output
@@ -53,4 +38,3 @@ export GREP_OPTIONS="--color=auto"
# check the window size after each command and, if necessary, # check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS. # update the values of LINES and COLUMNS.
hash shopt 2> /dev/null && shopt -s checkwinsize hash shopt 2> /dev/null && shopt -s checkwinsize

View File

@@ -1,3 +1,4 @@
---
check_for_updates: true check_for_updates: true
excluded_labels: excluded_labels:
- maintenance - maintenance

View File

@@ -1 +1,3 @@
---
git_protocol: https git_protocol: https
version: '1'

View File

@@ -1,3 +1,6 @@
---
github.com: github.com:
user: ivuorinen
git_protocol: https git_protocol: https
users:
ivuorinen:
user: ivuorinen

View File

@@ -18,3 +18,4 @@ composer.phar
wp_*.sh wp_*.sh
auth.json auth.json
dfm.sh dfm.sh
.scannerwork

View File

@@ -6,28 +6,17 @@ tap "gesquive/tap"
tap "github/gh" tap "github/gh"
tap "homebrew/autoupdate" tap "homebrew/autoupdate"
tap "homebrew/bundle" tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts" tap "homebrew/cask-fonts"
tap "homebrew/core"
tap "homebrew/services" tap "homebrew/services"
tap "jesseduffield/lazygit" tap "jesseduffield/lazygit"
tap "keith/formulae"
tap "mongodb/brew" tap "mongodb/brew"
tap "shivammathur/extensions" tap "shivammathur/extensions"
tap "shivammathur/php" tap "shivammathur/php"
tap "teamookla/speedtest" tap "teamookla/speedtest"
tap "xwmx/taps" tap "xwmx/taps"
# Run your GitHub Actions locally
brew "act"
# Mozilla CA certificate store
brew "ca-certificates"
# YAML Parser
brew "libyaml"
# Cryptography and SSL/TLS Toolkit
brew "openssl@3"
# 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"
# Generic-purpose lossless compression algorithm by Google # Generic-purpose lossless compression algorithm by Google
brew "brotli" brew "brotli"
# Library and utilities for processing GIFs # Library and utilities for processing GIFs
@@ -46,24 +35,20 @@ brew "jpeg-xl"
brew "aom" brew "aom"
# Apache Portable Runtime library # Apache Portable Runtime library
brew "apr" brew "apr"
# Mozilla CA certificate store
brew "ca-certificates"
# Cryptography and SSL/TLS Toolkit
brew "openssl@3"
# Companion library to apr, the Apache Portable Runtime library # Companion library to apr, the Apache Portable Runtime library
brew "apr-util" brew "apr-util"
# Password hashing library and CLI utility # Password hashing library and CLI utility
brew "argon2" brew "argon2"
# Open Source Kubernetes Marketplace # Open Source Kubernetes Marketplace
brew "arkade" brew "arkade"
# Automatic configure script builder
brew "autoconf"
# GNU multiple precision arithmetic library
brew "gmp"
# 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 # Spell checker with better logic than ispell
brew "aspell" brew "aspell"
# Official Amazon AWS command-line interface # Automatic configure script builder
brew "awscli" brew "autoconf"
# Bourne-Again SHell, a UNIX command interpreter # Bourne-Again SHell, a UNIX command interpreter
brew "bash" brew "bash"
# Clone of cat(1) with syntax highlighting and Git integration # Clone of cat(1) with syntax highlighting and Git integration
@@ -72,8 +57,6 @@ brew "bat"
brew "icu4c" brew "icu4c"
# Yet another cross-platform graphical process/system monitor # Yet another cross-platform graphical process/system monitor
brew "bottom" brew "bottom"
# Switch Apache / Valet / CLI configs between PHP versions
brew "brew-php-switcher"
# Software library to render fonts # Software library to render fonts
brew "freetype" brew "freetype"
# XML-based font configuration API for X Windows # XML-based font configuration API for X Windows
@@ -82,36 +65,26 @@ brew "fontconfig"
brew "gettext" brew "gettext"
# Core application library for C # Core application library for C
brew "glib" brew "glib"
# Manage compile and link flags for libraries
brew "pkg-config"
# Human-friendly and fast alternative to cut and (sometimes) awk # Human-friendly and fast alternative to cut and (sometimes) awk
brew "choose-rust" brew "choose-rust"
# Cross-platform make # Cross-platform make
brew "cmake" brew "cmake"
# GNU multiple precision arithmetic library
brew "gmp"
# GNU File, Shell, and Text utilities
brew "coreutils"
# Get, unpack, build, and install modules from CPAN # Get, unpack, build, and install modules from CPAN
brew "cpanminus" brew "cpanminus"
# Open source suite of directory software # Open source suite of directory software
brew "openldap" brew "openldap"
# Get a file from an HTTP, HTTPS or FTP server # Get a file from an HTTP, HTTPS or FTP server
brew "curl" brew "curl"
# Diff that understands syntax
brew "difftastic"
# Tool for exploring each layer in a docker image
brew "dive"
# Lightweight DNS forwarder and DHCP server # Lightweight DNS forwarder and DHCP server
brew "dnsmasq" brew "dnsmasq"
# Command-line DNS client
brew "dog"
# Lightning-fast linter for .env files written in Rust # Lightning-fast linter for .env files written in Rust
brew "dotenv-linter" brew "dotenv-linter"
# Tool to verify that your files are in harmony with your .editorconfig
brew "editorconfig-checker", link: false
# Useful examples at the command-line
brew "eg-examples"
# Spellchecker wrapping library # Spellchecker wrapping library
brew "enchant" brew "enchant"
# Run arbitrary commands when files change
brew "entr"
# Perl lib for reading and writing EXIF metadata # Perl lib for reading and writing EXIF metadata
brew "exiftool" brew "exiftool"
# Simple, fast and user-friendly alternative to find # Simple, fast and user-friendly alternative to find
@@ -127,7 +100,7 @@ brew "fzf"
# Graphics library to dynamically manipulate images # Graphics library to dynamically manipulate images
brew "gd" brew "gd"
# Disk usage analyzer with console interface written in Go # Disk usage analyzer with console interface written in Go
brew "gdu", link: false brew "gdu"
# GitHub command-line tool # GitHub command-line tool
brew "gh" brew "gh"
# Distributed revision control system # Distributed revision control system
@@ -138,8 +111,6 @@ brew "git-crypt"
brew "git-extras" brew "git-extras"
# See your latest local git branches, formatted real fancy # See your latest local git branches, formatted real fancy
brew "git-recent" brew "git-recent"
# Open-source GitLab command-line tool
brew "glab"
# Render markdown on the CLI # Render markdown on the CLI
brew "glow" brew "glow"
# GNU implementation of the famous stream editor # GNU implementation of the famous stream editor
@@ -174,10 +145,6 @@ brew "gzip"
brew "hadolint" brew "hadolint"
# Improved top (interactive process viewer) # Improved top (interactive process viewer)
brew "htop" brew "htop"
# Website copier/offline browser
brew "httrack"
# Configurable static site generator
brew "hugo"
# ISO/IEC 23008-12:2017 HEIF file format decoder and encoder # ISO/IEC 23008-12:2017 HEIF file format decoder and encoder
brew "libheif" brew "libheif"
# Tools and libraries to manipulate images in many formats # Tools and libraries to manipulate images in many formats
@@ -188,22 +155,22 @@ brew "irssi"
brew "jq" brew "jq"
# Network authentication protocol # Network authentication protocol
brew "krb5" brew "krb5"
# Lazier way to manage everything docker # Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
brew "lazydocker" brew "legitify"
# Postgres C API library # Postgres C API library
brew "libpq" brew "libpq"
# Linguistic software and Finnish dictionary # Manage compile and link flags for libraries
brew "libvoikko" brew "pkg-config"
# Rainbows and unicorns in your console! # YAML Parser
brew "lolcat" brew "libyaml"
# Interpreted, interactive, object-oriented programming language
brew "python@3.11"
# Package manager for the Lua programming language # Package manager for the Lua programming language
brew "luarocks" brew "luarocks"
# LZMA-based compression program similar to gzip or bzip2 # LZMA-based compression program similar to gzip or bzip2
brew "lzip" brew "lzip"
# Swiss Army Knife for macOS # Swiss Army Knife for macOS
brew "m-cli" brew "m-cli"
# Mac App Store command-line interface
brew "mas"
# Mongrel of mail user agents (part elm, pine, mush, mh, etc.) # Mongrel of mail user agents (part elm, pine, mush, mh, etc.)
brew "mutt" brew "mutt"
# NCurses Disk Usage # NCurses Disk Usage
@@ -222,24 +189,16 @@ brew "openjdk@11"
brew "openapi-generator" brew "openapi-generator"
# Development kit for the Java programming language # Development kit for the Java programming language
brew "openjdk" brew "openjdk"
# Swiss-army knife of markup format conversion
brew "pandoc"
# Highly capable, feature-rich programming language # Highly capable, feature-rich programming language
brew "perl" brew "perl"
# General-purpose scripting language # Coreutils progress viewer
brew "php@8.1" brew "progress"
# Simple Python style checker in one Python file
brew "pycodestyle"
# Python version management # Python version management
brew "pyenv" brew "pyenv"
# Migrate pip packages from one Python version to another # Migrate pip packages from one Python version to another
brew "pyenv-pip-migrate" brew "pyenv-pip-migrate"
# Pyenv plugin to manage virtualenv # Pyenv plugin to manage virtualenv
brew "pyenv-virtualenv" brew "pyenv-virtualenv"
# Interpreted, interactive, object-oriented programming language
brew "python@3.10"
# Interpreted, interactive, object-oriented programming language
brew "python@3.8"
# Ruby version manager # Ruby version manager
brew "rbenv" brew "rbenv"
# RC file (dotfile) management # RC file (dotfile) management
@@ -252,10 +211,6 @@ brew "rust"
brew "shellcheck" brew "shellcheck"
# Autoformat shell script source code # Autoformat shell script source code
brew "shfmt" brew "shfmt"
# Support CI generation of SBOMs via golang tooling
brew "spdx-sbom-generator"
# Version control system designed to be a better CVS
brew "subversion"
# Feature-rich console based todo list manager # Feature-rich console based todo list manager
brew "task" brew "task"
# Terminal user interface for taskwarrior # Terminal user interface for taskwarrior
@@ -270,62 +225,55 @@ brew "terragrunt"
brew "testssl" brew "testssl"
# Terraform version manager inspired by rbenv # Terraform version manager inspired by rbenv
brew "tfenv" brew "tfenv"
# Linter for Terraform files
brew "tflint"
# Static analysis security scanner for your terraform code # Static analysis security scanner for your terraform code
brew "tfsec" brew "tfsec"
# Programmatically correct mistyped console commands
brew "thefuck"
# Terminal multiplexer # Terminal multiplexer
brew "tmux" brew "tmux"
# Display directories as trees (with optional color/HTML output) # Display directories as trees (with optional color/HTML output)
brew "tree" 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 # Tool for creating isolated virtual python environments
brew "virtualenv" brew "virtualenv"
# Command-line interface to the WakaTime api # Command-line interface to the WakaTime api
brew "wakatime-cli" brew "wakatime-cli"
# Executes a program periodically, showing output fullscreen # Executes a program periodically, showing output fullscreen
brew "watch" brew "watch"
# Watch files and take action when they change
brew "watchman"
# Internet file retriever # Internet file retriever
brew "wget" brew "wget"
# Personal information dashboard for your terminal
brew "wtfutil"
# Check your $HOME for unwanted files and directories # Check your $HOME for unwanted files and directories
brew "xdg-ninja", args: ["HEAD"] brew "xdg-ninja", args: ["HEAD"]
# Hackable, minimal, fast TUI file explorer # Hackable, minimal, fast TUI file explorer
brew "xplr" brew "xplr"
# JavaScript package manager # JavaScript package manager
brew "yarn" brew "yarn"
# A vulnerability scanner for container images and filesystems
brew "anchore/grype/grype"
# High-performance load testing tool, written in Golang. # High-performance load testing tool, written in Golang.
brew "ddosify/tap/ddosify" brew "ddosify/tap/ddosify"
# lets you quickly switch between multiple git user profiles # lets you quickly switch between multiple git user profiles
brew "gesquive/tap/git-user" brew "gesquive/tap/git-user"
# A simple terminal UI for git commands, written in Go brew "keith/formulae/reminders-cli"
brew "jesseduffield/lazygit/lazygit"
# High-performance, schema-free, document-oriented database
brew "mongodb/brew/mongodb-community"
# Imagick PHP extension # Imagick PHP extension
brew "shivammathur/extensions/imagick@8.2" brew "shivammathur/extensions/imagick@8.2"
# Imagick PHP extension
brew "shivammathur/extensions/imagick@8.3"
# Mcrypt PHP extension
brew "shivammathur/extensions/mcrypt@8.3"
# PCOV PHP extension
brew "shivammathur/extensions/pcov@8.3"
# Redis PHP extension
brew "shivammathur/extensions/redis@8.3"
# Uuid PHP extension
brew "shivammathur/extensions/uuid@8.3"
# Xdebug PHP extension # Xdebug PHP extension
brew "shivammathur/extensions/xdebug@7.4" brew "shivammathur/extensions/xdebug@7.4"
# Xdebug PHP extension # Xdebug PHP extension
brew "shivammathur/extensions/xdebug@8.0" brew "shivammathur/extensions/xdebug@8.0"
# Xdebug PHP extension # Xdebug PHP extension
brew "shivammathur/extensions/xdebug@8.1" brew "shivammathur/extensions/xdebug@8.1"
# Yaml PHP extension
brew "shivammathur/extensions/yaml@8.3"
# General-purpose scripting language # General-purpose scripting language
brew "shivammathur/php/php" brew "shivammathur/php/php"
# General-purpose scripting language
brew "shivammathur/php/php@7.4"
# General-purpose scripting language
brew "shivammathur/php/php@8.0"
# Ookla Speedtest
brew "teamookla/speedtest/speedtest"
# Command-line interface for 1Password # Command-line interface for 1Password
cask "1password-cli" cask "1password-cli"
# GPU-accelerated terminal emulator # GPU-accelerated terminal emulator
@@ -340,7 +288,7 @@ cask "coda"
cask "dbeaver-community" cask "dbeaver-community"
# Database version management tool # Database version management tool
cask "dbngin" cask "dbngin"
# App to build and share containerized applications and microservices # App to build and share containerised applications and microservices
cask "docker" cask "docker"
# UI toolkit for building applications for mobile, web and desktop # UI toolkit for building applications for mobile, web and desktop
cask "flutter" cask "flutter"
@@ -362,12 +310,12 @@ cask "font-source-serif-pro"
cask "fontplop" cask "fontplop"
# GIT client # GIT client
cask "fork" cask "fork"
# Set of tools to manage resources and applications hosted on Google Cloud
cask "google-cloud-sdk"
# HTTP and GraphQL Client # HTTP and GraphQL Client
cask "insomnia" cask "insomnia"
# JetBrains tools manager # JetBrains tools manager
cask "jetbrains-toolbox" cask "jetbrains-toolbox"
# End-to-end encryption software
cask "keybase"
# Kubernetes IDE # Kubernetes IDE
cask "lens" cask "lens"
# Keep all tasks from your todo apps on your menu bar # Keep all tasks from your todo apps on your menu bar
@@ -378,19 +326,19 @@ cask "ngrok"
cask "notunes" cask "notunes"
# Knowledge base that works on top of a local folder of plain text Markdown files # Knowledge base that works on top of a local folder of plain text Markdown files
cask "obsidian" cask "obsidian"
# Scheduling application focusing on organization # Scheduling application focusing on organisation
cask "omnifocus" cask "omnifocus"
# Collaboration platform for API development # Collaboration platform for API development
cask "postman" cask "postman"
# Display image info and preview unsupported formats in QuickLook # Display image info and preview unsupported formats in QuickLook
cask "qlimagesize" cask "qlimagesize"
# QuickLook generator for Markdown files # Quick Look generator for Markdown files
cask "qlmarkdown" cask "qlmarkdown"
# QuickLook plugin for plaintext files without an extension # Quick Look plugin for plaintext files without an extension
cask "qlstephen" cask "qlstephen"
# QuickLook plugin for JSON files # Quick Look plugin for JSON files
cask "quicklook-json" cask "quicklook-json"
# QuickLook generator for Adobe Swatch Exchange files # Quick Look generator for Adobe Swatch Exchange files
cask "quicklookase" cask "quicklookase"
# Automatically hides or quits apps after periods of inactivity # Automatically hides or quits apps after periods of inactivity
cask "quitter" cask "quitter"
@@ -424,94 +372,5 @@ cask "vlc"
cask "voikkospellservice" cask "voikkospellservice"
# Rust-based terminal # Rust-based terminal
cask "warp" cask "warp"
mas "1Password for Safari", id: 1569813296 # Application for generating TOTP and HOTP codes
mas "Actions", id: 1586435171 cask "yubico-authenticator"
mas "Audiobook Builder", id: 1437681957
mas "Ivory", id: 6444602274
mas "Keynote", id: 409183694
mas "LastPass", id: 926036361
mas "Numbers", id: 409203825
mas "Pages", id: 409201541
mas "Pixelmator Pro", id: 1289583905
mas "Tailscale", id: 1475387142
mas "Xcode", id: 497799835
vscode "4ops.terraform"
vscode "adamiBs.terraform-live-graph"
vscode "akamud.vscode-theme-onelight"
vscode "amiralizadeh9480.laravel-extra-intellisense"
vscode "andrewleedham.vscode-css-modules"
vscode "andrewmcodes.tailwindcss-extension-pack"
vscode "austenc.tailwind-docs"
vscode "bmewburn.vscode-intelephense-client"
vscode "Box-Of-Hats.bemhelper"
vscode "bradlc.vscode-tailwindcss"
vscode "christian-kohler.npm-intellisense"
vscode "christian-kohler.path-intellisense"
vscode "DavidAnson.vscode-markdownlint"
vscode "dbaeumer.vscode-eslint"
vscode "DotJoshJohnson.xml"
vscode "eamodio.gitlens"
vscode "EditorConfig.EditorConfig"
vscode "esbenp.prettier-vscode"
vscode "formulahendry.auto-close-tag"
vscode "formulahendry.auto-rename-tag"
vscode "formulahendry.code-runner"
vscode "foxundermoon.shell-format"
vscode "gencer.html-slim-scss-css-class-completion"
vscode "GitHub.copilot"
vscode "GitHub.copilot-chat"
vscode "github.vscode-github-actions"
vscode "GitHub.vscode-pull-request-github"
vscode "GraphQL.vscode-graphql"
vscode "GraphQL.vscode-graphql-execution"
vscode "GraphQL.vscode-graphql-syntax"
vscode "hashicorp.terraform"
vscode "heybourn.headwind"
vscode "JohnnyMorganz.stylua"
vscode "jumpinjackie.vscode-map-preview"
vscode "k--kato.intellij-idea-keybindings"
vscode "liamhammett.inline-parameters"
vscode "macieklad.tailwind-sass-syntax"
vscode "MehediDracula.php-namespace-resolver"
vscode "mikestead.dotenv"
vscode "MisterJ.vue-volar-extention-pack"
vscode "MrChetan.phpstorm-parameter-hints-in-vscode"
vscode "mrorz.language-gettext"
vscode "ms-azuretools.vscode-azureterraform"
vscode "ms-azuretools.vscode-docker"
vscode "ms-python.python"
vscode "ms-python.vscode-pylance"
vscode "ms-toolsai.jupyter"
vscode "ms-toolsai.jupyter-renderers"
vscode "ms-toolsai.vscode-jupyter-cell-tags"
vscode "ms-toolsai.vscode-jupyter-slideshow"
vscode "ms-vscode-remote.remote-containers"
vscode "ms-vscode-remote.remote-wsl"
vscode "ms-vscode.azure-account"
vscode "ms-vscode.cpptools"
vscode "msjsdiag.vscode-react-native"
vscode "mtxr.sqltools"
vscode "neilbrayfield.php-docblocker"
vscode "nhoizey.gremlins"
vscode "octref.vetur"
vscode "oderwat.indent-rainbow"
vscode "pflannery.vscode-versionlens"
vscode "phiter.phpstorm-snippets"
vscode "sibiraj-s.vscode-scss-formatter"
vscode "SonarSource.sonarlint-vscode"
vscode "stylelint.vscode-stylelint"
vscode "sumneko.lua"
vscode "syler.sass-indented"
vscode "timonwong.shellcheck"
vscode "tootone.org-mode"
vscode "valeryanm.vscode-phpsab"
vscode "Vue.volar"
vscode "Vue.vscode-typescript-vue-plugin"
vscode "WakaTime.vscode-wakatime"
vscode "wix.vscode-import-cost"
vscode "XadillaX.viml"
vscode "xdebug.php-debug"
vscode "xdebug.php-pack"
vscode "yinfei.luahelper"
vscode "yoavbls.pretty-ts-errors"
vscode "ZainChen.json"

View File

@@ -1,6 +1,7 @@
{ {
"extras": [ "extras": [
"lazyvim.plugins.extras.coding.copilot", "lazyvim.plugins.extras.coding.copilot",
"lazyvim.plugins.extras.coding.yanky",
"lazyvim.plugins.extras.editor.aerial", "lazyvim.plugins.extras.editor.aerial",
"lazyvim.plugins.extras.editor.leap", "lazyvim.plugins.extras.editor.leap",
"lazyvim.plugins.extras.editor.symbols-outline", "lazyvim.plugins.extras.editor.symbols-outline",

View File

@@ -1,19 +1,22 @@
-- Keymaps are automatically loaded on the VeryLazy event -- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here -- Add any additional keymaps here
local wk = require("which-key")
local keymap = vim.keymap.set -- ╭──────────────────────────────────────────────────────────╮
-- │ Comment box │
-- ────────────────────────────────────────────────────────── -- ──────────────────────────────────────────────────────────
-- │ Comment box │ wk.register({
-- ╰──────────────────────────────────────────────────────────╯ ["<Leader>"] = {
local cb = require("comment-box") b = {
c = {
-- left aligned fixed size box with left aligned text name = "□ Comment boxes",
keymap({ "n", "v" }, "<Leader>bcb", cb.lbox, { desc = "Comment: Left aligned" }) b = { "<Cmd>CBccbox<CR>", "Box Title" },
-- centered adapted box with centered text t = { "<Cmd>CBllline<CR>", "Titled Line" },
keymap({ "n", "v" }, "<Leader>bcc", cb.ccbox, { desc = "Comment: Centered" }) l = { "<Cmd>CBline<CR>", "Simple Line" },
m = { "<Cmd>CBllbox14<CR>", "Marked" },
-- centered line d = { "<Cmd>CBd<CR>", "Remove a box" },
keymap("n", "<Leader>bcl", cb.cline, { desc = "Comment: Centered line" }) },
keymap("i", "<M-l>", cb.cline, { desc = "Comment: Centered line" }) },
},
})

View File

@@ -12,9 +12,14 @@ require("lazy").setup({
{ {
"LazyVim/LazyVim", "LazyVim/LazyVim",
import = "lazyvim.plugins", import = "lazyvim.plugins",
opts = {
colorscheme = "tokyonight",
},
}, },
{ {
"folke/tokyonight.nvim", "folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = { opts = {
style = "night", style = "night",
transparent = true, transparent = true,
@@ -23,6 +28,8 @@ require("lazy").setup({
sidebars = "transparent", sidebars = "transparent",
floats = "transparent", floats = "transparent",
}, },
dim_inactive = true,
lualine_bold = true,
}, },
}, },
{ import = "plugins" }, { import = "plugins" },
@@ -33,8 +40,8 @@ require("lazy").setup({
lazy = false, lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning, -- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install. -- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit -- version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver version = "*", -- try installing the latest stable version for plugins that support semver
}, },
install = { colorscheme = { "tokyonight" } }, install = { colorscheme = { "tokyonight" } },
checker = { enabled = true }, -- automatically check for plugin updates checker = { enabled = true }, -- automatically check for plugin updates

View File

@@ -15,6 +15,10 @@ return {
}, },
}, },
keys = { keys = {
{
"<leader>ba",
desc = "Annotations / Comments",
},
{ {
"<leader>baa", "<leader>baa",
function() function()
@@ -52,6 +56,15 @@ return {
}, },
}, },
}, },
{
"laytan/tailwind-sorter.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-lua/plenary.nvim" },
build = "cd formatter && npm i && npm run build",
config = true,
opts = {
on_save_enabled = true,
},
},
-- Describe the regexp under the cursor -- Describe the regexp under the cursor
-- https://github.com/bennypowers/nvim-regexplainer -- https://github.com/bennypowers/nvim-regexplainer
{ {
@@ -68,10 +81,12 @@ return {
-- Clarify and beautify your comments using boxes and lines. -- Clarify and beautify your comments using boxes and lines.
-- https://github.com/LudoPinelli/comment-box.nvim -- https://github.com/LudoPinelli/comment-box.nvim
{ "LudoPinelli/comment-box.nvim", opts = {} }, { "LudoPinelli/comment-box.nvim", opts = {} },
-- Mason
-- https://github.com/williamboman/mason.nvim
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
opts = { opts = function(_, opts)
ensure_installed = { vim.list_extend(opts.ensure_installed, {
"actionlint", "actionlint",
"ansible-language-server", "ansible-language-server",
"ansible-lint", "ansible-lint",
@@ -86,18 +101,24 @@ return {
"dockerfile-language-server", "dockerfile-language-server",
"editorconfig-checker", "editorconfig-checker",
"fixjson", "fixjson",
"flake8",
"html-lsp", "html-lsp",
"jq", "jq",
"jsonlint",
"luacheck",
"nginx-language-server", "nginx-language-server",
"php-cs-fixer", "php-cs-fixer",
"phpcs",
"phpmd",
"semgrep", "semgrep",
"sonarlint-language-server",
"stylua",
"shellcheck", "shellcheck",
"shfmt", "shfmt",
"flake8", "sonarlint-language-server",
}, "stylelint",
}, "stylua",
"yamllint",
})
end,
}, },
-- Vim plugin for automatic time tracking and metrics generated from your programming activity. -- Vim plugin for automatic time tracking and metrics generated from your programming activity.
-- https://github.com/wakatime/vim-wakatime -- https://github.com/wakatime/vim-wakatime

View File

@@ -1,24 +0,0 @@
return {
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"actionlint",
"ansible-lint",
"bash-language-server",
"commitlint",
"flake8",
"intelephense",
"jsonlint",
"luacheck",
"phpcs",
"phpmd",
"shellcheck",
"shfmt",
"stylelint",
"stylua",
"yamllint",
},
},
},
}

View File

@@ -1,5 +1,8 @@
-- luacheck: globals vim -- luacheck: globals vim
return { return {
-- Cloak allows you to overlay *'s over defined patterns in defined files.
-- https://github.com/laytan/cloak.nvim
{ "laytan/cloak.nvim" },
-- Not UFO in the sky, but an ultra fold in Neovim. -- Not UFO in the sky, but an ultra fold in Neovim.
-- https://github.com/kevinhwang91/nvim-ufo/ -- https://github.com/kevinhwang91/nvim-ufo/
{ {

150
config/oh-my-posh.omp.json Normal file
View File

@@ -0,0 +1,150 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": true,
"shell_integration": true,
"console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "cyan",
"style": "powerline",
"template": "{{ .Icon }}",
"type": "os"
},
{
"type": "session",
"style": "plain",
"template": " {{ if .SSHSession }} {{ .UserName }}@{{ end }}{{ .HostName }}"
},
{
"foreground": "cyan",
"properties": {
"style": "mixed"
},
"style": "plain",
"template": " {{ .Path }} ",
"type": "path",
"mapped_locations": {
"~/Code/*": "\uF09B"
}
},
{
"type": "git",
"style": "plain",
"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 }}",
"properties": {
"fetch_status": true,
"fetch_upstream_icon": true,
"untracked_modes": {
"~/Code/oh-my-posh/": "no"
}
}
},
{
"type": "terraform",
"style": "plain",
"foreground": "#000000",
"background": "#ebcc34",
"template": "{{.WorkspaceName}}"
}
],
"type": "prompt"
},
{
"alignment": "left",
"segments": [
{
"foreground": "#68a063",
"properties": {
"display_mode": "files",
"fetch_package_manager": true,
"fetch_version": true
},
"style": "plain",
"template": " {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}",
"type": "node"
},
{
"foreground": "#4063D8",
"properties": {
"display_mode": "files",
"fetch_version": true
},
"style": "plain",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"type": "crystal"
},
{
"foreground": "#DE3F24",
"properties": {
"display_mode": "files",
"fetch_version": true
},
"style": "plain",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"type": "ruby"
},
{
"foreground": "#FED142",
"properties": {
"display_mode": "context",
"fetch_virtual_env": false
},
"style": "plain",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}",
"type": "python"
},
{
"type": "php",
"style": "plain",
"template": "  {{ .Full }} "
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"background": "transparent",
"foreground": "lightGreen",
"foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"],
"properties": {
"always_enabled": true
},
"style": "plain",
"template": "\u279c",
"type": "status"
}
],
"type": "prompt"
}
],
"transient_prompt": {
"background": "transparent",
"foreground": "lightGreen",
"foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"],
"template": "\u279c "
},
"tooltips": [
{
"type": "git",
"tips": ["git", "g"],
"style": "diamond",
"foreground": "#193549",
"background": "#fffb38",
"leading_diamond": "",
"trailing_diamond": "",
"template": "{{ .HEAD }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}",
"properties": {
"fetch_status": true,
"fetch_upstream_icon": true
}
}
],
"version": 2
}

View File

@@ -0,0 +1,2 @@
plugin_cache_dir = "$HOME/.cache/terraform/plugin-cache"

View File

@@ -8,8 +8,8 @@
# │ Bindings │ # │ Bindings │
# ╰──────────────────────────────────────────────────────────╯ # ╰──────────────────────────────────────────────────────────╯
# Set <prefix> to Control + Space # Set <prefix> to Control + Space, keeping the default of C-b intact.
unbind C-b # unbind C-b
set -g prefix C-Space set -g prefix C-Space
bind C-Space send-prefix bind C-Space send-prefix
@@ -67,6 +67,9 @@ bind p paste-buffer
# │ Settings │ # │ Settings │
# ╰──────────────────────────────────────────────────────────╯ # ╰──────────────────────────────────────────────────────────╯
# Setting status on
set -g status "on"
# Expose window title # Expose window title
set-option -g set-titles on set-option -g set-titles on
@@ -85,8 +88,25 @@ set-option -g renumber-windows on
# set vi-mode # set vi-mode
set-window-option -g mode-keys vi set-window-option -g mode-keys vi
# Set theme to tokyonight # ╭──────────────────────────────────────────────────────────╮
source-file ~/.dotfiles/config/tmux/tokyonight_storm.tmux # │ Theme │
# ╰──────────────────────────────────────────────────────────╯
# Make sure status sides are long enough and centered is in the middle
set -g status-left-length "30"
set -g status-right-length "30"
set-option -g status-position "bottom"
set-option -g status-style 'bg=default,fg=#ffffff'
set-option -g status-justify centre
set-option -g status-left '#h '
set-window-option -g window-status-style 'fg=#ffffff,bg=default'
set-option -g window-status-format ' #I:#W '
set-window-option -g window-status-current-style 'fg=#111111,bg=#7aa2f7'
set-option -g window-status-current-format ' #I:#W#{?window_zoomed_flag,  , } '
set-option -g status-left "#{hostname_short}/#S"
set-option -g status-right "%H:%M #{tmux_mode_indicator}"
# ╭──────────────────────────────────────────────────────────╮ # ╭──────────────────────────────────────────────────────────╮
# │ Plugins related configurations │ # │ Plugins related configurations │
@@ -100,19 +120,25 @@ set -g @suspend_key 'F12'
## A plugin to name your tmux windows smartly. ## A plugin to name your tmux windows smartly.
## https://github.com/ofirgall/tmux-window-name ## https://github.com/ofirgall/tmux-window-name
### Maximum name length of a window ### Maximum name length of a window
set -g @tmux_window_name_max_name_len "30" set -g @tmux_window_name_max_name_len "20"
### Replace $HOME with ~ in window names ### Replace $HOME with ~ in window names
set -g @tmux_window_name_use_tilde "True" set -g @tmux_window_name_use_tilde "True"
set -g @tmux_window_name_shells "['bash', 'fish', 'sh', 'zsh']"
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git']"
set -g @tmux_window_name_ignored_programs "['sqlite3', 'x-set-php-aliases']" # Default is []
## https://github.com/tmux-plugins/tmux-continuum ## https://github.com/tmux-plugins/tmux-continuum
set -g @continuum-restore 'on' set -g @continuum-restore 'on'
## https://github.com/tmux-plugins/tmux-resurrect ## https://github.com/tmux-plugins/tmux-resurrect
set -g @resurrect-strategy-nvim 'session' set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-dir '$HOME/.local/state/tmux/tmux-resurrect' set -g @resurrect-dir '~/.local/state/tmux/tmux-resurrect'
# Modified from tokyonight_storm to include tmux_mode_indicator ## https://github.com/MunifTanjim/tmux-mode-indicator
set -g status-right "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#1f2335] #{prefix_highlight} #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] %Y-%m-%d  %H:%M #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#1d202f,bg=#7aa2f7,bold] #h #{tmux_mode_indicator}" set -g @mode_indicator_prefix_mode_style 'bg=default,fg=#7aa2f7'
set -g @mode_indicator_copy_mode_style 'bg=default,fg=yellow'
set -g @mode_indicator_empty_mode_style 'bg=default,fg=#7aa2f7'
set -g @mode_indicator_sync_mode_style 'bg=default,fg=red'
# ╭──────────────────────────────────────────────────────────╮ # ╭──────────────────────────────────────────────────────────╮
# │ Plugins │ # │ Plugins │
@@ -126,4 +152,5 @@ run-shell ~/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux
run-shell ~/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux
run-shell ~/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux
run-shell ~/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux
run-shell ~/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/current_pane_hostname.tmux

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# TokyoNight colors for Tmux
set -g mode-style "fg=#7aa2f7,bg=#3b4261"
set -g message-style "fg=#7aa2f7,bg=#3b4261"
set -g message-command-style "fg=#7aa2f7,bg=#3b4261"
set -g pane-border-style "fg=#3b4261"
set -g pane-active-border-style "fg=#7aa2f7"
set -g status "on"
set -g status-justify "left"
set -g status-style "fg=#7aa2f7,bg=#1f2335"
set -g status-left-length "100"
set -g status-right-length "100"
set -g status-left-style NONE
set -g status-right-style NONE
set -g status-left "#[fg=#1d202f,bg=#7aa2f7,bold] #S #[fg=#7aa2f7,bg=#1f2335,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#1f2335] #{prefix_highlight} #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] %Y-%m-%d  %I:%M %p #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#1d202f,bg=#7aa2f7,bold] #h "
if-shell '[ "$(tmux show-option -gqv "clock-mode-style")" == "24" ]' {
set -g status-right "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#1f2335] #{prefix_highlight} #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] %Y-%m-%d  %H:%M #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#1d202f,bg=#7aa2f7,bold] #h "
}
setw -g window-status-activity-style "underscore,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-format "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]#[default] #I  #W #F #[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#1f2335,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261,bold] #I  #W #F #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]"
# tmux-plugins/tmux-prefix-highlight support
set -g @prefix_highlight_output_prefix "#[fg=#e0af68]#[bg=#1f2335]#[fg=#1f2335]#[bg=#e0af68]"
set -g @prefix_highlight_output_suffix ""

15
config/user-dirs.dirs Normal file
View File

@@ -0,0 +1,15 @@
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"

1
config/user-dirs.locale Normal file
View File

@@ -0,0 +1 @@
en_US

View File

@@ -1,3 +1,4 @@
---
wtf: wtf:
colors: colors:
background: black background: black

View File

@@ -3,296 +3,80 @@
Leader: `<ctrl><space>` Leader: `<ctrl><space>`
``` ```
bind-key -T copy-mode C-Space send-keys -X begin-selection C-o Rotate through the panes
bind-key -T copy-mode C-a send-keys -X start-of-line C-z Suspend the current client
bind-key -T copy-mode C-b send-keys -X cursor-left Space Select next layout
bind-key -T copy-mode C-c send-keys -X cancel # List all paste buffers
bind-key -T copy-mode C-e send-keys -X end-of-line $ Rename current session
bind-key -T copy-mode C-f send-keys -X cursor-right % Split window horizontally
bind-key -T copy-mode C-g send-keys -X clear-selection & Kill current window
bind-key -T copy-mode C-k send-keys -X copy-pipe-end-of-line-and-cancel ' Prompt for window index to select
bind-key -T copy-mode C-n send-keys -X cursor-down ( Switch to previous client
bind-key -T copy-mode C-p send-keys -X cursor-up ) Switch to next client
bind-key -T copy-mode C-r command-prompt -i -I "#{pane_search_string}" -T search -p "(search up)" { send-keys -X search-backward-incremental "%%" } , Rename current window
bind-key -T copy-mode C-s command-prompt -i -I "#{pane_search_string}" -T search -p "(search down)" { send-keys -X search-forward-incremental "%%" } - Delete the most recent paste buffer
bind-key -T copy-mode C-v send-keys -X page-down . Move the current window
bind-key -T copy-mode C-w send-keys -X copy-pipe-and-cancel / Describe key binding
bind-key -T copy-mode Escape send-keys -X cancel 0 Select window 0
bind-key -T copy-mode Space send-keys -X page-down 1 Select window 1
bind-key -T copy-mode ! send-keys -X copy-pipe-and-cancel "tr -d ' 2 Select window 2
' | pbcopy" 3 Select window 3
bind-key -T copy-mode , send-keys -X jump-reverse 4 Select window 4
bind-key -T copy-mode \; send-keys -X jump-again 5 Select window 5
bind-key -T copy-mode F command-prompt -1 -p "(jump backward)" { send-keys -X jump-backward "%%" } 6 Select window 6
bind-key -T copy-mode N send-keys -X search-reverse 7 Select window 7
bind-key -T copy-mode P send-keys -X toggle-position 8 Select window 8
bind-key -T copy-mode R send-keys -X rectangle-toggle 9 Select window 9
bind-key -T copy-mode T command-prompt -1 -p "(jump to backward)" { send-keys -X jump-to-backward "%%" } : Prompt for a command
bind-key -T copy-mode X send-keys -X set-mark ; Move to the previously active pane
bind-key -T copy-mode Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer" = Choose a paste buffer from a list
bind-key -T copy-mode f command-prompt -1 -p "(jump forward)" { send-keys -X jump-forward "%%" } ? List key bindings
bind-key -T copy-mode g command-prompt -p "(goto line)" { send-keys -X goto-line "%%" } D Choose a client from a list
bind-key -T copy-mode n send-keys -X search-again E Spread panes out evenly
bind-key -T copy-mode q send-keys -X cancel L Switch to the last client
bind-key -T copy-mode r send-keys -X refresh-from-pane M Clear the marked pane
bind-key -T copy-mode t command-prompt -1 -p "(jump to forward)" { send-keys -X jump-to-forward "%%" } ] Paste the most recent paste buffer
bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel pbcopy c Create a new window
bind-key -T copy-mode MouseDown1Pane select-pane d Detach the current client
bind-key -T copy-mode MouseDrag1Pane select-pane \; send-keys -X begin-selection f Search for a pane
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel i Display window information
bind-key -T copy-mode WheelUpPane select-pane \; send-keys -X -N 5 scroll-up m Toggle the marked pane
bind-key -T copy-mode WheelDownPane select-pane \; send-keys -X -N 5 scroll-down n Select the next window
bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel o Select the next pane
bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel q Display pane numbers
bind-key -T copy-mode Home send-keys -X start-of-line s Choose a session from a list
bind-key -T copy-mode End send-keys -X end-of-line t Show a clock
bind-key -T copy-mode NPage send-keys -X page-down w Choose a window from a list
bind-key -T copy-mode PPage send-keys -X page-up x Kill the active pane
bind-key -T copy-mode Up send-keys -X cursor-up z Zoom the active pane
bind-key -T copy-mode Down send-keys -X cursor-down { Swap the active pane with the pane above
bind-key -T copy-mode Left send-keys -X cursor-left } Swap the active pane with the pane below
bind-key -T copy-mode Right send-keys -X cursor-right ~ Show messages
bind-key -T copy-mode M-C-b send-keys -X previous-matching-bracket DC Reset so the visible part of the window follows the cursor
bind-key -T copy-mode M-C-f send-keys -X next-matching-bracket PPage Enter copy mode and scroll up
bind-key -T copy-mode M-1 command-prompt -N -I 1 -p (repeat) { send-keys -N "%%" } Up Select the pane above the active pane
bind-key -T copy-mode M-2 command-prompt -N -I 2 -p (repeat) { send-keys -N "%%" } Down Select the pane below the active pane
bind-key -T copy-mode M-3 command-prompt -N -I 3 -p (repeat) { send-keys -N "%%" } Left Select the pane to the left of the active pane
bind-key -T copy-mode M-4 command-prompt -N -I 4 -p (repeat) { send-keys -N "%%" } Right Select the pane to the right of the active pane
bind-key -T copy-mode M-5 command-prompt -N -I 5 -p (repeat) { send-keys -N "%%" } M-1 Set the even-horizontal layout
bind-key -T copy-mode M-6 command-prompt -N -I 6 -p (repeat) { send-keys -N "%%" } M-2 Set the even-vertical layout
bind-key -T copy-mode M-7 command-prompt -N -I 7 -p (repeat) { send-keys -N "%%" } M-3 Set the main-horizontal layout
bind-key -T copy-mode M-8 command-prompt -N -I 8 -p (repeat) { send-keys -N "%%" } M-4 Set the main-vertical layout
bind-key -T copy-mode M-9 command-prompt -N -I 9 -p (repeat) { send-keys -N "%%" } M-5 Select the tiled layout
bind-key -T copy-mode M-< send-keys -X history-top M-n Select the next window with an alert
bind-key -T copy-mode M-> send-keys -X history-bottom M-o Rotate through the panes in reverse
bind-key -T copy-mode M-R send-keys -X top-line M-p Select the previous window with an alert
bind-key -T copy-mode M-b send-keys -X previous-word M-Up Resize the pane up by 5
bind-key -T copy-mode M-f send-keys -X next-word-end M-Down Resize the pane down by 5
bind-key -T copy-mode M-m send-keys -X back-to-indentation M-Left Resize the pane left by 5
bind-key -T copy-mode M-r send-keys -X middle-line M-Right Resize the pane right by 5
bind-key -T copy-mode M-v send-keys -X page-up C-Up Resize the pane up
bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel C-Down Resize the pane down
bind-key -T copy-mode M-x send-keys -X jump-to-mark C-Left Resize the pane left
bind-key -T copy-mode M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer" C-Right Resize the pane right
bind-key -T copy-mode "M-{" send-keys -X previous-paragraph S-Up Move the visible part of the window up
bind-key -T copy-mode "M-}" send-keys -X next-paragraph S-Down Move the visible part of the window down
bind-key -T copy-mode M-Up send-keys -X halfpage-up S-Left Move the visible part of the window left
bind-key -T copy-mode M-Down send-keys -X halfpage-down S-Right Move the visible part of the window right
bind-key -T copy-mode C-Up send-keys -X scroll-up
bind-key -T copy-mode C-Down send-keys -X scroll-down
bind-key -T copy-mode-vi C-b send-keys -X page-up
bind-key -T copy-mode-vi C-c send-keys -X cancel
bind-key -T copy-mode-vi C-d send-keys -X halfpage-down
bind-key -T copy-mode-vi C-e send-keys -X scroll-down
bind-key -T copy-mode-vi C-f send-keys -X page-down
bind-key -T copy-mode-vi C-h send-keys -X cursor-left
bind-key -T copy-mode-vi C-j send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi C-u send-keys -X halfpage-up
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi C-y send-keys -X scroll-up
bind-key -T copy-mode-vi Escape send-keys -X clear-selection
bind-key -T copy-mode-vi Space send-keys -X begin-selection
bind-key -T copy-mode-vi ! send-keys -X copy-pipe-and-cancel "tr -d '
' | pbcopy"
bind-key -T copy-mode-vi \# send-keys -FX search-backward "#{copy_cursor_word}"
bind-key -T copy-mode-vi \$ send-keys -X end-of-line
bind-key -T copy-mode-vi \% send-keys -X next-matching-bracket
bind-key -T copy-mode-vi * send-keys -FX search-forward "#{copy_cursor_word}"
bind-key -T copy-mode-vi , send-keys -X jump-reverse
bind-key -T copy-mode-vi / command-prompt -T search -p "(search down)" { send-keys -X search-forward "%%" }
bind-key -T copy-mode-vi 0 send-keys -X start-of-line
bind-key -T copy-mode-vi 1 command-prompt -N -I 1 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 2 command-prompt -N -I 2 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 3 command-prompt -N -I 3 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 4 command-prompt -N -I 4 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 5 command-prompt -N -I 5 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 6 command-prompt -N -I 6 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 7 command-prompt -N -I 7 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 8 command-prompt -N -I 8 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 9 command-prompt -N -I 9 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi : command-prompt -p "(goto line)" { send-keys -X goto-line "%%" }
bind-key -T copy-mode-vi \; send-keys -X jump-again
bind-key -T copy-mode-vi ? command-prompt -T search -p "(search up)" { send-keys -X search-backward "%%" }
bind-key -T copy-mode-vi A send-keys -X append-selection-and-cancel
bind-key -T copy-mode-vi B send-keys -X previous-space
bind-key -T copy-mode-vi D send-keys -X copy-pipe-end-of-line-and-cancel
bind-key -T copy-mode-vi E send-keys -X next-space-end
bind-key -T copy-mode-vi F command-prompt -1 -p "(jump backward)" { send-keys -X jump-backward "%%" }
bind-key -T copy-mode-vi G send-keys -X history-bottom
bind-key -T copy-mode-vi H send-keys -X top-line
bind-key -T copy-mode-vi J send-keys -X scroll-down
bind-key -T copy-mode-vi K send-keys -X scroll-up
bind-key -T copy-mode-vi L send-keys -X bottom-line
bind-key -T copy-mode-vi M send-keys -X middle-line
bind-key -T copy-mode-vi N send-keys -X search-reverse
bind-key -T copy-mode-vi P send-keys -X toggle-position
bind-key -T copy-mode-vi T command-prompt -1 -p "(jump to backward)" { send-keys -X jump-to-backward "%%" }
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi W send-keys -X next-space
bind-key -T copy-mode-vi X send-keys -X set-mark
bind-key -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
bind-key -T copy-mode-vi ^ send-keys -X back-to-indentation
bind-key -T copy-mode-vi b send-keys -X previous-word
bind-key -T copy-mode-vi e send-keys -X next-word-end
bind-key -T copy-mode-vi f command-prompt -1 -p "(jump forward)" { send-keys -X jump-forward "%%" }
bind-key -T copy-mode-vi g send-keys -X history-top
bind-key -T copy-mode-vi h send-keys -X cursor-left
bind-key -T copy-mode-vi j send-keys -X cursor-down
bind-key -T copy-mode-vi k send-keys -X cursor-up
bind-key -T copy-mode-vi l send-keys -X cursor-right
bind-key -T copy-mode-vi n send-keys -X search-again
bind-key -T copy-mode-vi o send-keys -X other-end
bind-key -T copy-mode-vi q send-keys -X cancel
bind-key -T copy-mode-vi r send-keys -X refresh-from-pane
bind-key -T copy-mode-vi t command-prompt -1 -p "(jump to forward)" { send-keys -X jump-to-forward "%%" }
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi w send-keys -X next-word
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel pbcopy
bind-key -T copy-mode-vi \{ send-keys -X previous-paragraph
bind-key -T copy-mode-vi \} send-keys -X next-paragraph
bind-key -T copy-mode-vi MouseDown1Pane select-pane
bind-key -T copy-mode-vi MouseDrag1Pane select-pane \; send-keys -X begin-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 5 scroll-up
bind-key -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 5 scroll-down
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi BSpace send-keys -X cursor-left
bind-key -T copy-mode-vi NPage send-keys -X page-down
bind-key -T copy-mode-vi PPage send-keys -X page-up
bind-key -T copy-mode-vi Up send-keys -X cursor-up
bind-key -T copy-mode-vi Down send-keys -X cursor-down
bind-key -T copy-mode-vi Left send-keys -X cursor-left
bind-key -T copy-mode-vi Right send-keys -X cursor-right
bind-key -T copy-mode-vi M-x send-keys -X jump-to-mark
bind-key -T copy-mode-vi M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer"
bind-key -T copy-mode-vi C-Up send-keys -X scroll-up
bind-key -T copy-mode-vi C-Down send-keys -X scroll-down
bind-key -T prefix C-Space send-prefix
bind-key -T prefix C-n next-window
bind-key -T prefix C-o rotate-window
bind-key -T prefix C-p previous-window
bind-key -T prefix C-r run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/scripts/restore.sh
bind-key -T prefix C-s run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/scripts/save.sh
bind-key -T prefix C-z suspend-client
bind-key -T prefix Escape copy-mode
bind-key -T prefix Space next-layout
bind-key -T prefix ! split-window -h -c "#{pane_current_path}"
bind-key -T prefix \" split-window -v -c "#{pane_current_path}"
bind-key -T prefix \# list-buffers
bind-key -T prefix \$ command-prompt -I "#S" { rename-session "%%" }
bind-key -T prefix \% split-window -h
bind-key -T prefix & confirm-before -p "kill-window #W? (y/n)" kill-window
bind-key -T prefix \' command-prompt -T window-target -p index { select-window -t ":%%" }
bind-key -T prefix ( switch-client -p
bind-key -T prefix ) switch-client -n
bind-key -T prefix , command-prompt -I "#W" { rename-window "%%" }
bind-key -T prefix - delete-buffer
bind-key -T prefix . command-prompt -T target { move-window -t "%%" }
bind-key -T prefix / command-prompt -k -p key { list-keys -1N "%%" }
bind-key -T prefix 0 select-window -t :=0
bind-key -T prefix 1 select-window -t :=1
bind-key -T prefix 2 select-window -t :=2
bind-key -T prefix 3 select-window -t :=3
bind-key -T prefix 4 select-window -t :=4
bind-key -T prefix 5 select-window -t :=5
bind-key -T prefix 6 select-window -t :=6
bind-key -T prefix 7 select-window -t :=7
bind-key -T prefix 8 select-window -t :=8
bind-key -T prefix 9 select-window -t :=9
bind-key -T prefix : command-prompt
bind-key -T prefix \; last-pane
bind-key -T prefix < display-menu -T "#[align=centre]#{window_index}:#{window_name}" -x W -y W "#{?#{>:#{session_windows},1},,-}Swap Left" l { swap-window -t :-1 } "#{?#{>:#{session_windows},1},,-}Swap Right" r { swap-window -t :+1 } "#{?pane_marked_set,,-}Swap Marked" s { swap-window } '' Kill X { kill-window } Respawn R { respawn-window -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } Rename n { command-prompt -F -I "#W" { rename-window -t "#{window_id}" "%%" } } '' "New After" w { new-window -a } "New At End" W { new-window }
bind-key -T prefix = choose-buffer -Z
bind-key -T prefix > display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -x P -y P "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < { send-keys -X history-top } "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > { send-keys -X history-bottom } '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r { if-shell -F "#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}" "copy-mode -t=" ; send-keys -X -t = search-backward "#{q:mouse_word}" } "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y { copy-mode -q ; send-keys -l "#{q:mouse_word}" } "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c { copy-mode -q ; set-buffer "#{q:mouse_word}" } "#{?mouse_line,Copy Line,}" l { copy-mode -q ; set-buffer "#{q:mouse_line}" } '' "Horizontal Split" h { split-window -h } "Vertical Split" v { split-window -v } '' "#{?#{>:#{window_panes},1},,-}Swap Up" u { swap-pane -U } "#{?#{>:#{window_panes},1},,-}Swap Down" d { swap-pane -D } "#{?pane_marked_set,,-}Swap Marked" s { swap-pane } '' Kill X { kill-pane } Respawn R { respawn-pane -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z { resize-pane -Z }
bind-key -T prefix ? list-keys -N
bind-key -T prefix @ run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/scripts/promote_pane.sh '#{session_name}' '#{pane_id}' '#{pane_current_path}'"
bind-key -T prefix C run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/scripts/new_session_prompt.sh
bind-key -T prefix D choose-client -Z
bind-key -T prefix E select-layout -E
bind-key -T prefix I run-shell $HOME/.dotfiles/config/tmux/plugins/tpm/bindings/install_plugins
bind-key -T prefix L switch-client -l
bind-key -T prefix M select-pane -M
bind-key -T prefix N new-window
bind-key -T prefix R run-shell " \
tmux source-file ~/.tmux.conf > /dev/null; \
tmux display-message \"Sourced .tmux.conf!\""
bind-key -T prefix S switch-client -l
bind-key -T prefix U run-shell $HOME/.dotfiles/config/tmux/plugins/tpm/bindings/update_plugins
bind-key -T prefix X run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/scripts/kill_session_prompt.sh '#{session_name}' '#{session_id}'"
bind-key -T prefix Y run-shell -b $HOME/.dotfiles/config/tmux/plugins/tmux-yank/scripts/copy_pane_pwd.sh
bind-key -T prefix ] paste-buffer -p
bind-key -T prefix c new-window
bind-key -T prefix d detach-client
bind-key -T prefix f command-prompt { find-window -Z "%%" }
bind-key -T prefix g run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/scripts/goto_session.sh
bind-key -T prefix h select-pane -L
bind-key -T prefix i display-message
bind-key -T prefix j select-pane -D
bind-key -T prefix k select-pane -U
bind-key -T prefix l select-pane -R
bind-key -T prefix m run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-menus/items/main.sh
bind-key -T prefix n next-window
bind-key -T prefix o select-pane -t :.+
bind-key -T prefix p paste-buffer
bind-key -T prefix q display-panes
bind-key -T prefix r source-file $HOME/.dotfiles/config/tmux/tmux.conf \; display-message "tmux cfg reloaded!"
bind-key -T prefix s choose-tree -Zs
bind-key -T prefix t clock-mode
bind-key -T prefix w choose-tree -Zw
bind-key -T prefix x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind-key -T prefix y run-shell -b $HOME/.dotfiles/config/tmux/plugins/tmux-yank/scripts/copy_line.sh
bind-key -T prefix z resize-pane -Z
bind-key -T prefix \{ swap-pane -U
bind-key -T prefix \} swap-pane -D
bind-key -T prefix \~ show-messages
bind-key -r -T prefix DC refresh-client -c
bind-key -T prefix PPage copy-mode -u
bind-key -r -T prefix Up select-pane -U
bind-key -r -T prefix Down select-pane -D
bind-key -r -T prefix Left select-pane -L
bind-key -r -T prefix Right select-pane -R
bind-key -T prefix M-1 select-layout even-horizontal
bind-key -T prefix M-2 select-layout even-vertical
bind-key -T prefix M-3 select-layout main-horizontal
bind-key -T prefix M-4 select-layout main-vertical
bind-key -T prefix M-5 select-layout tiled
bind-key -T prefix M-c attach-session -c "#{pane_current_path}"
bind-key -T prefix M-n next-window -a
bind-key -T prefix M-o rotate-window -D
bind-key -T prefix M-p previous-window -a
bind-key -T prefix M-u run-shell $HOME/.dotfiles/config/tmux/plugins/tpm/bindings/clean_plugins
bind-key -r -T prefix M-Up resize-pane -U 5
bind-key -r -T prefix M-Down resize-pane -D 5
bind-key -r -T prefix M-Left resize-pane -L 5
bind-key -r -T prefix M-Right resize-pane -R 5
bind-key -r -T prefix C-Up resize-pane -U
bind-key -r -T prefix C-Down resize-pane -D
bind-key -r -T prefix C-Left resize-pane -L
bind-key -r -T prefix C-Right resize-pane -R
bind-key -r -T prefix S-Up refresh-client -U 10
bind-key -r -T prefix S-Down refresh-client -D 10
bind-key -r -T prefix S-Left refresh-client -L 10
bind-key -r -T prefix S-Right refresh-client -R 10
bind-key -T root MouseDown1Pane select-pane -t = \; send-keys -M
bind-key -T root MouseDown1Status select-window -t =
bind-key -T root MouseDown2Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { paste-buffer -p }
bind-key -T root MouseDown3Pane if-shell -F -t = "#{||:#{mouse_any_flag},#{&&:#{pane_in_mode},#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}}}" { select-pane -t = ; send-keys -M } { display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -t = -x M -y M "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < { send-keys -X history-top } "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > { send-keys -X history-bottom } '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r { if-shell -F "#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}" "copy-mode -t=" ; send-keys -X -t = search-backward "#{q:mouse_word}" } "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y { copy-mode -q ; send-keys -l "#{q:mouse_word}" } "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c { copy-mode -q ; set-buffer "#{q:mouse_word}" } "#{?mouse_line,Copy Line,}" l { copy-mode -q ; set-buffer "#{q:mouse_line}" } '' "Horizontal Split" h { split-window -h } "Vertical Split" v { split-window -v } '' "#{?#{>:#{window_panes},1},,-}Swap Up" u { swap-pane -U } "#{?#{>:#{window_panes},1},,-}Swap Down" d { swap-pane -D } "#{?pane_marked_set,,-}Swap Marked" s { swap-pane } '' Kill X { kill-pane } Respawn R { respawn-pane -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z { resize-pane -Z } }
bind-key -T root MouseDown3Status display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y W "#{?#{>:#{session_windows},1},,-}Swap Left" l { swap-window -t :-1 } "#{?#{>:#{session_windows},1},,-}Swap Right" r { swap-window -t :+1 } "#{?pane_marked_set,,-}Swap Marked" s { swap-window } '' Kill X { kill-window } Respawn R { respawn-window -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } Rename n { command-prompt -F -I "#W" { rename-window -t "#{window_id}" "%%" } } '' "New After" w { new-window -a } "New At End" W { new-window }
bind-key -T root MouseDown3StatusLeft display-menu -T "#[align=centre]#{session_name}" -t = -x M -y W Next n { switch-client -n } Previous p { switch-client -p } '' Renumber N { move-window -r } Rename n { command-prompt -I "#S" { rename-session "%%" } } '' "New Session" s { new-session } "New Window" w { new-window }
bind-key -T root MouseDrag1Pane if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -M }
bind-key -T root MouseDrag1Border resize-pane -M
bind-key -T root WheelUpPane if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -e }
bind-key -T root WheelUpStatus previous-window
bind-key -T root WheelDownStatus next-window
bind-key -T root DoubleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -H ; send-keys -X select-word ; run-shell -d 0.3 ; send-keys -X copy-pipe-and-cancel }
bind-key -T root TripleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -H ; send-keys -X select-line ; run-shell -d 0.3 ; send-keys -X copy-pipe-and-cancel }
bind-key -T root M-MouseDown3Pane display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -t = -x M -y M "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < { send-keys -X history-top } "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > { send-keys -X history-bottom } '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r { if-shell -F "#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}" "copy-mode -t=" ; send-keys -X -t = search-backward "#{q:mouse_word}" } "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y { copy-mode -q ; send-keys -l "#{q:mouse_word}" } "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c { copy-mode -q ; set-buffer "#{q:mouse_word}" } "#{?mouse_line,Copy Line,}" l { copy-mode -q ; set-buffer "#{q:mouse_line}" } '' "Horizontal Split" h { split-window -h } "Vertical Split" v { split-window -v } '' "#{?#{>:#{window_panes},1},,-}Swap Up" u { swap-pane -U } "#{?#{>:#{window_panes},1},,-}Swap Down" d { swap-pane -D } "#{?pane_marked_set,,-}Swap Marked" s { swap-pane } '' Kill X { kill-pane } Respawn R { respawn-pane -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z { resize-pane -Z }
bind-key -T root M-Up select-pane -U
bind-key -T root M-Down select-pane -D
bind-key -T root M-Left select-pane -L
bind-key -T root M-Right select-pane -R
bind-key -T root C-Tab previous-window
bind-key -T root C-S-Tab next-window
``` ```

View File

@@ -1,3 +1,4 @@
---
- include: 'tools/dotbot-defaults.yaml' - include: 'tools/dotbot-defaults.yaml'
- shell: - shell:
- echo "Configuring air" - echo "Configuring air"

View File

@@ -1,3 +1,4 @@
---
- include: 'tools/dotbot-defaults.yaml' - include: 'tools/dotbot-defaults.yaml'
- shell: - shell:
- echo "Configuring lakka" - echo "Configuring lakka"

View File

@@ -1,3 +1,4 @@
---
- include: 'tools/dotbot-defaults.yaml' - include: 'tools/dotbot-defaults.yaml'
- shell: - shell:
- echo "Configuring tunkki" - echo "Configuring tunkki"

View File

@@ -1,3 +1,4 @@
---
- include: 'tools/dotbot-defaults.yaml' - include: 'tools/dotbot-defaults.yaml'
- shell: - shell:
- echo "Configuring v" - echo "Configuring v"

View File

@@ -25,9 +25,9 @@ git submodule update --init --recursive "${DOTBOT_DIR}"
if [ "${DOTBOT_HOST}" != "" ]; then if [ "${DOTBOT_HOST}" != "" ]; then
DOTBOT_HOST_CONFIG="${BASEDIR}/hosts/${DOTBOT_HOST}/${CONFIG}" DOTBOT_HOST_CONFIG="${BASEDIR}/hosts/${DOTBOT_HOST}/${CONFIG}"
echo "-> Trying if host config can be found: ${DOTBOT_HOST_CONFIG}" echo "-> Trying if host config can be found: ${DOTBOT_HOST_CONFIG}"
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] && [ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] \
echo "(!) Found $DOTBOT_HOST_CONFIG" && && echo "(!) Found $DOTBOT_HOST_CONFIG" \
"$DOTBOT_BIN_PATH" \ && "$DOTBOT_BIN_PATH" \
-d "$BASEDIR" \ -d "$BASEDIR" \
--plugin-dir=tools/dotbot-brew \ --plugin-dir=tools/dotbot-brew \
--plugin-dir=tools/dotbot-include \ --plugin-dir=tools/dotbot-include \

View File

@@ -1,3 +1,4 @@
---
- include: 'tools/dotbot-defaults.yaml' - include: 'tools/dotbot-defaults.yaml'
- clean: - clean:
~/: ~/:

View File

@@ -19,6 +19,9 @@ VERSION_NVM="v0.39.5"
export DOTFILES="$HOME/.dotfiles" export DOTFILES="$HOME/.dotfiles"
# shellcheck source=./../../scripts/shared.sh # shellcheck source=./../../scripts/shared.sh
source "$HOME/.dotfiles/scripts/shared.sh" source "$HOME/.dotfiles/scripts/shared.sh"
source "$DOTFILES/config/exports"
source "$DOTFILES/config/alias"
source "$DOTFILES/config/functions"
# Loads configs for better installation experience # Loads configs for better installation experience
x-load-configs x-load-configs
@@ -58,6 +61,7 @@ function section_install
$0 install fonts $0 install fonts
$0 install antigen $0 install antigen
$0 brew install $0 brew install
$0 install ohmyposh
$0 install ohmybash $0 install ohmybash
$0 install pip $0 install pip
$0 install cargo $0 install cargo
@@ -152,6 +156,8 @@ function section_install
nvm) nvm)
msg "Installing nvm..." msg "Installing nvm..."
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash
git checkout "$DOTFILES/base/zshrc"
git checkout "$DOTFILES/base/bashrc"
$0 install nvm-latest $0 install nvm-latest
msg_yay "nvm installed!" msg_yay "nvm installed!"
;; ;;
@@ -161,7 +167,8 @@ function section_install
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
fi fi
nvm install --lts --latest-npm --default nvm install --lts --latest-npm --default
git checkout "$DOTFILES/base/*" git checkout "$DOTFILES/base/zshrc"
git checkout "$DOTFILES/base/bashrc"
msg_yay "latest lts node installed!" msg_yay "latest lts node installed!"
;; ;;
npm) npm)
@@ -179,6 +186,11 @@ function section_install
bash "$DOTFILES/scripts/install-ohmybash.sh" \ bash "$DOTFILES/scripts/install-ohmybash.sh" \
&& msg_yay "oh-my-bash installed!" && msg_yay "oh-my-bash installed!"
;; ;;
ohmyposh)
msg "oh-my-posh install started..."
bash "$DOTFILES/scripts/install-ohmyposh.sh" \
&& msg_yay "oh-my-posh installed!"
;;
pip) pip)
msg "pip install started..." msg "pip install started..."
bash "$DOTFILES/scripts/install-pip-packages.sh" bash "$DOTFILES/scripts/install-pip-packages.sh"
@@ -203,7 +215,7 @@ function section_brew
"autoupdate:Setups brew auto-update and runs it immediately" "autoupdate:Setups brew auto-update and runs it immediately"
) )
have brew && { x-have brew && {
case "$1" in case "$1" in
install) install)
brew bundle install --file="$BREWFILE" --force --quiet && msg_yay "Done!" brew bundle install --file="$BREWFILE" --force --quiet && msg_yay "Done!"
@@ -229,7 +241,7 @@ function section_brew
esac esac
} }
! have brew && menu_section "$USAGE_PREFIX" "brew not available on this system" ! x-have brew && menu_section "$USAGE_PREFIX" "brew not available on this system"
} }
function section_helpers function section_helpers
@@ -294,14 +306,14 @@ function section_dotfiles
msg_ok "Deleted old nvim files (share, state and cache + config)" msg_ok "Deleted old nvim files (share, state and cache + config)"
ln -s "$DOTFILES/config/nvim" ~/.config/nvim ln -s "$DOTFILES/config/nvim" ~/.config/nvim
msg_ok "Linked nvim and astronvim" msg_ok "Linked nvim and astronvim"
have npm && $0 install npm x-have npm && $0 install npm
msg_ok "Installed packages" msg_ok "Installed packages"
msg_done "nvim reset!" msg_done "nvim reset!"
;; ;;
yamlfmt) yamlfmt)
# format yaml files # format yaml files
have yamlfmt && yamlfmt -conf "$DOTFILES/.yamlfmt" x-have yamlfmt && yamlfmt -conf "$DOTFILES/.yamlfmt"
! have yamlfmt && msg_err "yamlfmt not found" ! x-have yamlfmt && msg_err "yamlfmt not found"
;; ;;
shfmt) shfmt)
# Format shell scripts according to following rules. # Format shell scripts according to following rules.

View File

@@ -1,6 +0,0 @@
#!/bin/sh
# work around https://github.com/Microsoft/vscode/issues/3941
# and anyone else who expects to see a 'python' executable
exec python3 "$@"

View File

@@ -4,17 +4,16 @@
# Updates $HOME/.dotfiles/docs/tmux.md with my keybindings. # Updates $HOME/.dotfiles/docs/tmux.md with my keybindings.
# shellcheck source=./../../scripts/shared.sh # shellcheck source=./../../scripts/shared.sh
DOTFILES_SHARED_LOADED=""
source "$HOME/.dotfiles/scripts/shared.sh" source "$HOME/.dotfiles/scripts/shared.sh"
have tmux || { x-have tmux || {
msg_err "tmux not found" && exit 0 msg_err "tmux not found" && exit 0
} }
TMUX_KEYBINDINGS_DOCS="$DOTFILES/docs/tmux-keybindings.md" TMUX_KEYBINDINGS_DOCS="$DOTFILES/docs/tmux-keybindings.md"
CB="\n\`\`\`\n" CB="\n\`\`\`\n"
KB=$(tmux list-keys) KB=$(tmux lsk -Tprefix -N | sed -e 's/^/ /;')
H="# tmux keybindings\n" H="# tmux keybindings\n"
L="\nLeader: \`<ctrl><space>\`\n" L="\nLeader: \`<ctrl><space>\`\n"

View File

@@ -42,26 +42,26 @@ sortByOnDiskSize = False
class Blob(object): class Blob(object):
sha1 = '' sha1 = ''
size = 0 size = 0
packedSize = 0 packed_size = 0
path = '' path = ''
def __init__(self, line): def __init__(self, line):
cols = line.split() cols = line.split()
self.sha1, self.size, self.packedSize = cols[0], int(cols[2]), int(cols[3]) self.sha1, self.size, self.packed_size = cols[0], int(cols[2]), int(cols[3])
def __repr__(self): def __repr__(self):
return '{} - {} - {} - {}'.format( return '{} - {} - {} - {}'.format(
self.sha1, self.size, self.packedSize, self.path) self.sha1, self.size, self.packed_size, self.path)
def __lt__(self, other): def __lt__(self, other):
if (sortByOnDiskSize): if (sortByOnDiskSize):
return self.size < other.size return self.size < other.size
else: else:
return self.packedSize < other.packedSize return self.packed_size < other.packed_size
def csv_line(self): def csv_line(self):
return "{},{},{},{}".format( return "{},{},{},{}".format(
self.size/1024, self.packedSize/1024, self.sha1, self.path) self.size/1024, self.packed_size/1024, self.sha1, self.path)
def main(): def main():
@@ -71,45 +71,45 @@ def main():
args = parse_arguments() args = parse_arguments()
sortByOnDiskSize = args.sortByOnDiskSize sortByOnDiskSize = args.sortByOnDiskSize
sizeLimit = 1024*args.filesExceeding size_limit = 1024*args.filesExceeding
if args.filesExceeding > 0: if args.filesExceeding > 0:
print("Finding objects larger than {}kB…".format(args.filesExceeding)) print("Finding objects larger than {}kB…".format(args.filesExceeding))
else: else:
print("Finding the {} largest objects…".format(args.matchCount)) print("Finding the {} largest objects…".format(args.matchCount))
blobs = get_top_blobs(args.matchCount, sizeLimit) blobs = get_top_blobs(args.matchCount, size_limit)
populate_blob_paths(blobs) populate_blob_paths(blobs)
print_out_blobs(blobs) print_out_blobs(blobs)
def get_top_blobs(count, sizeLimit): def get_top_blobs(count, size_limit):
"""Get top blobs from git repository """Get top blobs from git repository
Args: Args:
count (int): How many items to return count (int): How many items to return
sizeLimit (int): What is the size limit size_limit (int): What is the size limit
Returns: Returns:
dict: Dictionary of Blobs dict: Dictionary of Blobs
""" """
sortColumn = 4 sort_column = 4
if sortByOnDiskSize: if sortByOnDiskSize:
sortColumn = 3 sort_column = 3
verifyPack = "git verify-pack -v `git rev-parse --git-dir`/objects/pack/pack-*.idx | grep blob | sort -k{}nr".format(sortColumn) # noqa: E501 verify_pack = "git verify-pack -v `git rev-parse --git-dir`/objects/pack/pack-*.idx | grep blob | sort -k{}nr".format(sort_column) # noqa: E501
output = check_output(verifyPack, shell=True).decode('utf-8').strip().split("\n")[:-1] # noqa: E501 output = check_output(verify_pack, shell=True).decode('utf-8').strip().split("\n")[:-1] # noqa: E501
blobs = dict() blobs = dict()
# use __lt__ to do the appropriate comparison # use __lt__ to do the appropriate comparison
compareBlob = Blob("a b {} {} c".format(sizeLimit, sizeLimit)) compare_blob = Blob("a b {} {} c".format(size_limit, size_limit))
for objLine in output: for obj_line in output:
blob = Blob(objLine) blob = Blob(obj_line)
if sizeLimit > 0: if size_limit > 0:
if compareBlob < blob: if compare_blob < blob:
blobs[blob.sha1] = blob blobs[blob.sha1] = blob
else: else:
break break
@@ -132,8 +132,8 @@ def populate_blob_paths(blobs):
print("Finding object paths…") print("Finding object paths…")
# Only include revs which have a path. Other revs aren't blobs. # Only include revs which have a path. Other revs aren't blobs.
revList = "git rev-list --all --objects | awk '$2 {print}'" rev_list = "git rev-list --all --objects | awk '$2 {print}'"
all_object_lines = check_output(revList, shell=True).decode('utf-8').strip().split("\n")[:-1] # noqa: E501 all_object_lines = check_output(rev_list, shell=True).decode('utf-8').strip().split("\n")[:-1] # noqa: E501
outstanding_keys = list(blobs.keys()) outstanding_keys = list(blobs.keys())
for line in all_object_lines: for line in all_object_lines:
@@ -151,16 +151,16 @@ def populate_blob_paths(blobs):
def print_out_blobs(blobs): def print_out_blobs(blobs):
if len(blobs): if len(blobs):
csvLines = ["size,pack,hash,path"] csv_lines = ["size,pack,hash,path"]
for blob in sorted(blobs.values(), reverse=True): for blob in sorted(blobs.values(), reverse=True):
csvLines.append(blob.csv_line()) csv_lines.append(blob.csv_line())
command = ["column", "-t", "-s", ","] command = ["column", "-t", "-s", ","]
p = Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE) p = Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE)
# Encode the input as bytes # Encode the input as bytes
input_data = ("\n".join(csvLines) + "\n").encode() input_data = ("\n".join(csv_lines) + "\n").encode()
stdout, _ = p.communicate(input_data) stdout, _ = p.communicate(input_data)

View File

@@ -2,30 +2,76 @@
# Load our configuration files # Load our configuration files
# Copyright (c) 2023 Ismo Vuorinen. All Rights Reserved. # Copyright (c) 2023 Ismo Vuorinen. All Rights Reserved.
DOTFILES="$HOME/.dotfiles" set -euo pipefail
source "$HOME/.dotfiles/scripts/shared.sh"
# Set verbosity with VERBOSE=1 x-load-configs
VERBOSE="${VERBOSE:=0}"
[ "$VERBOSE" = "1" ] && {
set -x
}
CONFIG_PATH="$DOTFILES/config" CONFIG_PATH="$DOTFILES/config"
# Load the shell dotfiles, and then some: # Load the shell dotfiles, and then some:
function x-load-config-fn() HOST="$(hostname -s)"
{ [ "$VERBOSE" = "1" ] && {
for FILE in $CONFIG_PATH/{exports,alias,functions}; do echo "x-load-configs: VERBOSE=1"
FILENAME="$FILE" echo "x-load-configs: HOST: $HOST"
HOST="$(hostname -s)"
# global (exports|alias|functions) FILENAME for all hosts
# shellcheck source=../config/exports
[ -r "$FILENAME" ] && source "$FILENAME"
# global secret FILENAME, git ignored
# shellcheck source=../config/exports-secret
[ -r "$FILENAME-secret" ] && source "$FILENAME-secret"
# host specific (exports|alias|functions) FILENAME
# shellcheck source=../config/exports
[ -r "$FILENAME-$HOST" ] && source "$FILENAME-$HOST"
# host specific (exports|alias|functions) FILENAME, git ignored
# shellcheck source=../config/exports
[ -r "$FILENAME-$HOST-secret" ] && source "$FILENAME-$HOST-secret"
done
} }
x-load-config-fn configFile()
{
echo "$CONFIG_PATH/$1"
}
configMsg()
{
printf 'x-load-configs: %s %s\n' "$1" "$2"
}
loadConfigFiles()
{
CONFIG_FILE=$1
SECRET_FILE=$CONFIG_FILE-secret
HOST_FILE=$CONFIG_FILE-$HOST
SECRET_HOST=$HOST_FILE-secret
[ "$VERBOSE" = "1" ] && configMsg "?" "$CONFIG_FILE"
# global (exports|alias|functions) FILENAME for all hosts
# shellcheck source=../config/exports
[ -r "$CONFIG_FILE" ] && {
source "$CONFIG_FILE" && [ "$VERBOSE" = "1" ] && configMsg "Found" "$CONFIG_FILE"
}
# global secret FILENAME, git ignored
# shellcheck source=../config/exports-secret
[ "$VERBOSE" = "1" ] && configMsg "?" "$SECRET_FILE"
[ -r "$SECRET_FILE" ] && {
source "$SECRET_FILE" && [ "$VERBOSE" = "1" ] && configMsg "Found" "$SECRET_FILE"
}
# host specific (exports|alias|functions) FILENAME
# shellcheck source=../config/exports
[ "$VERBOSE" = "1" ] && configMsg "?" "$HOST_FILE"
[ -r "$HOST_FILE" ] && {
source "$HOST_FILE" && [ "$VERBOSE" = "1" ] && configMsg "Found" "$HOST_FILE"
}
# host specific (exports|alias|functions) FILENAME, git ignored
# shellcheck source=../config/exports
[ "$VERBOSE" = "1" ] && configMsg "?" "$SECRET_HOST"
[ -r "$SECRET_HOST" ] && {
source "$SECRET_HOST" \
&& [ "$VERBOSE" = "1" ] && configMsg "Found" "$SECRET_HOST"
}
}
FILE_EXPORTS=$(configFile "exports")
FILE_FUNCTIONS=$(configFile "functions")
FILE_ALIAS=$(configFile "alias")
loadConfigFiles "$FILE_EXPORTS"
loadConfigFiles "$FILE_FUNCTIONS"
loadConfigFiles "$FILE_ALIAS"
exit 0

4
local/bin/x-mkd Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Create a directory and cd into it
mkdir -p "$@" && cd "$@" || exit

View File

@@ -5,4 +5,3 @@
x-path-remove "$1" x-path-remove "$1"
export PATH="${PATH:+"$PATH:"}$1" export PATH="${PATH:+"$PATH:"}$1"

View File

@@ -4,4 +4,3 @@
# Usage: x-path-prepend <dir> # Usage: x-path-prepend <dir>
export PATH="$1${PATH:+":$PATH"}" export PATH="$1${PATH:+":$PATH"}"

View File

@@ -4,4 +4,3 @@
# Usage: x-path-remove <dir> # Usage: x-path-remove <dir>
export PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$1\"" | sed 's/:$//') export PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$1\"" | sed 's/:$//')

50
local/bin/x-set-php-aliases Executable file
View File

@@ -0,0 +1,50 @@
#!/usr/bin/env bash
# Check which php versions are installed with brew, and create aliases for each installation.
# Copyright (c) 2023 Ismo Vuorinen. All Rights Reserved.
set -euo pipefail
# Set verbosity with VERBOSE=1 x-load-configs
VERBOSE="${VERBOSE:=0}"
[ "$VERBOSE" = "2" ] && {
set -x
}
! x-have brew && {
exit 0
}
# Get installed php versions from brew and setup aliases
php_versions=()
while IFS="" read -r line; do php_versions+=("$line"); done < <(bkt -- brew list | grep '^php')
php_error_reporting='-d error_reporting=22527'
for version in "${php_versions[@]}"; do
[ "$VERBOSE" = "1" ] && echo "Setting aliases for $version"
# drop the dot from version (8.0 -> 80)
php_abbr="${version//\./}"
# replace "php@" with "p" so "php@80" becomes "p80"
php_alias="${php_abbr//php@/p}"
# Fetch the exec path once
php_exec="$HOMEBREW_PREFIX/opt/$version/bin/php"
[ -f "$php_exec" ] && {
[ "$VERBOSE" = "1" ] && echo "-> php_exec $php_exec"
# 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

View File

@@ -2,20 +2,31 @@
# Install cargo/rust packages. # Install cargo/rust packages.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
source "$HOME/.dotfiles/config/exports"
source "$HOME/.dotfiles/config/alias"
source "$HOME/.dotfiles/config/functions"
source "$HOME/.dotfiles/scripts/shared.sh" source "$HOME/.dotfiles/scripts/shared.sh"
msg "Starting to install rust/cargo packages" msg "Starting to install rust/cargo packages"
[[ $(x-have "cargo") == "1" ]] && { ! x-have cargo && {
msg "cargo could not be found. installing cargo with rustup.rs" msg "cargo could not be found. installing cargo with rustup.rs"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y
} }
source "$CARGO_HOME/env" source "$CARGO_HOME/env"
! x-have rustup && {
msg_err "rustup could not be found. Aborting..."
exit 1
}
rustup default system
packages=( packages=(
"cargo-cache"
# starship.rs # starship.rs
"starship" # "starship"
# An incremental parsing system for programming tools # An incremental parsing system for programming tools
"tree-sitter-cli" "tree-sitter-cli"
# a subprocess caching utility # a subprocess caching utility
@@ -34,6 +45,7 @@ packages=(
"ripgrep" "ripgrep"
# A version manager for neovim # A version manager for neovim
"bob-nvim" "bob-nvim"
"bottom"
) )
for pkg in "${packages[@]}"; do for pkg in "${packages[@]}"; do
@@ -53,8 +65,9 @@ msg_done "Installed cargo packages!"
msg_run "Now doing the next steps for cargo packages" msg_run "Now doing the next steps for cargo packages"
# use bob to install nvim # use bob to install nvim
have bob && { x-have bob && {
bob use stable && path_append "$XDG_DATA_HOME/bob/nvim-bin" bob use stable && x-path-append "$XDG_DATA_HOME/bob/nvim-bin"
} }
msg_done "All next steps done!" msg_run "Removing cargo cache"
cargo cache --autoclean

View File

@@ -5,7 +5,7 @@ source "$HOME/.dotfiles/scripts/shared.sh"
PBB_REQUIRED_TOOLS=(git cheat) PBB_REQUIRED_TOOLS=(git cheat)
for t in ${PBB_REQUIRED_TOOLS[@]}; do for t in ${PBB_REQUIRED_TOOLS[@]}; do
[[ $(x-have "$t") == "1" ]] && echo "(!) $t is missing, can't continue..." && exit 1 ! x-have "$t" && echo "(!) $t is missing, can't continue..." && exit 1
done done
PBB_GIT="https://github.com/dylanaraps/pure-bash-bible.git" PBB_GIT="https://github.com/dylanaraps/pure-bash-bible.git"

View File

@@ -1,75 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2231,SC2034,SC2181,SC2068
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
TLDR_REQUIRED_TOOLS=(git cheat)
for t in ${TLDR_REQUIRED_TOOLS[@]}; do
[[ $(x-have "$t") == "1" ]] && echo "(!) $t is missing, can't continue..." && exit 1
done
TLDR_GIT="https://github.com/tldr-pages/tldr.git"
TLDR_SOURCE="source: $TLDR_GIT"
TLDR_SYNTAX="syntax: markdown"
TLDR_TEMP_PREFIX=$(basename "$0")
TLDR_TEMP_DIR="$XDG_CACHE_HOME/cheat/tldr"
# If there's no .git, clone the folder
if [ ! -d "$TLDR_TEMP_DIR/.git" ]; then
msg_run "Starting to clone $TLDR_GIT"
git clone --depth 1 --single-branch -q "$TLDR_GIT" "$TLDR_TEMP_DIR" \
&& msg_done "Cloned $TLDR_GIT"
else
# Update the repo
msg_run "Starting to update $TLDR_GIT"
git -C "$TLDR_TEMP_DIR" reset --hard origin/main
git -C "$TLDR_TEMP_DIR" pull -q \
&& msg_done "Updated $TLDR_GIT"
fi
# Fetch the destination directory from cheat defined directories.
TLDR_CHEAT_DEST="$(cheat -d | grep tldr | head -1 | awk '{print $2}')"
[ "$TLDR_CHEAT_DEST" = "" ] \
&& msg_err "cheat doesn't know about the destination" \
&& exit 1
if [ ! -d "$TLDR_CHEAT_DEST" ]; then
mkdir -p "$TLDR_CHEAT_DEST"
fi
for d in "$TLDR_TEMP_DIR"/pages/*; do
DIRNAME=$(basename "$d")
# echo "-> $DIRNAME ($d)"
SECTION_DIR="${TLDR_CHEAT_DEST}/$DIRNAME"
[ "$DIRNAME" = "common" ] && SECTION_DIR="${TLDR_CHEAT_DEST}"
TLDR_TAGS="tags: [$DIRNAME]"
if [ ! -d "$SECTION_DIR" ]; then
mkdir -p "$SECTION_DIR"
fi
for FILE in $d/*.md; do
BASENAME=$(basename "$FILE" .md)
FILENAME="${BASENAME%%.*}"
# echo "-> $FILE = $FILENAME"
TLDR_FILE="$SECTION_DIR/${BASENAME}"
# echo "-> dest: $TLDR_FILE"
# Update the original file for making the replacable value comparable
if [ -f "$FILE" ] && [ '---' != "$(head -1 < "$FILE")" ]; then
echo -e "---\n$TLDR_SYNTAX\n$TLDR_TAGS\n$TLDR_SOURCE\n---\n$(cat "$FILE")" > "$FILE"
fi
replacable "$FILE" "$TLDR_FILE"
override=$?
if [ "$override" -ne 0 ]; then
cp "$FILE" "$TLDR_FILE" && msg_run "Updated: $TLDR_FILE"
fi
done
done

View File

@@ -4,7 +4,7 @@
# shellcheck source="shared.sh" # shellcheck source="shared.sh"
source "$HOME/.dotfiles/scripts/shared.sh" source "$HOME/.dotfiles/scripts/shared.sh"
[[ $(x-have "php") == "1" ]] && msg_err "PHP Not Available, cannot install composer" && exit 0 ! x-have "php" && msg_err "PHP Not Available, cannot install composer" && exit 0
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

View File

@@ -6,7 +6,7 @@ source "$HOME/.dotfiles/scripts/shared.sh"
msg_run "Installing gh (GitHub Client) extensions" msg_run "Installing gh (GitHub Client) extensions"
[[ $(x-have "gh") == "1" ]] \ ! x-have "gh" \
&& msg_err "gh (GitHub Client) could not be found, please install it first" \ && msg_err "gh (GitHub Client) could not be found, please install it first" \
&& exit 0 && exit 0

View File

@@ -8,7 +8,7 @@ source "$HOME/.dotfiles/scripts/shared.sh"
msg_run "Installing git-crypt" msg_run "Installing git-crypt"
[[ $(x-have "git-crypt") == "1" ]] && { x-have "git-crypt" || {
REPO_URL="https://github.com/AGWA/git-crypt.git" REPO_URL="https://github.com/AGWA/git-crypt.git"
CHECK_PATH="${XDG_BIN_HOME}/git-crypt" CHECK_PATH="${XDG_BIN_HOME}/git-crypt"

View File

@@ -6,7 +6,7 @@ source "$HOME/.dotfiles/scripts/shared.sh"
msg_run "Installing go packages" msg_run "Installing go packages"
[[ $(x-have "go") == "1" ]] && msg "go hasn't been installed yet." && exit 0 ! x-have "go" && msg "go hasn't been installed yet." && exit 0
packages=( packages=(
# A shell parser, formatter, and interpreter with bash support; includes shfmt # A shell parser, formatter, and interpreter with bash support; includes shfmt
@@ -44,10 +44,14 @@ done
msg_run "Installing completions for selected packages" msg_run "Installing completions for selected packages"
have git-profile && { x-have git-profile && {
git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/_git-profile" \ git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/_git-profile" \
&& msg_ok "Installed completions for git-profile" && msg_ok "Installed completions for git-profile"
} }
echo "" echo ""
msg_run "Clearing go cache"
go clean -cache -modcache
msg_ok "Done" msg_ok "Done"

View File

@@ -11,7 +11,7 @@ NEOFETCH_URL="${NEOFETCH_REPO}/archive/refs/tags/${NEOFETCH_VERSION}.tar.gz"
NEOFETCH_TEMP="/tmp/neofetch" NEOFETCH_TEMP="/tmp/neofetch"
NEOFETCH_INSTALL_PREFIX="$HOME/.local" NEOFETCH_INSTALL_PREFIX="$HOME/.local"
[[ $(x-have "neofetch") == "1" ]] && { x-have "neofetch" || {
LC_ALL=C LC_ALL=C
mkdir -p "$NEOFETCH_TEMP" "$NEOFETCH_INSTALL_PREFIX" mkdir -p "$NEOFETCH_TEMP" "$NEOFETCH_INSTALL_PREFIX"

View File

@@ -6,7 +6,7 @@ source "$HOME/.dotfiles/scripts/shared.sh"
msg "Starting to install npm packages" msg "Starting to install npm packages"
[[ $(x-have "npm") == "1" ]] && msg_err "npm could not be found." && exit 0 ! x-have "npm" && msg_err "npm could not be found." && exit 0
packages=( packages=(
# This is a tool to check if your files consider your .editorconfig rules. # This is a tool to check if your files consider your .editorconfig rules.
@@ -37,3 +37,8 @@ done
msg_run "Upgrading all global packages" msg_run "Upgrading all global packages"
npm -g --no-progress --no-timing --no-fund outdated npm -g --no-progress --no-timing --no-fund outdated
npm -g --no-timing --no-fund upgrade npm -g --no-timing --no-fund upgrade
msg_run "Cleaning up npm cache"
npm cache verify
npm cache clean --force
npm cache verify

View File

@@ -6,7 +6,7 @@
source "$HOME/.dotfiles/scripts/shared.sh" source "$HOME/.dotfiles/scripts/shared.sh"
set -e set -e
[[ $(x-have "ntfy") == "0" ]] && msg "ntfy already installed" && exit 0 x-have "ntfy" && msg "ntfy already installed" && exit 0
case $(dfm check arch) in case $(dfm check arch) in
Linux) Linux)

18
scripts/install-ohmyposh.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env zsh
#
# Install oh-my-posh
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/.local/bin
OHMYPOSH_CFG="$HOME/.dotfiles/config/oh-my-posh.omp.json"
eval "$(oh-my-posh init zsh --config $OHMYPOSH_CFG)"
#cd ~/.dotfiles || exit
#oh-my-posh config export image \
# --config "$OHMYPOSH_CFG" \
# --output "~/.dotfiles/.github/screenshots/oh-my-posh.png" \
# --author "Ismo Vuorinen"

View File

@@ -6,14 +6,16 @@ source "$HOME/.dotfiles/scripts/shared.sh"
msg "Starting to install pip packages" msg "Starting to install pip packages"
[[ $(x-have "python3") == "1" ]] && { x-have "python3" || {
msg_err "Could not find python3, something really weird is going on." && exit 1 msg_err "Could not find python3, something really weird is going on." && exit 1
} }
msg_nested "Upgrading pip"
python3 -m pip install --user --upgrade pip
packages=( packages=(
"pipx" "pipx"
"libtmux" "libtmux"
"ensurepath"
) )
for pkg in "${packages[@]}"; do for pkg in "${packages[@]}"; do
@@ -23,7 +25,7 @@ for pkg in "${packages[@]}"; do
if [[ ${pkg:0:1} == "#" ]]; then continue; fi if [[ ${pkg:0:1} == "#" ]]; then continue; fi
msg_nested "Installing pip package: $pkg" msg_nested "Installing pip package: $pkg"
python3 -m pip install --user "$pkg" python3 -m pip install --user --upgrade "$pkg"
echo "" echo ""
done done

View File

@@ -6,7 +6,7 @@
[ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0 [ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0
! have xcode-select \ ! x-have xcode-select \
&& msg_err "xcode-select could not be found, skipping" \ && msg_err "xcode-select could not be found, skipping" \
&& exit 0 && exit 0

View File

@@ -50,27 +50,6 @@ function path_prepend
x-path-prepend "$1" x-path-prepend "$1"
} }
# Create directory if it doesn't exist already
x-dc()
{
dir="$1"
[ $# -eq 0 ] && {
echo "Usage: $0 full/path/to/dir/to/create"
exit 1
}
if [ ! -d "$dir" ]; then
mkdir -p "$dir" && exit 0
fi
}
# Create a new directory and enter it
mkd()
{
mkdir -p "$@" && cd "$@" || exit
}
# Run command silently # Run command silently
# Usage: silent uptime # Usage: silent uptime
silent() silent()
@@ -84,31 +63,6 @@ nonascii()
LC_ALL=C grep -n '[^[:print:][:space:]]' "${@}" LC_ALL=C grep -n '[^[:print:][:space:]]' "${@}"
} }
CONFIG_PATH="$DOTFILES/config"
# Load the shell dotfiles, and then some:
function x-load-config-fn()
{
for FILE in $CONFIG_PATH/{exports,alias,functions}; do
FILENAME="$FILE"
HOST="$(hostname -s)"
# global (exports|alias|functions) FILENAME for all hosts
# shellcheck source=../config/exports
[ -r "$FILENAME" ] && source "$FILENAME"
# global secret FILENAME, git ignored
# shellcheck source=../config/exports-secret
[ -r "$FILENAME-secret" ] && source "$FILENAME-secret"
# host specific (exports|alias|functions) FILENAME
# shellcheck source=../config/exports
[ -r "$FILENAME-$HOST" ] && source "$FILENAME-$HOST"
# host specific (exports|alias|functions) FILENAME, git ignored
# shellcheck source=../config/exports
[ -r "$FILENAME-$HOST-secret" ] && source "$FILENAME-$HOST-secret"
done
}
x-load-config-fn
source "$DOTFILES/local/bin/msgr" source "$DOTFILES/local/bin/msgr"
# -- Menu builder -- # # -- Menu builder -- #

View File

@@ -1,3 +1,4 @@
---
- defaults: - defaults:
create: create:
mode: 0755 mode: 0755

2103
yarn.lock

File diff suppressed because it is too large Load Diff