mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-27 22:45:27 +00:00
Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e3f5bbad00 | |||
| 1185524e97 | |||
| ac18c73f53 | |||
| bf4730a1f3 | |||
| 3ea0ba687c | |||
| b5df810075 | |||
| fab40dae96 | |||
| c6567f4f98 | |||
| 2ecbefecf7 | |||
| 90bc744d51 | |||
|
|
e46dadb128 | ||
| 3368217108 | |||
| 85fbc8684b | |||
| a3acd654f2 | |||
| 49362fcc9d | |||
| 742b4af0e8 | |||
| aebb0dadbd | |||
|
|
a7e68f1224 | ||
| 42706adf0b | |||
| fef9398a86 | |||
| c37df72f12 | |||
|
|
45a2330425 | ||
| 0596c51a0e | |||
| 8f4ad21ed8 | |||
| 491f733221 | |||
| 6eefbdc965 | |||
| 558b6500d3 | |||
|
|
23a34c1447 | ||
| 816ff7cd17 | |||
| fd3ba99ffc | |||
| c5454a36f3 | |||
| d32b43d7a0 | |||
| 9e3cc80694 | |||
| cd0fff756e | |||
| f8bde72337 | |||
|
|
afd28f8469 | ||
| 26ba1ac2a7 | |||
| 5d520d3f3f | |||
| 1d3ed5bfd0 | |||
| c80b577a5a | |||
| 4e2ee377f2 | |||
| d7106ae28f | |||
| a864d31e84 | |||
| b462ae20bf | |||
| 2cd1e7e0dd | |||
| c951dde930 | |||
|
|
a570cef49b | ||
| 441ba01455 | |||
| 73a00fcdf0 | |||
| 205ea28e16 | |||
| ade8162660 | |||
| 1745a15acf | |||
| ad08a2956e | |||
| 8d2083be4c | |||
| 87281a436f | |||
| 4ec9444e29 | |||
|
|
95d358ae3d | ||
|
|
cea61a5719 | ||
|
|
28c29d94f2 | ||
|
|
1028d3847c | ||
| 3498c6b739 | |||
| 83eb7d861e | |||
| 22090129ec | |||
|
|
5b0ca2a63b | ||
|
|
c5fa136a1f | ||
|
|
9a63aaff74 | ||
| 5e68077ac2 | |||
| 72b9acd710 |
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -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
118
.github/README.md
vendored
Normal 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
|
||||
|
||||

|
||||
|
||||
## tmux + nvim (astronvim) editing this repository
|
||||
|
||||

|
||||
|
||||
## 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
|
||||
1
.github/dependabot.yml
vendored
1
.github/dependabot.yml
vendored
@@ -1,6 +1,5 @@
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
|
||||
BIN
.github/screenshots/tmux-astronvim-130x40.png
vendored
Normal file
BIN
.github/screenshots/tmux-astronvim-130x40.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
BIN
.github/screenshots/tmux-powerlevel10k-130x20.png
vendored
Normal file
BIN
.github/screenshots/tmux-powerlevel10k-130x20.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
5
.github/workflows/changelog.yml
vendored
5
.github/workflows/changelog.yml
vendored
@@ -1,22 +1,17 @@
|
||||
---
|
||||
name: Debug Changelog # Workflow name displayed on GitHub
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Trigger manually
|
||||
|
||||
jobs:
|
||||
debug-changelog:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Create changelog text
|
||||
id: changelog
|
||||
uses: loopwerk/tag-changelog@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
config_file: .github/tag-changelog-config.js
|
||||
|
||||
- name: "Echo results"
|
||||
id: output-changelog
|
||||
run: |
|
||||
|
||||
7
.github/workflows/new-release.yml
vendored
7
.github/workflows/new-release.yml
vendored
@@ -1,14 +1,10 @@
|
||||
---
|
||||
name: Release Daily State # Workflow name displayed on GitHub
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Trigger manually
|
||||
schedule:
|
||||
- cron: "30 20 * * *" # UTC is 2-3 hours behind Europe/Helsinki, my timezone
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
new-daily-release:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -17,11 +13,9 @@ jobs:
|
||||
version: ${{ steps.daily-version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3 # Checkout our working repository
|
||||
|
||||
- name: Create tag if necessary
|
||||
uses: fregante/daily-version-action@v2
|
||||
id: daily-version
|
||||
|
||||
- name: Create changelog text
|
||||
if: steps.daily-version.outputs.created
|
||||
id: changelog
|
||||
@@ -29,7 +23,6 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
config_file: .github/tag-changelog-config.js
|
||||
|
||||
- name: Create release
|
||||
if: steps.daily-version.outputs.created
|
||||
uses: actions/create-release@latest
|
||||
|
||||
6
.github/workflows/update-submodules.yml
vendored
6
.github/workflows/update-submodules.yml
vendored
@@ -1,13 +1,11 @@
|
||||
name: Update submodules
|
||||
on:
|
||||
schedule: [cron: 0 3 * * *]
|
||||
schedule: [{cron: 0 3 * * *}]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
update-submodules:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -18,12 +16,10 @@ jobs:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
token: ${{secrets.GITHUB_TOKEN}}
|
||||
|
||||
- name: Config Git User
|
||||
run: |
|
||||
git config --global user.name "${{ github.actor }}"
|
||||
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
|
||||
- name: Update submodules
|
||||
run: |
|
||||
if git commit -am"chore(git): Update submodules (automated)
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -7,6 +7,10 @@ Brewfile.lock.json
|
||||
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
|
||||
.env
|
||||
|
||||
|
||||
39
.gitmodules
vendored
39
.gitmodules
vendored
@@ -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
5
.ignore
Normal file
@@ -0,0 +1,5 @@
|
||||
config/cheat/cheatsheets/community/**
|
||||
config/tmux/**
|
||||
config/nvim/**
|
||||
tools/**
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
config/cheat/cheatsheets/community/
|
||||
config/tmux/
|
||||
config/nvim/
|
||||
tools/
|
||||
|
||||
4
.yamlfmt
4
.yamlfmt
@@ -18,7 +18,7 @@ include:
|
||||
- ./**/*.{yml,yaml}
|
||||
|
||||
exclude:
|
||||
- ./dotbot/**
|
||||
- ./dotbot-*/**
|
||||
- ./tools/dotbot/**
|
||||
- ./tools/dotbot-*/**
|
||||
- ./config/astronvim/**
|
||||
- ./config/nvim/**
|
||||
|
||||
95
README.md
95
README.md
@@ -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
|
||||
|
||||

|
||||
|
||||
## tmux + nvim (astronvim) editing this repository
|
||||
|
||||

|
||||
|
||||
## 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
|
||||
@@ -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
|
||||
|
||||
|
||||
19
base/bashrc
19
base/bashrc
@@ -1,6 +1,10 @@
|
||||
# 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"
|
||||
|
||||
@@ -9,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
|
||||
@@ -20,4 +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"
|
||||
|
||||
@@ -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
34
base/gitprofile
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
57
base/zshrc
57
base/zshrc
@@ -1,28 +1,49 @@
|
||||
# this is my zsh config. there are many like it, but this one is mine.
|
||||
# shellcheck shell=bash
|
||||
|
||||
autoload -U colors zsh/terminfo
|
||||
colors
|
||||
setopt correct
|
||||
# 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
|
||||
|
||||
# Add completion scripts to zsh path
|
||||
FPATH="~/.config/zsh/completion:$FPATH"
|
||||
autoload -Uz compinit && compinit -i
|
||||
# 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
|
||||
[ -f "$file" ] && source "$file"
|
||||
[ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -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
|
||||
@@ -44,8 +65,16 @@ have antigen && {
|
||||
antigen apply
|
||||
}
|
||||
|
||||
# starship is present
|
||||
have starship && eval "$(starship init zsh)"
|
||||
[ -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"
|
||||
|
||||
# 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
|
||||
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
|
||||
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
||||
|
||||
4
config/act/actrc
Normal file
4
config/act/actrc
Normal 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
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck source="../scripts/shared.sh"
|
||||
# shellcheck disable=1091,2139
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
# Get installed php versions from brew and setup aliases
|
||||
@@ -54,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
|
||||
@@ -83,3 +89,6 @@ if [[ -f "$HOME/.aliases.local" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source "$HOME/.aliases.local"
|
||||
fi
|
||||
|
||||
alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
|
||||
alias svn="svn --config-dir $XDG_CONFIG_HOME/subversion"
|
||||
|
||||
18
config/astronvim/lua/user/.luacheckrc
Normal file
18
config/astronvim/lua/user/.luacheckrc
Normal file
@@ -0,0 +1,18 @@
|
||||
-- Global objects
|
||||
globals = {
|
||||
"astronvim",
|
||||
"astronvim_installation",
|
||||
"vim",
|
||||
"bit",
|
||||
}
|
||||
|
||||
-- Rerun tests only if their modification time changed
|
||||
cache = true
|
||||
|
||||
-- Don't report unused self arguments of methods
|
||||
self = false
|
||||
|
||||
ignore = {
|
||||
"631", -- max_line_length
|
||||
"212/_.*", -- unused argument, for vars with "_" prefix
|
||||
}
|
||||
20
config/astronvim/lua/user/.neoconf.json
Normal file
20
config/astronvim/lua/user/.neoconf.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"lspconfig": {
|
||||
"lua_ls": {
|
||||
"Lua.format.enable": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 = {
|
||||
|
||||
@@ -17,11 +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
|
||||
-- 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
|
||||
|
||||
@@ -25,6 +25,8 @@ return {
|
||||
icons_enabled = true,
|
||||
-- disable notifications when toggling UI elements
|
||||
ui_notifications_enabled = true,
|
||||
-- enable experimental resession.nvim session management (will be default in AstroNvim v4)
|
||||
resession_enabled = false,
|
||||
},
|
||||
}
|
||||
-- If you need more control, you can use the function()...end notation
|
||||
|
||||
@@ -17,6 +17,7 @@ return {
|
||||
}
|
||||
},
|
||||
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
|
||||
{ import = "astrocommunity.completion.tabnine-nvim" },
|
||||
{ import = "astrocommunity.bars-and-lines.smartcolumn-nvim" },
|
||||
{
|
||||
"m4xshen/smartcolumn.nvim",
|
||||
@@ -30,18 +31,29 @@ return {
|
||||
"folke/trouble.nvim",
|
||||
opts = {
|
||||
auto_open = true,
|
||||
position = "right"
|
||||
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" },
|
||||
{ import = "astrocommunity.pack.docker" },
|
||||
{ import = "astrocommunity.pack.go" },
|
||||
{ import = "astrocommunity.pack.html-css" },
|
||||
{ import = "astrocommunity.pack.json" },
|
||||
{ import = "astrocommunity.pack.markdown" },
|
||||
{ import = "astrocommunity.pack.php" },
|
||||
{ import = "astrocommunity.project.neoconf-nvim" },
|
||||
{ import = "astrocommunity.pack.typescript" },
|
||||
{ import = "astrocommunity.pack.vue" },
|
||||
{ import = "astrocommunity.pack.yaml" },
|
||||
{ import = "astrocommunity.project.nvim-spectre" },
|
||||
{ import = "astrocommunity.project.project-nvim" },
|
||||
{ import = "astrocommunity.test.neotest" },
|
||||
|
||||
@@ -4,29 +4,41 @@ return {
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- overrides `require("mason-lspconfig").setup(...)`
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"diagnosticls",
|
||||
},
|
||||
},
|
||||
opts = function(_, opts)
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
|
||||
-- "lua_ls",
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- use mason-null-ls to configure Formatters/Linter
|
||||
-- installation for null-ls sources
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
-- overrides `require("mason-null-ls").setup(...)`
|
||||
opts = {
|
||||
automatic_setup = true,
|
||||
automatic_installation = true,
|
||||
},
|
||||
opts = function(_, opts)
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
|
||||
-- "prettier",
|
||||
-- "stylua",
|
||||
})
|
||||
opts.automatic_setup = true
|
||||
opts.automatic_installation = true
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
-- overrides `require("mason-nvim-dap").setup(...)`
|
||||
opts = {
|
||||
automatic_installation = true,
|
||||
automatic_setup = true,
|
||||
ensure_installed = { "python", "php", "js", "bash" },
|
||||
},
|
||||
opts = function(_, opts)
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
|
||||
"python",
|
||||
"php",
|
||||
"js",
|
||||
"bash"
|
||||
})
|
||||
opts.automatic_installation = true
|
||||
opts.automatic_setup = true
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -30,14 +30,8 @@ return {
|
||||
null_ls.builtins.diagnostics.tfsec,
|
||||
null_ls.builtins.diagnostics.trail_space,
|
||||
null_ls.builtins.diagnostics.tsc,
|
||||
null_ls.builtins.diagnostics.vacuum,
|
||||
null_ls.builtins.diagnostics.vint,
|
||||
null_ls.builtins.diagnostics.vulture,
|
||||
null_ls.builtins.diagnostics.yamllint,
|
||||
null_ls.builtins.diagnostics.zsh,
|
||||
null_ls.builtins.formatting.blade_formatter,
|
||||
null_ls.builtins.formatting.clang_format,
|
||||
null_ls.builtins.formatting.eslint,
|
||||
null_ls.builtins.formatting.fixjson,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.jq,
|
||||
@@ -45,7 +39,6 @@ return {
|
||||
null_ls.builtins.formatting.shfmt.with {
|
||||
args = { "-i", "1", "-bn", "-ci", "-sr", "-kb", "-fn" },
|
||||
},
|
||||
null_ls.builtins.formatting.stylelint,
|
||||
}
|
||||
return config -- return final config table
|
||||
end,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
|
||||
"bash",
|
||||
"c",
|
||||
"cmake",
|
||||
@@ -28,6 +28,6 @@ return {
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-- luacheck: globals vim
|
||||
return {
|
||||
-- You can also add new plugins here as well:
|
||||
-- Add plugins, the lazy syntax
|
||||
@@ -12,4 +13,95 @@ return {
|
||||
lazy = false,
|
||||
enabled = true,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
lazy = false,
|
||||
enabled = true,
|
||||
opts = {
|
||||
enable = true,
|
||||
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
|
||||
{
|
||||
ft = "toggleterm",
|
||||
size = { height = 0.4 },
|
||||
-- exclude floating windows
|
||||
filter = function(_, win)
|
||||
return vim.api.nvim_win_get_config(win).relative == ""
|
||||
end,
|
||||
},
|
||||
{
|
||||
ft = "lazyterm",
|
||||
title = "LazyTerm",
|
||||
size = { height = 0.4 },
|
||||
filter = function(buf)
|
||||
return not vim.b[buf].lazyterm_cmd
|
||||
end,
|
||||
},
|
||||
"Trouble",
|
||||
{ ft = "qf", title = "QuickFix" },
|
||||
{
|
||||
ft = "help",
|
||||
size = { height = 20 },
|
||||
-- only show help buffers
|
||||
filter = function(buf)
|
||||
return vim.bo[buf].buftype == "help"
|
||||
end,
|
||||
},
|
||||
{ ft = "spectre_panel", size = { height = 0.4 } },
|
||||
},
|
||||
left = {
|
||||
-- Neo-tree filesystem always takes half the screen height
|
||||
{
|
||||
title = "Neo-Tree",
|
||||
ft = "neo-tree",
|
||||
filter = function(buf)
|
||||
return vim.b[buf].neo_tree_source == "filesystem"
|
||||
end,
|
||||
size = { height = 0.5 },
|
||||
},
|
||||
{
|
||||
title = "Neo-Tree Buffers",
|
||||
ft = "neo-tree",
|
||||
filter = function(buf)
|
||||
return vim.b[buf].neo_tree_source == "buffers"
|
||||
end,
|
||||
pinned = true,
|
||||
open = "Neotree position=top buffers",
|
||||
},
|
||||
-- any other neo-tree windows
|
||||
"neo-tree",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
---
|
||||
# The editor to use with 'cheat -e <sheet>'. Defaults to $EDITOR or $VISUAL.
|
||||
# editor: $EDITOR
|
||||
|
||||
# Should 'cheat' always colorize output?
|
||||
colorize: true
|
||||
|
||||
# Which 'chroma' colorscheme should be applied to the output?
|
||||
# Options are available here:
|
||||
# https://github.com/alecthomas/chroma/tree/master/styles
|
||||
style: "catppuccin"
|
||||
|
||||
# Which 'chroma' "formatter" should be applied?
|
||||
# One of: "terminal", "terminal256", "terminal16m"
|
||||
formatter: terminal256
|
||||
|
||||
# Through which pager should output be piped?
|
||||
# 'less -FRX' is recommended on Unix systems
|
||||
# 'more' is recommended on Windows
|
||||
pager: less -FRX
|
||||
|
||||
# Cheatpaths are paths at which cheatsheets are available on your local
|
||||
# filesystem.
|
||||
#
|
||||
@@ -63,21 +58,21 @@ cheatpaths:
|
||||
# 'readonly': shall user-created ('cheat -e') cheatsheets be saved here?
|
||||
- name: community
|
||||
path: ~/.config/cheat/cheatsheets/community
|
||||
tags: [ community ]
|
||||
tags: [community]
|
||||
readonly: true
|
||||
# If you have personalized cheatsheets, list them last. They will take
|
||||
# precedence over the more global cheatsheets.
|
||||
- name: personal
|
||||
path: ~/.dotfiles/config/cheat/cheatsheets/personal
|
||||
tags: [ personal ]
|
||||
tags: [personal]
|
||||
readonly: false
|
||||
- name: pure-bash-bible
|
||||
path: ~/.dotfiles/config/cheat/cheatsheets/pure-bash-bible
|
||||
tags: [ pure-bash-bible ]
|
||||
tags: [pure-bash-bible]
|
||||
readonly: true
|
||||
- name: tldr
|
||||
path: ~/.dotfiles/config/cheat/cheatsheets/tldr
|
||||
tags: [ tldr ]
|
||||
tags: [tldr]
|
||||
readonly: true
|
||||
|
||||
# While it requires no configuration here, it's also worth noting that
|
||||
|
||||
@@ -17,24 +17,20 @@ 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
|
||||
have brew && {
|
||||
path_append "$(brew --prefix python)/bin"
|
||||
path_append "$(brew --prefix coreutils)/libexec/gnubin"
|
||||
path_append "$(brew --prefix ruby)/bin"
|
||||
path_append "$(gem environment gemdir)/bin"
|
||||
have_brew python && path_append "$(brew --prefix python)/bin"
|
||||
}
|
||||
|
||||
source "$DOTFILES/config/exports-shell"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# shellcheck enable=external-sources
|
||||
# shellcheck disable=1091
|
||||
# shellcheck disable=1091,2139
|
||||
# vim: filetype=zsh
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
@@ -13,42 +13,34 @@ export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||
|
||||
# Ansible configuration
|
||||
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
|
||||
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
|
||||
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
|
||||
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
|
||||
have ansible && {
|
||||
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
|
||||
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
|
||||
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
|
||||
x-dc "$ANSIBLE_HOME"
|
||||
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
|
||||
}
|
||||
|
||||
# brew configuration
|
||||
have brew && {
|
||||
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
}
|
||||
export ANDROID_HOME="$XDG_DATA_HOME/android"
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
have composer && {
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
}
|
||||
|
||||
# docker, https://docs.docker.com/engine/reference/commandline/cli/
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
have docker && {
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
x-dc "$DOCKER_CONFIG"
|
||||
# Docker: Disable snyk ad
|
||||
export DOCKER_SCAN_SUGGEST=false
|
||||
}
|
||||
|
||||
# ffmpeg
|
||||
have ffmpeg && {
|
||||
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
|
||||
x-dc "$FFMPEG_DATADIR"
|
||||
}
|
||||
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
|
||||
have ffmpeg && x-dc "$FFMPEG_DATADIR"
|
||||
|
||||
# gcloud
|
||||
have gcloud && {
|
||||
@@ -57,20 +49,12 @@ have gcloud && {
|
||||
[[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
||||
}
|
||||
|
||||
# gem, rubygems
|
||||
have gem && {
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export GEM_PATH="$XDG_STATE_HOME/gem"
|
||||
export PATH="$GEM_HOME/bin:$PATH"
|
||||
path_append "$GEM_PATH/bin"
|
||||
}
|
||||
# GnuPG
|
||||
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
||||
|
||||
# If we have go packages, include them to the PATH
|
||||
have go && {
|
||||
export GOPATH="$XDG_DATA_HOME/go"
|
||||
export GOBIN="$XDG_BIN_HOME"
|
||||
x-dc "$GOPATH"
|
||||
}
|
||||
# Go
|
||||
export GOPATH="$XDG_DATA_HOME/go"
|
||||
export GOBIN="$XDG_BIN_HOME"
|
||||
|
||||
# irssi
|
||||
have irssi && {
|
||||
@@ -81,10 +65,8 @@ have irssi && {
|
||||
}
|
||||
|
||||
# nb, https://xwmx.github.io/nb/
|
||||
have nb && {
|
||||
export NB_DIR="$XDG_STATE_HOME/nb"
|
||||
x-dc "$NB_DIR"
|
||||
}
|
||||
export NBRC_PATH="$XDG_CONFIG_HOME/nbrc"
|
||||
export NB_DIR="$XDG_STATE_HOME/nb"
|
||||
|
||||
# nvm, the node version manager
|
||||
export NVM_LAZY_LOAD=true
|
||||
@@ -101,22 +83,49 @@ have node && {
|
||||
}
|
||||
|
||||
# op (1Password cli) is present
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
have op && {
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
x-dc "$OP_CACHE"
|
||||
eval "$(op completion zsh)"
|
||||
compdef _op op
|
||||
}
|
||||
|
||||
# Python
|
||||
#
|
||||
# pyenv, python environments
|
||||
export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"
|
||||
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
|
||||
have pyenv && {
|
||||
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
|
||||
x-dc "$PYENV_ROOT"
|
||||
path_append "$(pyenv root)/shims"
|
||||
path_append "$PYENV_ROOT/bin"
|
||||
|
||||
eval "$(pyenv init -)"
|
||||
}
|
||||
|
||||
# Ruby
|
||||
#
|
||||
# including: bundler, rbenv
|
||||
export GEM_HOME="${XDG_DATA_HOME}"/gem
|
||||
export GEM_SPEC_CACHE="${XDG_CACHE_HOME}"/gem
|
||||
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle
|
||||
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
|
||||
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
|
||||
export RBENV_ROOT="$XDG_STATE_HOME/rbenv"
|
||||
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"
|
||||
|
||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||
x-dc "$WAKATIME_HOME"
|
||||
@@ -126,9 +135,6 @@ export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
[[ -f "$XDG_BIN_HOME/z/z.sh" ]] && source "$XDG_BIN_HOME/z/z.sh"
|
||||
|
||||
# Misc
|
||||
export ANDROID_HOME="$XDG_DATA_HOME/android"
|
||||
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
||||
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
|
||||
export TMUX_CONF="$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||
export BAT_THEME="ansi"
|
||||
export CHEAT_USE_FZF=true
|
||||
export SQLITE_HISTORY="$XDG_CACHE_HOME"/sqlite_history
|
||||
|
||||
@@ -31,10 +31,10 @@ digga()
|
||||
dig +nocmd "$1" any +multiline +noall +answer
|
||||
}
|
||||
|
||||
# Rector project to php version 8.0 by default.
|
||||
# Rector project to php version 8.2 by default.
|
||||
rector()
|
||||
{
|
||||
local php="${1:-80}"
|
||||
local php="${1:-82}"
|
||||
docker run -v "$(pwd)":/project rector/rector:latest process \
|
||||
"/project/$1" \
|
||||
--set "php${php}" \
|
||||
@@ -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
|
||||
@@ -100,7 +103,7 @@ x-default-antigen-bundles()
|
||||
have docker-compose && antigen bundle sroze/docker-compose-zsh-plugin
|
||||
have jq && antigen bundle reegnz/jq-zsh-plugin
|
||||
have nvm && antigen bundle nvm
|
||||
have nvm && antigen bundle $DOTFILES/config/zsh/plugins/nvm-auto-use
|
||||
have nvm && antigen bundle "$DOTFILES/config/zsh/plugins/nvm-auto-use"
|
||||
have php && antigen bundle php
|
||||
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||
have rvm && antigen bundle unixorn/rvm-plugin
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[alias]
|
||||
branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
|
||||
branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'"
|
||||
|
||||
32
config/gpg-tui/gpg-tui.toml
Normal file
32
config/gpg-tui/gpg-tui.toml
Normal 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"
|
||||
|
||||
@@ -16,20 +16,46 @@ tap "teamookla/speedtest"
|
||||
tap "xwmx/taps"
|
||||
# Run your GitHub Actions locally
|
||||
brew "act"
|
||||
# Mozilla CA certificate store
|
||||
brew "ca-certificates"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.11"
|
||||
# YAML Parser
|
||||
brew "libyaml"
|
||||
# Automate deployment, configuration, and upgrading
|
||||
brew "ansible"
|
||||
# Checks ansible playbooks for practices and behaviour
|
||||
brew "ansible-lint"
|
||||
# Generic-purpose lossless compression algorithm by Google
|
||||
brew "brotli"
|
||||
# Library and utilities for processing GIFs
|
||||
brew "giflib"
|
||||
# Performance-portable, length-agnostic SIMD with runtime dispatch
|
||||
brew "highway"
|
||||
# Library of 2D and 3D vector, matrix, and math operations
|
||||
brew "imath"
|
||||
# JPEG image codec that aids compression and decompression
|
||||
brew "jpeg-turbo"
|
||||
# Zstandard is a real-time compression algorithm
|
||||
brew "zstd"
|
||||
# New file format for still image compression
|
||||
brew "jpeg-xl"
|
||||
# Codec library for encoding and decoding AV1 video streams
|
||||
brew "aom"
|
||||
# Apache Portable Runtime library
|
||||
brew "apr"
|
||||
# Companion library to apr, the Apache Portable Runtime library
|
||||
brew "apr-util"
|
||||
# Password hashing library and CLI utility
|
||||
brew "argon2"
|
||||
# Open Source Kubernetes Marketplace
|
||||
brew "arkade"
|
||||
# Automatic configure script builder
|
||||
brew "autoconf"
|
||||
# GNU multiple precision arithmetic library
|
||||
brew "gmp"
|
||||
# GNU File, Shell, and Text utilities
|
||||
brew "coreutils", link: false
|
||||
brew "coreutils"
|
||||
# Extendable version manager with support for Ruby, Node.js, Erlang & more
|
||||
brew "asdf"
|
||||
# Spell checker with better logic than ispell
|
||||
@@ -42,6 +68,12 @@ brew "bat"
|
||||
brew "bottom"
|
||||
# Switch Apache / Valet / CLI configs between PHP versions
|
||||
brew "brew-php-switcher"
|
||||
# Software library to render fonts
|
||||
brew "freetype"
|
||||
# XML-based font configuration API for X Windows
|
||||
brew "fontconfig"
|
||||
# GNU internationalization (i18n) and localization (l10n) library
|
||||
brew "gettext"
|
||||
# Core application library for C
|
||||
brew "glib"
|
||||
# Manage compile and link flags for libraries
|
||||
@@ -78,6 +110,8 @@ brew "harfbuzz"
|
||||
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
|
||||
@@ -96,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
|
||||
@@ -114,6 +150,10 @@ brew "gnutls"
|
||||
brew "gnupg"
|
||||
# Open source programming language to build simple/reliable/efficient software
|
||||
brew "go"
|
||||
# Library access to GnuPG
|
||||
brew "gpgme"
|
||||
# Manage your GnuPG keys with ease!
|
||||
brew "gpg-tui"
|
||||
# Image manipulation
|
||||
brew "netpbm"
|
||||
# Framework for layout and rendering of i18n text
|
||||
@@ -140,10 +180,10 @@ brew "libheif"
|
||||
brew "imagemagick"
|
||||
# Lightweight and flexible command-line JSON processor
|
||||
brew "jq"
|
||||
# Network authentication protocol
|
||||
brew "krb5"
|
||||
# Lazier way to manage everything docker
|
||||
brew "lazydocker"
|
||||
# Postgres C API library
|
||||
brew "libpq"
|
||||
# Linguistic software and Finnish dictionary
|
||||
brew "libvoikko"
|
||||
# Rainbows and unicorns in your console!
|
||||
@@ -154,6 +194,8 @@ brew "luarocks"
|
||||
brew "m-cli"
|
||||
# Mac App Store command-line interface
|
||||
brew "mas"
|
||||
# NCurses Disk Usage
|
||||
brew "ncdu"
|
||||
# Ambitious Vim-fork focused on extensibility and agility
|
||||
brew "neovim"
|
||||
# HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
|
||||
@@ -162,10 +204,10 @@ brew "nginx"
|
||||
brew "nmap"
|
||||
# Manage multiple Node.js versions
|
||||
brew "nvm"
|
||||
# Development kit for the Java programming language
|
||||
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
|
||||
@@ -184,22 +226,26 @@ brew "pyenv-virtualenv"
|
||||
brew "python@3.10"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.8"
|
||||
# Ruby version manager
|
||||
brew "rbenv"
|
||||
# RC file (dotfile) management
|
||||
brew "rcm"
|
||||
# Search tool like grep and The Silver Searcher
|
||||
brew "ripgrep"
|
||||
# Powerful, clean, object-oriented scripting language
|
||||
brew "ruby"
|
||||
# Safe, concurrent, practical language
|
||||
brew "rust"
|
||||
# Static analysis and lint tool, for (ba)sh scripts
|
||||
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
|
||||
brew "task"
|
||||
# Terminal user interface for taskwarrior
|
||||
brew "taskwarrior-tui"
|
||||
# Send macOS User Notifications from the command-line
|
||||
brew "terminal-notifier"
|
||||
# Thin wrapper for Terraform e.g. for locking state
|
||||
@@ -234,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
|
||||
@@ -276,6 +324,8 @@ cask "dbngin"
|
||||
cask "docker"
|
||||
# Reimagine your terminal
|
||||
cask "fig"
|
||||
# UI toolkit for building applications for mobile, web and desktop
|
||||
cask "flutter"
|
||||
# Unofficial overcast.fm podcast app
|
||||
cask "fog"
|
||||
# Typeface made for developers
|
||||
@@ -304,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
|
||||
@@ -372,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"
|
||||
@@ -379,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"
|
||||
@@ -394,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"
|
||||
@@ -409,12 +462,11 @@ vscode "ms-vscode.cpptools"
|
||||
vscode "msjsdiag.vscode-react-native"
|
||||
vscode "mtxr.sqltools"
|
||||
vscode "neilbrayfield.php-docblocker"
|
||||
vscode "nemesarial.dust"
|
||||
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"
|
||||
@@ -422,7 +474,9 @@ 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"
|
||||
vscode "xdebug.php-debug"
|
||||
vscode "xdebug.php-pack"
|
||||
11
config/homebrew/brew.env
Normal file
11
config/homebrew/brew.env
Normal 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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Submodule config/nvim updated: 4420060f35...1910b86d3d
@@ -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}'
|
||||
@@ -42,3 +42,41 @@ data.location=$XDG_DATA_HOME/task/
|
||||
weekstart=monday
|
||||
|
||||
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
|
||||
uda.taskwarrior-tui.keyconfig.go-to-bottom=G
|
||||
uda.taskwarrior-tui.keyconfig.go-to-top=g
|
||||
uda.taskwarrior-tui.keyconfig.down=j
|
||||
uda.taskwarrior-tui.keyconfig.up=k
|
||||
uda.taskwarrior-tui.keyconfig.page-down=J
|
||||
uda.taskwarrior-tui.keyconfig.page-up=K
|
||||
uda.taskwarrior-tui.keyconfig.delete=x
|
||||
uda.taskwarrior-tui.keyconfig.done=d
|
||||
uda.taskwarrior-tui.keyconfig.start-stop=s
|
||||
uda.taskwarrior-tui.keyconfig.quick-tag=t
|
||||
uda.taskwarrior-tui.keyconfig.undo=u
|
||||
uda.taskwarrior-tui.keyconfig.edit=e
|
||||
uda.taskwarrior-tui.keyconfig.modify=m
|
||||
uda.taskwarrior-tui.keyconfig.shell=!
|
||||
uda.taskwarrior-tui.keyconfig.log=l
|
||||
uda.taskwarrior-tui.keyconfig.add=a
|
||||
uda.taskwarrior-tui.keyconfig.annotate=A
|
||||
uda.taskwarrior-tui.keyconfig.filter=/
|
||||
uda.taskwarrior-tui.keyconfig.zoom=z
|
||||
uda.taskwarrior-tui.keyconfig.context-menu=c
|
||||
uda.taskwarrior-tui.keyconfig.next-tab=.
|
||||
uda.taskwarrior-tui.keyconfig.previous-tab=,
|
||||
|
||||
taskd.certificate=$XDG_DATA_HOME/task/private.certificate.pem
|
||||
taskd.key=$XDG_DATA_HOME/task/private.key.pem
|
||||
taskd.ca=$XDG_DATA_HOME/task/ca.cert.pem
|
||||
taskd.server=inthe.am:53589
|
||||
taskd.credentials=inthe_am/ivuorinen/b99a4970-94fb-4fb8-b9fe-e1a8140dd44d
|
||||
taskd.trust=strict
|
||||
|
||||
|
||||
1
config/tmux/plugins/catppuccin
Submodule
1
config/tmux/plugins/catppuccin
Submodule
Submodule config/tmux/plugins/catppuccin added at d60e40e097
1
config/tmux/plugins/tmux-1password
Submodule
1
config/tmux/plugins/tmux-1password
Submodule
Submodule config/tmux/plugins/tmux-1password added at bb1bbd2acf
1
config/tmux/plugins/tmux-autoreload
Submodule
1
config/tmux/plugins/tmux-autoreload
Submodule
Submodule config/tmux/plugins/tmux-autoreload added at e98aa3b74c
1
config/tmux/plugins/tmux-continuum
Submodule
1
config/tmux/plugins/tmux-continuum
Submodule
Submodule config/tmux/plugins/tmux-continuum added at 3e4bc35da4
1
config/tmux/plugins/tmux-fzf
Submodule
1
config/tmux/plugins/tmux-fzf
Submodule
Submodule config/tmux/plugins/tmux-fzf added at 2397bd699e
1
config/tmux/plugins/tmux-menus
Submodule
1
config/tmux/plugins/tmux-menus
Submodule
Submodule config/tmux/plugins/tmux-menus added at c24c8d5ecb
1
config/tmux/plugins/tmux-notify
Submodule
1
config/tmux/plugins/tmux-notify
Submodule
Submodule config/tmux/plugins/tmux-notify added at f379f95a73
1
config/tmux/plugins/tmux-resurrect
Submodule
1
config/tmux/plugins/tmux-resurrect
Submodule
Submodule config/tmux/plugins/tmux-resurrect added at cff343cf9e
1
config/tmux/plugins/tmux-sensible
Submodule
1
config/tmux/plugins/tmux-sensible
Submodule
Submodule config/tmux/plugins/tmux-sensible added at 25cb91f42d
1
config/tmux/plugins/tmux-sessionist
Submodule
1
config/tmux/plugins/tmux-sessionist
Submodule
Submodule config/tmux/plugins/tmux-sessionist added at a315c42332
1
config/tmux/plugins/tmux-suspend
Submodule
1
config/tmux/plugins/tmux-suspend
Submodule
Submodule config/tmux/plugins/tmux-suspend added at 1a2f806666
1
config/tmux/plugins/tmux-yank
Submodule
1
config/tmux/plugins/tmux-yank
Submodule
Submodule config/tmux/plugins/tmux-yank added at acfd36e4fc
1
config/tmux/plugins/vim-tmux-navigator
Submodule
1
config/tmux/plugins/vim-tmux-navigator
Submodule
Submodule config/tmux/plugins/vim-tmux-navigator added at cdd66d6a37
@@ -14,6 +14,7 @@ set -g @tpm_plugins ' \
|
||||
yardnsm/tmux-1password \
|
||||
jaclu/tmux-menus \
|
||||
sainnhe/tmux-fzf \
|
||||
MunifTanjim/tmux-suspend \
|
||||
tmux-plugins/tmux-continuum \
|
||||
tmux-plugins/tmux-resurrect \
|
||||
tmux-plugins/tmux-sensible \
|
||||
@@ -21,6 +22,9 @@ set -g @tpm_plugins ' \
|
||||
tmux-plugins/tmux-yank \
|
||||
'
|
||||
|
||||
# Set plugins install dir
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.dotfiles/config/tmux/plugins/'
|
||||
|
||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
|
||||
# Mouse support
|
||||
@@ -61,7 +65,7 @@ bind -n M-H previous-window
|
||||
bind -n M-L next-window
|
||||
|
||||
# Reload tmux config with <prefix> + r
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display "tmux cfg reloaded!"
|
||||
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux cfg reloaded!"
|
||||
|
||||
# Open a new window with <prefix> + N
|
||||
bind N new-window
|
||||
@@ -78,6 +82,25 @@ set -g @1password-key 'x'
|
||||
set -g @catppuccin_flavour 'mocha' # latte/frappe/macchiato/mocha
|
||||
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
|
||||
|
||||
## https://github.com/MunifTanjim/tmux-mode-indicator
|
||||
set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}'
|
||||
|
||||
set -g @mode_indicator_prefix_prompt ' WAIT '
|
||||
set -g @mode_indicator_copy_prompt ' COPY '
|
||||
set -g @mode_indicator_sync_prompt ' SYNC '
|
||||
set -g @mode_indicator_empty_prompt ' TMUX '
|
||||
set -g @mode_indicator_prefix_mode_style 'bg=blue,fg=black'
|
||||
set -g @mode_indicator_copy_mode_style 'bg=yellow,fg=black'
|
||||
set -g @mode_indicator_sync_mode_style 'bg=red,fg=black'
|
||||
set -g @mode_indicator_empty_mode_style 'bg=cyan,fg=black'
|
||||
|
||||
## https://github.com/MunifTanjim/tmux-suspend
|
||||
set -g @suspend_key 'F12'
|
||||
set -g @suspend_suspended_options " \
|
||||
@mode_indicator_custom_prompt:: ---- , \
|
||||
@mode_indicator_custom_mode_style::bg=brightblack\\,fg=black, \
|
||||
"
|
||||
|
||||
## https://github.com/tmux-plugins/tmux-continuum
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-boot 'on'
|
||||
@@ -87,7 +110,7 @@ set -g @continuum-boot-options 'iterm'
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
|
||||
## https://github.com/b0o/tmux-autoreload
|
||||
set-option -g @tmux-autoreload-configs '~/.config/tmux/tmux.conf'
|
||||
set-option -g @tmux-autoreload-configs '~/.dotfiles/config/tmux/tmux.conf'
|
||||
|
||||
## https://github.com/sainnhe/tmux-fzf
|
||||
TMUX_FZF_LAUNCH_KEY="l"
|
||||
@@ -103,7 +126,7 @@ bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind '!' split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# synchronize all panes in a window
|
||||
bind y setw synchronize-panes
|
||||
@@ -121,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'
|
||||
|
||||
66
config/zsh/completion/_cheat
Normal file
66
config/zsh/completion/_cheat
Normal 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
|
||||
177
config/zsh/completion/_git-profile
Normal file
177
config/zsh/completion/_git-profile
Normal 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
|
||||
@@ -1,174 +0,0 @@
|
||||
#compdef nb
|
||||
###############################################################################
|
||||
# __ _
|
||||
# \ \ _ __ | |__
|
||||
# \ \ | '_ \| '_ \
|
||||
# / / | | | | |_) |
|
||||
# /_/ |_| |_|_.__/
|
||||
#
|
||||
# [nb] Command line and local web note-taking, bookmarking, and archiving with
|
||||
# plain text data storage, encryption, filtering and search, pinning, #tagging,
|
||||
# Git-backed versioning and syncing, Pandoc-backed conversion, global and local
|
||||
# notebooks, customizable color themes, [[wiki-style linking]], plugins, and
|
||||
# more in a single portable, user-friendly script.
|
||||
#
|
||||
# https://github.com/xwmx/nb
|
||||
###############################################################################
|
||||
_nb_subcommands() {
|
||||
# _nb_cache_completions()
|
||||
#
|
||||
# Usage:
|
||||
# _nb_cache_completions <path>
|
||||
#
|
||||
# Description:
|
||||
# Cache completions for `nb`. Generating completions can be slow and
|
||||
# native shell caching doesn't appear to help.
|
||||
_nb_cache_completions() {
|
||||
local _cache_path="${1:-}"
|
||||
|
||||
[[ -z "${_cache_path:-}" ]] && return 0
|
||||
|
||||
# Remove outdated cache files.
|
||||
|
||||
local _base_cache_path="${_cache_path%-*}"
|
||||
|
||||
local __suffix=
|
||||
for __suffix in "zsh" "v1"
|
||||
do
|
||||
if [[ -e "${_base_cache_path:?}-${__suffix:?}" ]]
|
||||
then
|
||||
rm -f "${_base_cache_path:?}-${__suffix:?}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Rebuild completion cache.
|
||||
|
||||
local _commands=
|
||||
IFS=$'\n' _commands=($(nb subcommands))
|
||||
|
||||
local _notebooks=
|
||||
IFS=$'\n' _notebooks=($(nb notebooks --names --no-color --unarchived))
|
||||
|
||||
local _completions=()
|
||||
IFS=$'\n' _completions=(${_commands[@]})
|
||||
|
||||
local _commands_cached=
|
||||
local _notebooks_cached=
|
||||
|
||||
if [[ -e "${_cache_path}" ]]
|
||||
then
|
||||
local _counter=0
|
||||
|
||||
local __line=
|
||||
while IFS= read -r __line
|
||||
do
|
||||
_counter=$((_counter+1))
|
||||
|
||||
if [[ "${_counter}" == 1 ]]
|
||||
then
|
||||
_commands_cached="${__line}"
|
||||
elif [[ "${_counter}" == 2 ]]
|
||||
then
|
||||
_notebooks_cached="${__line}"
|
||||
else
|
||||
break
|
||||
fi
|
||||
done < "${_cache_path}"
|
||||
fi
|
||||
|
||||
if [[ "${_commands_cached}" != "${_commands[*]:-}" ]] ||
|
||||
[[ "${_notebooks_cached}" != "${_notebooks[*]:-}" ]]
|
||||
then
|
||||
# Construct <notebook>:<subcommand> completions.
|
||||
local __notebook=
|
||||
for __notebook in "${_notebooks[@]}"
|
||||
do
|
||||
local __command=
|
||||
for __command in "${_commands[@]}"
|
||||
do
|
||||
if [[ -n "${__notebook:-}" ]] &&
|
||||
[[ -n "${__command:-}" ]]
|
||||
then
|
||||
_completions+=("${__notebook}:${__command}")
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
local _directory_path=
|
||||
_directory_path="$(dirname "${_cache_path}")"
|
||||
|
||||
mkdir -p "${_directory_path}"
|
||||
|
||||
if [[ -f "${_cache_path:?}" ]]
|
||||
then
|
||||
rm -f "${_cache_path:?}"
|
||||
fi
|
||||
|
||||
touch "${_cache_path:?}"
|
||||
|
||||
{
|
||||
(IFS=$' '; printf "%s\\n" "${_commands[*]}")
|
||||
(IFS=$' '; printf "%s\\n" "${_notebooks[*]}")
|
||||
printf "%s\\n" "${_completions[@]}"
|
||||
} >> "${_cache_path}"
|
||||
fi
|
||||
}
|
||||
|
||||
local _nb_dir=
|
||||
_nb_dir="$(nb env | grep 'NB_DIR' | cut -d = -f 2)"
|
||||
|
||||
if [[ -z "${_nb_dir:?}" ]] ||
|
||||
[[ ! -e "${_nb_dir}" ]]
|
||||
then
|
||||
return 0
|
||||
elif [[ -L "${_nb_dir}" ]]
|
||||
then
|
||||
if hash "realpath" 2>/dev/null
|
||||
then
|
||||
_nb_dir="$(realpath "${_nb_dir}")"
|
||||
else
|
||||
_nb_dir="$(readlink "${_nb_dir}")"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -d "${_nb_dir}" ]]
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
|
||||
local _cache_path="${_nb_dir:?}/.cache/nb-completion-cache-v2"
|
||||
local _completions_cached=()
|
||||
|
||||
if [[ ! -e "${_cache_path}" ]]
|
||||
then
|
||||
_nb_cache_completions "${_cache_path}"
|
||||
fi
|
||||
|
||||
if [[ -e "${_cache_path}" ]]
|
||||
then
|
||||
local _counter=0
|
||||
|
||||
local __line=
|
||||
while IFS= read -r __line
|
||||
do
|
||||
_counter=$((_counter+1))
|
||||
|
||||
if [[ "${_counter}" -gt 2 ]]
|
||||
then
|
||||
_completions_cached+=("${__line}")
|
||||
fi
|
||||
done < "${_cache_path}"
|
||||
|
||||
(_nb_cache_completions "${_cache_path}" &)
|
||||
fi
|
||||
|
||||
if [[ "${?}" -eq 0 ]]
|
||||
then
|
||||
compadd -- "${_completions_cached[@]}"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
_nb_subcommands "$@"
|
||||
3420
config/zsh/completion/_solo2
Normal file
3420
config/zsh/completion/_solo2
Normal file
File diff suppressed because it is too large
Load Diff
177
config/zsh/completion/git-profile
Normal file
177
config/zsh/completion/git-profile
Normal 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
1713
config/zsh/p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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 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 Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
|
||||
bind-key -T copy-mode Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer -p"
|
||||
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 n send-keys -X search-again
|
||||
@@ -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-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-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer"
|
||||
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-{" send-keys -X previous-paragraph
|
||||
bind-key -T copy-mode "M-}" send-keys -X next-paragraph
|
||||
bind-key -T copy-mode M-Up send-keys -X halfpage-up
|
||||
@@ -136,7 +136,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 W send-keys -X next-space
|
||||
bind-key -T copy-mode-vi X send-keys -X set-mark
|
||||
bind-key -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
|
||||
bind-key -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer -p"
|
||||
bind-key -T copy-mode-vi ^ send-keys -X back-to-indentation
|
||||
bind-key -T copy-mode-vi b send-keys -X previous-word
|
||||
bind-key -T copy-mode-vi e send-keys -X next-word-end
|
||||
@@ -171,7 +171,7 @@ bind-key -T copy-mode-vi Down send-keys -X cursor-down
|
||||
bind-key -T copy-mode-vi Left send-keys -X cursor-left
|
||||
bind-key -T copy-mode-vi Right send-keys -X cursor-right
|
||||
bind-key -T copy-mode-vi M-x send-keys -X jump-to-mark
|
||||
bind-key -T copy-mode-vi M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer"
|
||||
bind-key -T copy-mode-vi M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer -p"
|
||||
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 join-pane \" run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-v'"
|
||||
@@ -183,6 +183,7 @@ bind-key -T join-pane h run-shell "'/Users/ivuorinen/.c
|
||||
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-o rotate-window
|
||||
bind-key -T prefix C-p previous-window
|
||||
@@ -191,7 +192,7 @@ bind-key -T prefix C-s run-shell /Users/ivuorinen/.con
|
||||
bind-key -T prefix C-z suspend-client
|
||||
bind-key -T prefix Escape copy-mode
|
||||
bind-key -T prefix Space next-layout
|
||||
bind-key -T prefix ! break-pane
|
||||
bind-key -T prefix ! split-window -h -c "#{pane_current_path}"
|
||||
bind-key -T prefix \" split-window -v -c "#{pane_current_path}"
|
||||
bind-key -T prefix \# list-buffers
|
||||
bind-key -T prefix \$ command-prompt -I "#S" { rename-session "%%" }
|
||||
@@ -226,7 +227,7 @@ bind-key -T prefix D choose-client -Z
|
||||
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 L switch-client -l
|
||||
bind-key -T prefix M select-pane -M
|
||||
bind-key -T prefix M run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-notify/scripts/cancel.sh
|
||||
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 S switch-client -l
|
||||
@@ -252,7 +253,7 @@ bind-key -T prefix r source-file /Users/ivuorinen/.d
|
||||
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 w choose-tree -Zw
|
||||
bind-key -T prefix x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||
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 y run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-yank/scripts/copy_line.sh
|
||||
bind-key -T prefix z resize-pane -Z
|
||||
bind-key -T prefix \{ swap-pane -U
|
||||
@@ -264,11 +265,13 @@ bind-key -r -T prefix Up select-pane -U
|
||||
bind-key -r -T prefix Down select-pane -D
|
||||
bind-key -r -T prefix Left select-pane -L
|
||||
bind-key -r -T prefix Right select-pane -R
|
||||
bind-key -T prefix M-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-2 select-layout even-vertical
|
||||
bind-key -T prefix M-3 select-layout main-horizontal
|
||||
bind-key -T prefix M-4 select-layout main-vertical
|
||||
bind-key -T prefix M-5 select-layout tiled
|
||||
bind-key -T prefix M-m run-shell -b "/Users/ivuorinen/.config/tmux/plugins/tmux-notify/scripts/notify.sh true"
|
||||
bind-key -T prefix M-n next-window -a
|
||||
bind-key -T prefix M-o rotate-window -D
|
||||
bind-key -T prefix M-p previous-window -a
|
||||
@@ -303,6 +306,7 @@ bind-key -T root WheelUpStatus previous-window
|
||||
bind-key -T root WheelDownStatus next-window
|
||||
bind-key -T root DoubleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -H ; send-keys -X select-word ; run-shell -d 0.3 ; send-keys -X copy-pipe-and-cancel }
|
||||
bind-key -T root TripleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -H ; send-keys -X select-line ; run-shell -d 0.3 ; send-keys -X copy-pipe-and-cancel }
|
||||
bind-key -T root 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 }
|
||||
@@ -312,5 +316,6 @@ bind-key -T root M-Left select-pane -L
|
||||
bind-key -T root M-Right select-pane -R
|
||||
bind-key -T root S-Left previous-window
|
||||
bind-key -T root S-Right next-window
|
||||
bind-key -T suspended F12 run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-suspend/scripts/resume.sh \"\""
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
[include]
|
||||
path = ~/.dotfiles/config/git/shared
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[user]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo.vuorinen@vincit.fi
|
||||
|
||||
@@ -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
|
||||
@@ -149,7 +148,7 @@ function section_brew
|
||||
have brew && {
|
||||
case "$1" in
|
||||
install)
|
||||
brew bundle install --file="$BREWFILE" && msg_yay "Done!"
|
||||
brew bundle install --file="$BREWFILE" --force --quiet && msg_yay "Done!"
|
||||
;;
|
||||
update)
|
||||
brew update && brew outdated && brew upgrade && brew cleanup
|
||||
@@ -175,6 +174,22 @@ function section_brew
|
||||
! have brew && menu_section "$USAGE_PREFIX" "brew not available on this system"
|
||||
}
|
||||
|
||||
function section_helpers
|
||||
{
|
||||
USAGE_PREFIX="$SCRIPT helpers <command>"
|
||||
MENU=(
|
||||
"path:Show \$PATH dir by dir"
|
||||
)
|
||||
|
||||
case "$1" in
|
||||
path)
|
||||
# shellcheck disable=2001
|
||||
for i in $(echo "$PATH" | sed 's/:/ /g'); do echo "$i"; done;
|
||||
;;
|
||||
*) menu_usage "$USAGE_PREFIX" "${MENU[@]}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
function section_docs
|
||||
{
|
||||
USAGE_PREFIX="$SCRIPT docs <command>"
|
||||
@@ -323,6 +338,8 @@ function usage
|
||||
section_dotfiles
|
||||
echo ""
|
||||
section_docs
|
||||
echo ""
|
||||
section_helpers
|
||||
}
|
||||
|
||||
# The main loop. first keyword after $0 triggers section, or help.
|
||||
@@ -331,6 +348,7 @@ case "$1" in
|
||||
brew) section_brew "$2" ;;
|
||||
check) section_check "$2" ;;
|
||||
dotfiles) section_dotfiles "$2" ;;
|
||||
helpers) section_helpers "$2" ;;
|
||||
docs) section_docs "$2" ;;
|
||||
tests) section_tests "$2" ;;
|
||||
*) usage && exit 0 ;;
|
||||
|
||||
@@ -46,7 +46,7 @@ gitdirty()
|
||||
if [[ "${d:0:2}" == "--" ]] || [[ "$d" == "vendor" ]] || [[ "$d" == "node_modules" ]]; then
|
||||
echo ""
|
||||
else
|
||||
cd "$d" > /dev/null
|
||||
cd "$d"
|
||||
|
||||
# If we have `.git` folder, check it.
|
||||
if [[ -d ".git" ]]; then
|
||||
@@ -58,7 +58,7 @@ gitdirty()
|
||||
printf " %s %s\n" "$ICON" "$(pwd)"
|
||||
else
|
||||
# If it wasn't git repository, check subdirectories.
|
||||
gitdirtyrepos -- *
|
||||
gitdirtyrepos ./*
|
||||
fi
|
||||
fi
|
||||
cd .. > /dev/null
|
||||
|
||||
BIN
local/bin/phpcs
BIN
local/bin/phpcs
Binary file not shown.
150
local/bin/pushover
Executable file
150
local/bin/pushover
Executable file
@@ -0,0 +1,150 @@
|
||||
#!/usr/bin/env sh
|
||||
#
|
||||
# Send Pushover messages from cli
|
||||
# Based on https://github.com/mrusme/dotfiles/blob/master/usr/local/bin/pushover
|
||||
#
|
||||
# Modified by Ismo Vuorinen <https://github.com/ivuorinen> 2023
|
||||
|
||||
__pushover_usage()
|
||||
{
|
||||
printf "pushover <options> <message>\n"
|
||||
printf " -c <callback>\n"
|
||||
printf " -d <device>\n"
|
||||
printf " -D <timestamp>\n"
|
||||
printf " -e <expire>\n"
|
||||
printf " -p <priority>\n"
|
||||
printf " -r <retry>\n"
|
||||
printf " -t <title>\n"
|
||||
printf " -T <TOKEN> (required if not in 'PUSHOVER_TOKEN' env)\n"
|
||||
printf " -s <sound>\n"
|
||||
printf " -u <url>\n"
|
||||
printf " -U <USER> (required if not in 'PUSHOVER_USER' env)\n"
|
||||
printf " -a <url_title>\n"
|
||||
return 1
|
||||
}
|
||||
|
||||
__pushover_opt_field()
|
||||
{
|
||||
field=$1
|
||||
shift
|
||||
value="${*}"
|
||||
if [ -n "${value}" ]; then
|
||||
printf "%s \"%s=%s\"\n" "-F" "$field" "$value"
|
||||
fi
|
||||
}
|
||||
|
||||
__pushover_send_message()
|
||||
{
|
||||
device="${1:-}"
|
||||
|
||||
curl_cmd="\"${CURL}\" -s -S \
|
||||
${CURL_OPTS} \
|
||||
-F \"token=${TOKEN}\" \
|
||||
-F \"user=${USER}\" \
|
||||
-F \"message=${message}\" \
|
||||
$(__pushover_opt_field device "${device}") \
|
||||
$(__pushover_opt_field callback "${callback}") \
|
||||
$(__pushover_opt_field timestamp "${timestamp}") \
|
||||
$(__pushover_opt_field priority "${priority}") \
|
||||
$(__pushover_opt_field retry "${retry}") \
|
||||
$(__pushover_opt_field expire "${expire}") \
|
||||
$(__pushover_opt_field title "${title}") \
|
||||
$(__pushover_opt_field sound "${sound}") \
|
||||
$(__pushover_opt_field url "${url}") \
|
||||
$(__pushover_opt_field url_title "${url_title}") \
|
||||
\"${PUSHOVER_URL}\""
|
||||
|
||||
response="$(eval "${curl_cmd}")"
|
||||
printf "%s\n" "$response"
|
||||
# TODO: Parse response
|
||||
r="${?}"
|
||||
if [ "${r}" -ne 0 ]; then
|
||||
printf "%s: Failed to send message\n" "${0}" >&2
|
||||
fi
|
||||
|
||||
return "${r}"
|
||||
}
|
||||
|
||||
CURL="$(which curl)"
|
||||
PUSHOVER_URL="https://api.pushover.net/1/messages.json"
|
||||
TOKEN=$PUSHOVER_TOKEN
|
||||
USER=$PUSHOVER_USER
|
||||
CURL_OPTS=""
|
||||
devices="${devices} ${device}"
|
||||
optstring="c:d:D:e:f:p:r:t:T:s:u:U:a:h"
|
||||
|
||||
OPTIND=1
|
||||
while getopts ${optstring} c; do
|
||||
case ${c} in
|
||||
c)
|
||||
callback="${OPTARG}"
|
||||
;;
|
||||
d)
|
||||
devices="${devices} ${OPTARG}"
|
||||
;;
|
||||
D)
|
||||
timestamp="${OPTARG}"
|
||||
;;
|
||||
e)
|
||||
expire="${OPTARG}"
|
||||
;;
|
||||
p)
|
||||
priority="${OPTARG}"
|
||||
;;
|
||||
r)
|
||||
retry="${OPTARG}"
|
||||
;;
|
||||
t)
|
||||
title="${OPTARG}"
|
||||
;;
|
||||
k)
|
||||
TOKEN="${OPTARG}"
|
||||
;;
|
||||
s)
|
||||
sound="${OPTARG}"
|
||||
;;
|
||||
u)
|
||||
url="${OPTARG}"
|
||||
;;
|
||||
U)
|
||||
USER="${OPTARG}"
|
||||
;;
|
||||
a)
|
||||
url_title="${OPTARG}"
|
||||
;;
|
||||
|
||||
[h\?])
|
||||
__pushover_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
if [ "$#" -lt 1 ]; then
|
||||
__pushover_usage
|
||||
exit 1
|
||||
fi
|
||||
message="$*"
|
||||
|
||||
if [ ! -x "${CURL}" ]; then
|
||||
printf "CURL is unset, empty, or does not point to curl executable.\n \
|
||||
This script requires curl!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
devices="$(printf "${devices}" | xargs -n1 | sort -u | uniq)\n"
|
||||
|
||||
if [ -z "${devices}" ]; then
|
||||
__pushover_send_message
|
||||
r=${?}
|
||||
else
|
||||
for device in ${devices}; do
|
||||
__pushover_send_message "${device}"
|
||||
r=${?}
|
||||
if [ "${r}" -ne 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
exit "${r}"
|
||||
7
local/bin/python
Executable file
7
local/bin/python
Executable 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 "$@"
|
||||
|
||||
52
local/bin/x-sha256sum-matcher
Executable file
52
local/bin/x-sha256sum-matcher
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
# x-sha256sum-matcher
|
||||
#
|
||||
# Check if two files are the same
|
||||
#
|
||||
# Ismo Vuorinen <https://github.com/ivuorinen> 2023
|
||||
# MIT License
|
||||
|
||||
# ENV Variables
|
||||
: "${VERBOSE:=0}" # VERBOSE=1 x-sha256sum-matcher file1 file2
|
||||
|
||||
file_1="$1"
|
||||
file_2="$2"
|
||||
|
||||
# return sha256sum for file
|
||||
# $1 - filename (string)
|
||||
get_sha256sum()
|
||||
{
|
||||
sha256sum "$1" | head -c 64
|
||||
}
|
||||
|
||||
[ $# -eq 0 ] && {
|
||||
echo "Usage: $0 file1.sh file2.sh" && exit 1
|
||||
}
|
||||
|
||||
msg()
|
||||
{
|
||||
[[ "$VERBOSE" -eq 1 ]] && echo "$1"
|
||||
}
|
||||
|
||||
error()
|
||||
{
|
||||
msg "(!) ERROR: $1" && exit 1
|
||||
}
|
||||
|
||||
if [ ! -f "$file_1" ]; then
|
||||
error "File 1 does not exist: $file_1"
|
||||
fi
|
||||
|
||||
if [ ! -f "$file_2" ]; then
|
||||
error "File 2 does not exist: $file_2"
|
||||
fi
|
||||
|
||||
file_1_hash=$(get_sha256sum "$file_1")
|
||||
file_2_hash=$(get_sha256sum "$file_2")
|
||||
|
||||
if [ "$file_1_hash" != "$file_2_hash" ]; then
|
||||
error "Files do not match"
|
||||
else
|
||||
msg "(*) Success: Files do match"
|
||||
exit 0
|
||||
fi
|
||||
@@ -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 \
|
||||
|
||||
@@ -35,8 +35,10 @@ for f in ${PBB_CHAPTERS[@]}; do
|
||||
HEADER=$(grep -e '^[#] ' "$f" | head -1 | awk '{print tolower($2)}')
|
||||
CHEAT_FILE="$CHEAT_DEST/${HEADER}"
|
||||
|
||||
if [ ! -f "$CHEAT_FILE" ]; then
|
||||
cp "$f" "$CHEAT_FILE" && msg_run "$CHEAT_FILE"
|
||||
replacable "$f" "$CHEAT_FILE"
|
||||
override=$?
|
||||
if [ "$override" -ne 1 ]; then
|
||||
cp "$f" "$CHEAT_FILE" && msg_run "Updated: $CHEAT_FILE"
|
||||
fi
|
||||
|
||||
LC_ALL=C perl -pi.bak -e 's/\<\!-- CHAPTER END --\>//' "$CHEAT_FILE"
|
||||
|
||||
@@ -51,12 +51,15 @@ for d in "$TLDR_TEMP_DIR"/pages/*; do
|
||||
TLDR_FILE="$SECTION_DIR/${FILENAME}"
|
||||
# echo "-> dest: $TLDR_FILE"
|
||||
|
||||
if [ ! -f "$TLDR_FILE" ]; then
|
||||
cp "$FILE" "$TLDR_FILE" && msg_run "$TLDR_FILE"
|
||||
# Update the original file for making the replacable value comparable
|
||||
if [ -f "$FILE" ] && [ '---' != "$(head -1 < "$FILE")" ]; then
|
||||
echo -e "---\n$TLDR_SYNTAX\n$TLDR_TAGS\n$TLDR_SOURCE\n---\n$(cat "$FILE")" > "$FILE"
|
||||
fi
|
||||
|
||||
if [ -f "$TLDR_FILE" ] && [ '---' != "$(head -1 < "$TLDR_FILE")" ]; then
|
||||
echo -e "---\n$TLDR_SYNTAX\n$TLDR_TAGS\n$TLDR_SOURCE\n---\n$(cat "$TLDR_FILE")" > "$TLDR_FILE"
|
||||
replacable "$FILE" "$TLDR_FILE"
|
||||
override=$?
|
||||
if [ "$override" -ne 0 ]; then
|
||||
cp "$FILE" "$TLDR_FILE" && msg_run "Updated: $TLDR_FILE"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#
|
||||
# Shared bash functions and helpers
|
||||
# that can be sourced to other scripts.
|
||||
#
|
||||
|
||||
# Helper env variables. Use like this: VERBOSE=1 ./script.sh
|
||||
: "${VERBOSE:=0}"
|
||||
|
||||
# -- Colors -- #
|
||||
CLR_RED="\033[1;31m"
|
||||
@@ -202,6 +204,19 @@ function have
|
||||
command -v "$1" >&/dev/null
|
||||
}
|
||||
|
||||
# shorthand for checking if brew package is installed
|
||||
# usage: have_brew php && php -v
|
||||
function have_brew
|
||||
{
|
||||
! have brew && return 125
|
||||
|
||||
if brew list "$1" &> /dev/null; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Remove directory from the PATH variable
|
||||
# usage: path_remove ~/.local/bin
|
||||
function path_remove
|
||||
@@ -230,3 +245,52 @@ rnd()
|
||||
{
|
||||
echo $RANDOM | md5sum | head -c 20
|
||||
}
|
||||
|
||||
# return sha256sum for file
|
||||
# $1 - filename (string)
|
||||
function get_sha256sum()
|
||||
{
|
||||
sha256sum "$1" | head -c 64
|
||||
}
|
||||
|
||||
# Replacable file
|
||||
#
|
||||
# $1 - filename (string)
|
||||
# $2 - filename (string)
|
||||
#
|
||||
# Returns 1 when replacable, 0 when not replacable.
|
||||
function replacable()
|
||||
{
|
||||
FILE1="$1"
|
||||
FILE2="$2"
|
||||
|
||||
[[ ! -r "$FILE1" ]] && {
|
||||
[[ $VERBOSE -eq 1 ]] && msg_err "File 1 ($FILE1) does not exist"
|
||||
return 0
|
||||
}
|
||||
[[ ! -r "$FILE2" ]] && {
|
||||
[[ $VERBOSE -eq 1 ]] && msg_err "File 2 ($FILE2) does not exist, replacable"
|
||||
return 1
|
||||
}
|
||||
|
||||
FILE1_HASH=$(get_sha256sum "$FILE1")
|
||||
FILE2_HASH=$(get_sha256sum "$FILE2")
|
||||
|
||||
[[ $FILE1_HASH = "" ]] && {
|
||||
[[ $VERBOSE -eq 1 ]] && msg_err "Could not get hash for file 1 ($FILE1)"
|
||||
return 0
|
||||
}
|
||||
[[ $FILE2_HASH = "" ]] && {
|
||||
[[ $VERBOSE -eq 1 ]] && msg_err "Could not get hash for file 2 ($FILE2), replacable"
|
||||
return 1
|
||||
}
|
||||
|
||||
[[ "$FILE1_HASH" == "$FILE2_HASH" ]] && {
|
||||
[[ $VERBOSE -eq 1 ]] && msg_ok "Files match, not replacable: $FILE1"
|
||||
return 0
|
||||
}
|
||||
|
||||
[[ $VERBOSE -eq 1 ]] && msg_warn "Files do not match ($FILE1_HASH != $FILE2_HASH), replacable"
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
BIN
secrets/.gitkeep
Normal file
BIN
secrets/.gitkeep
Normal file
Binary file not shown.
12
ssh/config
12
ssh/config
@@ -1,11 +1,9 @@
|
||||
Host github.com
|
||||
User git
|
||||
|
||||
Host lakka
|
||||
User viir
|
||||
HostName lakka.kapsi.fi
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
Include shared.d/*
|
||||
Include local.d/*
|
||||
|
||||
Host *
|
||||
# IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
|
||||
# Fig ssh integration. Keep at the bottom of this file.
|
||||
Match all
|
||||
Include ~/.fig/ssh
|
||||
|
||||
0
ssh/local.d/.gitkeep
Normal file
0
ssh/local.d/.gitkeep
Normal file
3
ssh/shared.d/github
Normal file
3
ssh/shared.d/github
Normal file
@@ -0,0 +1,3 @@
|
||||
Host github.com
|
||||
User git
|
||||
|
||||
5
ssh/shared.d/lakka
Normal file
5
ssh/shared.d/lakka
Normal file
@@ -0,0 +1,5 @@
|
||||
Host lakka
|
||||
User viir
|
||||
HostName lakka.kapsi.fi
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
|
||||
Submodule tools/dotbot updated: da928a4c6b...b04a3f1844
@@ -4,6 +4,6 @@
|
||||
link:
|
||||
create: true
|
||||
relink: true
|
||||
exclude: [ "*.md", "*renovate*", "LICENSE" ]
|
||||
exclude: ["*.md", "*renovate*", "LICENSE"]
|
||||
shell:
|
||||
stdout: true
|
||||
|
||||
Reference in New Issue
Block a user