Compare commits

..

5 Commits

Author SHA1 Message Date
The Magician e1ef4f14fb Make improvements to .vimrc 2023-12-10 16:14:28 +00:00
The Magician 5e5b1f4b2a Make shellcheck fixes 2023-12-10 15:55:22 +00:00
The Magician 1edcc573a7 Add stuff from workstation to .bashrc 2023-12-10 15:51:45 +00:00
The Magician 75f917e709 Update .xinitrc 2023-12-10 15:41:58 +00:00
The Magician bfb562e5f8 Add shebang line to .xinitrc 2023-12-10 15:40:01 +00:00
3 changed files with 66 additions and 11 deletions

View File

@ -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

View File

@ -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,10 +47,12 @@ export LESS_TERMCAP_ue=""
export LESS_TERMCAP_us="" export LESS_TERMCAP_us=""
# 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
@ -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

View File

@ -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+=**