Merge branch 'master' of github.com:scottwallacesh/dotfiles
This commit is contained in:
commit
a034df8644
|
@ -22,7 +22,7 @@
|
|||
lgd = log -p --decorate
|
||||
history = log --pretty=oneline --abbrev-commit --all --graph --decorate
|
||||
tidy = !git remote prune origin && git fetch -pPt && git branch -vv | awk '/: gone]/ {print $1}' | xargs -r git branch -D
|
||||
update = !git pull && git tidy
|
||||
update = !git pull --recurse-submodules && git tidy
|
||||
st = status
|
||||
ci = commit
|
||||
co = checkout
|
||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule ".vim/bundle/Vundle.vim"]
|
||||
path = .vim/bundle/Vundle.vim
|
||||
url = https://github.com/gmarik/Vundle.vim.git
|
|
@ -1 +0,0 @@
|
|||
Subproject commit b255382d6242d7ea3877bf059d2934125e0c4d95
|
103
.vimrc
103
.vimrc
|
@ -7,35 +7,6 @@ set vb
|
|||
" Enable modeline in files
|
||||
set modeline
|
||||
|
||||
" Ensure vim knows about Go(lang)
|
||||
set rtp+=$GOROOT/misc/vim
|
||||
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
|
||||
" Plugins
|
||||
Plugin 'VundleVim/Vundle.vim'
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
Plugin 'tpope/vim-commentary'
|
||||
Plugin 'tpope/vim-surround'
|
||||
Plugin 'scrooloose/syntastic'
|
||||
Plugin 'scrooloose/nerdtree'
|
||||
Plugin 'itchyny/lightline.vim'
|
||||
Plugin 'w0ng/vim-hybrid'
|
||||
Plugin 'cocopon/lightline-hybrid.vim'
|
||||
Plugin 'Shougo/neocomplcache.vim'
|
||||
Plugin 'kien/ctrlp.vim'
|
||||
Plugin 'rodjek/vim-puppet'
|
||||
Plugin 'godlygeek/tabular'
|
||||
Plugin 'ap/vim-buftabline'
|
||||
Plugin 'vim-scripts/WhiteWash'
|
||||
Plugin 'jistr/vim-nerdtree-tabs'
|
||||
Plugin 'davidhalter/jedi'
|
||||
Plugin 'plasticboy/vim-markdown'
|
||||
|
||||
" All of your Plugins must be added before the following line
|
||||
call vundle#end() " required
|
||||
filetype plugin indent on " required
|
||||
|
||||
" Hybrid color scheme
|
||||
|
@ -54,77 +25,3 @@ set diffopt+=vertical
|
|||
|
||||
" Syntax highlighting
|
||||
syntax on
|
||||
|
||||
" NERDTree
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
|
||||
" Autocomplete
|
||||
let g:neocomplcache_enable_at_startup = 1
|
||||
|
||||
" Disable Markdown folding
|
||||
let g:vim_markdown_folding_disabled = 1
|
||||
|
||||
" Set filetypes
|
||||
au BufRead,BufNewFile *.md set filetype=markdown
|
||||
au BufRead,BufNewFile *.go set filetype=go
|
||||
|
||||
" Lightline
|
||||
set laststatus=2
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'hybrid',
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'fugitive': 'LightLineFugitive',
|
||||
\ 'readonly': 'LightLineReadonly',
|
||||
\ 'modified': 'LightLineModified',
|
||||
\ 'filename': 'LightLineFilename'
|
||||
\ },
|
||||
\ 'mode_map': {
|
||||
\ 'n' : 'N',
|
||||
\ 'i' : 'I',
|
||||
\ 'R' : 'R',
|
||||
\ 'v' : 'V',
|
||||
\ 'V' : 'V-L',
|
||||
\ "\<C-v>": 'V-B',
|
||||
\ 'c' : 'C',
|
||||
\ 's' : 'S',
|
||||
\ 'S' : 'S-L',
|
||||
\ "\<C-s>": 'S-B',
|
||||
\ '?': ' '
|
||||
\ },
|
||||
\ 'separator': { 'left': '', 'right': '' },
|
||||
\ 'subseparator': { 'left': '>', 'right': '<' }
|
||||
\ }
|
||||
|
||||
function! LightLineModified()
|
||||
if &filetype == "help"
|
||||
return ""
|
||||
elseif &modified
|
||||
return "+"
|
||||
elseif &modifiable
|
||||
return ""
|
||||
else
|
||||
return ""
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! LightLineReadonly()
|
||||
if &filetype == "help"
|
||||
return ""
|
||||
elseif &readonly
|
||||
return "!"
|
||||
else
|
||||
return ""
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! LightLineFugitive()
|
||||
if exists("*fugitive#head")
|
||||
let _ = fugitive#head()
|
||||
return strlen(_) ? 'git:'._ : ''
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
|
14
bin/mic-toggle.sh
Executable file
14
bin/mic-toggle.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
CARD='C920'
|
||||
|
||||
declare -A ICONS=([on]=microphone-sensitivity-high [off]=microphone-sensitivity-muted)
|
||||
|
||||
# Toggle the mic
|
||||
amixer -c ${CARD} sset Mic mute toggle
|
||||
|
||||
# Grab the state
|
||||
STATE=$(amixer -c ${CARD} cget name='Mic Capture Switch' | grep -F ': values=' | cut -f2 -d=)
|
||||
|
||||
# Notify
|
||||
notify-send -t 3000 "${CARD} Mic" ${STATE^^} -i ${ICONS[${STATE}]}
|
2
bin/mute
2
bin/mute
|
@ -3,4 +3,6 @@
|
|||
case $(uname -s) in
|
||||
Darwin) osascript -e "set volume output volume 0"
|
||||
;;
|
||||
Linux) pactl set-sink-mute @DEFAULT_SINK@ on
|
||||
;;
|
||||
esac
|
||||
|
|
19
bin/mutelock.sh
Executable file
19
bin/mutelock.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
# Credit for code:
|
||||
#https://unix.stackexchange.com/users/14353/cliff-stanford
|
||||
#https://unix.stackexchange.com/users/231160/nik-gnomic
|
||||
# Post on stackexchange: https://unix.stackexchange.com/questions/467456/how-to-mute-sound-when-xscreensaver-locks-screen/589614#589614
|
||||
|
||||
gdbus monitor -e -d org.xfce.ScreenSaver | grep ActiveChanged --line-buffered |
|
||||
while read line
|
||||
do
|
||||
case "$line" in
|
||||
*"(true,)"*)
|
||||
pactl set-sink-mute @DEFAULT_SINK@ on
|
||||
;;
|
||||
*"(false,)"*)
|
||||
pactl set-sink-mute @DEFAULT_SINK@ off
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exit
|
|
@ -1,8 +0,0 @@
|
|||
UPDATE_FILE=~/.vim/updated
|
||||
|
||||
[ -f ${UPDATE_FILE} ] || touch -t 197001010000 ${UPDATE_FILE}
|
||||
|
||||
find ${UPDATE_FILE} -mtime +0 -exec bash -c "\
|
||||
vim +PluginInstall! +PluginClean! +qall
|
||||
" \;
|
||||
touch ${UPDATE_FILE}
|
Loading…
Reference in a new issue