From: Daniel Liu Date: Sat, 30 Jan 2021 18:49:07 +0000 (-0500) Subject: update X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=366f6e01929c651e868d008521bf56cc8d1414c2;p=dotfiles.git update --- diff --git a/.bashrc b/.bashrc index 9d41b80..e1d7e6b 100644 --- a/.bashrc +++ b/.bashrc @@ -33,11 +33,12 @@ export WM="dwm" # aliaseseses alias ls='ls --color=auto' +alias git-pushall='git-pushall ' # for alias chaining alias dotfiles='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' alias suckless-clean='make clean && rm -rf config.h && git reset --hard home/master' alias musicdl="youtube-dl -f bestaudio" alias mpv="mpv --no-input-default-bindings" -alias slock='slock -m "$(figlet locked xd | cowsay -f cheese -n)"' +# 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' diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index 7b6faf8..23a9d26 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -150,7 +150,7 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ]; # example: opacity-rule = [ "97:class_g = 'St'", - "97:class_g = 'Zathura'" + "97:class_g = 'Zathura'" ]; diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 44d5eb9..d78b12f 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -27,6 +27,9 @@ super + m super + s st pulsemixer +super + l + st slock -m "$(figlet locked xd | cowsay -f cheese -n)" + super + {Down,Left,Right} mpc {toggle,prev,next} diff --git a/.vim/mysnippets/tex.snippets b/.vim/mysnippets/tex.snippets index 9750a35..f19a2de 100644 --- a/.vim/mysnippets/tex.snippets +++ b/.vim/mysnippets/tex.snippets @@ -54,6 +54,12 @@ snippet prod "Product" w \prod\limits_{$1}^{$2}$3 endsnippet + +snippet defint "Definite Integral" w +\int_{$1}^{$2} $0 +endsnippet + + # MATH MODES priority 10 snippet im "inline math" w @@ -137,6 +143,10 @@ snippet cis "Cis" w \mathrm{cis}($1) endsnippet +snippet span "Span" w +\text{span}($0) +endsnippet + snippet eea "Extended Euclidian Algorithm" w \begin{center} diff --git a/.vim/templates/skeleton.tex b/.vim/templates/skeleton.tex new file mode 100644 index 0000000..2d64863 --- /dev/null +++ b/.vim/templates/skeleton.tex @@ -0,0 +1,22 @@ + +\documentclass[11pt]{article} +\textwidth 15cm +\textheight 24cm +\evensidemargin 6mm +\oddsidemargin 6mm +\topmargin -1.1cm +\setlength{\parskip}{1.5ex} + +\usepackage{amsfonts,amsmath,amssymb,enumerate} + +\begin{document} +\parindent=0pt + +\title{TITLE} +\author{Daniel Liu} +\date{DATE} +\maketitle + + + +\end{document} diff --git a/.vimrc b/.vimrc index 684ca1c..db42bdc 100644 --- a/.vimrc +++ b/.vimrc @@ -15,7 +15,7 @@ set encoding=utf-8 set tabstop=4 set shiftwidth=4 set expandtab -set formatoptions-=cro "disables auto comments +" set formatoptions-=cro "disables auto comments (not working rn) " spell check setlocal spell @@ -44,6 +44,11 @@ hi SpellBad ctermfg=Red ctermbg=Black cterm=underline " let g:netrw_winsize = 25 " let g:netrw_browse_split = 4 +" Templates +augroup templates + autocmd BufNewFile *.tex 0r ~/.vim/templates/skeleton.tex +augroup END + " vim plug " this blob auto installs vim plug if it isnt already if empty(glob('~/.vim/autoload/plug.vim')) @@ -52,6 +57,7 @@ if empty(glob('~/.vim/autoload/plug.vim')) autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif +" template stuff call plug#begin('~/.vim/plugged') Plug 'sirver/ultisnips' @@ -93,3 +99,6 @@ let g:ctrlp_cmd='CtrlPTag' " Lf " let g:lf_replace_netrw = 1 " weird behavior rn + +" Run after plugins +autocmd FileType * set formatoptions-=o diff --git a/Scripts/git-pushall b/Scripts/git-pushall index 9fd1967..0d7def6 100755 --- a/Scripts/git-pushall +++ b/Scripts/git-pushall @@ -1,12 +1,16 @@ #!/bin/sh -# reads the config file and pushes to all the remotes +# you can pass in git parameters to this script too +# e.g +# git-pushall git --git-dir=$HOME/.dotfiles --work-tree=$HOME -config_path="$(git rev-parse --show-toplevel)/.git/config" 2>/dev/null +cmd="$@" +[ -z "$cmd" ] && cmd="git" +config_path="$($cmd config --local -l)" 2>/dev/null [ ! "$?" = 0 ] && echo "Failed: not a git repo." && exit 1 -[ -z "$1" ] && echo "Failed: Please supply a branch to push to." && exit 1 -# look for all remotes -cat "$config_path" | sed '/^\[remote "/!d; s/^\[remote "//; s/"]$//' |\ - xargs -I _ git push _ "$1" +echo "$config_path" | grep '^remote.*.url=' |\ + sed 's/^remote.*.url=//' |\ + xargs printf "$cmd push %s master\n" |\ +