...
 
Commits (49)
terminal/zshrc.d/cache/
terminal/zshrc.d/antigen.zsh
terminal/zshrc.d/antigen
terminal/zshrc.d/*antigen-compat
desktop/Xresources.d/env
desktop/Xresources.d/Xresources.d
default: fonts vim zsh xresources i3 polybar git
default: fonts nvim zsh xresources i3 polybar git rofi
fonts:
# clone into powerline fonts
git clone https://github.com/powerline/fonts.git
......@@ -26,65 +26,81 @@ fonts-force:
# clean up
rm -rf fonts
nvim:
# ensure nvim is installed
nvim --version >/dev/null
# make the directory
mkdir -p ~/.config/nvim
# symlink the vimrc
ln -sr terminal/init.vim ~/.config/nvim/init.vim
# download vim-plug
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# install plugins
nvim +PlugInstall +qall
# symlink to normal vim dirs (in case vim needs to be used as a fallback)
ln -sr ~/.local/share/nvim/plugged ~/.vim/plugged
nvim-force:
# make the directory
mkdir -p ~/.config/nvim
# symlink the vimrc
ln -srf terminal/init.vim ~/.config/nvim/init.vim
# download vim-plug
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# install plugins
nvim +PlugInstall +qall
# symlink to normal vim dirs (in case vim needs to be used as a fallback)
ln -srf ~/.local/share/nvim/plugged ~/.vim/plugged
vim:
# ensure vim is installed
vim --version
# ensure nvim is installed
\vim --version >/dev/null
# symlink the vimrc
ln -sr terminal/vimrc ~/.vimrc
# make the autoload directory
mkdir -p ~/.vim/autoload
ln -sr terminal/init.vim ~/.vimrc
# download vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# install plugins
vim +PlugInstall +qall
# launch the YCM install script
python3 ~/.vim/plugged/YouCompleteMe/install.py
\vim +PlugInstall +qall
vim-force:
# ensure vim is installed
vim --version
# symlink the vimrc, forcefully
ln -srf terminal/vimrc ~/.vimrc
# make the autoload directory
mkdir -p ~/.vim/autoload
# symlink the vimrc
ln -srf terminal/init.vim ~/.vimrc
# download vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# install plugins
vim +PlugInstall +qall
# launch the YCM install script
python3 ~/.vim/plugged/YouCompleteMe/install.py
zsh:
# clone the oh-my-zsh repo to $HOME
git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
# symlink the zshrc
# symlink zshrc and zshrc.d
ln -sr terminal/zshrc ~/.zshrc
# make the custom themes folder
mkdir -p ~/.oh-my-zsh/custom/themes
# symlink the custom theme
ln -sr terminal/bclindner.zsh-theme ~/.oh-my-zsh/custom/themes/
ln -sr terminal/zshrc.d ~/.zshrc.d
# curl antigen to .zshrc.d
curl -L git.io/antigen > ~/.zshrc.d/antigen.zsh
zsh-force:
# clone the oh-my-zsh repo to $HOME
git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
# symlink the zshrc
# symlink zshrc and zshrc.d
ln -srf terminal/zshrc ~/.zshrc
# make the custom themes folder
mkdir -p ~/.oh-my-zsh/custom/themes
# symlink the custom theme, forcefully
ln -srf terminal/bclindner.zsh-theme ~/.oh-my-zsh/custom/themes/
ln -srf terminal/zshrc.d ~/.zshrc.d
# curl antigen to .zshrc.d
curl -L git.io/antigen > ~/.zshrc.d/antigen.zsh
xresources:
# make sure env is filled out, first
ls desktop/Xresources.d/env
# symlink Xresources
ln -sr desktop/Xresources ~/.Xresources
# symlink Xresources.d, forcefully
ln -sr desktop/Xresources.d ~/.Xresources.d
# refresh xrdb
xrdb -merge ~/.Xresources
xresources-force:
# symlink Xresources, forcefully
ln -srf desktop/Xresources ~/.Xresources
# symlink Xresources.d, forcefully
ln -srf desktop/Xresources.d ~/.Xresources.d
# refresh xrdb
xrdb -merge ~/.Xresources
git:
# ensure git is installed (i would hope it is)
......@@ -93,20 +109,16 @@ git:
ln -sr terminal/gitconfig ~/.gitconfig
git-force:
# ensure git is installed (i would hope it is)
git --version
# link the gitconfig
ln -srf terminal/gitconfig ~/.gitconfig
i3: polybar
i3: xresources polybar rofi
# ensure i3 is installed
i3 -v
# symlink i3 config folder
ln -sr desktop/i3 ~/.config
i3-force: polybar-force
# ensure i3 is installed
i3 -v
i3-force: xresources-force polybar-force rofi-force
# symlink i3 config folder, forcefully
ln -srf desktop/i3 ~/.config
......@@ -117,7 +129,15 @@ polybar: xresources
ln -sr desktop/polybar ~/.config/polybar
polybar-force: xresources-force
# ensure polybar is installed
polybar -v
# symlink polybar config folder, forcefully
ln -srf desktop/polybar ~/.config/polybar
rofi:
# ensure rofi is installed
rofi -v
# symlink rofi config folder
ln -sr desktop/rofi ~/.config/rofi
rofi-force:
# symlink rofi config folder, forcefully
ln -srf desktop/rofi ~/.config/rofi
# bclindner's dotfiles
![screenshot of the dotfiles](https://i.imgur.com/xotGUf7.png)
this repository is a set of configuration files for my personal machines. it is primarily designed for Linux devices, and assumes (but does not require) the use of the `zsh` command shell, the `vim` text editor, the `i3-gaps` tiling window manager, and the `urxvt` terminal, and are designed for a fast, efficient, and aesthetically pleasing console-based workflow.
these are managed using [GNU `make`](https://www.gnu.org/software/make/), which can manage dotfiles just as well as it's known to manage code builds - it's prominent on most Linux machines I work with, it makes chaining together individual dotfile install processes a breeze, and it's extremely easy to use at a user-level, among other things.
## installation
as previously mentioned, these dotfiles can all be installed using `make`. files are *symlinked*, meaning the cloned repo cannot be moved or deleted when the dotfiles are deployed - otherwise, they won't work. no symlinking commands are forced - commands will fail if dotfiles already exist.
to install a basic set of configs, you can just type `make` - this might take a while, as it installs Powerline-compatible fonts and refreshes font cache.
below is a list of potential `make` targets:
* `make xresources`: installs the `.Xresources` file and `.Xresources.d` folder containing my color palette and configurations for urxvt, some device-specific polybar configs, etc.
* `make vim`: installs configs for `vim`, including the [Vundle](https://github.com/VundleVim/Vundle.vim) plugin manager.
* `make zsh`: installs the `zsh` config, including the [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) zsh framework.
* `make fonts`: installs Powerline-compatible fonts (e.g. Terminus). This is *required* for the `vim` and `zsh` build targets, since they require Powerline fonts to display correctly. this command isn't included in them because it can take a long time, which is unneccessary if you're just running `make vim` on something with Powerline fonts already installed.
* this target assumes x11 is installed already.
* `make i3` installs my configs for `i3` and `polybar`.
* this target assumes x11 and i3-gaps are installed and polybar is installed and compiled with support for i3, pulseaudio and networking.
* you may also want to install `urxvt` / `rxvt-unicode` - i3-sensible-terminal will default to another (unstyled) terminal otherwise
* `make polybar` installs the polybar config alone, as well as the usual script i3 uses to launch it.
* this will automatically `make xresources`, as it is required for the bar colors.
* `make git` installs my .gitconfig - if you're not me, probably don't do this, because you'd be using my name and email for all of your commits, and that would be helping precisely noone.
you can append `-force` to any of these targets (e.g. `make vim-force`) to make them install destructively (destroying git repositories in the repo folder and forcing symlinks), but be careful.
## organization
dotfiles are organized into two folders, with the leading dot removed for each file:
* the `desktop` folder contains dotfiles for the `dwm` desktop distribution and other miscellaneous non-terminal configs.
* the `terminal` folder contains dotfiles for anything relating to the terminal, including terminal emulator dotfiles.
other than that, you'll find this README, of course, and the Makefile to automate dotfile installation.
## thanks
huge shout-out to the developers of [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh), [Vundle](https://github.com/VundleVim/Vundle.vim), and [vim-airline](https://github.com/vim-airline/vim-airline), among many others whose projects influenced or outright enabled some of the features of these dotfiles.
in particular, I outright copied [agnoster](https://github.com/agnoster)'s zsh theme and changed maybe two lines, and I also use a [vim-airline theme](https://github.com/bclindner/vim-airline-bclindner) largely based off of the code of the "cool" theme from [here](https://github.com/vim-airline/vim-airline-themes).
## license
the contents of this repository are protected under the MIT license, in the "LICENSE" file of this repository.
# Brian's Dotfiles
![Screenshot of the dotfiles](https://i.imgur.com/xotGUf7.png)
This is a set of configuration files for Linux software. It includes:
* A comprehensive set of `neovim` and `zsh` configurations for terminal
productivity
* An all-in-one desktop config set, with the `i3` tiling window manager,
the `polybar` status bar, the `rofi` app launcher, and more
* A custom color scheme, provided by `Xresources`
* Makefile-based auto-symlinking for all configuration files. Also provides
automatic font installation and simple dependency management.
! vim: set ft=xdefaults:
#include ".Xresources.d/env"
#include ".Xresources.d/colors"
#include ".Xresources.d/urxvt"
#include ".Xresources.d/fonts"
#include ".Xresources.d/dmenu"
#include ".Xresources.d/polybar"
......@@ -7,7 +7,7 @@
*.cursorColor: #e3e3e3
!! black
*.color0: #1d1f21
*.color8: #373b41
*.color8: #595f66
!! red
*.color1: #af3131
*.color9: #d05c5c
......
! vim: set ft=xdefaults:
dmenu.font: FONTNAME:pixelsize=FONTSIZE
! vim: set ft=xdefaults:
! Environment-specific variables.
! Font and font size.
#define FONTNAME xos4 Terminess Powerline
#define FONTSIZE 14
! Polybar network interfaces.
polybar.wlanInterface: wlp1s0
polybar.ethInterface: enp2s0
! vim: set ft=xdefaults:
! urxvt
URxvt.font: xft:xos4 Terminess Powerline:pixelsize=14:antialias=false
! polybar
polybar.font: xos4 Terminess Powerline:pixelsize=14
! vim: set ft=xdefaults:
! wifi networks
polybar.wlanInterface: wlp1s0
polybar.ethInterface: enp2s0
! font
polybar.font: FONTNAME:pixelsize=FONTSIZE,Symbola:size=14;1
......@@ -2,6 +2,9 @@
URxvt.termName: rxvt-unicode
! font
URxvt.font: xft:FONTNAME:pixelsize=FONTSIZE:antialias=false,xft:Symbola:size=FONTSIZE
! allow scrolling in secondary window (e.g. less, vim, etc)
URxvt.secondaryScreen: 1
URxvt.secondaryWheel: 1
......
# vim: set ft=conf:
set $mod Mod4
set $alt Mod1
set $super Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:xos4 Terminess Powerline 12
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec urxvt
# kill focused window
bindsym $mod+q kill
......@@ -27,7 +20,8 @@ bindsym $mod+w exec firefox
bindsym $mod+l exec dm-tool lock
# start dmenu (a program launcher)
set $dmenu "dmenu_run -nb '#1d1f21' -sb '#3a3e42' -p '>' -fn 'xos4 Terminess Powerline:pixelsize=14' -l 15"
# set $dmenu $HOME/.config/i3/dmenu.sh
set $dmenu "rofi -show combi"
bindsym $mod+space exec $dmenu
bindsym $mod+d exec $dmenu
bindsym $alt+F2 exec $dmenu
......@@ -108,6 +102,8 @@ bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $alt+Left workspace prev
bindsym $alt+Right workspace next
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
......@@ -130,30 +126,21 @@ bindsym $mod+Shift+q exec "i3-msg exit"
# resize mode
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym $mod+Left resize shrink width 1 px or 1 ppt
bindsym $mod+Down resize grow height 1 px or 1 ppt
bindsym $mod+Up resize shrink height 1 px or 1 ppt
bindsym $mod+Right resize grow width 1 px or 1 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
......@@ -172,14 +159,17 @@ default_orientation vertical
for_window [class="^"] split toggle
# start polybar
exec_always --no-startup-id $HOME/.config/polybar/i3-launch.sh
exec_always --no-startup-id $HOME/.config/i3/polybar.sh
# render background
exec_always --no-startup-id xsetroot -solid "#1d1f21"
# start syndaemon
# start syndaemon, if possible
exec_always --no-startup-id syndaemon -i 0.5 -K -R
# launch libinput-gestures for touchpad gesture control, if possible
exec_always libinput-gestures
# volume controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
......@@ -188,9 +178,10 @@ bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
# touchpad toggle
bindsym XF86TouchpadToggle exec $HOME/.config/i3/touchpad-toggle.sh
# print screen
bindsym Print exec scrot ~/$(mkdir -p ~/screenshots && echo screenshots)/$(date +scrot-%F-%M-%S.png)
bindsym $alt+Print exec mkdir -p ~/$(mkdir -p ~/screenshots && echo screenshots) scrot -s ~/screenshots/$(date +scrot-%F-%M-%S.png)
bindsym $mod+Print exec mkdir -p ~/$(mkdir -p ~/screenshots && echo screenshots) scrot -u ~/screenshots/$(date +scrot-%F-%M-%S.png)
exec_always --no-startup-id mkdir -p ~/screenshots
bindsym Print exec maim | tee ~/echo screenshots/$(date +screenshot-%F-%M-%S.png) | xclip -selection CLIPBOARD -t image/png
bindsym --release $mod+Print exec maim -s | tee ~/screenshots/$(date +screenshot-%F-%H-%H-%M-%S_%N.png) | xclip -selection CLIPBOARD -t image/png
for_window [instance="Godot_Engine"] floating enable
#!/bin/bash
#!/usr/bin/env bash
synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')
gesture swipe left 3 xdotool key alt+Right
gesture swipe right 3 xdotool key alt+Left
gesture swipe up 3 xdotool key Escape
gesture swipe down 3 xdotool key super+space
......@@ -38,6 +38,7 @@ tray-position = right
tray-detached = false
tray-maxsize = 16
tray-offset-y = -24
tray-padding = 2
line-size = 3
line-color = ${colors.accent}
......
rofi.location: 2
rofi.modi: run,drun,combi,ssh
rofi.combi-modi: window,drun,ssh,run
rofi.display-combi: >
rofi.font: xos4 Terminess Powerline 14
rofi.theme: ~/.config/rofi/theme.rasi
* {
fg: #e3e3e3;
bg: #1d1f21;
lighterbg: #595f66;
accent: #875fd7;
font: "xos4 Terminess Powerline 12";
background-color: transparent;
text-color: @fg;
borderwidth: 3;
width: 100%;
}
window {
background-color: @bg;
}
#mainbox {
border: 0 1 1 1;
border-color: @lighterbg;
padding: 10;
}
entry {
padding: 2;
margin-bottom: 8;
}
prompt {
background-color: @bg;
padding: 2;
margin-bottom: 16;
}
#listview {
padding: 8 0;
}
#element {
padding: 0;
}
element.selected {
background-color: @accent;
}
[user]
email = brian@bclindner.com
name = Brian C. Lindner
signingkey = AA99417F7F652506
[core]
editor = vim
editor = nvim
[web]
browser = firefox
[push]
......
" bclindner's init.vim/vimrc
" best used with neovim, but vim works fine too
" plugins (via vim-plug) {{{
" pre-plugin configuration {{{
filetype plugin indent on
let g:ale_completion_enabled = 1
if has('nvim')
let s:plugdir = '~/.local/share/nvim/plugged'
else
let s:plugdir = '~/.vim/plugged'
endif
" }}}
call plug#begin(s:plugdir)
" the essentials {{{
" vim-plug itself
Plug 'junegunn/vim-plug'
" better statusline
Plug 'vim-airline/vim-airline'
" tree browser
Plug 'scrooloose/nerdtree'
" fuzzy finder
Plug 'ctrlpvim/ctrlp.vim'
" syntax linting / LSP support
Plug 'w0rp/ale'
" autocompletion
Plug 'lifepillar/vim-mucomplete'
" better buffer handling
Plug 'moll/vim-bbye'
" }}}
" git support {{{
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'Xuyuanp/nerdtree-git-plugin'
" }}}
" QoL {{{
" commands for working w/ quotes, tags, etc
Plug 'tpope/vim-surround'
" block commenting controls
Plug 'scrooloose/nerdcommenter'
" nice starting screen
Plug 'mhinz/vim-startify'
" custom plugin to open vscode so my coworkers can edit my files
Plug 'bclindner/vim-openvscode'
" }}}
" syntax & filetype support {{{
Plug 'sheerun/vim-polyglot'
Plug 'chemzqm/vim-jsx-improve'
" xml autoclose/tag matching
Plug 'Townk/vim-autoclose'
Plug 'alvan/vim-closetag'
" }}}
" snippet support {{{
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
Plug 'honza/vim-snippets'
" }}}
" custom colorschemes {{{
" editor colorscheme
Plug 'bclindner/vim-bclindner-colorscheme'
" airline colorscheme
Plug 'bclindner/vim-airline-bclindner'
" }}}
call plug#end()
" }}} end vim-plug confaiguration
" general options {{{
" line options {{{
set list
set listchars=tab:→\ ,nbsp:,trail:,extends:,precedes:
set number
set linebreak
set showbreak="^^^"
set breakindent
" }}}
" QoL {{{
set confirm
set hidden
set splitbelow
set splitright
set nocompatible
" }}}
" search options {{{
set showmatch
set hlsearch
set smartcase
set ignorecase
set incsearch
" }}}
" indent options (default 2 spaces) {{{
set autoindent
set shiftwidth=2
set expandtab
set smartindent
set softtabstop=2
set tabstop=2
" }}}
" folding options {{{
set foldmethod=syntax
set nofoldenable
" }}}
" autocomplete options {{{
set completeopt=menu,menuone,preview,noselect,noinsert
set wildmode=longest,list,full
set shortmess+=c
set belloff+=ctrlg
" }}}
" miscellaneous {{{
colorscheme bclindner
" use mouse, because sometimes i'm just lazy
set mouse=a
" make backspace not stupid
set backspace=indent,eol,start
" syntax highlighting
syntax enable
" }}}
" end general options }}}
" plugin configuration {{{
" airline {{{
set laststatus=2
let g:airline_theme='bclindner'
" set airline symbols {{{
if !exists('g:airline_symbols')
let g:airline_symbols = {}
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.crypt = '🔒'
let g:airline_symbols.maxlinenr = '☰'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ'
endif " }}}
" enable airline bufferline {{{
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ''
let g:airline#extensions#tabline#left_alt_sep = ''
" }}}
" }}}
" nerdtree {{{
" git indicator symbols
let s:NERDTreeIndicatorMap = {
\ 'Modified' : '*',
\ 'Staged' : '+',
\ 'Untracked' : '~',
\ 'Renamed' : ',',
\ 'Unmerged' : '═',
\ 'Deleted' : 'X',
\ 'Dirty' : 'x',
\ 'Clean' : 'c',
\ 'Ignored' : 'i',
\ 'Unknown' : '?'
\ } " }}}
" ale {{{
" linters and fixers {{{
let g:ale_linters = {
\ 'javascript': ['tsserver', 'eslint'],
\ }
let g:ale_fixers = {
\ 'javascript': ['prettier']
\ }
" }}}
" options {{{
let g:ale_sign_column_always = 1
let g:ale_fix_on_save = 1
let g:ale_sign_error = 'E>'
let g:ale_sign_warning = 'W>'
let g:ale_open_list = 1
" }}}
" }}}
" ctrlp {{{
" ignore node_modules
set wildignore+=node_modules
" }}}
" end plugin configuration }}}
" binds {{{
" splits {{{
" split movement
nnoremap <silent> <A-Up> :wincmd k<CR>
nnoremap <silent> <A-Down> :wincmd j<CR>
nnoremap <silent> <A-Left> :wincmd h<CR>
nnoremap <silent> <A-Right> :wincmd l<CR>
" }}}
" buffers {{{
" C-x closes buffer with bbye
nnoremap <C-x> :Bdelete<CR>
" tab and shift-tab move buffers
nnoremap <Tab> :bnext<CR>
nnoremap <S-Tab> :bprev<CR>
" }}}
" QOL binds {{{
" open :term
noremap ~ :15split\|term<CR>
" NERDtree
noremap <C-t> :NERDTreeToggle<CR>
" F5 makes
noremap <F5> :make<CR>
" ESC returns from terminal insert mode
tnoremap <Esc> <C-\><C-n>
" <ESC> in normal mode ends search
nnoremap <Esc> :nohls<CR>
" }}}
" end binds }}}
" autocommands {{{
" for makefiles and go files: use noexpandtab {{{
augroup UseNoexpandtab
autocmd!
autocmd FileType go set noexpandtab
autocmd FileType go set tabstop=2
autocmd FileType make set noexpandtab
autocmd FileType make set tabstop=2
augroup END
" }}}
" auto-apply dotfiles on save {{{
augroup AutoApplyDotfiles
autocmd!
autocmd BufWritePost ~/.Xresources* !xrdb -merge ~/.Xresources
autocmd BufWritePost ~/.config/i3/config !i3-msg reload
autocmd BufWritePost ~/.config/polybar/config !pkill -u $USER polybar && ~/.config/polybar/i3-launch.sh
augroup END
" }}}
" neovim only: make term behavior more convenient {{{
if has('neovim')
augroup TermConfig
autocmd!
autocmd TermOpen * setlocal nonumber
autocmd TermOpen * startinsert
autocmd TermClose * bdelete!
augroup END
endif
" }}}
" filetype autocmds {{{
" set make programs
augroup Makeprgs
autocmd FileType python set makeprg=python\ %
autocmd FileType javascript set makeprg=node\ %
autocmd FileType go set makeprg=go\ run\ .
augroup END
" enforce 80 columns on markdown
autocmd FileType markdown set tw=80
" }}}
" }}} end autocommands
" custom commands {{{
" dotfile editing commands {{{
command! Vimrc e $MYVIMRC
command! VimrcUpdate source $MYVIMRC
command! Zshrc e ~/.zshrc
" }}}
" miscellaneous {{{
" convert a pure React component to class, with react-pure-to-class
command! -range ReactPureToClass <line1>,<line2>!react-pure-to-class
" get highlighting group under cursor (thanks vim wiki)
command! WhichHighlight :echom synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
" }}}
" end custom commands }}}
" vi: foldmethod=marker foldenable
" bclindner vimrc
" vim-plug configuration
call plug#begin('~/.vim/plugged/')
"" THE ESSENTIALS - statusline, file tree, linter, fuzzy finder, etc.
Plug 'vim-airline/vim-airline'
Plug 'scrooloose/nerdtree'
Plug 'valloric/YouCompleteMe'
Plug 'w0rp/ale'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
" OPTIMIZATIONS - autoclosing, multicursor, sneak, :Bdelete, and surround
Plug 'Raimondi/delimitMate'
Plug 'terryma/vim-multiple-cursors'
Plug 'justinmk/vim-sneak'
Plug 'moll/vim-bbye'
Plug 'tpope/vim-surround'
" language support
Plug 'pangloss/vim-javascript' " javascript
Plug 'leafgarland/typescript-vim' " typescript
Plug 'hail2u/vim-css3-syntax' " css3
Plug 'digitaltoad/vim-pug' " pug
Plug 'mxw/vim-jsx' " jsx
" Plug 'gregsexton/MatchTag' " html tag matching
" THEME - ripped this off of the 'cool' theme that came with vim-airline lmao
Plug 'bclindner/vim-airline-bclindner'
call plug#end()
filetype plugin indent on
set omnifunc=syntaxcomplete#Complete
" end vim-plug configuration
" binds
"" NERDtree
map <C-t> :NERDTreeToggle<CR>
"" alt-movement between splits
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
"" tab movement between buffer
nmap <Tab> :bnext<CR>
nmap <S-Tab> :bprev<CR>
"" C-x closes buffer
nmap <C-x> :Bdelete<CR>
"" abbreviate to allow tag autoclosing - type </(space)
iabbrev <// </<C-X><C-O>
" end binds
" general options
"" colorscheme
colorscheme zellner
"" line options
set list
set listchars=tab:→\ ,nbsp:␣,trail:•,extends:⟩,precedes:⟨
set number
set linebreak
set showbreak=">>>"
set breakindent
set cursorline
"" QoL
set hidden
"" search options
set showmatch
set nohlsearch
set smartcase
set ignorecase
set incsearch
"" set indent options (default 2 spaces)
set autoindent
set shiftwidth=2
set expandtab
set smartindent
set softtabstop=2
set tabstop=2
"" use mouse, because sometimes i'm just lazy
set mouse=a
"" make backspace not stupid
set backspace=indent,eol,start
"" syntax highlighting
syntax enable
"" highlighting tweaks
highlight ALEError ctermfg=black ctermbg=red cterm=bold
highlight ALEErrorSign ctermfg=black ctermbg=red cterm=bold
"" for makefiles and go files: use noexpandtab
autocmd FileType go set noexpandtab
autocmd FileType go set tabstop=2
autocmd FileType make set noexpandtab
autocmd FileType make set tabstop=2
" auto-apply dotfiles on save
autocmd! BufWritePost $MYVIMRC source % | PlugInstall | q | redraw
autocmd! BufWritePost ~/.Xresources !xrdb -merge ~/.Xresources
autocmd! BufWritePost ~/.zshrc !source %
autocmd! BufWritePost ~/.config/i3/config !i3-msg reload
autocmd! BufWritePost ~/.config/polybar/config !pkill -u $USER polybar && ~/.config/polybar/i3-launch.sh
" w0rp/ale: use specific linters for stuff
let g:ale_linters = {'javascript': ['eslint']}
" end general options
" plugin configuration
"" nerdtree stuff
autocmd StdinReadPre * let s:std_in=1
let g:NERDTreeWinPos = "right"
"" airline stuff
set laststatus=2
let g:airline_theme='bclindner'
"" ale stuff
let g:ale_sign_column_always = 1
let b:ale_linters = {'javascript': [ 'eslint', 'standard' ] }
""" enable bufferline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ''
let g:airline#extensions#tabline#left_alt_sep = ''
""" set airline symbols
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.crypt = '🔒'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.maxlinenr = '☰'
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ'
"" ctrlp stuff - ignore line
set wildignore+=node_modules
"" ycm stuff - set ycm color
highlight Pmenu ctermbg=5 ctermfg=15
" end plugin configuration
" custom commands
command! Vimrc e $MYVIMRC
command! VimrcUpdate source $MYVIMRC
command! Zshrc e ~/.zshrc
command! W w !sudo tee %
" end custom commands
" make configuration
autocmd FileType python set makeprg=python\ %
autocmd FileType javascript set makeprg=node\ %
" end make configuration
"gvim fix: set background color to black
highlight Normal guibg=#1d1f21 guifg=white
[Configuration]
ColorCursor=#e3e3e3e3e3e3
ColorForeground=#e3e3e3e3e3e3
ColorBackground=#1d1d1f1f2121
ColorPalette=#1d1d1f1f2121;#afaf31313131;#6565cccc3e3e;#eeee7d7d2f2f;#4a4a8c8cc3c3;#87875f5fd7d7;#4545c3c3b3b3;#777777777777;#37373b3b4141;#d0d05c5c5c5c;#a6a6e1e17474;#e4e495954c4c;#6565a7a7dfdf;#afaf5f5fffff;#7c7cdadacdcd;#e3e3e3e3e3e3
ColorBoldUseDefault=FALSE
FontName=Terminess Powerline 9
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=FALSE
MiscMouseAutohide=FALSE
MiscToolbarDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
TabActivityColor=#dc322f
ScrollingBar=TERMINAL_SCROLLBAR_NONE
CommandLoginShell=TRUE
TitleMode=TERMINAL_TITLE_REPLACE
MiscScrollAlternateScreen=TRUE
BindingBackspace=TERMINAL_ERASE_BINDING_ASCII_DELETE
ScrollingSingleLine=FALSE
BackgroundDarkness=0.950000
MiscBellUrgent=FALSE
MiscMouseWheelZoom=TRUE
MiscMiddleClickOpensUri=FALSE
MiscCopyOnSelect=FALSE
MiscDefaultWorkingDir=
MiscRewrapOnResize=TRUE
MiscUseShiftArrowsToScroll=FALSE
MiscSlimTabs=FALSE
# bclindner zsh config
######################
# oh-my-zsh settings #
######################
# general settings {{{
# options
setopt appendhistory notify extendedglob
unsetopt beep nomatch
# terminal/editor vars
ZSH=~/.zshrc.d
export TERM=xterm-256color
export EDITOR=nvim
# ignore untracked git files
DISABLE_UNTRACKED_FILES_DIRTY="true"
# my theme
ZSH_THEME="bclindner"
# ... on completion waiting
COMPLETION_WAITING_DOTS="true"
# history settings {{{
HISTFILE=~/.histfile
HISTSIZE=500
SAVEHIST=500
# }}}
# Darwin/BSD {{{
export CLICOLOR=1
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
# }}}
# }}}
export ZSH=$HOME/.oh-my-zsh
## use forked agnoster theme
ZSH_THEME="bclindner"
## correction disabled
ENABLE_CORRECTION="false"
## ... on completion waiting
COMPLETION_WAITING_DOTS="true"
## i don't actually know what this does
DISABLE_UNTRACKED_FILES_DIRTY="true"
## use a buncha plugins:
plugins=(
aws
git
node
screen
npm
command-not-found
gulp
yarn
docker
docker-compose
systemd
virtualenv
)
## use oh-my-zsh
source $ZSH/oh-my-zsh.sh
####################
# general settings #
####################
# plugins {{{
# antigen config {{{
ADOTDIR=$HOME/.zshrc.d/antigen
source ~/.zshrc.d/antigen.zsh
antigen use oh-my-zsh
# }}}
# antigen bundles {{{
antigen bundles <<EOBUNDLES
git
gulp
yarn
docker
docker-compose
systemd
virtualenv
zsh-users/zsh-autosuggestions
zsh-users/zsh-syntax-highlighting
EOBUNDLES
## theme
antigen bundle $HOME/.zshrc.d/ bclindner.zsh-theme --no-local-clone
antigen apply
# }}}
# }}}
# use 256 colors
export TERM=xterm-256color
# vim is my editor
export EDITOR=vim
# GOPATH is $HOME/go
export GOPATH=~/go
# Add Go bin to PATH
export PATH=~/go/bin:$PATH
# history
HISTFILE=~/.histfile
HISTSIZE=500
SAVEHIST=500
# misc. options
setopt autocd notify extendedglob
unsetopt appendhistory beep nomatch
# aliases {{{
# command aliases {{{
# quit {{{
alias q="exit"
alias x="exit"
# }}}
# sudo {{{
alias s="sudo"
# }}}
# ranger auto-cd {{{
# thanks to gombai sandor on stackexchange (superuser.com/questions/1043806)!
alias ranger='ranger --choosedir=$HOME/.config/rangerdir; LASTDIR=`cat $HOME/.config/rangerdir`; cd "$LASTDIR"'
# }}}
# firefox shorthand and default -new-tab {{{
alias firefox="firefox -new-tab"
alias ff="firefox"
# }}}
# journalctl alias {{{
alias jctl="sudo journalctl"
# }}}
# rm {{{
alias rr="rm -r"
alias nuke="rm -rf"
alias rf="rm -rf"
# }}}
# ls {{{
case $() in
Linux*) # {{{
alias ls="ls --color=auto"
alias sl="ls --color=auto"
alias l="ls --color=auto"
alias la="ls -al --color=auto"
alias ll="ls -l --color=auto"
alias lh="ls -lh --color=auto"
;; # }}}
Darwin*|*BSD) # {{{
alias ls="ls"
alias sl="ls"
alias l="ls"
alias la="ls -al"
alias ll="ls -l"
alias lh="ls -lh"
;; # }}}
esac
# }}}
# neovim {{{
which nvim &>/dev/null
if [ $? -eq 0 ]; then
alias vim="nvim"
alias v="nvim"
alias sv="sudo nvim"
alias svim="sudo nvim"
alias dev="nvim +normal\ ~ +NERDTree +wincmd\ l"
fi
# }}}
# apt {{{
which apt &>/dev/null
if [ $? -eq 0 ]; then
alias a="apt"
alias sa="sudo apt"
alias acs="apt search"
alias sai="sudo apt install"
alias sad="sudo apt update"
alias sau="sudo apt update"
alias sag="sudo apt upgrade"
alias sap="sudo apt purge"
alias sar="sudo apt purge"
alias saa="sudo apt autoremove"
alias saug="sudo apt update && sudo apt upgrade"
fi
# }}}
# trizen {{{
which trizen &>/dev/null
if [ $? -eq 0 ]; then
alias t="trizen"
alias tzn="trizen"
alias tzs="trizen -S"
alias syu="trizen -Syu"
alias tsyu="trizen -Syu"
alias tzsyu="trizen -Syu"
alias tss="trizen -Ss"
alias tzss="trizen -Ss"
alias trs="trizen -Rs"
alias tzrs="trizen -Rs"
fi
# }}}
# quick-edit commands for some dotfiles {{{
alias zshrc="$EDITOR ~/.zshrc"
alias vimrc="$EDITOR ~/.config/nvim/init.vim"
# }}}
# }}}
# global aliases (shell text replacements) {{{
alias -g ,grep="| grep"
alias -g ,less="| less"
alias -g ,clip="| xclip -i"
# }}}
# }}}
###########
# aliases #
###########
# command aliases
## general command shorthands
### rm
alias rr="rm -r"
alias nuke="rm -rf"
alias rf="rm -rf"
### sudo
alias s="sudo"
### ls/ll/la/l
alias ls="ls --color=auto"
alias sl="ls --color=auto"
alias l="ls --color=auto"
alias la="ls -a --color=auto"
alias ll="ls -la --color=auto"
### clear
alias c="clear"
### a little creature comfort: clear && ls
alias cl="clear && ls"
### quit
alias q="exit"
alias x="edit"
### vim
alias v="vim"
alias sv="sudo vim"
alias svim="sudo vim"
### node shorthand
alias njs="node"
## for Debian-based: apt
alias a="apt"
alias sa="sudo apt"
alias acs="apt search"
alias sai="sudo apt install"
alias sad="sudo apt update"
alias sau="sudo apt update"
alias sag="sudo apt upgrade"
alias sap="sudo apt purge"
alias sar="sudo apt purge"
alias saa="sudo apt autoremove"
alias saug="sudo apt update && sudo apt upgrade"
## for Arch-based: trizen
alias t="trizen"
alias tzn="trizen"
alias tzs="trizen -S"
alias syu="trizen -Syu"
alias tsyu="trizen -Syu"
alias tzsyu="trizen -Syu"
alias tss="trizen -Ss"
alias tzss="trizen -Ss"
alias trs="trizen -Rs"
alias tzrs="trizen -Rs"
## quick-edit commands for some dotfiles
alias zshrc="vim ~/.zshrc"
alias vimrc="vim ~/.vimrc"
## ranger auto-cd; thanks to gombai sandor on stackexchange (superuser.com/questions/1043806)!
alias ranger='ranger --choosedir=$HOME/.config/rangerdir; LASTDIR=`cat $HOME/.config/rangerdir`; cd "$LASTDIR"'
## xclip for clipboard
alias clipboard="xclip -selection c"
## firefox shorthand and default -new-tab
alias firefox="firefox -new-tab"
alias ff="firefox"
# global aliases (shell text replacements)
## common pipe commands
alias -g p-G="| grep"
alias -g p-L="| less"
# vi: foldmethod=marker foldenable
......@@ -44,11 +44,7 @@ CURRENT_BG='NONE'
# what font the user is viewing this source code in. Do not replace the
# escape sequence with a single literal character.
# Do not change this! Do not make it '\u2b80'; that is the old, wrong code point.
if [[ -o login ]]; then
SEGMENT_SEPARATOR=' '
else
SEGMENT_SEPARATOR=$'\ue0b0'
fi
SEGMENT_SEPARATOR=$'\ue0b0'
}
# Begin a segment
......@@ -94,11 +90,7 @@ prompt_git() {
local PL_BRANCH_CHAR
() {
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
if [[ -o login ]]; then
PL_BRANCH_CHAR="B"
else
PL_BRANCH_CHAR=$'\ue0a0' # 
fi
PL_BRANCH_CHAR=$'\ue0a0' # 
}
local ref dirty mode repo_path
repo_path=$(git rev-parse --git-dir 2>/dev/null)
......@@ -126,13 +118,8 @@ prompt_git() {
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' get-revision true
zstyle ':vcs_info:*' check-for-changes true
if [[ -o login ]]; then
zstyle ':vcs_info:*' stagedstr '+'
zstyle ':vcs_info:*' unstagedstr 'o'
else
zstyle ':vcs_info:*' stagedstr '✚'
zstyle ':vcs_info:*' unstagedstr '●'
fi
zstyle ':vcs_info:*' stagedstr '✚'
zstyle ':vcs_info:*' unstagedstr '●'
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info
......