diff options
| -rw-r--r-- | .config/nvim/lazy-lock.json | 56 | ||||
| -rw-r--r-- | .config/nvim/lua/git.lua | 5 | ||||
| -rw-r--r-- | .config/sway/config | 4 | ||||
| -rw-r--r-- | .zimrc | 31 | ||||
| -rw-r--r-- | .zshrc | 15 | ||||
| -rw-r--r-- | functions/ssh.sh | 33 |
6 files changed, 129 insertions, 15 deletions
diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..b23d43c --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,56 @@ +{ + "JABS.nvim": { "branch": "main", "commit": "b6dbd1a3e1b8cef3d6ebfafe96c2230ca341b65f" }, + "auto-session": { "branch": "main", "commit": "15586c4b997f4fc031432f958a942ba3b201d6aa" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, + "fzf-lua": { "branch": "main", "commit": "975534f4861e2575396716225c1202572645583d" }, + "gitsigns.nvim": { "branch": "main", "commit": "220446c8c86a280180d852efac60991eaf1a21d4" }, + "go.nvim": { "branch": "master", "commit": "cde0c7a110c0f65b9e4e6baf342654268efff371" }, + "jai.vim": { "branch": "master", "commit": "72c09c5f803b8ab2e708a3ad2b7c3704e2b4b3d8" }, + "lazy.nvim": { "branch": "main", "commit": "b02c9eae6a250f98908c146d1dc1a891f5019f0a" }, + "lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" }, + "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, + "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, + "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, + "neorg": { "branch": "main", "commit": "ace80b05771b65d6633f3c64b8d930b5787f20d0" }, + "nerdcommenter": { "branch": "master", "commit": "7bb1f72e802a80e37bdda5f6906c69b5a93de1eb" }, + "netrw.nvim": { "branch": "master", "commit": "c64f60b8a613900aad82ef1c285b892eb43e9e15" }, + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, + "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, + "nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" }, + "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, + "nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" }, + "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, + "nvim-treesitter": { "branch": "master", "commit": "ebdffa78bdb16af84fb76ff6a75978496d4dcbec" }, + "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, + "oil.nvim": { "branch": "master", "commit": "10fbfdd37b6904c0776c5db1a27ab47eecba335e" }, + "pathlib.nvim": { "branch": "main", "commit": "7a5a6facd29e306bc73a37719fa67c0d2226f852" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, + "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, + "sqls.nvim": { "branch": "main", "commit": "4b1274b5b44c48ce784aac23747192f5d9d26207" }, + "templ.vim": { "branch": "main", "commit": "5cc48b93a4538adca0003c4bc27af844bb16ba24" }, + "text-case.nvim": { "branch": "main", "commit": "ec9925b27dd54809653cc766b8673acd979a888e" }, + "tmuxline.vim": { "branch": "master", "commit": "4119c553923212cc67f4e135e6f946dc3ec0a4d6" }, + "vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" }, + "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, + "vim-ember-hbs": { "branch": "master", "commit": "777095c1b25f334cef9db5504c7d409d52843aa9" }, + "vim-endwise": { "branch": "master", "commit": "3719ffddb5e42bf67b55b2183d7a6fb8d3e5a2b8" }, + "vim-eunuch": { "branch": "master", "commit": "8fb3904be27b6b60d086f87c2570085902414069" }, + "vim-fugitive": { "branch": "master", "commit": "8c8cdf4405cb8bdb70dd9812a33bb52363a87dbc" }, + "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, + "vim-magnum": { "branch": "master", "commit": "7a30761b935d72bada5bbe90162a6afdb77c858d" }, + "vim-matchup": { "branch": "master", "commit": "1535a769d5dca851fe7d41b0be95f7c7203a4bef" }, + "vim-radical": { "branch": "master", "commit": "aca8992a25d317a4c6fa42e263e8506ea3e355d8" }, + "vim-repeat": { "branch": "master", "commit": "5bd4c87a1417a7187d0329e81eb83514ee481250" }, + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, + "vim-visual-multi": { "branch": "master", "commit": "38b0e8d94a5499ccc17d6159763d32c79f53417b" }, + "vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" }, + "zen-mode.nvim": { "branch": "main", "commit": "21976479c7a0146b05a42707cf91c86b1e510945" }, + "zig.vim": { "branch": "master", "commit": "54c216e5306a5c3878a60596aacb94dca8652ab9" } +}
\ No newline at end of file diff --git a/.config/nvim/lua/git.lua b/.config/nvim/lua/git.lua index 06fd5be..f643605 100644 --- a/.config/nvim/lua/git.lua +++ b/.config/nvim/lua/git.lua @@ -36,8 +36,5 @@ require('gitsigns').setup { relative = 'cursor', row = 0, col = 1 - }, - yadm = { - enable = false - }, + } } diff --git a/.config/sway/config b/.config/sway/config index 9c3c087..271edd2 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -279,7 +279,7 @@ output 'Dell Inc. DELL P2723QE 3940MP3' { transform 270 } -output eDP-1 { +output eDP-2 { position 4000,640 scale 1.25 } @@ -305,3 +305,5 @@ input type:keyboard { set $wallpapers_path ~/wallpapers/low-poly exec_always ~/bin/wallpaper-shuffle bindsym $mod+Shift+r exec ~/bin/wallpaper-shuffle + +input type:keyboard xkb_numlock enabled @@ -18,9 +18,17 @@ zmodule input zmodule termtitle # Utility aliases and functions. Adds colour to ls, grep and less. zmodule utility -# All kubectl aliases in one function. -zmodule k +# +# Prompt +# + +# Exposes to prompts how long the last command took to execute, used by asciiship. +zmodule duration-info +# Exposes git repository status information to prompts, used by asciiship. +zmodule git-info +# A heavily reduced, ASCII-only version of the Spaceship and Starship prompts. +zmodule asciiship # # Completion @@ -33,6 +41,13 @@ zmodule zsh-users/zsh-completions --fpath src zmodule completion # +# Modules +# + +# Configures fzf for faster fetching of files and directories names. +zmodule fzf + +# # Modules that must be initialized last # @@ -46,13 +61,11 @@ zmodule zsh-users/zsh-history-substring-search zmodule zsh-users/zsh-autosuggestions # }}} End configuration added by Zim install -# Adds aliases and better defaults for exa. -# zmodule exa -# Configures fzf for faster fetching of files and directories names. -zmodule fzf -# Provides a convenient way to load ssh-agent. -zmodule ssh - +# Start configuration added by Zim install {{{ +# +# This is not sourced during shell startup, and it's only used to configure the +# zimfw plugin manager. +# zmodule joke/zim-starship zmodule kiesman99/zim-zoxide @@ -127,7 +127,18 @@ for key ('k') bindkey -M vicmd ${key} history-substring-search-up for key ('j') bindkey -M vicmd ${key} history-substring-search-down unset key # }}} End configuration added by Zim install -# + +zmodload -F zsh/terminfo +p:terminfo +# Bind ^[[A/^[[B manually so up/down works both before and after zle-line-init +for key ('^[[A' '^P' ${terminfo[kcuu1]}) bindkey ${key} history-substring-search-up +for key ('^[[B' '^N' ${terminfo[kcud1]}) bindkey ${key} history-substring-search-down +for key ('k') bindkey -M vicmd ${key} history-substring-search-up +for key ('j') bindkey -M vicmd ${key} history-substring-search-down +unset key +# }}} End configuration added by Zim install +autoload -U +X bashcompinit && bashcompinit +autoload -U +X compinit && compinit + alias cat=bat alias find=fd alias open=xdg-open @@ -143,6 +154,8 @@ export MANWIDTH=80 source ~/functions/zig.sh source ~/functions/fzf.sh +source ~/functions/ssh.sh +alias ssh=auto_agent_ssh # https://stackoverflow.com/a/14307127/11015039 alias git=safegit diff --git a/functions/ssh.sh b/functions/ssh.sh new file mode 100644 index 0000000..820e787 --- /dev/null +++ b/functions/ssh.sh @@ -0,0 +1,33 @@ +#!/bin/zsh + + +ssh-add -l &>/dev/null +if (( ? == 2 )); then + # Unable to contact the authentication agent + # Load stored agent connection info + local -r ssh_env=${HOME}/.ssh-agent + if [[ -r ${ssh_env} ]] source ${ssh_env} >/dev/null + + ssh-add -l &>/dev/null + if (( ? == 2 )); then + # Start agent and store agent connection info + (umask 066; ssh-agent >! ${ssh_env}) + source ${ssh_env} >/dev/null + fi +fi + +local ssh_bin=$(which ssh) +auto_agent_ssh() { + # Load identities + ssh-add -l &>/dev/null + if (( ? == 1 )); then + local -a zssh_ids + zstyle -a ':zim:ssh' ids 'zssh_ids' + if (( ${#zssh_ids} )); then + ssh-add ${HOME}/.ssh/${^zssh_ids} 2>/dev/null + else + ssh-add 2>/dev/null + fi + fi + $ssh_bin "$@" +} |
