[[ $- != *i* ]] && return
# prompt lmao
-PS1=' λ_ \W > '
+PS1='\e[01;33m λ_\e[m\e[01;37m \W \e[m\e[01;33m> \e[m'
+PS2='\e[01;37m> \e[m'
#set vi mode
set -o vi
# alias lockscreen='slock -m "$(figlet locked xd | cowsay -f cheese -n)"'
alias darkmpv='mpv --vf=sub,lavfi="negate"'
alias nmaplocal='nmap -sn 192.168.1.0/24'
+alias refreshusb='udevadm control --reload-rules'
source fzfutil
hi Conceal ctermbg=Black
hi SpellBad ctermfg=Red ctermbg=Black cterm=underline
+" statusline
+function! StatusModeColor()
+ if (mode() =~# '\v(n|no)')
+ hi StatusLine cterm=None gui=None ctermfg=black ctermbg=Yellow
+ elseif (mode() =~# '\v(v|V)')
+ hi StatusLine cterm=None gui=None ctermfg=black ctermbg=Red
+ elseif (mode() ==# 'i')
+ hi StatusLine cterm=None gui=None ctermfg=black ctermbg=LightBlue
+ elseif (mode() ==# 'c')
+ hi StatusLine cterm=None gui=None ctermfg=black ctermbg=Green
+ else
+ hi StatusLine cterm=None gui=None ctermfg=black ctermbg=DarkGrey
+ endif
+
+ return ''
+endfunction
+
+function! StatusModifiedColor()
+ if getbufinfo(1)[0].changed
+ hi User1 cterm=None gui=None ctermfg=Black ctermbg=LightGrey
+ else
+ hi User1 cterm=None gui=None ctermfg=White ctermbg=Black
+ endif
+
+ return ''
+endfunction
+
+call StatusModeColor()
+
+" set showtabline=2
+
+set laststatus=2
+set statusline=
+set statusline+=%{StatusModeColor()}
+set statusline+=%{StatusModifiedColor()}
+set statusline+=\ vim\ \[%{mode()}\]
+set statusline+=\ %1*\ %F\ %m
+set statusline+=%=
+set statusline+=%0*
+set statusline+=\ %ff
+set statusline+=\ %r\[%{v:register}\]
+set statusline+=\ %l/%L:%c
+set statusline+=\
+
" Netrw
" let g:netrw_liststyle = 3
" let g:netrw_banner = 0
Plug 'lervag/vimtex'
Plug 'jiangmiao/auto-pairs'
Plug 'PietroPate/vim-tex-conceal'
-Plug 'vim-airline/vim-airline'
+" Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-commentary'
Plug 'ptzz/lf.vim'
Plug 'voldikss/vim-floaterm'
\}
" VimAirline
-let g:airline#extensions#tabline#enabled = 1
-let g:airline#extensions#tabline#buffer_min_count = 2
-let g:airline_powerline_fonts=1
+" let g:airline#extensions#tabline#enabled = 1
+" let g:airline#extensions#tabline#buffer_min_count = 2
+" let g:airline_powerline_fonts=1
" Ctrlp
let g:ctrlp_cmd='CtrlPTag'
--- /dev/null
+#!/bin/sh
+
+# $1 -> mode (a, d)
+# $2 -> busnum
+# $3 -> devnum
+
+user="pinosaur"
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u $user)/bus"
+
+case $1 in
+ a)
+ devpath="/dev/bus/usb/$(printf %03d $2)/$(printf %03d $3)"
+ manname="$(lsusb -D $devpath | grep 'iManufacturer' | sed 's/\s*iManufacturer\s*[0-9]\s*//')"
+ devname="$(lsusb -D $devpath | grep 'iProduct' | sed 's/\s*iProduct\s*[0-9]\s*//')"
+ su pinosaur -c "notify-send 'USB inserted: $manname $devname'"
+ ;;
+ r) su pinosaur -c "notify-send 'USB ejected'";;
+ *) exit 1;;
+esac
+
+