aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshmibs <shmibs@gmail.com>2017-11-27 01:08:51 -0700
committershmibs <shmibs@gmail.com>2017-11-27 01:08:51 -0700
commitc688f7bce20158661f377e9679c3b2ce8b963fc6 (patch)
treecd0b66a81272918b7bb622c2b905d699ad058ab5
parent66b00763352ccbc4af59259472a39249dc4345d6 (diff)
parenta0f41b26800251aa05cbd042c8852ec8e212a95b (diff)
downloaddotfiles-c688f7bce20158661f377e9679c3b2ce8b963fc6.tar.gz
Merge branch 'master' of github.com:shmibs/dotfiles
-rw-r--r--.config/beets/config.yaml15
-rwxr-xr-x.config/herbstluftwm/autostart25
-rwxr-xr-x.config/herbstluftwm/maim.sh52
-rwxr-xr-x.config/herbstluftwm/panel.sh2
-rwxr-xr-x.config/herbstluftwm/pass.sh25
-rwxr-xr-x.config/herbstluftwm/pvol.sh20
-rwxr-xr-x.config/herbstluftwm/switcher.sh4
-rwxr-xr-x.config/init/funcs/mpd-filetypes1
-rwxr-xr-x.config/init/funcs/scap2
-rwxr-xr-x.config/init/init.sh2
-rw-r--r--.config/init/vars47
-rw-r--r--.config/ranger/rifle.conf6
-rw-r--r--.vim/skel/bash3
-rw-r--r--.vim/skel/tex17
-rw-r--r--.vim/skel/zsh3
-rw-r--r--.vimrc139
-rw-r--r--.xinitrc16
-rw-r--r--.zprofile4
-rw-r--r--.zshrc36
-rw-r--r--README.md63
20 files changed, 358 insertions, 124 deletions
diff --git a/.config/beets/config.yaml b/.config/beets/config.yaml
index 358a73a..8fbe392 100644
--- a/.config/beets/config.yaml
+++ b/.config/beets/config.yaml
@@ -22,19 +22,30 @@ match:
# PLUGINS #
#############
-plugins: convert chroma discogs fetchart fuzzy info mpdupdate scrub
+plugins: acousticbrainz absubmit convert chroma discogs fetchart fuzzy info mpdupdate scrub edit zero
convert:
auto: no
copy_album_art: no
embed: no
- never_convert_lossy_files: yes
+ never_convert_lossy_files: no
+ format: opus
chroma:
auto: yes
fetchart:
auto: yes
+
+acousticbrainz:
+ auto: yes
+
+absubmit:
+ auto: yes
+
+zero:
+ auto: yes
+ fields: comments
fuzzy:
prefix: '@'
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart
index 8e86ccc..4cf40b0 100755
--- a/.config/herbstluftwm/autostart
+++ b/.config/herbstluftwm/autostart
@@ -120,10 +120,18 @@ hc keybind Mod4-i jumpto urgent
# tegaki
hc keybind Mod4-r spawn tegaki-recognize
-# mate
-hc keybind XF86PowerOff spawn mate-session-save --shutdown-dialog
-hc keybind Mod1-XF86PowerOff spawn mate-session-save --shutdown-dialog
-hc keybind Print spawn mate-screenshot
+
+#pass
+hc keybind Mod4-x spawn ~/.config/herbstluftwm/pass.sh
+hc keybind Mod4-Shift-x spawn ~/.config/herbstluftwm/pass.sh -f
+
+#scrot-ing
+hc keybind Print spawn ~/.config/herbstluftwm/maim.sh
+hc keybind Shift-Print spawn ~/.config/herbstluftwm/maim.sh -s
+hc keybind Control-Print spawn ~/.config/herbstluftwm/maim.sh -m clipboard
+hc keybind Shift-Control-Print spawn ~/.config/herbstluftwm/maim.sh -s -m clipboard
+hc keybind Mod4-Print spawn ~/.config/herbstluftwm/maim.sh -m send
+hc keybind Mod4-Shift-Print spawn ~/.config/herbstluftwm/maim.sh -s -m send
# ranger
hc keybind Mod4-Shift-Control-Return spawn urxvt -name "ranger" -e ranger ~
@@ -150,7 +158,6 @@ hc keybind Mod4-w spawn xdotool click 1
# spawn
hc keybind Mod4-Return spawn urxvt
hc keybind Mod4-Shift-b spawn primusrun VBoxSDL --startvm arch
-hc keybind Mod4-Shift-c spawn cvlc v4l2://
hc keybind Mod4-Shift-d spawn ~/games/desura/desura
hc keybind Mod4-Shift-f spawn firejail --netfilter=/etc/firejail/nolocal.net firefox
hc keybind Mod4-Shift-g spawn gwaei
@@ -159,7 +166,6 @@ hc keybind Mod4-Shift-m spawn mathematica
hc keybind Mod4-Shift-n spawn urxvt -name "notes" -e $EDITOR ~/notes
hc keybind Mod4-Shift-o spawn ~/stuffs/tor/start-tor-browser
hc keybind Mod4-Shift-p spawn urxvt -e pms
-hc keybind Mod4-Shift-s spawn scrot
hc keybind Mod4-Shift-t spawn transmission-gtk
hc keybind Mod4-Shift-v spawn urxvt -name "$EDITOR" -e $EDITOR
hc keybind Mod4-Shift-w spawn urxvt -name "weechat" -e weechat
@@ -172,6 +178,11 @@ hc keybind Mod4-r spawn dmenu_run -fn "${bfont}:size=${bfont_size}" \
hc keybind Mod4-g spawn ~/.config/herbstluftwm/switcher.sh
# hc keybind Mod4-8 spawn ~/.config/herbstluftwm/calc.sh
+hc keybind XF86AudioLowerVolume spawn ~/.config/herbstluftwm/pvol.sh down
+hc keybind XF86AudioRaiseVolume spawn ~/.config/herbstluftwm/pvol.sh up
+hc keybind XF86AudioMute spawn ~/.config/herbstluftwm/pvol.sh mute
+hc keybind XF86AudioMicMute spawn ~/.config/herbstluftwm/pvol.sh
+
# tunes
hc keybind Mod4-Up spawn ~/.config/herbstluftwm/mpc-status.sh
hc keybind Mod4-Down spawn mpc toggle
@@ -191,7 +202,7 @@ hc rule focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
# set apppropriate things to pseudotile
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on focus=on
-hc rule class~'(VBoxSDL|SleepIsDeathApp|freeciv-sdl|FTL)' pseudotile=on focus=on
+hc rule class~'(VBoxSDL|SleepIsDeathApp|freeciv-sdl|FTL|pinentry)' pseudotile=on focus=on
hc rule class~'(Tegaki-recognize|PlayOnLinux|PCSX2|Tilem2|Wine|explorer.exe)' pseudotile=on focus=on
hc rule class~'(mednafen)' pseudotile=on focus=on
diff --git a/.config/herbstluftwm/maim.sh b/.config/herbstluftwm/maim.sh
new file mode 100755
index 0000000..a569460
--- /dev/null
+++ b/.config/herbstluftwm/maim.sh
@@ -0,0 +1,52 @@
+#!/usr/bin/env zsh
+
+local mpat='^(send|clipboard|normal)$'
+
+local mode='normal'
+local selection
+
+local args
+zparseopts -D -E -M -A args \
+ m: -mode=m \
+ s -selection=s
+
+local optarg
+for opt in ${(@k)args}; do
+ unset optarg
+ [[ -z $args[$opt] ]] || optarg=$args[$opt]
+ case $opt in
+ -m)
+ [[ ! $(echo $optarg | grep -oE "$mpat") ]] \
+ && echo "err: bad mode" && exit
+ mode=$optarg
+ ;;
+
+ -s) selection=s ;;
+ esac
+done
+
+[[ ${#@} -gt 0 ]] && echo "err: unrecognised arguments" && exit
+
+local year
+local stamp
+date +%Y | read year
+date +%s | read stamp
+
+local fname="$HOME/images/scrot/$year/${year}-${stamp}.png"
+
+mkdir -p $HOME/images/scrot/$year
+
+if [[ $mode == clipboard ]]; then
+ maim -u${selection} | xclip -selection clipboard -t image/png
+ exit
+fi
+
+maim -u${selection} $fname
+
+if [[ $mode == send ]]; then
+ [[ -f $fname ]] \
+ && optipng $fname \
+ && send $fname \
+ && notify-send "maim: sent ${fname:t} to /tmp/" \
+ || notify-send "maim: send to /tmp/ failed"
+fi
diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh
index 285270e..057245a 100755
--- a/.config/herbstluftwm/panel.sh
+++ b/.config/herbstluftwm/panel.sh
@@ -300,7 +300,7 @@ event_when() {
# pass the events into bar
} 2> /dev/null | lemonbar -f "$ifont" -o "$ifont_off" \
-f "${bfont}:size=${bfont_size}" -o "$bfont_off" \
- -f "${jfont}:size=${jfont_size}" -o "$jfont_off" \
+ -f "${bjfont}:size=${bjfont_size}" -o "$bjfont_off" \
-g${width}x${bheight}+${xpos}+${ypos} \
-B ${bg_normal} -F ${fg_normal} | \
{
diff --git a/.config/herbstluftwm/pass.sh b/.config/herbstluftwm/pass.sh
new file mode 100755
index 0000000..32a7b2d
--- /dev/null
+++ b/.config/herbstluftwm/pass.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env zsh
+
+source ~/.config/init/vars
+
+zparseopts -M -E -A args \
+ f -firefox=f
+
+local password_files
+
+password_files=( ~/.password-store/**/*.gpg )
+password_files=( ${password_files:t:r} )
+
+printf "%s\n" $password_files | dmenu -fn "${bfont}:size=${bfont_size}" -i \
+ -h "$bheight" -nb "$bar_bg" -nf "$bar_fg" \
+ -sb "$bg_focus" -sf "$fg_focus" \
+ -p "Pass:" | cut -d ')' -f 1 | read choice
+
+[[ -n $choice ]] || exit
+
+pass show $choice | sed -n -e 's/^login: //p' | xclip -selection clipboard
+
+pass show $choice | sed -n -e 's/^url: //p' | read url
+[[ ${(@k)args[-f]} ]] && firefox --new-tab "$url"
+
+pass show -c $choice
diff --git a/.config/herbstluftwm/pvol.sh b/.config/herbstluftwm/pvol.sh
new file mode 100755
index 0000000..5c7b351
--- /dev/null
+++ b/.config/herbstluftwm/pvol.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# i patched dunst to clear all on SIGUSR1
+killall -SIGUSR1 dunst
+
+# race condition, obvs, but this is hopefully time enough
+case "$1" in
+ down)
+ pavolume voldown --quiet 2
+ ;;
+ up)
+ pavolume volup --quiet 2
+ ;;
+ mute)
+ pavolume mutetoggle --quiet
+ ;;
+ *)
+ pavolume show
+ ;;
+esac
diff --git a/.config/herbstluftwm/switcher.sh b/.config/herbstluftwm/switcher.sh
index e076eb3..2558303 100755
--- a/.config/herbstluftwm/switcher.sh
+++ b/.config/herbstluftwm/switcher.sh
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/usr/bin/env zsh
source ~/.config/init/vars
@@ -16,6 +16,6 @@ done < <(wmctrl -l)
echo -e "$lines" | nl -w 2 -s ") " | dmenu -fn "${bfont}:size=${bfont_size}" -i -h "$bheight" \
-nb "$bar_bg" -nf "$bar_fg" -sb "$bg_focus" -sf "$fg_focus" \
- -p "Select:" -l 40 | cut -d ')' -f 1 | {read choice}
+ -p "Select:" -l 40 | cut -d ')' -f 1 | read choice
herbstclient jumpto "${nums[$choice]}"
diff --git a/.config/init/funcs/mpd-filetypes b/.config/init/funcs/mpd-filetypes
index 0bc93d2..3015676 100755
--- a/.config/init/funcs/mpd-filetypes
+++ b/.config/init/funcs/mpd-filetypes
@@ -5,7 +5,6 @@
local pattern
# if args exist, read them as file extensions in a pattern
-if
if [[ ! -z "$@" ]]; then
pattern=$(echo "$@" | sed -e 's/\s/|/g' -e 's/\(.*\)/(\1)/')
else
diff --git a/.config/init/funcs/scap b/.config/init/funcs/scap
index bf9c66d..85a083f 100755
--- a/.config/init/funcs/scap
+++ b/.config/init/funcs/scap
@@ -13,6 +13,6 @@ fi
echo 'recording...'
-ffmpeg -v panic -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 \
+ffmpeg -v panic -video_size 1920x1080 -framerate 20 -f x11grab -i :0.0 \
-f pulse -ac 2 -i default -af aresample=async=1 \
-c:v libx264 -q 0 -preset ultrafast '/tmp/cap.mp4'
diff --git a/.config/init/init.sh b/.config/init/init.sh
index 6a21763..fa9f9d2 100755
--- a/.config/init/init.sh
+++ b/.config/init/init.sh
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/usr/bin/env zsh
source $HOME/.config/init/vars
diff --git a/.config/init/vars b/.config/init/vars
index ac51b97..1ae4675 100644
--- a/.config/init/vars
+++ b/.config/init/vars
@@ -324,34 +324,61 @@ bheight=20
ifont='-*-stlarch-medium-r-*-*-*-*-*-*-*-*-*-*'
ifont_off='-4'
-# bar font
-bfont='Droid Sans Mono Dotted'
-bfont_size='9'
-bfont_off='-3'
-
# jp font
jfont='Noto Sans Mono CJK JP Regular'
jfont_size='10'
-jfont_off='-1'
# c font
cfont='Noto Sans Mono CJK SC Regular'
cfont_size='10'
-cfont_off='-1'
# emoji font
efont='Noto Emoji'
efont_size='10'
-efont_off='-1'
# backup font
bkfont='Fira Mono'
-bkfont_size='10'
+bkfont_size='9.5'
bkfont_off='-3'
# main font
mfont='Droid Sans Mono Dotted'
-mfont_size='10'
+mfont_size='9.5'
+
+# bar font
+bfont="$mfont"
+bfont_size='8.5'
+bfont_off='-3'
+
+# bar jp font
+bjfont="$jfont"
+bjfont_size='9.5'
+bjfont_off='-1'
+
+# bar c font
+bcfont="$cfont"
+bcfont_size='9.5'
+bcfont_off='-1'
+
+# bar emoji font
+befont="$efont"
+befont_size='9.5'
+befont_off='-1'
+
+# monitor dpi can be on-the-fly overridden by using "startx" instead of alias sx
+dpi=92
+
+kbrate=25
+kbdelay=300
+
+# use overrides, if any
+if [ -f ~/.config/init/voverride ]; then
+ source ~/.config/init/voverride
+else
+ if [ -f /home/shmibs/.config/init/voverride ]; then
+ source /home/shmibs/.config/init/voverride
+ fi
+fi
dmenu_args=( -fn "${bfont}:size=${bfont_size}" -h "$bheight"
-nb "$bg_normal" -nf "$fg_normal" -sb "$bg_focus"
diff --git a/.config/ranger/rifle.conf b/.config/ranger/rifle.conf
index cf7e9e7..7093f3d 100644
--- a/.config/ranger/rifle.conf
+++ b/.config/ranger/rifle.conf
@@ -128,8 +128,8 @@ mime ^video, terminal, !X, has mpv = mpv -- "$@"
#-------------------------------------------
ext djvu|pdf|ps, has zathura, X, flag f = zathura -- "$@"
-ext tex, has latex = latex -- "-output-format=pdf" "$@"
-ext tex, has xelatex = xelatex -- "-output-format=pdf" "$@"
+ext tex, has latex = latex "-output-format=pdf" -- "$@"
+ext tex, has xelatex = xelatex -- "$@"
ext docx?, has catdoc, terminal = catdoc -- "$@" | $PAGER
@@ -137,6 +137,8 @@ ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, fla
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
ext od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric|rtf, has libreoffice, X, flag f = libreoffice "$@"
+ext sla, has scribus, X, flag f = scribus "$@"
+
#-------------------------------------------
# Images
#-------------------------------------------
diff --git a/.vim/skel/bash b/.vim/skel/bash
new file mode 100644
index 0000000..b6d0a1b
--- /dev/null
+++ b/.vim/skel/bash
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+%START%
diff --git a/.vim/skel/tex b/.vim/skel/tex
new file mode 100644
index 0000000..3fb79fb
--- /dev/null
+++ b/.vim/skel/tex
@@ -0,0 +1,17 @@
+\documentclass[letter,12pt]{article}
+\usepackage[margin=1in]{geometry}
+
+\usepackage{xeCJK}
+\setCJKmainfont[Scale=.8]{IPAMincho}
+
+\title{}
+\author{}
+
+\begin{document}
+
+\frenchspacing
+\maketitle
+
+%START%
+
+\end{document}
diff --git a/.vim/skel/zsh b/.vim/skel/zsh
new file mode 100644
index 0000000..ebcd4c1
--- /dev/null
+++ b/.vim/skel/zsh
@@ -0,0 +1,3 @@
+#!/usr/bin/env zsh
+
+%START%
diff --git a/.vimrc b/.vimrc
index c7395f4..e752f01 100644
--- a/.vimrc
+++ b/.vimrc
@@ -9,7 +9,7 @@ endif
set nocompatible
filetype off
-set rtp+=~/.vim/bundle/Vundle.vim
+execute 'set rtp+=' . split(&rtp, ',')[0] . '/bundle/Vundle.vim'
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
@@ -19,6 +19,7 @@ Plugin 'kchmck/vim-coffee-script'
Plugin 'elixir-lang/vim-elixir'
Plugin 'plasticboy/vim-markdown'
Plugin 'shmibs/mips.vim'
+Plugin 'zah/nim.vim'
Plugin 'wlangstroth/vim-racket'
Plugin 'rust-lang/rust.vim'
Plugin 'cakebaker/scss-syntax.vim'
@@ -40,8 +41,6 @@ Plugin 'sjl/gundo.vim'
Plugin 'itchyny/lightline.vim'
-Plugin 'dermusikman/sonicpi.vim'
-
Plugin 'tomtom/tcomment_vim'
call vundle#end()
@@ -60,6 +59,9 @@ nmap ga <Plug>(EasyAlign)
"timeout on keycodes to prevent fcitx-switcher from lagging
set ttimeoutlen=100
+"toggle gundo pane
+nnoremap <Leader>u :GundoToggle<CR>
+
"lightline colours. modded from 16color
function! s:Lightline_palette_init()
let l:black = [ '#000000', 0 ]
@@ -132,12 +134,12 @@ set title
set spelllang=en_gb
"visual marker for overflowing the 80th column
-highlight Column80 ctermbg=black
-call matchadd('Column80', '\%81v', 100)
+highlight Column81 ctermbg=8
+call matchadd('Column81', '\%81v', 100)
"highlight space before tab
-highlight SpaceBeforeTab ctermbg=black
-call matchadd('SpaceBeforeTab', '^\ \+\t')
+highlight SpaceBeforeTab ctermbg=red
+call matchadd('SpaceBeforeTab', '\ \t')
"get rid of that annoying yellow explosion everywhere
"that neovim sets as default
@@ -222,33 +224,63 @@ autocmd BufNewFile,BufRead *.mips set filetype=mips
"other filetype-specific settings. i can't figure out how to stick all
"the FileTypes in one dict (mostly because i have no idea what i'm
"doing with viml), so separate lines it is.
-autocmd FileType asm call Settings_asm()
-autocmd FileType bash call Settings_shell()
-autocmd FileType c call Settings_c()
-autocmd FileType coffee call Settings_coffee()
-autocmd FileType conf call Settings_conf()
-autocmd FileType cpp call Settings_c()
-autocmd FileType css call Settings_css()
-autocmd FileType d call Settings_c()
-autocmd FileType elixir call Settings_elixir()
-autocmd FileType tex call Settings_tex()
-autocmd FileType haskell call Settings_haskell()
-autocmd FileType html call Settings_html()
-autocmd FileType xhtml call Settings_html()
-autocmd FileType make call Settings_script()
-autocmd FileType matlab call Settings_matlab()
-autocmd FileType mips call Settings_mips()
-autocmd FileType mkd call Settings_text()
-autocmd FileType perl call Settings_perl()
-autocmd FileType php call Settings_html()
-autocmd FileType python call Settings_script()
-autocmd FileType ruby call Settings_ruby()
-autocmd FileType rust call Settings_rust()
-autocmd FileType scss call Settings_css()
-autocmd FileType sh call Settings_script()
-autocmd FileType text call Settings_text()
-autocmd FileType vim call Settings_vim()
-autocmd FileType zsh call Settings_shell()
+autocmd FileType asm call Settings_asm()
+autocmd FileType bash call Settings_shell()
+autocmd FileType c call Settings_c()
+autocmd FileType coffee call Settings_coffee()
+autocmd FileType conf call Settings_conf()
+autocmd FileType cpp call Settings_c()
+autocmd FileType css call Settings_css()
+autocmd FileType d call Settings_c()
+autocmd FileType elixir call Settings_elixir()
+autocmd FileType tex call Settings_tex()
+autocmd FileType haskell call Settings_haskell()
+autocmd FileType html call Settings_html()
+autocmd FileType xhtml call Settings_html()
+autocmd FileType make call Settings_script()
+autocmd FileType markdown call Settings_markdown()
+autocmd FileType matlab call Settings_matlab()
+autocmd FileType mips call Settings_mips()
+autocmd FileType nim call Settings_nim()
+autocmd FileType mkd call Settings_text()
+autocmd FileType perl call Settings_perl()
+autocmd FileType php call Settings_html()
+autocmd FileType python call Settings_script()
+autocmd FileType ruby call Settings_script()
+autocmd FileType rust call Settings_rust()
+autocmd FileType scss call Settings_css()
+autocmd FileType sh call Settings_script()
+autocmd FileType text call Settings_text()
+autocmd FileType vim call Settings_vim()
+autocmd FileType zsh call Settings_shell()
+
+"command for reading filetype skeletons
+function! Settings_skel_read()
+ "is the buffer not empty?
+ if line('$') != 1 || col('$') != 1
+ return 1
+ end
+ "is there no template?
+ if filereadable(split(&rtp, ',')[0] . "/skel/" . &ft) == 0
+ return 1
+ end
+ execute 'r ' . split(&rtp, ',')[0] . "/skel/" . &ft
+ "move cursor to START
+ execute "normal ggJ/%START%\<CR>:%s/%START%//g\<CR>"
+ redraw!
+endfunction
+autocmd FileType * call Settings_skel_read()
+
+""write mode" for markup-type formats
+function! Settings_sub_wmodetoggle()
+ if &fo =~ 'a'
+ setlocal formatoptions-=a
+ echo 'wmode off'
+ else
+ setlocal formatoptions+=a
+ echo 'wmode on'
+ end
+endfunction
function! Settings_asm()
"settings
@@ -319,7 +351,19 @@ function! Settings_html()
setlocal tabstop=4
setlocal softtabstop=4
"mappings
- nnoremap <buffer> -- O<Space>--><Esc>hhhi<!--<Space>
+ nnoremap <buffer> -- O<Space>--><Esc>3hi<!--<Space>
+endfunction
+
+function! Settings_markdown()
+ "settings
+ setlocal shiftwidth=4
+ setlocal tabstop=4
+ setlocal softtabstop=4
+ setlocal nojoinspaces
+ setlocal spell
+ "mappings
+ nnoremap <buffer> -- O<Space>--><Esc>3hi<!--<Space>
+ nnoremap <buffer> <Leader>w :call Settings_sub_wmodetoggle()<CR>
endfunction
function! Settings_matlab()
@@ -340,6 +384,11 @@ function! Settings_mips()
nnoremap <buffer> -- O#<Space>
endfunction
+function! Settings_nim()
+ call Settings_script()
+ nnoremap <buffer> -- O<Space>]#<Esc>hhi#[<Space>
+endfunction
+
function! Settings_script()
"settings
setlocal shiftwidth=4
@@ -354,12 +403,6 @@ function! Settings_perl()
inoremap <buffer> {<CR> }<Esc>i{<CR><Esc>O
endfunction
-function! Settings_ruby()
- call Settings_script()
- nnoremap <buffer> <leader>r :execute "silent w !sonic_pi"<CR>
- nnoremap <buffer> <leader>s :execute "silent !sonic_pi stop"<CR><C-l>
-endfunction
-
function! Settings_rust()
call Settings_c()
nnoremap <buffer> -_ O///<Space>
@@ -375,26 +418,32 @@ function! Settings_tex()
setlocal noautoindent
setlocal nocindent
setlocal nosmartindent
+ setlocal nojoinspaces
setlocal shiftwidth=4
setlocal tabstop=4
setlocal softtabstop=4
+ setlocal spell
"mappings
nnoremap <buffer> -- O%<Space>
nnoremap <buffer> <Leader>c :!latex -output-format=pdf "%"<CR><CR>
nnoremap <buffer> <Leader>C :!latex -output-format=pdf "%"<CR>
- nnoremap <buffer> <Leader>x :!xelatex -output-format=pdf "%"<CR><CR>
- nnoremap <buffer> <Leader>X :!xelatex -output-format=pdf "%"<CR>
+ nnoremap <buffer> <Leader>x :!xelatex "%"<CR><CR>
+ nnoremap <buffer> <Leader>X :!xelatex "%"<CR>
+ nnoremap <buffer> <Leader>w :call Settings_sub_wmodetoggle()<CR>
endfunction
function! Settings_text()
- setlocal formatoptions+=ta
+ "settings
+ setlocal formatoptions+=a
setlocal noautoindent
setlocal nocindent
setlocal nosmartindent
- setlocal nojoinspaces "single-space sentences
+ setlocal nojoinspaces
setlocal tabstop=4
setlocal softtabstop=4
setlocal spell
+ "mappings
+ nnoremap <buffer> <Leader>w :call Settings_sub_wmodetoggle()<CR>
endfunction
function! Settings_vim()
diff --git a/.xinitrc b/.xinitrc
index b8a735a..3e5e166 100644
--- a/.xinitrc
+++ b/.xinitrc
@@ -1,5 +1,8 @@
#initialise configs to auto-match theme
-~/.config/init/init.sh
+# ~/.config/init/init.sh
+
+#pull inna vars
+source ~/.config/init/vars
#merge Xresources
if [ -s ~/.Xresources ]
@@ -7,17 +10,13 @@ then
xrdb -override ~/.Xresources
fi
-#merge Xresources
if [ -s /tmp/urxvt-theme ]
then
xrdb -override /tmp/urxvt-theme
fi
#add compose key
-if [ -s ~/.Xmodmap ]
-then
- xmodmap ~/.Xmodmap
-fi
+setxkbmap -option compose:caps
#input!
export GTK_IM_MODULE=fcitx
@@ -25,6 +24,9 @@ export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
fcitx &
+#keyrate
+xset r rate $kbdelay $kbrate
+
#store sxiv cache in ram
export XDG_CACHE_HOME=/home/shmibs/.cache
if [ -d /tmp/ ]; then
@@ -61,4 +63,4 @@ command -v optirun && $(echo "" | optirun lemonbar)
xsetroot -cursor_name left_ptr
nitrogen --restore
-exec mate-session
+exec herbstluftwm
diff --git a/.zprofile b/.zprofile
index 5ae8c18..4c6d11a 100644
--- a/.zprofile
+++ b/.zprofile
@@ -10,6 +10,10 @@ export QT_STYLE_OVERRIDE=gtk
[[ -d ~/.cabal/bin ]] && \
PATH=$PATH:~/.cabal/bin
+############# INITIALISE CONFIGS ##############
+[[ -f ~/.config/init/init.sh ]] && \
+ ~/.config/init/init.sh
+
########## MAKE USER FUNCS AVAILABLE ##########
func_init_checkreq() {
local func_init_state=0
diff --git a/.zshrc b/.zshrc
index 848413f..5e33e84 100644
--- a/.zshrc
+++ b/.zshrc
@@ -77,11 +77,14 @@ fi
################# HIGHLIGHTING ################
-if [[ -f '/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ]]; then
- source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
-else
- source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
-fi
+local HIGHLIGHT_DIR='~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh'
+[[ -f '/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ]] && \
+ HIGHLIGHT_DIR='/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh'
+[[ -f '/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ]] && \
+ HIGHLIGHT_DIR='/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh'
+
+source $HIGHLIGHT_DIR
+
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
#ZSH_HIGHLIGHT_STYLES[alias]="fg=yellow"
@@ -121,16 +124,17 @@ key[Down]='^[[B'
key[Right]='^[[C'
bindkey ${key[Backspace]} backward-delete-char
-bindkey ${key[Insert]} overwrite-mode
-bindkey ${key[Home]} beginning-of-line
-bindkey ${key[Delete]} delete-char
-bindkey ${key[End]} end-of-line
-bindkey ${key[Up]} up-line-or-search
-bindkey ${key[Left]} backward-char
-bindkey ${key[Down]} down-line-or-search
-bindkey ${key[Right]} forward-char
-bindkey ${key[PageUp]} history-beginning-search-backward
-bindkey ${key[PageDown]} history-beginning-search-forward
+bindkey ${key[Insert]} overwrite-mode
+bindkey ${key[Home]} beginning-of-line
+bindkey ${key[Delete]} delete-char
+bindkey ${key[End]} end-of-line
+bindkey ${key[Up]} up-line-or-search
+bindkey ${key[Left]} backward-char
+bindkey ${key[Down]} down-line-or-search
+bindkey ${key[Right]} forward-char
+bindkey ${key[PageUp]} history-beginning-search-backward
+bindkey ${key[PageDown]} history-beginning-search-forward
+
bindkey '^W' backward-kill-word
bindkey '^U' backward-kill-line
bindkey '^P' up-history
@@ -159,7 +163,7 @@ fi
[[ ! -z $(whence aiksaurus) ]] && alias thesaurus='aiksaurus'
[[ ! -z $(whence ag) ]] && alias ag='ag --color-match "1;34"'
[[ ! -z $(whence latex) ]] && alias latex='latex -output-format=pdf'
-[[ ! -z $(whence startx) ]] && alias sx='startx'
+[[ ! -z $(whence startx) ]] && alias sx="startx -dpi $dpi"
if [[ ! -z $(whence udevil) ]] then
alias vmount='udevil mount'
diff --git a/README.md b/README.md
index 4747666..cd80d33 100644
--- a/README.md
+++ b/README.md
@@ -7,24 +7,30 @@
## Structure
[.config/init/](.config/init) contains [vars](.config/init/vars), a file
-defining shared variables for the desktop which are sourced and used elsewhere,
-and a series of "gen/*.sh" files, which create configuration files in /tmp/ so
-programs not configurable via shell scripting will automatically match the
-current settings as well. i stick symlinks to the /tmp/ version where they
-would normally be. also included are folders "funcs" and "funcreqs", which,
-respectively, contain executable scripts and their prerequisite commands and
-arbitrary check commands. the latter prerequisites are tested from .zprofile at
-login and, if passed, the functions are symlinked into /tmp/funcs, which is
-included in $PATH. thus, this system allows for configs which automatically
-adapt to the host environment, enabling only what functionality is compatible.
+defining shared variables for the desktop which are sourced and used elsewhere.
+these settings can be overridden by creating a "voverride" file in the same
+directory. `.config/init` also contains a series of "gen/*.sh" files, which
+create configuration files in /tmp/ so programs not configurable via shell
+scripting will automatically match the current settings as well. i stick
+symlinks to the /tmp/ version where they would normally be. also included are
+folders "funcs" and "funcreqs", which, respectively, contain executable scripts
+and their prerequisite commands and arbitrary check commands. the latter
+prerequisites are tested from .zprofile at login and, if passed, the functions
+are symlinked into /tmp/funcs, which is included in $PATH. thus, this system
+allows for configs which automatically adapt to the host environment, enabling
+only what functionality is compatible. so far i've been the only user on
+systems using this config, but will probably make the dir these are written
+into configurable as well if that ever happens.
## Current Utilities
-### MATE
+### nvim/vim
-i'm using mate-session as a backend to handle dconf garbage / themes / etc for
-the few things that expect them. all higher-level mate utilities (wm, file
-manager, panel, whatever else) are not installed.
+using nvim, but no big incompatibilities with base vim yet with the way i use
+it, so falling back works fine. have a few fun things, including auto-loaded,
+filetype-specific settings and basic [templates](.vim/skel), a few fancy
+mappings, and a simple 16-colour [colourscheme](.vim/colors/shmibs.vim). take a
+look at muh [.vimrc](.vimrc) for details and things.
### herbstluftwm
@@ -39,8 +45,8 @@ with lots of slightly annoying things to get rid of.
### urxvt
-check out
-[urxvt-perls](https://github.com/muennich/urxvt-perls).
+has some quirks, but still nothing else out there with the same functionality.
+check out [urxvt-perls](https://github.com/muennich/urxvt-perls).
### ranger/sxiv
@@ -48,22 +54,21 @@ both are fantastic for keyboard-driven file management, but still've got to
figure out how to write a ranger extension that can receive selections from
sxiv, because squinting at filenames is just bleh. python is my bane, though...
-### pentadactyl
+### pass
-keyboard-driven browsing ^_^. try
-[setting your hint keys](http://5digits.org/pentadactyl/faq#faq-hintkeys).
-
-kind of scared of it disappearing forever, though, which will probably happen
-after this firefox version is dropped from lts... X_X
-
-EDIT: well, it finally happened. currently trying to get vimperator to work and
-not be ugly...
+a nice password manager-a-ma-bob, gpg locked and easy to sync with git. there's
+a firefox addon, but it doesn't really work, and there's an existing dmenu
+frontend, but it's not very featureful, so [i wrote my
+own](.config/herbstluftwm/pass.sh).
### dunst/dmenu/compton/lemonbar/nitrogen
useful things all around. i forked dunst to make SIGUSR1 clear all
notifications, which is used by
-[mpc-status.sh](.config/herbstluftwm/mpc-status.sh)
-and probably any other similar things i add in the future. not sure what the
-default behaviour (pause / unpause notification display) was supposed to be
-used for ┐(¯-¯)┌.
+[mpc-status.sh](.config/herbstluftwm/mpc-status.sh) and
+[pvol.sh](.config/herbstluftwm/pvol.sh).
+
+### fcitx
+
+input is messy, but fcitx seems like the most functional out there at the
+moment. fcitx-mozc a nice.