mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-04-24 06:19:10 +00:00
Update compton, GTK3, rofi, vim, and UltiSnips snippets (from Vim)
This commit is contained in:
parent
2ad34ddf90
commit
3cd8cefb0a
@ -110,7 +110,7 @@ frame-opacity = 1;
|
|||||||
inactive-opacity-override = false;
|
inactive-opacity-override = false;
|
||||||
|
|
||||||
# Dim inactive windows. (0.0 - 1.0)
|
# Dim inactive windows. (0.0 - 1.0)
|
||||||
inactive-dim = 0.3;
|
inactive-dim = 0.5;
|
||||||
|
|
||||||
# Do not let dimness adjust based on window opacity.
|
# Do not let dimness adjust based on window opacity.
|
||||||
# inactive-dim-fixed = true;
|
# inactive-dim-fixed = true;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
gtk-theme-name=Arc-Darker
|
gtk-theme-name=Arc-Darker
|
||||||
gtk-icon-theme-name=Arc
|
gtk-icon-theme-name=Arc
|
||||||
gtk-font-name=Noto Sans 11
|
gtk-font-name=Fira Code weight=453 11
|
||||||
gtk-cursor-theme-name=Adwaita
|
gtk-cursor-theme-name=Adwaita
|
||||||
gtk-cursor-theme-size=0
|
gtk-cursor-theme-size=0
|
||||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||||
|
@ -13,7 +13,7 @@ window {
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 35%;
|
width: 40%;
|
||||||
position: northwest;
|
position: northwest;
|
||||||
location: northwest;
|
location: northwest;
|
||||||
text-color: @foreground;
|
text-color: @foreground;
|
||||||
|
@ -169,6 +169,10 @@ snippet eqref "Quick equation reference command" wi
|
|||||||
Equation \ref{eq:$1} $0
|
Equation \ref{eq:$1} $0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet theoref "Quick theorem reference command" wi
|
||||||
|
Theorem \ref{th:$1} $0
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet figref "Quick figure reference command" wi
|
snippet figref "Quick figure reference command" wi
|
||||||
figure \ref{fig:$1} $0
|
figure \ref{fig:$1} $0
|
||||||
endsnippet
|
endsnippet
|
||||||
@ -189,6 +193,14 @@ snippet subsecref "Quick subsection reference command" wi
|
|||||||
subsection \ref{subsec:$1} $0
|
subsection \ref{subsec:$1} $0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet propref "Quick property reference command" wi
|
||||||
|
Property \ref{prop:$1} $0
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet defref "Quick definition reference command" wi
|
||||||
|
Definition \ref{def:$1} $0
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet foot "Footnote" w
|
snippet foot "Footnote" w
|
||||||
\footnote{${1:<text>}} $0
|
\footnote{${1:<text>}} $0
|
||||||
endsnippet
|
endsnippet
|
||||||
@ -201,7 +213,7 @@ $2
|
|||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet ml "Math mode (inline)" i
|
snippet mi "Math mode (inline)" i
|
||||||
$${1}$`!p smart_space(t[2])`$2
|
$${1}$`!p smart_space(t[2])`$2
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
@ -865,6 +877,26 @@ snippet al "Reference links with label" iw
|
|||||||
\autoref{${1:<label>}}$0
|
\autoref{${1:<label>}}$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet code "Code listings with Minted package" iw
|
||||||
|
\begin{minted}
|
||||||
|
$3
|
||||||
|
\end{minted}
|
||||||
|
$0
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
# This specifically needs the captions and minted with [newfloat] option
|
||||||
|
# Please see the below link for references:
|
||||||
|
# https://tex.stackexchange.com/a/254177
|
||||||
|
snippet lcode "Code listings with label" iw
|
||||||
|
\begin{listing}[H]
|
||||||
|
\begin{minted}{${1:<language>}}
|
||||||
|
$2
|
||||||
|
\end{minted}
|
||||||
|
`!p snip.rv=smart_space(t[3], "\caption{", loose=True)`$3`!p snip.rv=smart_space(t[3], "}", loose=True)`
|
||||||
|
\label{lst:${4:$3}}
|
||||||
|
\end{listing}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
# Greek letters
|
# Greek letters
|
||||||
context "math()"
|
context "math()"
|
||||||
snippet GAA "Uppercase Greek letter alpha" w
|
snippet GAA "Uppercase Greek letter alpha" w
|
||||||
@ -1001,7 +1033,12 @@ snippet GOo "Lowercase Greek letter omega" w
|
|||||||
\omega
|
\omega
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
# Custom commands and environment (for my class notes) w
|
# Custom commands and environment (for my class notes)
|
||||||
|
# Do not use this if you don't have the following packages and
|
||||||
|
# does not have my custom document style file:
|
||||||
|
# * tcolorbox
|
||||||
|
# * xcolor
|
||||||
|
# * fontawesome
|
||||||
snippet dnote "Doc note admonition block" iw
|
snippet dnote "Doc note admonition block" iw
|
||||||
\begin{-doc-note}
|
\begin{-doc-note}
|
||||||
$1
|
$1
|
||||||
@ -1017,19 +1054,28 @@ $0
|
|||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet dtheo "Doc theorem block" iw
|
snippet dtheo "Doc theorem block" iw
|
||||||
\begin{-doc-theorem}
|
\begin{-doc-theorem}{${1:<Theorem title>}}{${2:<marker>}}
|
||||||
$1
|
$3
|
||||||
\end{-doc-theorem}
|
\end{-doc-theorem}
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet ddef "Doc definition block" iw
|
snippet ddef "Doc definition block" iw
|
||||||
\begin{-doc-definition}
|
\begin{-doc-definition}
|
||||||
$1
|
`!p snip.rv=smart_space(t[1], "\label{def:", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
|
||||||
|
$2
|
||||||
\end{-doc-definition}
|
\end{-doc-definition}
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet dprop "Doc property block" iw
|
||||||
|
\begin{-doc-property}
|
||||||
|
`!p snip.rv=smart_space(t[1], "\label{prop:", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
|
||||||
|
$2
|
||||||
|
\end{-doc-property}
|
||||||
|
$0
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet dwarn "Doc warning callout block" iw
|
snippet dwarn "Doc warning callout block" iw
|
||||||
\begin{-doc-warning}
|
\begin{-doc-warning}
|
||||||
$1
|
$1
|
||||||
@ -1044,3 +1090,9 @@ $1
|
|||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet dlist "Doc listings callout block" iw
|
||||||
|
\begin{-doc-listing}{${1:<title>}}{${2:<label name>}}{${3:<language>}}
|
||||||
|
$4
|
||||||
|
\end{-doc-listing}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
10
vim/.vimrc
10
vim/.vimrc
@ -36,7 +36,6 @@ let g:vimtex_compiler_latexmk = {
|
|||||||
\ '-file-line-error',
|
\ '-file-line-error',
|
||||||
\ ]
|
\ ]
|
||||||
\}
|
\}
|
||||||
|
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
@ -54,12 +53,15 @@ set cursorline
|
|||||||
" set tab to enter spaces, instead
|
" set tab to enter spaces, instead
|
||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
|
" The template list is simply an array composed of vector that represents the
|
||||||
|
" prefix and the suffix of the template file name
|
||||||
let template_list = [
|
let template_list = [
|
||||||
\ ["_minted-", ""],
|
\ ["_minted-", ""],
|
||||||
\ ["", ".synctex"],
|
\ ["", ".synctex"],
|
||||||
\]
|
\]
|
||||||
|
|
||||||
function VimtexAdditionalCleanup(template_list)
|
function VimtexAdditionalCleanup(template_list)
|
||||||
|
call vimtex#compiler#clean(1)
|
||||||
let file_name = expand("%:t:r")
|
let file_name = expand("%:t:r")
|
||||||
let file_path = expand("%:p:h") . "/"
|
let file_path = expand("%:p:h") . "/"
|
||||||
for template in a:template_list
|
for template in a:template_list
|
||||||
@ -74,6 +76,8 @@ endfunction
|
|||||||
augroup vimtex_events
|
augroup vimtex_events
|
||||||
au!
|
au!
|
||||||
" auto-clean
|
" auto-clean
|
||||||
|
au User QuitPre call VimtexAdditionalCleanup(template_list)
|
||||||
|
au User VimLeave call VimtexAdditionalCleanup(template_list)
|
||||||
au User VimtexEventQuit call vimtex#compiler#clean(1)
|
au User VimtexEventQuit call vimtex#compiler#clean(1)
|
||||||
au User VimtexEventQuit call VimtexAdditionalCleanup(template_list)
|
au User VimtexEventQuit call VimtexAdditionalCleanup(template_list)
|
||||||
|
|
||||||
@ -90,9 +94,9 @@ set list listchars=tab:→\ ,trail:·
|
|||||||
" show leading spaces
|
" show leading spaces
|
||||||
" SOURCE: https://www.reddit.com/r/vim/comments/5fxsfy/show_leading_spaces/
|
" SOURCE: https://www.reddit.com/r/vim/comments/5fxsfy/show_leading_spaces/
|
||||||
hi Conceal guibg=NONE ctermbg=NONE ctermfg=DarkGrey
|
hi Conceal guibg=NONE ctermbg=NONE ctermfg=DarkGrey
|
||||||
autocmd BufWinEnter * setl conceallevel=2 concealcursor=nv
|
autocmd BufWinEnter * setl conceallevel=1
|
||||||
autocmd BufWinEnter * syn match LeadingSpace /\(^ *\)\@<= / containedin=ALL conceal cchar=·
|
autocmd BufWinEnter * syn match LeadingSpace /\(^ *\)\@<= / containedin=ALL conceal cchar=·
|
||||||
autocmd BufReadPre * setl conceallevel=2 concealcursor=nv
|
autocmd BufReadPre * setl conceallevel=1
|
||||||
autocmd BufReadPre * syn match LeadingSpace /\(^ *\)\@<= / containedin=ALL conceal cchar=·
|
autocmd BufReadPre * syn match LeadingSpace /\(^ *\)\@<= / containedin=ALL conceal cchar=·
|
||||||
|
|
||||||
" spell checker (for your local language, anyway)
|
" spell checker (for your local language, anyway)
|
||||||
|
Loading…
Reference in New Issue
Block a user