Compare commits
3 commits
37986cf811
...
b0141720b8
Author | SHA1 | Date | |
---|---|---|---|
snow flurry | b0141720b8 | ||
snow flurry | c036f22cdf | ||
snow flurry | 7d2c01f2b0 |
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
base/.tmux/tpm
|
||||
base/.tmux/plugins
|
||||
base/.config/nvim/plugin
|
||||
|
|
1
base/.bashrc
Symbolic link
1
base/.bashrc
Symbolic link
|
@ -0,0 +1 @@
|
|||
.mkshrc
|
|
@ -1,13 +0,0 @@
|
|||
set mouse=a
|
||||
|
||||
if exists(':Guifont')
|
||||
Guifont Terminus [xos4]:h9
|
||||
endif
|
||||
|
||||
if exists(':GuiTabline')
|
||||
GuiTabline 0
|
||||
endif
|
||||
|
||||
if exists(':GuiPopupmenu')
|
||||
GuiPopupmenu 0
|
||||
endif
|
59
base/.config/nvim/init.lua
Normal file
59
base/.config/nvim/init.lua
Normal file
|
@ -0,0 +1,59 @@
|
|||
local fn = vim.fn
|
||||
local packer_bootstrap = false
|
||||
local install_path = fn.stdpath('data') .. "/site/pack/packer/opt/packer.nvim"
|
||||
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
vim.api.nvim_echo({ {"Installing packer.nvim", "Type" } }, true, {})
|
||||
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
end
|
||||
|
||||
vim.cmd([[ packadd packer.nvim ]])
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = "init.lua",
|
||||
command = "source <afile> | PackerCompile",
|
||||
})
|
||||
|
||||
|
||||
require('packer').startup(function(use)
|
||||
use { "wbthomason/packer.nvim", opt = true }
|
||||
use { "nvim-lua/plenary.nvim" }
|
||||
use {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require('gitsigns').setup()
|
||||
end
|
||||
}
|
||||
use { "catppuccin/nvim", as = "catppuccin",
|
||||
config = function()
|
||||
vim.g.catppuccin_flavour = "frappe"
|
||||
require("catppuccin").setup({
|
||||
|
||||
transparent_background = true,
|
||||
integrations = {
|
||||
gitsigns = true
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd([[ colorscheme catppuccin ]])
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end)
|
||||
|
||||
vim.o.sw = 4
|
||||
vim.o.ts = 4
|
||||
vim.o.sts = 4
|
||||
vim.o.expandtab = true
|
||||
vim.o.compatible = false
|
||||
|
||||
vim.cmd([[
|
||||
syntax on
|
||||
autocmd FileType make set noexpandtab shiftwidth=8 tabstop=8 softtabstop=0
|
||||
set bs=indent
|
||||
set number
|
||||
]])
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
call plug#begin('~/.vim/plug')
|
||||
|
||||
Plug 'equalsraf/neovim-gui-shim'
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'Pocco81/Catppuccino.nvim'
|
||||
Plug 'vim-scripts/bash-support.vim'
|
||||
Plug 'romgrk/barbar.nvim'
|
||||
Plug 'kyazdani42/nvim-tree.lua'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'lewis6991/gitsigns.nvim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
||||
lua << EOF
|
||||
require'lspconfig'.rls.setup{}
|
||||
EOF
|
||||
|
||||
lua << EOF
|
||||
local catppuccino = require('catppuccino')
|
||||
|
||||
catppuccino.setup(
|
||||
{
|
||||
colorscheme = "catppuccino",
|
||||
transparency = true,
|
||||
integrations = {
|
||||
treesitter = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
underlines = {
|
||||
errors = "underline",
|
||||
hints = "underline",
|
||||
warnings = "underline",
|
||||
information = "underline"
|
||||
}
|
||||
},
|
||||
gitsigns = true,
|
||||
nvimtree = {
|
||||
enabled = true,
|
||||
show_root = false
|
||||
},
|
||||
barbar = true
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
catppuccino.load()
|
||||
EOF
|
||||
|
||||
" Barbar
|
||||
let bufferline = get(g:, 'bufferline', {})
|
||||
let bufferline.icons = v:false
|
||||
let bufferline.animation = v:false
|
||||
let bufferline.auto_hide = v:true
|
||||
|
||||
" nvim-tree
|
||||
let g:nvim_tree_follow = 1
|
||||
let g:nvim_tree_auto_open = 1
|
||||
let g:nvim_tree_auto_close = 1
|
||||
let g:nvim_tree_show_icons = {
|
||||
\ 'git': 0,
|
||||
\ 'folders': 0,
|
||||
\ 'files': 0,
|
||||
\ 'folder_arrows': 0,
|
||||
\ }
|
||||
|
||||
nnoremap <silent> <A-1> :BufferGoto 1<CR>
|
||||
nnoremap <silent> <A-2> :BufferGoto 2<CR>
|
||||
nnoremap <silent> <A-3> :BufferGoto 3<CR>
|
||||
nnoremap <silent> <A-4> :BufferGoto 4<CR>
|
||||
nnoremap <silent> <A-5> :BufferGoto 5<CR>
|
||||
nnoremap <silent> <A-6> :BufferGoto 6<CR>
|
||||
nnoremap <silent> <A-7> :BufferGoto 7<CR>
|
||||
nnoremap <silent> <A-8> :BufferGoto 8<CR>
|
||||
nnoremap <silent> <A-9> :BufferGoto 9<CR>
|
||||
nnoremap <silent> <A-,> :BufferPrevious<CR>
|
||||
nnoremap <silent> <A-.> :BufferNext<CR>
|
||||
nnoremap <silent> <A-p> :BufferPin<CR>
|
||||
nnoremap <silent> <A-q> :BufferClose<CR>
|
||||
|
||||
set nocompatible
|
||||
|
||||
set sw=4 ts=4 sts=4 et
|
||||
syntax on
|
||||
autocmd FileType make set noexpandtab shiftwidth=8 tabstop=8 softtabstop=0
|
||||
set bs=indent,eol,start
|
||||
set ruler
|
||||
|
201
base/.mkshrc
201
base/.mkshrc
|
@ -4,87 +4,9 @@ if [ -f /etc/shrc ]; then
|
|||
. /etc/shrc
|
||||
fi
|
||||
|
||||
export EDITOR=vim
|
||||
|
||||
# Force 256color term for screen
|
||||
if [ "$TERM" = "screen" ] ; then
|
||||
TERM="screen-256color"
|
||||
export TERM
|
||||
fi
|
||||
|
||||
export LANG=
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
## Ripped from a custom /etc/shrc, not very useful here
|
||||
UID="$(id -u)"
|
||||
if [ "$UID" -eq "0" ] ; then
|
||||
PROMPT="#"
|
||||
USER_COLOR='[31m'
|
||||
else
|
||||
PROMPT="$"
|
||||
USER_COLOR='[96m'
|
||||
fi
|
||||
|
||||
get_ps1() {
|
||||
rv=$?
|
||||
if [ "$rv" -ne "0" -a "$rv" -ne "130" ] ; then
|
||||
print -n "$rv | "
|
||||
fi
|
||||
if [ -n "$SSH_TTY" ] ; then
|
||||
print -n "[33m[SSH] "
|
||||
fi
|
||||
print -n "${USER_COLOR}${HOST%%.*}:[39m";
|
||||
if [[ "${PWD#$HOME}" != "$PWD" ]] ; then
|
||||
print -n "~${PWD#$HOME}"
|
||||
else
|
||||
print -n "$PWD"
|
||||
fi
|
||||
print -n "${USER_COLOR} ${PROMPT}[0m "
|
||||
}
|
||||
|
||||
case "$-" in *i*)
|
||||
# interactive mode settings go here
|
||||
if /bin/test -z "${HOST}"; then
|
||||
HOST="$(hostname)"
|
||||
fi
|
||||
PS1='$(get_ps1)'
|
||||
set -o emacs
|
||||
# This file is used by shells that might not support
|
||||
# set -o tabcomplete, so check before trying to use it.
|
||||
( set -o tabcomplete 2>/dev/null ) && set -o tabcomplete
|
||||
|
||||
alias gpg='gpg2'
|
||||
alias ctop='xclip -selection clipboard -out | xclip -selection primary -in'
|
||||
alias ptoc='xclip -selection primary -out | xclip -selection primary -in'
|
||||
alias mutt='neomutt'
|
||||
alias define='dict'
|
||||
# Hack to bubble up profile, see bin/tmux-shim
|
||||
alias tmux="$HOME/bin/tmux-shim"
|
||||
|
||||
if [ "${KSH_VERSION:-notksh}" != "notksh" ] ; then
|
||||
[[ "${KSH_VERSION}" == *"MIRBSD KSH"* ]] && bind '^L=clear-screen'
|
||||
else
|
||||
hn="$(hostname)"
|
||||
PS1='${hn}:${PWD} \$ '
|
||||
fi
|
||||
|
||||
calc()
|
||||
{
|
||||
echo "$@" | bc
|
||||
}
|
||||
|
||||
nconv()
|
||||
{
|
||||
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
|
||||
echo "usage: nconv [from-base] [to-base] [num]" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "obase=$2; ibase=$1; $3" | bc
|
||||
}
|
||||
;;
|
||||
esac
|
||||
export EDITOR=nvim
|
||||
|
||||
## Extra paths
|
||||
if [ -f "$HOME/.cargo/env" ] ; then
|
||||
. $HOME/.cargo/env
|
||||
fi
|
||||
|
@ -119,3 +41,122 @@ if [ -d "$HOME/Library/Android/sdk" ] ; then
|
|||
fi
|
||||
|
||||
export PATH
|
||||
|
||||
# Force 256color term for screen
|
||||
if [ "$TERM" = "screen" ] ; then
|
||||
TERM="screen-256color"
|
||||
export TERM
|
||||
fi
|
||||
|
||||
export LANG=
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
## Ripped from a custom /etc/shrc, not very useful here
|
||||
if [ -z "$UID" ] ; then
|
||||
UID="$(id -u)"
|
||||
fi
|
||||
|
||||
BRL="["
|
||||
BRR=""
|
||||
if [ -n "$BASH_VERSION" ] ; then
|
||||
BRL="\\[\\\\033["
|
||||
BRR="\\]"
|
||||
fi
|
||||
|
||||
if [ "$UID" -eq "0" ] ; then
|
||||
PROMPT="#"
|
||||
USER_COLOR="${BRL}31m${BRR}"
|
||||
else
|
||||
PROMPT="$"
|
||||
USER_COLOR="${BRL}96m${BRR}"
|
||||
fi
|
||||
|
||||
getrv() {
|
||||
# HACK: Since the if statement in get_ps1 will clobber the old
|
||||
# return value, KSH passes a cached version of the old val along
|
||||
# so we can use it here.
|
||||
rv=${1:-$?}
|
||||
if [ "$rv" -ne "0" -a "$rv" -ne "130" ] ; then
|
||||
printf "$rv | "
|
||||
fi
|
||||
}
|
||||
|
||||
get_ps1() {
|
||||
# Bash uses a static version of this, so we have to make a couple
|
||||
# changes for post-processing
|
||||
rv=$?
|
||||
if [ -n "$BASH_VERSION" ] ; then
|
||||
printf '$(getrv)'
|
||||
else
|
||||
getrv $rv
|
||||
fi
|
||||
|
||||
if [ -n "$SSH_TTY" ] ; then
|
||||
printf "${BRL}33m${BRR}[SSH] "
|
||||
fi
|
||||
printf "${USER_COLOR}${HOST%%.*}:${BRL}39m${BRR}";
|
||||
if [ -n "$BASH_VERSION" ] ; then
|
||||
printf "\w"
|
||||
elif [[ "${PWD#$HOME}" != "$PWD" ]] ; then
|
||||
printf "~${PWD#$HOME}"
|
||||
else
|
||||
printf "$PWD"
|
||||
fi
|
||||
printf "${USER_COLOR} ${PROMPT}${BRL}0m${BRR} "
|
||||
}
|
||||
|
||||
case "$-" in *i*)
|
||||
# interactive mode settings go here
|
||||
echo "interactive"
|
||||
if /bin/test -z "${HOST}"; then
|
||||
HOST="$(hostname)"
|
||||
fi
|
||||
PS1='$(get_ps1)'
|
||||
set -o emacs
|
||||
|
||||
# This file is used by shells that might not support
|
||||
# set -o tabcomplete, so check before trying to use it.
|
||||
( set -o tabcomplete 2>/dev/null ) && set -o tabcomplete
|
||||
|
||||
if command -v xclip >/dev/null ; then
|
||||
alias ctop='xclip -selection clipboard -out | xclip -selection primary -in'
|
||||
alias ptoc='xclip -selection primary -out | xclip -selection primary -in'
|
||||
fi
|
||||
|
||||
alias define='dict'
|
||||
|
||||
if command -v nvim >/dev/null ; then
|
||||
alias vim='nvim'
|
||||
fi
|
||||
|
||||
# Hack to bubble up profile, see bin/tmux-shim
|
||||
alias tmux="$HOME/bin/tmux-shim"
|
||||
|
||||
# Set bash PS1
|
||||
if [ -n "$BASH_VERSION" ] ; then
|
||||
PS1="$(get_ps1)"
|
||||
export PS1
|
||||
elif [ "${KSH_VERSION:-notksh}" != "notksh" ] ; then
|
||||
[[ "${KSH_VERSION}" == *"MIRBSD KSH"* ]] && bind '^L=clear-screen'
|
||||
else
|
||||
hn="$(hostname)"
|
||||
PS1='${hn}:${PWD} \$ '
|
||||
fi
|
||||
|
||||
# Tiny helper functions
|
||||
calc()
|
||||
{
|
||||
echo "$@" | bc
|
||||
}
|
||||
|
||||
nconv()
|
||||
{
|
||||
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
|
||||
echo "usage: nconv [from-base] [to-base] [num]" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "obase=$2; ibase=$1; $3" | bc
|
||||
}
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue