Compare commits

...

60 Commits

Author SHA1 Message Date
58ba14aa47 feat(docs): Added nvim keybindings cheatsheet 2023-05-31 13:08:39 +03:00
ivuorinen
a4a0d2e0f1 chore(git): Update submodules (automated)
config/nvim v3.16.2
2023-05-31 03:08:06 +00:00
c953f902ca chore(github): Updated new release cron schedule
- Updated cron schedule to match better my timezone.
- Added check for 'Create release' step
2023-05-30 11:50:00 +03:00
3d917454a0 chore(brew): Update Brewfile 2023-05-27 18:27:11 +03:00
5b34ecfb97 feat(tmux): Adds ChanderG/tmux-notify 2023-05-26 17:06:04 +03:00
1817cf6962 feat(tmux): Adds yardnsm/tmux-1password 2023-05-26 14:04:57 +03:00
bc914a1c5f feat(tmux): Adds b0o/tmux-autoreload, entr
Also fixes some minor configuration problems.
2023-05-26 13:45:44 +03:00
48b9df95ab fix(tmux): Fix tmux configs 2023-05-26 12:57:41 +03:00
2799e80b2d chore(brew): Update Brewfile 2023-05-26 12:40:12 +03:00
ivuorinen
5bbc241ec9 chore(git): Update submodules (automated)
config/nvim v3.16.0
2023-05-26 03:04:37 +00:00
5e00422a28 feat(zsh): Updated nvm-auto-use
Source: https://github.com/nvm-sh/nvm#zsh
2023-05-24 14:22:08 +03:00
ivuorinen
44eacf9261 chore(git): Update submodules (automated)
config/nvim v3.15.11
2023-05-24 03:04:45 +00:00
4f2c1f0b9b fix(github): Fix changelog config locations 2023-05-22 17:55:07 +03:00
0fdc9fd08a feat(github): Update changelog workflow and config 2023-05-22 17:52:43 +03:00
65aaa4bec2 chore(config): Update ssh/allowed_signers file 2023-05-22 16:13:45 +03:00
a8835daede chore(config): Update iterm2 configuration 2023-05-22 16:12:03 +03:00
39ddc2ae00 feat(dfm): Add dfm docs tmux
This command will update docs/tmux-keybindings.md file that contains
all configured tmux keybindings.
2023-05-22 16:11:31 +03:00
06c2686815 feat(github): Add changelog workflow config 2023-05-22 16:09:16 +03:00
b259e4b992 chore(codestyle): Code style fixes, configs 2023-05-22 15:59:58 +03:00
ivuorinen
47703cd182 chore(git): Update submodules (automated)
tmux/tpm v3.0.0
2023-05-22 03:04:40 +00:00
6d31371af4 chore(actions): Submodule update action tweaks 2023-05-22 00:40:20 +03:00
c2250ee80c chore(tmux): Update tpm 2023-05-21 14:04:03 +03:00
a1d075fc0d fix(shell): Fix LC_ALL locale 2023-05-21 13:44:39 +03:00
a3cc12aae1 feat(config): git user profile for github 2023-05-21 13:30:43 +03:00
808748a050 fix(shell): Fix tool paths from append to prepend 2023-05-21 13:30:05 +03:00
ivuorinen
e29507ee61 Update submodules (automated)
config/nvim v3.15.10
2023-05-20 15:14:36 +00:00
bd6408b024 fix(config): git user home profile config typo 2023-05-17 17:07:31 +03:00
45cf9ef2a5 Fix(github): Changelog generator fixes 2023-05-17 16:23:24 +03:00
5cc78e14e4 Fix(github): Changelog generator fixes 2023-05-17 16:15:41 +03:00
5683809e18 Feat(github): Debug changelog generation 2023-05-17 16:05:11 +03:00
723d40a704 Chore(nvim): Cleanup of nvim lsp settings
Dropped lsp configs

mason (ensure installed):
- ansiblels
- bashls
- clangd
- codeqlls
- cssls

null-ls:
- null_ls.builtins.formatting.prettierd
2023-05-17 09:28:45 +03:00
renovate[bot]
55ce79d9d1 chore(deps): update actions/github-script action to v6 (#7) 2023-05-16 07:51:55 +03:00
renovate[bot]
fdd3845cf5 chore(deps): update actions/github-script action to v5.2.0 (#6)
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 00:07:54 +03:00
3e911755d2 Feat(github): Daily version for archiving purposes 2023-05-15 20:22:46 +03:00
f3dff521f7 Feat(npm): Removed prettier from global install
prettier was being detected by nvim and run with default configuration
in projects that it shouldn't have run in. Because of that the package
should be installed only project by project basis.
2023-05-15 19:25:13 +03:00
cf1ccd6f39 Feat(cheat): personal/git-alias 2023-05-15 15:49:55 +03:00
2e963fa29e Feat(config): Deduplicate git config, add special 2023-05-15 15:49:10 +03:00
ivuorinen
f595d437c9 Update submodules (automated)
tmux/tpm v3.0.0
dotbot v1.19.1
2023-05-15 11:09:57 +00:00
e7d0b4167a fix(github): Drop GPG -S from submodule commit 2023-05-15 14:09:15 +03:00
f20fe04ed8 Feat(github): git submodule update workflow 2023-05-15 13:58:59 +03:00
2b78d648c2 Chore(git): Update gitmodules to follow tags 2023-05-15 13:40:34 +03:00
ae2deef5fa fix(github): Fix dependabot configuration 2023-05-15 13:29:38 +03:00
8fc60ade75 Feat(github): GitHub Actions Update workflow 2023-05-15 13:26:35 +03:00
34160d34dc Feat(config): Taskwarrior configuration 2023-05-15 13:24:45 +03:00
5fab8e1cab Feat(github): Submodule update workflow 2023-05-15 13:23:54 +03:00
1a612fef62 Chore(nvim): Cleanup of nvim plugins 2023-05-15 13:22:50 +03:00
ce5e9681fd Chore(packages): Removal of standardjs 2023-05-15 11:04:33 +03:00
cab855380f feat(nvim): Update astronvim to v3.15.6 2023-05-11 17:31:07 +03:00
e7578e4905 Chore(scripts): Simplification and documentation 2023-05-10 02:07:27 +03:00
3fce0ac4dc fix(scripts): Fix x-backup-folder error prone code 2023-05-10 00:30:33 +03:00
b89213ffb5 Chore(lint): markdownlint config changes, tweak 2023-05-08 20:44:45 +03:00
823e9cc381 Feat(tools): nb 2023-05-08 20:43:59 +03:00
8be55a7c76 Chore(lint): markdownlint config 2023-05-08 14:14:46 +03:00
f4fb53abaa Chore(lint): Change name for Codacy 2023-05-08 13:24:47 +03:00
66c31c3d3f Chore(tools): Added phpcs & fixed x-quota-usage 2023-05-08 13:01:28 +03:00
1a8c32bf4c Chore(iterm2): Config update 2023-05-08 12:18:33 +03:00
864fbc18da feat(dfm): Install cheat databases with dfm 2023-05-08 12:18:10 +03:00
b688ee7503 Chore(tools): Moved dotbot under tools 2023-05-08 12:16:45 +03:00
9dfb7a3c4a Chore: Added .gitkeep files to cheatsheet folders 2023-05-08 11:30:18 +03:00
192ca6d26c Chore(cheat): use fzf with cheat 2023-05-08 09:10:21 +03:00
67 changed files with 1456 additions and 365 deletions

3
.actrc Normal file
View File

@@ -0,0 +1,3 @@
--container-architecture linux/amd64
--env-file .env
--secret-file .env

View File

@@ -8,10 +8,17 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.php]
indent_size = 4
[.git{ignore,modules}]
indent_style = tab
indent_size = 1
[*.plist]
indent_size = 1
indent_style = tab
[local/bin/*]
shell_variant = bash # --language-variant
binary_next_line = true

8
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

35
.github/tag-changelog-config.js vendored Normal file
View File

@@ -0,0 +1,35 @@
module.exports = {
types: [
{ types: ['feat', 'feature', 'Feat'], label: '🎉 New Features' },
{ types: ['fix', 'bugfix', 'Fix'], label: '🐛 Bugfixes' },
{ types: ['improvements', 'enhancement'], label: '🔨 Improvements' },
{ types: ['perf'], label: '🏎️ Performance Improvements' },
{ types: ['build', 'ci'], label: '🏗️ Build System' },
{ types: ['refactor'], label: '🪚 Refactors' },
{ types: ['doc', 'docs'], label: '📚 Documentation Changes' },
{ types: ['test', 'tests'], label: '🔍 Tests' },
{ types: ['style', 'codestyle'], label: '💅 Code Style Changes' },
{ types: ['chore', 'Chore'], label: '🧹 Chores' },
{ types: ['other', 'Other'], label: 'Other Changes' },
],
excludeTypes: [],
renderTypeSection: function (label, commits) {
let text = `\n## ${ label }\n\n`
commits.forEach((commit) => {
const scope = commit.scope ? `**${ commit.scope }:** ` : ''
text += `- ${ scope }${ commit.subject }\n`
})
return text
},
renderChangelog: function (release, changes) {
const now = new Date()
const d = now.toISOString().substring(0, 10);
const header = `# ${ release } - ${ d }\n`;
return header + changes + '\n\n'
},
}

23
.github/workflows/changelog.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
---
name: Debug Changelog # Workflow name displayed on GitHub
on:
workflow_dispatch: # Trigger manually
jobs:
debug-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/tag-changelog-config.js
- name: "Echo results"
id: output-changelog
run: |
echo "${{ steps.changelog.outputs.changes }}"

41
.github/workflows/new-release.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
---
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
outputs:
created: ${{ steps.daily-version.outputs.created }}
version: ${{ steps.daily-version.outputs.version }}
steps:
- uses: actions/checkout@v3 # Checkout our working repository
- name: Create tag if necessary
uses: fregante/daily-version-action@v2
id: daily-version
- name: Create changelog text
if: steps.daily-version.outputs.created
id: changelog
uses: loopwerk/tag-changelog@v1
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.daily-version.outputs.version }}
release_name: Release ${{ steps.daily-version.outputs.version }}
body: ${{ steps.changelog.outputs.changes }}

40
.github/workflows/update-submodules.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Update submodules
on:
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
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)
$(git submodule --quiet foreach \
'tag="$(git describe --tags --abbrev=0 origin/HEAD)"
if [ "$(git describe --tags)" != "$tag" ]; then
git checkout --quiet "$tag"
echo "$name" "$tag"
fi')"
then
git show --raw
git push
fi

3
.gitignore vendored
View File

@@ -7,3 +7,6 @@ Brewfile.lock.json
config/fzf
config/cheat/cheatsheets/pure-bash-bible/*
config/cheat/cheatsheets/tldr/*
!.gitkeep
.env

7
.gitmodules vendored
View File

@@ -1,16 +1,16 @@
# vim: set expandtab:
[submodule "dotbot"]
path = dotbot
path = tools/dotbot
url = https://github.com/anishathalye/dotbot.git
ignore = dirty
[submodule "dotbot-brew"]
path = dotbot-brew
path = tools/dotbot-brew
url = https://github.com/wren/dotbot-brew.git
ignore = dirty
[submodule "dotbot-include"]
path = dotbot-include
path = tools/dotbot-include
url = https://gitlab.com/gnfzdz/dotbot-include.git
ignore = dirty
@@ -18,7 +18,6 @@
path = config/nvim
url = https://github.com/AstroNvim/AstroNvim.git
ignore = dirty
branch = main
shallow = true
[submodule "cheat-community"]

19
.markdownlint.json Normal file
View File

@@ -0,0 +1,19 @@
{
"extends": "markdownlint/style/prettier",
"code-block-style": {
"style": "fenced"
},
"code-fence-style": {
"style": "backtick"
},
"heading-style": {
"style": "atx"
},
"no-duplicate-heading": {
"siblings_only": true
},
"required-headings": false,
"ul-style": {
"style": "dash"
}
}

5
.markdownlintignore Normal file
View File

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

View File

@@ -15,6 +15,9 @@ tap "mongodb/brew"
tap "shivammathur/extensions"
tap "shivammathur/php"
tap "teamookla/speedtest"
tap "xwmx/taps"
# Run your GitHub Actions locally 🚀
brew "act"
# Interpreted, interactive, object-oriented programming language
brew "python@3.11"
# Automate deployment, configuration, and upgrading
@@ -61,6 +64,8 @@ brew "curl"
brew "difftastic"
# Tool for exploring each layer in a docker image
brew "dive"
# Lightweight DNS forwarder and DHCP server
brew "dnsmasq"
# Command-line DNS client
brew "dog"
# Lightning-fast linter for .env files written in Rust
@@ -69,6 +74,8 @@ brew "dotenv-linter"
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
@@ -81,6 +88,8 @@ brew "freetds"
brew "fswatch"
# Command-line fuzzy finder written in Go
brew "fzf"
# Graphics library to dynamically manipulate images
brew "gd"
# Disk usage analyzer with console interface written in Go
brew "gdu", link: false
# GitHub command-line tool
@@ -113,6 +122,8 @@ brew "netpbm"
brew "icu4c"
# OpenType text shaping engine
brew "harfbuzz"
# Framework for layout and rendering of i18n text
brew "pango"
# Library to render SVG files using Cairo
brew "librsvg"
# Graph visualization software from AT&T and Bell Labs
@@ -127,6 +138,10 @@ brew "hadolint"
brew "htop"
# Website copier/offline browser
brew "httrack"
# Configurable static site generator
brew "hugo"
# ISO/IEC 23008-12:2017 HEIF file format decoder and encoder
brew "libheif"
# Tools and libraries to manipulate images in many formats
brew "imagemagick"
# Lightweight and flexible command-line JSON processor
@@ -149,14 +164,18 @@ brew "mas"
brew "midnight-commander"
# 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"
# Generate clients, server & docs from an OpenAPI spec (v2, v3)
brew "openapi-generator"
# Development kit for the Java programming language
brew "openjdk"
# Swiss-army knife of markup format conversion
brew "pandoc"
# Highly capable, feature-rich programming language
@@ -189,6 +208,10 @@ brew "shfmt"
brew "starship"
# Version control system designed to be a better CVS
brew "subversion"
# Feature-rich console based todo list manager
brew "task"
# Terminal user interface for taskwarrior
brew "taskwarrior-tui"
# Send macOS User Notifications from the command-line
brew "terminal-notifier", link: false
# Tool to build, change, and version infrastructure
@@ -237,6 +260,8 @@ brew "gesquive/tap/git-user"
brew "jesseduffield/lazygit/lazygit"
# High-performance, schema-free, document-oriented database
brew "mongodb/brew/mongodb-community"
# Imagick PHP extension
brew "shivammathur/extensions/imagick@8.2"
# Xdebug PHP extension
brew "shivammathur/extensions/xdebug@7.4"
# Xdebug PHP extension
@@ -253,10 +278,14 @@ brew "shivammathur/php/php@8.0"
brew "teamookla/speedtest/speedtest"
# Command-line helper for the 1Password password manager
cask "1password-cli"
# Turn audio CDs and files into audiobooks
cask "audiobook-builder"
# Text editor
cask "coda"
# Universal database tool and SQL client
cask "dbeaver-community"
# Database version management tool
cask "dbngin"
# App to build and share containerized applications and microservices
cask "docker"
# Reimagine your terminal
@@ -293,6 +322,8 @@ cask "monofocus"
cask "neovide"
# Reverse proxy, secure introspectable tunnels to localhost
cask "ngrok"
# Knowledge base that works on top of a local folder of plain text Markdown files
cask "obsidian"
# Scheduling application focusing on organization
cask "omnifocus"
# Collaboration platform for API development
@@ -313,6 +344,10 @@ cask "quitter"
cask "raycast"
# Move and resize windows using keyboard shortcuts or snap areas
cask "rectangle"
# GUI for rsync
cask "rsyncosx"
# GUI for rsync
cask "rsyncui"
# MySQL/MariaDB database management
cask "sequel-ace"
# Collection of apps available by subscription
@@ -338,5 +373,9 @@ cask "whalebird"
# View output from scripts in the menu bar
cask "xbar"
mas "1Password for Safari", id: 1569813296
mas "Audiobook Builder", id: 1437681957
mas "Flow", id: 1423210932
mas "Keynote", id: 409183694
mas "Numbers", id: 409203825
mas "Pages", id: 409201541
mas "Tailscale", id: 1475387142

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git dotbot-brew
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git dotbot-include
git submodule add --name dotbot -f https://github.com/anishathalye/dotbot.git tools/dotbot
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

View File

@@ -4,4 +4,9 @@ email = ismo.vuorinen@vincit.fi
[home]
name = Ismo Vuorinen
email = ismo@vuorinen.net
email = ismo@ivuorinen.net
[github]
name = ivuorinen
email = ivuorinen@users.noreply.github.com

18
base/nbrc Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
###############################################################################
# .nbrc
#
# Configuration file for `nb`, a command line note-taking, bookmarking,
# and knowledge base application with encryption, search, Git-backed syncing,
# and more in a single portable script.
#
# Edit this file manually or manage settings using the `nb settings`
# subcommand. Configuration options are set as environment variables, eg:
# export NB_ENCRYPTION_TOOL=gpg
#
# https://github.com/xwmx/nb
###############################################################################
export NB_DIR="${NB_DIR:-$HOME/.local/state/nb}" # Set by `nb` • Mon May 8 15:25:12 EEST 2023
export NB_COLOR_THEME="${NB_COLOR_THEME:-unicorn}" # Set by `nb` • Mon May 8 15:41:22 EEST 2023

View File

@@ -5,6 +5,10 @@ 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
@@ -43,4 +47,6 @@ have antigen && {
# starship is present
have starship && eval "$(starship init zsh)"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh

View File

@@ -20,11 +20,17 @@ return { -- Add the community repository of plugin specific
"m4xshen/smartcolumn.nvim",
opts = {
colorcolumn = { "80", "100", "120" },
disabled_filetypes = { "help", "text", "markdown" },
disabled_filetypes = { "help", "text", "markdown", "json" },
},
},
{ import = "astrocommunity.diagnostics.lsp_lines-nvim" },
{ 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" },
@@ -33,7 +39,6 @@ return { -- Add the community repository of plugin specific
{ import = "astrocommunity.markdown-and-latex.glow-nvim" },
{ import = "astrocommunity.motion.harpoon" },
{ import = "astrocommunity.pack.php" },
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.project.neoconf-nvim" },
{ import = "astrocommunity.project.nvim-spectre" },
{ import = "astrocommunity.project.project-nvim" },

View File

@@ -5,25 +5,7 @@ return { -- use mason-lspconfig to configure LSP installations
-- overrides `require("mason-lspconfig").setup(...)`
opts = {
ensure_installed = {
"ansiblels",
"bashls",
"clangd",
"codeqlls",
"cssls",
"diagnosticls",
"docker_compose_language_service",
"dockerls",
"eslint",
"graphql",
"html",
"intelephense",
"jsonls",
"psalm",
"stylelint_lsp",
"tailwindcss",
"tsserver",
"vuels",
"yamlls",
},
},
}, -- use mason-null-ls to configure Formatters/Linter installation for null-ls sources

View File

@@ -26,7 +26,6 @@ return {
null_ls.builtins.diagnostics.psalm,
null_ls.builtins.diagnostics.semgrep,
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.standardjs,
null_ls.builtins.diagnostics.stylelint,
null_ls.builtins.diagnostics.tfsec,
null_ls.builtins.diagnostics.trail_space,
@@ -43,7 +42,6 @@ return {
null_ls.builtins.formatting.isort,
null_ls.builtins.formatting.jq,
null_ls.builtins.formatting.phpcsfixer,
null_ls.builtins.formatting.prettierd,
null_ls.builtins.formatting.shfmt.with {
args = { "-i", "1", "-bn", "-ci", "-sr", "-kb", "-fn" },
},

View File

@@ -0,0 +1,43 @@
---
tags: [ vcs, alias ]
---
# git branchbydate
List repository branches by date when last updated and extra information.
# git branchcolor
List repository branches sorted by when they were last updated.
# git llog
Show log with fuller information.
# git logs
Git logs with detailed information and git tree.
# git nah
Reset all changes.
# git reset-origin
Reset to origin.
# git reset-upstream
Hard reset to upstream master.
# git rl
Colored reflog.
# git tagdate
List tags in date order and with graph.
# git undo-commit
Undoes last commit.

View File

View File

@@ -25,9 +25,9 @@ export HOMEBREW_PKG="$HOMEBREW/opt"
export HOMEBREW_NO_ENV_HINTS=1
path_append "/usr/local/bin"
path_append "$HOMEBREW_SBIN"
path_append "$HOMEBREW_BIN"
path_append "$XDG_BIN_HOME"
path_prepend "$HOMEBREW_SBIN"
path_prepend "$HOMEBREW_BIN"
path_prepend "$XDG_BIN_HOME"
# brew, https://brew.sh
have brew && {

View File

@@ -72,6 +72,12 @@ have irssi && {
x-dc "$IRSSI_CONFIG_HOME"
}
# nb, https://xwmx.github.io/nb/
have nb && {
export NB_DIR="$XDG_STATE_HOME/nb"
x-dc "$NB_DIR"
}
# nvm, the node version manager
export NVM_LAZY_LOAD=true
export NVM_COMPLETION=true
@@ -80,6 +86,12 @@ 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
# Add npm packages to path
have node && {
NVM_NODE_BIN_DIR="$(dirname "$(which node)")"
path_append "$NVM_NODE_BIN_DIR"
}
# op (1Password cli) is present
have op && {
export OP_CACHE="$XDG_STATE_HOME/1password"
@@ -109,5 +121,6 @@ export _Z_DATA="$XDG_STATE_HOME/z"
export ANDROID_HOME="$XDG_DATA_HOME/android"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
export TMUX_CONF="$DOTFILES/config/tmux/tmux.conf"
export TMUX_CONF="$XDG_CONFIG_HOME/tmux/tmux.conf"
export BAT_THEME="ansi"
export CHEAT_USE_FZF=true

View File

@@ -4,7 +4,7 @@
# vim: filetype=zsh
source "$DOTFILES/scripts/shared.sh"
export LC_ALL=fi_FI.utf8
export LC_ALL=fi_FI.UTF-8
# Bash completion file location
export BASH_COMPLETION_USER_FILE="${XDG_CONFIG_HOME}/bash-completion/bash_completion"

View File

@@ -89,7 +89,6 @@ x-default-antigen-bundles()
antigen bundle command-not-found
antigen bundle ssh-agent
antigen bundle MichaelAquilina/zsh-you-should-use
antigen bundle Sparragus/zsh-auto-nvm-use
antigen bundle jreese/zsh-titles
antigen bundle unixorn/autoupdate-antigen.zshplugin
antigen bundle zsh-users/zsh-completions
@@ -101,6 +100,7 @@ x-default-antigen-bundles()
have docker-compose && antigen bundle sroze/docker-compose-zsh-plugin
have jq && antigen bundle reegnz/jq-zsh-plugin
have nvm && antigen bundle nvm
have nvm && antigen bundle $DOTFILES/config/zsh/plugins/nvm-auto-use
have php && antigen bundle php
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
have rvm && antigen bundle unixorn/rvm-plugin

View File

@@ -1,59 +1,7 @@
[include]
path = ~/.dotfiles/config/git/shared
[user]
name = Ismo Vuorinen
email = ismo@ivuorinen.net
[credential]
helper = store --file ~/.cache/git/git-credentials
helper = cache --timeout 30000
[core]
excludesfile = ~/.config/git/gitignore
[alias]
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
nah = !git reset --hard && git clean -df
undo-commit = reset HEAD~ --soft
llog = log --pretty=fuller
logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
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\"
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]++'"
[diff]
tool = difftastic
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
[pull]
rebase = true
[color]
ui = true
diff = auto
branch = auto
status = auto
[color "status"]
added = green bold
changed = yellow
deleted = red bold strike
untracked = cyan
branch = yellow black bold ul
[submodule]
recurse = true

62
config/git/shared Normal file
View File

@@ -0,0 +1,62 @@
[credential]
helper = store --file ~/.cache/git/git-credentials
helper = cache --timeout 30000
[core]
excludesfile = ~/.config/git/gitignore
[init]
defaultBranch = main
[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]++'"
llog = log --pretty=fuller
logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
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
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
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[diff]
tool = difftastic
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[color]
ui = true
diff = auto
branch = auto
status = auto
[color "status"]
added = green bold
changed = yellow
deleted = red bold strike
untracked = cyan
branch = yellow black bold ul
[submodule]
recurse = true
# dotfiles special config
[includeIf "hasconfig:remote.*.url:https://github.com/ivuorinen/dotfiles.git"]
path = ~/.dotfiles/config/git/special/dotfiles ;

View File

@@ -0,0 +1,2 @@
[submodule]
recurse = false

View File

@@ -1089,7 +1089,7 @@
<key>Send Code When Idle</key>
<false/>
<key>Set Local Environment Vars</key>
<false/>
<true/>
<key>Shortcut</key>
<string>T</string>
<key>Show Status Bar</key>
@@ -1230,6 +1230,8 @@
<string>kNextWindowPointerAction</string>
</dict>
</dict>
<key>PromptOnQuit</key>
<false/>
<key>SmartPlacement</key>
<true/>
<key>SoundForEsc</key>

View File

@@ -3,8 +3,6 @@ corepack
editorconfig-checker
github-release-notes
neovim
prettier
standardjs
stylelint-lsp
tldr

44
config/task/taskrc Normal file
View File

@@ -0,0 +1,44 @@
# [Created by task 2.6.2 5/11/2023 09:33:14]
# Taskwarrior program configuration file.
# For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color',
# 'man task-sync' or 'man taskrc'
# Here is an example of entries that use the default, override and blank values
# variable=foo -- By specifying a value, this overrides the default
# variable= -- By specifying no value, this means no default
# #variable=foo -- By commenting out the line, or deleting it, this uses the default
# You can also refence environment variables:
# variable=$HOME/task
# variable=$VALUE
# Use the command 'task show' to see all defaults and overrides
# Files
data.location=$XDG_DATA_HOME/task/
# To use the default location of the XDG directories,
# move this configuration file from ~/.taskrc to ~/.config/task/taskrc and uncomment below
#data.location=$XDG_DATA_HOME/task
#hooks.location=~/.config/task/hooks
# Color theme (uncomment one to use)
#include light-16.theme
#include light-256.theme
#include dark-16.theme
#include dark-256.theme
#include dark-red-256.theme
#include dark-green-256.theme
#include dark-blue-256.theme
#include dark-violets-256.theme
#include dark-yellow-green.theme
#include dark-gray-256.theme
#include dark-gray-blue-256.theme
#include solarized-dark-256.theme
#include solarized-light-256.theme
#include no-color.theme
weekstart=monday
news.version=2.6.0

View File

@@ -4,6 +4,23 @@
# - 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
@@ -44,7 +61,7 @@ bind -n M-H previous-window
bind -n M-L next-window
# Reload tmux config with <prefix> + r
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux cfg reloaded!"
bind r source-file ~/.config/tmux/tmux.conf \; display "tmux cfg reloaded!"
# Open a new window with <prefix> + N
bind N new-window
@@ -54,6 +71,9 @@ bind N new-window
## https://github.com/jaclu/tmux-menus
set -g @menus_trigger 'm'
## 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
@@ -66,20 +86,14 @@ 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"
## Install plugins, starting with plugin manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'jaclu/tmux-menus'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'sainnhe/tmux-fzf'
## https://github.com/ChanderG/tmux-notify
set -g @tnotify-verbose 'on'
# set vi-mode
set-window-option -g mode-keys vi
@@ -108,4 +122,3 @@ bind p paste-buffer
# Finally run the tmux plugin manager
run '~/.config/tmux/plugins/tpm/tpm'

174
config/zsh/completion/_nb Normal file
View File

@@ -0,0 +1,174 @@
#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 "$@"

View File

@@ -0,0 +1,27 @@
# shellcheck shell=zsh
# Source: https://github.com/nvm-sh/nvm#zsh
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local nvmrc_path
nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version
nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$(nvm version)" ]; then
nvm use
fi
elif [ -n "$(PWD=$OLDPWD nvm_find_nvmrc)" ] && [ "$(nvm version)" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc

220
docs/nvim-keybindings.md Normal file
View File

@@ -0,0 +1,220 @@
# nvim keybindings
```md
n ! * <Cmd>lua require("which-key").show("!", {mode = "n", auto = true})<CR>
n ' * <Cmd>lua require("which-key").show("'", {mode = "n", auto = true})<CR>
n " * <Cmd>lua require("which-key").show("\"", {mode = "n", auto = true})<CR>
n [ * <Cmd>lua require("which-key").show("[", {mode = "n", auto = true})<CR>
n [b * <Lua 246: ~/.config/nvim/lua/astronvim/mappings.lua:54> Previous buffer
n [g * <Lua 277: ~/.config/nvim/lua/astronvim/mappings.lua:150> Previous Git hunk
n [t * <Lua 281: ~/.config/nvim/lua/astronvim/mappings.lua:120> Previous tab
n ] * <Cmd>lua require("which-key").show("]", {mode = "n", auto = true})<CR>
n ]b * <Lua 250: ~/.config/nvim/lua/astronvim/mappings.lua:52> Next buffer
n ]g * <Lua 278: ~/.config/nvim/lua/astronvim/mappings.lua:149> Next Git hunk
n ]t * <Lua 282: ~/.config/nvim/lua/astronvim/mappings.lua:119> Next tab
n @ * <Cmd>lua require("which-key").show("@", {mode = "n", auto = true})<CR>
n \ * <Cmd>split<CR> Horizontal Split
n & * :&&<CR> Nvim builtin
n `* <Cmd>lua require("which-key").show("`", {mode = "n", auto = true})<CR>
n < * <Cmd>lua require("which-key").show("<", {mode = "n", auto = true})<CR>
n <b * <Lua 297: ~/.config/nvim/lua/astronvim/mappings.lua:62> Move buffer tab left
n <C-'> * <Cmd>ToggleTerm<CR> Toggle terminal
n <C-Down> * <Lua 263: ~/.config/nvim/lua/astronvim/mappings.lua:213> Resize split down
n <C-H> * <Lua 266: ~/.config/nvim/lua/astronvim/mappings.lua:208> Move to left split
n <C-J> * <Lua 283: ~/.config/nvim/lua/astronvim/mappings.lua:209> Move to below split
n <C-K> * <Lua 327: ~/.config/nvim/lua/astronvim/mappings.lua:210> Move to above split
n <C-L> * <Lua 265: ~/.config/nvim/lua/astronvim/mappings.lua:211> Move to right split
n <C-Left> * <Lua 262: ~/.config/nvim/lua/astronvim/mappings.lua:214> Resize split left
n <C-N> * <Lua 79: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Goto next mark
n <C-P> * <Lua 80: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Goto previous mark
n <C-Q> * <Cmd>q!<CR> Force quit
n <C-Right> * <Lua 261: ~/.config/nvim/lua/astronvim/mappings.lua:215> Resize split right
n <C-S> * <Cmd>w!<CR> Force write
n <C-Up> * <Lua 264: ~/.config/nvim/lua/astronvim/mappings.lua:212> Resize split up
n <C-W> * <Cmd>lua require("which-key").show("\23", {mode = "n", auto = true})<CR>
n <CR> *@<Lua 391: ~/.local/share/nvim/lazy/alpha-nvim/lua/alpha.lua:705>
n <F10> * <Lua 348: ~/.config/nvim/lua/astronvim/mappings.lua:353> Debugger: Step Over
n <F11> * <Lua 333: ~/.config/nvim/lua/astronvim/mappings.lua:354> Debugger: Step Into
n <F17> * <Lua 344: ~/.config/nvim/lua/astronvim/mappings.lua:341> Debugger: Stop
n <F21> * <Lua 342: ~/.config/nvim/lua/astronvim/mappings.lua:343> Debugger: Conditional Breakpoint
n <F23> * <Lua 331: ~/.config/nvim/lua/astronvim/mappings.lua:355> Debugger: Step Out
n <F29> * <Lua 334: ~/.config/nvim/lua/astronvim/mappings.lua:350> Debugger: Restart
n <F5> * <Lua 341: ~/.config/nvim/lua/astronvim/mappings.lua:340> Debugger: Start
n <F6> * <Lua 339: ~/.config/nvim/lua/astronvim/mappings.lua:351> Debugger: Pause
n <F7> * <Cmd>ToggleTerm<CR> Toggle terminal
n <F9> * <Lua 337: ~/.config/nvim/lua/astronvim/mappings.lua:352> Debugger: Toggle Breakpoint
n <M-CR> *@<Lua 394: ~/.local/share/nvim/lazy/alpha-nvim/lua/alpha.lua:708>
n <Plug>PlenaryTestFile *:lua require('plenary.test_harness').test_directory(vim.fn.expand("%:p"))<CR>
n <Space> * <Cmd>lua require("which-key").show(" ", {mode = "n", auto = true})<CR>
n <Space>/ * <Lua 279: ~/.config/nvim/lua/astronvim/mappings.lua:139> Comment line
n <Space><Space> * <Lua 49: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Harpoon
n <Space><Space>a * <Lua 81: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Add file
n <Space><Space>e * <Lua 82: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Toggle quick menu
n <Space><Space>j * <Lua 48: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Goto to TMUX tmux window
n <Space><Space>m * <Lua 83: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Show marks in Telescope
n <Space><Space>t * <Lua 84: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Goto to terminal window
n <Space>a * <Lua 102: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Annotation
n <Space>a<CR> * <Lua 103: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Current
n <Space>ac * <Lua 104: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Class
n <Space>af * <Lua 105: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Function
n <Space>aF * <Lua 96: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> File
n <Space>at * <Lua 86: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Type
n <Space>b\ * <Lua 285: ~/.config/nvim/lua/astronvim/mappings.lua:100> Horizontal split buffer from tabline
n <Space>b| * <Lua 284: ~/.config/nvim/lua/astronvim/mappings.lua:109> Vertical split buffer from tabline
n <Space>bb * <Lua 294: ~/.config/nvim/lua/astronvim/mappings.lua:71> Select buffer from tabline
n <Space>bC * <Lua 295: ~/.config/nvim/lua/astronvim/mappings.lua:69> Close all buffers
n <Space>bc * <Lua 296: ~/.config/nvim/lua/astronvim/mappings.lua:68> Close all buffers except current
n <Space>bd * <Lua 293: ~/.config/nvim/lua/astronvim/mappings.lua:77> Delete buffer from tabline
n <Space>bD * <Lua 320: ~/.config/astronvim/lua/user/mappings.lua:13> Pick to close
n <Space>bl * <Lua 292: ~/.config/nvim/lua/astronvim/mappings.lua:85> Close all buffers to the left
n <Space>bn * <Cmd>tabnew<CR> New tab
n <Space>br * <Lua 291: ~/.config/nvim/lua/astronvim/mappings.lua:87> Close all buffers to the right
n <Space>bse * <Lua 290: ~/.config/nvim/lua/astronvim/mappings.lua:90> Sort by extension (buffers)
n <Space>bsi * <Lua 287: ~/.config/nvim/lua/astronvim/mappings.lua:96> Sort by buffer number (buffers)
n <Space>bsm * <Lua 286: ~/.config/nvim/lua/astronvim/mappings.lua:98> Sort by modification (buffers)
n <Space>bsp * <Lua 288: ~/.config/nvim/lua/astronvim/mappings.lua:94> Sort by full path (buffers)
n <Space>bsr * <Lua 289: ~/.config/nvim/lua/astronvim/mappings.lua:92> Sort by relative path (buffers)
n <Space>C * <Lua 299: ~/.config/nvim/lua/astronvim/mappings.lua:50> Force close buffer
n <Space>c * <Lua 300: ~/.config/nvim/lua/astronvim/mappings.lua:49> Close buffer
n <Space>dB * <Lua 328: ~/.config/nvim/lua/astronvim/mappings.lua:357> Clear Breakpoints
n <Space>db * <Lua 329: ~/.config/nvim/lua/astronvim/mappings.lua:356> Toggle Breakpoint (F9)
n <Space>dC * <Lua 324: ~/.config/nvim/lua/astronvim/mappings.lua:360> Conditional Breakpoint (S-F9)
n <Space>dc * <Lua 326: ~/.config/nvim/lua/astronvim/mappings.lua:358> Start/Continue (F5)
n <Space>dE * <Lua 308: ~/.config/nvim/lua/astronvim/mappings.lua:379> Evaluate Input
n <Space>dh * <Lua 305: ~/.config/nvim/lua/astronvim/mappings.lua:388> Debugger Hover
n <Space>di * <Lua 323: ~/.config/nvim/lua/astronvim/mappings.lua:367> Step Into (F11)
n <Space>dO * <Lua 321: ~/.config/nvim/lua/astronvim/mappings.lua:369> Step Out (S-F11)
n <Space>do * <Lua 322: ~/.config/nvim/lua/astronvim/mappings.lua:368> Step Over (F10)
n <Space>dp * <Lua 316: ~/.config/nvim/lua/astronvim/mappings.lua:372> Pause (F6)
n <Space>dQ * <Lua 318: ~/.config/nvim/lua/astronvim/mappings.lua:371> Terminate Session (S-F5)
n <Space>dq * <Lua 319: ~/.config/nvim/lua/astronvim/mappings.lua:370> Close Session
n <Space>dR * <Lua 312: ~/.config/nvim/lua/astronvim/mappings.lua:374> Toggle REPL
n <Space>dr * <Lua 314: ~/.config/nvim/lua/astronvim/mappings.lua:373> Restart (C-F5)
n <Space>ds * <Lua 310: ~/.config/nvim/lua/astronvim/mappings.lua:375> Run To Cursor
n <Space>du * <Lua 315: ~/.config/nvim/lua/astronvim/mappings.lua:387> Toggle Debugger UI
n <Space>e * <Cmd>Neotree toggle<CR> Toggle Explorer
n <Space>f' * <Lua 255: ~/.config/nvim/lua/astronvim/mappings.lua:241> Find marks
n <Space>f<CR> * <Lua 256: ~/.config/nvim/lua/astronvim/mappings.lua:240> Resume previous search
n <Space>fa * <Lua 254: ~/.config/nvim/lua/astronvim/mappings.lua:243> Find AstroNvim config files
n <Space>fb * <Lua 253: ~/.config/nvim/lua/astronvim/mappings.lua:263> Find buffers
n <Space>fC * <Lua 251: ~/.config/nvim/lua/astronvim/mappings.lua:266> Find commands
n <Space>fc * <Lua 252: ~/.config/nvim/lua/astronvim/mappings.lua:265> Find for word under cursor
n <Space>fF * <Lua 248: ~/.config/nvim/lua/astronvim/mappings.lua:269> Find all files
n <Space>ff * <Lua 249: ~/.config/nvim/lua/astronvim/mappings.lua:267> Find files
n <Space>fh * <Lua 247: ~/.config/nvim/lua/astronvim/mappings.lua:272> Find help
n <Space>fk * <Lua 245: ~/.config/nvim/lua/astronvim/mappings.lua:273> Find keymaps
n <Space>fm * <Lua 309: ~/.config/nvim/lua/astronvim/mappings.lua:274> Find man
n <Space>fn * <Lua 242: ~/.config/nvim/lua/astronvim/mappings.lua:277> Find notifications
n <Space>fo * <Lua 240: ~/.config/nvim/lua/astronvim/mappings.lua:279> Find history
n <Space>fr * <Lua 239: ~/.config/nvim/lua/astronvim/mappings.lua:280> Find registers
n <Space>ft * <Lua 238: ~/.config/nvim/lua/astronvim/mappings.lua:282> Find themes
n <Space>fW * <Lua 236: ~/.config/nvim/lua/astronvim/mappings.lua:285> Find words in all files
n <Space>fw * <Lua 237: ~/.config/nvim/lua/astronvim/mappings.lua:283> Find words
n <Space>gb * <Lua 259: ~/.config/nvim/lua/astronvim/mappings.lua:237> Git branches
n <Space>gc * <Lua 258: ~/.config/nvim/lua/astronvim/mappings.lua:238> Git commits
n <Space>gd * <Lua 268: ~/.config/nvim/lua/astronvim/mappings.lua:159> View Git diff
n <Space>gg * <Lua 304: ~/.config/nvim/lua/astronvim/mappings.lua:312> ToggleTerm lazygit
n <Space>gh * <Lua 273: ~/.config/nvim/lua/astronvim/mappings.lua:154> Reset Git hunk
n <Space>gL * <Lua 275: ~/.config/nvim/lua/astronvim/mappings.lua:152> View full Git blame
n <Space>gl * <Lua 276: ~/.config/nvim/lua/astronvim/mappings.lua:151> View Git blame
n <Space>gp * <Lua 274: ~/.config/nvim/lua/astronvim/mappings.lua:153> Preview Git hunk
n <Space>gr * <Lua 272: ~/.config/nvim/lua/astronvim/mappings.lua:155> Reset Git buffer
n <Space>gS * <Lua 270: ~/.config/nvim/lua/astronvim/mappings.lua:157> Stage Git buffer
n <Space>gs * <Lua 271: ~/.config/nvim/lua/astronvim/mappings.lua:156> Stage Git hunk
n <Space>gt * <Lua 257: ~/.config/nvim/lua/astronvim/mappings.lua:239> Git status
n <Space>gu * <Lua 269: ~/.config/nvim/lua/astronvim/mappings.lua:158> Unstage Git hunk
n <Space>h * <Lua 280: ~/.config/nvim/lua/astronvim/mappings.lua:125> Home Screen
n <Space>lD * <Lua 313: ~/.config/nvim/lua/astronvim/mappings.lua:293> Search diagnostics
n <Space>ls * <Lua 235: ~/.config/nvim/lua/astronvim/mappings.lua:295> Search symbols
n <Space>lS * <Lua 260: ~/.config/nvim/lua/astronvim/mappings.lua:230> Symbols outline
n <Space>n * <Cmd>enew<CR> New File
n <Space>o * <Lua 267: ~/.config/nvim/lua/astronvim/mappings.lua:166> Toggle Explorer Focus
n <Space>p * <Cmd>lua require("which-key").show(" p", {mode = "n", auto = true})<CR>
n <Space>pA * <Cmd>AstroUpdate<CR> AstroNvim Update
n <Space>pa * <Cmd>AstroUpdatePackages<CR> Update Plugins and Mason
n <Space>pi * <Lua 307: ~/.config/nvim/lua/astronvim/mappings.lua:36> Plugins Install
n <Space>pl * <Cmd>AstroChangelog<CR> AstroNvim Changelog
n <Space>pm * <Cmd>Mason<CR> Mason Installer
n <Space>pM * <Cmd>MasonUpdateAll<CR> Mason Update
n <Space>pS * <Lua 233: ~/.config/nvim/lua/astronvim/mappings.lua:38> Plugins Sync
n <Space>ps * <Lua 234: ~/.config/nvim/lua/astronvim/mappings.lua:37> Plugins Status
n <Space>pU * <Lua 229: ~/.config/nvim/lua/astronvim/mappings.lua:40> Plugins Update
n <Space>pu * <Lua 231: ~/.config/nvim/lua/astronvim/mappings.lua:39> Plugins Check Updates
n <Space>pv * <Cmd>AstroVersion<CR> AstroNvim Version
n <Space>q * <Cmd>confirm q<CR> Quit
n <Space>s * <Lua 45: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Search / Replace
n <Space>S. * <Cmd>SessionManager! load_current_dir_session<CR> Load current directory session
n <Space>Sd * <Cmd>SessionManager! delete_session<CR> Delete session
n <Space>Sf * <Cmd>SessionManager! load_session<CR> Search sessions
n <Space>sf * <Lua 36: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Spectre (current file)
n <Space>Sl * <Cmd>SessionManager! load_last_session<CR> Load last session
n <Space>Ss * <Cmd>SessionManager! save_current_session<CR> Save this session
n <Space>ss * <Lua 35: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Spectre
n <Space>tf * <Cmd>ToggleTerm direction=float<CR> ToggleTerm float
n <Space>th * <Cmd>ToggleTerm size=10 direction=horizontal<CR> ToggleTerm horizontal split
n <Space>tl * <Lua 232: ~/.config/nvim/lua/astronvim/mappings.lua:313> ToggleTerm lazygit
n <Space>tn * <Lua 230: ~/.config/nvim/lua/astronvim/mappings.lua:316> ToggleTerm node
n <Space>tp * <Lua 311: ~/.config/nvim/lua/astronvim/mappings.lua:325> ToggleTerm python
n <Space>tt * <Lua 306: ~/.config/nvim/lua/astronvim/mappings.lua:322> ToggleTerm btm
n <Space>tu * <Lua 355: ~/.config/nvim/lua/astronvim/mappings.lua:319> ToggleTerm gdu
n <Space>tv * <Cmd>ToggleTerm size=80 direction=vertical<CR> ToggleTerm vertical split
n <Space>ua * <Lua 350: ~/.config/nvim/lua/astronvim/utils/ui.lua:27> Toggle autopairs
n <Space>ub * <Lua 303: ~/.config/nvim/lua/astronvim/utils/ui.lua:58> Toggle background
n <Space>uC * <Cmd>ColorizerToggle<CR> Toggle color highlight
n <Space>uc * <Lua 354: ~/.config/nvim/lua/astronvim/utils/ui.lua:64> Toggle autocompletion
n <Space>ud * <Lua 353: ~/.config/nvim/lua/astronvim/utils/ui.lua:43> Toggle diagnostics
n <Space>ug * <Lua 301: ~/.config/nvim/lua/astronvim/utils/ui.lua:134> Toggle signcolumn
n <Space>uh * <Lua 352: ~/.config/nvim/lua/astronvim/utils/ui.lua:215> Toggle foldcolumn
n <Space>ui * <Lua 325: ~/.config/nvim/lua/astronvim/utils/ui.lua:146> Change indent setting
n <Space>ul * <Lua 330: ~/.config/nvim/lua/astronvim/utils/ui.lua:117> Toggle statusline
n <Space>uL * <Lua 345: ~/.config/nvim/lua/astronvim/utils/ui.lua:98> Toggle CodeLens
n <Space>uN * <Lua 340: ~/.config/nvim/lua/astronvim/utils/ui.lua:21> Toggle UI notifications
n <Space>un * <Lua 343: ~/.config/nvim/lua/astronvim/utils/ui.lua:161> Change line numbering
n <Space>up * <Lua 338: ~/.config/nvim/lua/astronvim/utils/ui.lua:183> Toggle paste mode
n <Space>uS * <Lua 332: ~/.config/nvim/lua/astronvim/utils/ui.lua:111> Toggle conceal
n <Space>us * <Lua 335: ~/.config/nvim/lua/astronvim/utils/ui.lua:177> Toggle spellcheck
n <Space>uT * <Cmd>TransparentToggle<CR> Toggle transparency
n <Space>ut * <Lua 302: ~/.config/nvim/lua/astronvim/utils/ui.lua:105> Toggle tabline
n <Space>uu * <Lua 351: ~/.config/nvim/lua/astronvim/utils/ui.lua:208> Toggle URL highlight
n <Space>uw * <Lua 349: ~/.config/nvim/lua/astronvim/utils/ui.lua:189> Toggle wrap
n <Space>uy * <Lua 346: ~/.config/nvim/lua/astronvim/utils/ui.lua:195> Toggle syntax highlight
n <Space>w * <Cmd>w<CR> Save
n <Space>x * <Lua 126: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Trouble
n <Space>xl * <Lua 171: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Location List (Trouble)
n <Space>xq * <Lua 172: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Quickfix List (Trouble)
n <Space>xX * <Lua 132: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Workspace Diagnostics (Trouble)
n <Space>xx * <Lua 170: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Document Diagnostics (Trouble)
n > * <Cmd>lua require("which-key").show(">", {mode = "n", auto = true})<CR>
n >b * <Lua 298: ~/.config/nvim/lua/astronvim/mappings.lua:58> Move buffer tab right
n | * <Cmd>vsplit<CR> Vertical Split
n c * <Cmd>lua require("which-key").show("c", {mode = "n", auto = true})<CR>
n d * <Cmd>lua require("which-key").show("d", {mode = "n", auto = true})<CR>
n g * <Cmd>lua require("which-key").show("g", {mode = "n", auto = true})<CR>
n gb * <Lua 123: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Comment toggle blockwise
n gc * <Lua 107: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Comment toggle linewise
n gx * <Lua 241: ~/.config/nvim/lua/astronvim/utils/init.lua:134> Open the file under cursor with system app
n j * v:count == 0 ? 'gj' : 'j' Move cursor down
n k * v:count == 0 ? 'gk' : 'k' Move cursor up
n v * <Cmd>lua require("which-key").show("v", {mode = "n", auto = true})<CR>
n y * <Cmd>lua require("which-key").show("y", {mode = "n", auto = true})<CR>
n Y * y$ Nvim builtin
n z * <Cmd>lua require("which-key").show("z", {mode = "n", auto = true})<CR>
n zM * <Lua 244: ~/.config/nvim/lua/astronvim/mappings.lua:395> Close all folds
n zm * <Lua 317: ~/.config/nvim/lua/astronvim/mappings.lua:397> Fold more
n zp * <Lua 347: ~/.config/nvim/lua/astronvim/mappings.lua:398> Peek fold
n zr * <Lua 243: ~/.config/nvim/lua/astronvim/mappings.lua:396> Fold less
n zR * <Lua 336: ~/.config/nvim/lua/astronvim/mappings.lua:394> Open all folds
v <Tab> * >gv indent line
v <S-Tab> * <gv unindent line
v <Space>/ * <Esc><Cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR> Toggle comment line
v <Space>dE * <Lua 228: ~/.config/nvim/lua/astronvim/mappings.lua:386> Evaluate Input
v gb * <Lua 124: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Comment toggle blockwise
v gc * <Lua 114: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Comment toggle linewise
x " * <Cmd>lua require("which-key").show("\"", {mode = "v", auto = true})<CR>
x ** y/\V<C-R>"<CR> Nvim builtin
x # * y?\V<C-R>"<CR> Nvim builtin
x <Space> * <Cmd>lua require("which-key").show(" ", {mode = "v", auto = true})<CR>
x <Space>s * <Lua 46: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Search / Replace
x <Space>sw * <Lua 47: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:67> Spectre (current word)
x g * <Cmd>lua require("which-key").show("g", {mode = "v", auto = true})<CR>
```

316
docs/tmux-keybindings.md Normal file
View File

@@ -0,0 +1,316 @@
# tmux keybindings
Leader: `<ctrl><space>`
```
bind-key -T copy-mode C-Space send-keys -X begin-selection
bind-key -T copy-mode C-a send-keys -X start-of-line
bind-key -T copy-mode C-b send-keys -X cursor-left
bind-key -T copy-mode C-c send-keys -X cancel
bind-key -T copy-mode C-e send-keys -X end-of-line
bind-key -T copy-mode C-f send-keys -X cursor-right
bind-key -T copy-mode C-g send-keys -X clear-selection
bind-key -T copy-mode C-k send-keys -X copy-pipe-end-of-line-and-cancel
bind-key -T copy-mode C-n send-keys -X cursor-down
bind-key -T copy-mode C-p send-keys -X cursor-up
bind-key -T copy-mode C-r command-prompt -i -I "#{pane_search_string}" -T search -p "(search up)" { send-keys -X search-backward-incremental "%%" }
bind-key -T copy-mode C-s command-prompt -i -I "#{pane_search_string}" -T search -p "(search down)" { send-keys -X search-forward-incremental "%%" }
bind-key -T copy-mode C-v send-keys -X page-down
bind-key -T copy-mode C-w send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode Escape send-keys -X cancel
bind-key -T copy-mode Space send-keys -X page-down
bind-key -T copy-mode ! send-keys -X copy-pipe-and-cancel "tr -d '
' | pbcopy"
bind-key -T copy-mode , send-keys -X jump-reverse
bind-key -T copy-mode \; send-keys -X jump-again
bind-key -T copy-mode F command-prompt -1 -p "(jump backward)" { send-keys -X jump-backward "%%" }
bind-key -T copy-mode N send-keys -X search-reverse
bind-key -T copy-mode P send-keys -X toggle-position
bind-key -T copy-mode R send-keys -X rectangle-toggle
bind-key -T copy-mode T command-prompt -1 -p "(jump to backward)" { send-keys -X jump-to-backward "%%" }
bind-key -T copy-mode X send-keys -X set-mark
bind-key -T copy-mode Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
bind-key -T copy-mode f command-prompt -1 -p "(jump forward)" { send-keys -X jump-forward "%%" }
bind-key -T copy-mode g command-prompt -p "(goto line)" { send-keys -X goto-line "%%" }
bind-key -T copy-mode n send-keys -X search-again
bind-key -T copy-mode q send-keys -X cancel
bind-key -T copy-mode r send-keys -X refresh-from-pane
bind-key -T copy-mode t command-prompt -1 -p "(jump to forward)" { send-keys -X jump-to-forward "%%" }
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 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
bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode Home send-keys -X start-of-line
bind-key -T copy-mode End send-keys -X end-of-line
bind-key -T copy-mode NPage send-keys -X page-down
bind-key -T copy-mode PPage send-keys -X page-up
bind-key -T copy-mode Up send-keys -X cursor-up
bind-key -T copy-mode Down send-keys -X cursor-down
bind-key -T copy-mode Left send-keys -X cursor-left
bind-key -T copy-mode Right send-keys -X cursor-right
bind-key -T copy-mode M-C-b send-keys -X previous-matching-bracket
bind-key -T copy-mode M-C-f send-keys -X next-matching-bracket
bind-key -T copy-mode M-1 command-prompt -N -I 1 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-2 command-prompt -N -I 2 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-3 command-prompt -N -I 3 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-4 command-prompt -N -I 4 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-5 command-prompt -N -I 5 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-6 command-prompt -N -I 6 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-7 command-prompt -N -I 7 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-8 command-prompt -N -I 8 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-9 command-prompt -N -I 9 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode M-< send-keys -X history-top
bind-key -T copy-mode M-> send-keys -X history-bottom
bind-key -T copy-mode M-R send-keys -X top-line
bind-key -T copy-mode M-b send-keys -X previous-word
bind-key -T copy-mode M-f send-keys -X next-word-end
bind-key -T copy-mode M-m send-keys -X back-to-indentation
bind-key -T copy-mode M-r send-keys -X middle-line
bind-key -T copy-mode M-v send-keys -X page-up
bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode M-x send-keys -X jump-to-mark
bind-key -T copy-mode M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer"
bind-key -T copy-mode "M-{" send-keys -X previous-paragraph
bind-key -T copy-mode "M-}" send-keys -X next-paragraph
bind-key -T copy-mode M-Up send-keys -X halfpage-up
bind-key -T copy-mode M-Down send-keys -X halfpage-down
bind-key -T copy-mode C-Up send-keys -X scroll-up
bind-key -T copy-mode C-Down send-keys -X scroll-down
bind-key -T copy-mode-vi C-b send-keys -X page-up
bind-key -T copy-mode-vi C-c send-keys -X cancel
bind-key -T copy-mode-vi C-d send-keys -X halfpage-down
bind-key -T copy-mode-vi C-e send-keys -X scroll-down
bind-key -T copy-mode-vi C-f send-keys -X page-down
bind-key -T copy-mode-vi C-h 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 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"
bind-key -T copy-mode-vi \# send-keys -FX search-backward "#{copy_cursor_word}"
bind-key -T copy-mode-vi \$ send-keys -X end-of-line
bind-key -T copy-mode-vi \% send-keys -X next-matching-bracket
bind-key -T copy-mode-vi * send-keys -FX search-forward "#{copy_cursor_word}"
bind-key -T copy-mode-vi , send-keys -X jump-reverse
bind-key -T copy-mode-vi / command-prompt -T search -p "(search down)" { send-keys -X search-forward "%%" }
bind-key -T copy-mode-vi 0 send-keys -X start-of-line
bind-key -T copy-mode-vi 1 command-prompt -N -I 1 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 2 command-prompt -N -I 2 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 3 command-prompt -N -I 3 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 4 command-prompt -N -I 4 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 5 command-prompt -N -I 5 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 6 command-prompt -N -I 6 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 7 command-prompt -N -I 7 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 8 command-prompt -N -I 8 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi 9 command-prompt -N -I 9 -p (repeat) { send-keys -N "%%" }
bind-key -T copy-mode-vi : command-prompt -p "(goto line)" { send-keys -X goto-line "%%" }
bind-key -T copy-mode-vi \; send-keys -X jump-again
bind-key -T copy-mode-vi ? command-prompt -T search -p "(search up)" { send-keys -X search-backward "%%" }
bind-key -T copy-mode-vi A send-keys -X append-selection-and-cancel
bind-key -T copy-mode-vi B send-keys -X previous-space
bind-key -T copy-mode-vi D send-keys -X copy-pipe-end-of-line-and-cancel
bind-key -T copy-mode-vi E send-keys -X next-space-end
bind-key -T copy-mode-vi F command-prompt -1 -p "(jump backward)" { send-keys -X jump-backward "%%" }
bind-key -T copy-mode-vi G send-keys -X history-bottom
bind-key -T copy-mode-vi H send-keys -X top-line
bind-key -T copy-mode-vi J send-keys -X scroll-down
bind-key -T copy-mode-vi K send-keys -X scroll-up
bind-key -T copy-mode-vi L send-keys -X bottom-line
bind-key -T copy-mode-vi M send-keys -X middle-line
bind-key -T copy-mode-vi N send-keys -X search-reverse
bind-key -T copy-mode-vi P send-keys -X toggle-position
bind-key -T copy-mode-vi T command-prompt -1 -p "(jump to backward)" { send-keys -X jump-to-backward "%%" }
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi W send-keys -X next-space
bind-key -T copy-mode-vi X send-keys -X set-mark
bind-key -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
bind-key -T copy-mode-vi ^ send-keys -X back-to-indentation
bind-key -T copy-mode-vi b send-keys -X previous-word
bind-key -T copy-mode-vi e send-keys -X next-word-end
bind-key -T copy-mode-vi f command-prompt -1 -p "(jump forward)" { send-keys -X jump-forward "%%" }
bind-key -T copy-mode-vi g send-keys -X history-top
bind-key -T copy-mode-vi h send-keys -X cursor-left
bind-key -T copy-mode-vi j send-keys -X cursor-down
bind-key -T copy-mode-vi k send-keys -X cursor-up
bind-key -T copy-mode-vi l send-keys -X cursor-right
bind-key -T copy-mode-vi n send-keys -X search-again
bind-key -T copy-mode-vi o send-keys -X other-end
bind-key -T copy-mode-vi q send-keys -X cancel
bind-key -T copy-mode-vi r send-keys -X refresh-from-pane
bind-key -T copy-mode-vi t command-prompt -1 -p "(jump to forward)" { send-keys -X jump-to-forward "%%" }
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi w send-keys -X next-word
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel pbcopy
bind-key -T copy-mode-vi \{ send-keys -X previous-paragraph
bind-key -T copy-mode-vi \} send-keys -X next-paragraph
bind-key -T copy-mode-vi MouseDown1Pane select-pane
bind-key -T copy-mode-vi MouseDrag1Pane select-pane \; send-keys -X begin-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel pbcopy
bind-key -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 5 scroll-up
bind-key -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 5 scroll-down
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi BSpace send-keys -X cursor-left
bind-key -T copy-mode-vi NPage send-keys -X page-down
bind-key -T copy-mode-vi PPage send-keys -X page-up
bind-key -T copy-mode-vi Up send-keys -X cursor-up
bind-key -T copy-mode-vi Down send-keys -X cursor-down
bind-key -T copy-mode-vi Left send-keys -X cursor-left
bind-key -T copy-mode-vi Right send-keys -X cursor-right
bind-key -T copy-mode-vi M-x send-keys -X jump-to-mark
bind-key -T copy-mode-vi M-y send-keys -X copy-pipe-and-cancel "pbcopy; tmux paste-buffer"
bind-key -T copy-mode-vi C-Up send-keys -X scroll-up
bind-key -T copy-mode-vi C-Down send-keys -X scroll-down
bind-key -T 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-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-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 -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 & confirm-before -p "kill-window #W? (y/n)" kill-window
bind-key -T prefix \' command-prompt -T window-target -p index { select-window -t ":%%" }
bind-key -T prefix ( switch-client -p
bind-key -T prefix ) switch-client -n
bind-key -T prefix , command-prompt -I "#W" { rename-window "%%" }
bind-key -T prefix - delete-buffer
bind-key -T prefix . command-prompt -T target { move-window -t "%%" }
bind-key -T prefix / command-prompt -k -p key { list-keys -1N "%%" }
bind-key -T prefix 0 select-window -t :=0
bind-key -T prefix 1 select-window -t :=1
bind-key -T prefix 2 select-window -t :=2
bind-key -T prefix 3 select-window -t :=3
bind-key -T prefix 4 select-window -t :=4
bind-key -T prefix 5 select-window -t :=5
bind-key -T prefix 6 select-window -t :=6
bind-key -T prefix 7 select-window -t :=7
bind-key -T prefix 8 select-window -t :=8
bind-key -T prefix 9 select-window -t :=9
bind-key -T prefix : command-prompt
bind-key -T prefix \; last-pane
bind-key -T prefix < display-menu -T "#[align=centre]#{window_index}:#{window_name}" -x W -y W "#{?#{>:#{session_windows},1},,-}Swap Left" l { swap-window -t :-1 } "#{?#{>:#{session_windows},1},,-}Swap Right" r { swap-window -t :+1 } "#{?pane_marked_set,,-}Swap Marked" s { swap-window } '' Kill X { kill-window } Respawn R { respawn-window -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } Rename n { command-prompt -F -I "#W" { rename-window -t "#{window_id}" "%%" } } '' "New After" w { new-window -a } "New At End" W { new-window }
bind-key -T prefix = choose-buffer -Z
bind-key -T prefix > display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -x P -y P "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < { send-keys -X history-top } "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > { send-keys -X history-bottom } '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r { if-shell -F "#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}" "copy-mode -t=" ; send-keys -X -t = search-backward "#{q:mouse_word}" } "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y { copy-mode -q ; send-keys -l "#{q:mouse_word}" } "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c { copy-mode -q ; set-buffer "#{q:mouse_word}" } "#{?mouse_line,Copy Line,}" l { copy-mode -q ; set-buffer "#{q:mouse_line}" } '' "Horizontal Split" h { split-window -h } "Vertical Split" v { split-window -v } '' "#{?#{>:#{window_panes},1},,-}Swap Up" u { swap-pane -U } "#{?#{>:#{window_panes},1},,-}Swap Down" d { swap-pane -D } "#{?pane_marked_set,,-}Swap Marked" s { swap-pane } '' Kill X { kill-pane } Respawn R { respawn-pane -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z { resize-pane -Z }
bind-key -T prefix ? list-keys -N
bind-key -T prefix @ run-shell "/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 D choose-client -Z
bind-key -T prefix E select-layout -E
bind-key -T prefix I run-shell /Users/ivuorinen/.config/tmux/plugins/tpm/bindings/install_plugins
bind-key -T prefix L switch-client -l
bind-key -T prefix M select-pane -M
bind-key -T prefix N new-window
bind-key -T prefix R run-shell " tmux source-file /Users/ivuorinen/.config/tmux/tmux.conf > /dev/null; tmux display-message 'Sourced /Users/ivuorinen/.config/tmux/tmux.conf!'"
bind-key -T prefix S switch-client -l
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 ] 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 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 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 s choose-tree -Zs
bind-key -T prefix t run-shell "/Users/ivuorinen/.config/tmux/plugins/tmux-sessionist/scripts/join_pane.sh 'join-pane' '-b'"
bind-key -T prefix w choose-tree -Zw
bind-key -T prefix x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind-key -T prefix y run-shell -b /Users/ivuorinen/.config/tmux/plugins/tmux-yank/scripts/copy_line.sh
bind-key -T prefix z resize-pane -Z
bind-key -T prefix \{ swap-pane -U
bind-key -T prefix \} swap-pane -D
bind-key -T prefix \~ show-messages
bind-key -r -T prefix DC refresh-client -c
bind-key -T prefix PPage copy-mode -u
bind-key -r -T prefix Up select-pane -U
bind-key -r -T prefix Down select-pane -D
bind-key -r -T prefix Left select-pane -L
bind-key -r -T prefix Right select-pane -R
bind-key -T prefix M-1 select-layout even-horizontal
bind-key -T prefix M-2 select-layout even-vertical
bind-key -T prefix M-3 select-layout main-horizontal
bind-key -T prefix M-4 select-layout main-vertical
bind-key -T prefix M-5 select-layout tiled
bind-key -T prefix M-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 -r -T prefix M-Up resize-pane -U 5
bind-key -r -T prefix M-Down resize-pane -D 5
bind-key -r -T prefix M-Left resize-pane -L 5
bind-key -r -T prefix M-Right resize-pane -R 5
bind-key -r -T prefix C-Up resize-pane -U
bind-key -r -T prefix C-Down resize-pane -D
bind-key -r -T prefix C-Left resize-pane -L
bind-key -r -T prefix C-Right resize-pane -R
bind-key -r -T prefix S-Up refresh-client -U 10
bind-key -r -T prefix S-Down refresh-client -D 10
bind-key -r -T prefix S-Left refresh-client -L 10
bind-key -r -T prefix S-Right refresh-client -R 10
bind-key -T root 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 }
bind-key -T root MouseDown3Pane if-shell -F -t = "#{||:#{mouse_any_flag},#{&&:#{pane_in_mode},#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}}}" { select-pane -t = ; send-keys -M } { display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -t = -x M -y M "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < { send-keys -X history-top } "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > { send-keys -X history-bottom } '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r { if-shell -F "#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}" "copy-mode -t=" ; send-keys -X -t = search-backward "#{q:mouse_word}" } "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y { copy-mode -q ; send-keys -l "#{q:mouse_word}" } "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c { copy-mode -q ; set-buffer "#{q:mouse_word}" } "#{?mouse_line,Copy Line,}" l { copy-mode -q ; set-buffer "#{q:mouse_line}" } '' "Horizontal Split" h { split-window -h } "Vertical Split" v { split-window -v } '' "#{?#{>:#{window_panes},1},,-}Swap Up" u { swap-pane -U } "#{?#{>:#{window_panes},1},,-}Swap Down" d { swap-pane -D } "#{?pane_marked_set,,-}Swap Marked" s { swap-pane } '' Kill X { kill-pane } Respawn R { respawn-pane -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z { resize-pane -Z } }
bind-key -T root MouseDown3Status display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y W "#{?#{>:#{session_windows},1},,-}Swap Left" l { swap-window -t :-1 } "#{?#{>:#{session_windows},1},,-}Swap Right" r { swap-window -t :+1 } "#{?pane_marked_set,,-}Swap Marked" s { swap-window } '' Kill X { kill-window } Respawn R { respawn-window -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } Rename n { command-prompt -F -I "#W" { rename-window -t "#{window_id}" "%%" } } '' "New After" w { new-window -a } "New At End" W { new-window }
bind-key -T root MouseDown3StatusLeft display-menu -T "#[align=centre]#{session_name}" -t = -x M -y W Next n { switch-client -n } Previous p { switch-client -p } '' Renumber N { move-window -r } Rename n { command-prompt -I "#S" { rename-session "%%" } } '' "New Session" s { new-session } "New Window" w { new-window }
bind-key -T root MouseDrag1Pane if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -M }
bind-key -T root MouseDrag1Border resize-pane -M
bind-key -T root WheelUpPane if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -e }
bind-key -T root WheelUpStatus previous-window
bind-key -T root WheelDownStatus next-window
bind-key -T root DoubleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -H ; send-keys -X select-word ; run-shell -d 0.3 ; send-keys -X copy-pipe-and-cancel }
bind-key -T root TripleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -H ; send-keys -X select-line ; run-shell -d 0.3 ; send-keys -X copy-pipe-and-cancel }
bind-key -T root M-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
```

1
dotbot

Submodule dotbot deleted from 328bcb3259

View File

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

View File

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

View File

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

View File

@@ -1,60 +1,11 @@
[include]
path = ~/.dotfiles/config/git/shared
[user]
name = Ismo Vuorinen
email = ismo.vuorinen@vincit.fi
signingkey = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLyOvkr1nRqMVv3UAizmk6C+q40H4khvw7qIXXXyOyFmzjwYx/Cuxoi4uZVjX+q4qFYJ+c312uu6YXiEtfyoCao3wub8r1cLBQ3eIvuyWp2K8Ixcd9JmFmLmoeiENpJxqyr0WPZLDkrCWUZCsQQh8zzGFnfciUdUdTiZ7s21AEhhmFRSdFlVfQSlGMFxU321psg1YilcP80bDwFd1FsL4TssSkwlbgP/twqnpZ4436TTo7kp0UnH/RZkfRdDWScKHaWgncBG0CZeQxGWnRp8fvZn/7gDnthcZhvnDALVBE7QFuZ90GxqVw3IGpHryV0mFO6EGQ9Ke9YX7pKVZPUXZjeCN4SVKsqFdVJ6AjaSJ9K7nL98rYK7qNzndT3cKqPNgPteyXWRulH68A51ecQqHrjTttZcdN9hKt9uBHpzuXsby2QObT+VB4MNjZapa+YYF/WgwJCml4lzn2xMFg1vYZD78pfoJ9e5f2cL1MMlUSDb0TNxmEXfDQ77H/pRpKDz0=
[core]
excludesfile = ~/.config/git/gitignore
[alias]
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
nah = !git reset --hard && git clean -df
undo-commit = reset HEAD~ --soft
llog = log --pretty=fuller
logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
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\"
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]++'"
[diff]
tool = difftastic
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
[pull]
rebase = true
[color]
ui = true
diff = auto
branch = auto
status = auto
[color "status"]
added = green bold
changed = yellow
deleted = red bold strike
untracked = cyan
branch = yellow black bold ul
[gpg]
format = ssh
[gpg "ssh"]
program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign
allowedSignersFile = ~/.ssh/allowed_signers
@@ -69,7 +20,3 @@
[credential "https://gist.github.com"]
helper =
helper = !/opt/homebrew/bin/gh auth git-credential
[submodule]
recurse = true

View File

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

13
install
View File

@@ -3,12 +3,12 @@
set -e
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_DIR="tools/dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
DOTBOT_HOST="$(hostname -s)" || ''
DOTBOT_HOST="$(hostname -s)"
cd "$BASEDIR"
git submodule sync --quiet --recursive
@@ -16,8 +16,8 @@ git submodule update --init --recursive
"${DOTBOT_BIN_PATH}" \
-d "${BASEDIR}" \
--plugin-dir=dotbot-brew \
--plugin-dir=dotbot-include \
--plugin-dir=tools/dotbot-brew \
--plugin-dir=tools/dotbot-include \
-c "${CONFIG}" \
"${@}"
@@ -28,9 +28,8 @@ if [ "${DOTBOT_HOST}" != "" ]; then
&& echo "(!) Found $DOTBOT_HOST_CONFIG" \
&& "$DOTBOT_BIN_PATH" \
-d "$BASEDIR" \
--plugin-dir=dotbot-brew \
--plugin-dir=dotbot-include \
--plugin-dir=tools/dotbot-brew \
--plugin-dir=tools/dotbot-include \
-c "$DOTBOT_HOST_CONFIG" \
"${@}"
fi

View File

@@ -1,4 +1,4 @@
- include: "hosts/defaults.yaml"
- include: "tools/dotbot-defaults.yaml"
- clean:
~/:
~/.config:

View File

@@ -28,6 +28,7 @@ function section_install
MENU=(
"all:Installs everything in the correct order"
"antigen:Updates the antigen.zsh file"
"cheat-databases:Install cheat external cheatsheet databases"
"composer:Install composer"
"dotenv:Install dotenv-linter"
"gh:Install GitHub CLI Extensions"
@@ -53,6 +54,7 @@ function section_install
$0 install fzf
$0 install gh
$0 install go
$0 install cheat-databases
$0 install imagick
$0 install neofetch
$0 install nvm
@@ -64,6 +66,12 @@ function section_install
curl -sSfL git.io/antigen -o "$DOTFILES/local/bin/antigen.zsh" \
&& msg_yay "New antigen installed!"
;;
cheat-databases)
for database in "$DOTFILES"/scripts/install-cheat-*; do
bash "$database" \
&& msg_yay "Cheat: $database run"
done
;;
composer)
bash "$DOTFILES/scripts/install-composer.sh" \
&& msg_yay "composer installed!"
@@ -123,9 +131,7 @@ function section_install
bash "$DOTFILES/scripts/install-z.sh" \
&& msg_yay "z has been installed!"
;;
*)
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
*) menu_usage "$USAGE_PREFIX" "${MENU[@]}" ;;
esac
}
@@ -169,6 +175,20 @@ function section_brew
! have brew && menu_section "$USAGE_PREFIX" "brew not available on this system"
}
function section_docs
{
USAGE_PREFIX="$SCRIPT docs <command>"
MENU=(
"tmux:Update tmux keybindings documentation"
)
case "$1" in
tmux) bash "$DOTFILES/local/bin/x-dfm-docs-xterm-keybindings" ;;
*) menu_usage "$USAGE_PREFIX" "${MENU[@]}" ;;
esac
}
function section_dotfiles
{
USAGE_PREFIX="$SCRIPT dotfiles <command>"
@@ -230,9 +250,7 @@ function section_dotfiles
--binary-next-line {} \;
msg_yay "dotfiles have been shfmt formatted!"
;;
*)
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
*) menu_usage "$USAGE_PREFIX" "${MENU[@]}" ;;
esac
}
@@ -256,9 +274,7 @@ function section_check
[[ "$2" = "" ]] && echo "$X_HOSTNAME" && exit 0
[[ $X_HOSTNAME = "$2" ]] && exit 0 || exit 1
;;
*)
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
*) menu_usage "$USAGE_PREFIX" "${MENU[@]}" ;;
esac
}
@@ -288,9 +304,7 @@ function section_tests
msg_yay "msg_yay"
msg_yay_done "msg_yay_done"
;;
*)
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
*) menu_usage "$USAGE_PREFIX" "${MENU[@]}" ;;
esac
}
@@ -307,6 +321,8 @@ function usage
section_check
echo ""
section_dotfiles
echo ""
section_docs
}
# The main loop. first keyword after $0 triggers section, or help.
@@ -315,6 +331,7 @@ case "$1" in
brew) section_brew "$2" ;;
check) section_check "$2" ;;
dotfiles) section_dotfiles "$2" ;;
docs) section_docs "$2" ;;
tests) section_tests "$2" ;;
*) usage && exit 0 ;;
esac

BIN
local/bin/phpcs Executable file

Binary file not shown.

View File

@@ -13,11 +13,13 @@ if [ -z "${FILENAME}" ]; then
FILENAME=$DIRECTORY
fi
FILENAME=${FILENAME} \
| tr '/' _ \
| iconv -t ascii//TRANSLIT \
| sed -r s/[^a-zA-Z0-9]+/_/g \
| sed -r s/^_+\|-+$//g
FILENAME=$(
${FILENAME} \
| tr '/' _ \
| iconv -t ascii//TRANSLIT \
| sed -r s/[^a-zA-Z0-9]+/_/g \
| sed -r s/^_+\|-+$//g
)
TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
FILENAME_TIMESTAMP="${FILENAME}_${TIMESTAMP}"

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
#
# x-xterm-update-keybindings
# Updates $HOME/.dotfiles/docs/tmux.md with my keybindings.
# shellcheck source=./../../scripts/shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
have tmux || {
msg_err "tmux not found" && exit 0
}
TMUX_KEYBINDINGS_DOCS="$DOTFILES/docs/tmux-keybindings.md"
CB="\n\`\`\`\n"
KB=$(tmux list-keys)
H="# tmux keybindings\n"
L="\n\nLeader: \`<ctrl><space>\`\n\n"
msg "Outputting tmux keybindings to $TMUX_KEYBINDINGS_DOCS"
echo -e "${H}${L}${CB}${KB}${CB}" > "$TMUX_KEYBINDINGS_DOCS"
msg_done "Done!"

View File

@@ -8,24 +8,24 @@ $quota = '';
$output = [];
$fsCharLenght = 0;
if ($debug) {
$quota = "Disk quotas for user viir (uid 2913):
Filesystem blocks quota limit grace files quota limit grace
10.0.0.89:/www/webroots/2 8277615 52428800 52428800 0 0 0
10.0.0.179:/users1/users/2 1999431 52428800 52428800 0 0 0
10.0.0.90:/siilo/2 24835106 524288000 524288000 0 0 0";
} else {
// $quota = system("quota -w");
$quota = shell_exec("quota -w");
}
$quota = shell_exec("quota -w");
function pad($i, $n = 3, $p = ' ') {
/**
* Pad string
*
* @param string $i Input string
* @param int $n Length
* @param string $p Padding string
* @return string
*/
function pad($i, $n = 3, $p = ' ')
{
return str_pad($i, $n, $p, STR_PAD_LEFT);
}
if (empty($quota)) {
var_dump($quota);
die("quota was empty\n");
var_dump($quota);
die("quota was empty\n");
}
$quota = explode("\n", $quota);
@@ -41,34 +41,34 @@ foreach ($quota as $lineNum => $line) {
if (count($values) != 4) {
continue;
}
$result = array_combine(['fs', 'used', 'quota', 'limit'], $values);
$result['used_percentage'] = round($result['used'] / $result['quota'] * 100, 3);
$result['used_gb'] = round($result['used'] / 1024 / 1024, 2);
$result['quota_gb'] = round($result['quota'] / 1024 / 1024, 2);
$char = strlen($result['fs']);
if ($char > $fsCharLenght) {
$fsCharLenght = $char;
}
$output[] = $result;
}
if (!empty($output)) {
$header = sprintf("%s | %s | %s | %s",
$header = sprintf(
"%s | %s | %s | %s",
str_pad("Mount", $fsCharLenght),
'Usage%',
'Used/Total',
'Bar'
);
$headerWidth = strlen($header);
echo "\n" . $header . "\n";
echo str_repeat('-', $headerWidth + 24) . "\n";
foreach ($output as $i) {
$barUsed = round($i['used_percentage']) / 4;
echo sprintf(
@@ -82,4 +82,3 @@ if (!empty($output)) {
echo "\n\n";
}

8
phpcs.xml Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>PHP_CodeSniffer configuration</description>
<rule ref="PSR12">
<exclude name="PSR12.Operators.OperatorSpacing"/>
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
</rule>
</ruleset>

View File

@@ -18,7 +18,9 @@ PBB_TEMP_DIR="/tmp/pbb-$(rnd)"
# If there's no .git, clone the folder
if [ ! -d "$PBB_TEMP_DIR/.git" ]; then
git clone "$PBB_GIT" "$PBB_TEMP_DIR"
msg_run "Starting to clone $PBB_GIT"
git clone --depth 1 --single-branch -q "$PBB_GIT" "$PBB_TEMP_DIR" \
&& msg_yay "Cloned $PBB_GIT"
fi
PBB_CHAPTERS=$(ls -1v "$PBB_TEMP_DIR"/manuscript/chapter*)
@@ -32,10 +34,9 @@ for f in ${PBB_CHAPTERS[@]}; do
# get all headers, take the first one, strip the # and return the first word in lowercase
HEADER=$(grep -e '^[#] ' "$f" | head -1 | awk '{print tolower($2)}')
CHEAT_FILE="$CHEAT_DEST/${HEADER}"
echo "(*) $CHEAT_FILE"
if [ ! -f "$CHEAT_FILE" ]; then
cp "$f" "$CHEAT_FILE"
cp "$f" "$CHEAT_FILE" && msg_run "$CHEAT_FILE"
fi
LC_ALL=C perl -pi.bak -e 's/\<\!-- CHAPTER END --\>//' "$CHEAT_FILE"

View File

@@ -17,7 +17,9 @@ TLDR_TEMP_DIR="/tmp/cheat-tldr-$(rnd)"
# If there's no .git, clone the folder
if [ ! -d "$TLDR_TEMP_DIR/.git" ]; then
git clone --depth 1 "$TLDR_GIT" "$TLDR_TEMP_DIR"
msg_run "Starting to clone $TLDR_GIT"
git clone --depth 1 --single-branch -q "$TLDR_GIT" "$TLDR_TEMP_DIR" \
&& msg_done "Cloned $TLDR_GIT"
fi
# Fetch the destination directory from cheat defined directories.
@@ -50,7 +52,7 @@ for d in "$TLDR_TEMP_DIR"/pages/*; do
# echo "-> dest: $TLDR_FILE"
if [ ! -f "$TLDR_FILE" ]; then
cp "$FILE" "$TLDR_FILE"
cp "$FILE" "$TLDR_FILE" && msg_run "$TLDR_FILE"
fi
if [ -f "$TLDR_FILE" ] && [ '---' != "$(head -1 < "$TLDR_FILE")" ]; then

View File

@@ -4,20 +4,20 @@
# shellcheck source="shared.sh"
source "$HOME/.dotfiles/scripts/shared.sh"
have php && {
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
! have php && msg_err "PHP Not Available, cannot install composer" && exit 0
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
echo >&2 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
php composer-setup.php --quiet
RESULT=$?
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
echo >&2 'ERROR: Invalid installer checksum'
rm composer-setup.php
mv composer.phar ~/.local/bin/composer
exit $RESULT
} || msg_err "PHP Not Available, cannot install composer"
exit 1
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
mv composer.phar ~/.local/bin/composer
exit $RESULT

View File

@@ -14,4 +14,3 @@ if [ ! -d "$FZF_PATH" ]; then
else
msg_done "fzf ($FZF_PATH/) already installed"
fi

View File

@@ -4,42 +4,41 @@
# shellcheck source="shared.sh"
source "$HOME/.dotfiles/scripts/shared.sh"
have gh && {
extensions=(
# GitHub CLI extension for generating a report on repository dependencies.
andyfeller/gh-dependency-report
# GitHub CLI extension to generate montage from GitHub user avatars
andyfeller/gh-montage
# An opinionated GitHub Cli extension for creating
# changelogs that adhere to the keep a changelog specification.
chelnak/gh-changelog
# Safely deletes local branches with no upstream and no un-pushed commits
davidraviv/gh-clean-branches
# A beautiful CLI dashboard for GitHub 🚀
dlvhdr/gh-dash
# A github-cli extension script to clone all repositories
# in an organization, optionally filtering by topic.
matt-bartel/gh-clone-org
# being an extension to view the overall health of
# an organization's use of actions
rsese/gh-actions-status
)
msg "Starting to install GitHub CLI extensions..."
for ext in "${extensions[@]}"; do
# Trim spaces
ext=${ext// /}
# Skip comments
if [[ ${ext:0:1} == "#" ]]; then continue; fi
msg_run "Installing $ext"
gh extensions install "$ext"
echo ""
done
msg_ok "Done"
}
! have gh \
&& msg_err "gh (GitHub Client) could not be found, please install it first"
&& msg_err "gh (GitHub Client) could not be found, please install it first" \
&& exit 0
extensions=(
# GitHub CLI extension for generating a report on repository dependencies.
andyfeller/gh-dependency-report
# GitHub CLI extension to generate montage from GitHub user avatars
andyfeller/gh-montage
# An opinionated GitHub Cli extension for creating
# changelogs that adhere to the keep a changelog specification.
chelnak/gh-changelog
# Safely deletes local branches with no upstream and no un-pushed commits
davidraviv/gh-clean-branches
# A beautiful CLI dashboard for GitHub 🚀
dlvhdr/gh-dash
# A github-cli extension script to clone all repositories
# in an organization, optionally filtering by topic.
matt-bartel/gh-clone-org
# being an extension to view the overall health of
# an organization's use of actions
rsese/gh-actions-status
)
msg "Starting to install GitHub CLI extensions..."
for ext in "${extensions[@]}"; do
# Trim spaces
ext=${ext// /}
# Skip comments
if [[ ${ext:0:1} == "#" ]]; then continue; fi
msg_run "Installing $ext"
gh extensions install "$ext"
echo ""
done
msg_ok "Done"

View File

@@ -4,38 +4,36 @@
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
have go && {
packages=(
# sysadmin/scripting utilities, distributed as a single binary
github.com/skx/sysbox@latest
# Git Profile allows you to switch between user profiles in git repos
github.com/dotzero/git-profile@latest
# An extensible command line tool or library to format yaml files.
github.com/google/yamlfmt/cmd/yamlfmt@latest
# Parsing HTML at the command line
github.com/ericchiang/pup@latest
# HTML to Markdown converter
github.com/suntong/html2md@latest
# cheat allows you to create and view interactive cheatsheets on the cli.
github.com/cheat/cheat/cmd/cheat@latest
# Render markdown on the CLI, with pizzazz! 💅
github.com/charmbracelet/glow@latest
# Static checker for GitHub Actions workflow files
github.com/rhysd/actionlint/cmd/actionlint@latest
)
! have go && msg "go hasn't been installed yet." && exit 0
for pkg in "${packages[@]}"; do
# Trim spaces
pkg=${pkg// /}
# Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
packages=(
# sysadmin/scripting utilities, distributed as a single binary
github.com/skx/sysbox@latest
# Git Profile allows you to switch between user profiles in git repos
github.com/dotzero/git-profile@latest
# An extensible command line tool or library to format yaml files.
github.com/google/yamlfmt/cmd/yamlfmt@latest
# Parsing HTML at the command line
github.com/ericchiang/pup@latest
# HTML to Markdown converter
github.com/suntong/html2md@latest
# cheat allows you to create and view interactive cheatsheets on the cli.
github.com/cheat/cheat/cmd/cheat@latest
# Render markdown on the CLI, with pizzazz! 💅
github.com/charmbracelet/glow@latest
# Static checker for GitHub Actions workflow files
github.com/rhysd/actionlint/cmd/actionlint@latest
)
msg_run "Installing go package:" "$pkg"
go install "$pkg"
echo ""
done
for pkg in "${packages[@]}"; do
# Trim spaces
pkg=${pkg// /}
# Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
msg_ok "Done"
}
msg_run "Installing go package:" "$pkg"
go install "$pkg"
echo ""
done
! have go && msg "go hasn't been installed yet."
msg_ok "Done"

View File

@@ -4,38 +4,38 @@
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
have npm && {
packages=(
# This is a tool to check if your files consider your .editorconfig rules.
"editorconfig-checker"
# Node module to create a release or a changelog from
# a tag and uses issues or commits to creating the release notes.
"github-release-notes"
"neovim"
"prettier"
"corepack"
"standardjs"
)
! have npm && msg_err "npm could not be found." && exit 0
for pkg in "${packages[@]}"; do
# Trim spaces
pkg=${pkg// /}
# Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
packages=(
# This is a tool to check if your files consider your .editorconfig rules.
"editorconfig-checker"
# Node module to create a release or a changelog from
# a tag and uses issues or commits to creating the release notes.
"github-release-notes"
"neovim"
"corepack"
# CLI and local web plain text notetaking, bookmarking, and archiving
# with linking, tagging, filtering, search, Git versioning & syncing,
# Pandoc conversion, + more, in a single portable script.
"nb.sh"
)
if [[ $(npm ls -g -p "$pkg") != "" ]]; then
msg_run_done "$pkg" "already installed"
else
msg_run "Installing npm package:" "$pkg"
npm install -g --no-fund --no-progress --no-timing "$pkg"
fi
for pkg in "${packages[@]}"; do
# Trim spaces
pkg=${pkg// /}
# Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
echo ""
done
if [[ $(npm ls -g -p "$pkg") != "" ]]; then
msg_run_done "$pkg" "already installed"
else
msg_run "Installing npm package:" "$pkg"
npm install -g --no-fund --no-progress --no-timing "$pkg"
fi
msg_run "Upgrading all global packages"
npm -g --no-progress --no-timing --no-fund outdated
npm -g --no-timing --no-fund upgrade
}
echo ""
done
! have npm && msg_err "npm could not be found."
msg_run "Upgrading all global packages"
npm -g --no-progress --no-timing --no-fund outdated
npm -g --no-timing --no-fund upgrade

View File

@@ -6,32 +6,30 @@
source "$HOME/.dotfiles/scripts/shared.sh"
set -e
have ntfy && msg "ntfy already installed"
have ntfy && msg "ntfy already installed" && exit 0
! have ntfy && {
case $(dfm check arch) in
Linux)
NTFY_ARCH="linux_$(arch)"
;;
Darwin)
NTFY_ARCH="macOS_all"
;;
esac
case $(dfm check arch) in
Linux)
NTFY_ARCH="linux_$(arch)"
;;
Darwin)
NTFY_ARCH="macOS_all"
;;
esac
NTFY_VERSION=2.2.0
NTFY_URL="https://github.com/binwiederhier/ntfy"
NTFY_DEST="ntfy_${NTFY_VERSION}_${NTFY_ARCH}"
NTFY_VERSION=2.2.0
NTFY_URL="https://github.com/binwiederhier/ntfy"
NTFY_DEST="ntfy_${NTFY_VERSION}_${NTFY_ARCH}"
curl -L "$NTFY_URL/releases/download/v${NTFY_VERSION}/${NTFY_DEST}.tar.gz" \
> "${NTFY_DEST}.tar.gz"
tar zxvf "${NTFY_DEST}.tar.gz"
cp -a "${NTFY_DEST}/ntfy" ~/.local/bin/ntfy
mkdir -p ~/.config/ntfy
curl -L "$NTFY_URL/releases/download/v${NTFY_VERSION}/${NTFY_DEST}.tar.gz" \
> "${NTFY_DEST}.tar.gz"
tar zxvf "${NTFY_DEST}.tar.gz"
cp -a "${NTFY_DEST}/ntfy" ~/.local/bin/ntfy
mkdir -p ~/.config/ntfy
# copy config only if it does not exist
if [ ! -f "$HOME/.config/ntfy/client.yml" ]; then
cp "${NTFY_DEST}/client/client.yml" ~/.config/ntfy/client.yml
fi
# copy config only if it does not exist
if [ ! -f "$HOME/.config/ntfy/client.yml" ]; then
cp "${NTFY_DEST}/client/client.yml" ~/.config/ntfy/client.yml
fi
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"
}
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"

View File

@@ -0,0 +1,2 @@
ivuorinen@users.noreply.github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLyOvkr1nRqMVv3UAizmk6C+q40H4khvw7qIXXXyOyFmzjwYx/Cuxoi4uZVjX+q4qFYJ+c312uu6YXiEtfyoCao3wub8r1cLBQ3eIvuyWp2K8Ixcd9JmFmLmoeiENpJxqyr0WPZLDkrCWUZCsQQh8zzGFnfciUdUdTiZ7s21AEhhmFRSdFlVfQSlGMFxU321psg1YilcP80bDwFd1FsL4TssSkwlbgP/twqnpZ4436TTo7kp0UnH/RZkfRdDWScKHaWgncBG0CZeQxGWnRp8fvZn/7gDnthcZhvnDALVBE7QFuZ90GxqVw3IGpHryV0mFO6EGQ9Ke9YX7pKVZPUXZjeCN4SVKsqFdVJ6AjaSJ9K7nL98rYK7qNzndT3cKqPNgPteyXWRulH68A51ecQqHrjTttZcdN9hKt9uBHpzuXsby2QObT+VB4MNjZapa+YYF/WgwJCml4lzn2xMFg1vYZD78pfoJ9e5f2cL1MMlUSDb0TNxmEXfDQ77H/pRpKDz0=
ismo.vuorinen@vincit.fi ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLyOvkr1nRqMVv3UAizmk6C+q40H4khvw7qIXXXyOyFmzjwYx/Cuxoi4uZVjX+q4qFYJ+c312uu6YXiEtfyoCao3wub8r1cLBQ3eIvuyWp2K8Ixcd9JmFmLmoeiENpJxqyr0WPZLDkrCWUZCsQQh8zzGFnfciUdUdTiZ7s21AEhhmFRSdFlVfQSlGMFxU321psg1YilcP80bDwFd1FsL4TssSkwlbgP/twqnpZ4436TTo7kp0UnH/RZkfRdDWScKHaWgncBG0CZeQxGWnRp8fvZn/7gDnthcZhvnDALVBE7QFuZ90GxqVw3IGpHryV0mFO6EGQ9Ke9YX7pKVZPUXZjeCN4SVKsqFdVJ6AjaSJ9K7nL98rYK7qNzndT3cKqPNgPteyXWRulH68A51ecQqHrjTttZcdN9hKt9uBHpzuXsby2QObT+VB4MNjZapa+YYF/WgwJCml4lzn2xMFg1vYZD78pfoJ9e5f2cL1MMlUSDb0TNxmEXfDQ77H/pRpKDz0=

1
tools/dotbot Submodule

Submodule tools/dotbot added at da928a4c6b

View File

@@ -4,6 +4,6 @@
link:
create: true
relink: true
exclude: ["*.md", "*renovate*"]
exclude: [ "*.md", "*renovate*", "LICENSE" ]
shell:
stdout: true