Change to new method of storing dotfiles

This commit is contained in:
Lavender 2021-04-27 13:31:56 -07:00
commit 0b0339a16a
Signed by: endie
GPG Key ID: CC5162D7C2146F01
5 changed files with 260 additions and 0 deletions

2
.config/nvim/init.lua Normal file
View File

@ -0,0 +1,2 @@
require("config")
require("plugins")

View File

@ -0,0 +1,34 @@
vim.g.mapleader = "`"
vim.o.termguicolors = true
local window_settings = {
relativenumber = true,
}
local buffer_settings = {
tabstop = 4,
shiftwidth = 4,
expandtab = true,
}
for setting, value in pairs(window_settings) do
vim.o[setting] = value
vim.wo[setting] = value
end
for setting, value in pairs(buffer_settings) do
vim.o[setting] = value
vim.bo[setting] = value
end
vim.api.nvim_exec([[
augroup python_format
autocmd!
autocmd BufWritePre *.py Black
augroup END
augroup fix_indent
autocmd!
autocmd BufWritePre * retab!
augroup END
]], false)

View File

@ -0,0 +1,134 @@
require("packer").startup({{
"wbthomason/packer.nvim",
{
"lukas-reineke/indent-blankline.nvim",
branch = "lua",
},
{
"olimorris/onedark.nvim",
requires = "rktjmp/lush.nvim",
},
{
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = "maintained",
autopairs = {
enable = true,
},
highlight = {
enable = true,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
indent = {
enable = true,
},
})
end,
},
"yamatsum/nvim-cursorline",
{
"edluffy/specs.nvim",
config = function()
require("specs").setup({
show_jumps = true,
min_jump = 30,
popup = {
delay_ms = 0,
inc_ms = 10,
blend = 10,
width = 30,
winhl = "PMenu",
fader = require("specs").pulse_fader,
resizer = require("specs").shrink_resizer,
},
ignore_filetypes = {},
ignore_buftypes = {
nofile = true,
},
})
end,
},
{
"norcalli/nvim-colorizer.lua",
config = function()
require("colorizer").setup()
end,
},
{
"windwp/nvim-autopairs",
config = function()
require("nvim-autopairs").setup({
check_ts = true,
})
end,
},
"vim-syntastic/syntastic",
"rust-lang/rust.vim",
{
"psf/black",
run = ":BlackUpgrade",
},
{
"Vimjas/vim-python-pep8-indent",
ft = "python",
},
"andweeb/presence.nvim",
}})
-- Setting plugin-specific variables --
-- onedark.nvim
vim.g.onedark_override = {
-- personal color scheme
red = "#e6b3b3",
green = "#bde6b3",
yellow = "#e6e0b3",
blue = "#b3c7e6",
purple = "#ccb3e6",
cyan = "#b3e6d6",
white = "#ccc",
black = "#141414",
gray = "#bdbdbd",
comment_gray = "#a3a3a3",
selection_gray = "#333",
indentline_gray = "#a3a3a3",
colorcolumn_gray = "#242424",
}
vim.o.background = "dark"
-- lush.nvim
vim.g.colors_name = "onedark_nvim"
-- syntastic
vim.g.syntastic_always_populate_loc_list = 1
vim.g.syntastic_auto_loc_list = 1
vim.g.syntastic_check_on_open = 1
vim.g.syntastic_check_on_wq = 1
-- rust.vim
vim.g.rustfmt_autosave = 1
-- vim-python-pep8-indent
vim.g.python_pep8_indent_multiline_string = -2

51
.zshrc Normal file
View File

@ -0,0 +1,51 @@
# Lines configured by zsh-newuser-install
HISTFILE=~/.local/share/zsh/history
HISTSIZE=200
SAVEHIST=200
setopt autocd extendedglob nomatch
unsetopt beep notify
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle ':completion:*' auto-description 'specify %d'
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' format 'completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' ignore-parents parent pwd .. directory
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]} r:|[._-]=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'l:|=* r:|=*'
zstyle ':completion:*' max-errors 2
zstyle ':completion:*' menu select=1
zstyle ':completion:*' original false
zstyle ':completion:*' prompt 'hey u typed wrong, idiot'
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle :compinstall filename '/home/endie/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
typeset -U path
path+=~/Executables
path+=~/.cargo/bin
export EDITOR="nvim"
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/library"
PROMPT="%F{5}%d%f%F{3}  %f "
RPROMPT="%F{2}(%f%F{1}%?%f%F{2})"
alias back="cd \$OLDPWD"
alias dots="git --git-dir=$HOME/Dotfiles --work-tree=$HOME"
alias update="yay -Syu && nvim -c PackerUpdate"
sys

39
Executables/sys Executable file
View File

@ -0,0 +1,39 @@
#!/bin/sh
field() {
num=$1
shift
echo $@ | cut -d ' ' -f $num
}
show_colors() {
for i in $(seq $1 $2)
do
tput setab $i
echo -n " "
done
tput setab reset
echo
}
tput setaf 5
echo " $HOSTNAME"
echo " $(uname -sr)"
echo " $(yay -Qq | wc -l)"
diskinfo=$(df -h / | tail -n 1)
useddisk=$(field 3 $diskinfo)
totaldisk=$(field 2 $diskinfo)
echo " ${useddisk::-1}/${totaldisk::-1} GB ($(field 5 $diskinfo))"
raminfo=$(free --mega | head -n 2 | tail -n 1)
usedram=$(field 3 $raminfo)
totalram=$(field 2 $raminfo)
echo " $usedram/$totalram MB ($(($usedram*100/$totalram))%)"
tput setaf reset
show_colors 0 7
show_colors 8 15