Browse Source

update various dotfiles after a long time

Noah Vogt 2 năm trước cách đây
mục cha
commit
d78764ce16

+ 2 - 1
dot-config/aliasrc

@@ -30,6 +30,7 @@ alias si='devour sxiv'
 alias lo='devour libreoffice'
 alias mu='devour mupdf'
 alias llp='devour llpp'
+alias d='devour'
 alias nb='newsboat'
 alias mutt='neomutt'
 
@@ -91,7 +92,7 @@ alias nst="st > /dev/null 2> /dev/null &disown"
 
 # sane ytdl shortcuts
 alias yt="youtube-dl --add-metadata -i"
-alias yta="yt -x -f bestaudio/best"
+alias yta="yt -x -f 140/bestaudio/best"
 
 # imagemagick shortcuts
 alias dpi="identify -format '%x\n' -units PixelsPerInch"

+ 7 - 2
dot-config/exportrc

@@ -13,6 +13,9 @@ export XDG_CACHE_HOME="$HOME/.cache"
 # default git ssh key location
 export GIT_SSH_KEY="$XDG_CONFIG_HOME/ssh/id_rsa"
 
+# wine stuff
+export WINEPREFIX="$XDG_DATA_HOME/wineprefix"
+
 # ~/ cleanup
 export VIMINIT="set nocp | source $XDG_CONFIG_HOME/nvim/init.vim"
 export LESSHISTFILE='-'
@@ -34,11 +37,13 @@ export CONAN_USER_HOME="$XDG_CONFIG_HOME"
 export TEXMFHOME="$XDG_DATA_HOME/texmf"
 export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var"
 export TEXMFCONFIG="$XDG_CONFIG_HOME/texlive/texmf-config"
+export MBSYNCRC="$XDG_CONFIG_HOME/mbsync/mbsyncrc"
+export BOTO_CONFIG="$XDG_CONFIG_HOME/gsutil/config"
 
-# quick acces to my latex templates 
+# quick acces to my latex templates
 export PATH=$PATH:~/.config/setup/templates/latex
 
-# quick acces to my xournalpp templates 
+# quick acces to my xournalpp templates
 export PATH=$PATH:~/.config/setup/templates/xournalpp
 
 # fix android studio for dwm

+ 2 - 0
dot-config/lf/lfrc

@@ -126,6 +126,8 @@ map <c-e> down
 map <c-y> up
 map V push :!nvim<space>
 
+map t $tesseract -l deu $f - | xclip -selection clipboard
+
 map W $setsid -f $TERMINAL >/dev/null 2>&1
 
 map Y $printf "%s" "$fx" | xclip -selection clipboard

+ 3 - 3
dot-config/nvim/keys/bindings.vim

@@ -24,14 +24,14 @@ command S silent !vshow '%:p'
 command C !compile "%"
 
 " general compile button
-map <F3> :w<CR>:!compile "%"; pkill -HUP mupdf<CR>
+map <F3> :w<CR>:!compile "%" && pkill -HUP mupdf<CR>
 
 " bibtex extra compiler
-map <F2> :w<CR>:!latexmk -pdf "%"; pkill -HUP mupdf<CR>
+map <F2> :w<CR>:!latexmk -pdf "%" && pkill -HUP mupdf<CR>
 
 map <F4> :noh<CR>
 map <F5> :set spell!<CR>
-map <F6> :w<CR>:!glosscompile "%"; pkill -HUP mupdf<CR>
+map <F6> :w<CR>:!glosscompile "%" && pkill -HUP mupdf<CR>
 
 " jumper
 vnoremap <Space><Space> <Esc>/<++><Enter>"_c4l

+ 5 - 0
dot-config/nvim/keys/tex-macros.vim

@@ -11,6 +11,7 @@ autocmd FileType tex inoremap ;ger \usepackage[ngerman]{babel}<Esc>
 " text formatting macros
 autocmd FileType tex inoremap ;bf \textbf{}<++><Esc>T{i
 autocmd FileType tex inoremap ;it \textit{}<++><Esc>T{i
+autocmd FileType tex inoremap ;tt \texttt{}<++><Esc>T{i
 
 " beamer macros
 autocmd FileType tex inoremap ;fr \begin{frame}<CR>\frametitle{}<CR><++><CR>\end{frame}<Esc>kklli
@@ -22,5 +23,9 @@ autocmd FileType tex inoremap ;sw \switchcolumn[]<++><Esc>4hi
 autocmd FileType tex inoremap ;up \usepackage{}<Esc>i
 autocmd FileType tex inoremap ;hy \hyphenation{}<Esc>i
 
+autocmd FileType tex inoremap ;s1 \section{}<Esc>i
+autocmd FileType tex inoremap ;s2 \subsection{}<Esc>i
+autocmd FileType tex inoremap ;s3 \subsubsection{}<Esc>i
+
 " apacite style
 autocmd FileType tex inoremap ;ap \bibliographystyle{apacite}<CR>\bibliography{}<Esc>i

+ 1 - 1
dot-config/nvim/vim-plug/plugins.vim

@@ -51,7 +51,7 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'}
 Plug 'romainl/vim-cool'
 
 " graphical debugger
-Plug 'puremourning/vimspector'
+"Plug 'puremourning/vimspector'
 
 " use when there are too many parentheses
 "Plug 'kien/rainbow_parentheses.vim'

+ 1 - 1
local-bin/compile

@@ -16,7 +16,7 @@ choosepandoc() {
 }
 
 textype() { \
-	command="pdflatex"
+	command="pdflatex --shell-escape"
 	( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex"
 	( head -n5 "$file" | grep -qi 'lualatex' ) && command="lualatex"
 	$command --output-directory="$dir" "$base" &&

+ 10 - 6
local-bin/get-volume

@@ -2,11 +2,15 @@
 
 # script to display the current volume and mute state in dwmblocks
 
-volume=$(amixer sget Master | grep 'Front Left:' | awk -F '[\\]\\[]' '{print $2}')
-if [ -z "$(amixer sget Master | grep "off" )" ];
-then
-    muteicon="🔊"
+percent="$(amixer sget Master | grep 'Front Left:' | \
+    awk -F '[\\]\\[]' '{print $2}' | sed 's/\%$//')"
+if amixer sget Master | grep -q "off"; then
+    volume_icon="婢"
+elif [ "$percent" -gt 69 ]; then
+    volume_icon="墳"
+elif [ "$percent" -gt 29 ]; then
+    volume_icon="奔"
 else
-    muteicon="🔇"
+    volume_icon="奄"
 fi
-printf "%s %s\\n" "$muteicon" "$volume"
+printf "%s %s\\n" "$volume_icon" "$percent"

+ 1 - 1
local-bin/gid

@@ -3,5 +3,5 @@
  git -c color.diff.new='bold reverse green' \
     -c color.diff.old='bold reverse red' diff --no-index -U0 --no-color \
     --word-diff=color --word-diff-regex=. \
-    $HOME/.cache/bv/guessed-verse $HOME/.cache/bv/stripped-verse | tail -n +3 |
+    $1 $2 | tail -n +3 |
     grep -v '\-\-\-\|+++'

+ 0 - 4
local-bin/mkchrome-bin

@@ -53,10 +53,6 @@ for file in out/Release/locales/*.pak; do
     mkcp "$file" "$srcdest"
 done
 
-for file in out/Release/swiftshader/*.so; do
-    mkcp "$file" "$srcdest"
-done
-
 for size in 24 48 64 128 256; do
     mkcp "chrome/app/theme/chromium/product_logo_$size.png" "$srcdest"
 done