Compare commits

..

No commits in common. "e1ef4f14fb46f0564e362cfa539c0ca8675c5853" and "c50d77359e905886a3be34de369930e88a507d54" have entirely different histories.

3 changed files with 12 additions and 67 deletions

View File

@ -1,16 +1,7 @@
#!/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 &
# Run compositor
picom --daemon
# Hide mouse cursor when typing
xbanish &
# Run window manager
dbus-run-session xmonad
xmonad

View File

@ -15,10 +15,6 @@ export PATH="$PATH:$HOME/.local/bin/:$HOME/go/bin/"
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
export PS1='\[\e[38;2;161;161;0m\]\u\[\e[0m\]@\[\e[34m\]\h\[\e[0m\]:\[\e[32m\]\W\[\e[0m\]\$ '
@ -31,10 +27,8 @@ HISTFILESIZE=-1 # Don't truncate the history when reading the history fil
# Pager settings
# Use lesspipe if it exists
if command -v lesspipe >/dev/null; then
declare lesspath
lesspath="$(command -v lesspipe)"
export LESSOPEN="| $lesspath %s";
export LESSCLOSE="$lesspath %s %s";
export LESSOPEN="| $(command -v lesspipe) %s";
export LESSCLOSE="$(command -v lesspipe) %s %s";
fi
# Enable colors in less
@ -47,12 +41,10 @@ export LESS_TERMCAP_ue=""
export LESS_TERMCAP_us=""
# Enable dircolors
if [[ -x "$(command -v dircolors)" ]]; then
if [[ -r ~/.config/shell/dircolors ]]; then
eval "$(dircolors -b ~/.config/shell/dircolors)"
else
if test -x "$(command -v dircolors)"; then
test -r ~/.config/shell/dircolors &&
eval "$(dircolors -b ~/.config/shell/dircolors)" ||
eval "$(dircolors -b)"
fi
fi
# Safety features
@ -69,13 +61,5 @@ source ~/.config/shell/aliasrc
# Functions
md() {
mkdir -p "$1" && cd "$1" || return
mkdir -p "$1" && cd "$1"
}
# 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

View File

@ -1,53 +1,23 @@
set nocompatible
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')
" Syntax highlighting and language-specific rules
Plug 'sheerun/vim-polyglot'
Plug 'vim-pandoc/vim-pandoc'
" Snippets
Plug 'SirVer/ultisnips'
" Web development
Plug 'mattn/emmet-vim'
" Go programming
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
" Zettelkasten support
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug '~/code/zk.vim/'
call plug#end()
" 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
autocmd BufEnter ~/dox/zettelkasten/* set filetype=markdown
endif
" Autocommands
autocmd BufEnter ~/.local/share/zk/* set filetype=markdown
" Enable line-numbering
set number
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+=**