Compare commits
5 Commits
c50d77359e
...
e1ef4f14fb
Author | SHA1 | Date |
---|---|---|
The Magician | e1ef4f14fb | |
The Magician | 5e5b1f4b2a | |
The Magician | 1edcc573a7 | |
The Magician | 75f917e709 | |
The Magician | bfb562e5f8 |
11
X/.xinitrc
11
X/.xinitrc
|
@ -1,7 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Set desktop background
|
||||||
|
command -v feh &1>/dev/null && feh --bg-scale $HOME/pix/wallpaper.jpg &
|
||||||
|
|
||||||
|
# Swap CAPSLOCK and Escape
|
||||||
setxkbmap -option caps:swapescape gb &
|
setxkbmap -option caps:swapescape gb &
|
||||||
|
|
||||||
|
# Run compositor
|
||||||
picom --daemon
|
picom --daemon
|
||||||
|
|
||||||
|
# Hide mouse cursor when typing
|
||||||
xbanish &
|
xbanish &
|
||||||
|
|
||||||
xmonad
|
# Run window manager
|
||||||
|
dbus-run-session xmonad
|
||||||
|
|
28
bash/.bashrc
28
bash/.bashrc
|
@ -15,6 +15,10 @@ export PATH="$PATH:$HOME/.local/bin/:$HOME/go/bin/"
|
||||||
|
|
||||||
export CDPATH=".:$HOME"
|
export CDPATH=".:$HOME"
|
||||||
|
|
||||||
|
export XDG_CONFIG_HOME="$HOME/.config/"
|
||||||
|
export XDG_DATA_HOME="$HOME/.local/share/"
|
||||||
|
export XDG_STATE_HOME="$HOME/.local/state/"
|
||||||
|
|
||||||
# The Prompt
|
# The Prompt
|
||||||
export PS1='\[\e[38;2;161;161;0m\]\u\[\e[0m\]@\[\e[34m\]\h\[\e[0m\]:\[\e[32m\]\W\[\e[0m\]\$ '
|
export PS1='\[\e[38;2;161;161;0m\]\u\[\e[0m\]@\[\e[34m\]\h\[\e[0m\]:\[\e[32m\]\W\[\e[0m\]\$ '
|
||||||
|
|
||||||
|
@ -27,8 +31,10 @@ HISTFILESIZE=-1 # Don't truncate the history when reading the history fil
|
||||||
# Pager settings
|
# Pager settings
|
||||||
# Use lesspipe if it exists
|
# Use lesspipe if it exists
|
||||||
if command -v lesspipe >/dev/null; then
|
if command -v lesspipe >/dev/null; then
|
||||||
export LESSOPEN="| $(command -v lesspipe) %s";
|
declare lesspath
|
||||||
export LESSCLOSE="$(command -v lesspipe) %s %s";
|
lesspath="$(command -v lesspipe)"
|
||||||
|
export LESSOPEN="| $lesspath %s";
|
||||||
|
export LESSCLOSE="$lesspath %s %s";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable colors in less
|
# Enable colors in less
|
||||||
|
@ -41,11 +47,13 @@ export LESS_TERMCAP_ue=""
|
||||||
export LESS_TERMCAP_us="[4m"
|
export LESS_TERMCAP_us="[4m"
|
||||||
|
|
||||||
# Enable dircolors
|
# Enable dircolors
|
||||||
if test -x "$(command -v dircolors)"; then
|
if [[ -x "$(command -v dircolors)" ]]; then
|
||||||
test -r ~/.config/shell/dircolors &&
|
if [[ -r ~/.config/shell/dircolors ]]; then
|
||||||
eval "$(dircolors -b ~/.config/shell/dircolors)" ||
|
eval "$(dircolors -b ~/.config/shell/dircolors)"
|
||||||
|
else
|
||||||
eval "$(dircolors -b)"
|
eval "$(dircolors -b)"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Safety features
|
# Safety features
|
||||||
set -o noclobber # Enable features to prevent accidental file deletion
|
set -o noclobber # Enable features to prevent accidental file deletion
|
||||||
|
@ -61,5 +69,13 @@ source ~/.config/shell/aliasrc
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
md() {
|
md() {
|
||||||
mkdir -p "$1" && cd "$1"
|
mkdir -p "$1" && cd "$1" || return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Automatically run tmux if we aren't already in a session and there's no matching session already running
|
||||||
|
if [[ -z "$TMUX" ]] && ! tmux list-sessions | grep --quiet "$HOSTNAME"; then
|
||||||
|
tmux new -s "$HOSTNAME"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# AUtomatically run X if this is a login tty
|
||||||
|
[[ "$(tty)" == "/dev/tty1" ]] && ! pgrep -x Xorg >/dev/null && startx
|
||||||
|
|
38
vim/.vimrc
38
vim/.vimrc
|
@ -1,23 +1,53 @@
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
||||||
if filereadable(expand('~/.vim/autoload/plug.vim'))
|
if filereadable(expand('~/.vim/autoload/plug.vim'))
|
||||||
"let g:polyglot_disabled = ['markdown.plugin'] " Disable vim-polyglot's Markdown so we can use vim-pandoc instead
|
|
||||||
|
|
||||||
call plug#begin('~/.local/share/vim/plugins')
|
call plug#begin('~/.local/share/vim/plugins')
|
||||||
|
" Syntax highlighting and language-specific rules
|
||||||
Plug 'sheerun/vim-polyglot'
|
Plug 'sheerun/vim-polyglot'
|
||||||
Plug 'vim-pandoc/vim-pandoc'
|
|
||||||
|
|
||||||
|
" Snippets
|
||||||
|
Plug 'SirVer/ultisnips'
|
||||||
|
|
||||||
|
" Web development
|
||||||
Plug 'mattn/emmet-vim'
|
Plug 'mattn/emmet-vim'
|
||||||
|
|
||||||
|
" Go programming
|
||||||
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
|
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
|
||||||
|
|
||||||
|
" Zettelkasten support
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||||
Plug 'junegunn/fzf.vim'
|
Plug 'junegunn/fzf.vim'
|
||||||
Plug '~/code/zk.vim/'
|
Plug '~/code/zk.vim/'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
autocmd BufEnter ~/dox/zettelkasten/* set filetype=markdown
|
" Ultisnips config
|
||||||
|
let g:UltiSnipsSnippetsDir='~/.local/share/ultisnips'
|
||||||
|
let g:UltiSnipsSnippetDirectories=['~/.local/share/ultisnips']
|
||||||
|
let g:UltiSnipsExpandTrigger="<tab>"
|
||||||
|
let g:UltiSnipsJumpForwardTrigger="<tab>"
|
||||||
|
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
|
||||||
|
let g:UltiSnipsEditSplit="context"
|
||||||
|
else
|
||||||
|
" Make tab = 4 spaces if vim-polyglot can't be loaded
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Autocommands
|
||||||
|
autocmd BufEnter ~/.local/share/zk/* set filetype=markdown
|
||||||
|
|
||||||
|
" Enable line-numbering
|
||||||
set number
|
set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
|
|
||||||
|
" Use swap directory instead of cluttering source directories with swapfiles
|
||||||
|
set directory^=$HOME/.vim/swap//
|
||||||
|
|
||||||
|
" Use system clipboard by default
|
||||||
|
set clipboard=unnamedplus
|
||||||
|
|
||||||
|
" Make file searching better
|
||||||
|
set wildmenu
|
||||||
|
set wildmode=list:full
|
||||||
|
set path+=**
|
||||||
|
|
Loading…
Reference in New Issue