Compare commits

...

33 Commits

Author SHA1 Message Date
e3f5bbad00 fix(git): submodule registration script 2023-08-12 16:43:22 +03:00
1185524e97 feat(scripts): python wrapper for python3 2023-08-11 16:59:56 +03:00
ac18c73f53 fix(docs): updated screenshot paths 2023-08-11 11:59:50 +03:00
bf4730a1f3 fix(tmux): added tmux plugins as git submodules 2023-08-11 11:55:14 +03:00
3ea0ba687c chore(tmux): moved plugins to config/tmux/plugins 2023-08-11 11:40:28 +03:00
b5df810075 fix(shell): fix completions 2023-08-11 11:39:33 +03:00
fab40dae96 chore(config): home cleanup, config updates 2023-08-11 11:38:43 +03:00
c6567f4f98 feat(shell): moved p10k from root 2023-08-11 11:32:06 +03:00
2ecbefecf7 feat(config): rust / cargo env settings 2023-08-11 10:20:56 +03:00
90bc744d51 chore(docs): rework readme 2023-08-11 10:20:24 +03:00
ivuorinen
e46dadb128 chore(git): Update submodules (automated)
config/nvim v3.36.0
2023-08-11 03:04:39 +00:00
3368217108 chore(config): taskrc recurrence 2023-08-10 09:33:38 +03:00
85fbc8684b fix(config): fix git-profile configuration 2023-08-10 09:33:07 +03:00
a3acd654f2 fix(shell): updated completions settings 2023-08-10 09:32:25 +03:00
49362fcc9d chore(repo): moved readme under .github 2023-08-10 09:30:31 +03:00
742b4af0e8 feat(brew): update Brewfile path, add brew.env 2023-08-10 09:30:06 +03:00
aebb0dadbd chore(config): update iterm2 configuration 2023-08-10 08:25:04 +03:00
ivuorinen
a7e68f1224 chore(git): Update submodules (automated)
config/nvim v3.35.2
2023-08-09 03:04:24 +00:00
42706adf0b feat(zsh): now using romkatv/powerlevel10k theme 2023-08-08 12:28:21 +03:00
fef9398a86 feat(alias): tmux attach over new sessions 2023-08-07 16:27:54 +03:00
c37df72f12 fix(shell): reverts .zshenv and .config/zsh/.zshrc 2023-08-07 16:27:10 +03:00
ivuorinen
45a2330425 chore(git): Update submodules (automated)
config/nvim v3.35.0
2023-08-04 03:04:28 +00:00
0596c51a0e fix(scripts): fix x-welcome-banner time comparison 2023-08-03 08:36:10 +03:00
8f4ad21ed8 feat(nvim): kazhala/close-buffers.nvim + mappings 2023-08-01 14:26:13 +03:00
491f733221 feat(nvim): ansible document support 2023-08-01 14:21:19 +03:00
6eefbdc965 chore(lint): lualint fixes 2023-08-01 14:20:23 +03:00
558b6500d3 chore(git): ignore config/zsh/.zcompdump 2023-08-01 13:17:29 +03:00
ivuorinen
23a34c1447 chore(git): Update submodules (automated)
config/nvim v3.34.4
2023-08-01 03:04:39 +00:00
816ff7cd17 feat(tools): exiftool 2023-07-31 10:37:18 +03:00
fd3ba99ffc feat(gpg): gpg, gpg-tui, configs, git-crypt 2023-07-31 10:37:18 +03:00
c5454a36f3 feat(shell): added .zshenv 2023-07-31 09:18:49 +03:00
d32b43d7a0 feat(config): tmux plugins and config tweaks 2023-07-31 09:08:12 +03:00
9e3cc80694 fix(nvim): set nvim-notify background color 2023-07-31 09:07:44 +03:00
55 changed files with 6098 additions and 269 deletions

6
.gitattributes vendored
View File

@@ -219,3 +219,9 @@ git/* text
**/git/* text
**/alias text
ssh/* text
# Git Crypt special files
*-secret filter=git-crypt diff=git-crypt
*.key filter=git-crypt diff=git-crypt
secrets/** filter=git-crypt diff=git-crypt

118
.github/README.md vendored Normal file
View File

@@ -0,0 +1,118 @@
# .dotfiles
Welcome to [ivuorinen](https://github.com/ivuorinen)'s .dotfiles repository.
It's a hodgepodge of scripts and configurations, tests and mistakes I'm not
aware of yet. As I find more interesting tools, configs and other stuff,
this repository will live accordingly.
Please for the love of everything good do not use these 1:1 as your own dotfiles,
fork or download the repo as a zip and go from there with your own configs.
## Setup
### First time setup
1. Clone this repository to `$HOME/.dotfiles`
2. `./install`
3. ???
4. Profit
### Updates
`cd $HOME/.dotfiles && git pull && ./install`
## The looks
## tmux with powerlevel10k, the default view
![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 folders
| Path | Description |
|---------------------|----------------------------------------------|
| `.github` | GitHub Repository configuration files. |
| `hosts/{hostname}/` | Configs that should apply to that host only. |
| `local/bin` | Helper scripts that I've collected or wrote. |
| `scripts` | Setup scripts. |
### dotfile folders
| Repo | Destination | Description |
|-----------|-------------|---------------------------------------------|
| `base/` | `.*` | `$HOME` level files. |
| `config/` | `.config/` | Configurations for applications. |
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
| `ssh/` | `.ssh/` | SSH Configurations. |
### dfm - the dotfiles manager
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
## Configuration
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
### XDG Variables
| Env | Default | Short description |
|--------------------|----------------------|------------------------------------------------|
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |
| `$XDG_STATE_HOME` | `$HOME/.local/state` | App state that should persist between restarts |
#### XDG_BIN_HOME (`$HOME/.local/bin`)
`$XDG_BIN_HOME` defines directory that contains local binaries.
User-specific executable files may be stored in `$HOME/.local/bin`.
Distributions should ensure this directory shows up in the UNIX `$PATH`
environment variable, at an appropriate place.
#### XDG_DATA_HOME (`$HOME/.local/share`)
`$XDG_DATA_HOME` defines the base directory relative to which
user-specific *data files* should be stored.
If `$XDG_DATA_HOME` is either not set or empty,
a default equal to `$HOME/.local/share` should be used.
#### XDG_CONFIG_HOME (`$HOME/.config`)
`$XDG_CONFIG_HOME` defines the base directory relative to which
user-specific *configuration files* should be stored.
If `$XDG_CONFIG_HOME` is either not set or empty,
a default equal to `$HOME/.config` should be used.
#### XDG_STATE_HOME (`$HOME/.local/state`)
`$XDG_STATE_HOME` defines the base directory relative to which
user-specific *state files* should be stored.
If `$XDG_STATE_HOME` is either not set or empty,
a default equal to `$HOME/.local/state` should be used.
The `$XDG_STATE_HOME` contains *state data* that should
*persist between (application) restarts*, but that is not important or
portable enough to the user that it should be stored in `$XDG_DATA_HOME`.
- It may contain:
- actions history (logs, history, recently used files, …)
- current state of the application that can be reused
on a restart (view, layout, open files, undo history, …)
#### XDG_DATA_DIRS
`$XDG_DATA_DIRS` defines the preference-ordered set of base directories
to search for data files in addition to the `$XDG_DATA_HOME` base directory.
The directories in `$XDG_DATA_DIRS` should be seperated with a colon ':'.
[xdg]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

1
.gitignore vendored
View File

@@ -8,6 +8,7 @@ config/fzf
config/cheat/cheatsheets/pure-bash-bible/*
config/cheat/cheatsheets/tldr/*
config/git/credentials
config/zsh/.zcompdump
ssh/local.d/*
!ssh/local.d/.gitkeep
!.gitkeep

39
.gitmodules vendored
View File

@@ -29,3 +29,42 @@
path = config/tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm.git
ignore = dirty
[submodule "tmux/catppuccin"]
path = config/tmux/plugins/catppuccin
url = https://github.com/catppuccin/tmux.git
[submodule "tmux/tmux-1password"]
path = config/tmux/plugins/tmux-1password
url = https://github.com/yardnsm/tmux-1password.git
[submodule "tmux/tmux-autoreload"]
path = config/tmux/plugins/tmux-autoreload
url = https://github.com/b0o/tmux-autoreload.git
[submodule "tmux/tmux-continuum"]
path = config/tmux/plugins/tmux-continuum
url = https://github.com/tmux-plugins/tmux-continuum
[submodule "tmux/tmux-fzf"]
path = config/tmux/plugins/tmux-fzf
url = https://github.com/sainnhe/tmux-fzf.git
[submodule "tmux/tmux-menus"]
path = config/tmux/plugins/tmux-menus
url = https://github.com/jaclu/tmux-menus.git
[submodule "tmux/tmux-notify"]
path = config/tmux/plugins/tmux-notify
url = https://github.com/ChanderG/tmux-notify.git
[submodule "tmux/tmux-resurrect"]
path = config/tmux/plugins/tmux-resurrect
url = https://github.com/tmux-plugins/tmux-resurrect
[submodule "tmux/tmux-sensible"]
path = config/tmux/plugins/tmux-sensible
url = https://github.com/tmux-plugins/tmux-sensible.git
[submodule "tmux/tmux-sessionist"]
path = config/tmux/plugins/tmux-sessionist
url = https://github.com/tmux-plugins/tmux-sessionist.git
[submodule "tmux/tmux-suspend"]
path = config/tmux/plugins/tmux-suspend
url = https://github.com/MunifTanjim/tmux-suspend.git
[submodule "tmux/tmux-yank"]
path = config/tmux/plugins/tmux-yank
url = https://github.com/tmux-plugins/tmux-yank.git
[submodule "tmux/vim-tmux-navigator"]
path = config/tmux/plugins/vim-tmux-navigator
url = https://github.com/christoomey/vim-tmux-navigator.git

5
.ignore Normal file
View File

@@ -0,0 +1,5 @@
config/cheat/cheatsheets/community/**
config/tmux/**
config/nvim/**
tools/**

View File

@@ -1,5 +0,0 @@
config/cheat/cheatsheets/community/
config/tmux/
config/nvim/
tools/

View File

@@ -1,95 +0,0 @@
# .dotfiles
Welcome to [ivuorinen](https://github.com/ivuorinen)'s .dotfiles repository.
It's a hodgepodge of scripts and configurations, tests and mistakes I'm not
aware of yet. As I find more interesting tools, configs and other stuff,
this repository will live accordingly.
Please for the love of everything good do not use these 1:1 as your own dotfiles,
fork or download the repo as a zip and go from there with your own configs.
## Setup
### First time setup
1. Clone this repository to `$HOME/.dotfiles`
2. `./install`
3. ???
4. Profit
### Updates
`cd $HOME/.dotfiles && git pull && ./install`
## The looks
## tmux with starship, the default view
![screenshot of tmux with starship](./.github/screenshots/tmux-starship.png)
## tmux + nvim (astronvim) editing this repository
![screenshot of tmux showing nvim](.github/screenshots/tmux-nvim-astronvim.png)
## Interesting files and locations
### Interesting folders
| Path | Description |
|---------------------|----------------------------------------------|
| `.github` | GitHub Repository configuration files. |
| `hosts/{hostname}/` | Configs that should apply to that host only. |
| `local/bin` | Helper scripts that I've collected or wrote. |
| `scripts` | Setup scripts. |
### dotfile folders
| Repo | Destination | Description |
|-----------|-------------|---------------------------------------------|
| `base/` | `.*` | `$HOME` level files. |
| `config/` | `.config/` | Configurations for applications. |
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
| `ssh/` | `.ssh/` | SSH Configurations. |
### dfm - the dotfiles manager
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
## Configuration
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
### XDG Variables
| Env | Default |
|--------------------|----------------------|
| `$XDG_BIN_HOME` | `$HOME/.local/bin` |
| `$XDG_CONFIG_HOME` | `$HOME/.config` |
| `$XDG_DATA_HOME` | `$HOME/.local/share` |
| `$XDG_STATE_HOME` | `$HOME/.local/state` |
- `$XDG_BIN_HOME` defines directory that contains local binaries.
- `$XDG_DATA_HOME` defines the base directory relative to which user-specific data
files should be stored.
- If `$XDG_DATA_HOME` is either not set or empty, a default equal to
`$HOME/.local/share` should be used.
- `$XDG_CONFIG_HOME` defines the base directory relative to which user-specific
configuration files should be stored.
- If `$XDG_CONFIG_HOME` is either not set or empty, a default equal to `$HOME/.config` should be used.
- `$XDG_STATE_HOME` defines the base directory relative
to which user-specific state files should be stored.
- If `$XDG_STATE_HOME` is either not set or empty, a default equal to `$HOME/.local/state` should be used.
- The `$XDG_STATE_HOME` contains state data that should persist between (application) restarts,
but that is not important or portable enough to the user that it should be stored in `$XDG_DATA_HOME`.
- It may contain:
- actions history (logs, history, recently used files, …)
- current state of the application that can be reused
on a restart (view, layout, open files, undo history, …)
- User-specific executable files may be stored in `$HOME/.local/bin`.
Distributions should ensure this directory shows up in the UNIX `$PATH`
environment variable, at an appropriate place.
- `$XDG_DATA_DIRS` defines the preference-ordered set of base directories
to search for data files in addition to the `$XDG_DATA_HOME` base directory.
The directories in `$XDG_DATA_DIRS` should be seperated with a colon ':'.
[xdg]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

View File

@@ -4,4 +4,34 @@ git submodule add --name dotbot -f https://github.com/anishathalye/dotbot.git to
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 cheat-community -f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
git submodule add --name tmux/tpm -f https://github.com/tmux-plugins/tpm.git config/tmux/plugins/tpm
# tmux plugin manager and plugins
git submodule add --name tmux/tpm \
-f https://github.com/tmux-plugins/tpm.git config/tmux/plugins/tpm
git submodule add --name tmux/catppuccin \
-f https://github.com/catppuccin/tmux.git config/tmux/plugins/catppuccin
git submodule add --name tmux/tmux-1password \
-f https://github.com/yardnsm/tmux-1password.git config/tmux/plugins/tmux-1password
git submodule add --name tmux/tmux-autoreload \
-f https://github.com/b0o/tmux-autoreload.git config/tmux/plugins/tmux-autoreload
git submodule add --name tmux/tmux-continuum \
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
git submodule add --name tmux/tmux-fzf \
-f https://github.com/sainnhe/tmux-fzf.git config/tmux/plugins/tmux-fzf
git submodule add --name tmux/tmux-menus \
-f https://github.com/jaclu/tmux-menus.git config/tmux/plugins/tmux-menus
git submodule add --name tmux/tmux-notify \
-f https://github.com/ChanderG/tmux-notify.git config/tmux/plugins/tmux-notify
git submodule add --name tmux/tmux-resurrect \
-f https://github.com/tmux-plugins/tmux-resurrect config/tmux/plugins/tmux-resurrect
git submodule add --name tmux/tmux-sensible \
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
git submodule add --name tmux/tmux-sessionist \
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
git submodule add --name tmux/tmux-suspend \
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend
git submodule add --name tmux/tmux-yank \
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
git submodule add --name tmux/vim-tmux-navigator \
-f https://github.com/christoomey/vim-tmux-navigator.git config/tmux/plugins/vim-tmux-navigator

View File

@@ -1,8 +1,10 @@
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/bashrc.pre.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.pre.bash"
# this is my bashrc config. there are many like it, but this one is mine.
# shellcheck shell=bash
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/bashrc.pre.bash" ]] \
&& builtin source "$HOME/.fig/shell/bashrc.pre.bash"
# Defaults
export DOTFILES="$HOME/.dotfiles"
@@ -11,10 +13,10 @@ function x-load-configs()
{
# Load the shell dotfiles, and then some:
for file in $DOTFILES/config/{exports,alias,functions}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file"
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
[ -r "$file" ] && source "$file"
[ -r "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
[ -r "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
done
}
x-load-configs
@@ -22,7 +24,9 @@ x-load-configs
# Import ssh keys in keychain
ssh-add -A 2>/dev/null;
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] \
&& source "${DOTFILES}/config/fzf/fzf.bash"
# Fig post block. Keep at the bottom of this file.
[[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.post.bash"
[[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] \
&& builtin source "$HOME/.fig/shell/bashrc.post.bash"

View File

@@ -1,12 +0,0 @@
[work]
name = Ismo Vuorinen
email = ismo.vuorinen@vincit.fi
[home]
name = Ismo Vuorinen
email = ismo@ivuorinen.net
[github]
name = ivuorinen
email = ivuorinen@users.noreply.github.com

34
base/gitprofile Normal file
View File

@@ -0,0 +1,34 @@
{
"profiles": {
"github": [
{
"key": "user.name",
"value": "Ismo Vuorinen"
},
{
"key": "user.email",
"value": "ivuorinen@users.noreply.github.com"
}
],
"home": [
{
"key": "user.email",
"value": "ismo@ivuorinen.net"
},
{
"key": "user.name",
"value": "Ismo Vuorinen"
}
],
"work": [
{
"key": "user.email",
"value": "ismo.vuorinen@vincit.fi"
},
{
"key": "user.name",
"value": "Ismo Vuorinen"
}
]
}
}

View File

@@ -1,10 +1,80 @@
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
# this is my zsh config. there are many like it, but this one is mine.
# shellcheck shell=bash
export ZDOTDIR="$HOME/.config/zsh/"
mkdir -p "$ZDOTDIR"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] \
&& builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
# Defaults
export DOTFILES="$HOME/.dotfiles"
# shellcheck source=shared.sh
source "$DOTFILES/scripts/shared.sh"
autoload -U colors zsh/terminfo
colors
setopt correct
export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion"
x-dc "$ZSH_CUSTOM_COMPLETION_PATH"
# Add completion scripts to zsh path
FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH"
autoload -Uz compinit
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
compinit
fi
# Run x-load-configs in your terminal to reload the files.
function x-load-configs()
{
# Load the shell dotfiles, and then some:
for file in $DOTFILES/config/{exports,alias,functions}; do
[ -r "$file" ] && source "$file"
[ -r "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
[ -r "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
done
}
x-load-configs
# Import ssh keys in keychain
ssh-add -A 2>/dev/null;
# Try to load antigen, if present
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
# antigen is present
have antigen && {
antigen use oh-my-zsh
# config/functions
x-default-antigen-bundles
antigen apply
}
[ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \
&& source "${DOTFILES}/config/fzf/fzf.zsh"
export LESSHISTFILE="$XDG_CACHE_HOME"/less_history
# Fig post block. Keep at the bottom of this file.
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] \
&& builtin source "$HOME/.fig/shell/zshrc.post.zsh"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
export P10K_LOCATION="$XDG_CONFIG_HOME/zsh/p10k.zsh"
[[ ! -f $P10K_LOCATION ]] || source $P10K_LOCATION

4
config/act/actrc Normal file
View File

@@ -0,0 +1,4 @@
-P ubuntu-latest=catthehacker/ubuntu:act-latest
-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=catthehacker/ubuntu:act-18.04

View File

@@ -55,6 +55,11 @@ if [[ $(uname) == 'Darwin' ]]; then
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
fi
# tmux: automatically attach or create session with name 'main'
alias tmux='tmux new-session -A -s main'
# tmux: attach or create new session
alias ta='tmux attach || tmux'
# watch with: differences, precise, beep and color
alias watchx='watch -dpbc'
# delete .DS_Store files

View File

@@ -1,3 +1,4 @@
-- luacheck: globals vim
return {
-- Configure AstroNvim updates
updater = {
@@ -78,6 +79,32 @@ return {
-- augroups/autocommands and custom filetypes also this just pure lua so
-- anything that doesn't fit in the normal config locations above can go here
polish = function()
local function yaml_ft(path, bufnr)
-- get content of buffer as string
local content = vim.filetype.getlines(bufnr)
if type(content) == "table" then content = table.concat(content, "\n") end
-- check if file is in roles, tasks, or handlers folder
local path_regex = vim.regex "(tasks\\|roles\\|handlers)/"
if path_regex and path_regex:match_str(path) then return "yaml.ansible" end
-- check for known ansible playbook text and if found, return yaml.ansible
local regex = vim.regex "hosts:\\|tasks:"
if regex and regex:match_str(content) then return "yaml.ansible" end
-- return yaml if nothing else
return "yaml"
end
vim.filetype.add {
extension = {
yml = yaml_ft,
yaml = yaml_ft,
},
}
require("notify").setup({
background_colour = "#000000",
})
-- Set up custom filetypes
-- vim.filetype.add {
-- extension = {

View File

@@ -17,12 +17,33 @@ return {
end,
desc = "Pick to close",
},
-- tables with the `name` key will be registered with which-key if it's installed
-- this is useful for naming menus
-- tables with the `name` key will be registered with which-key
-- if it's installed this is useful for naming menus
["<leader>b"] = { name = "Buffers" },
-- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
["<leader>P"] = { ":Telescope projects<cr>", desc = "Update Projects listing" },
-- quick save (change description)
["<C-s>"] = { ":w!<cr>", desc = "Save File" },
["<leader>P"] = {
":Telescope projects<cr>",
desc = "Update Projects listing"
},
-- close_buffers
['<leader>bch'] = {
"<CMD>lua require('close_buffers').delete({type = 'hidden'})<CR>",
desc = "Delete hidden buffers"
},
-- comment-box
["<leader>bb"] = {
"<cmd>lua require('comment-box').lbox()<cr>",
desc = "Left aligned fixed size box with left aligned text"
},
["<leader>bc"] = {
"<cmd>lua require('comment-box').ccbox()<cr>",
desc = "Centered adapted box with centered text"
},
["<leader>bl"] = {
"<cmd>lua require('comment-box').cline()<cr>",
desc = "Centered line"
},
},
t = {
-- setting a mapping to false will disable it

View File

@@ -34,13 +34,14 @@ return {
position = "bottom"
}
},
{ import = "astrocommunity.debugging.telescope-dap-nvim" },
{ import = "astrocommunity.editing-support.comment-box-nvim" },
{ import = "astrocommunity.editing-support.refactoring-nvim" },
{ import = "astrocommunity.editing-support.neogen" },
{ import = "astrocommunity.editing-support.nvim-regexplainer" },
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
{ import = "astrocommunity.indent.mini-indentscope" },
{ import = "astrocommunity.markdown-and-latex.glow-nvim" },
{ import = "astrocommunity.lsp.lsp-signature-nvim" },
{ import = "astrocommunity.motion.harpoon" },
{ import = "astrocommunity.pack.ansible" },
{ import = "astrocommunity.pack.bash" },

View File

@@ -1,3 +1,4 @@
-- luacheck: globals vim
return {
-- You can also add new plugins here as well:
-- Add plugins, the lazy syntax
@@ -21,21 +22,41 @@ return {
mode = "cursor", -- cursor, or topline
},
},
{ "kazhala/close-buffers.nvim" },
{
"folke/edgy.nvim",
event = "VeryLazy",
dependencies = {
{
'nvim-neo-tree/neo-tree.nvim',
config = function()
require('neo-tree').setup({
open_files_do_not_replace_types = {
'terminal', 'Trouble', 'qf', 'edgy'
},
})
end,
},
{
'simrat39/symbols-outline.nvim',
config = function()
require('symbols-outline').setup()
end,
},
},
init = function()
vim.opt.laststatus = 3
vim.opt.splitkeep = "screen"
end,
opts = {
bottom = {
-- toggleterm / lazyterm at the bottom with a height of 40% of the screen
-- toggleterm / lazyterm at the bottom with
-- a height of 40% of the screen
{
ft = "toggleterm",
size = { height = 0.4 },
-- exclude floating windows
filter = function(buf, win)
filter = function(_, win)
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
@@ -69,15 +90,6 @@ return {
end,
size = { height = 0.5 },
},
{
title = "Neo-Tree Git",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "git_status"
end,
pinned = true,
open = "Neotree position=right git_status",
},
{
title = "Neo-Tree Buffers",
ft = "neo-tree",
@@ -87,11 +99,6 @@ return {
pinned = true,
open = "Neotree position=top buffers",
},
-- {
-- ft = "Outline",
-- pinned = true,
-- open = "SymbolsOutlineOpen",
-- },
-- any other neo-tree windows
"neo-tree",
},

View File

@@ -17,16 +17,15 @@ export XDG_BIN_HOME="$HOME/.local/bin"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_RUNTIME_DIR="$HOME/.local/run"
# Homebrew configuration
export HOMEBREW="/opt/homebrew"
export HOMEBREW_BIN="$HOMEBREW/bin"
export HOMEBREW_SBIN="$HOMEBREW/sbin"
export HOMEBREW_PKG="$HOMEBREW/opt"
export HOMEBREW_NO_ENV_HINTS=1
eval "$(brew shellenv)"
export HOMEBREW_PREFIX="$XDG_STATE_HOME/homebrew"
export HOMEBREW_BIN="$HOMEBREW_PREFIX/bin"
export HOMEBREW_PKG="$HOMEBREW_PREFIX/opt"
export HOMEBREW_SBIN="$HOMEBREW_PREFIX/sbin"
path_append "/usr/local/bin"
path_prepend "$HOMEBREW_SBIN"
path_prepend "$HOMEBREW_BIN"
path_prepend "$XDG_BIN_HOME"
# brew, https://brew.sh

View File

@@ -95,6 +95,7 @@ have op && {
export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
have pyenv && {
path_append "$(pyenv root)/shims"
path_append "$PYENV_ROOT/bin"
eval "$(pyenv init -)"
}
@@ -112,9 +113,16 @@ x-dc "$RBENV_ROOT"
have gem && path_append "$(gem environment gemdir)/bin"
have rbenv && eval "$(rbenv init - zsh)"
# Rust / cargo
export CARGO_HOME="$XDG_STATE_HOME/cargo"
path_append "$CARGO_HOME/bin"
# screen
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
# sonarlint
export SONARLINT_USER_HOME="$XDG_DATA_HOME/sonarlint"
# tmux
export TMUX_CONF="$XDG_CONFIG_HOME/tmux/tmux.conf"

View File

@@ -84,6 +84,9 @@ ask()
# Defines default antigen bundles
x-default-antigen-bundles()
{
# the theme to use
antigen theme romkatv/powerlevel10k
# these should be always available
antigen bundle colored-man-pages
antigen bundle command-not-found

View File

@@ -0,0 +1,32 @@
[general]
splash = false
tick_rate = 250
color = "gray"
style = "plain"
file_explorer = "xplr"
detail_level = "minimum"
# key_bindings = [
# { keys = [ "?" ], command = ":help" },
# { keys = [ "o" ], command = ":options" },
# { keys = [ "n" ], command = ":normal" },
# { keys = [ "v" ], command = ":visual" },
# { keys = [ "c" ], command = ":copy" },
# { keys = [ "p", "C-v" ], command = ":paste" },
# { keys = [ "x" ], command = ":export" },
# { keys = [ "s" ], command = ":set prompt :sign" },
# { keys = [ "e" ], command = ":set prompt :edit" },
# { keys = [ "i" ], command = ":set prompt :import"},
# { keys = [ "f" ], command = ":set prompt :receive" },
# { keys = [ "u" ], command = ":set prompt :send" },
# { keys = [ "g" ], command = ":generate" },
# { keys = [ "d", "backspace" ], command = ":delete" },
# { keys = [ "C-r" ], command = ":refresh" },
# ]
[gpg]
armor = false
# homedir = "~/.gnupg"
# outdir = "~/.gnupg/out"
# outfile = "{type}_{query}.{ext}"
# default_key = "0xA1B2C3XY"

View File

@@ -102,8 +102,16 @@ brew "dotenv-linter"
brew "editorconfig-checker"
# Useful examples at the command-line
brew "eg-examples"
# C/C++ and Java libraries for Unicode and globalization
brew "icu4c"
# OpenType text shaping engine
brew "harfbuzz"
# Development kit for the Java programming language
brew "openjdk"
# Run arbitrary commands when files change
brew "entr"
# Perl lib for reading and writing EXIF metadata
brew "exiftool"
# Simple, fast and user-friendly alternative to find
brew "fd"
# Banner-like program prints strings as ASCII art
@@ -122,6 +130,8 @@ brew "gdu"
brew "gh"
# Distributed revision control system
brew "git"
# Enable transparent encryption/decryption of files in a git repo
brew "git-crypt"
# Small git utilities
brew "git-extras"
# See your latest local git branches, formatted real fancy
@@ -142,12 +152,10 @@ brew "gnupg"
brew "go"
# Library access to GnuPG
brew "gpgme"
# Manage your GnuPG keys with ease!
brew "gpg-tui"
# Image manipulation
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
brew "pango"
# Library to render SVG files using Cairo
@@ -190,8 +198,6 @@ brew "mas"
brew "ncdu"
# Ambitious Vim-fork focused on extensibility and agility
brew "neovim"
# No Nonsense Neovim Client in Rust
brew "neovide"
# HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
brew "nginx"
# Port scanning utility for large networks
@@ -202,8 +208,6 @@ brew "nvm"
brew "openjdk@11"
# Generate clients, server & docs from an OpenAPI spec (v2, v3)
brew "openapi-generator"
# Development kit for the Java programming language
brew "openjdk"
# Swiss-army knife of markup format conversion
brew "pandoc"
# Highly capable, feature-rich programming language
@@ -234,8 +238,8 @@ brew "rust"
brew "shellcheck"
# Autoformat shell script source code
brew "shfmt"
# Cross-shell prompt for astronauts
brew "starship"
# Support CI generation of SBOMs via golang tooling
brew "spdx-sbom-generator"
# Version control system designed to be a better CVS
brew "subversion"
# Feature-rich console based todo list manager
@@ -276,6 +280,8 @@ brew "wget"
brew "wtfutil"
# Check your $HOME for unwanted files and directories
brew "xdg-ninja"
# Hackable, minimal, fast TUI file explorer
brew "xplr"
# JavaScript package manager
brew "yarn"
# A vulnerability scanner for container images and filesystems
@@ -348,10 +354,10 @@ cask "jetbrains-toolbox"
cask "lens"
# Keep all tasks from your todo apps on your menu bar
cask "monofocus"
# Neovim Client
cask "neovide"
# Reverse proxy, secure introspectable tunnels to localhost
cask "ngrok"
# Simple application that will prevent iTunes or Apple Music from launching
cask "notunes"
# Knowledge base that works on top of a local folder of plain text Markdown files
cask "obsidian"
# Scheduling application focusing on organization
@@ -416,6 +422,7 @@ vscode "bmewburn.vscode-intelephense-client"
vscode "Box-Of-Hats.bemhelper"
vscode "bradlc.vscode-tailwindcss"
vscode "christian-kohler.npm-intellisense"
vscode "christian-kohler.path-intellisense"
vscode "DavidAnson.vscode-markdownlint"
vscode "dbaeumer.vscode-eslint"
vscode "DotJoshJohnson.xml"
@@ -423,6 +430,7 @@ vscode "eamodio.gitlens"
vscode "EditorConfig.EditorConfig"
vscode "esbenp.prettier-vscode"
vscode "formulahendry.auto-close-tag"
vscode "formulahendry.auto-rename-tag"
vscode "formulahendry.code-runner"
vscode "gencer.html-slim-scss-css-class-completion"
vscode "github.vscode-github-actions"
@@ -438,6 +446,7 @@ vscode "liamhammett.inline-parameters"
vscode "macieklad.tailwind-sass-syntax"
vscode "MehediDracula.php-namespace-resolver"
vscode "mikestead.dotenv"
vscode "MisterJ.vue-volar-extention-pack"
vscode "MrChetan.phpstorm-parameter-hints-in-vscode"
vscode "mrorz.language-gettext"
vscode "ms-azuretools.vscode-docker"
@@ -454,10 +463,10 @@ vscode "msjsdiag.vscode-react-native"
vscode "mtxr.sqltools"
vscode "neilbrayfield.php-docblocker"
vscode "nhoizey.gremlins"
vscode "octref.vetur"
vscode "oderwat.indent-rainbow"
vscode "pflannery.vscode-versionlens"
vscode "phiter.phpstorm-snippets"
vscode "sibiraj-s.vscode-scss-formatter"
vscode "SonarSource.sonarlint-vscode"
vscode "stylelint.vscode-stylelint"
vscode "syler.sass-indented"
@@ -465,6 +474,7 @@ vscode "timonwong.shellcheck"
vscode "tootone.org-mode"
vscode "valeryanm.vscode-phpsab"
vscode "Vue.volar"
vscode "Vue.vscode-typescript-vue-plugin"
vscode "WakaTime.vscode-wakatime"
vscode "withfig.fig"
vscode "wix.vscode-import-cost"

11
config/homebrew/brew.env Normal file
View File

@@ -0,0 +1,11 @@
# shellcheck shell=bash
# vim: filetype=zsh
# dotenv-linter:off LowercaseKey, KeyWithoutValue, ExtraBlankLine, EndingBlankLine
#
# Homebrew configuration
export HOMEBREW_AUTOREMOVE=true
export HOMEBREW_AUTO_UPDATE_SECS=86400
export HOMEBREW_CLEANUP_MAX_AGE_DAYS=30
export HOMEBREW_NO_ENV_HINTS=1

View File

@@ -345,10 +345,16 @@
<true/>
<key>DisableFullscreenTransparency</key>
<true/>
<key>EnableDivisionView</key>
<true/>
<key>HapticFeedbackForEsc</key>
<false/>
<key>HideActivityIndicator</key>
<false/>
<key>HideScrollbar</key>
<true/>
<key>HideTabNumber</key>
<false/>
<key>HotkeyMigratedFromSingleToMulti</key>
<true/>
<key>IRMemory</key>
@@ -609,7 +615,7 @@
<key>Blur</key>
<true/>
<key>Blur Radius</key>
<real>10</real>
<real>20</real>
<key>Bold Color</key>
<dict>
<key>Alpha Component</key>
@@ -1062,10 +1068,14 @@
</dict>
<key>Send Code When Idle</key>
<false/>
<key>Set Local Environment Vars</key>
<false/>
<key>Shortcut</key>
<string></string>
<key>Show Mark Indicators</key>
<false/>
<key>Show Status Bar</key>
<true/>
<false/>
<key>Show Timestamps</key>
<integer>2</integer>
<key>Silence Bell</key>
@@ -1225,7 +1235,7 @@
<key>Terminal Type</key>
<string>xterm-256color</string>
<key>Transparency</key>
<real>0.20000000000000004</real>
<real>0.14999999999999997</real>
<key>Unlimited Scrollback</key>
<true/>
<key>Use Bold Font</key>
@@ -1291,16 +1301,22 @@
<true/>
<key>SoundForEsc</key>
<false/>
<key>SplitPaneDimmingAmount</key>
<real>0.29999999999999993</real>
<key>StatusBarPosition</key>
<integer>0</integer>
<key>TabStyleWithAutomaticOption</key>
<integer>5</integer>
<key>TabsHaveCloseButton</key>
<false/>
<key>ThreeFingerEmulates</key>
<true/>
<key>TmuxUnpauseAutomatically</key>
<true/>
<key>VisualIndicatorForEsc</key>
<false/>
<key>WindowNumber</key>
<true/>
<key>kCPKSelectionViewPreferredModeKey</key>
<integer>0</integer>
<key>kCPKSelectionViewShowHSBTextFieldsKey</key>

View File

@@ -1,37 +0,0 @@
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
add_newline = true
# Timeout for commands executed by starship (in milliseconds).
command_timeout = 1000
# Replace the '' symbol in the prompt with '➜'
[character] # The name of the module we are configuring is 'character'
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
[cmd_duration]
disabled = true
[git_branch]
symbol = '🌱 '
truncation_length = 20
truncation_symbol = '…'
ignore_branches = ['master', 'main']
[git_status]
up_to_date = '✓'
staged = '[++\($count\)](green)'
[package]
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'
[php]
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'
[nodejs]
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'

View File

@@ -46,6 +46,7 @@ news.version=2.6.0
default.project=Inbox
calendar.details=full
calendar.holidays=sparse
recurrence=on
uda.taskwarrior-tui.keyconfig.quit=q
uda.taskwarrior-tui.keyconfig.refresh=r

View File

@@ -14,7 +14,6 @@ set -g @tpm_plugins ' \
yardnsm/tmux-1password \
jaclu/tmux-menus \
sainnhe/tmux-fzf \
MunifTanjim/tmux-mode-indicator \
MunifTanjim/tmux-suspend \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-resurrect \
@@ -24,7 +23,7 @@ set -g @tpm_plugins ' \
'
# Set plugins install dir
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins/'
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.dotfiles/config/tmux/plugins/'
set-option -sa terminal-overrides ",xterm*:Tc"
@@ -145,4 +144,4 @@ unbind p
bind p paste-buffer
# Finally run the tmux plugin manager
run '~/.config/tmux/plugins/tpm/tpm'
run '~/.dotfiles/config/tmux/plugins/tpm/tpm'

View File

@@ -1,52 +0,0 @@
autoload -U colors zsh/terminfo
colors
setopt correct
# Add completion scripts to zsh path
FPATH="~/.config/zsh/completion:$FPATH"
autoload -Uz compinit && compinit -i
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
# Defaults
export DOTFILES="$HOME/.dotfiles"
# shellcheck source=shared.sh
source "$DOTFILES/scripts/shared.sh"
# Run x-load-configs in your terminal to reload the files.
function x-load-configs()
{
# Load the shell dotfiles, and then some:
for file in $DOTFILES/config/{exports,alias,functions}; do
[ -f "$file" ] && source "$file"
[ -f "$file-secret" ] && source "$file-secret"
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
[ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
done
}
x-load-configs
# Import ssh keys in keychain
ssh-add -A 2>/dev/null;
# Try to load antigen, if present
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
# antigen is present
have antigen && {
antigen use oh-my-zsh
# config/functions
x-default-antigen-bundles
antigen apply
}
# starship is present
have starship && eval "$(starship init zsh)"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
export LESSHISTFILE="$XDG_CACHE_HOME"/less_history

View File

@@ -0,0 +1,66 @@
#compdef cheat
# vim: ft=zsh
local cheats taglist pathlist
_cheat_complete_personal_cheatsheets()
{
cheats=("${(f)$(cheat -l -t personal | tail -n +2 | cut -d' ' -f1)}")
_describe -t cheats 'cheats' cheats
}
_cheat_complete_full_cheatsheets()
{
cheats=("${(f)$(cheat -l | tail -n +2 | cut -d' ' -f1)}")
_describe -t cheats 'cheats' cheats
}
_cheat_complete_tags()
{
taglist=("${(f)$(cheat -T)}")
_describe -t taglist 'taglist' taglist
}
_cheat_complete_paths()
{
pathlist=("${(f)$(cheat -d | cut -d':' -f1)}")
_describe -t pathlist 'pathlist' pathlist
}
_cheat() {
_arguments -C \
'(--init)--init[Write a default config file to stdout]: :->none' \
'(-c --colorize)'{-c,--colorize}'[Colorize output]: :->none' \
'(-d --directories)'{-d,--directories}'[List cheatsheet directories]: :->none' \
'(-e --edit)'{-e,--edit}'[Edit <sheet>]: :->personal' \
'(-l --list)'{-l,--list}'[List cheatsheets]: :->full' \
'(-p --path)'{-p,--path}'[Return only sheets found on path <name>]: :->pathlist' \
'(-r --regex)'{-r,--regex}'[Treat search <phrase> as a regex]: :->none' \
'(-s --search)'{-s,--search}'[Search cheatsheets for <phrase>]: :->none' \
'(-t --tag)'{-t,--tag}'[Return only sheets matching <tag>]: :->taglist' \
'(-T --tags)'{-T,--tags}'[List all tags in use]: :->none' \
'(-v --version)'{-v,--version}'[Print the version number]: :->none' \
'(--rm)--rm[Remove (delete) <sheet>]: :->personal'
case $state in
(none)
;;
(full)
_cheat_complete_full_cheatsheets
;;
(personal)
_cheat_complete_personal_cheatsheets
;;
(taglist)
_cheat_complete_tags
;;
(pathlist)
_cheat_complete_paths
;;
(*)
;;
esac
}
compdef _cheat cheat

View File

@@ -0,0 +1,177 @@
#compdef _git-profile git-profile
# zsh completion for git-profile -*- shell-script -*-
__git-profile_debug()
{
local file="$BASH_COMP_DEBUG_FILE"
if [[ -n ${file} ]]; then
echo "$*" >> "${file}"
fi
}
_git-profile()
{
local shellCompDirectiveError=1
local shellCompDirectiveNoSpace=2
local shellCompDirectiveNoFileComp=4
local shellCompDirectiveFilterFileExt=8
local shellCompDirectiveFilterDirs=16
local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace
local -a completions
__git-profile_debug "\n========= starting completion logic =========="
__git-profile_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}"
# The user could have moved the cursor backwards on the command-line.
# We need to trigger completion from the $CURRENT location, so we need
# to truncate the command-line ($words) up to the $CURRENT location.
# (We cannot use $CURSOR as its value does not work when a command is an alias.)
words=("${=words[1,CURRENT]}")
__git-profile_debug "Truncated words[*]: ${words[*]},"
lastParam=${words[-1]}
lastChar=${lastParam[-1]}
__git-profile_debug "lastParam: ${lastParam}, lastChar: ${lastChar}"
# For zsh, when completing a flag with an = (e.g., git-profile -n=<TAB>)
# completions must be prefixed with the flag
setopt local_options BASH_REMATCH
if [[ "${lastParam}" =~ '-.*=' ]]; then
# We are dealing with a flag with an =
flagPrefix="-P ${BASH_REMATCH}"
fi
# Prepare the command to obtain completions
requestComp="${words[1]} __complete ${words[2,-1]}"
if [ "${lastChar}" = "" ]; then
# If the last parameter is complete (there is a space following it)
# We add an extra empty parameter so we can indicate this to the go completion code.
__git-profile_debug "Adding extra empty parameter"
requestComp="${requestComp} \"\""
fi
__git-profile_debug "About to call: eval ${requestComp}"
# Use eval to handle any environment variables and such
out=$(eval ${requestComp} 2>/dev/null)
__git-profile_debug "completion output: ${out}"
# Extract the directive integer following a : from the last line
local lastLine
while IFS='\n' read -r line; do
lastLine=${line}
done < <(printf "%s\n" "${out[@]}")
__git-profile_debug "last line: ${lastLine}"
if [ "${lastLine[1]}" = : ]; then
directive=${lastLine[2,-1]}
# Remove the directive including the : and the newline
local suffix
(( suffix=${#lastLine}+2))
out=${out[1,-$suffix]}
else
# There is no directive specified. Leave $out as is.
__git-profile_debug "No directive found. Setting do default"
directive=0
fi
__git-profile_debug "directive: ${directive}"
__git-profile_debug "completions: ${out}"
__git-profile_debug "flagPrefix: ${flagPrefix}"
if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
__git-profile_debug "Completion received error. Ignoring completions."
return
fi
while IFS='\n' read -r comp; do
if [ -n "$comp" ]; then
# If requested, completions are returned with a description.
# The description is preceded by a TAB character.
# For zsh's _describe, we need to use a : instead of a TAB.
# We first need to escape any : as part of the completion itself.
comp=${comp//:/\\:}
local tab=$(printf '\t')
comp=${comp//$tab/:}
__git-profile_debug "Adding completion: ${comp}"
completions+=${comp}
lastComp=$comp
fi
done < <(printf "%s\n" "${out[@]}")
if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
__git-profile_debug "Activating nospace."
noSpace="-S ''"
fi
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
# File extension filtering
local filteringCmd
filteringCmd='_files'
for filter in ${completions[@]}; do
if [ ${filter[1]} != '*' ]; then
# zsh requires a glob pattern to do file filtering
filter="\*.$filter"
fi
filteringCmd+=" -g $filter"
done
filteringCmd+=" ${flagPrefix}"
__git-profile_debug "File filtering command: $filteringCmd"
_arguments '*:filename:'"$filteringCmd"
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
# File completion for directories only
local subdir
subdir="${completions[1]}"
if [ -n "$subdir" ]; then
__git-profile_debug "Listing directories in $subdir"
pushd "${subdir}" >/dev/null 2>&1
else
__git-profile_debug "Listing directories in ."
fi
local result
_arguments '*:dirname:_files -/'" ${flagPrefix}"
result=$?
if [ -n "$subdir" ]; then
popd >/dev/null 2>&1
fi
return $result
else
__git-profile_debug "Calling _describe"
if eval _describe "completions" completions $flagPrefix $noSpace; then
__git-profile_debug "_describe found some completions"
# Return the success of having called _describe
return 0
else
__git-profile_debug "_describe did not find completions."
__git-profile_debug "Checking if we should do file completion."
if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
__git-profile_debug "deactivating file completion"
# We must return an error code here to let zsh know that there were no
# completions found by _describe; this is what will trigger other
# matching algorithms to attempt to find completions.
# For example zsh can match letters in the middle of words.
return 1
else
# Perform file completion
__git-profile_debug "Activating file completion"
# We must return the result of this command, so it must be the
# last command, or else we must store its result to return it.
_arguments '*:filename:_files'" ${flagPrefix}"
fi
fi
fi
}
# don't run the completion function when being source-ed or eval-ed
if [ "$funcstack[1]" = "_git-profile" ]; then
_git-profile
fi

3420
config/zsh/completion/_solo2 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,177 @@
#compdef _git-profile git-profile
# zsh completion for git-profile -*- shell-script -*-
__git-profile_debug()
{
local file="$BASH_COMP_DEBUG_FILE"
if [[ -n ${file} ]]; then
echo "$*" >> "${file}"
fi
}
_git-profile()
{
local shellCompDirectiveError=1
local shellCompDirectiveNoSpace=2
local shellCompDirectiveNoFileComp=4
local shellCompDirectiveFilterFileExt=8
local shellCompDirectiveFilterDirs=16
local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace
local -a completions
__git-profile_debug "\n========= starting completion logic =========="
__git-profile_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}"
# The user could have moved the cursor backwards on the command-line.
# We need to trigger completion from the $CURRENT location, so we need
# to truncate the command-line ($words) up to the $CURRENT location.
# (We cannot use $CURSOR as its value does not work when a command is an alias.)
words=("${=words[1,CURRENT]}")
__git-profile_debug "Truncated words[*]: ${words[*]},"
lastParam=${words[-1]}
lastChar=${lastParam[-1]}
__git-profile_debug "lastParam: ${lastParam}, lastChar: ${lastChar}"
# For zsh, when completing a flag with an = (e.g., git-profile -n=<TAB>)
# completions must be prefixed with the flag
setopt local_options BASH_REMATCH
if [[ "${lastParam}" =~ '-.*=' ]]; then
# We are dealing with a flag with an =
flagPrefix="-P ${BASH_REMATCH}"
fi
# Prepare the command to obtain completions
requestComp="${words[1]} __complete ${words[2,-1]}"
if [ "${lastChar}" = "" ]; then
# If the last parameter is complete (there is a space following it)
# We add an extra empty parameter so we can indicate this to the go completion code.
__git-profile_debug "Adding extra empty parameter"
requestComp="${requestComp} \"\""
fi
__git-profile_debug "About to call: eval ${requestComp}"
# Use eval to handle any environment variables and such
out=$(eval ${requestComp} 2>/dev/null)
__git-profile_debug "completion output: ${out}"
# Extract the directive integer following a : from the last line
local lastLine
while IFS='\n' read -r line; do
lastLine=${line}
done < <(printf "%s\n" "${out[@]}")
__git-profile_debug "last line: ${lastLine}"
if [ "${lastLine[1]}" = : ]; then
directive=${lastLine[2,-1]}
# Remove the directive including the : and the newline
local suffix
(( suffix=${#lastLine}+2))
out=${out[1,-$suffix]}
else
# There is no directive specified. Leave $out as is.
__git-profile_debug "No directive found. Setting do default"
directive=0
fi
__git-profile_debug "directive: ${directive}"
__git-profile_debug "completions: ${out}"
__git-profile_debug "flagPrefix: ${flagPrefix}"
if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
__git-profile_debug "Completion received error. Ignoring completions."
return
fi
while IFS='\n' read -r comp; do
if [ -n "$comp" ]; then
# If requested, completions are returned with a description.
# The description is preceded by a TAB character.
# For zsh's _describe, we need to use a : instead of a TAB.
# We first need to escape any : as part of the completion itself.
comp=${comp//:/\\:}
local tab=$(printf '\t')
comp=${comp//$tab/:}
__git-profile_debug "Adding completion: ${comp}"
completions+=${comp}
lastComp=$comp
fi
done < <(printf "%s\n" "${out[@]}")
if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
__git-profile_debug "Activating nospace."
noSpace="-S ''"
fi
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
# File extension filtering
local filteringCmd
filteringCmd='_files'
for filter in ${completions[@]}; do
if [ ${filter[1]} != '*' ]; then
# zsh requires a glob pattern to do file filtering
filter="\*.$filter"
fi
filteringCmd+=" -g $filter"
done
filteringCmd+=" ${flagPrefix}"
__git-profile_debug "File filtering command: $filteringCmd"
_arguments '*:filename:'"$filteringCmd"
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
# File completion for directories only
local subdir
subdir="${completions[1]}"
if [ -n "$subdir" ]; then
__git-profile_debug "Listing directories in $subdir"
pushd "${subdir}" >/dev/null 2>&1
else
__git-profile_debug "Listing directories in ."
fi
local result
_arguments '*:dirname:_files -/'" ${flagPrefix}"
result=$?
if [ -n "$subdir" ]; then
popd >/dev/null 2>&1
fi
return $result
else
__git-profile_debug "Calling _describe"
if eval _describe "completions" completions $flagPrefix $noSpace; then
__git-profile_debug "_describe found some completions"
# Return the success of having called _describe
return 0
else
__git-profile_debug "_describe did not find completions."
__git-profile_debug "Checking if we should do file completion."
if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
__git-profile_debug "deactivating file completion"
# We must return an error code here to let zsh know that there were no
# completions found by _describe; this is what will trigger other
# matching algorithms to attempt to find completions.
# For example zsh can match letters in the middle of words.
return 1
else
# Perform file completion
__git-profile_debug "Activating file completion"
# We must return the result of this command, so it must be the
# last command, or else we must store its result to return it.
_arguments '*:filename:_files'" ${flagPrefix}"
fi
fi
fi
}
# don't run the completion function when being source-ed or eval-ed
if [ "$funcstack[1]" = "_git-profile" ]; then
_git-profile
fi

1713
config/zsh/p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@
: "${DOTFILES:=$HOME/.dotfiles}"
: "${SHARED_SCRIPT:=$DOTFILES/scripts/shared.sh}"
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install-dotfiles.sh}"
: "${BREWFILE:=$DOTFILES/Brewfile}"
: "${BREWFILE:=$DOTFILES/config/homebrew/Brewfile}"
: "${HOSTFILES:=$DOTFILES/hosts}"
SCRIPT=$(basename "$0")
@@ -47,7 +47,6 @@ function section_install
all)
$0 install macos
$0 install antigen
$0 install starship
$0 brew install
$0 install composer
$0 install dotenv

7
local/bin/python Executable file
View File

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

View File

@@ -18,7 +18,7 @@ RESET='\033[0m'
# Print time-based personalized message, using figlet & lolcat if availible
function welcome_greeting () {
h=$(date +%H)
if [ "$h" -lt 04 ] || [[ $h -gt 22 ]];
if [ "$h" -lt 04 ] || [ "$h" -gt 22 ];
then greeting="Good Night"
elif [ "$h" -lt 12 ];
then greeting="Good morning"
@@ -41,7 +41,7 @@ function welcome_greeting () {
function welcome_sysinfo () {
if hash neofetch 2>/dev/null; then
neofetch --shell_version off \
--disable kernel distro shell resolution de wm wm_theme theme icons terminal \
--disable kernel distro shell resolution cpu gpu de wm wm_theme theme icons terminal \
--backend off \
--colors 4 8 4 4 8 6 \
--color_blocks off \

View File

@@ -36,4 +36,11 @@ for pkg in "${packages[@]}"; do
echo ""
done
msg "Installing completions for selected packages"
have git-profile && {
git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/git-profile" \
&& msg_yay "Installed completions for git-profile"
}
msg_ok "Done"

BIN
secrets/.gitkeep Normal file

Binary file not shown.