diff --git a/.config/nvim/lua/blake/lsp.lua b/.config/nvim/lua/blake/lsp.lua index 114a9d8..7b3a3f1 100644 --- a/.config/nvim/lua/blake/lsp.lua +++ b/.config/nvim/lua/blake/lsp.lua @@ -167,7 +167,17 @@ M.cmp = function() formatting = { format = function(entry, vim_item) -- fancy icons and a name of kind - vim_item.kind = require("lspkind").presets.default[vim_item.kind] .. " " .. vim_item.kind + format = require('lspkind').cmp_format({ + mode = 'symbol', -- show only symbol annotations + maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + + -- The function below will be called before any actual modifications from lspkind + -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) + -- before = function (entry, vim_item) + -- ... + -- return vim_item + -- end + }) -- set a name for each source vim_item.menu = ({ path = "[Path]", diff --git a/.config/nvim/lua/blake/plugins.lua b/.config/nvim/lua/blake/plugins.lua index 124c860..451d48f 100644 --- a/.config/nvim/lua/blake/plugins.lua +++ b/.config/nvim/lua/blake/plugins.lua @@ -134,6 +134,7 @@ return require('packer').startup({function() 'simrat39/symbols-outline.nvim', config = function() vim.cmd 'command! SO SymbolsOutline' + vim.cmd 'nnoremap so SymbolsOutline' end, } use { -- ALE: Support for lots of linters, etc diff --git a/.config/shell/aliases b/.config/shell/aliases index 3551b2d..048f2b1 100644 --- a/.config/shell/aliases +++ b/.config/shell/aliases @@ -21,7 +21,7 @@ alias \ rd='rmdir' \ # opt for trash-cli over rm -if command -v > /dev/null; then +if command -v trash > /dev/null; then alias rm=trash fi diff --git a/.config/shell/bin/ala b/.config/shell/bin/ala deleted file mode 100755 index f01740c..0000000 --- a/.config/shell/bin/ala +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# Runs zsh in alacritty. Good if you're put in some other terminal for some reason. - -nohup alacritty > /dev/null 2>&1 & diff --git a/.config/shell/bin/mkswp b/.config/shell/bin/mkswp index aa350f2..7021f26 100755 --- a/.config/shell/bin/mkswp +++ b/.config/shell/bin/mkswp @@ -2,8 +2,14 @@ # Makes a swapfile at /swapfile of a given size (ex: mkswp 4G) -sudo fallocate -l "$1" /swapfile && - sudo chmod 600 /swapfile -sudo mkswap /swapfile && - sudo swapon /swapfile +if [ -d /swap ]; then + SWAPFILE=/swap/swapfile +else + SWAPFILE=/swapfile +fi + +sudo fallocate -l "$1" "$SWAPFILE" && + sudo chmod 600 "$SWAPFILE" +sudo mkswap "$SWAPFILE" && + sudo swapon "$SWAPFILE" diff --git a/.config/shell/bin/rmswp b/.config/shell/bin/rmswp index 4ed9e4e..4e960f7 100755 --- a/.config/shell/bin/rmswp +++ b/.config/shell/bin/rmswp @@ -1,6 +1,13 @@ #!/bin/bash # Deletes the swapfile created by mkswp() -sudo swapoff -v /swapfile -sudo rm /swapfile + +if [ -d /swap ]; then + SWAPFILE=/swap/swapfile +else + SWAPFILE=/swapfile +fi + +sudo swapoff -v "$SWAPFILE" +sudo rm "$SWAPFILE" diff --git a/.config/shell/functions/ala b/.config/shell/functions/ala new file mode 100755 index 0000000..41664a8 --- /dev/null +++ b/.config/shell/functions/ala @@ -0,0 +1,9 @@ +#!/bin/bash +# Re-open your shell in alacritty and exit the current shell. Good if you're +# put in another terminal for some reason and you want alacritty. + +ala() { + nohup alacritty > /dev/null 2>&1 & + disown + exit +} diff --git a/.config/shell/profile b/.config/shell/profile index 06448f9..130408e 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -24,7 +24,7 @@ export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc" #export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" export LESSHISTFILE="-" -export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc" +[ -f "$XDG_CONFIG_HOME/alsa/asoundrc" ] && export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc" # export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default" export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi" diff --git a/.gitconfig b/.gitconfig index bc30dd6..b29b4ca 100644 --- a/.gitconfig +++ b/.gitconfig @@ -11,6 +11,9 @@ email = blakelysnorth@gmail.com name = PowerUser64 +[safe] + directory = /storage/emulated/0/docs + [alias] a = add c = commit