mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-27 23:41:05 +00:00
Compare commits
177 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f3f977100 | |||
| ab8e654c2a | |||
| 1a4113e3cd | |||
| b3445d7e7a | |||
| 50fc1ea279 | |||
| d61f53196d | |||
| 7769af68b5 | |||
| 05aa4ba092 | |||
| a26f160326 | |||
| 00de4a7b83 | |||
| 020012eb60 | |||
| cf92bc9a69 | |||
| 1c17ee28cb | |||
| 0919a9732e | |||
| 52a941f0fa | |||
| e661f6d942 | |||
| b5160bbbfa | |||
| 2df27d2a0e | |||
|
|
0c0f3823e4 | ||
|
|
5fb433f7ac | ||
| 0fc08678a2 | |||
| ff83bc9ef1 | |||
| 492cb4dbd8 | |||
| bc608cd578 | |||
| acae4fec73 | |||
| 446d8971e7 | |||
| 2f917c9285 | |||
| 1d851708eb | |||
|
|
c3d4b51927 | ||
| 6d8c04977c | |||
| 64fc8a13d3 | |||
| 73e6f8a321 | |||
| 68727e4869 | |||
| c10654c50a | |||
| 4de181e3b2 | |||
| 8eb0d2bcab | |||
| 3154fabe26 | |||
| fb9301c095 | |||
| 906487f939 | |||
| 11c0a05c84 | |||
| 1ced69d3d7 | |||
| 168194aa74 | |||
| 51afab44ef | |||
| 31e04ce865 | |||
| 6b76bc825c | |||
| 10994347aa | |||
| 76b2236c63 | |||
| 288e63c9d9 | |||
| eb7267736e | |||
| b1c9032c7d | |||
| 2a805cf3e3 | |||
| 32566d0004 | |||
| 9fb925b38c | |||
| 3af8d8b638 | |||
| 4bb434b795 | |||
| b38b887098 | |||
| a81c8e56a8 | |||
|
|
1ffa9dfc9d | ||
|
|
d45d1107fa | ||
| edd0c4cba0 | |||
| 103aa08664 | |||
|
|
b8ba7a0681 | ||
|
|
e1db55f113 | ||
|
|
d519af562a | ||
| 7493fd6401 | |||
| 217664ffc2 | |||
| 7998705d3b | |||
| 2f043d8b37 | |||
| a103fbddbe | |||
| b583b0be83 | |||
| 52323803dc | |||
| 2026b6adfe | |||
| bb4eb1f8c7 | |||
| daff9f957a | |||
| 91c8410eb0 | |||
| 68bb53435d | |||
|
|
cd5cea172a | ||
| 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 | |||
|
|
469044bb2a | ||
|
|
96a362474c | ||
|
|
1b9dfac671 | ||
|
|
7dbaf8204b | ||
|
|
415d7d9026 | ||
|
|
6734d3c1ab | ||
|
|
b20d08aa69 | ||
|
|
e4da7534f8 | ||
| b39f7ec598 | |||
|
|
0f8c1ef457 | ||
|
|
4b31ad9a7b | ||
| 4d60d15831 | |||
|
|
90125c7278 | ||
| 0035575f8b | |||
|
|
865c0aa33b | ||
|
|
5fe7bc3527 | ||
| 0d1b35ef09 | |||
|
|
bee0340493 | ||
| fbdc9c741a | |||
| 0ac0d05db6 | |||
| 1c432da880 | |||
|
|
7e0cc9ec43 | ||
|
|
8c4b6d2983 | ||
|
|
5b4cf1bb2f | ||
| c9edd4bf84 | |||
| 1023228ddc | |||
| 8f8851d08f | |||
| 2b06642e4b | |||
|
|
52cbebc0b3 | ||
| 2b64164f2b | |||
| 7c8fb993a2 | |||
|
|
e745583f07 |
@@ -19,7 +19,7 @@ indent_size = 1
|
||||
indent_size = 1
|
||||
indent_style = tab
|
||||
|
||||
[local/bin/*]
|
||||
[{local/bin/*,**/*.sh,**/zshrc}]
|
||||
shell_variant = bash # --language-variant
|
||||
binary_next_line = true
|
||||
switch_case_indent = true # --case-indent
|
||||
|
||||
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-nvim-astronvim.png
vendored
Normal file
BIN
.github/screenshots/tmux-nvim-astronvim.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 140 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 |
BIN
.github/screenshots/tmux-starship.png
vendored
Normal file
BIN
.github/screenshots/tmux-starship.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
7
.github/workflows/changelog.yml
vendored
7
.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
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- 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: |
|
||||
|
||||
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@@ -5,7 +5,7 @@ jobs:
|
||||
name: Linters
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: GitHub Actions
|
||||
uses: reviewdog/action-actionlint@v1
|
||||
with:
|
||||
|
||||
9
.github/workflows/new-release.yml
vendored
9
.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
|
||||
@@ -16,12 +12,10 @@ jobs:
|
||||
created: ${{ steps.daily-version.outputs.created }}
|
||||
version: ${{ steps.daily-version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3 # Checkout our working repository
|
||||
|
||||
- uses: actions/checkout@v4 # 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
|
||||
|
||||
8
.github/workflows/update-submodules.yml
vendored
8
.github/workflows/update-submodules.yml
vendored
@@ -1,29 +1,25 @@
|
||||
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
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
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)
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -4,9 +4,13 @@ Brewfile.lock.json
|
||||
*cache
|
||||
.idea
|
||||
.vscode
|
||||
config/fzf
|
||||
config/cheat/cheatsheets/pure-bash-bible/*
|
||||
config/cheat/cheatsheets/tldr/*
|
||||
config/git/credentials
|
||||
config/npm/npmrc
|
||||
config/zsh/.zcompdump
|
||||
ssh/local.d/*
|
||||
!ssh/local.d/.gitkeep
|
||||
!.gitkeep
|
||||
.env
|
||||
|
||||
|
||||
30
.gitmodules
vendored
30
.gitmodules
vendored
@@ -14,12 +14,6 @@
|
||||
url = https://gitlab.com/gnfzdz/dotbot-include.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "config/nvim"]
|
||||
path = config/nvim
|
||||
url = https://github.com/AstroNvim/AstroNvim.git
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
|
||||
[submodule "cheat-community"]
|
||||
path = config/cheat/cheatsheets/community
|
||||
url = https://github.com/cheat/cheatsheets.git
|
||||
@@ -29,3 +23,27 @@
|
||||
path = config/tmux/plugins/tpm
|
||||
url = https://github.com/tmux-plugins/tpm.git
|
||||
ignore = dirty
|
||||
[submodule "tmux/catppuccin"]
|
||||
path = config/tmux/plugins/tmux
|
||||
url = https://github.com/catppuccin/tmux.git
|
||||
[submodule "tmux/tmux-continuum"]
|
||||
path = config/tmux/plugins/tmux-continuum
|
||||
url = https://github.com/tmux-plugins/tmux-continuum
|
||||
[submodule "tmux/tmux-menus"]
|
||||
path = config/tmux/plugins/tmux-menus
|
||||
url = https://github.com/jaclu/tmux-menus.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-yank"]
|
||||
path = config/tmux/plugins/tmux-yank
|
||||
url = https://github.com/tmux-plugins/tmux-yank.git
|
||||
[submodule "tmux/tmux-window-name"]
|
||||
path = config/tmux/plugins/tmux-window-name
|
||||
url = https://github.com/ofirgall/tmux-window-name.git
|
||||
|
||||
6
.ignore
Normal file
6
.ignore
Normal file
@@ -0,0 +1,6 @@
|
||||
.git/**
|
||||
config/cheat/cheatsheets/community/**
|
||||
tools/dotbot/**
|
||||
tools/dotbot-brew/**
|
||||
tools/dotbot-include/**
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
config/cheat/cheatsheets/community/
|
||||
config/tmux/
|
||||
config/nvim/
|
||||
tools/
|
||||
|
||||
@@ -1 +1 @@
|
||||
3
|
||||
3.11
|
||||
|
||||
@@ -5,3 +5,22 @@
|
||||
external-sources=true
|
||||
includeAllWorkspaceSymbols=true
|
||||
|
||||
# SC2039: In POSIX sh, 'local' is undefined.
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2039
|
||||
disable=SC2039
|
||||
|
||||
# SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2166
|
||||
disable=SC2166
|
||||
|
||||
# SC2154: Variable is referenced but not assigned
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2154
|
||||
disable=SC2154
|
||||
|
||||
# SC1091: Not following <file>
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC1091
|
||||
disable=SC1091
|
||||
|
||||
# SC2174: When used with -p, -m only applies to the deepest directory.
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2174
|
||||
disable=SC2174
|
||||
|
||||
@@ -3,5 +3,8 @@ line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "None"
|
||||
call_parentheses = "Always"
|
||||
collapse_simple_statement = "Always"
|
||||
|
||||
[sort_requires]
|
||||
enabled = true
|
||||
|
||||
4
.yamlfmt
4
.yamlfmt
@@ -18,7 +18,5 @@ include:
|
||||
- ./**/*.{yml,yaml}
|
||||
|
||||
exclude:
|
||||
- ./dotbot/**
|
||||
- ./dotbot-*/**
|
||||
- ./config/astronvim/**
|
||||
- ./tools/**
|
||||
- ./config/nvim/**
|
||||
|
||||
94
README.md
94
README.md
@@ -1,94 +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
|
||||
|
||||
## 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
|
||||
|
||||
| Var | Default |
|
||||
| ------------------ | -------------------- |
|
||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` |
|
||||
| `$XDG_STATE_HOME` | `$HOME/.local/state` |
|
||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` |
|
||||
| `$XDG_BIN_HOME` | `$HOME/.local/bin` |
|
||||
|
||||
- `$XDG_BIN_HOME` is a custom `env` for `.local/bin` folder.
|
||||
- `$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
|
||||
|
||||
## Interesting links
|
||||
|
||||
### Interesting dotfiles repos
|
||||
|
||||
- [dotfiles.github.io/inspiration/](https://dotfiles.github.io/inspiration)
|
||||
- [frdmn/dotfiles](https://github.com/github.com/frdmn/dotfiles) - Ansible-based
|
||||
dotfile setup for macOS
|
||||
- [mvdan/dotfiles](https://github.com/mvdan/dotfiles) - Here be dragons
|
||||
- [vsouza/dotfiles](https://github.com/vsouza/dotfiles) - 🏡 My dotfiles
|
||||
- [freekmurze/dotfiles](https://github.com/freekmurze/dotfiles) - My personal dotfiles
|
||||
@@ -4,4 +4,23 @@ 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/tmux
|
||||
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-menus \
|
||||
-f https://github.com/jaclu/tmux-menus.git config/tmux/plugins/tmux-menus
|
||||
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-window-name \
|
||||
-f https://github.com/ofirgall/tmux-window-name.git config/tmux/plugins/tmux-window-name
|
||||
git submodule add --name tmux/tmux-yank \
|
||||
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
}
|
||||
13
base/bashrc
13
base/bashrc
@@ -7,12 +7,13 @@ export DOTFILES="$HOME/.dotfiles"
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
HOST="$(hostname -s)"
|
||||
# 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-$HOST" ] && source "$file-$HOST"
|
||||
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
@@ -20,4 +21,6 @@ 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
|
||||
# shellcheck source=../config/fzf/fzf.bash
|
||||
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] \
|
||||
&& source "${DOTFILES}/config/fzf/fzf.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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,3 @@ export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
alias php="php -d error_reporting=22527"
|
||||
|
||||
|
||||
24
base/vuerc
24
base/vuerc
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"useTaobaoRegistry": false,
|
||||
"presets": {
|
||||
"v2-router-vuex-scss-prettier": {
|
||||
"useConfigFiles": false,
|
||||
"plugins": {
|
||||
"@vue/cli-plugin-babel": {},
|
||||
"@vue/cli-plugin-router": {
|
||||
"historyMode": false
|
||||
},
|
||||
"@vue/cli-plugin-vuex": {},
|
||||
"@vue/cli-plugin-eslint": {
|
||||
"config": "prettier",
|
||||
"lintOn": [
|
||||
"save"
|
||||
]
|
||||
}
|
||||
},
|
||||
"vueVersion": "2",
|
||||
"cssPreprocessor": "dart-sass"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
59
base/zshrc
59
base/zshrc
@@ -1,37 +1,57 @@
|
||||
# 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
|
||||
|
||||
# Add completion scripts to zsh path
|
||||
fpath=(~/.config/zsh/completion $fpath)
|
||||
autoload -Uz compinit && compinit -i
|
||||
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
# shellcheck source=shared.sh
|
||||
# shellcheck source=scripts/shared.sh
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
export COMPLETION_WAITING_DOTS=true
|
||||
|
||||
# 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"
|
||||
HOST="$(hostname -s)"
|
||||
# global (exports|alias|functions) file for all hosts
|
||||
# shellcheck source=../config/exports
|
||||
[ -r "$file" ] && source "$file"
|
||||
# global secret file, git ignored
|
||||
# shellcheck source=../config/exports-secret
|
||||
[ -r "$file-secret" ] && source "$file-secret"
|
||||
# host specific (exports|alias|functions) file
|
||||
# shellcheck source=../config/exports
|
||||
[ -r "$file-$HOST" ] && source "$file-$HOST"
|
||||
# host specific (exports|alias|functions) file, git ignored
|
||||
# shellcheck source=../config/exports
|
||||
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
|
||||
# Import ssh keys in keychain
|
||||
ssh-add -A 2>/dev/null;
|
||||
export HISTFILE="$XDG_STATE_HOME"/zsh/history
|
||||
|
||||
autoload -U colors zsh/terminfo
|
||||
colors
|
||||
|
||||
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
|
||||
|
||||
if type brew &>/dev/null
|
||||
then
|
||||
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
|
||||
fi
|
||||
|
||||
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
||||
|
||||
# Try to load antigen, if present
|
||||
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||
# shellcheck source=../../.local/bin/antigen.zsh
|
||||
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||
|
||||
# antigen is present
|
||||
@@ -44,9 +64,10 @@ have antigen && {
|
||||
antigen apply
|
||||
}
|
||||
|
||||
# starship is present
|
||||
have starship && eval "$(starship init zsh)"
|
||||
# shellcheck source=../config/fzf/fzf.zsh
|
||||
[ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \
|
||||
&& source "${DOTFILES}/config/fzf/fzf.zsh"
|
||||
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
|
||||
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
||||
# Start starship
|
||||
eval "$(starship init 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
|
||||
310
config/alacritty/alacritty.yml
Normal file
310
config/alacritty/alacritty.yml
Normal file
@@ -0,0 +1,310 @@
|
||||
# Configuration for Alacritty, the GPU enhanced terminal emulator
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty it self.
|
||||
env:
|
||||
# TERM env customization.
|
||||
#
|
||||
# If this property is not set, alacritty will set it to xterm-256color.
|
||||
#
|
||||
# Note that some xterm terminfo databases don't declare support for italics.
|
||||
# You can verify this by checking for the presence of `smso` and `sitm` in
|
||||
# `infocmp xterm-256color`.
|
||||
TERM: xterm-256color
|
||||
|
||||
# Window dimensions in character columns and lines
|
||||
# (changes require restart)
|
||||
window:
|
||||
dimensions:
|
||||
columns: 130
|
||||
lines: 40
|
||||
|
||||
# Adds this many blank pixels of padding around the window
|
||||
# Units are physical pixels; this is not DPI aware.
|
||||
# (change requires restart)
|
||||
padding:
|
||||
x: 5
|
||||
y: 5
|
||||
|
||||
decorations: buttonless
|
||||
|
||||
opacity: 0.97
|
||||
|
||||
# When true, bold text is drawn using the bright variant of colors.
|
||||
draw_bold_text_with_bright_colors: true
|
||||
|
||||
# Font configuration (changes require restart)
|
||||
font:
|
||||
# The normal (roman) font face to use.
|
||||
normal:
|
||||
family: JetBrainsMono Nerd Font
|
||||
# Style can be specified to pick a specific face.
|
||||
# style: Regular
|
||||
|
||||
# The bold font face
|
||||
bold:
|
||||
family: JetBrainsMono Nerd Font
|
||||
# Style can be specified to pick a specific face.
|
||||
style: Bold
|
||||
|
||||
# The italic font face
|
||||
italic:
|
||||
family: JetBrainsMono Nerd Font
|
||||
# Style can be specified to pick a specific face.
|
||||
style: Italic
|
||||
|
||||
# Point size of the font
|
||||
size: 14.0
|
||||
|
||||
# Offset is the extra space around each character. offset.y can be thought of
|
||||
# as modifying the linespacing, and offset.x as modifying the letter spacing.
|
||||
offset:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
# Glyph offset determines the locations of the glyphs within their cells with
|
||||
# the default being at the bottom. Increase the x offset to move the glyph to
|
||||
# the right, increase the y offset to move the glyph upward.
|
||||
glyph_offset:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
# Should display the render timer
|
||||
debug.render_timer: false
|
||||
|
||||
# https://github.com/catppuccin/alacritty
|
||||
colors:
|
||||
primary:
|
||||
background: "#1E1E2E" # base
|
||||
foreground: "#CDD6F4" # text
|
||||
# Bright and dim foreground colors
|
||||
dim_foreground: "#CDD6F4" # text
|
||||
bright_foreground: "#CDD6F4" # text
|
||||
|
||||
# Cursor colors
|
||||
cursor:
|
||||
text: "#1E1E2E" # base
|
||||
cursor: "#F5E0DC" # rosewater
|
||||
vi_mode_cursor:
|
||||
text: "#1E1E2E" # base
|
||||
cursor: "#B4BEFE" # lavender
|
||||
|
||||
# Search colors
|
||||
search:
|
||||
matches:
|
||||
foreground: "#1E1E2E" # base
|
||||
background: "#A6ADC8" # subtext0
|
||||
focused_match:
|
||||
foreground: "#1E1E2E" # base
|
||||
background: "#A6E3A1" # green
|
||||
footer_bar:
|
||||
foreground: "#1E1E2E" # base
|
||||
background: "#A6ADC8" # subtext0
|
||||
|
||||
# Keyboard regex hints
|
||||
hints:
|
||||
start:
|
||||
foreground: "#1E1E2E" # base
|
||||
background: "#F9E2AF" # yellow
|
||||
end:
|
||||
foreground: "#1E1E2E" # base
|
||||
background: "#A6ADC8" # subtext0
|
||||
|
||||
# Selection colors
|
||||
selection:
|
||||
text: "#1E1E2E" # base
|
||||
background: "#F5E0DC" # rosewater
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: "#45475A" # surface1
|
||||
red: "#F38BA8" # red
|
||||
green: "#A6E3A1" # green
|
||||
yellow: "#F9E2AF" # yellow
|
||||
blue: "#89B4FA" # blue
|
||||
magenta: "#F5C2E7" # pink
|
||||
cyan: "#94E2D5" # teal
|
||||
white: "#BAC2DE" # subtext1
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: "#585B70" # surface2
|
||||
red: "#F38BA8" # red
|
||||
green: "#A6E3A1" # green
|
||||
yellow: "#F9E2AF" # yellow
|
||||
blue: "#89B4FA" # blue
|
||||
magenta: "#F5C2E7" # pink
|
||||
cyan: "#94E2D5" # teal
|
||||
white: "#A6ADC8" # subtext0
|
||||
|
||||
# Dim colors
|
||||
dim:
|
||||
black: "#45475A" # surface1
|
||||
red: "#F38BA8" # red
|
||||
green: "#A6E3A1" # green
|
||||
yellow: "#F9E2AF" # yellow
|
||||
blue: "#89B4FA" # blue
|
||||
magenta: "#F5C2E7" # pink
|
||||
cyan: "#94E2D5" # teal
|
||||
white: "#BAC2DE" # subtext1
|
||||
|
||||
indexed_colors:
|
||||
- { index: 16, color: "#FAB387" }
|
||||
- { index: 17, color: "#F5E0DC" }
|
||||
|
||||
# Visual Bell
|
||||
#
|
||||
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||
# rung, the terminal background will be set to white and transition back to the
|
||||
# default background color. You can control the rate of this transition by
|
||||
# setting the `duration` property (represented in milliseconds). You can also
|
||||
# configure the transition function by setting the `animation` property.
|
||||
#
|
||||
# Possible values for `animation`
|
||||
# `Ease`
|
||||
# `EaseOut`
|
||||
# `EaseOutSine`
|
||||
# `EaseOutQuad`
|
||||
# `EaseOutCubic`
|
||||
# `EaseOutQuart`
|
||||
# `EaseOutQuint`
|
||||
# `EaseOutExpo`
|
||||
# `EaseOutCirc`
|
||||
# `Linear`
|
||||
#
|
||||
# To completely disable the visual bell, set its duration to 0.
|
||||
#
|
||||
# visual_bell:
|
||||
# animation: EaseOutExpo
|
||||
# duration: 0
|
||||
|
||||
# Key bindings
|
||||
#
|
||||
# Each binding is defined as an object with some properties. Most of the
|
||||
# properties are optional. All of the alphabetical keys should have a letter for
|
||||
# the `key` value such as `V`. Function keys are probably what you would expect
|
||||
# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
|
||||
# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
|
||||
# etc. These all match the glutin::VirtualKeyCode variants.
|
||||
#
|
||||
# Possible values for `mods`
|
||||
# `Command`, `Super` refer to the super/command/windows key
|
||||
# `Control` for the control key
|
||||
# `Shift` for the Shift key
|
||||
# `Alt` and `Option` refer to alt/option
|
||||
#
|
||||
# mods may be combined with a `|`. For example, requiring control and shift
|
||||
# looks like:
|
||||
#
|
||||
# mods: Control|Shift
|
||||
#
|
||||
# The parser is currently quite sensitive to whitespace and capitalization -
|
||||
# capitalization must match exactly, and piped items must not have whitespace
|
||||
# around them.
|
||||
#
|
||||
# Either an `action`, `chars`, or `command` field must be present.
|
||||
# `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`.
|
||||
# `chars` writes the specified string every time that binding is activated.
|
||||
# These should generally be escape sequences, but they can be configured to
|
||||
# send arbitrary strings of bytes.
|
||||
# `command` must be a map containing a `program` string, and `args` array of
|
||||
# strings. For example:
|
||||
# - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } }
|
||||
key_bindings:
|
||||
- { key: V, mods: Command, action: Paste }
|
||||
- { key: C, mods: Command, action: Copy }
|
||||
- { key: Q, mods: Command, action: Quit }
|
||||
- { key: W, mods: Command, action: Quit }
|
||||
- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
- { key: Home, chars: "\eOH", mode: AppCursor }
|
||||
- { key: Home, chars: "\e[1~", mode: ~AppCursor }
|
||||
- { key: End, chars: "\eOF", mode: AppCursor }
|
||||
- { key: End, chars: "\e[4~", mode: ~AppCursor }
|
||||
- { key: PageUp, mods: Shift, chars: "\e[5;2~" }
|
||||
- { key: PageUp, mods: Control, chars: "\e[5;5~" }
|
||||
- { key: PageUp, chars: "\e[5~" }
|
||||
- { key: PageDown, mods: Shift, chars: "\e[6;2~" }
|
||||
- { key: PageDown, mods: Control, chars: "\e[6;5~" }
|
||||
- { key: PageDown, chars: "\e[6~" }
|
||||
- { key: Left, mods: Shift, chars: "\e[1;2D" }
|
||||
- { key: Left, mods: Control, chars: "\e[1;5D" }
|
||||
- { key: Left, mods: Alt, chars: "\e[1;3D" }
|
||||
- { key: Left, chars: "\e[D", mode: ~AppCursor }
|
||||
- { key: Left, chars: "\eOD", mode: AppCursor }
|
||||
- { key: Right, mods: Shift, chars: "\e[1;2C" }
|
||||
- { key: Right, mods: Control, chars: "\e[1;5C" }
|
||||
- { key: Right, mods: Alt, chars: "\e[1;3C" }
|
||||
- { key: Right, chars: "\e[C", mode: ~AppCursor }
|
||||
- { key: Right, chars: "\eOC", mode: AppCursor }
|
||||
- { key: Up, mods: Shift, chars: "\e[1;2A" }
|
||||
- { key: Up, mods: Control, chars: "\e[1;5A" }
|
||||
- { key: Up, mods: Alt, chars: "\e[1;3A" }
|
||||
- { key: Up, chars: "\e[A", mode: ~AppCursor }
|
||||
- { key: Up, chars: "\eOA", mode: AppCursor }
|
||||
- { key: Down, mods: Shift, chars: "\e[1;2B" }
|
||||
- { key: Down, mods: Control, chars: "\e[1;5B" }
|
||||
- { key: Down, mods: Alt, chars: "\e[1;3B" }
|
||||
- { key: Down, chars: "\e[B", mode: ~AppCursor }
|
||||
- { key: Down, chars: "\eOB", mode: AppCursor }
|
||||
- { key: Tab, mods: Shift, chars: "\e[Z" }
|
||||
- { key: F1, chars: "\eOP" }
|
||||
- { key: F2, chars: "\eOQ" }
|
||||
- { key: F3, chars: "\eOR" }
|
||||
- { key: F4, chars: "\eOS" }
|
||||
- { key: F5, chars: "\e[15~" }
|
||||
- { key: F6, chars: "\e[17~" }
|
||||
- { key: F7, chars: "\e[18~" }
|
||||
- { key: F8, chars: "\e[19~" }
|
||||
- { key: F9, chars: "\e[20~" }
|
||||
- { key: F10, chars: "\e[21~" }
|
||||
- { key: F11, chars: "\e[23~" }
|
||||
- { key: F12, chars: "\e[24~" }
|
||||
- { key: Back, chars: "" }
|
||||
- { key: Back, mods: Alt, chars: "\e" }
|
||||
- { key: Insert, chars: "\e[2~" }
|
||||
- { key: Delete, chars: "\e[3~" }
|
||||
|
||||
# shortcuts for tmux. the leader key is control-b (0x02)
|
||||
- { key: W, mods: Command, chars: "\x02&" } # close tab (kill)
|
||||
- { key: T, mods: Command, chars: "\x02c" } # new tab
|
||||
- { key: RBracket, mods: Command|Shift, chars: "\x02n" } # select next tab
|
||||
- { key: LBracket, mods: Command|Shift, chars: "\x02p" } # select previous tab
|
||||
- { key: RBracket, mods: Command, chars: "\x02o" } # select next pane
|
||||
- { key: LBracket, mods: Command, chars: "\x02;" } # select last (previously used) pane
|
||||
- { key: F, mods: Command, chars: "\x02/" } # search (upwards) (see tmux.conf)
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
|
||||
# be specified.
|
||||
#
|
||||
# Values for `mouse`:
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# Values for `action`:
|
||||
# - Paste
|
||||
# - PasteSelection
|
||||
# - Copy (TODO)
|
||||
mouse_bindings:
|
||||
- { mouse: Middle, action: PasteSelection }
|
||||
|
||||
mouse:
|
||||
double_click: { threshold: 300 }
|
||||
triple_click: { threshold: 300 }
|
||||
|
||||
selection:
|
||||
semantic_escape_chars: ',│`|:"'' ()[]{}<>'
|
||||
|
||||
# Shell
|
||||
#
|
||||
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
|
||||
# Entries in shell.args are passed unmodified as arguments to the shell.
|
||||
#
|
||||
#shell:
|
||||
# program: /bin/bash
|
||||
# args:
|
||||
# - --login
|
||||
@@ -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"
|
||||
|
||||
4
config/alias-tunkki
Executable file
4
config/alias-tunkki
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Setting aliases for tunkki
|
||||
|
||||
alias nvim="/snap/nvim/current/usr/bin/nvim"
|
||||
@@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -1,3 +0,0 @@
|
||||
return { -- a table of overrides/changes to the duskfox theme
|
||||
Normal = { bg = "#000000" },
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
return { -- this table overrides highlights in all themes
|
||||
-- Normal = { bg = "#000000" },
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
return {
|
||||
-- Configure AstroNvim updates
|
||||
updater = {
|
||||
remote = "origin", -- remote to use
|
||||
channel = "stable", -- "stable" or "nightly"
|
||||
version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY)
|
||||
branch = "nightly", -- branch name (NIGHTLY ONLY)
|
||||
commit = nil, -- commit hash (NIGHTLY ONLY)
|
||||
pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only)
|
||||
skip_prompts = false, -- skip prompts about breaking changes
|
||||
show_changelog = true, -- show the changelog after performing an update
|
||||
auto_quit = true, -- automatically quit the current session after a successful update
|
||||
remotes = { -- easily add new remotes to track
|
||||
-- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url
|
||||
-- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut,
|
||||
-- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork
|
||||
},
|
||||
},
|
||||
-- Set colorscheme to use
|
||||
colorscheme = "catppuccin", -- or astrondark
|
||||
-- Diagnostics configuration (for vim.diagnostics.config({...}))
|
||||
-- when diagnostics are on
|
||||
diagnostics = {
|
||||
virtual_text = false,
|
||||
underline = true,
|
||||
},
|
||||
lsp = {
|
||||
-- customize lsp formatting options
|
||||
formatting = {
|
||||
-- control auto formatting on save
|
||||
format_on_save = {
|
||||
-- enable or disable format on save globally
|
||||
enabled = true,
|
||||
-- enable format on save for specified filetypes only
|
||||
allow_filetypes = {
|
||||
-- "go",
|
||||
},
|
||||
-- disable format on save for specified filetypes
|
||||
ignore_filetypes = {
|
||||
-- "python",
|
||||
},
|
||||
},
|
||||
-- disable formatting capabilities for the listed language servers
|
||||
disabled = {
|
||||
-- "sumneko_lua",
|
||||
},
|
||||
-- default format timeout
|
||||
timeout_ms = 1000,
|
||||
-- -- fully override the default formatting function
|
||||
-- filter = function(client) -- fully override the default formatting function
|
||||
-- return true
|
||||
-- end
|
||||
},
|
||||
-- enable servers that you already have installed without mason
|
||||
servers = {
|
||||
-- "pyright"
|
||||
},
|
||||
},
|
||||
-- Configure require("lazy").setup() options
|
||||
lazy = {
|
||||
defaults = { lazy = true },
|
||||
performance = {
|
||||
rtp = {
|
||||
-- customize default disabled vim plugins
|
||||
disabled_plugins = {
|
||||
"tohtml",
|
||||
"gzip",
|
||||
"matchit",
|
||||
"zipPlugin",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
"matchparen",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- This function is run last and is a good place to configuring
|
||||
-- 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()
|
||||
-- Set up custom filetypes
|
||||
-- vim.filetype.add {
|
||||
-- extension = {
|
||||
-- foo = "fooscript",
|
||||
-- },
|
||||
-- filename = {
|
||||
-- ["Foofile"] = "fooscript",
|
||||
-- },
|
||||
-- pattern = {
|
||||
-- ["~/%.config/foo/.*"] = "fooscript",
|
||||
-- },
|
||||
-- }
|
||||
end,
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
-- Mapping data with "desc" stored directly by vim.keymap.set().
|
||||
--
|
||||
-- Please use this mappings table to set keyboard mapping since this is the
|
||||
-- lower level configuration and more robust one. (which-key will
|
||||
-- automatically pick-up stored data by this setting.)
|
||||
return {
|
||||
-- first key is the mode
|
||||
n = {
|
||||
-- second key is the lefthand side of the map
|
||||
-- mappings seen under group name "Buffer"
|
||||
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
|
||||
["<leader>bD"] = {
|
||||
function()
|
||||
require("astronvim.utils.status").heirline.buffer_picker(
|
||||
function(bufnr) require("astronvim.utils.buffer").close(bufnr) end
|
||||
)
|
||||
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
|
||||
["<leader>b"] = { name = "Buffers" },
|
||||
-- quick save
|
||||
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
||||
},
|
||||
t = {
|
||||
-- setting a mapping to false will disable it
|
||||
-- ["<esc>"] = false,
|
||||
},
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
-- set vim options here (vim.<first_key>.<second_key> = value)
|
||||
return {
|
||||
opt = {
|
||||
-- set to true or false etc.
|
||||
relativenumber = true, -- sets vim.opt.relativenumber
|
||||
number = true, -- sets vim.opt.number
|
||||
spell = false, -- sets vim.opt.spell
|
||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||
wrap = true, -- sets vim.opt.wrap
|
||||
},
|
||||
g = {
|
||||
-- sets vim.g.mapleader
|
||||
mapleader = " ",
|
||||
-- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
|
||||
autoformat_enabled = true,
|
||||
-- enable completion at start
|
||||
cmp_enabled = true,
|
||||
-- enable autopairs at start
|
||||
autopairs_enabled = true,
|
||||
-- set the visibility of diagnostics in the UI
|
||||
-- (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
|
||||
diagnostics_mode = 3,
|
||||
-- disable icons in the UI (disable if no nerd font is available,
|
||||
-- requires :PackerSync after changing)
|
||||
icons_enabled = true,
|
||||
-- disable notifications when toggling UI elements
|
||||
ui_notifications_enabled = true,
|
||||
},
|
||||
}
|
||||
-- If you need more control, you can use the function()...end notation
|
||||
-- return function(local_vim)
|
||||
-- local_vim.opt.relativenumber = true
|
||||
-- local_vim.g.mapleader = " "
|
||||
-- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list
|
||||
-- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list
|
||||
--
|
||||
-- return local_vim
|
||||
-- end
|
||||
@@ -1,49 +0,0 @@
|
||||
return { -- Add the community repository of plugin specifications
|
||||
"AstroNvim/astrocommunity", -- example of imporing a plugin, comment out to use it or add your own
|
||||
-- available plugins can be found at
|
||||
-- https://github.com/AstroNvim/astrocommunity
|
||||
{
|
||||
import = "astrocommunity.colorscheme.catppuccin",
|
||||
opts = {
|
||||
flavour = "mocha",
|
||||
transparent_background = true,
|
||||
dim_inactive = {
|
||||
enabled = true,
|
||||
shade = "dark",
|
||||
percentage = 0.15,
|
||||
},
|
||||
}
|
||||
},
|
||||
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
|
||||
{ import = "astrocommunity.bars-and-lines.smartcolumn-nvim" },
|
||||
{
|
||||
"m4xshen/smartcolumn.nvim",
|
||||
opts = {
|
||||
colorcolumn = { "80", "100", "120" },
|
||||
disabled_filetypes = { "help", "text", "markdown", "json" },
|
||||
},
|
||||
},
|
||||
{ import = "astrocommunity.diagnostics.trouble-nvim" },
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
opts = {
|
||||
auto_open = false,
|
||||
position = "right"
|
||||
}
|
||||
},
|
||||
{ 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.motion.harpoon" },
|
||||
{ import = "astrocommunity.pack.php" },
|
||||
{ import = "astrocommunity.project.neoconf-nvim" },
|
||||
{ import = "astrocommunity.project.nvim-spectre" },
|
||||
{ import = "astrocommunity.project.project-nvim" },
|
||||
{ import = "astrocommunity.test.neotest" },
|
||||
{ import = "astrocommunity.utility.neodim" },
|
||||
{ import = "astrocommunity.utility.transparent-nvim" },
|
||||
}
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
return {
|
||||
-- customize alpha options
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
opts = function(_, opts)
|
||||
-- customize the dashboard header
|
||||
opts.section.header.val = {
|
||||
"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░",
|
||||
"░░░░░░░░░░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄░░░░░░░░░",
|
||||
"░░░░░░░░▄▀░░░░░░░░░░░░▄░░░░░░░▀▄░░░░░░░",
|
||||
"░░░░░░░░█░░▄░░░░▄░░░░░░░░░░░░░░█░░░░░░░",
|
||||
"░░░░░░░░█░░░░░░░░░░░░▄█▄▄░░▄░░░█░▄▄▄░░░",
|
||||
"░▄▄▄▄▄░░█░░░░░░▀░░░░▀█░░▀▄░░░░░█▀▀░██░░",
|
||||
"░██▄▀██▄█░░░▄░░░░░░░██░░░░▀▀▀▀▀░░░░██░░",
|
||||
"░░▀██▄▀██░░░░░░░░▀░██▀░░░░░░░░░░░░░▀██░",
|
||||
"░░░░▀████░▀░░░░▄░░░██░░░▄█░░░░▄░▄█░░██░",
|
||||
"░░░░░░░▀█░░░░▄░░░░░██░░░░▄░░░▄░░▄░░░██░",
|
||||
"░░░░░░░▄█▄░░░░░░░░░░░▀▄░░▀▀▀▀▀▀▀▀░░▄▀░░",
|
||||
"░░░░░░█▀▀█████████▀▀▀▀████████████▀░░░░",
|
||||
"░░░░░░████▀░░███▀░░░░░░▀███░░▀██▀░░░░░░",
|
||||
"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
|
||||
}
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
-- You can disable default plugins as follows:
|
||||
-- { "max397574/better-escape.nvim", enabled = false },
|
||||
--
|
||||
-- You can also easily customize additional setup of plugins
|
||||
-- that is outside of the plugin's setup call
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function(plugin, opts)
|
||||
-- include the default astronvim config that calls the setup call
|
||||
require "plugins.configs.luasnip" (plugin, opts)
|
||||
-- add more custom luasnip configuration such
|
||||
-- as filetype extend or custom snippets
|
||||
local luasnip = require "luasnip"
|
||||
luasnip.filetype_extend("javascript", { "javascriptreact" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
opts = function(_, opts)
|
||||
require "plugins.neo-tree"
|
||||
opts.filesystem.filtered_items = {
|
||||
visible = false,
|
||||
show_hidden_count = true,
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = true,
|
||||
hide_by_name = {
|
||||
},
|
||||
never_show = {
|
||||
'.git',
|
||||
'.DS_Store',
|
||||
'thumbs.db'
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- "windwp/nvim-autopairs",
|
||||
-- config = function(plugin, opts)
|
||||
-- -- include the default astronvim config that calls the setup call
|
||||
-- require "plugins.configs.nvim-autopairs"(plugin, opts)
|
||||
-- -- add more custom autopairs configuration such as custom rules
|
||||
-- local npairs = require "nvim-autopairs"
|
||||
-- local Rule = require "nvim-autopairs.rule"
|
||||
-- local cond = require "nvim-autopairs.conds"
|
||||
-- npairs.add_rules(
|
||||
-- {
|
||||
-- Rule("$", "$", { "tex", "latex" })
|
||||
-- -- don't add a pair if the next character is %
|
||||
-- :with_pair(cond.not_after_regex "%%")
|
||||
-- -- don't add a pair if the previous character is xxx
|
||||
-- :with_pair(
|
||||
-- cond.not_before_regex("xxx", 3)
|
||||
-- )
|
||||
-- -- don't move right when repeat character
|
||||
-- :with_move(cond.none())
|
||||
-- -- don't delete if the next character is xx
|
||||
-- :with_del(cond.not_after_regex "xx")
|
||||
-- -- disable adding a newline when you press <cr>
|
||||
-- :with_cr(cond.none()),
|
||||
-- },
|
||||
-- -- disable for .vim files, but it work for another filetypes
|
||||
-- Rule("a", "a", "-vim")
|
||||
-- )
|
||||
-- end,
|
||||
-- },
|
||||
-- By adding to the which-key config and using our helper
|
||||
-- function you can add more which-key registered bindings
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
config = function(plugin, opts)
|
||||
-- include the default astronvim config that calls the setup call
|
||||
require "plugins.configs.which-key" (plugin, opts)
|
||||
-- Add bindings which show up as group name
|
||||
local wk = require "which-key"
|
||||
wk.register({
|
||||
b = { name = "Buffer" },
|
||||
}, { mode = "n", prefix = "<leader>" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
-- customize mason plugins
|
||||
return { -- use mason-lspconfig to configure LSP installations
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- overrides `require("mason-lspconfig").setup(...)`
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"diagnosticls",
|
||||
},
|
||||
},
|
||||
}, -- 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,
|
||||
},
|
||||
},
|
||||
{
|
||||
"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" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
return {
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
opts = function(_, config)
|
||||
-- config variable is the default configuration table for the setup function call
|
||||
local null_ls = require "null-ls"
|
||||
|
||||
-- Check supported formatters and linters
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
config.sources = {
|
||||
-- Set a formatter
|
||||
null_ls.builtins.code_actions.eslint,
|
||||
null_ls.builtins.code_actions.refactoring,
|
||||
null_ls.builtins.code_actions.shellcheck,
|
||||
null_ls.builtins.diagnostics.actionlint,
|
||||
null_ls.builtins.diagnostics.alex,
|
||||
null_ls.builtins.diagnostics.ansiblelint,
|
||||
null_ls.builtins.diagnostics.dotenv_linter,
|
||||
null_ls.builtins.diagnostics.editorconfig_checker,
|
||||
null_ls.builtins.diagnostics.eslint,
|
||||
null_ls.builtins.diagnostics.jsonlint,
|
||||
null_ls.builtins.diagnostics.luacheck,
|
||||
null_ls.builtins.diagnostics.php,
|
||||
null_ls.builtins.diagnostics.phpcs,
|
||||
null_ls.builtins.diagnostics.phpstan,
|
||||
null_ls.builtins.diagnostics.psalm,
|
||||
null_ls.builtins.diagnostics.semgrep,
|
||||
null_ls.builtins.diagnostics.shellcheck,
|
||||
null_ls.builtins.diagnostics.stylelint,
|
||||
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,
|
||||
null_ls.builtins.formatting.phpcsfixer,
|
||||
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,33 +0,0 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cmake",
|
||||
"comment",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"gitignore",
|
||||
"graphql",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"json5",
|
||||
"latex",
|
||||
"lua",
|
||||
"markdown",
|
||||
"php",
|
||||
"phpdoc",
|
||||
"python",
|
||||
"scss",
|
||||
"terraform",
|
||||
"todotxt",
|
||||
"toml",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
return {
|
||||
-- You can also add new plugins here as well:
|
||||
-- Add plugins, the lazy syntax
|
||||
"andweeb/presence.nvim",
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "BufRead",
|
||||
config = function() require("lsp_signature").setup() end,
|
||||
},
|
||||
{
|
||||
"wakatime/vim-wakatime",
|
||||
lazy = false,
|
||||
enabled = true,
|
||||
},
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=zsh
|
||||
# shellcheck shell=bash
|
||||
# vim: filetype=zsh
|
||||
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
@@ -17,24 +17,15 @@ export XDG_BIN_HOME="$HOME/.local/bin"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_RUNTIME_DIR="$HOME/.local/run"
|
||||
|
||||
# Homebrew configuration
|
||||
export HOMEBREW="/opt/homebrew"
|
||||
export HOMEBREW_BIN="$HOMEBREW/bin"
|
||||
export HOMEBREW_SBIN="$HOMEBREW/sbin"
|
||||
export HOMEBREW_PKG="$HOMEBREW/opt"
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
path_append "/opt/homebrew/bin"
|
||||
have brew && eval "$(brew shellenv)"
|
||||
|
||||
path_append "/usr/local/bin"
|
||||
path_prepend "$HOMEBREW_SBIN"
|
||||
path_prepend "$HOMEBREW_BIN"
|
||||
path_prepend "$XDG_BIN_HOME"
|
||||
path_append "$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,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# shellcheck enable=external-sources
|
||||
# shellcheck disable=1091
|
||||
# shellcheck disable=1091,2139
|
||||
# vim: filetype=zsh
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
# Antigen configuration
|
||||
@@ -13,34 +14,36 @@ 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"
|
||||
}
|
||||
|
||||
export ANDROID_HOME="$XDG_DATA_HOME/android"
|
||||
|
||||
export HOMEBREW_NO_ENV_HINTS=true
|
||||
|
||||
# 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 && {
|
||||
@@ -49,20 +52,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 && {
|
||||
@@ -73,10 +68,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
|
||||
@@ -86,6 +79,8 @@ export NVM_DIR="$XDG_CONFIG_HOME/nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||
|
||||
# Add npm packages to path
|
||||
have node && {
|
||||
NVM_NODE_BIN_DIR="$(dirname "$(which node)")"
|
||||
@@ -93,22 +88,52 @@ 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_DATA_HOME/cargo"
|
||||
path_append "$CARGO_HOME/bin"
|
||||
|
||||
# screen
|
||||
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
|
||||
|
||||
# sonarlint
|
||||
export SONARLINT_USER_HOME="$XDG_DATA_HOME/sonarlint"
|
||||
|
||||
# tldr / tealdeer
|
||||
export TEALDEER_CONFIG_DIR="$XDG_CONFIG_HOME/tealdeer/"
|
||||
|
||||
# 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"
|
||||
@@ -118,9 +143,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
|
||||
|
||||
7
config/exports-lakka
Normal file
7
config/exports-lakka
Normal file
@@ -0,0 +1,7 @@
|
||||
# lakka exports
|
||||
|
||||
## LUA
|
||||
have luarocks && $(luarocks path --bin)
|
||||
|
||||
path_append "$HOME/.local/go/bin"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# shellcheck shell=bash
|
||||
# shellcheck disable=1091,2046
|
||||
# vim: filetype=zsh
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
export LC_ALL=fi_FI.UTF-8
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# shell functions
|
||||
#
|
||||
# shellcheck source="../scripts/shared.sh"
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
# Weather in Tampere, or other city
|
||||
@@ -19,22 +20,16 @@ ssh-docker()
|
||||
docker exec -it "$@" bash
|
||||
}
|
||||
|
||||
# Create a new directory and enter it
|
||||
mkd()
|
||||
{
|
||||
mkdir -p "$@" && cd "$@" || exit
|
||||
}
|
||||
|
||||
# All the dig info
|
||||
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}" \
|
||||
@@ -63,32 +58,24 @@ scheduler()
|
||||
done
|
||||
}
|
||||
|
||||
silent()
|
||||
{
|
||||
"$@" >&/dev/null
|
||||
}
|
||||
|
||||
ask()
|
||||
{
|
||||
while true; do
|
||||
read -p "$1 ([y]/n) " -r
|
||||
REPLY=${REPLY:-"y"}
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
return 1
|
||||
elif [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Defines default antigen bundles
|
||||
x-default-antigen-bundles()
|
||||
{
|
||||
export ZSH_TMUX_AUTOSTART=false
|
||||
export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf"
|
||||
export ZSH_TMUX_UNICODE=true
|
||||
export ZSH_TMUX_AUTOQUIT=false
|
||||
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
|
||||
|
||||
# Add keychain to ssh-agent args when on macOS
|
||||
have brew && zstyle :omz:plugins:ssh-agent ssh-add-args --apple-load-keychain
|
||||
|
||||
# these should be always available
|
||||
antigen bundle tmux
|
||||
antigen bundle colored-man-pages
|
||||
antigen bundle command-not-found
|
||||
antigen bundle ssh-agent
|
||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||
# antigen bundle MichaelAquilina/zsh-you-should-use
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
@@ -96,11 +83,8 @@ x-default-antigen-bundles()
|
||||
|
||||
# these should be available if there's need
|
||||
have brew && antigen bundle brew
|
||||
have docker && antigen bundle docker
|
||||
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 nvm
|
||||
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
|
||||
|
||||
382
config/fzf/completion.bash
Executable file
382
config/fzf/completion.bash
Executable file
@@ -0,0 +1,382 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ completion.bash
|
||||
#
|
||||
# - $FZF_TMUX (default: 0)
|
||||
# - $FZF_TMUX_OPTS (default: empty)
|
||||
# - $FZF_COMPLETION_TRIGGER (default: '**')
|
||||
# - $FZF_COMPLETION_OPTS (default: empty)
|
||||
|
||||
if [[ $- =~ i ]]; then
|
||||
|
||||
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
|
||||
if ! declare -f _fzf_compgen_path > /dev/null; then
|
||||
_fzf_compgen_path() {
|
||||
echo "$1"
|
||||
command find -L "$1" \
|
||||
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
|
||||
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
|
||||
}
|
||||
fi
|
||||
|
||||
if ! declare -f _fzf_compgen_dir > /dev/null; then
|
||||
_fzf_compgen_dir() {
|
||||
command find -L "$1" \
|
||||
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
|
||||
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
|
||||
}
|
||||
fi
|
||||
|
||||
###########################################################
|
||||
|
||||
# To redraw line after fzf closes (printf '\e[5n')
|
||||
bind '"\e[0n": redraw-current-line' 2> /dev/null
|
||||
|
||||
__fzf_comprun() {
|
||||
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
|
||||
_fzf_comprun "$@"
|
||||
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then
|
||||
shift
|
||||
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
|
||||
else
|
||||
shift
|
||||
fzf "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
__fzf_orig_completion() {
|
||||
local l comp f cmd
|
||||
while read -r l; do
|
||||
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
|
||||
comp="${BASH_REMATCH[1]}"
|
||||
f="${BASH_REMATCH[2]}"
|
||||
cmd="${BASH_REMATCH[3]}"
|
||||
[[ "$f" = _fzf_* ]] && continue
|
||||
printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}"
|
||||
if [[ "$l" = *" -o nospace "* ]] && [[ ! "${__fzf_nospace_commands-}" = *" $cmd "* ]]; then
|
||||
__fzf_nospace_commands="${__fzf_nospace_commands-} $cmd "
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
_fzf_opts_completion() {
|
||||
local cur prev opts
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts="
|
||||
-x --extended
|
||||
-e --exact
|
||||
--algo
|
||||
-i +i
|
||||
-n --nth
|
||||
--with-nth
|
||||
-d --delimiter
|
||||
+s --no-sort
|
||||
--tac
|
||||
--tiebreak
|
||||
-m --multi
|
||||
--no-mouse
|
||||
--bind
|
||||
--cycle
|
||||
--no-hscroll
|
||||
--jump-labels
|
||||
--height
|
||||
--literal
|
||||
--reverse
|
||||
--margin
|
||||
--inline-info
|
||||
--prompt
|
||||
--pointer
|
||||
--marker
|
||||
--header
|
||||
--header-lines
|
||||
--ansi
|
||||
--tabstop
|
||||
--color
|
||||
--no-bold
|
||||
--history
|
||||
--history-size
|
||||
--preview
|
||||
--preview-window
|
||||
-q --query
|
||||
-1 --select-1
|
||||
-0 --exit-0
|
||||
-f --filter
|
||||
--print-query
|
||||
--expect
|
||||
--sync"
|
||||
|
||||
case "${prev}" in
|
||||
--tiebreak)
|
||||
COMPREPLY=( $(compgen -W "length begin end index" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
--color)
|
||||
COMPREPLY=( $(compgen -W "dark light 16 bw" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
--history)
|
||||
COMPREPLY=()
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cur" =~ ^-|\+ ]]; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
_fzf_handle_dynamic_completion() {
|
||||
local cmd orig_var orig ret orig_cmd orig_complete
|
||||
cmd="$1"
|
||||
shift
|
||||
orig_cmd="$1"
|
||||
orig_var="_fzf_orig_completion_$cmd"
|
||||
orig="${!orig_var-}"
|
||||
orig="${orig##*#}"
|
||||
if [[ -n "$orig" ]] && type "$orig" > /dev/null 2>&1; then
|
||||
$orig "$@"
|
||||
elif [[ -n "${_fzf_completion_loader-}" ]]; then
|
||||
orig_complete=$(complete -p "$orig_cmd" 2> /dev/null)
|
||||
_completion_loader "$@"
|
||||
ret=$?
|
||||
# _completion_loader may not have updated completion for the command
|
||||
if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then
|
||||
__fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
|
||||
if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then
|
||||
eval "${orig_complete/ -F / -o nospace -F }"
|
||||
else
|
||||
eval "$orig_complete"
|
||||
fi
|
||||
fi
|
||||
return $ret
|
||||
fi
|
||||
}
|
||||
|
||||
__fzf_generic_path_completion() {
|
||||
local cur base dir leftover matches trigger cmd
|
||||
cmd="${COMP_WORDS[0]}"
|
||||
if [[ $cmd == \\* ]]; then
|
||||
cmd="${cmd:1}"
|
||||
fi
|
||||
cmd="${cmd//[^A-Za-z0-9_=]/_}"
|
||||
COMPREPLY=()
|
||||
trigger=${FZF_COMPLETION_TRIGGER-'**'}
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
if [[ "$cur" == *"$trigger" ]]; then
|
||||
base=${cur:0:${#cur}-${#trigger}}
|
||||
eval "base=$base"
|
||||
|
||||
dir=
|
||||
[[ $base = *"/"* ]] && dir="$base"
|
||||
while true; do
|
||||
if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then
|
||||
leftover=${base/#"$dir"}
|
||||
leftover=${leftover/#\/}
|
||||
[[ -z "$dir" ]] && dir='.'
|
||||
[[ "$dir" != "/" ]] && dir="${dir/%\//}"
|
||||
matches=$(eval "$1 $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $2" __fzf_comprun "$4" -q "$leftover" | while read -r item; do
|
||||
printf "%q " "${item%$3}$3"
|
||||
done)
|
||||
matches=${matches% }
|
||||
[[ -z "$3" ]] && [[ "${__fzf_nospace_commands-}" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches "
|
||||
if [[ -n "$matches" ]]; then
|
||||
COMPREPLY=( "$matches" )
|
||||
else
|
||||
COMPREPLY=( "$cur" )
|
||||
fi
|
||||
printf '\e[5n'
|
||||
return 0
|
||||
fi
|
||||
dir=$(dirname "$dir")
|
||||
[[ "$dir" =~ /$ ]] || dir="$dir"/
|
||||
done
|
||||
else
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
_fzf_handle_dynamic_completion "$cmd" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
_fzf_complete() {
|
||||
# Split arguments around --
|
||||
local args rest str_arg i sep
|
||||
args=("$@")
|
||||
sep=
|
||||
for i in "${!args[@]}"; do
|
||||
if [[ "${args[$i]}" = -- ]]; then
|
||||
sep=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -n "$sep" ]]; then
|
||||
str_arg=
|
||||
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
|
||||
args=("${args[@]:0:$sep}")
|
||||
else
|
||||
str_arg=$1
|
||||
args=()
|
||||
shift
|
||||
rest=("$@")
|
||||
fi
|
||||
|
||||
local cur selected trigger cmd post
|
||||
post="$(caller 0 | awk '{print $2}')_post"
|
||||
type -t "$post" > /dev/null 2>&1 || post=cat
|
||||
|
||||
cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}"
|
||||
trigger=${FZF_COMPLETION_TRIGGER-'**'}
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
if [[ "$cur" == *"$trigger" ]]; then
|
||||
cur=${cur:0:${#cur}-${#trigger}}
|
||||
|
||||
selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | tr '\n' ' ')
|
||||
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
|
||||
if [[ -n "$selected" ]]; then
|
||||
COMPREPLY=("$selected")
|
||||
else
|
||||
COMPREPLY=("$cur")
|
||||
fi
|
||||
printf '\e[5n'
|
||||
return 0
|
||||
else
|
||||
_fzf_handle_dynamic_completion "$cmd" "${rest[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
_fzf_path_completion() {
|
||||
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
|
||||
}
|
||||
|
||||
# Deprecated. No file only completion.
|
||||
_fzf_file_completion() {
|
||||
_fzf_path_completion "$@"
|
||||
}
|
||||
|
||||
_fzf_dir_completion() {
|
||||
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
|
||||
}
|
||||
|
||||
_fzf_complete_kill() {
|
||||
_fzf_proc_completion "$@"
|
||||
}
|
||||
|
||||
_fzf_proc_completion() {
|
||||
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
|
||||
command ps -eo user,pid,ppid,start,time,command 2> /dev/null ||
|
||||
command ps -eo user,pid,ppid,time,args # For BusyBox
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_proc_completion_post() {
|
||||
awk '{print $2}'
|
||||
}
|
||||
|
||||
_fzf_host_completion() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
|
||||
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
|
||||
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
|
||||
awk '{if (length($2) > 0) {print $2}}' | sort -u
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_var_completion() {
|
||||
_fzf_complete -m -- "$@" < <(
|
||||
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_alias_completion() {
|
||||
_fzf_complete -m -- "$@" < <(
|
||||
alias | sed -En 's|^alias ([^=]+).*|\1|p'
|
||||
)
|
||||
}
|
||||
|
||||
# fzf options
|
||||
complete -o default -F _fzf_opts_completion fzf
|
||||
# fzf-tmux is a thin fzf wrapper that has only a few more options than fzf
|
||||
# itself. As a quick improvement we take fzf's completion. Adding the few extra
|
||||
# fzf-tmux specific options (like `-w WIDTH`) are left as a future patch.
|
||||
complete -o default -F _fzf_opts_completion fzf-tmux
|
||||
|
||||
d_cmds="${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}"
|
||||
a_cmds="
|
||||
awk bat cat diff diff3
|
||||
emacs emacsclient ex file ftp g++ gcc gvim head hg hx java
|
||||
javac ld less more mvim nvim patch perl python ruby
|
||||
sed sftp sort source tail tee uniq vi view vim wc xdg-open
|
||||
basename bunzip2 bzip2 chmod chown curl cp dirname du
|
||||
find git grep gunzip gzip hg jar
|
||||
ln ls mv open rm rsync scp
|
||||
svn tar unzip zip"
|
||||
|
||||
# Preserve existing completion
|
||||
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2> /dev/null)
|
||||
|
||||
if type _completion_loader > /dev/null 2>&1; then
|
||||
_fzf_completion_loader=1
|
||||
fi
|
||||
|
||||
__fzf_defc() {
|
||||
local cmd func opts orig_var orig def
|
||||
cmd="$1"
|
||||
func="$2"
|
||||
opts="$3"
|
||||
orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"
|
||||
orig="${!orig_var-}"
|
||||
if [[ -n "$orig" ]]; then
|
||||
printf -v def "$orig" "$func"
|
||||
eval "$def"
|
||||
else
|
||||
complete -F "$func" $opts "$cmd"
|
||||
fi
|
||||
}
|
||||
|
||||
# Anything
|
||||
for cmd in $a_cmds; do
|
||||
__fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault"
|
||||
done
|
||||
|
||||
# Directory
|
||||
for cmd in $d_cmds; do
|
||||
__fzf_defc "$cmd" _fzf_dir_completion "-o nospace -o dirnames"
|
||||
done
|
||||
|
||||
unset cmd d_cmds a_cmds
|
||||
|
||||
_fzf_setup_completion() {
|
||||
local kind fn cmd
|
||||
kind=$1
|
||||
fn=_fzf_${1}_completion
|
||||
if [[ $# -lt 2 ]] || ! type -t "$fn" > /dev/null; then
|
||||
echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."
|
||||
return 1
|
||||
fi
|
||||
shift
|
||||
__fzf_orig_completion < <(complete -p "$@" 2> /dev/null)
|
||||
for cmd in "$@"; do
|
||||
case "$kind" in
|
||||
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
|
||||
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
|
||||
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
|
||||
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Environment variables / Aliases / Hosts / Process
|
||||
_fzf_setup_completion 'var' export unset printenv
|
||||
_fzf_setup_completion 'alias' unalias
|
||||
_fzf_setup_completion 'host' ssh telnet
|
||||
_fzf_setup_completion 'proc' kill
|
||||
|
||||
fi
|
||||
325
config/fzf/completion.zsh
Executable file
325
config/fzf/completion.zsh
Executable file
@@ -0,0 +1,325 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ completion.zsh
|
||||
#
|
||||
# - $FZF_TMUX (default: 0)
|
||||
# - $FZF_TMUX_OPTS (default: '-d 40%')
|
||||
# - $FZF_COMPLETION_TRIGGER (default: '**')
|
||||
# - $FZF_COMPLETION_OPTS (default: empty)
|
||||
|
||||
# Both branches of the following `if` do the same thing -- define
|
||||
# __fzf_completion_options such that `eval $__fzf_completion_options` sets
|
||||
# all options to the same values they currently have. We'll do just that at
|
||||
# the bottom of the file after changing options to what we prefer.
|
||||
#
|
||||
# IMPORTANT: Until we get to the `emulate` line, all words that *can* be quoted
|
||||
# *must* be quoted in order to prevent alias expansion. In addition, code must
|
||||
# be written in a way works with any set of zsh options. This is very tricky, so
|
||||
# careful when you change it.
|
||||
#
|
||||
# Start by loading the builtin zsh/parameter module. It provides `options`
|
||||
# associative array that stores current shell options.
|
||||
if 'zmodload' 'zsh/parameter' 2>'/dev/null' && (( ${+options} )); then
|
||||
# This is the fast branch and it gets taken on virtually all Zsh installations.
|
||||
#
|
||||
# ${(kv)options[@]} expands to array of keys (option names) and values ("on"
|
||||
# or "off"). The subsequent expansion# with (j: :) flag joins all elements
|
||||
# together separated by spaces. __fzf_completion_options ends up with a value
|
||||
# like this: "options=(shwordsplit off aliases on ...)".
|
||||
__fzf_completion_options="options=(${(j: :)${(kv)options[@]}})"
|
||||
else
|
||||
# This branch is much slower because it forks to get the names of all
|
||||
# zsh options. It's possible to eliminate this fork but it's not worth the
|
||||
# trouble because this branch gets taken only on very ancient or broken
|
||||
# zsh installations.
|
||||
() {
|
||||
# That `()` above defines an anonymous function. This is essentially a scope
|
||||
# for local parameters. We use it to avoid polluting global scope.
|
||||
'local' '__fzf_opt'
|
||||
__fzf_completion_options="setopt"
|
||||
# `set -o` prints one line for every zsh option. Each line contains option
|
||||
# name, some spaces, and then either "on" or "off". We just want option names.
|
||||
# Expansion with (@f) flag splits a string into lines. The outer expansion
|
||||
# removes spaces and everything that follow them on every line. __fzf_opt
|
||||
# ends up iterating over option names: shwordsplit, aliases, etc.
|
||||
for __fzf_opt in "${(@)${(@f)$(set -o)}%% *}"; do
|
||||
if [[ -o "$__fzf_opt" ]]; then
|
||||
# Option $__fzf_opt is currently on, so remember to set it back on.
|
||||
__fzf_completion_options+=" -o $__fzf_opt"
|
||||
else
|
||||
# Option $__fzf_opt is currently off, so remember to set it back off.
|
||||
__fzf_completion_options+=" +o $__fzf_opt"
|
||||
fi
|
||||
done
|
||||
# The value of __fzf_completion_options here looks like this:
|
||||
# "setopt +o shwordsplit -o aliases ..."
|
||||
}
|
||||
fi
|
||||
|
||||
# Enable the default zsh options (those marked with <Z> in `man zshoptions`)
|
||||
# but without `aliases`. Aliases in functions are expanded when functions are
|
||||
# defined, so if we disable aliases here, we'll be sure to have no pesky
|
||||
# aliases in any of our functions. This way we won't need prefix every
|
||||
# command with `command` or to quote every word to defend against global
|
||||
# aliases. Note that `aliases` is not the only option that's important to
|
||||
# control. There are several others that could wreck havoc if they are set
|
||||
# to values we don't expect. With the following `emulate` command we
|
||||
# sidestep this issue entirely.
|
||||
'emulate' 'zsh' '-o' 'no_aliases'
|
||||
|
||||
# This brace is the start of try-always block. The `always` part is like
|
||||
# `finally` in lesser languages. We use it to *always* restore user options.
|
||||
{
|
||||
|
||||
# Bail out if not interactive shell.
|
||||
[[ -o interactive ]] || return 0
|
||||
|
||||
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
|
||||
if ! declare -f _fzf_compgen_path > /dev/null; then
|
||||
_fzf_compgen_path() {
|
||||
echo "$1"
|
||||
command find -L "$1" \
|
||||
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
|
||||
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
|
||||
}
|
||||
fi
|
||||
|
||||
if ! declare -f _fzf_compgen_dir > /dev/null; then
|
||||
_fzf_compgen_dir() {
|
||||
command find -L "$1" \
|
||||
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
|
||||
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
|
||||
}
|
||||
fi
|
||||
|
||||
###########################################################
|
||||
|
||||
__fzf_comprun() {
|
||||
if [[ "$(type _fzf_comprun 2>&1)" =~ function ]]; then
|
||||
_fzf_comprun "$@"
|
||||
elif [ -n "${TMUX_PANE-}" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "${FZF_TMUX_OPTS-}" ]; }; then
|
||||
shift
|
||||
if [ -n "${FZF_TMUX_OPTS-}" ]; then
|
||||
fzf-tmux ${(Q)${(Z+n+)FZF_TMUX_OPTS}} -- "$@"
|
||||
else
|
||||
fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%} -- "$@"
|
||||
fi
|
||||
else
|
||||
shift
|
||||
fzf "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Extract the name of the command. e.g. foo=1 bar baz**<tab>
|
||||
__fzf_extract_command() {
|
||||
local token tokens
|
||||
tokens=(${(z)1})
|
||||
for token in $tokens; do
|
||||
token=${(Q)token}
|
||||
if [[ "$token" =~ [[:alnum:]] && ! "$token" =~ "=" ]]; then
|
||||
echo "$token"
|
||||
return
|
||||
fi
|
||||
done
|
||||
echo "${tokens[1]}"
|
||||
}
|
||||
|
||||
__fzf_generic_path_completion() {
|
||||
local base lbuf cmd compgen fzf_opts suffix tail dir leftover matches
|
||||
base=$1
|
||||
lbuf=$2
|
||||
cmd=$(__fzf_extract_command "$lbuf")
|
||||
compgen=$3
|
||||
fzf_opts=$4
|
||||
suffix=$5
|
||||
tail=$6
|
||||
|
||||
setopt localoptions nonomatch
|
||||
eval "base=$base"
|
||||
[[ $base = *"/"* ]] && dir="$base"
|
||||
while [ 1 ]; do
|
||||
if [[ -z "$dir" || -d ${dir} ]]; then
|
||||
leftover=${base/#"$dir"}
|
||||
leftover=${leftover/#\/}
|
||||
[ -z "$dir" ] && dir='.'
|
||||
[ "$dir" != "/" ] && dir="${dir/%\//}"
|
||||
matches=$(eval "$compgen $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-}" __fzf_comprun "$cmd" ${(Q)${(Z+n+)fzf_opts}} -q "$leftover" | while read item; do
|
||||
item="${item%$suffix}$suffix"
|
||||
echo -n "${(q)item} "
|
||||
done)
|
||||
matches=${matches% }
|
||||
if [ -n "$matches" ]; then
|
||||
LBUFFER="$lbuf$matches$tail"
|
||||
fi
|
||||
zle reset-prompt
|
||||
break
|
||||
fi
|
||||
dir=$(dirname "$dir")
|
||||
dir=${dir%/}/
|
||||
done
|
||||
}
|
||||
|
||||
_fzf_path_completion() {
|
||||
__fzf_generic_path_completion "$1" "$2" _fzf_compgen_path \
|
||||
"-m" "" " "
|
||||
}
|
||||
|
||||
_fzf_dir_completion() {
|
||||
__fzf_generic_path_completion "$1" "$2" _fzf_compgen_dir \
|
||||
"" "/" ""
|
||||
}
|
||||
|
||||
_fzf_feed_fifo() (
|
||||
command rm -f "$1"
|
||||
mkfifo "$1"
|
||||
cat <&0 > "$1" &
|
||||
)
|
||||
|
||||
_fzf_complete() {
|
||||
setopt localoptions ksh_arrays
|
||||
# Split arguments around --
|
||||
local args rest str_arg i sep
|
||||
args=("$@")
|
||||
sep=
|
||||
for i in {0..${#args[@]}}; do
|
||||
if [[ "${args[$i]-}" = -- ]]; then
|
||||
sep=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -n "$sep" ]]; then
|
||||
str_arg=
|
||||
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
|
||||
args=("${args[@]:0:$sep}")
|
||||
else
|
||||
str_arg=$1
|
||||
args=()
|
||||
shift
|
||||
rest=("$@")
|
||||
fi
|
||||
|
||||
local fifo lbuf cmd matches post
|
||||
fifo="${TMPDIR:-/tmp}/fzf-complete-fifo-$$"
|
||||
lbuf=${rest[0]}
|
||||
cmd=$(__fzf_extract_command "$lbuf")
|
||||
post="${funcstack[1]}_post"
|
||||
type $post > /dev/null 2>&1 || post=cat
|
||||
|
||||
_fzf_feed_fifo "$fifo"
|
||||
matches=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "$cmd" "${args[@]}" -q "${(Q)prefix}" < "$fifo" | $post | tr '\n' ' ')
|
||||
if [ -n "$matches" ]; then
|
||||
LBUFFER="$lbuf$matches"
|
||||
fi
|
||||
command rm -f "$fifo"
|
||||
}
|
||||
|
||||
_fzf_complete_telnet() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0' |
|
||||
awk '{if (length($2) > 0) {print $2}}' | sort -u
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_ssh() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
setopt localoptions nonomatch
|
||||
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
|
||||
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
|
||||
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
|
||||
awk '{if (length($2) > 0) {print $2}}' | sort -u
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_export() {
|
||||
_fzf_complete -m -- "$@" < <(
|
||||
declare -xp | sed 's/=.*//' | sed 's/.* //'
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_unset() {
|
||||
_fzf_complete -m -- "$@" < <(
|
||||
declare -xp | sed 's/=.*//' | sed 's/.* //'
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_unalias() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
alias | sed 's/=.*//'
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_kill() {
|
||||
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
|
||||
command ps -eo user,pid,ppid,start,time,command 2> /dev/null ||
|
||||
command ps -eo user,pid,ppid,time,args # For BusyBox
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_kill_post() {
|
||||
awk '{print $2}'
|
||||
}
|
||||
|
||||
fzf-completion() {
|
||||
local tokens cmd prefix trigger tail matches lbuf d_cmds
|
||||
setopt localoptions noshwordsplit noksh_arrays noposixbuiltins
|
||||
|
||||
# http://zsh.sourceforge.net/FAQ/zshfaq03.html
|
||||
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags
|
||||
tokens=(${(z)LBUFFER})
|
||||
if [ ${#tokens} -lt 1 ]; then
|
||||
zle ${fzf_default_completion:-expand-or-complete}
|
||||
return
|
||||
fi
|
||||
|
||||
cmd=$(__fzf_extract_command "$LBUFFER")
|
||||
|
||||
# Explicitly allow for empty trigger.
|
||||
trigger=${FZF_COMPLETION_TRIGGER-'**'}
|
||||
[ -z "$trigger" -a ${LBUFFER[-1]} = ' ' ] && tokens+=("")
|
||||
|
||||
# When the trigger starts with ';', it becomes a separate token
|
||||
if [[ ${LBUFFER} = *"${tokens[-2]-}${tokens[-1]}" ]]; then
|
||||
tokens[-2]="${tokens[-2]-}${tokens[-1]}"
|
||||
tokens=(${tokens[0,-2]})
|
||||
fi
|
||||
|
||||
lbuf=$LBUFFER
|
||||
tail=${LBUFFER:$(( ${#LBUFFER} - ${#trigger} ))}
|
||||
|
||||
# Trigger sequence given
|
||||
if [ ${#tokens} -gt 1 -a "$tail" = "$trigger" ]; then
|
||||
d_cmds=(${=FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir})
|
||||
|
||||
[ -z "$trigger" ] && prefix=${tokens[-1]} || prefix=${tokens[-1]:0:-${#trigger}}
|
||||
[ -n "${tokens[-1]}" ] && lbuf=${lbuf:0:-${#tokens[-1]}}
|
||||
|
||||
if eval "type _fzf_complete_${cmd} > /dev/null"; then
|
||||
prefix="$prefix" eval _fzf_complete_${cmd} ${(q)lbuf}
|
||||
zle reset-prompt
|
||||
elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then
|
||||
_fzf_dir_completion "$prefix" "$lbuf"
|
||||
else
|
||||
_fzf_path_completion "$prefix" "$lbuf"
|
||||
fi
|
||||
# Fall back to default completion
|
||||
else
|
||||
zle ${fzf_default_completion:-expand-or-complete}
|
||||
fi
|
||||
}
|
||||
|
||||
[ -z "$fzf_default_completion" ] && {
|
||||
binding=$(bindkey '^I')
|
||||
[[ $binding =~ 'undefined-key' ]] || fzf_default_completion=$binding[(s: :w)2]
|
||||
unset binding
|
||||
}
|
||||
|
||||
zle -N fzf-completion
|
||||
bindkey '^I' fzf-completion
|
||||
|
||||
} always {
|
||||
# Restore the original options.
|
||||
eval $__fzf_completion_options
|
||||
'unset' '__fzf_completion_options'
|
||||
}
|
||||
9
config/fzf/fzf.bash
Normal file → Executable file
9
config/fzf/fzf.bash
Normal file → Executable file
@@ -1,13 +1,12 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.bash" 2> /dev/null
|
||||
# shellcheck source=completion.bash
|
||||
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.bash" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.bash"
|
||||
# shellcheck source=key-bindings.bash
|
||||
source "$HOME/.dotfiles/config/fzf/key-bindings.bash"
|
||||
|
||||
9
config/fzf/fzf.zsh
Normal file → Executable file
9
config/fzf/fzf.zsh
Normal file → Executable file
@@ -1,13 +1,12 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.zsh" 2> /dev/null
|
||||
# shellcheck source=completion.zsh
|
||||
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.zsh" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.zsh"
|
||||
# shellcheck source=key-bindings.zsh
|
||||
source "$HOME/.dotfiles/config/fzf/key-bindings.zsh"
|
||||
|
||||
103
config/fzf/key-bindings.bash
Executable file
103
config/fzf/key-bindings.bash
Executable file
@@ -0,0 +1,103 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ key-bindings.bash
|
||||
#
|
||||
# - $FZF_TMUX_OPTS
|
||||
# - $FZF_CTRL_T_COMMAND
|
||||
# - $FZF_CTRL_T_OPTS
|
||||
# - $FZF_CTRL_R_OPTS
|
||||
# - $FZF_ALT_C_COMMAND
|
||||
# - $FZF_ALT_C_OPTS
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
__fzf_select__() {
|
||||
local cmd opts
|
||||
cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type f -print \
|
||||
-o -type d -print \
|
||||
-o -type l -print 2> /dev/null | cut -b3-"}"
|
||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-} -m"
|
||||
eval "$cmd" |
|
||||
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
|
||||
while read -r item; do
|
||||
printf '%q ' "$item" # escape special chars
|
||||
done
|
||||
}
|
||||
|
||||
if [[ $- =~ i ]]; then
|
||||
|
||||
__fzfcmd() {
|
||||
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } &&
|
||||
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
|
||||
}
|
||||
|
||||
fzf-file-widget() {
|
||||
local selected="$(__fzf_select__ "$@")"
|
||||
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
|
||||
READLINE_POINT=$(( READLINE_POINT + ${#selected} ))
|
||||
}
|
||||
|
||||
__fzf_cd__() {
|
||||
local cmd opts dir
|
||||
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type d -print 2> /dev/null | cut -b3-"}"
|
||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
|
||||
dir=$(set +o pipefail; eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)) && printf 'builtin cd -- %q' "$dir"
|
||||
}
|
||||
|
||||
__fzf_history__() {
|
||||
local output opts script
|
||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
|
||||
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
|
||||
output=$(
|
||||
set +o pipefail
|
||||
builtin fc -lnr -2147483648 |
|
||||
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" |
|
||||
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
|
||||
) || return
|
||||
READLINE_LINE=${output#*$'\t'}
|
||||
if [[ -z "$READLINE_POINT" ]]; then
|
||||
echo "$READLINE_LINE"
|
||||
else
|
||||
READLINE_POINT=0x7fffffff
|
||||
fi
|
||||
}
|
||||
|
||||
# Required to refresh the prompt after fzf
|
||||
bind -m emacs-standard '"\er": redraw-current-line'
|
||||
|
||||
bind -m vi-command '"\C-z": emacs-editing-mode'
|
||||
bind -m vi-insert '"\C-z": emacs-editing-mode'
|
||||
bind -m emacs-standard '"\C-z": vi-editing-mode'
|
||||
|
||||
if (( BASH_VERSINFO[0] < 4 )); then
|
||||
# CTRL-T - Paste the selected file path into the command line
|
||||
bind -m emacs-standard '"\C-t": " \C-b\C-k \C-u`__fzf_select__`\e\C-e\er\C-a\C-y\C-h\C-e\e \C-y\ey\C-x\C-x\C-f"'
|
||||
bind -m vi-command '"\C-t": "\C-z\C-t\C-z"'
|
||||
bind -m vi-insert '"\C-t": "\C-z\C-t\C-z"'
|
||||
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
bind -m emacs-standard '"\C-r": "\C-e \C-u\C-y\ey\C-u"$(__fzf_history__)"\e\C-e\er"'
|
||||
bind -m vi-command '"\C-r": "\C-z\C-r\C-z"'
|
||||
bind -m vi-insert '"\C-r": "\C-z\C-r\C-z"'
|
||||
else
|
||||
# CTRL-T - Paste the selected file path into the command line
|
||||
bind -m emacs-standard -x '"\C-t": fzf-file-widget'
|
||||
bind -m vi-command -x '"\C-t": fzf-file-widget'
|
||||
bind -m vi-insert -x '"\C-t": fzf-file-widget'
|
||||
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
bind -m emacs-standard -x '"\C-r": __fzf_history__'
|
||||
bind -m vi-command -x '"\C-r": __fzf_history__'
|
||||
bind -m vi-insert -x '"\C-r": __fzf_history__'
|
||||
fi
|
||||
|
||||
# ALT-C - cd into the selected directory
|
||||
bind -m emacs-standard '"\ec": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"'
|
||||
bind -m vi-command '"\ec": "\C-z\ec\C-z"'
|
||||
bind -m vi-insert '"\ec": "\C-z\ec\C-z"'
|
||||
|
||||
fi
|
||||
172
config/fzf/key-bindings.fish
Executable file
172
config/fzf/key-bindings.fish
Executable file
@@ -0,0 +1,172 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ key-bindings.fish
|
||||
#
|
||||
# - $FZF_TMUX_OPTS
|
||||
# - $FZF_CTRL_T_COMMAND
|
||||
# - $FZF_CTRL_T_OPTS
|
||||
# - $FZF_CTRL_R_OPTS
|
||||
# - $FZF_ALT_C_COMMAND
|
||||
# - $FZF_ALT_C_OPTS
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
function fzf_key_bindings
|
||||
|
||||
# Store current token in $dir as root for the 'find' command
|
||||
function fzf-file-widget -d "List files and folders"
|
||||
set -l commandline (__fzf_parse_commandline)
|
||||
set -l dir $commandline[1]
|
||||
set -l fzf_query $commandline[2]
|
||||
set -l prefix $commandline[3]
|
||||
|
||||
# "-path \$dir'*/\\.*'" matches hidden files/folders inside $dir but not
|
||||
# $dir itself, even if hidden.
|
||||
test -n "$FZF_CTRL_T_COMMAND"; or set -l FZF_CTRL_T_COMMAND "
|
||||
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||
-o -type f -print \
|
||||
-o -type d -print \
|
||||
-o -type l -print 2> /dev/null | sed 's@^\./@@'"
|
||||
|
||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||
begin
|
||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS"
|
||||
eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)' -m --query "'$fzf_query'"' | while read -l r; set result $result $r; end
|
||||
end
|
||||
if [ -z "$result" ]
|
||||
commandline -f repaint
|
||||
return
|
||||
else
|
||||
# Remove last token from commandline.
|
||||
commandline -t ""
|
||||
end
|
||||
for i in $result
|
||||
commandline -it -- $prefix
|
||||
commandline -it -- (string escape $i)
|
||||
commandline -it -- ' '
|
||||
end
|
||||
commandline -f repaint
|
||||
end
|
||||
|
||||
function fzf-history-widget -d "Show command history"
|
||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||
begin
|
||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --scheme=history --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS +m"
|
||||
|
||||
set -l FISH_MAJOR (echo $version | cut -f1 -d.)
|
||||
set -l FISH_MINOR (echo $version | cut -f2 -d.)
|
||||
|
||||
# history's -z flag is needed for multi-line support.
|
||||
# history's -z flag was added in fish 2.4.0, so don't use it for versions
|
||||
# before 2.4.0.
|
||||
if [ "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \) ];
|
||||
history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result
|
||||
and commandline -- $result
|
||||
else
|
||||
history | eval (__fzfcmd) -q '(commandline)' | read -l result
|
||||
and commandline -- $result
|
||||
end
|
||||
end
|
||||
commandline -f repaint
|
||||
end
|
||||
|
||||
function fzf-cd-widget -d "Change directory"
|
||||
set -l commandline (__fzf_parse_commandline)
|
||||
set -l dir $commandline[1]
|
||||
set -l fzf_query $commandline[2]
|
||||
set -l prefix $commandline[3]
|
||||
|
||||
test -n "$FZF_ALT_C_COMMAND"; or set -l FZF_ALT_C_COMMAND "
|
||||
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||
-o -type d -print 2> /dev/null | sed 's@^\./@@'"
|
||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||
begin
|
||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS"
|
||||
eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)' +m --query "'$fzf_query'"' | read -l result
|
||||
|
||||
if [ -n "$result" ]
|
||||
cd -- $result
|
||||
|
||||
# Remove last token from commandline.
|
||||
commandline -t ""
|
||||
commandline -it -- $prefix
|
||||
end
|
||||
end
|
||||
|
||||
commandline -f repaint
|
||||
end
|
||||
|
||||
function __fzfcmd
|
||||
test -n "$FZF_TMUX"; or set FZF_TMUX 0
|
||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||
if [ -n "$FZF_TMUX_OPTS" ]
|
||||
echo "fzf-tmux $FZF_TMUX_OPTS -- "
|
||||
else if [ $FZF_TMUX -eq 1 ]
|
||||
echo "fzf-tmux -d$FZF_TMUX_HEIGHT -- "
|
||||
else
|
||||
echo "fzf"
|
||||
end
|
||||
end
|
||||
|
||||
bind \ct fzf-file-widget
|
||||
bind \cr fzf-history-widget
|
||||
bind \ec fzf-cd-widget
|
||||
|
||||
if bind -M insert > /dev/null 2>&1
|
||||
bind -M insert \ct fzf-file-widget
|
||||
bind -M insert \cr fzf-history-widget
|
||||
bind -M insert \ec fzf-cd-widget
|
||||
end
|
||||
|
||||
function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath, fzf query, and optional -option= prefix'
|
||||
set -l commandline (commandline -t)
|
||||
|
||||
# strip -option= from token if present
|
||||
set -l prefix (string match -r -- '^-[^\s=]+=' $commandline)
|
||||
set commandline (string replace -- "$prefix" '' $commandline)
|
||||
|
||||
# eval is used to do shell expansion on paths
|
||||
eval set commandline $commandline
|
||||
|
||||
if [ -z $commandline ]
|
||||
# Default to current directory with no --query
|
||||
set dir '.'
|
||||
set fzf_query ''
|
||||
else
|
||||
set dir (__fzf_get_dir $commandline)
|
||||
|
||||
if [ "$dir" = "." -a (string sub -l 1 -- $commandline) != '.' ]
|
||||
# if $dir is "." but commandline is not a relative path, this means no file path found
|
||||
set fzf_query $commandline
|
||||
else
|
||||
# Also remove trailing slash after dir, to "split" input properly
|
||||
set fzf_query (string replace -r "^$dir/?" -- '' "$commandline")
|
||||
end
|
||||
end
|
||||
|
||||
echo $dir
|
||||
echo $fzf_query
|
||||
echo $prefix
|
||||
end
|
||||
|
||||
function __fzf_get_dir -d 'Find the longest existing filepath from input string'
|
||||
set dir $argv
|
||||
|
||||
# Strip all trailing slashes. Ignore if $dir is root dir (/)
|
||||
if [ (string length -- $dir) -gt 1 ]
|
||||
set dir (string replace -r '/*$' -- '' $dir)
|
||||
end
|
||||
|
||||
# Iteratively check if dir exists and strip tail end of path
|
||||
while [ ! -d "$dir" ]
|
||||
# If path is absolute, this can keep going until ends up at /
|
||||
# If path is relative, this can keep going until entire input is consumed, dirname returns "."
|
||||
set dir (dirname -- "$dir")
|
||||
end
|
||||
|
||||
echo $dir
|
||||
end
|
||||
|
||||
end
|
||||
120
config/fzf/key-bindings.zsh
Executable file
120
config/fzf/key-bindings.zsh
Executable file
@@ -0,0 +1,120 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ key-bindings.zsh
|
||||
#
|
||||
# - $FZF_TMUX_OPTS
|
||||
# - $FZF_CTRL_T_COMMAND
|
||||
# - $FZF_CTRL_T_OPTS
|
||||
# - $FZF_CTRL_R_OPTS
|
||||
# - $FZF_ALT_C_COMMAND
|
||||
# - $FZF_ALT_C_OPTS
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
|
||||
# The code at the top and the bottom of this file is the same as in completion.zsh.
|
||||
# Refer to that file for explanation.
|
||||
if 'zmodload' 'zsh/parameter' 2>'/dev/null' && (( ${+options} )); then
|
||||
__fzf_key_bindings_options="options=(${(j: :)${(kv)options[@]}})"
|
||||
else
|
||||
() {
|
||||
__fzf_key_bindings_options="setopt"
|
||||
'local' '__fzf_opt'
|
||||
for __fzf_opt in "${(@)${(@f)$(set -o)}%% *}"; do
|
||||
if [[ -o "$__fzf_opt" ]]; then
|
||||
__fzf_key_bindings_options+=" -o $__fzf_opt"
|
||||
else
|
||||
__fzf_key_bindings_options+=" +o $__fzf_opt"
|
||||
fi
|
||||
done
|
||||
}
|
||||
fi
|
||||
|
||||
'emulate' 'zsh' '-o' 'no_aliases'
|
||||
|
||||
{
|
||||
|
||||
[[ -o interactive ]] || return 0
|
||||
|
||||
# CTRL-T - Paste the selected file path(s) into the command line
|
||||
__fsel() {
|
||||
local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type f -print \
|
||||
-o -type d -print \
|
||||
-o -type l -print 2> /dev/null | cut -b3-"}"
|
||||
setopt localoptions pipefail no_aliases 2> /dev/null
|
||||
local item
|
||||
eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-}" $(__fzfcmd) -m "$@" | while read item; do
|
||||
echo -n "${(q)item} "
|
||||
done
|
||||
local ret=$?
|
||||
echo
|
||||
return $ret
|
||||
}
|
||||
|
||||
__fzfcmd() {
|
||||
[ -n "${TMUX_PANE-}" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "${FZF_TMUX_OPTS-}" ]; } &&
|
||||
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
|
||||
}
|
||||
|
||||
fzf-file-widget() {
|
||||
LBUFFER="${LBUFFER}$(__fsel)"
|
||||
local ret=$?
|
||||
zle reset-prompt
|
||||
return $ret
|
||||
}
|
||||
zle -N fzf-file-widget
|
||||
bindkey -M emacs '^T' fzf-file-widget
|
||||
bindkey -M vicmd '^T' fzf-file-widget
|
||||
bindkey -M viins '^T' fzf-file-widget
|
||||
|
||||
# ALT-C - cd into the selected directory
|
||||
fzf-cd-widget() {
|
||||
local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type d -print 2> /dev/null | cut -b3-"}"
|
||||
setopt localoptions pipefail no_aliases 2> /dev/null
|
||||
local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-}" $(__fzfcmd) +m)"
|
||||
if [[ -z "$dir" ]]; then
|
||||
zle redisplay
|
||||
return 0
|
||||
fi
|
||||
zle push-line # Clear buffer. Auto-restored on next prompt.
|
||||
BUFFER="builtin cd -- ${(q)dir}"
|
||||
zle accept-line
|
||||
local ret=$?
|
||||
unset dir # ensure this doesn't end up appearing in prompt expansion
|
||||
zle reset-prompt
|
||||
return $ret
|
||||
}
|
||||
zle -N fzf-cd-widget
|
||||
bindkey -M emacs '\ec' fzf-cd-widget
|
||||
bindkey -M vicmd '\ec' fzf-cd-widget
|
||||
bindkey -M viins '\ec' fzf-cd-widget
|
||||
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
fzf-history-widget() {
|
||||
local selected num
|
||||
setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null
|
||||
selected=( $(fc -rl 1 | awk '{ cmd=$0; sub(/^[ \t]*[0-9]+\**[ \t]+/, "", cmd); if (!seen[cmd]++) print $0 }' |
|
||||
FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort,ctrl-z:ignore ${FZF_CTRL_R_OPTS-} --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
|
||||
local ret=$?
|
||||
if [ -n "$selected" ]; then
|
||||
num=$selected[1]
|
||||
if [ -n "$num" ]; then
|
||||
zle vi-fetch-history -n $num
|
||||
fi
|
||||
fi
|
||||
zle reset-prompt
|
||||
return $ret
|
||||
}
|
||||
zle -N fzf-history-widget
|
||||
bindkey -M emacs '^R' fzf-history-widget
|
||||
bindkey -M vicmd '^R' fzf-history-widget
|
||||
bindkey -M viins '^R' fzf-history-widget
|
||||
|
||||
} always {
|
||||
eval $__fzf_key_bindings_options
|
||||
'unset' '__fzf_key_bindings_options'
|
||||
}
|
||||
@@ -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]++'"
|
||||
@@ -22,6 +19,7 @@
|
||||
nah = !git reset --hard && git clean -df
|
||||
reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d
|
||||
reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d
|
||||
recent = "!r() { count=$1; git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' --color=always --count=${count:=10} | column -ts'|';}; r"
|
||||
rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)'
|
||||
tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\"
|
||||
undo-commit = reset HEAD~ --soft
|
||||
@@ -59,4 +57,5 @@
|
||||
|
||||
# dotfiles special config
|
||||
[includeIf "hasconfig:remote.*.url:https://github.com/ivuorinen/dotfiles.git"]
|
||||
path = ~/.dotfiles/config/git/special/dotfiles ;
|
||||
path = ~/.dotfiles/config/git/special/dotfiles ;
|
||||
|
||||
|
||||
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"
|
||||
|
||||
@@ -6,9 +6,7 @@ tap "gesquive/tap"
|
||||
tap "github/gh"
|
||||
tap "homebrew/autoupdate"
|
||||
tap "homebrew/bundle"
|
||||
tap "homebrew/cask"
|
||||
tap "homebrew/cask-fonts"
|
||||
tap "homebrew/core"
|
||||
tap "homebrew/services"
|
||||
tap "jesseduffield/lazygit"
|
||||
tap "mongodb/brew"
|
||||
@@ -16,20 +14,48 @@ tap "shivammathur/extensions"
|
||||
tap "shivammathur/php"
|
||||
tap "teamookla/speedtest"
|
||||
tap "xwmx/taps"
|
||||
# Run your GitHub Actions locally 🚀
|
||||
# Run your GitHub Actions locally
|
||||
brew "act"
|
||||
# Mozilla CA certificate store
|
||||
brew "ca-certificates"
|
||||
# Cryptography and SSL/TLS Toolkit
|
||||
brew "openssl@3"
|
||||
# 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"
|
||||
# Extendable version manager with support for Ruby, Node.js, Erlang & more
|
||||
@@ -38,14 +64,22 @@ brew "asdf"
|
||||
brew "aspell"
|
||||
# Official Amazon AWS command-line interface
|
||||
brew "awscli"
|
||||
# Terminal bandwidth utilization tool
|
||||
brew "bandwhich"
|
||||
# Bourne-Again SHell, a UNIX command interpreter
|
||||
brew "bash"
|
||||
# Clone of cat(1) with syntax highlighting and Git integration
|
||||
brew "bat"
|
||||
# C/C++ and Java libraries for Unicode and globalization
|
||||
brew "icu4c"
|
||||
# Yet another cross-platform graphical process/system monitor
|
||||
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
|
||||
@@ -70,16 +104,12 @@ brew "dnsmasq"
|
||||
brew "dog"
|
||||
# Lightning-fast linter for .env files written in Rust
|
||||
brew "dotenv-linter"
|
||||
# Tool to verify that your files are in harmony with your .editorconfig
|
||||
brew "editorconfig-checker"
|
||||
# Useful examples at the command-line
|
||||
brew "eg-examples"
|
||||
# Run arbitrary commands when files change
|
||||
brew "entr"
|
||||
# CLI for templating and/or deploying FaaS functions
|
||||
brew "faas-cli"
|
||||
# Simple, fast and user-friendly alternative to find
|
||||
brew "fd"
|
||||
# Perl lib for reading and writing EXIF metadata
|
||||
brew "exiftool"
|
||||
# Banner-like program prints strings as ASCII art
|
||||
brew "figlet"
|
||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||
@@ -96,10 +126,10 @@ brew "gdu", link: false
|
||||
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"
|
||||
# AVH edition of git-flow
|
||||
brew "git-flow-avh"
|
||||
# See your latest local git branches, formatted real fancy
|
||||
brew "git-recent"
|
||||
# Open-source GitLab command-line tool
|
||||
@@ -116,10 +146,12 @@ 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"
|
||||
# C/C++ and Java libraries for Unicode and globalization
|
||||
brew "icu4c"
|
||||
# OpenType text shaping engine
|
||||
brew "harfbuzz"
|
||||
# Framework for layout and rendering of i18n text
|
||||
@@ -146,6 +178,8 @@ 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
|
||||
@@ -160,18 +194,18 @@ brew "luarocks"
|
||||
brew "m-cli"
|
||||
# Mac App Store command-line interface
|
||||
brew "mas"
|
||||
# Terminal-based visual file manager
|
||||
brew "midnight-commander"
|
||||
# NCurses Disk Usage
|
||||
brew "ncdu"
|
||||
# Ambitious Vim-fork focused on extensibility and agility
|
||||
brew "neovim"
|
||||
# No Nonsense Neovim Client in Rust
|
||||
brew "neovide", link: false
|
||||
# HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
|
||||
brew "nginx"
|
||||
# Port scanning utility for large networks
|
||||
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
|
||||
@@ -194,28 +228,30 @@ 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"
|
||||
# Very fast implementation of tldr in Rust
|
||||
brew "tealdeer"
|
||||
# Send macOS User Notifications from the command-line
|
||||
brew "terminal-notifier", link: false
|
||||
# Tool to build, change, and version infrastructure
|
||||
brew "terraform", link: false
|
||||
brew "terminal-notifier"
|
||||
# Thin wrapper for Terraform e.g. for locking state
|
||||
brew "terragrunt"
|
||||
# Tool which checks for the support of TLS/SSL ciphers and flaws
|
||||
@@ -226,8 +262,6 @@ brew "tfenv"
|
||||
brew "tfsec"
|
||||
# Programmatically correct mistyped console commands
|
||||
brew "thefuck"
|
||||
# Simplified and community-driven man pages
|
||||
brew "tldr"
|
||||
# Terminal multiplexer
|
||||
brew "tmux"
|
||||
# Display directories as trees (with optional color/HTML output)
|
||||
@@ -242,12 +276,16 @@ brew "virtualenv"
|
||||
brew "wakatime-cli"
|
||||
# Executes a program periodically, showing output fullscreen
|
||||
brew "watch"
|
||||
# Watch files and take action when they change
|
||||
brew "watchman"
|
||||
# Internet file retriever
|
||||
brew "wget"
|
||||
# Personal information dashboard for your terminal
|
||||
brew "wtfutil"
|
||||
# Check your $HOME for unwanted files and directories
|
||||
brew "xdg-ninja"
|
||||
brew "xdg-ninja", args: ["HEAD"]
|
||||
# Hackable, minimal, fast TUI file explorer
|
||||
brew "xplr"
|
||||
# JavaScript package manager
|
||||
brew "yarn"
|
||||
# A vulnerability scanner for container images and filesystems
|
||||
@@ -276,8 +314,10 @@ brew "shivammathur/php/php@7.4"
|
||||
brew "shivammathur/php/php@8.0"
|
||||
# Ookla Speedtest
|
||||
brew "teamookla/speedtest/speedtest"
|
||||
# Command-line helper for the 1Password password manager
|
||||
# Command-line interface for 1Password
|
||||
cask "1password-cli"
|
||||
# GPU-accelerated terminal emulator
|
||||
cask "alacritty"
|
||||
# Turn audio CDs and files into audiobooks
|
||||
cask "audiobook-builder"
|
||||
# Text editor
|
||||
@@ -288,8 +328,8 @@ cask "dbeaver-community"
|
||||
cask "dbngin"
|
||||
# App to build and share containerized applications and microservices
|
||||
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
|
||||
@@ -318,10 +358,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
|
||||
@@ -368,14 +408,85 @@ cask "vlc"
|
||||
cask "voikkospellservice"
|
||||
# Rust-based terminal
|
||||
cask "warp"
|
||||
# Mastodon, Pleroma, and Misskey client
|
||||
cask "whalebird"
|
||||
# View output from scripts in the menu bar
|
||||
cask "xbar"
|
||||
mas "1Password for Safari", id: 1569813296
|
||||
mas "Actions", id: 1586435171
|
||||
mas "Audiobook Builder", id: 1437681957
|
||||
mas "Flow", id: 1423210932
|
||||
mas "Ivory", id: 6444602274
|
||||
mas "Keynote", id: 409183694
|
||||
mas "LastPass", id: 926036361
|
||||
mas "Numbers", id: 409203825
|
||||
mas "Pages", id: 409201541
|
||||
mas "Tailscale", id: 1475387142
|
||||
mas "Xcode", id: 497799835
|
||||
vscode "akamud.vscode-theme-onelight"
|
||||
vscode "amiralizadeh9480.laravel-extra-intellisense"
|
||||
vscode "andrewleedham.vscode-css-modules"
|
||||
vscode "andrewmcodes.tailwindcss-extension-pack"
|
||||
vscode "austenc.tailwind-docs"
|
||||
vscode "bmewburn.vscode-intelephense-client"
|
||||
vscode "Box-Of-Hats.bemhelper"
|
||||
vscode "bradlc.vscode-tailwindcss"
|
||||
vscode "christian-kohler.npm-intellisense"
|
||||
vscode "christian-kohler.path-intellisense"
|
||||
vscode "DavidAnson.vscode-markdownlint"
|
||||
vscode "dbaeumer.vscode-eslint"
|
||||
vscode "DotJoshJohnson.xml"
|
||||
vscode "eamodio.gitlens"
|
||||
vscode "EditorConfig.EditorConfig"
|
||||
vscode "esbenp.prettier-vscode"
|
||||
vscode "formulahendry.auto-close-tag"
|
||||
vscode "formulahendry.auto-rename-tag"
|
||||
vscode "formulahendry.code-runner"
|
||||
vscode "foxundermoon.shell-format"
|
||||
vscode "gencer.html-slim-scss-css-class-completion"
|
||||
vscode "github.vscode-github-actions"
|
||||
vscode "GitHub.vscode-pull-request-github"
|
||||
vscode "GraphQL.vscode-graphql"
|
||||
vscode "GraphQL.vscode-graphql-execution"
|
||||
vscode "GraphQL.vscode-graphql-syntax"
|
||||
vscode "heybourn.headwind"
|
||||
vscode "JohnnyMorganz.stylua"
|
||||
vscode "jumpinjackie.vscode-map-preview"
|
||||
vscode "k--kato.intellij-idea-keybindings"
|
||||
vscode "liamhammett.inline-parameters"
|
||||
vscode "macieklad.tailwind-sass-syntax"
|
||||
vscode "MehediDracula.php-namespace-resolver"
|
||||
vscode "mikestead.dotenv"
|
||||
vscode "MisterJ.vue-volar-extention-pack"
|
||||
vscode "MrChetan.phpstorm-parameter-hints-in-vscode"
|
||||
vscode "mrorz.language-gettext"
|
||||
vscode "ms-azuretools.vscode-docker"
|
||||
vscode "ms-python.python"
|
||||
vscode "ms-python.vscode-pylance"
|
||||
vscode "ms-toolsai.jupyter"
|
||||
vscode "ms-toolsai.jupyter-renderers"
|
||||
vscode "ms-toolsai.vscode-jupyter-cell-tags"
|
||||
vscode "ms-toolsai.vscode-jupyter-slideshow"
|
||||
vscode "ms-vscode-remote.remote-containers"
|
||||
vscode "ms-vscode-remote.remote-wsl"
|
||||
vscode "ms-vscode.cpptools"
|
||||
vscode "msjsdiag.vscode-react-native"
|
||||
vscode "mtxr.sqltools"
|
||||
vscode "neilbrayfield.php-docblocker"
|
||||
vscode "nhoizey.gremlins"
|
||||
vscode "octref.vetur"
|
||||
vscode "oderwat.indent-rainbow"
|
||||
vscode "pflannery.vscode-versionlens"
|
||||
vscode "phiter.phpstorm-snippets"
|
||||
vscode "sibiraj-s.vscode-scss-formatter"
|
||||
vscode "SonarSource.sonarlint-vscode"
|
||||
vscode "stylelint.vscode-stylelint"
|
||||
vscode "sumneko.lua"
|
||||
vscode "syler.sass-indented"
|
||||
vscode "timonwong.shellcheck"
|
||||
vscode "tootone.org-mode"
|
||||
vscode "valeryanm.vscode-phpsab"
|
||||
vscode "Vue.volar"
|
||||
vscode "Vue.vscode-typescript-vue-plugin"
|
||||
vscode "WakaTime.vscode-wakatime"
|
||||
vscode "wix.vscode-import-cost"
|
||||
vscode "xdebug.php-debug"
|
||||
vscode "xdebug.php-pack"
|
||||
vscode "yinfei.luahelper"
|
||||
vscode "yoavbls.pretty-ts-errors"
|
||||
vscode "ZainChen.json"
|
||||
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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<key>AllowClipboardAccess</key>
|
||||
<true/>
|
||||
<key>AutoHideTmuxClientSession</key>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>Custom Color Presets</key>
|
||||
<dict>
|
||||
<key>catppuccin-mocha</key>
|
||||
@@ -343,14 +343,24 @@
|
||||
<false/>
|
||||
<key>DimOnlyText</key>
|
||||
<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>
|
||||
<integer>4</integer>
|
||||
<key>MaxVertically</key>
|
||||
<true/>
|
||||
<key>New Bookmarks</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -364,147 +374,211 @@
|
||||
<false/>
|
||||
<key>Ansi 0 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.11764705926179886</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.098039217293262482</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.078431375324726105</real>
|
||||
</dict>
|
||||
<key>Ansi 1 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.16300037503242493</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.23660069704055786</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.7074432373046875</real>
|
||||
</dict>
|
||||
<key>Ansi 10 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<key>Green Component</key>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.56541937589645386</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.9042816162109375</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.3450070321559906</real>
|
||||
</dict>
|
||||
<key>Ansi 11 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<real>0.8833775520324707</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
<real>0.9259033203125</real>
|
||||
</dict>
|
||||
<key>Ansi 12 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.9485321044921875</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.67044717073440552</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.65349078178405762</real>
|
||||
</dict>
|
||||
<key>Ansi 13 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<real>0.8821563720703125</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.4927266538143158</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
<real>0.8821563720703125</real>
|
||||
</dict>
|
||||
<key>Ansi 14 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<real>0.99263292551040649</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.37597531080245972</real>
|
||||
</dict>
|
||||
<key>Ansi 15 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
<real>0.99999600648880005</real>
|
||||
</dict>
|
||||
<key>Ansi 2 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.7607843279838562</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Ansi 3 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.76959484815597534</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.78058648109436035</real>
|
||||
</dict>
|
||||
<key>Ansi 4 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.78216177225112915</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.26474356651306152</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.15404300391674042</real>
|
||||
</dict>
|
||||
<key>Ansi 5 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.74494361877441406</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.24931684136390686</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.752197265625</real>
|
||||
</dict>
|
||||
<key>Ansi 6 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.78166204690933228</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.77425903081893921</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Ansi 7 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.78104829788208008</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.78105825185775757</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.7810397744178772</real>
|
||||
</dict>
|
||||
<key>Ansi 8 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.4078223705291748</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.40782788395881653</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<real>0.40781760215759277</real>
|
||||
</dict>
|
||||
<key>Ansi 9 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.3333333432674408</real>
|
||||
<key>Red Component</key>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.45833224058151245</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.47524076700210571</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.8659515380859375</real>
|
||||
</dict>
|
||||
<key>BM Growl</key>
|
||||
<true/>
|
||||
@@ -513,30 +587,47 @@
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.17647058823529413</real>
|
||||
<real>0.12103271484375</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.11764705882352941</real>
|
||||
<real>0.099111050367355347</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.11764705882352941</real>
|
||||
<real>0.0806884765625</real>
|
||||
</dict>
|
||||
<key>Background Image Location</key>
|
||||
<string></string>
|
||||
<key>Badge Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>0.5</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Blinking Cursor</key>
|
||||
<false/>
|
||||
<key>Blur</key>
|
||||
<true/>
|
||||
<key>Blur Radius</key>
|
||||
<real>10</real>
|
||||
<real>20</real>
|
||||
<key>Bold Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
<real>0.99999600648880005</real>
|
||||
</dict>
|
||||
<key>Character Encoding</key>
|
||||
<integer>4</integer>
|
||||
@@ -546,28 +637,53 @@
|
||||
<integer>130</integer>
|
||||
<key>Command</key>
|
||||
<string></string>
|
||||
<key>Cursor Boost</key>
|
||||
<real>0.19958333333333333</real>
|
||||
<key>Cursor Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.99998724460601807</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.99997633695602417</real>
|
||||
</dict>
|
||||
<key>Cursor Guide Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>0.25</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.9268307089805603</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.70213186740875244</real>
|
||||
</dict>
|
||||
<key>Cursor Text Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<real>0.0</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Cursor Type</key>
|
||||
<integer>1</integer>
|
||||
<key>Custom Command</key>
|
||||
<string>No</string>
|
||||
<key>Custom Directory</key>
|
||||
<string>No</string>
|
||||
<string>Yes</string>
|
||||
<key>Default Bookmark</key>
|
||||
<string>No</string>
|
||||
<key>Description</key>
|
||||
@@ -580,17 +696,23 @@
|
||||
<true/>
|
||||
<key>Foreground Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.86198854446411133</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.86199951171875</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.73333334922790527</real>
|
||||
<real>0.86197912693023682</real>
|
||||
</dict>
|
||||
<key>Guid</key>
|
||||
<string>B563F48B-314D-48CC-908E-ACA971D430BE</string>
|
||||
<key>Horizontal Spacing</key>
|
||||
<real>1</real>
|
||||
<key>Icon</key>
|
||||
<integer>1</integer>
|
||||
<key>Idle Code</key>
|
||||
<integer>0</integer>
|
||||
<key>Jobs to Ignore</key>
|
||||
@@ -883,6 +1005,21 @@
|
||||
<string>[1;5F</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Link Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.9337158203125</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.55789834260940552</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.19802422821521759</real>
|
||||
</dict>
|
||||
<key>Minimum Contrast</key>
|
||||
<real>0.49644531250000001</real>
|
||||
<key>Mouse Reporting</key>
|
||||
<true/>
|
||||
<key>Name</key>
|
||||
@@ -906,15 +1043,19 @@
|
||||
<key>Right Option Key Sends</key>
|
||||
<integer>0</integer>
|
||||
<key>Rows</key>
|
||||
<integer>25</integer>
|
||||
<integer>40</integer>
|
||||
<key>Screen</key>
|
||||
<integer>-1</integer>
|
||||
<key>Scrollback Lines</key>
|
||||
<integer>0</integer>
|
||||
<key>Selected Text Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.0</real>
|
||||
<key>Red Component</key>
|
||||
@@ -922,23 +1063,31 @@
|
||||
</dict>
|
||||
<key>Selection Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.8353000283241272</real>
|
||||
<real>0.84313726425170898</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.70980000495910645</real>
|
||||
<real>0.70196080207824707</real>
|
||||
</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>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>Status Bar Layout</key>
|
||||
<dict>
|
||||
<key>advanced configuration</key>
|
||||
@@ -1094,13 +1243,15 @@
|
||||
<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>
|
||||
<true/>
|
||||
<key>Use Bright Bold</key>
|
||||
<true/>
|
||||
<key>Use Cursor Guide</key>
|
||||
<false/>
|
||||
<key>Use Italic Font</key>
|
||||
<true/>
|
||||
<key>Use Non-ASCII Font</key>
|
||||
@@ -1112,7 +1263,7 @@
|
||||
<key>Window Type</key>
|
||||
<integer>0</integer>
|
||||
<key>Working Directory</key>
|
||||
<string>/Users/ivuorinen</string>
|
||||
<string>/Users/ivuorinen/Code</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PointerActions</key>
|
||||
@@ -1157,13 +1308,21 @@
|
||||
<key>SeparateStatusBarsPerPane</key>
|
||||
<false/>
|
||||
<key>SmartPlacement</key>
|
||||
<false/>
|
||||
<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>kCPKSelectionViewPreferredModeKey</key>
|
||||
|
||||
Submodule config/nvim deleted from 445a883973
8
config/nvim/.gitignore
vendored
Normal file
8
config/nvim/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
15
config/nvim/.neoconf.json
Normal file
15
config/nvim/.neoconf.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4
config/nvim/README.md
Normal file
4
config/nvim/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# 💤 LazyVim
|
||||
|
||||
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
||||
2
config/nvim/init.lua
Normal file
2
config/nvim/init.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
65
config/nvim/lazy-lock.json
Normal file
65
config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"LazyVim": { "branch": "main", "commit": "a72a84972d85e5bbc6b9d60a0983b37efef21b8a" },
|
||||
"LuaSnip": { "branch": "master", "commit": "3657c3f3cb2214a681fc7e95b6ffb509d076ebfb" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "7b115d9dca286192ffa5b2a254ff61a34006ac3e" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" },
|
||||
"animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" },
|
||||
"bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "9961d87bb3ec008213c46ba14b3f384a5f520eb5" },
|
||||
"catppuccin": { "branch": "main", "commit": "85e93601e0f0b48aa2c6bbfae4d0e9d7a1898280" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" },
|
||||
"flash.nvim": { "branch": "main", "commit": "8a8e74922a383c253b7f92e042b749150140c8d1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "bce4576a9047085a528c479a7fe1e2f6b787b6c1" },
|
||||
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
|
||||
"middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" },
|
||||
"mini.ai": { "branch": "main", "commit": "7ae226f331885e6f30e9a8229e113debc59308ae" },
|
||||
"mini.animate": { "branch": "main", "commit": "230140aa0b06af87c9d345573aab1aaf50d8b539" },
|
||||
"mini.bufremove": { "branch": "main", "commit": "7821606e35c1ac931b56d8e3155f45ffe76ee7e5" },
|
||||
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" },
|
||||
"mini.pairs": { "branch": "main", "commit": "dfa9f6e2576bb8853be277d96b735af59d9be7c2" },
|
||||
"mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "2d89ca96e08eb6e9c8e50e1bb4738bc5125c9f12" },
|
||||
"neoconf.nvim": { "branch": "main", "commit": "b7cde4ba41eabf9bec9464c990bcf84a0fef4526" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "471324e6c746284dbbdc1d357799d1911bb7e120" },
|
||||
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
|
||||
"noice.nvim": { "branch": "main", "commit": "74c2902146b080035beb19944baf6f014a954720" },
|
||||
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "f3195835c0447ee2c80152b893ab51ca162b04a9" },
|
||||
"nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" },
|
||||
"nvim-notify": { "branch": "master", "commit": "94859430020f5cf32a1b97ddd9e596fed9db7981" },
|
||||
"nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "97cfd1b0f5a6ab35979ce1bee6c17f54745fd1e5" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "b4f6dd72980607a9821d24502b0ca7ee826376af" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
|
||||
"stickybuf.nvim": { "branch": "master", "commit": "e3db41f2c1bb2df3ee6ff964ee74fe991f6f9566" },
|
||||
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b543aaa2c9cf8123ed2fe7dbb6c211a9cd415124" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
|
||||
"typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" },
|
||||
"venv-selector.nvim": { "branch": "main", "commit": "14d6e866070f759e9014a8053954f835294f56f9" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "8c910b2f84ae6acd9b4b17330bb94dd783c0c11a" },
|
||||
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
|
||||
"vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
|
||||
"windows.nvim": { "branch": "main", "commit": "c7492552b23d0ab30325e90b56066ec51242adc8" }
|
||||
}
|
||||
3
config/nvim/lua/config/autocmds.lua
Normal file
3
config/nvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
3
config/nvim/lua/config/keymaps.lua
Normal file
3
config/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
60
config/nvim/lua/config/lazy.lua
Normal file
60
config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
import = "lazyvim.plugins",
|
||||
opts = {
|
||||
colorscheme = "catppuccin",
|
||||
},
|
||||
},
|
||||
-- import any extras modules here
|
||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.terraform" },
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "catppuccin", "tokyonight", "habamax" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
11
config/nvim/lua/config/options.lua
Normal file
11
config/nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
|
||||
local opt = vim.opt
|
||||
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
91
config/nvim/lua/plugins/coding.lua
Normal file
91
config/nvim/lua/plugins/coding.lua
Normal file
@@ -0,0 +1,91 @@
|
||||
return {
|
||||
-- A better annotation generator. Supports multiple languages and annotation conventions.
|
||||
-- https://github.com/danymat/neogen
|
||||
{
|
||||
"danymat/neogen",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
version = "*",
|
||||
cmd = "Neogen",
|
||||
opts = {
|
||||
snippet_engine = "luasnip",
|
||||
languages = {
|
||||
lua = { template = { annotation_convention = "ldoc" } },
|
||||
typescript = { template = { annotation_convention = "tsdoc" } },
|
||||
typescriptreact = { template = { annotation_convention = "tsdoc" } },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>baa",
|
||||
function()
|
||||
require("neogen").generate({ type = "current" })
|
||||
end,
|
||||
desc = "Current",
|
||||
},
|
||||
{
|
||||
"<leader>bac",
|
||||
function()
|
||||
require("neogen").generate({ type = "class" })
|
||||
end,
|
||||
desc = "Class",
|
||||
},
|
||||
{
|
||||
"<leader>baf",
|
||||
function()
|
||||
require("neogen").generate({ type = "func" })
|
||||
end,
|
||||
desc = "Function",
|
||||
},
|
||||
{
|
||||
"<leader>bat",
|
||||
function()
|
||||
require("neogen").generate({ type = "type" })
|
||||
end,
|
||||
desc = "Type",
|
||||
},
|
||||
{
|
||||
"<leader>baF",
|
||||
function()
|
||||
require("neogen").generate({ type = "file" })
|
||||
end,
|
||||
desc = "File",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- Describe the regexp under the cursor
|
||||
-- https://github.com/bennypowers/nvim-regexplainer
|
||||
{
|
||||
"bennypowers/nvim-regexplainer",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
opts = {
|
||||
-- automatically show the explainer when the cursor enters a regexp
|
||||
auto = true,
|
||||
},
|
||||
},
|
||||
|
||||
-- Clarify and beautify your comments using boxes and lines.
|
||||
-- https://github.com/LudoPinelli/comment-box.nvim
|
||||
{ "LudoPinelli/comment-box.nvim", opts = {} },
|
||||
|
||||
-- Tabnine Client for Neovim
|
||||
-- https://github.com/codota/tabnine-nvim
|
||||
{
|
||||
"codota/tabnine-nvim",
|
||||
name = "tabnine",
|
||||
enabled = false,
|
||||
build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh",
|
||||
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
|
||||
event = "User",
|
||||
opts = {
|
||||
accept_keymap = "<C-CR>",
|
||||
dismiss_keymap = "<C-Esc>",
|
||||
},
|
||||
},
|
||||
|
||||
-- Vim plugin for automatic time tracking and metrics generated from your programming activity.
|
||||
-- https://github.com/wakatime/vim-wakatime
|
||||
{ "wakatime/vim-wakatime", lazy = false, enabled = true },
|
||||
}
|
||||
266
config/nvim/lua/plugins/example.lua
Normal file
266
config/nvim/lua/plugins/example.lua
Normal file
@@ -0,0 +1,266 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- add symbols-outline
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add telescope-fzf-native
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, "😄")
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Use <tab> for completion and snippets (supertab)
|
||||
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = function()
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
-- then: setup supertab in cmp
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- this way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
17
config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
17
config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = { eslint = {} },
|
||||
setup = {
|
||||
eslint = function()
|
||||
require("lazyvim.util").on_attach(function(client)
|
||||
if client.name == "eslint" then
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
elseif client.name == "tsserver" then
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
end
|
||||
end)
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
23
config/nvim/lua/plugins/treesitter.lua
Normal file
23
config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
42
config/nvim/lua/plugins/ui.lua
Normal file
42
config/nvim/lua/plugins/ui.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
-- luacheck: globals vim
|
||||
return {
|
||||
-- The theme of choise, catppuccin
|
||||
-- https://github.com/catppuccin/nvim
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
enabled = true,
|
||||
config = function()
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end,
|
||||
opts = {
|
||||
flavour = "mocha",
|
||||
},
|
||||
},
|
||||
-- Getting you where you want with the fewest keystrokes.
|
||||
-- https://github.com/ThePrimeagen/harpoon
|
||||
{ "ThePrimeagen/harpoon" },
|
||||
-- Close buffer without messing up with the window.
|
||||
-- https://github.com/famiu/bufdelete.nvim
|
||||
{ "famiu/bufdelete.nvim" },
|
||||
-- Neovim plugin for locking a buffer to a window
|
||||
-- https://github.com/stevearc/stickybuf.nvim
|
||||
{ "stevearc/stickybuf.nvim", opts = {} },
|
||||
-- Automatically expand width of the current window.
|
||||
-- Maximizes and restore it. And all this with nice animations!
|
||||
-- https://github.com/anuvyklack/windows.nvim
|
||||
{
|
||||
"anuvyklack/windows.nvim",
|
||||
dependencies = {
|
||||
"anuvyklack/middleclass",
|
||||
"anuvyklack/animation.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.o.winwidth = 10
|
||||
vim.o.winminwidth = 10
|
||||
vim.o.equalalways = false
|
||||
require("windows").setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
3
config/nvim/spell/en.utf-8.add
Normal file
3
config/nvim/spell/en.utf-8.add
Normal file
@@ -0,0 +1,3 @@
|
||||
Plugins
|
||||
lua
|
||||
plugins
|
||||
3
config/nvim/stylua.toml
Normal file
3
config/nvim/stylua.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
@@ -4,5 +4,4 @@ editorconfig-checker
|
||||
github-release-notes
|
||||
neovim
|
||||
stylelint-lsp
|
||||
tldr
|
||||
|
||||
|
||||
@@ -1,21 +1,58 @@
|
||||
# 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
|
||||
format = """
|
||||
$os\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$fill \
|
||||
$battery\
|
||||
$username\
|
||||
$hostname\
|
||||
$aws\
|
||||
$gcloud\
|
||||
$conda\
|
||||
$golang\
|
||||
$nodejs\
|
||||
$php\
|
||||
$python\
|
||||
$package\
|
||||
$line_break\
|
||||
$character"""
|
||||
|
||||
# Timeout for commands executed by starship (in milliseconds).
|
||||
command_timeout = 1000
|
||||
# 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'
|
||||
[character]
|
||||
success_symbol = "[→](bold green)"
|
||||
error_symbol = "[→](red)"
|
||||
vimcmd_symbol = "[←](green)"
|
||||
|
||||
[aws]
|
||||
symbol = " "
|
||||
format = '[$symbol($profile )(\($region\) )(\[$duration\] )]($style)'
|
||||
|
||||
[cmd_duration]
|
||||
disabled = true
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
style = "blue"
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[fill]
|
||||
symbol = '·'
|
||||
style = 'bold black'
|
||||
|
||||
[gcloud]
|
||||
format = ' [($symbol)$account(@$domain)(\($region\))]($style) '
|
||||
|
||||
[git_branch]
|
||||
symbol = '🌱 '
|
||||
symbol = " "
|
||||
truncation_length = 20
|
||||
truncation_symbol = '…'
|
||||
ignore_branches = ['master', 'main']
|
||||
@@ -24,7 +61,76 @@ ignore_branches = ['master', 'main']
|
||||
up_to_date = '✓'
|
||||
staged = '[++\($count\)](green)'
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[git_metrics]
|
||||
added_style = 'bold blue'
|
||||
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
disabled = false
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[hostname]
|
||||
ssh_symbol = " "
|
||||
ssh_only = false
|
||||
format = '[$ssh_symbol](bold blue)[$hostname](bold red) '
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
format = '[$symbol($version )]($style)'
|
||||
version_format = '${major}.${minor}'
|
||||
|
||||
[os]
|
||||
format = "[$symbol]($style) "
|
||||
style = "bold blue"
|
||||
disabled = false
|
||||
|
||||
[os.symbols]
|
||||
Alpaquita = " "
|
||||
Alpine = " "
|
||||
Amazon = " "
|
||||
Android = " "
|
||||
Arch = " "
|
||||
Artix = " "
|
||||
CentOS = " "
|
||||
Debian = " "
|
||||
DragonFly = " "
|
||||
Emscripten = " "
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Garuda = " "
|
||||
Gentoo = " "
|
||||
HardenedBSD = " "
|
||||
Illumos = " "
|
||||
Linux = " "
|
||||
Mabox = " "
|
||||
Macos = " "
|
||||
Manjaro = " "
|
||||
Mariner = " "
|
||||
MidnightBSD = " "
|
||||
Mint = " "
|
||||
NetBSD = " "
|
||||
NixOS = " "
|
||||
OpenBSD = " "
|
||||
openSUSE = " "
|
||||
OracleLinux = " "
|
||||
Pop = " "
|
||||
Raspbian = " "
|
||||
Redhat = " "
|
||||
RedHatEnterprise = " "
|
||||
Redox = " "
|
||||
Solus = " "
|
||||
SUSE = " "
|
||||
Ubuntu = " "
|
||||
Unknown = " "
|
||||
Windows = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
format = '[$symbol($version )]($style)'
|
||||
version_format = '${major}.${minor}'
|
||||
|
||||
@@ -32,6 +138,8 @@ version_format = '${major}.${minor}'
|
||||
format = '[$symbol($version )]($style)'
|
||||
version_format = '${major}.${minor}'
|
||||
|
||||
[nodejs]
|
||||
format = '[$symbol($version )]($style)'
|
||||
version_format = '${major}.${minor}'
|
||||
[python]
|
||||
symbol = " "
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
38
config/tealdeer/config.toml
Normal file
38
config/tealdeer/config.toml
Normal file
@@ -0,0 +1,38 @@
|
||||
[style.description]
|
||||
underline = false
|
||||
bold = false
|
||||
italic = false
|
||||
|
||||
[style.command_name]
|
||||
foreground = "cyan"
|
||||
underline = false
|
||||
bold = false
|
||||
italic = false
|
||||
|
||||
[style.example_text]
|
||||
foreground = "green"
|
||||
underline = false
|
||||
bold = false
|
||||
italic = false
|
||||
|
||||
[style.example_code]
|
||||
foreground = "cyan"
|
||||
underline = false
|
||||
bold = false
|
||||
italic = false
|
||||
|
||||
[style.example_variable]
|
||||
foreground = "cyan"
|
||||
underline = true
|
||||
bold = false
|
||||
italic = false
|
||||
|
||||
[display]
|
||||
compact = false
|
||||
use_pager = false
|
||||
|
||||
[updates]
|
||||
auto_update = false
|
||||
auto_update_interval_hours = 720
|
||||
|
||||
[directories]
|
||||
1
config/tmux/plugins/tmux
Submodule
1
config/tmux/plugins/tmux
Submodule
Submodule config/tmux/plugins/tmux added at 38932bddfc
1
config/tmux/plugins/tmux-continuum
Submodule
1
config/tmux/plugins/tmux-continuum
Submodule
Submodule config/tmux/plugins/tmux-continuum added at 46e0e00234
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-resurrect
Submodule
1
config/tmux/plugins/tmux-resurrect
Submodule
Submodule config/tmux/plugins/tmux-resurrect added at e87d7d592c
1
config/tmux/plugins/tmux-sensible
Submodule
1
config/tmux/plugins/tmux-sensible
Submodule
Submodule config/tmux/plugins/tmux-sensible added at 2ce7679f9d
1
config/tmux/plugins/tmux-sessionist
Submodule
1
config/tmux/plugins/tmux-sessionist
Submodule
Submodule config/tmux/plugins/tmux-sessionist added at fdd0876f6f
1
config/tmux/plugins/tmux-window-name
Submodule
1
config/tmux/plugins/tmux-window-name
Submodule
Submodule config/tmux/plugins/tmux-window-name added at f89e9c9d71
1
config/tmux/plugins/tmux-yank
Submodule
1
config/tmux/plugins/tmux-yank
Submodule
Submodule config/tmux/plugins/tmux-yank added at fd8000238b
@@ -4,30 +4,9 @@
|
||||
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
|
||||
# - https://github.com/dreamsofcode-io/tmux/blob/main/tmux.conf
|
||||
|
||||
## Install plugins, starting with plugin manager
|
||||
set -g @tpm_plugins ' \
|
||||
tmux-plugins/tpm \
|
||||
b0o/tmux-autoreload \
|
||||
catppuccin/tmux \
|
||||
ChanderG/tmux-notify \
|
||||
christoomey/vim-tmux-navigator \
|
||||
yardnsm/tmux-1password \
|
||||
jaclu/tmux-menus \
|
||||
sainnhe/tmux-fzf \
|
||||
tmux-plugins/tmux-continuum \
|
||||
tmux-plugins/tmux-resurrect \
|
||||
tmux-plugins/tmux-sensible \
|
||||
tmux-plugins/tmux-sessionist \
|
||||
tmux-plugins/tmux-yank \
|
||||
'
|
||||
|
||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
|
||||
# Mouse support
|
||||
set -g mouse on
|
||||
|
||||
# Make delay shorter
|
||||
set -sg escape-time 0
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ Bindings │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
|
||||
# Set <prefix> to Control + Space
|
||||
unbind C-b
|
||||
@@ -40,70 +19,34 @@ bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Start windows and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
# Use Alt-arrow keys without prefix key to switch panes
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# Shift arrow to switch windows
|
||||
bind -n S-Left previous-window
|
||||
bind -n S-Right next-window
|
||||
|
||||
# Shift Alt vim keys to switch windows
|
||||
bind -n M-H previous-window
|
||||
bind -n M-L next-window
|
||||
# Control-Tab & Control-Shift-Tab to switch windows
|
||||
bind -n C-Tab previous-window
|
||||
bind -n C-S-Tab 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
|
||||
|
||||
# Plugins related configurations
|
||||
# Set default directory for new windows in this session to current directory:
|
||||
bind M-c attach-session -c "#{pane_current_path}"
|
||||
|
||||
## https://github.com/jaclu/tmux-menus
|
||||
set -g @menus_trigger 'm'
|
||||
# Open a new window in the current directory
|
||||
bind C new-window -c "#{pane_current_path}"
|
||||
|
||||
## https://github.com/jaclu/tmux-1password
|
||||
set -g @1password-key 'x'
|
||||
|
||||
## https://github.com/catppuccin/tmux
|
||||
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/tmux-plugins/tmux-continuum
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-boot 'on'
|
||||
set -g @continuum-boot-options 'iterm'
|
||||
|
||||
## https://github.com/tmux-plugins/tmux-resurrect
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
|
||||
## https://github.com/b0o/tmux-autoreload
|
||||
set-option -g @tmux-autoreload-configs '~/.config/tmux/tmux.conf'
|
||||
|
||||
## https://github.com/sainnhe/tmux-fzf
|
||||
TMUX_FZF_LAUNCH_KEY="l"
|
||||
|
||||
## https://github.com/ChanderG/tmux-notify
|
||||
set -g @tnotify-verbose 'on'
|
||||
|
||||
# set vi-mode
|
||||
set-window-option -g mode-keys vi
|
||||
# keybindings
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
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
|
||||
@@ -120,5 +63,80 @@ bind Escape copy-mode
|
||||
unbind p
|
||||
bind p paste-buffer
|
||||
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ Settings │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
|
||||
# Mouse support
|
||||
set -g mouse on
|
||||
|
||||
# Make delay shorter
|
||||
set -sg escape-time 0
|
||||
|
||||
# Start windows and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
# set vi-mode
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ Plugins │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
|
||||
# Set plugins install dir
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.dotfiles/config/tmux/plugins'
|
||||
|
||||
## Install plugins, starting with plugin manager
|
||||
set -g @tpm_plugins ' \
|
||||
catppuccin/tmux \
|
||||
tmux-plugins/tmux-continuum \
|
||||
jaclu/tmux-menus \
|
||||
ofirgall/tmux-window-name \
|
||||
tmux-plugins/tmux-resurrect \
|
||||
tmux-plugins/tmux-sensible \
|
||||
tmux-plugins/tmux-sessionist \
|
||||
tmux-plugins/tmux-yank \
|
||||
tmux-plugins/tpm \
|
||||
'
|
||||
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ Plugins related configurations │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
|
||||
## https://github.com/jaclu/tmux-menus
|
||||
set -g @menus_trigger 'm'
|
||||
|
||||
## A plugin to name your tmux windows smartly.
|
||||
## https://github.com/ofirgall/tmux-window-name
|
||||
### Maximum name length of a window
|
||||
set -g @tmux_window_name_max_name_len "20"
|
||||
### Replace $HOME with ~ in window names
|
||||
set -g @tmux_window_name_use_tilde "True"
|
||||
|
||||
## https://github.com/catppuccin/tmux
|
||||
set -g @catppuccin_flavour "mocha" # latte/frappe/macchiato/mocha
|
||||
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
|
||||
set -g @catppuccin_window_status_enable "yes"
|
||||
|
||||
## set -g @catppuccin_window_right_separator "█"
|
||||
set -g @catppuccin_window_number_position "left"
|
||||
set -g @catppuccin_window_middle_separator ": "
|
||||
set -g @catppuccin_window_default_fill "none"
|
||||
set -g @catppuccin_window_current_fill "all"
|
||||
set -g @catppuccin_status_modules "application session date_time"
|
||||
set -g @catppuccin_status_left_separator "█"
|
||||
set -g @catppuccin_status_right_separator "█"
|
||||
set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M"
|
||||
|
||||
## https://github.com/tmux-plugins/tmux-continuum
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-boot 'on'
|
||||
|
||||
## https://github.com/tmux-plugins/tmux-resurrect
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
|
||||
# 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
@@ -41,7 +41,7 @@ bind-key -T copy-mode t command-prompt -1 -p "(jump to
|
||||
bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel pbcopy
|
||||
bind-key -T copy-mode MouseDown1Pane select-pane
|
||||
bind-key -T copy-mode MouseDrag1Pane select-pane \; send-keys -X begin-selection
|
||||
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel pbcopy
|
||||
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
|
||||
bind-key -T copy-mode WheelUpPane select-pane \; send-keys -X -N 5 scroll-up
|
||||
bind-key -T copy-mode WheelDownPane select-pane \; send-keys -X -N 5 scroll-down
|
||||
bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
|
||||
@@ -87,16 +87,13 @@ bind-key -T copy-mode-vi C-c send-keys -X cancel
|
||||
bind-key -T copy-mode-vi C-d send-keys -X halfpage-down
|
||||
bind-key -T copy-mode-vi C-e send-keys -X scroll-down
|
||||
bind-key -T copy-mode-vi C-f send-keys -X page-down
|
||||
bind-key -T copy-mode-vi C-h select-pane -L
|
||||
bind-key -T copy-mode-vi C-j select-pane -D
|
||||
bind-key -T copy-mode-vi C-k select-pane -U
|
||||
bind-key -T copy-mode-vi C-l select-pane -R
|
||||
bind-key -T copy-mode-vi C-h send-keys -X cursor-left
|
||||
bind-key -T copy-mode-vi C-j send-keys -X copy-pipe-and-cancel
|
||||
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel
|
||||
bind-key -T copy-mode-vi C-u send-keys -X halfpage-up
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi C-y send-keys -X scroll-up
|
||||
bind-key -T copy-mode-vi Escape send-keys -X clear-selection
|
||||
bind-key -T copy-mode-vi C-\ select-pane -l
|
||||
bind-key -T copy-mode-vi Space send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi ! send-keys -X copy-pipe-and-cancel "tr -d '
|
||||
' | pbcopy"
|
||||
@@ -158,7 +155,7 @@ bind-key -T copy-mode-vi \{ send-keys -X previous-paragraph
|
||||
bind-key -T copy-mode-vi \} send-keys -X next-paragraph
|
||||
bind-key -T copy-mode-vi MouseDown1Pane select-pane
|
||||
bind-key -T copy-mode-vi MouseDrag1Pane select-pane \; send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel pbcopy
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
|
||||
bind-key -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 5 scroll-up
|
||||
bind-key -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 5 scroll-down
|
||||
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
|
||||
@@ -174,28 +171,20 @@ bind-key -T copy-mode-vi M-x send-keys -X jump-to-mark
|
||||
bind-key -T copy-mode-vi M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer"
|
||||
bind-key -T copy-mode-vi C-Up send-keys -X scroll-up
|
||||
bind-key -T copy-mode-vi C-Down send-keys -X scroll-down
|
||||
bind-key -T join-pane \" run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-v'"
|
||||
bind-key -T join-pane \% run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-h'"
|
||||
bind-key -T join-pane - run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-v'"
|
||||
bind-key -T join-pane @ run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-b'"
|
||||
bind-key -T join-pane f run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-b'"
|
||||
bind-key -T join-pane h run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-h'"
|
||||
bind-key -T join-pane v run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-v'"
|
||||
bind-key -T join-pane | run-shell "'/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh' 'join-pane' '-b' '-h'"
|
||||
bind-key -T prefix C-Space run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/promote_window.sh '#{session_name}' '#{window_id}' '#{window_name}' '#{pane_current_path}'"
|
||||
bind-key -T prefix C-Space send-prefix
|
||||
bind-key -T prefix C-n next-window
|
||||
bind-key -T prefix C-o rotate-window
|
||||
bind-key -T prefix C-p previous-window
|
||||
bind-key -T prefix C-r run-shell /Users/ivuorinen/.config/tmux/plugins/tmux-resurrect/scripts/restore.sh
|
||||
bind-key -T prefix C-s run-shell /Users/ivuorinen/.config/tmux/plugins/tmux-resurrect/scripts/save.sh
|
||||
bind-key -T prefix C-r run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/scripts/restore.sh
|
||||
bind-key -T prefix C-s run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/scripts/save.sh
|
||||
bind-key -T prefix C-z suspend-client
|
||||
bind-key -T prefix Escape copy-mode
|
||||
bind-key -T prefix Space next-layout
|
||||
bind-key -T prefix ! 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 "%%" }
|
||||
bind-key -T prefix \% split-window -h -c "#{pane_current_path}"
|
||||
bind-key -T prefix \% split-window -h
|
||||
bind-key -T prefix & confirm-before -p "kill-window #W? (y/n)" kill-window
|
||||
bind-key -T prefix \' command-prompt -T window-target -p index { select-window -t ":%%" }
|
||||
bind-key -T prefix ( switch-client -p
|
||||
@@ -220,40 +209,42 @@ bind-key -T prefix < display-menu -T "#[align=centre
|
||||
bind-key -T prefix = choose-buffer -Z
|
||||
bind-key -T prefix > display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -x P -y P "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < { send-keys -X history-top } "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > { send-keys -X history-bottom } '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r { if-shell -F "#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}" "copy-mode -t=" ; send-keys -X -t = search-backward "#{q:mouse_word}" } "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y { copy-mode -q ; send-keys -l "#{q:mouse_word}" } "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c { copy-mode -q ; set-buffer "#{q:mouse_word}" } "#{?mouse_line,Copy Line,}" l { copy-mode -q ; set-buffer "#{q:mouse_line}" } '' "Horizontal Split" h { split-window -h } "Vertical Split" v { split-window -v } '' "#{?#{>:#{window_panes},1},,-}Swap Up" u { swap-pane -U } "#{?#{>:#{window_panes},1},,-}Swap Down" d { swap-pane -D } "#{?pane_marked_set,,-}Swap Marked" s { swap-pane } '' Kill X { kill-pane } Respawn R { respawn-pane -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z { resize-pane -Z }
|
||||
bind-key -T prefix ? list-keys -N
|
||||
bind-key -T prefix @ run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/promote_pane.sh '#{session_name}' '#{pane_id}' '#{pane_current_path}'"
|
||||
bind-key -T prefix C run-shell /Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/new_session_prompt.sh
|
||||
bind-key -T prefix @ run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/scripts/promote_pane.sh '#{session_name}' '#{pane_id}' '#{pane_current_path}'"
|
||||
bind-key -T prefix C run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/scripts/new_session_prompt.sh
|
||||
bind-key -T prefix D choose-client -Z
|
||||
bind-key -T prefix E select-layout -E
|
||||
bind-key -T prefix I run-shell /Users/ivuorinen/.config/tmux/plugins/tpm/bindings/install_plugins
|
||||
bind-key -T prefix I run-shell $HOME/.dotfiles/config/tmux/plugins/tpm/bindings/install_plugins
|
||||
bind-key -T prefix L switch-client -l
|
||||
bind-key -T prefix M select-pane -M
|
||||
bind-key -T prefix N new-window
|
||||
bind-key -T prefix R run-shell " tmux source-file /Users/ivuorinen/.config/tmux/tmux.conf > /dev/null; tmux display-message 'Sourced /Users/ivuorinen/.config/tmux/tmux.conf!'"
|
||||
bind-key -T prefix R run-shell " \
|
||||
tmux source-file ~/.tmux.conf > /dev/null; \
|
||||
tmux display-message \"Sourced .tmux.conf!\""
|
||||
bind-key -T prefix S switch-client -l
|
||||
bind-key -T prefix U run-shell /Users/ivuorinen/.config/tmux/plugins/tpm/bindings/update_plugins
|
||||
bind-key -T prefix X run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/kill_session_prompt.sh '#{session_name}' '#{session_id}'"
|
||||
bind-key -T prefix Y run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-yank/scripts/copy_pane_pwd.sh
|
||||
bind-key -T prefix U run-shell $HOME/.dotfiles/config/tmux/plugins/tpm/bindings/update_plugins
|
||||
bind-key -T prefix X run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/scripts/kill_session_prompt.sh '#{session_name}' '#{session_id}'"
|
||||
bind-key -T prefix Y run-shell -b $HOME/.dotfiles/config/tmux/plugins/tmux-yank/scripts/copy_pane_pwd.sh
|
||||
bind-key -T prefix ] paste-buffer -p
|
||||
bind-key -T prefix c new-window
|
||||
bind-key -T prefix d detach-client
|
||||
bind-key -T prefix f command-prompt { find-window -Z "%%" }
|
||||
bind-key -T prefix g run-shell /Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/goto_session.sh
|
||||
bind-key -T prefix g run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/scripts/goto_session.sh
|
||||
bind-key -T prefix h select-pane -L
|
||||
bind-key -T prefix i display-message
|
||||
bind-key -T prefix j select-pane -D
|
||||
bind-key -T prefix k select-pane -U
|
||||
bind-key -T prefix l run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-fzf/main.sh
|
||||
bind-key -T prefix m run-shell /Users/ivuorinen/.config/tmux/plugins/tmux-menus/items/main.sh
|
||||
bind-key -T prefix l select-pane -R
|
||||
bind-key -T prefix m run-shell $HOME/.dotfiles/config/tmux/plugins/tmux-menus/items/main.sh
|
||||
bind-key -T prefix n next-window
|
||||
bind-key -T prefix o select-pane -t :.+
|
||||
bind-key -T prefix p paste-buffer
|
||||
bind-key -T prefix q display-panes
|
||||
bind-key -T prefix r source-file /Users/ivuorinen/.dotfiles/config/tmux/tmux.conf \; display-message "tmux cfg reloaded!"
|
||||
bind-key -T prefix r source-file $HOME/.dotfiles/config/tmux/tmux.conf \; display-message "tmux cfg reloaded!"
|
||||
bind-key -T prefix s choose-tree -Zs
|
||||
bind-key -T prefix t run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh 'join-pane' '-b'"
|
||||
bind-key -T prefix t clock-mode
|
||||
bind-key -T prefix w choose-tree -Zw
|
||||
bind-key -T prefix x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||
bind-key -T prefix y run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-yank/scripts/copy_line.sh
|
||||
bind-key -T prefix y run-shell -b $HOME/.dotfiles/config/tmux/plugins/tmux-yank/scripts/copy_line.sh
|
||||
bind-key -T prefix z resize-pane -Z
|
||||
bind-key -T prefix \{ swap-pane -U
|
||||
bind-key -T prefix \} swap-pane -D
|
||||
@@ -269,10 +260,11 @@ bind-key -T prefix M-2 select-layout even-vertical
|
||||
bind-key -T prefix M-3 select-layout main-horizontal
|
||||
bind-key -T prefix M-4 select-layout main-vertical
|
||||
bind-key -T prefix M-5 select-layout tiled
|
||||
bind-key -T prefix M-c attach-session -c "#{pane_current_path}"
|
||||
bind-key -T prefix M-n next-window -a
|
||||
bind-key -T prefix M-o rotate-window -D
|
||||
bind-key -T prefix M-p previous-window -a
|
||||
bind-key -T prefix M-u run-shell /Users/ivuorinen/.config/tmux/plugins/tpm/bindings/clean_plugins
|
||||
bind-key -T prefix M-u run-shell $HOME/.dotfiles/config/tmux/plugins/tpm/bindings/clean_plugins
|
||||
bind-key -r -T prefix M-Up resize-pane -U 5
|
||||
bind-key -r -T prefix M-Down resize-pane -D 5
|
||||
bind-key -r -T prefix M-Left resize-pane -L 5
|
||||
@@ -285,11 +277,6 @@ bind-key -r -T prefix S-Up refresh-client -U 10
|
||||
bind-key -r -T prefix S-Down refresh-client -D 10
|
||||
bind-key -r -T prefix S-Left refresh-client -L 10
|
||||
bind-key -r -T prefix S-Right refresh-client -R 10
|
||||
bind-key -T root C-h if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-h" "select-pane -L"
|
||||
bind-key -T root C-j if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-j" "select-pane -D"
|
||||
bind-key -T root C-k if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-k" "select-pane -U"
|
||||
bind-key -T root C-l if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-l" "select-pane -R"
|
||||
bind-key -T root C-\ if-shell "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(S+/)?g?(view|l?n?vim?x?)(diff)?$'" "send-keys C-\\" "select-pane -l"
|
||||
bind-key -T root MouseDown1Pane select-pane -t = \; send-keys -M
|
||||
bind-key -T root MouseDown1Status select-window -t =
|
||||
bind-key -T root MouseDown2Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { paste-buffer -p }
|
||||
@@ -303,14 +290,12 @@ bind-key -T root WheelUpStatus previous-window
|
||||
bind-key -T root WheelDownStatus next-window
|
||||
bind-key -T root DoubleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -H ; send-keys -X select-word ; run-shell -d 0.3 ; send-keys -X copy-pipe-and-cancel }
|
||||
bind-key -T root TripleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -H ; send-keys -X select-line ; run-shell -d 0.3 ; send-keys -X copy-pipe-and-cancel }
|
||||
bind-key -T root M-H previous-window
|
||||
bind-key -T root M-L next-window
|
||||
bind-key -T root M-MouseDown3Pane display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -t = -x M -y M "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < { send-keys -X history-top } "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > { send-keys -X history-bottom } '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r { if-shell -F "#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}" "copy-mode -t=" ; send-keys -X -t = search-backward "#{q:mouse_word}" } "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y { copy-mode -q ; send-keys -l "#{q:mouse_word}" } "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c { copy-mode -q ; set-buffer "#{q:mouse_word}" } "#{?mouse_line,Copy Line,}" l { copy-mode -q ; set-buffer "#{q:mouse_line}" } '' "Horizontal Split" h { split-window -h } "Vertical Split" v { split-window -v } '' "#{?#{>:#{window_panes},1},,-}Swap Up" u { swap-pane -U } "#{?#{>:#{window_panes},1},,-}Swap Down" d { swap-pane -D } "#{?pane_marked_set,,-}Swap Marked" s { swap-pane } '' Kill X { kill-pane } Respawn R { respawn-pane -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z { resize-pane -Z }
|
||||
bind-key -T root M-Up select-pane -U
|
||||
bind-key -T root M-Down select-pane -D
|
||||
bind-key -T root M-Left select-pane -L
|
||||
bind-key -T root M-Right select-pane -R
|
||||
bind-key -T root S-Left previous-window
|
||||
bind-key -T root S-Right next-window
|
||||
bind-key -T root C-Tab previous-window
|
||||
bind-key -T root C-S-Tab next-window
|
||||
```
|
||||
|
||||
|
||||
@@ -9,13 +9,19 @@ export DOTFILES="$HOME/.dotfiles"
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -r "$file" ] && [ -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"
|
||||
done
|
||||
HOST="$(hostname -s)"
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
# global (exports|alias|functions) file for all hosts
|
||||
# shellcheck source=../../../config/exports
|
||||
[ -r "$file" ] && source "$file"
|
||||
# shellcheck source=../../../config/exports
|
||||
[ -r "$file-secret" ] && source "$file-secret"
|
||||
# shellcheck source=../../../config/exports
|
||||
[ -r "$file-$HOST" ] && source "$file-$HOST"
|
||||
# shellcheck source=../../../config/exports
|
||||
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
|
||||
@@ -24,14 +30,16 @@ export LC_ALL=fi_FI.utf8
|
||||
|
||||
export RVM_PATH="$HOME/.rvm"
|
||||
export PATH="$RVM_PATH/bin:$PATH"
|
||||
# shellcheck source=$HOME/.rvm/scripts/rvm
|
||||
[[ -s "$RVM_PATH/scripts/rvm" ]] && source "$RVM_PATH/scripts/rvm" # Load RVM into a shell session *as a function*
|
||||
|
||||
# Try to load antigen, if present
|
||||
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||
# shellcheck source=$HOME/.local/bin/antigen.zsh
|
||||
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||
|
||||
# If antigen was loaded
|
||||
if command -v antigen &> /dev/null; then
|
||||
if command -v antigen &>/dev/null; then
|
||||
antigen use oh-my-zsh
|
||||
|
||||
# config/functions
|
||||
@@ -47,4 +55,5 @@ alias nano='nano -wS -$'
|
||||
alias gpg=gpg2
|
||||
|
||||
ACME_PATH="$HOME/.acme.sh"
|
||||
# shellcheck source=$HOME/.acme.sh/acme.sh.env
|
||||
[[ -s "$ACME_PATH/acme.sh.env" ]] && . "$ACME_PATH/acme.sh.env"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user