Compare commits

...

33 Commits

Author SHA1 Message Date
6f854ddbfd chore(lint): linting, tweaks, cleanup 2023-09-25 12:17:14 +03:00
748e5bb561 feat(dotbot): plugins: pipx, snap and crontab 2023-09-25 11:51:23 +03:00
67867b57cd feat(bin): x-git-largest-files.py python 3 version 2023-09-25 10:24:21 +03:00
91734ffa15 chore(config): tweaks to gh and tmux configs 2023-09-25 09:10:13 +03:00
5364bef678 fix(dotbot): git host overrides, nvm default pkgs 2023-09-25 08:28:11 +03:00
50b4f5c60f chore(config): alacritty font style 2023-09-25 00:56:46 +03:00
7cd508a727 chore(brew): update Brewfile 2023-09-25 00:56:24 +03:00
bf2c665433 chore(dotbot): update linking to use whole folders 2023-09-25 00:52:48 +03:00
f5b1bf0915 feat(dfm): install nerdfonts 2023-09-24 23:46:09 +03:00
e0c6d7e4f4 chore(nvim): update plugins 2023-09-24 22:45:36 +03:00
1937e72f17 chore(config): starship username tweak 2023-09-24 22:45:11 +03:00
228ba78341 feat(nvim): nvim-ufo, indent-blankline, gitsigns 2023-09-21 13:14:49 +03:00
c8c34dcc81 chore(nvim): tweak settings, update plugins 2023-09-21 13:14:15 +03:00
3d65fdee43 chore(config): tweak starship config 2023-09-21 13:11:31 +03:00
1897f49906 chore(nvim): transparency, edgy, configs, updates 2023-09-20 11:13:48 +03:00
d86785ad47 chore(repo): new screenshot, updated readme 2023-09-20 11:12:56 +03:00
1c3c04a6f3 fix(scripts): git-profile completion file name 2023-09-20 09:53:37 +03:00
debb79ee09 fix(cheat): save common to tldr root, fix names 2023-09-20 09:52:57 +03:00
c1dda8a230 feat(shell): eza, a modern replacement for ‘ls’ 2023-09-20 09:49:21 +03:00
5c74383dda chore(shell): add aliases and cleanup zsh plugins 2023-09-20 09:48:28 +03:00
da1473547a chore(nvim): plugin updates 2023-09-20 08:29:12 +03:00
43df368ec1 chore(nvim): configuration and plugin updates 2023-09-20 08:27:14 +03:00
6f3f977100 chore(docs): update tmux bindings 2023-09-19 09:10:17 +03:00
ab8e654c2a chore(deps): update Brewfile & nvim lazy plugins 2023-09-19 09:04:55 +03:00
1a4113e3cd chore(scripts): shfmt scripts 2023-09-19 09:04:02 +03:00
b3445d7e7a feat(dfm): shfmt now run with cargo installed fd 2023-09-19 09:03:08 +03:00
50fc1ea279 chore(config): starship: show hostname always 2023-09-19 08:48:53 +03:00
d61f53196d feat(dfm): install pip/python packages 2023-09-19 08:47:45 +03:00
7769af68b5 feat(tmux): tmux-window-name 2023-09-19 08:46:14 +03:00
05aa4ba092 feat(scripts): use bkt for command caching 2023-09-19 02:23:03 +03:00
a26f160326 feat(dfm): install rust/cargo packages 2023-09-19 02:22:05 +03:00
00de4a7b83 chore(nvim): plugins, updates 2023-09-19 01:34:42 +03:00
020012eb60 chore(config): exports for lakka 2023-09-19 01:31:55 +03:00
56 changed files with 926 additions and 326 deletions

24
.github/README.md vendored
View File

@@ -23,20 +23,14 @@ fork or download the repo as a zip and go from there with your own configs.
## The looks ## The looks
## tmux with powerlevel10k, the default view ![screenshot of tmux with nvim editing this repo](./screenshots/tmux-nvim.png)
![screenshot of tmux with powerlevel10k](./screenshots/tmux-powerlevel10k-130x20.png)
## tmux + nvim (astronvim) editing this repository
![screenshot of tmux showing nvim](./screenshots/tmux-astronvim-130x40.png)
## Interesting files and locations ## Interesting files and locations
### Interesting folders ### Interesting folders
| Path | Description | | Path | Description |
|---------------------|----------------------------------------------| | ------------------- | -------------------------------------------- |
| `.github` | GitHub Repository configuration files. | | `.github` | GitHub Repository configuration files. |
| `hosts/{hostname}/` | Configs that should apply to that host only. | | `hosts/{hostname}/` | Configs that should apply to that host only. |
| `local/bin` | Helper scripts that I've collected or wrote. | | `local/bin` | Helper scripts that I've collected or wrote. |
@@ -45,7 +39,7 @@ fork or download the repo as a zip and go from there with your own configs.
### dotfile folders ### dotfile folders
| Repo | Destination | Description | | Repo | Destination | Description |
|-----------|-------------|---------------------------------------------| | --------- | ----------- | ------------------------------------------- |
| `base/` | `.*` | `$HOME` level files. | | `base/` | `.*` | `$HOME` level files. |
| `config/` | `.config/` | Configurations for applications. | | `config/` | `.config/` | Configurations for applications. |
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` | | `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
@@ -62,7 +56,7 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
### XDG Variables ### XDG Variables
| Env | Default | Short description | | Env | Default | Short description |
|--------------------|----------------------|------------------------------------------------| | ------------------ | -------------------- | ---------------------------------------------- |
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries | | `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs | | `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files | | `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |
@@ -79,7 +73,7 @@ environment variable, at an appropriate place.
#### XDG_DATA_HOME (`$HOME/.local/share`) #### XDG_DATA_HOME (`$HOME/.local/share`)
`$XDG_DATA_HOME` defines the base directory relative to which `$XDG_DATA_HOME` defines the base directory relative to which
user-specific *data files* should be stored. user-specific _data files_ should be stored.
If `$XDG_DATA_HOME` is either not set or empty, If `$XDG_DATA_HOME` is either not set or empty,
a default equal to `$HOME/.local/share` should be used. a default equal to `$HOME/.local/share` should be used.
@@ -87,7 +81,7 @@ a default equal to `$HOME/.local/share` should be used.
#### XDG_CONFIG_HOME (`$HOME/.config`) #### XDG_CONFIG_HOME (`$HOME/.config`)
`$XDG_CONFIG_HOME` defines the base directory relative to which `$XDG_CONFIG_HOME` defines the base directory relative to which
user-specific *configuration files* should be stored. user-specific _configuration files_ should be stored.
If `$XDG_CONFIG_HOME` is either not set or empty, If `$XDG_CONFIG_HOME` is either not set or empty,
a default equal to `$HOME/.config` should be used. a default equal to `$HOME/.config` should be used.
@@ -95,13 +89,13 @@ a default equal to `$HOME/.config` should be used.
#### XDG_STATE_HOME (`$HOME/.local/state`) #### XDG_STATE_HOME (`$HOME/.local/state`)
`$XDG_STATE_HOME` defines the base directory relative to which `$XDG_STATE_HOME` defines the base directory relative to which
user-specific *state files* should be stored. user-specific _state files_ should be stored.
If `$XDG_STATE_HOME` is either not set or empty, If `$XDG_STATE_HOME` is either not set or empty,
a default equal to `$HOME/.local/state` should be used. a default equal to `$HOME/.local/state` should be used.
The `$XDG_STATE_HOME` contains *state data* that should The `$XDG_STATE_HOME` contains _state data_ that should
*persist between (application) restarts*, but that is not important or _persist between (application) restarts_, but that is not important or
portable enough to the user that it should be stored in `$XDG_DATA_HOME`. portable enough to the user that it should be stored in `$XDG_DATA_HOME`.
- It may contain: - It may contain:

BIN
.github/screenshots/tmux-nvim.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

1
.gitignore vendored
View File

@@ -13,4 +13,5 @@ ssh/local.d/*
!ssh/local.d/.gitkeep !ssh/local.d/.gitkeep
!.gitkeep !.gitkeep
.env .env
local/share/fonts/NerdFonts

12
.gitmodules vendored
View File

@@ -44,3 +44,15 @@
[submodule "tmux/tmux-yank"] [submodule "tmux/tmux-yank"]
path = config/tmux/plugins/tmux-yank path = config/tmux/plugins/tmux-yank
url = https://github.com/tmux-plugins/tmux-yank.git url = https://github.com/tmux-plugins/tmux-yank.git
[submodule "tmux/tmux-window-name"]
path = config/tmux/plugins/tmux-window-name
url = https://github.com/ofirgall/tmux-window-name.git
[submodule "dotbot-crontab"]
path = tools/dotbot-crontab
url = https://github.com/codekansas/dotbot-crontab.git
[submodule "dotbot-snap"]
path = tools/dotbot-snap
url = https://github.com/DrDynamic/dotbot-snap.git
[submodule "dotbot-pip"]
path = tools/dotbot-pip
url = https://github.com/sobolevn/dotbot-pip.git

View File

@@ -19,4 +19,3 @@ include:
exclude: exclude:
- ./tools/** - ./tools/**
- ./config/nvim/**

View File

@@ -1,9 +1,22 @@
#!/usr/bin/env bash #!/usr/bin/env bash
git submodule add --name dotbot -f https://github.com/anishathalye/dotbot.git tools/dotbot # dotbot and plugins
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git tools/dotbot-brew git submodule add --name dotbot \
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include -f https://github.com/anishathalye/dotbot.git tools/dotbot
git submodule add --name cheat-community -f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community git submodule add --name dotbot-brew \
-f https://github.com/wren/dotbot-brew.git tools/dotbot-brew
git submodule add --name dotbot-include \
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
git submodule add --name dotbot-crontab \
-f https://github.com/codekansas/dotbot-crontab.git tools/dotbot-crontab
git submodule add --name dotbot-snap \
-f https://github.com/DrDynamic/dotbot-snap.git tools/dotbot-snap
git submodule add --name dotbot-pip \
-f https://github.com/sobolevn/dotbot-pip.git tools/dotbot-pip
# other repos
git submodule add --name cheat-community \
-f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
# tmux plugin manager and plugins # tmux plugin manager and plugins
git submodule add --name tmux/tpm \ git submodule add --name tmux/tpm \
@@ -20,5 +33,7 @@ git submodule add --name tmux/tmux-sensible \
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible -f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
git submodule add --name tmux/tmux-sessionist \ git submodule add --name tmux/tmux-sessionist \
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist -f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
git submodule add --name tmux/tmux-window-name \
-f https://github.com/ofirgall/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

24
base/bashrc Normal file → Executable file
View File

@@ -7,19 +7,27 @@ export DOTFILES="$HOME/.dotfiles"
# Run x-load-configs in your terminal to reload the files. # Run x-load-configs in your terminal to reload the files.
function x-load-configs() function x-load-configs()
{ {
# Load the shell dotfiles, and then some:
for file in $DOTFILES/config/{exports,alias,functions}; do
HOST="$(hostname -s)" HOST="$(hostname -s)"
# Load the shell dotfiles, and then some: # global (exports|alias|functions) file for all hosts
for file in $DOTFILES/config/{exports,alias,functions}; do # shellcheck source=../config/exports
[ -r "$file" ] && source "$file" [ -r "$file" ] && source "$file"
[ -r "$file-secret" ] && source "$file-secret" # global secret file, git ignored
[ -r "$file-$HOST" ] && source "$file-$HOST" # shellcheck source=../config/exports-secret
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret" [ -r "$file-secret" ] && source "$file-secret"
done # host specific (exports|alias|functions) file
# shellcheck source=../config/exports
[ -r "$file-$HOST" ] && source "$file-$HOST"
# host specific (exports|alias|functions) file, git ignored
# shellcheck source=../config/exports
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
done
} }
x-load-configs x-load-configs
# Import ssh keys in keychain # Import ssh keys in keychain
ssh-add -A 2>/dev/null; ssh-add -A 2> /dev/null
# shellcheck source=../config/fzf/fzf.bash # shellcheck source=../config/fzf/fzf.bash
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] \ [ -f "${DOTFILES}/config/fzf/fzf.bash" ] \

4
base/zshrc Normal file → Executable file
View File

@@ -42,8 +42,7 @@ x-dc "$ZSH_CUSTOM_COMPLETION_PATH"
FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH" FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH"
autoload -Uz compinit autoload -Uz compinit
if type brew &>/dev/null if type brew &> /dev/null; then
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi fi
@@ -70,4 +69,3 @@ have antigen && {
# Start starship # Start starship
eval "$(starship init zsh)" eval "$(starship init zsh)"

View File

@@ -1,3 +1,4 @@
---
# Configuration for Alacritty, the GPU enhanced terminal emulator # Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as # Any items in the `env` entry below will be added as
@@ -40,7 +41,7 @@ font:
normal: normal:
family: JetBrainsMono Nerd Font family: JetBrainsMono Nerd Font
# Style can be specified to pick a specific face. # Style can be specified to pick a specific face.
# style: Regular style: ExtraLight
# The bold font face # The bold font face
bold: bold:
@@ -298,7 +299,6 @@ mouse:
selection: selection:
semantic_escape_chars: ',│`|:"'' ()[]{}<>' semantic_escape_chars: ',│`|:"'' ()[]{}<>'
# Shell # Shell
# #
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish. # You can set shell.program to the path of your favorite shell, e.g. /bin/fish.

View File

@@ -55,6 +55,60 @@ if [[ $(uname) == 'Darwin' ]]; then
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl" alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
fi fi
# Be nice
alias please="sudo "
! have eza && alias ls='ls --color=auto'
have eza && {
alias ls='eza -h -s=type --git --icons --group-directories-first'
}
# Easier navigation: .., ..., ....
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
# Colors for ls
alias ll="ls -l"
alias l="ls"
# Prevent common typos
alias cd..="cd .."
alias sl="ls"
# List only directories
alias lsd="ls -lF | grep '^d'"
# Recursively delete `.pyc` files
alias rmpyc="find . -type f -name '*.pyc' -ls -delete"
# Recursively delete `.DS_Store` files
alias rmds="find . -type f -name '*.DS_Store' -ls -delete"
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
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* //'"
# Show/hide hidden files in Finder
alias show="defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder"
alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false; killall Finder"
# Pipe public key to clipboard.
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to pasteboard.'"
# Flush Directory Service cache
alias flush="dscacheutil -flushcache"
# Update locatedb
alias updatedb="sudo /usr/libexec/locate.updatedb"
# Always return full history
alias history="history 1"
alias pip="pip3 "
alias python="python3 "
# 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

View File

@@ -119,6 +119,7 @@ have gem && path_append "$(gem environment gemdir)/bin"
have rbenv && eval "$(rbenv init - zsh)" have rbenv && eval "$(rbenv init - zsh)"
# Rust / cargo # Rust / cargo
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export CARGO_HOME="$XDG_DATA_HOME/cargo" export CARGO_HOME="$XDG_DATA_HOME/cargo"
path_append "$CARGO_HOME/bin" path_append "$CARGO_HOME/bin"

7
config/exports-lakka Normal file
View File

@@ -0,0 +1,7 @@
# lakka exports
## LUA
have luarocks && $(luarocks path --bin)
path_append "$HOME/.local/go/bin"

View File

@@ -67,15 +67,11 @@ x-default-antigen-bundles()
export ZSH_TMUX_AUTOQUIT=false export ZSH_TMUX_AUTOQUIT=false
export ZSH_TMUX_DEFAULT_SESSION_NAME=main export ZSH_TMUX_DEFAULT_SESSION_NAME=main
# Add keychain to ssh-agent args when on macOS
have brew && zstyle :omz:plugins:ssh-agent ssh-add-args --apple-load-keychain
# these should be always available # these should be always available
antigen bundle tmux antigen bundle tmux
antigen bundle colored-man-pages antigen bundle colored-man-pages
antigen bundle command-not-found antigen bundle command-not-found
antigen bundle ssh-agent antigen bundle ssh-agent
# antigen bundle MichaelAquilina/zsh-you-should-use
antigen bundle jreese/zsh-titles antigen bundle jreese/zsh-titles
antigen bundle unixorn/autoupdate-antigen.zshplugin antigen bundle unixorn/autoupdate-antigen.zshplugin
antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-completions

View File

@@ -0,0 +1,19 @@
check_for_updates: true
excluded_labels:
- maintenance
- dependencies
file_name: CHANGELOG.md
logger: spinner
no_color: false
sections:
added:
- feature
- enhancement
changed:
- backwards-incompatible
fixed:
- bug
- bugfix
- documentation
show_unreleased: true
skip_entries_without_label: false

54
config/gh-dash/config.yml Normal file
View File

@@ -0,0 +1,54 @@
prSections:
- title: My Pull Requests
filters: is:open author:@me
- title: Needs My Review
filters: is:open review-requested:@me
- title: Involved
filters: is:open involves:@me -author:@me
issuesSections:
- title: My Issues
filters: is:open author:@me
- title: Assigned
filters: is:open assignee:@me
- title: Involved
filters: is:open involves:@me -author:@me
defaults:
preview:
open: true
width: 50
prsLimit: 20
issuesLimit: 20
view: prs
layout:
prs:
updatedAt:
width: 7
repo:
width: 15
author:
width: 15
assignees:
width: 20
hidden: true
base:
width: 15
hidden: true
lines:
width: 16
issues:
updatedAt:
width: 7
repo:
width: 15
creator:
width: 10
assignees:
width: 20
hidden: true
refetchIntervalMinutes: 30
keybindings:
issues: []
prs: []
repoPaths: {}
pager:
diff: ""

3
config/gh/hosts.yml Normal file
View File

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

View File

@@ -5,3 +5,6 @@
name = Ismo Vuorinen name = Ismo Vuorinen
email = ismo@ivuorinen.net email = ismo@ivuorinen.net
[include]
path = ~/.config/git/overrides/config

2
config/git/overrides/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
!.gitkeep
config

View File

@@ -18,8 +18,6 @@ tap "xwmx/taps"
brew "act" brew "act"
# Mozilla CA certificate store # Mozilla CA certificate store
brew "ca-certificates" brew "ca-certificates"
# Cryptography and SSL/TLS Toolkit
brew "openssl@3"
# Interpreted, interactive, object-oriented programming language # Interpreted, interactive, object-oriented programming language
brew "python@3.11" brew "python@3.11"
# YAML Parser # YAML Parser
@@ -68,6 +66,8 @@ brew "awscli"
brew "bash" brew "bash"
# Clone of cat(1) with syntax highlighting and Git integration # Clone of cat(1) with syntax highlighting and Git integration
brew "bat" brew "bat"
# C/C++ and Java libraries for Unicode and globalization
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 # Switch Apache / Valet / CLI configs between PHP versions
@@ -102,8 +102,14 @@ brew "dnsmasq"
brew "dog" 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"
# Useful examples at the command-line # Useful examples at the command-line
brew "eg-examples" brew "eg-examples"
# OpenType text shaping engine
brew "harfbuzz"
# Development kit for the Java programming language
brew "openjdk"
# Run arbitrary commands when files change # Run arbitrary commands when files change
brew "entr" brew "entr"
# Perl lib for reading and writing EXIF metadata # Perl lib for reading and writing EXIF metadata
@@ -152,10 +158,6 @@ brew "gpgme"
brew "gpg-tui" brew "gpg-tui"
# Image manipulation # Image manipulation
brew "netpbm" brew "netpbm"
# C/C++ and Java libraries for Unicode and globalization
brew "icu4c"
# OpenType text shaping engine
brew "harfbuzz"
# Framework for layout and rendering of i18n text # Framework for layout and rendering of i18n text
brew "pango" brew "pango"
# Library to render SVG files using Cairo # Library to render SVG files using Cairo
@@ -210,8 +212,6 @@ brew "nvm"
brew "openjdk@11" brew "openjdk@11"
# Generate clients, server & docs from an OpenAPI spec (v2, v3) # Generate clients, server & docs from an OpenAPI spec (v2, v3)
brew "openapi-generator" brew "openapi-generator"
# Development kit for the Java programming language
brew "openjdk"
# Swiss-army knife of markup format conversion # Swiss-army knife of markup format conversion
brew "pandoc" brew "pandoc"
# Highly capable, feature-rich programming language # Highly capable, feature-rich programming language
@@ -278,6 +278,8 @@ brew "virtualenv"
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 # Personal information dashboard for your terminal
@@ -314,8 +316,10 @@ brew "shivammathur/php/php@7.4"
brew "shivammathur/php/php@8.0" brew "shivammathur/php/php@8.0"
# Ookla Speedtest # Ookla Speedtest
brew "teamookla/speedtest/speedtest" brew "teamookla/speedtest/speedtest"
# Command-line helper for the 1Password password manager # Command-line interface for 1Password
cask "1password-cli" cask "1password-cli"
# GPU-accelerated terminal emulator
cask "alacritty"
# Turn audio CDs and files into audiobooks # Turn audio CDs and files into audiobooks
cask "audiobook-builder" cask "audiobook-builder"
# Text editor # Text editor
@@ -414,6 +418,7 @@ mas "Keynote", id: 409183694
mas "LastPass", id: 926036361 mas "LastPass", id: 926036361
mas "Numbers", id: 409203825 mas "Numbers", id: 409203825
mas "Pages", id: 409201541 mas "Pages", id: 409201541
mas "Pixelmator Pro", id: 1289583905
mas "Tailscale", id: 1475387142 mas "Tailscale", id: 1475387142
mas "Xcode", id: 497799835 mas "Xcode", id: 497799835
vscode "akamud.vscode-theme-onelight" vscode "akamud.vscode-theme-onelight"
@@ -435,6 +440,7 @@ vscode "esbenp.prettier-vscode"
vscode "formulahendry.auto-close-tag" vscode "formulahendry.auto-close-tag"
vscode "formulahendry.auto-rename-tag" vscode "formulahendry.auto-rename-tag"
vscode "formulahendry.code-runner" vscode "formulahendry.code-runner"
vscode "foxundermoon.shell-format"
vscode "gencer.html-slim-scss-css-class-completion" vscode "gencer.html-slim-scss-css-class-completion"
vscode "github.vscode-github-actions" vscode "github.vscode-github-actions"
vscode "GitHub.vscode-pull-request-github" vscode "GitHub.vscode-pull-request-github"
@@ -473,6 +479,7 @@ vscode "phiter.phpstorm-snippets"
vscode "sibiraj-s.vscode-scss-formatter" vscode "sibiraj-s.vscode-scss-formatter"
vscode "SonarSource.sonarlint-vscode" vscode "SonarSource.sonarlint-vscode"
vscode "stylelint.vscode-stylelint" vscode "stylelint.vscode-stylelint"
vscode "sumneko.lua"
vscode "syler.sass-indented" vscode "syler.sass-indented"
vscode "timonwong.shellcheck" vscode "timonwong.shellcheck"
vscode "tootone.org-mode" vscode "tootone.org-mode"
@@ -481,6 +488,7 @@ vscode "Vue.volar"
vscode "Vue.vscode-typescript-vue-plugin" vscode "Vue.vscode-typescript-vue-plugin"
vscode "WakaTime.vscode-wakatime" vscode "WakaTime.vscode-wakatime"
vscode "wix.vscode-import-cost" vscode "wix.vscode-import-cost"
vscode "XadillaX.viml"
vscode "xdebug.php-debug" vscode "xdebug.php-debug"
vscode "xdebug.php-pack" vscode "xdebug.php-pack"
vscode "yinfei.luahelper" vscode "yinfei.luahelper"

View File

@@ -1,64 +1,67 @@
{ {
"LazyVim": { "branch": "main", "commit": "a72a84972d85e5bbc6b9d60a0983b37efef21b8a" }, "LazyVim": { "branch": "main", "commit": "a72a84972d85e5bbc6b9d60a0983b37efef21b8a" },
"LuaSnip": { "branch": "master", "commit": "3657c3f3cb2214a681fc7e95b6ffb509d076ebfb" }, "LuaSnip": { "branch": "master", "commit": "1fd22fa96c11573248f9fdd09f25e724c7bb3dd4" },
"SchemaStore.nvim": { "branch": "main", "commit": "2a6a5d3e2bc8a5727b6d083d2920d12a392ed05b" }, "SchemaStore.nvim": { "branch": "main", "commit": "d2a3d1da007549c921f7b0e22521d1c20d09c8a7" },
"alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" }, "alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" },
"animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" }, "animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" },
"bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" }, "bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" },
"bufferline.nvim": { "branch": "main", "commit": "9961d87bb3ec008213c46ba14b3f384a5f520eb5" }, "bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" },
"catppuccin": { "branch": "main", "commit": "85e93601e0f0b48aa2c6bbfae4d0e9d7a1898280" }, "catppuccin": { "branch": "main", "commit": "3d9a5ed556e289bce6c1fb0af89ec838360641b2" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" }, "comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
"dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" }, "dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" },
"flash.nvim": { "branch": "main", "commit": "8a8e74922a383c253b7f92e042b749150140c8d1" }, "edgy.nvim": { "branch": "main", "commit": "4ccc1c67ae2b1a0c55f18c83d03b714e2bb1bae4" },
"flash.nvim": { "branch": "main", "commit": "cc8c7e03987134997d74ee87e55a5717279f2d05" },
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
"gitsigns.nvim": { "branch": "main", "commit": "bce4576a9047085a528c479a7fe1e2f6b787b6c1" }, "gitsigns.nvim": { "branch": "main", "commit": "bdeba1cec3faddd89146690c10b9a87949c0ee66" },
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, "harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "2451adb9bdb0fd32140bf3aa8dbc17ff60050db3" },
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
"middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" }, "middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" },
"mini.ai": { "branch": "main", "commit": "7ae226f331885e6f30e9a8229e113debc59308ae" }, "mini.ai": { "branch": "main", "commit": "7ae226f331885e6f30e9a8229e113debc59308ae" },
"mini.animate": { "branch": "main", "commit": "230140aa0b06af87c9d345573aab1aaf50d8b539" }, "mini.animate": { "branch": "main", "commit": "989ac014933ab5cd14ab83f2fce4b9a08ca6d81e" },
"mini.bufremove": { "branch": "main", "commit": "7821606e35c1ac931b56d8e3155f45ffe76ee7e5" }, "mini.bufremove": { "branch": "main", "commit": "7821606e35c1ac931b56d8e3155f45ffe76ee7e5" },
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" }, "mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
"mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" }, "mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" },
"mini.pairs": { "branch": "main", "commit": "dfa9f6e2576bb8853be277d96b735af59d9be7c2" }, "mini.pairs": { "branch": "main", "commit": "dfa9f6e2576bb8853be277d96b735af59d9be7c2" },
"mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" }, "mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "2d89ca96e08eb6e9c8e50e1bb4738bc5125c9f12" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "71f1841ba6c652908678cece623f52c1fea8a6cd" },
"neoconf.nvim": { "branch": "main", "commit": "a4eb3675cb87be2e2dcb283dddc8c7aabd2c50ca" }, "neoconf.nvim": { "branch": "main", "commit": "360805250fe45391d30b96b6640d03e2c35597ee" },
"neodev.nvim": { "branch": "main", "commit": "471324e6c746284dbbdc1d357799d1911bb7e120" }, "neodev.nvim": { "branch": "main", "commit": "ddf29935af5a510307850919d6772ea6a4e2c008" },
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
"noice.nvim": { "branch": "main", "commit": "74c2902146b080035beb19944baf6f014a954720" }, "noice.nvim": { "branch": "main", "commit": "74c2902146b080035beb19944baf6f014a954720" },
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" }, "nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-lspconfig": { "branch": "master", "commit": "cc388d3f6b9c7c943ae2b2dcd46ad470fd257f91" }, "nvim-lspconfig": { "branch": "master", "commit": "ede4114e1fd41acb121c70a27e1b026ac68c42d6" },
"nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" }, "nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" },
"nvim-notify": { "branch": "master", "commit": "94859430020f5cf32a1b97ddd9e596fed9db7981" }, "nvim-notify": { "branch": "master", "commit": "94859430020f5cf32a1b97ddd9e596fed9db7981" },
"nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" }, "nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" },
"nvim-spectre": { "branch": "master", "commit": "97cfd1b0f5a6ab35979ce1bee6c17f54745fd1e5" }, "nvim-spectre": { "branch": "master", "commit": "97cfd1b0f5a6ab35979ce1bee6c17f54745fd1e5" },
"nvim-treesitter": { "branch": "master", "commit": "c0170e1e2c713341805ce13fe53fe4933e8471d8" }, "nvim-treesitter": { "branch": "master", "commit": "0960322686bfa38afd4f1e0b9660473cf77e24b6" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" },
"nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" }, "nvim-ufo": { "branch": "main", "commit": "6f2ccdf2da390d62f8f9e15fc5ddbcbd312e1e66" },
"nvim-web-devicons": { "branch": "master", "commit": "480a756df82a0c231622c9bf2173bb6634713716" },
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" }, "persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" }, "plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
"stickybuf.nvim": { "branch": "master", "commit": "4c667bc837e5e3fec5a8857ee99f1a229fc76df9" }, "promise-async": { "branch": "main", "commit": "e94f35161b8c5d4a4ca3b6ff93dd073eb9214c0e" },
"tabnine": { "branch": "master", "commit": "cceef1024aa1d8a17698a77c499a124fe85f1f79" }, "stickybuf.nvim": { "branch": "master", "commit": "e3db41f2c1bb2df3ee6ff964ee74fe991f6f9566" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" },
"telescope.nvim": { "branch": "master", "commit": "b543aaa2c9cf8123ed2fe7dbb6c211a9cd415124" }, "telescope.nvim": { "branch": "master", "commit": "ed9574dd6dde143d009b2528ea6d79bd34bbe6c8" },
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" }, "todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
"tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" }, "tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" },
"transparent.nvim": { "branch": "main", "commit": "3af6232c8d39d51062702e875ff6407c1eeb0391" },
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" }, "trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
"typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" }, "typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" },
"venv-selector.nvim": { "branch": "main", "commit": "14d6e866070f759e9014a8053954f835294f56f9" }, "venv-selector.nvim": { "branch": "main", "commit": "14d6e866070f759e9014a8053954f835294f56f9" },
"vim-illuminate": { "branch": "master", "commit": "8c910b2f84ae6acd9b4b17330bb94dd783c0c11a" }, "vim-illuminate": { "branch": "master", "commit": "6acf7d4a18255a3ddc43770866c8e148fe85af7b" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" }, "vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }, "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },

View File

@@ -1,3 +1,19 @@
-- 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 keymap = vim.keymap.set
-- ╭──────────────────────────────────────────────────────────╮
-- │ Comment box │
-- ╰──────────────────────────────────────────────────────────╯
local cb = require("comment-box")
-- left aligned fixed size box with left aligned text
keymap({ "n", "v" }, "<Leader>bcb", cb.lbox, { desc = "Comment: Left aligned" })
-- centered adapted box with centered text
keymap({ "n", "v" }, "<Leader>bcc", cb.ccbox, { desc = "Comment: Centered" })
-- centered line
keymap("n", "<Leader>bcl", cb.cline, { desc = "Comment: Centered line" })
keymap("i", "<M-l>", cb.cline, { desc = "Comment: Centered line" })

View File

@@ -27,6 +27,7 @@ require("lazy").setup({
{ import = "lazyvim.plugins.extras.lang.typescript" }, { import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.yaml" }, { import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.linting.eslint" }, { import = "lazyvim.plugins.extras.linting.eslint" },
{ import = "lazyvim.plugins.extras.ui.edgy" },
{ import = "lazyvim.plugins.extras.ui.mini-animate" }, { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins -- import/override with your plugins
{ import = "plugins" }, { import = "plugins" },
@@ -40,7 +41,7 @@ require("lazy").setup({
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 = { "catppuccin", "tokyonight", "habamax" } }, install = { colorscheme = { "catppuccin" } },
checker = { enabled = true }, -- automatically check for plugin updates checker = { enabled = true }, -- automatically check for plugin updates
performance = { performance = {
rtp = { rtp = {

View File

@@ -6,6 +6,8 @@ local opt = vim.opt
opt.number = true opt.number = true
opt.relativenumber = true opt.relativenumber = true
opt.modeline = true
opt.spelllang = { "en", "fi" }
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View File

@@ -75,11 +75,12 @@ return {
{ {
"codota/tabnine-nvim", "codota/tabnine-nvim",
name = "tabnine", name = "tabnine",
enabled = false,
build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh", build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh",
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" }, cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
event = "User", event = "User",
opts = { opts = {
accept_keymap = "<C-CR>", accept_keymap = "<C-e>",
dismiss_keymap = "<C-Esc>", dismiss_keymap = "<C-Esc>",
}, },
}, },

View File

@@ -105,7 +105,7 @@ return {
init = function() init = function()
require("lazyvim.util").on_attach(function(_, buffer) require("lazyvim.util").on_attach(function(_, buffer)
-- stylua: ignore -- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) vim.keymap.set("n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
end) end)
end, end,

View File

@@ -0,0 +1,47 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"php",
})
end,
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"phpactor",
})
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
phpactor = {},
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
"williamboman/mason.nvim",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
table.insert(opts.ensure_installed, "php-debug-adapter")
end
end,
},
opts = function()
local dap = require("dap")
local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path()
dap.adapters.php = {
type = "executable",
command = "node",
args = { path .. "/extension/out/phpDebug.js" },
}
end,
},
}

View File

@@ -1,7 +1,10 @@
return { return {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
opts = { opts = {
servers = { eslint = {} }, servers = {
eslint = {},
tflint = {},
},
setup = { setup = {
eslint = function() eslint = function()
require("lazyvim.util").on_attach(function(client) require("lazyvim.util").on_attach(function(client)

View File

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

@@ -0,0 +1,23 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
},
},
},
}

View File

@@ -14,6 +14,101 @@ return {
flavour = "mocha", flavour = "mocha",
}, },
}, },
-- Remove all background colors to make nvim transparent
-- https://github.com/xiyaowong/transparent.nvim
{
"xiyaowong/transparent.nvim",
lazy = false,
enabled = true,
config = function()
vim.g.transparent_groups = vim.list_extend(
vim.g.transparent_groups or {},
vim.tbl_map(function(v)
return v.hl_group
end, vim.tbl_values(require("bufferline.config").highlights))
)
end,
},
-- A fancy, configurable, notification manager for NeoVim
-- https://github.com/rcarriga/nvim-notify
{
"rcarriga/nvim-notify",
opts = {
-- Set background color to black so transparent doesn't mess stuff up
background_colour = "#000000",
},
},
-- Not UFO in the sky, but an ultra fold in Neovim.
-- https://github.com/kevinhwang91/nvim-ufo/
{
"kevinhwang91/nvim-ufo",
lazy = false,
enabled = true,
dependencies = {
"kevinhwang91/promise-async",
{ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" },
},
init = function()
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
vim.o.foldcolumn = "1" -- '0' is not bad
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
end,
opts = {
open_fold_hl_timeout = 150,
close_fold_kinds = { "imports", "comment" },
preview = {
win_config = {
border = { "", "", "", "", "", "", "", "" },
winhighlight = "Normal:Folded",
winblend = 0,
},
mappings = {
scrollU = "<C-u>",
scrollD = "<C-d>",
jumpTop = "[",
jumpBot = "]",
},
},
provider_selector = function(bufnr, filetype, buftype)
return { "treesitter", "indent" }
end,
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local suffix = (" 󰁂 %d "):format(endLnum - lnum)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
table.insert(newVirtText, { suffix, "MoreMsg" })
return newVirtText
end,
},
},
-- Indent guides for Neovim
-- https://github.com/lukas-reineke/indent-blankline.nvim
{ "lukas-reineke/indent-blankline.nvim" },
-- Git integration for buffers
-- https://github.com/lewis6991/gitsigns.nvim
{ "lewis6991/gitsigns.nvim" },
-- Getting you where you want with the fewest keystrokes. -- Getting you where you want with the fewest keystrokes.
-- https://github.com/ThePrimeagen/harpoon -- https://github.com/ThePrimeagen/harpoon
{ "ThePrimeagen/harpoon" }, { "ThePrimeagen/harpoon" },
@@ -33,7 +128,7 @@ return {
"anuvyklack/animation.nvim", "anuvyklack/animation.nvim",
}, },
config = function() config = function()
vim.o.winwidth = 10 vim.o.winwidth = 15
vim.o.winminwidth = 10 vim.o.winminwidth = 10
vim.o.equalalways = false vim.o.equalalways = false
require("windows").setup() require("windows").setup()

View File

@@ -7,7 +7,7 @@ $directory\
$git_branch\ $git_branch\
$git_state\ $git_state\
$git_status\ $git_status\
$fill\ $fill \
$battery\ $battery\
$username\ $username\
$hostname\ $hostname\
@@ -23,7 +23,7 @@ $line_break\
$character""" $character"""
# Timeout for commands executed by starship (in milliseconds). # Timeout for commands executed by starship (in milliseconds).
# command_timeout = 1000 command_timeout = 1500
[character] [character]
success_symbol = "[→](bold green)" success_symbol = "[→](bold green)"
@@ -43,16 +43,18 @@ style = "blue"
[docker_context] [docker_context]
symbol = " " symbol = " "
format = '[$symbol$context]($style) '
[fill] [fill]
symbol = '·' symbol = '·'
style = 'bold black' style = 'bold black'
[gcloud] [gcloud]
format = ' [($symbol)$account(@$domain)(\($region\))]($style) ' format = '[($symbol)$account(@$domain)(\($region\))]($style) '
[git_branch] [git_branch]
symbol = " " symbol = " "
format = '[$symbol$branch(:$remote_branch)]($style) '
truncation_length = 20 truncation_length = 20
truncation_symbol = '…' truncation_symbol = '…'
ignore_branches = ['master', 'main'] ignore_branches = ['master', 'main']
@@ -72,9 +74,15 @@ disabled = false
[golang] [golang]
symbol = " " symbol = " "
format = '[$symbol($version )]($style) '
[hostname] [hostname]
ssh_symbol = " " ssh_symbol = " "
ssh_only = false
format = '[$ssh_symbol](bold blue)[$hostname](bold red) '
[lua]
format = '[$symbol($version )]($style)'
[nodejs] [nodejs]
symbol = " " symbol = " "
@@ -139,5 +147,7 @@ version_format = '${major}.${minor}'
[python] [python]
symbol = " " symbol = " "
format = "[$virtualenv]($style) " format = "[$virtualenv]($style) "
style = "bright-black"
[username]
format = "[$user]($style) "

View File

@@ -94,6 +94,7 @@ set -g @tpm_plugins ' \
catppuccin/tmux \ catppuccin/tmux \
tmux-plugins/tmux-continuum \ tmux-plugins/tmux-continuum \
jaclu/tmux-menus \ jaclu/tmux-menus \
ofirgall/tmux-window-name \
tmux-plugins/tmux-resurrect \ tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-sensible \ tmux-plugins/tmux-sensible \
tmux-plugins/tmux-sessionist \ tmux-plugins/tmux-sessionist \
@@ -108,6 +109,13 @@ set -g @tpm_plugins ' \
## https://github.com/jaclu/tmux-menus ## https://github.com/jaclu/tmux-menus
set -g @menus_trigger 'm' set -g @menus_trigger 'm'
## A plugin to name your tmux windows smartly.
## https://github.com/ofirgall/tmux-window-name
### Maximum name length of a window
set -g @tmux_window_name_max_name_len "20"
### Replace $HOME with ~ in window names
set -g @tmux_window_name_use_tilde "True"
## https://github.com/catppuccin/tmux ## https://github.com/catppuccin/tmux
set -g @catppuccin_flavour "mocha" # latte/frappe/macchiato/mocha set -g @catppuccin_flavour "mocha" # latte/frappe/macchiato/mocha
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
@@ -129,6 +137,7 @@ set -g @continuum-boot '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'
# Finally run the tmux plugin manager # Finally run the tmux plugin manager
run '~/.dotfiles/config/tmux/plugins/tpm/tpm' run '~/.dotfiles/config/tmux/plugins/tpm/tpm'

View File

@@ -31,7 +31,7 @@ bind-key -T copy-mode P send-keys -X toggle-position
bind-key -T copy-mode R send-keys -X rectangle-toggle bind-key -T copy-mode R send-keys -X rectangle-toggle
bind-key -T copy-mode T command-prompt -1 -p "(jump to backward)" { send-keys -X jump-to-backward "%%" } bind-key -T copy-mode T command-prompt -1 -p "(jump to backward)" { send-keys -X jump-to-backward "%%" }
bind-key -T copy-mode X send-keys -X set-mark bind-key -T copy-mode X send-keys -X set-mark
bind-key -T copy-mode Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer -p" bind-key -T copy-mode Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
bind-key -T copy-mode f command-prompt -1 -p "(jump forward)" { send-keys -X jump-forward "%%" } bind-key -T copy-mode f command-prompt -1 -p "(jump forward)" { send-keys -X jump-forward "%%" }
bind-key -T copy-mode g command-prompt -p "(goto line)" { send-keys -X goto-line "%%" } bind-key -T copy-mode g command-prompt -p "(goto line)" { send-keys -X goto-line "%%" }
bind-key -T copy-mode n send-keys -X search-again bind-key -T copy-mode n send-keys -X search-again
@@ -41,7 +41,7 @@ bind-key -T copy-mode t command-prompt -1 -p "(jump to
bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel pbcopy bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel pbcopy
bind-key -T copy-mode MouseDown1Pane select-pane bind-key -T copy-mode MouseDown1Pane select-pane
bind-key -T copy-mode MouseDrag1Pane select-pane \; send-keys -X begin-selection bind-key -T copy-mode MouseDrag1Pane select-pane \; send-keys -X begin-selection
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel pbcopy bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode WheelUpPane select-pane \; send-keys -X -N 5 scroll-up bind-key -T copy-mode WheelUpPane select-pane \; send-keys -X -N 5 scroll-up
bind-key -T copy-mode WheelDownPane select-pane \; send-keys -X -N 5 scroll-down bind-key -T copy-mode WheelDownPane select-pane \; send-keys -X -N 5 scroll-down
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 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
@@ -75,7 +75,7 @@ bind-key -T copy-mode M-r send-keys -X middle-line
bind-key -T copy-mode M-v send-keys -X page-up bind-key -T copy-mode M-v send-keys -X page-up
bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode M-x send-keys -X jump-to-mark bind-key -T copy-mode M-x send-keys -X jump-to-mark
bind-key -T copy-mode M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer -p" bind-key -T copy-mode M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer"
bind-key -T copy-mode "M-{" send-keys -X previous-paragraph bind-key -T copy-mode "M-{" send-keys -X previous-paragraph
bind-key -T copy-mode "M-}" send-keys -X next-paragraph bind-key -T copy-mode "M-}" send-keys -X next-paragraph
bind-key -T copy-mode M-Up send-keys -X halfpage-up bind-key -T copy-mode M-Up send-keys -X halfpage-up
@@ -87,16 +87,13 @@ 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-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-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-f send-keys -X page-down
bind-key -T copy-mode-vi C-h select-pane -L bind-key -T copy-mode-vi C-h send-keys -X cursor-left
bind-key -T copy-mode-vi C-j select-pane -D bind-key -T copy-mode-vi C-j send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi Enter 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-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-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 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 Escape send-keys -X clear-selection
bind-key -T copy-mode-vi C-\ select-pane -l
bind-key -T copy-mode-vi Space send-keys -X begin-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 ' bind-key -T copy-mode-vi ! send-keys -X copy-pipe-and-cancel "tr -d '
' | pbcopy" ' | pbcopy"
@@ -136,7 +133,7 @@ bind-key -T copy-mode-vi T command-prompt -1 -p "(jump to
bind-key -T copy-mode-vi V send-keys -X select-line 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 W send-keys -X next-space
bind-key -T copy-mode-vi X send-keys -X set-mark 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 -p" 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 ^ send-keys -X back-to-indentation
bind-key -T copy-mode-vi b send-keys -X previous-word 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 e send-keys -X next-word-end
@@ -158,7 +155,7 @@ 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 \} send-keys -X next-paragraph
bind-key -T copy-mode-vi MouseDown1Pane select-pane 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 MouseDrag1Pane select-pane \; send-keys -X begin-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel pbcopy 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 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 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 DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
@@ -171,24 +168,15 @@ 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 Left send-keys -X cursor-left
bind-key -T copy-mode-vi Right send-keys -X cursor-right 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-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 -p" 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-Up send-keys -X scroll-up
bind-key -T copy-mode-vi C-Down send-keys -X scroll-down bind-key -T copy-mode-vi C-Down send-keys -X scroll-down
bind-key -T join-pane \" run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-v'" bind-key -T prefix C-Space send-prefix
bind-key -T join-pane \% run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-h'"
bind-key -T join-pane - run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-v'"
bind-key -T join-pane @ run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-b'"
bind-key -T join-pane f run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-b'"
bind-key -T join-pane h run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-h'"
bind-key -T join-pane v run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-v'"
bind-key -T join-pane | run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-h'"
bind-key -T prefix C-Space run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/promote_window.sh '#{session_name}' '#{window_id}' '#{window_name}' '#{pane_current_path}'"
bind-key -T prefix Enter run-shell -b "/Users/ivuorinen/.config/tmux/plugins/tmux-notify/scripts/notify.sh false true"
bind-key -T prefix C-n next-window bind-key -T prefix C-n next-window
bind-key -T prefix C-o rotate-window bind-key -T prefix C-o rotate-window
bind-key -T prefix C-p previous-window bind-key -T prefix C-p previous-window
bind-key -T prefix C-r run-shell /Users/ivuorinen/.config/tmux/plugins/tmux-resurrect/scripts/restore.sh 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 /Users/ivuorinen/.config/tmux/plugins/tmux-resurrect/scripts/save.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 C-z suspend-client
bind-key -T prefix Escape copy-mode bind-key -T prefix Escape copy-mode
bind-key -T prefix Space next-layout bind-key -T prefix Space next-layout
@@ -196,7 +184,7 @@ bind-key -T prefix ! split-window -h -c "#{pane_curr
bind-key -T prefix \" split-window -v -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 \# list-buffers
bind-key -T prefix \$ command-prompt -I "#S" { rename-session "%%" } bind-key -T prefix \$ command-prompt -I "#S" { rename-session "%%" }
bind-key -T prefix \% split-window -h -c "#{pane_current_path}" 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 & 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 \' command-prompt -T window-target -p index { select-window -t ":%%" }
bind-key -T prefix ( switch-client -p bind-key -T prefix ( switch-client -p
@@ -221,40 +209,42 @@ bind-key -T prefix < display-menu -T "#[align=centre
bind-key -T prefix = choose-buffer -Z 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 > 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 ? list-keys -N
bind-key -T prefix @ run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/promote_pane.sh '#{session_name}' '#{pane_id}' '#{pane_current_path}'" 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 /Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/new_session_prompt.sh 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 D choose-client -Z
bind-key -T prefix E select-layout -E bind-key -T prefix E select-layout -E
bind-key -T prefix I run-shell /Users/ivuorinen/.config/tmux/plugins/tpm/bindings/install_plugins 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 L switch-client -l
bind-key -T prefix M run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-notify/scripts/cancel.sh bind-key -T prefix M select-pane -M
bind-key -T prefix N new-window bind-key -T prefix N new-window
bind-key -T prefix R run-shell " tmux source-file /Users/ivuorinen/.config/tmux/tmux.conf > /dev/null; tmux display-message 'Sourced /Users/ivuorinen/.config/tmux/tmux.conf!'" 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 S switch-client -l
bind-key -T prefix U run-shell /Users/ivuorinen/.config/tmux/plugins/tpm/bindings/update_plugins bind-key -T prefix U run-shell $HOME/.dotfiles/config/tmux/plugins/tpm/bindings/update_plugins
bind-key -T prefix X run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/kill_session_prompt.sh '#{session_name}' '#{session_id}'" 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 /Users/ivuorinen/.config/tmux/plugins/tmux-yank/scripts/copy_pane_pwd.sh 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 ] paste-buffer -p
bind-key -T prefix c new-window bind-key -T prefix c new-window
bind-key -T prefix d detach-client bind-key -T prefix d detach-client
bind-key -T prefix f command-prompt { find-window -Z "%%" } bind-key -T prefix f command-prompt { find-window -Z "%%" }
bind-key -T prefix g run-shell /Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/goto_session.sh 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 h select-pane -L
bind-key -T prefix i display-message bind-key -T prefix i display-message
bind-key -T prefix j select-pane -D bind-key -T prefix j select-pane -D
bind-key -T prefix k select-pane -U bind-key -T prefix k select-pane -U
bind-key -T prefix l run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-fzf/main.sh bind-key -T prefix l select-pane -R
bind-key -T prefix m run-shell /Users/ivuorinen/.config/tmux/plugins/tmux-menus/items/main.sh 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 n next-window
bind-key -T prefix o select-pane -t :.+ bind-key -T prefix o select-pane -t :.+
bind-key -T prefix p paste-buffer bind-key -T prefix p paste-buffer
bind-key -T prefix q display-panes bind-key -T prefix q display-panes
bind-key -T prefix r source-file /Users/ivuorinen/.dotfiles/config/tmux/tmux.conf \; display-message "tmux cfg reloaded!" 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 s choose-tree -Zs
bind-key -T prefix t run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh 'join-pane' '-b'" bind-key -T prefix t clock-mode
bind-key -T prefix w choose-tree -Zw bind-key -T prefix w choose-tree -Zw
bind-key -T prefix x run-shell "tmux split-window -l 10 \"/Users/ivuorinen/.config/tmux/plugins/tmux-1password/scripts/main.sh '#{pane_id}'\"" bind-key -T prefix x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind-key -T prefix y run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-yank/scripts/copy_line.sh 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 z resize-pane -Z
bind-key -T prefix \{ swap-pane -U bind-key -T prefix \{ swap-pane -U
bind-key -T prefix \} swap-pane -D bind-key -T prefix \} swap-pane -D
@@ -265,17 +255,16 @@ bind-key -r -T prefix Up select-pane -U
bind-key -r -T prefix Down select-pane -D bind-key -r -T prefix Down select-pane -D
bind-key -r -T prefix Left select-pane -L bind-key -r -T prefix Left select-pane -L
bind-key -r -T prefix Right select-pane -R bind-key -r -T prefix Right select-pane -R
bind-key -T prefix M-Enter run-shell -b "/Users/ivuorinen/.config/tmux/plugins/tmux-notify/scripts/notify.sh true true"
bind-key -T prefix M-1 select-layout even-horizontal 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-2 select-layout even-vertical
bind-key -T prefix M-3 select-layout main-horizontal 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-4 select-layout main-vertical
bind-key -T prefix M-5 select-layout tiled bind-key -T prefix M-5 select-layout tiled
bind-key -T prefix M-m run-shell -b "/Users/ivuorinen/.config/tmux/plugins/tmux-notify/scripts/notify.sh true" 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-n next-window -a
bind-key -T prefix M-o rotate-window -D bind-key -T prefix M-o rotate-window -D
bind-key -T prefix M-p previous-window -a bind-key -T prefix M-p previous-window -a
bind-key -T prefix M-u run-shell /Users/ivuorinen/.config/tmux/plugins/tpm/bindings/clean_plugins 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-Up resize-pane -U 5
bind-key -r -T prefix M-Down resize-pane -D 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-Left resize-pane -L 5
@@ -288,11 +277,6 @@ 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-Down refresh-client -D 10
bind-key -r -T prefix S-Left refresh-client -L 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 -r -T prefix S-Right refresh-client -R 10
bind-key -T root C-h if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-h" "select-pane -L"
bind-key -T root C-j if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-j" "select-pane -D"
bind-key -T root C-k if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-k" "select-pane -U"
bind-key -T root C-l if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-l" "select-pane -R"
bind-key -T root C-\ if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(S+/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-\\" "select-pane -l"
bind-key -T root MouseDown1Pane select-pane -t = \; send-keys -M bind-key -T root MouseDown1Pane select-pane -t = \; send-keys -M
bind-key -T root MouseDown1Status select-window -t = 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 MouseDown2Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { paste-buffer -p }
@@ -306,16 +290,12 @@ bind-key -T root WheelUpStatus previous-window
bind-key -T root WheelDownStatus next-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 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 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 F12 run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-suspend/scripts/suspend.sh \"\" \" @mode_indicator_custom_prompt:: ---- , @mode_indicator_custom_mode_style::bg=brightblack\,fg=black, \""
bind-key -T root M-H previous-window
bind-key -T root M-L next-window
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-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-Up select-pane -U
bind-key -T root M-Down select-pane -D bind-key -T root M-Down select-pane -D
bind-key -T root M-Left select-pane -L bind-key -T root M-Left select-pane -L
bind-key -T root M-Right select-pane -R bind-key -T root M-Right select-pane -R
bind-key -T root S-Left previous-window bind-key -T root C-Tab previous-window
bind-key -T root S-Right next-window bind-key -T root C-S-Tab next-window
bind-key -T suspended F12 run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-suspend/scripts/resume.sh \"\""
``` ```

View File

@@ -1,8 +1,6 @@
- include: "tools/dotbot-defaults.yaml" - include: "tools/dotbot-defaults.yaml"
- shell: - shell:
- echo "Configuring v" - echo "Configuring v"
- brewfile:
- Brewfile
- link: - link:
~/: ~/:
force: true force: true

View File

@@ -18,6 +18,9 @@ git submodule update --init --recursive "${DOTBOT_DIR}"
-d "${BASEDIR}" \ -d "${BASEDIR}" \
--plugin-dir=tools/dotbot-brew \ --plugin-dir=tools/dotbot-brew \
--plugin-dir=tools/dotbot-include \ --plugin-dir=tools/dotbot-include \
--plugin-dir=tools/dotbot-crontab \
--plugin-dir=tools/dotbot-snap \
--plugin-dir=tools/dotbot-pip \
-c "${CONFIG}" \ -c "${CONFIG}" \
"${@}" "${@}"
@@ -30,6 +33,9 @@ if [ "${DOTBOT_HOST}" != "" ]; then
-d "$BASEDIR" \ -d "$BASEDIR" \
--plugin-dir=tools/dotbot-brew \ --plugin-dir=tools/dotbot-brew \
--plugin-dir=tools/dotbot-include \ --plugin-dir=tools/dotbot-include \
--plugin-dir=tools/dotbot-crontab \
--plugin-dir=tools/dotbot-snap \
--plugin-dir=tools/dotbot-pip \
-c "$DOTBOT_HOST_CONFIG" \ -c "$DOTBOT_HOST_CONFIG" \
"${@}" "${@}"
fi fi

View File

@@ -5,36 +5,66 @@
recursive: true recursive: true
~/.local: ~/.local:
recursive: true recursive: true
~/.ssh:
recursive: true
- create: - create:
~/.cache: ~/.cache:
~/.cache/git: ~/.cache/git:
~/.config: ~/.config:
~/.config/cheat/cheatsheets/personal:
~/.config/cheat/cheatsheets/pure-bash-bible:
~/.config/cheat/cheatsheets/tldr:
~/.local: ~/.local:
~/.local/bin:
~/.local/run: ~/.local/run:
~/.local/share: ~/.local/share:
~/.local/state: ~/.local/state:
~/.ssh: ~/.ssh:
mode: 0700 mode: 0700
~/.ssh/local.d:
mode: 0700
~/Code: ~/Code:
- link: - link:
~/: ~/:
force: true force: true
glob: true glob: true
path: base/** path: base/*
prefix: "." prefix: "."
~/.config/: ~/.config/:
glob: true glob: true
path: config/** relink: true
~/.local/: path: config/*
exclude: [config/nvm]
~/.config/nvm/default-packages:
create: true
relink: true
path: config/nvm/default-packages
~/.local/bin:
glob: true glob: true
path: local/** path: local/bin/*
~/.local/man:
glob: true
path: local/man/**
~/.local/share:
glob: true
path: local/share/*
~/.ssh/: ~/.ssh/:
glob: true glob: true
mode: 0600 mode: 0600
path: ssh/** path: ssh/*
- shell: - shell:
- git submodule update --init --recursive --force - git submodule update --init --recursive --force
- bash local/bin/dfm install all - bash local/bin/dfm install all
- pipx:
file: tools/requirements-pipx.txt
stdout: false
stderr: true
- crontab:
- time: 0 5 * * *
command: brew update && brew upgrade
platform: darwin # Optional
- time: 0 5 * * *
command: apt update && apt upgrade
platform: linux # Optional
- time: 0 5 * * *
command: task sync
- snap:
- nvim:
classic: true

View File

@@ -28,9 +28,11 @@ function section_install
MENU=( MENU=(
"all:Installs everything in the correct order" "all:Installs everything in the correct order"
"antigen:Updates the antigen.zsh file" "antigen:Updates the antigen.zsh file"
"cargo:Install rust/cargo packages"
"cheat-databases:Install cheat external cheatsheet databases" "cheat-databases:Install cheat external cheatsheet databases"
"composer:Install composer" "composer:Install composer"
"dotenv:Install dotenv-linter" "dotenv:Install dotenv-linter"
"fonts:Install programming fonts"
"gh:Install GitHub CLI Extensions" "gh:Install GitHub CLI Extensions"
"go:Install Go Packages" "go:Install Go Packages"
"imagick:Install ImageMagick CLI" "imagick:Install ImageMagick CLI"
@@ -40,14 +42,18 @@ function section_install
"nvm:Install Node Version Manager (nvm)" "nvm:Install Node Version Manager (nvm)"
"npm:Install NPM Packages" "npm:Install NPM Packages"
"ntfy:Install ntfy" "ntfy:Install ntfy"
"pip:Install pip/python packages"
"z:Install z" "z:Install z"
) )
case "$1" in case "$1" in
all) all)
$0 install macos $0 install macos
$0 install fonts
$0 install antigen $0 install antigen
$0 brew install $0 brew install
$0 install pip
$0 install cargo
$0 install composer $0 install composer
$0 install dotenv $0 install dotenv
$0 install fzf $0 install fzf
@@ -65,6 +71,10 @@ function section_install
curl -sSfL git.io/antigen -o "$DOTFILES/local/bin/antigen.zsh" \ curl -sSfL git.io/antigen -o "$DOTFILES/local/bin/antigen.zsh" \
&& msg_yay "New antigen installed!" && msg_yay "New antigen installed!"
;; ;;
cargo)
bash "$DOTFILES/scripts/install-cargo-packages.sh" \
&& msg_yay "cargo packages installed!"
;;
cheat-databases) cheat-databases)
for database in "$DOTFILES"/scripts/install-cheat-*; do for database in "$DOTFILES"/scripts/install-cheat-*; do
bash "$database" \ bash "$database" \
@@ -81,6 +91,10 @@ function section_install
| sh -s -- -b "$XDG_BIN_HOME" \ | sh -s -- -b "$XDG_BIN_HOME" \
&& msg_yay "dotenv-linter installed!" && msg_yay "dotenv-linter installed!"
;; ;;
fonts)
bash "$DOTFILES/scripts/install-fonts.sh" \
&& msg_yay "Installed fonts!"
;;
fzf) fzf)
bash "$DOTFILES/scripts/install-fzf.sh" \ bash "$DOTFILES/scripts/install-fzf.sh" \
&& msg_yay "fzf installed!" && msg_yay "fzf installed!"
@@ -126,6 +140,10 @@ function section_install
bash "$DOTFILES/scripts/install-ntfy.sh" \ bash "$DOTFILES/scripts/install-ntfy.sh" \
&& msg_yay "ntfy installed!" && msg_yay "ntfy installed!"
;; ;;
pip)
bash "$DOTFILES/scripts/install-pip-packages.sh" \
&& msg_yay "pip/python packages installed!"
;;
z) z)
bash "$DOTFILES/scripts/install-z.sh" \ bash "$DOTFILES/scripts/install-z.sh" \
&& msg_yay "z has been installed!" && msg_yay "z has been installed!"
@@ -232,10 +250,8 @@ function section_dotfiles
~/.local/share/nvim \ ~/.local/share/nvim \
~/.local/state/nvim \ ~/.local/state/nvim \
~/.cache/nvim \ ~/.cache/nvim \
~/.config/astronvim \
~/.config/nvim ~/.config/nvim
msg_ok "Deleted old nvim files" msg_ok "Deleted old nvim files (share, state and cache + config)"
ln -s "$DOTFILES/config/astronvim" ~/.config/astronvim
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 have npm && $0 install npm
@@ -249,18 +265,9 @@ function section_dotfiles
;; ;;
shfmt) shfmt)
# Format shell scripts according to following rules. # Format shell scripts according to following rules.
find "$DOTFILES" \ fd --full-path "$DOTFILES" -tx \
-type f -executable \ -E '*.pl' -E '*.php' -E '*.py' -E '*.zsh' -E 'plugins' -E 'fzf' -E 'dotbot' \
-not -path '*/.git/*' \ -x shfmt \
-not -path '*dotbot*' \
-not -path '*config/fzf*' \
-not -path '*bin/fzf*' \
-not -path '*tmux/plugins*' \
-not -name '*.pl' \
-not -name '*.py' \
-not -name '*.php' \
-not -name '*.zsh' \
-exec shfmt \
--language-dialect bash \ --language-dialect bash \
--func-next-line --list --write \ --func-next-line --list --write \
--indent 2 --case-indent --space-redirects \ --indent 2 --case-indent --space-redirects \

View File

@@ -2,8 +2,9 @@
# fzf-tmux: starts fzf in a tmux pane # fzf-tmux: starts fzf in a tmux pane
# usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS] # usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS]
fail() { fail()
>&2 echo "$1" {
echo >&2 "$1"
exit 2 exit 2
} }
@@ -19,8 +20,9 @@ term=""
[[ -n "$LINES" ]] && lines=$LINES || lines=$(tput lines) || lines=$(tmux display-message -p "#{pane_height}") [[ -n "$LINES" ]] && lines=$LINES || lines=$(tput lines) || lines=$(tmux display-message -p "#{pane_height}")
[[ -n "$COLUMNS" ]] && columns=$COLUMNS || columns=$(tput cols) || columns=$(tmux display-message -p "#{pane_width}") [[ -n "$COLUMNS" ]] && columns=$COLUMNS || columns=$(tput cols) || columns=$(tmux display-message -p "#{pane_width}")
help() { help()
>&2 echo 'usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS] {
echo >&2 'usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS]
LAYOUT OPTIONS: LAYOUT OPTIONS:
(default layout: -d 50%) (default layout: -d 50%)
@@ -55,7 +57,7 @@ while [[ $# -gt 0 ]]; do
echo "fzf-tmux (with fzf $("$fzf" --version))" echo "fzf-tmux (with fzf $("$fzf" --version))"
exit exit
;; ;;
-p*|-w*|-h*|-x*|-y*|-d*|-u*|-r*|-l*) -p* | -w* | -h* | -x* | -y* | -d* | -u* | -r* | -l*)
if [[ "$arg" =~ ^-[pwhxy] ]]; then if [[ "$arg" =~ ^-[pwhxy] ]]; then
[[ "$opt" =~ "-E" ]] || opt="-E" [[ "$opt" =~ "-E" ]] || opt="-E"
elif [[ "$arg" =~ ^.[lr] ]]; then elif [[ "$arg" =~ ^.[lr] ]]; then
@@ -93,9 +95,9 @@ while [[ $# -gt 0 ]]; do
elif [[ "$arg" =~ ^-[whxy] ]]; then elif [[ "$arg" =~ ^-[whxy] ]]; then
opt="$opt ${arg:0:2}$size" opt="$opt ${arg:0:2}$size"
elif [[ "$size" =~ %$ ]]; then elif [[ "$size" =~ %$ ]]; then
size=${size:0:((${#size}-1))} size=${size:0:((${#size} - 1))}
if [[ -n "$swap" ]]; then if [[ -n "$swap" ]]; then
opt="$opt -p $(( 100 - size ))" opt="$opt -p $((100 - size))"
else else
opt="$opt -p $size" opt="$opt -p $size"
fi fi
@@ -106,7 +108,7 @@ while [[ $# -gt 0 ]]; do
else else
max=$lines max=$lines
fi fi
size=$(( max - size )) size=$((max - size))
[[ $size -lt 0 ]] && size=0 [[ $size -lt 0 ]] && size=0
opt="$opt -l $size" opt="$opt -l $size"
else else
@@ -152,13 +154,14 @@ fifo1="${TMPDIR:-/tmp}/fzf-fifo1-$id"
fifo2="${TMPDIR:-/tmp}/fzf-fifo2-$id" fifo2="${TMPDIR:-/tmp}/fzf-fifo2-$id"
fifo3="${TMPDIR:-/tmp}/fzf-fifo3-$id" fifo3="${TMPDIR:-/tmp}/fzf-fifo3-$id"
if tmux_win_opts=$(tmux show-options -p remain-on-exit \; show-options -p synchronize-panes 2> /dev/null); then if tmux_win_opts=$(tmux show-options -p remain-on-exit \; show-options -p synchronize-panes 2> /dev/null); then
tmux_win_opts=( $(sed '/ off/d; s/synchronize-panes/set-option -p synchronize-panes/; s/remain-on-exit/set-option -p remain-on-exit/; s/$/ \\;/' <<< "$tmux_win_opts") ) tmux_win_opts=($(sed '/ off/d; s/synchronize-panes/set-option -p synchronize-panes/; s/remain-on-exit/set-option -p remain-on-exit/; s/$/ \\;/' <<< "$tmux_win_opts"))
tmux_off_opts='; set-option -p synchronize-panes off ; set-option -p remain-on-exit off' tmux_off_opts='; set-option -p synchronize-panes off ; set-option -p remain-on-exit off'
else else
tmux_win_opts=( $(tmux show-window-options remain-on-exit \; show-window-options synchronize-panes | sed '/ off/d; s/^/set-window-option /; s/$/ \\;/') ) tmux_win_opts=($(tmux show-window-options remain-on-exit \; show-window-options synchronize-panes | sed '/ off/d; s/^/set-window-option /; s/$/ \\;/'))
tmux_off_opts='; set-window-option synchronize-panes off ; set-window-option remain-on-exit off' tmux_off_opts='; set-window-option synchronize-panes off ; set-window-option remain-on-exit off'
fi fi
cleanup() { cleanup()
{
\rm -f $argsf $fifo1 $fifo2 $fifo3 \rm -f $argsf $fifo1 $fifo2 $fifo3
# Restore tmux window options # Restore tmux window options
@@ -196,7 +199,7 @@ if [[ "$opt" =~ "-E" ]]; then
exit 2 exit 2
fi fi
fi fi
[[ -n "$FZF_DEFAULT_OPTS" ]] && envs="$envs FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS")" [[ -n "$FZF_DEFAULT_OPTS" ]] && envs="$envs FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS")"
[[ -n "$FZF_DEFAULT_COMMAND" ]] && envs="$envs FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")" [[ -n "$FZF_DEFAULT_COMMAND" ]] && envs="$envs FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")"
[[ -n "$RUNEWIDTH_EASTASIAN" ]] && envs="$envs RUNEWIDTH_EASTASIAN=$(printf %q "$RUNEWIDTH_EASTASIAN")" [[ -n "$RUNEWIDTH_EASTASIAN" ]] && envs="$envs RUNEWIDTH_EASTASIAN=$(printf %q "$RUNEWIDTH_EASTASIAN")"
[[ -n "$BAT_THEME" ]] && envs="$envs BAT_THEME=$(printf %q "$BAT_THEME")" [[ -n "$BAT_THEME" ]] && envs="$envs BAT_THEME=$(printf %q "$BAT_THEME")"
@@ -236,6 +239,9 @@ fi
tmux \ tmux \
split-window -c "$PWD" $opt "bash -c 'exec -a fzf bash $argsf'" $swap \ split-window -c "$PWD" $opt "bash -c 'exec -a fzf bash $argsf'" $swap \
$tmux_off_opts \ $tmux_off_opts \
> /dev/null 2>&1 || { "$fzf" "${args[@]}"; exit $?; } > /dev/null 2>&1 || {
"$fzf" "${args[@]}"
exit $?
}
cat $fifo2 cat $fifo2
exit "$(cat $fifo3)" exit "$(cat $fifo3)"

View File

@@ -17,6 +17,9 @@ KB=$(tmux list-keys)
H="# tmux keybindings\n" H="# tmux keybindings\n"
L="\n\nLeader: \`<ctrl><space>\`\n\n" L="\n\nLeader: \`<ctrl><space>\`\n\n"
# Generalize expanded $HOME to "$HOME"
KB="${KB//$HOME/\$HOME}"
msg "Outputting tmux keybindings to $TMUX_KEYBINDINGS_DOCS" msg "Outputting tmux keybindings to $TMUX_KEYBINDINGS_DOCS"
echo -e "${H}${L}${CB}${KB}${CB}" > "$TMUX_KEYBINDINGS_DOCS" echo -e "${H}${L}${CB}${KB}${CB}" > "$TMUX_KEYBINDINGS_DOCS"
msg_done "Done!" msg_done "Done!"

View File

@@ -1,136 +1,195 @@
#!/usr/bin/python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Python script to find the largest files in a git repository. # Python script to find the largest files in a git repository.
# The general method is based on the script in this blog post: # The general method is based on the script in this blog post:
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ # http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# #
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch # The above script worked for me, but was very slow on my 11GB repository.
# of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects. # This version has a bunch of changes to speed things up to a more
# reasonable time. It takes less than a minute on repos with 250K objects.
# #
# The MIT License (MIT) # The MIT License (MIT)
# Copyright (c) 2015 Nick Kocharhook # Copyright (c) 2015 Nick Kocharhook
# Copyright (c) 2023 Ismo Vuorinen
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # Permission is hereby granted, free of charge, to any person obtaining a copy
# associated documentation files (the "Software"), to deal in the Software without restriction, # of this software and associated documentation files (the "Software"), to deal
# including without limitation the rights to use, copy, modify, merge, publish, distribute, # in the Software without restriction, including without limitation the rights
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: # furnished to do so, subject to the following conditions:
# #
# The above copyright notice and this permission notice shall be included in all copies or # The above copyright notice and this permission notice shall be included in all copies
# substantial portions of the Software. # or substantial portions of the Software.
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# vim:tw=120:ts=4:ft=python:norl:
from subprocess import check_output, CalledProcessError, Popen, PIPE from subprocess import check_output, Popen, PIPE
import argparse import argparse
import signal import signal
import sys import sys
sortByOnDiskSize = False sortByOnDiskSize = False
class Blob(object):
sha1 = ''
size = 0
packedSize = 0
path = ''
def __init__(self, line):
cols = line.split()
self.sha1, self.size, self.packedSize = cols[0], int(cols[2]), int(cols[3])
def __repr__(self):
return '{} - {} - {} - {}'.format(
self.sha1, self.size, self.packedSize, self.path)
def __lt__(self, other):
if (sortByOnDiskSize):
return self.size < other.size
else:
return self.packedSize < other.packedSize
def csv_line(self):
return "{},{},{},{}".format(
self.size/1024, self.packedSize/1024, self.sha1, self.path)
def main(): def main():
global sortByOnDiskSize global sortByOnDiskSize
signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGINT, signal_handler)
args = parseArguments() args = parse_arguments()
sortByOnDiskSize = args.sortByOnDiskSize sortByOnDiskSize = args.sortByOnDiskSize
sizeLimit = 1024*args.filesExceeding sizeLimit = 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 = getTopBlobs(args.matchCount, sizeLimit) blobs = get_top_blobs(args.matchCount, sizeLimit)
populateBlobPaths(blobs) populate_blob_paths(blobs)
printOutBlobs(blobs) print_out_blobs(blobs)
def getTopBlobs(count, sizeLimit):
sortColumn = 4
if sortByOnDiskSize:
sortColumn = 3
verifyPack = "git verify-pack -v `git rev-parse --git-dir`/objects/pack/pack-*.idx | grep blob | sort -k{}nr".format(sortColumn)
output = check_output(verifyPack, shell=True).split("\n")[:-1]
blobs = dict()
compareBlob = Blob("a b {} {} c".format(sizeLimit, sizeLimit)) # use __lt__ to do the appropriate comparison
for objLine in output:
blob = Blob(objLine)
if sizeLimit > 0:
if compareBlob < blob:
blobs[blob.sha1] = blob
else:
break
else:
blobs[blob.sha1] = blob
if len(blobs) == count:
break
return blobs
def populateBlobPaths(blobs): def get_top_blobs(count, sizeLimit):
if len(blobs): """Get top blobs from git repository
print "Finding object paths…"
# Only include revs which have a path. Other revs aren't blobs. Args:
revList = "git rev-list --all --objects | awk '$2 {print}'" count (int): How many items to return
allObjectLines = check_output(revList, shell=True).split("\n")[:-1] sizeLimit (int): What is the size limit
outstandingKeys = blobs.keys() Returns:
dict: Dictionary of Blobs
"""
sortColumn = 4
for line in allObjectLines: if sortByOnDiskSize:
cols = line.split() sortColumn = 3
sha1, path = cols[0], " ".join(cols[1:])
if (sha1 in outstandingKeys): verifyPack = "git verify-pack -v `git rev-parse --git-dir`/objects/pack/pack-*.idx | grep blob | sort -k{}nr".format(sortColumn) # noqa: E501
outstandingKeys.remove(sha1) output = check_output(verifyPack, shell=True).decode('utf-8').strip().split("\n")[:-1] # noqa: E501
blobs[sha1].path = path
# short-circuit the search if we're done blobs = dict()
if not len(outstandingKeys): # use __lt__ to do the appropriate comparison
break compareBlob = Blob("a b {} {} c".format(sizeLimit, sizeLimit))
for objLine in output:
blob = Blob(objLine)
if sizeLimit > 0:
if compareBlob < blob:
blobs[blob.sha1] = blob
else:
break
else:
blobs[blob.sha1] = blob
if len(blobs) == count:
break
return blobs
def printOutBlobs(blobs): def populate_blob_paths(blobs):
if len(blobs): """Populate blob paths that only have a path
csvLines = ["size,pack,hash,path"]
for blob in sorted(blobs.values(), reverse=True): Args:
csvLines.append(blob.csvLine()) blobs (Blob, dict): Dictionary of Blobs
"""
if len(blobs):
print("Finding object paths…")
p = Popen(["column", "-t", "-s", "','"], stdin=PIPE, stdout=PIPE, stderr=PIPE) # Only include revs which have a path. Other revs aren't blobs.
stdout, stderr = p.communicate("\n".join(csvLines)+"\n") revList = "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
outstanding_keys = list(blobs.keys())
print "\nAll sizes in kB. The pack column is the compressed size of the object inside the pack file.\n" for line in all_object_lines:
print stdout.rstrip('\n') cols = line.split()
else: sha1, path = cols[0], " ".join(cols[1:])
print "No files found which match those criteria."
if (sha1 in outstanding_keys):
outstanding_keys.remove(sha1)
blobs[sha1].path = path
# short-circuit the search if we're done
if not len(outstanding_keys):
break
def parseArguments(): def print_out_blobs(blobs):
parser = argparse.ArgumentParser(description='List the largest files in a git repository') if len(blobs):
parser.add_argument('-c', '--match-count', dest='matchCount', type=int, default=10, csvLines = ["size,pack,hash,path"]
help='The number of files to return. Default is 10. Ignored if --files-exceeding is used.')
parser.add_argument('--files-exceeding', dest='filesExceeding', type=int, default=0,
help='The cutoff amount, in KB. Files with a pack size (or pyhsical size, with -p) larger than this will be printed.')
parser.add_argument('-p', '--physical-sort', dest='sortByOnDiskSize', action='store_true', default=False,
help='Sort by the on-disk size of the files. Default is to sort by the pack size.')
return parser.parse_args() for blob in sorted(blobs.values(), reverse=True):
csvLines.append(blob.csv_line())
command = ["column", "-t", "-s", ","]
p = Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE)
# Encode the input as bytes
input_data = ("\n".join(csvLines) + "\n").encode()
stdout, _ = p.communicate(input_data)
print("\nAll sizes in kB. The pack column is the compressed size of the object inside the pack file.\n") # noqa: E501
print(stdout.decode("utf-8").rstrip('\n'))
else:
print("No files found which match those criteria.")
def parse_arguments():
parser = argparse.ArgumentParser(
description='List the largest files in a git repository'
)
parser.add_argument(
'-c', '--match-count', dest='matchCount', type=int, default=10,
help='Files to return. Default is 10. Ignored if --files-exceeding is used.'
)
parser.add_argument(
'--files-exceeding', dest='filesExceeding', type=int, default=0,
help='The cutoff amount, in KB. Files with a pack size (or physical size, with -p) larger than this will be printed.' # noqa: E501
)
parser.add_argument(
'-p', '--physical-sort', dest='sortByOnDiskSize',
action='store_true', default=False,
help='Sort by the on-disk size. Default is to sort by the pack size.'
)
return parser.parse_args()
def signal_handler(signal, frame): def signal_handler(signal, frame):
@@ -138,29 +197,6 @@ def signal_handler(signal, frame):
sys.exit(0) sys.exit(0)
class Blob(object):
sha1 = ''
size = 0
packedSize = 0
path = ''
def __init__(self, line):
cols = line.split()
self.sha1, self.size, self.packedSize = cols[0], int(cols[2]), int(cols[3])
def __repr__(self):
return '{} - {} - {} - {}'.format(self.sha1, self.size, self.packedSize, self.path)
def __lt__(self, other):
if (sortByOnDiskSize):
return self.size < other.size
else:
return self.packedSize < other.packedSize
def csvLine(self):
return "{},{},{},{}".format(self.size/1024, self.packedSize/1024, self.sha1, self.path)
# Default function is main() # Default function is main()
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@@ -10,9 +10,9 @@
# Modified by Ismo Vuorinen <https://github.com/ivuorinen> 2023 # Modified by Ismo Vuorinen <https://github.com/ivuorinen> 2023
# Determine width of terminal # Determine width of terminal
hr_col_count="$( (tput cols - 4) )" hr_col_count="$( (tput cols - 4))"
if [ -z "${hr_col_count+set}" ] || [ "$hr_col_count" -lt 1 ]; then if [ -z "${hr_col_count+set}" ] || [ "$hr_col_count" -lt 1 ]; then
hr_col_count="${COLUMNS:-80}" hr_col_count="${COLUMNS:-80}"
fi fi
# Colors # Colors
@@ -21,20 +21,21 @@ hr_color="${hr_color:=$CLR_RED}"
hr_reset="\033[0m" hr_reset="\033[0m"
# Prints the HR line # Prints the HR line
hr_draw_char() { hr_draw_char()
local CHAR="$1" {
local LINE="" local CHAR="$1"
LINE=$(printf "%*s" "$((hr_col_count - 3))" " ") local LINE=""
LINE="${LINE// /${CHAR}}" LINE=$(printf "%*s" "$((hr_col_count - 3))" " ")
echo -e "${hr_color}${LINE:0:${hr_col_count}}${hr_reset}" LINE="${LINE// /${CHAR}}"
echo -e "${hr_color}${LINE:0:${hr_col_count}}${hr_reset}"
} }
# Passes param and calls hr() # Passes param and calls hr()
hr() { hr()
for WORD in "${@:--}"; do {
hr_draw_char "$WORD" for WORD in "${@:--}"; do
done hr_draw_char "$WORD"
done
} }
hr "$@" hr "$@"

View File

@@ -16,21 +16,22 @@ COLOR_S='\033[0;36m'
RESET='\033[0m' RESET='\033[0m'
# Print time-based personalized message, using figlet & lolcat if availible # Print time-based personalized message, using figlet & lolcat if availible
function welcome_greeting () { function welcome_greeting()
{
h=$(date +%H) h=$(date +%H)
if [ "$h" -lt 04 ] || [ "$h" -gt 22 ]; if [ "$h" -lt 04 ] || [ "$h" -gt 22 ]; then
then greeting="Good Night" greeting="Good Night"
elif [ "$h" -lt 12 ]; elif [ "$h" -lt 12 ]; then
then greeting="Good morning" greeting="Good morning"
elif [ "$h" -lt 18 ]; elif [ "$h" -lt 18 ]; then
then greeting="Good afternoon" greeting="Good afternoon"
elif [ "$h" -lt 22 ]; elif [ "$h" -lt 22 ]; then
then greeting="Good evening" greeting="Good evening"
else else
greeting="Hello" greeting="Hello"
fi fi
WELCOME_MSG="$greeting $USER!" WELCOME_MSG="$greeting $USER!"
if hash lolcat 2>/dev/null && hash figlet 2>/dev/null; then if hash lolcat 2> /dev/null && hash figlet 2> /dev/null; then
echo "${WELCOME_MSG}" | figlet | lolcat echo "${WELCOME_MSG}" | figlet | lolcat
else else
echo -e "$COLOR_P${WELCOME_MSG}${RESET}\n" echo -e "$COLOR_P${WELCOME_MSG}${RESET}\n"
@@ -38,8 +39,9 @@ function welcome_greeting () {
} }
# Print system information with neofetch, if it's installed # Print system information with neofetch, if it's installed
function welcome_sysinfo () { function welcome_sysinfo()
if hash neofetch 2>/dev/null; then {
if hash neofetch 2> /dev/null; then
neofetch --shell_version off \ neofetch --shell_version off \
--disable kernel distro shell resolution cpu gpu de wm wm_theme theme icons terminal \ --disable kernel distro shell resolution cpu gpu de wm wm_theme theme icons terminal \
--backend off \ --backend off \
@@ -50,7 +52,8 @@ function welcome_sysinfo () {
} }
# Print todays info: Date, IP, weather, etc # Print todays info: Date, IP, weather, etc
function welcome_today () { function welcome_today()
{
timeout=1 timeout=1
echo -e "\033[1;34mToday\n------" echo -e "\033[1;34mToday\n------"
@@ -62,7 +65,7 @@ function welcome_today () {
echo -e "${RESET}" echo -e "${RESET}"
# Print IP address # Print IP address
if hash ip 2>/dev/null; then if hash ip 2> /dev/null; then
ip_address=$(ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}') ip_address=$(ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}')
ip_interface=$(ip route get 8.8.8.8 | awk -F"dev " 'NR==1{split($2,a," ");print a[1]}') ip_interface=$(ip route get 8.8.8.8 | awk -F"dev " 'NR==1{split($2,a," ");print a[1]}')
echo -e "${COLOR_S}🌐 IP: $(curl -s -m $timeout 'https://ipinfo.io/ip') (${ip_address} on ${ip_interface})" echo -e "${COLOR_S}🌐 IP: $(curl -s -m $timeout 'https://ipinfo.io/ip') (${ip_address} on ${ip_interface})"
@@ -71,23 +74,11 @@ function welcome_today () {
} }
# Putting it all together # Putting it all together
function welcome() { function welcome()
{
welcome_greeting welcome_greeting
welcome_sysinfo welcome_sysinfo
welcome_today welcome_today
} }
# Determine if file is being run directly or sourced welcome "$@"
([[ -n $ZSH_EVAL_CONTEXT && $ZSH_EVAL_CONTEXT =~ :file$ ]] \
|| [[ -n $KSH_VERSION && $(cd "$(dirname -- "$0")" \
&& printf '%s' "${PWD%/}/")$(basename -- "$0") != "${.sh.file}" ]] \
|| [[ -n $BASH_VERSION ]] && (return 0 2>/dev/null)
) && sourced=1 || sourced=0
# If script being called directly run immediately
if [ "$sourced" -eq 0 ]; then
welcome "$@"
fi
# EOF

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
# Install cargo/rust packages.
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
! have cargo && {
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
}
packages=(
# a subprocess caching utility
"bkt"
# a structural diff that understands syntax
"difftastic"
# a modern replacement for ls.
"eza"
# A simple, fast and user-friendly alternative to 'find'
"fd-find"
"cargo-update"
"pijul"
"ripgrep"
)
for pkg in "${packages[@]}"; do
# Trim spaces
pkg=${pkg// /}
# Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
msg_run "Installing cargo package $pkg"
cargo install "$pkg"
echo ""
done

View File

@@ -38,6 +38,9 @@ for d in "$TLDR_TEMP_DIR"/pages/*; do
# echo "-> $DIRNAME ($d)" # echo "-> $DIRNAME ($d)"
SECTION_DIR="${TLDR_CHEAT_DEST}/$DIRNAME" SECTION_DIR="${TLDR_CHEAT_DEST}/$DIRNAME"
[ "$DIRNAME" = "common" ] && SECTION_DIR="${TLDR_CHEAT_DEST}"
TLDR_TAGS="tags: [$DIRNAME]" TLDR_TAGS="tags: [$DIRNAME]"
if [ ! -d "$SECTION_DIR" ]; then if [ ! -d "$SECTION_DIR" ]; then
@@ -48,7 +51,7 @@ for d in "$TLDR_TEMP_DIR"/pages/*; do
BASENAME=$(basename "$FILE" .md) BASENAME=$(basename "$FILE" .md)
FILENAME="${BASENAME%%.*}" FILENAME="${BASENAME%%.*}"
# echo "-> $FILE = $FILENAME" # echo "-> $FILE = $FILENAME"
TLDR_FILE="$SECTION_DIR/${FILENAME}" TLDR_FILE="$SECTION_DIR/${BASENAME}"
# echo "-> dest: $TLDR_FILE" # echo "-> dest: $TLDR_FILE"
# Update the original file for making the replacable value comparable # Update the original file for making the replacable value comparable

44
scripts/install-fonts.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# Install NerdFonts
#
# shellcheck source="shared.sh"
source "$HOME/.dotfiles/scripts/shared.sh"
GIT_REPO="https://github.com/ryanoasis/nerd-fonts.git"
TMP_PATH="$XDG_CACHE_HOME/nerd-fonts"
msg "-- NerdFonts --"
fonts=(
Hack
IntelOneMono
JetBrainsMono
OpenDyslexic
SpaceMono
)
if [ ! -d "$TMP_PATH" ]; then
git clone --filter=blob:none --sparse "$GIT_REPO" "$TMP_PATH"
fi
cd "$TMP_PATH" || {
msg_err "No such folder $TMP_PATH"
exit 1
}
for ext in "${fonts[@]}"; do
# Trim spaces
ext=${ext// /}
# Skip comments
if [[ ${ext:0:1} == "#" ]]; then continue; fi
msg_run "Adding $ext to sparse-checkout"
git sparse-checkout add "patched-fonts/$ext"
echo ""
done
msg "Starting to install NerdFonts..."
./install.sh -s ${fonts[*]}
msg_ok "Done"

View File

@@ -25,4 +25,3 @@ msg "Installing git-crypt"
fi fi
} }
msg_done "Done installing git-crypt" msg_done "Done installing git-crypt"

View File

@@ -41,7 +41,7 @@ done
msg "Installing completions for selected packages" msg "Installing completions for selected packages"
have git-profile && { have git-profile && {
git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/git-profile" \ git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/_git-profile" \
&& msg_yay "Installed completions for git-profile" && msg_yay "Installed completions for git-profile"
} }

25
scripts/install-pip-packages.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Install python/pip packages.
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
! have pip && {
msg_err "Could not find pip, something really terrible is going on." && exit 1
}
packages=(
"pipx"
"libtmux"
)
for pkg in "${packages[@]}"; do
# Trim spaces
pkg=${pkg// /}
# Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
python3 -m pip install --user "$pkg"
echo ""
done

View File

@@ -197,11 +197,32 @@ function menu_usage()
done done
} }
# Cache commands using bkt if installed
if command -v bkt >&/dev/null; then
bkt()
{
command bkt "$@"
}
else
# If bkt isn't installed skip its arguments and just execute directly.
# Optionally write a msg to stderr suggesting users install bkt.
bkt()
{
while [[ "$1" == --* ]]; do shift; done
"$@"
}
fi
# shorthand for checking if the system has the bin in path. # shorthand for checking if the system has the bin in path.
# usage: have php && php -v # usage: have php && php -v
function have function have
{ {
command -v "$1" >&/dev/null bkt -- command -v "$1" >&/dev/null
}
function brew_installed
{
bkt -- brew list
} }
# shorthand for checking if brew package is installed # shorthand for checking if brew package is installed
@@ -210,7 +231,7 @@ function have_brew
{ {
! have brew && return 125 ! have brew && return 125
if brew list "$1" &> /dev/null; then if bkt -- brew list "$1" &> /dev/null; then
return 0 return 0
else else
return 1 return 1

1
tools/dotbot-crontab Submodule

Submodule tools/dotbot-crontab added at ea900a7cf6

1
tools/dotbot-pip Submodule

Submodule tools/dotbot-pip added at 42e6a8f3be

1
tools/dotbot-snap Submodule

Submodule tools/dotbot-snap added at 5722c4e5af

View File

@@ -0,0 +1,2 @@
openapi-python-client
libtmux