Browse Source

Worked on neovim config, git config, and added a websync control script

balena
Micah Halter 6 months ago
parent
commit
3fb12a15da
Signed by: mehalter GPG Key ID: 4224A6EA9A8CAAA8
10 changed files with 421 additions and 11 deletions
  1. +286
    -0
      documents/.local/share/texmf/tex/latex/jdf.cls
  2. +55
    -0
      documents/Documents/markdown/jdf-template.pandoc
  3. +2
    -0
      git/.config/git/config
  4. +2
    -0
      git/.config/git/gitignore_global
  5. +1
    -1
      i3/.config/i3/config
  6. +1
    -7
      neovim/.config/nvim/coc-settings.json
  7. +1
    -1
      neovim/.config/nvim/init.vim
  8. +68
    -0
      scripts/.local/bin/bemenusync
  9. +2
    -0
      zsh/.config/zsh/.zshrc
  10. +3
    -2
      zsh/.config/zsh/aliases

+ 286
- 0
documents/.local/share/texmf/tex/latex/jdf.cls View File

@ -0,0 +1,286 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{jdf}[2020/02/05 v2.2.0 Joyner Document Format]
\newcommand{\papersize}{letterpaper} % Default value
\DeclareOption{a4paper}{\renewcommand{\papersize}{a4paper}}
\DeclareOption{letterpaper}{\renewcommand{\papersize}{letterpaper}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} % Pass through any options to the base class
\ProcessOptions\relax % Process given options
\LoadClass{article}
\RequirePackage{etoolbox} % Required for conditional logic
%%
% Page layout
\ifstrequal{\papersize}{a4paper}{ % A4 paper page geometry settings
% The text block is approximately 141.3x228.3mm, which is a ratio of 1:phi (and the ratio of the top margin to the bottom margin is also 1:phi)
\RequirePackage[
a4paper,
top=26.25mm,
bottom=42.472mm,
left=34.361mm,
right=34.361mm,
footskip=16.222mm, % Space from the bottom margin to the baseline of the footer
%showframe, % Uncomment to show how the type block is set on the page
]{geometry}
}{ % Default (letterpaper) page geometry settings
% The text block is 5.5x8.5in, which is exactly 1/2 the page size, divided lengthwise
\RequirePackage[
\papersize,
top=1in,
bottom=1.5in,
left=1.5in,
right=1.5in,
footskip=0.5in, % Space from the bottom margin to the baseline of the footer
%showframe, % Uncomment to show how the type block is set on the page
]{geometry}
}
\RequirePackage{hyperref} % Required for including links
\RequirePackage{changepage}
%%
% Font stuff
% Encoding
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage[english]{babel}
% Set fonts
\RequirePackage[osf]{mathpazo} % Palatino with oldstyle figures
\newcommand\liningnums[1]{\fontfamily{ppl}\selectfont#1} % Enable switch to lining nums
\RequirePackage{amsmath, amssymb}
\RequirePackage{eulervm}
\RequirePackage[scaled=.8819]{sourcecodepro} % Source Code Pro typeface for monospace
\RequirePackage{csquotes}
%\defaultfontfeatures{Ligatures=TeX} % To support LaTeX ligatures (`` and --)
% Letterspacing
\RequirePackage[
activate={true,nocompatibility},
final,
tracking=true,
kerning=true,
spacing=true,
factor=1100,
stretch=10,
shrink=10
]{microtype}
\SetTracking{encoding=*}{10}
\lsstyle
\newcommand\lsstylehelp[1]{\edef\MT@letterspace@{#1}\lsstyle} % Enable change to letterspacing
\newcommand{\hairsp}{\ifmmode\mskip1mu\else\kern0.083em\fi}
\renewcommand{\,}{\ifmmode\mskip1mu\else\kern0.167em\fi}
% Font sizes
\renewcommand\normalsize{%
\@setfontsize\normalsize{11}{17}%
}
\renewcommand\large{%
\@setfontsize\large{17}{22}
}
\renewcommand\small{%
\@setfontsize\small{8.5}{14}%
}
\renewcommand\footnotesize{%
\@setfontsize\small{8.5}{14}%
}
% Paragraph indentation
\setlength{\parindent}{0pt}
\setlength{\parskip}{8.5pt}
%%
% Title
\RequirePackage{titlesec}
\newcommand{\email}[1]{%
\def \@email {#1}
}
\renewcommand{\maketitle}{\bgroup
\begin{center}
{\large\selectfont\liningnums\lsstylehelp{0} \@title\par}
{\normalfont \@author}\\
{\normalfont \@email}
\vspace{-11pt}
\end{center}
\hypersetup{
pdftitle=\@title,
pdfauthor=\@author
}
}
%%
% Abstract
\renewenvironment{abstract}{%
\begin{center}
\begin{adjustwidth}{0.5in}{0.5in}
\normalfont%
\textbf{\textit{Abstract\hairsp—\hairsp}}\ignorespaces
}
{%
\end{adjustwidth}
\vspace{-11pt}
\end{center}
}
%%
% Headings
% Heading 1
\titleformat{\section} % Section type being modified
{\normalfont\liningnums\lsstylehelp{60}\bfseries}
{\thesection}{0.333em} % Space between the title and label
{\MakeUppercase}
\titlespacing*{\section}{0pt}{2.5pt}{0pt}
% Heading 2
\titleformat{\subsection}
{\normalfont\bfseries}
{\thesubsection}{0.4em}{}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
% Heading 3
\titleformat{\subsubsection}
{\normalfont\bfseries\itshape}
{\textup{\thesubsubsection}}{0.4em}{}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}
% Heading 4
\newcommand{\subsubsubsection}[1]{
\textbf{\textit{#1}}\hairsp—\hairsp\ignorespaces
}
\renewcommand{\paragraph}[1]{
\textbf{\textit{#1}}\hairsp—\hairsp\ignorespaces
}
%%
% Captions
\RequirePackage{caption} % Required for customising captions
\DeclareCaptionFormat{letterspaced}{%
\lsstylehelp{20}{%
#1#2#3\par%
}{}%
}
\captionsetup{format=letterspaced} % Use the letter spaced caption style by default
\captionsetup{margin=1in} % Margin on the left and right sides of captions
\captionsetup{justification=justified, singlelinecheck=false} % Left-align and justify captions
\captionsetup{font=small} % Reduce font size
\captionsetup{labelfont={bf,it}} % BoldItalic label and number
\DeclareCaptionLabelSeparator{emdash}{\hairsp—\hairsp} % Custom caption label separator
\captionsetup{labelsep=emdash} % Change the default colon between number and label to use the custom separator
%%
% Lists
\RequirePackage{enumitem} % Required for list customisation
\setlist{leftmargin=*, noitemsep, nolistsep} % No left margin and space around/within lists
\setlist[itemize]{label={\tiny\textsuperscript{\textbullet}}}
%%
% Image stuff
\RequirePackage{graphicx} % Required for including images
\graphicspath{{Figures/}{./}} % Specifies where to look for included images
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\def\fps@figure{htbp}
%%
% Tables
% Set default table placement to htbp
\def\fps@table{htbp}
\def\fps@longtable{htbp}
\RequirePackage{booktabs} % Required for better horizontal rules in tables
\RequirePackage{array} % Required for manipulating table columns
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} % Define a new right-aligned column type
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} % Define a new left-aligned (no justification) column type
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % Define a new centred column type
\setlength\lightrulewidth{0.03em}
%%
% Footnotes
\RequirePackage[bottom]{footmisc} % Make footnotes flush w/ the bottom of the page
\setlength{\skip\footins}{17pt}
\setlength{\footnotesep}{8.5pt}
\RequirePackage{footnotebackref} % Add backreferencing
\long\def\@makefntext#1{
\lsstylehelp{20}{
{\footnotesize\@thefnmark~#1} % Footnote text position and width
}
}
%%
% References
\RequirePackage[
bibstyle=authoryear,
dashed=false,
sorting=nyt,
natbib=true,
maxbibnames=99
]{biblatex}
\DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield{labelnumber}}
}%
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\DeclareNameAlias{sortname}{family-given}
% Inline citations
\renewcommand{\cite}[1]{\citeauthor{#1}, \citeyear{#1}}
\renewcommand{\citep}[1]{(\citeauthor{#1}, \citeyear{#1})}
%%
% Metadata
\RequirePackage{xcolor} % Required for defining custom colours
\definecolor{linkBlue}{cmyk}{100,50,0,0}
\hypersetup{
% bookmarks=true,
% bookmarksopen=true,
pdfpagemode=UseOutlines,
colorlinks,
citecolor=linkBlue,
urlcolor=linkBlue,
linkcolor=linkBlue
}

+ 55
- 0
documents/Documents/markdown/jdf-template.pandoc View File

@ -0,0 +1,55 @@
\documentclass{jdf}
\usepackage{longtable}
$if(highlighting-macros)$
$highlighting-macros$
$endif$
$for(bibliography)$
\addbibresource{$bibliography$}
$endfor$
\title{$title$}
\author{$author$}
\email{$email$}
\begin{document}
\def\tightlist{}
\maketitle
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
$body$
$if(natbib)$
$if(biblio-files)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{Bibliography}
$else$
\renewcommand\refname{References}
$endif$
$endif$
\bibliography{$biblio-files$}
$endif$
$endif$
$if(biblatex)$
\printbibliography$if(biblio-title)$[title=References]$endif$
$endif$
$for(include-after)$
$include-after$
$endfor$
\end{document}

+ 2
- 0
git/.config/git/config View File

@ -8,3 +8,5 @@
signcommits = true
[pull]
rebase = false
[core]
excludesfile = /home/micah/.config/git/gitignore_global

+ 2
- 0
git/.config/git/gitignore_global View File

@ -0,0 +1,2 @@
env
my_sandbox

+ 1
- 1
i3/.config/i3/config View File

@ -432,7 +432,7 @@ bindsym $mod+F5 exec --no-startup-id bash -c "i3-powersaver && dunstbar -
#bindsym $mod+F6
#bindsym $mod+Shift+F6
#bindsym $mod+F7
bindsym $mod+F7 exec --no-startup-id bemenusync
#bindsym $mod+Shift+F7
#bindsym $mod+F8


+ 1
- 7
neovim/.config/nvim/coc-settings.json View File

@ -19,13 +19,7 @@
"hlintOn": true
}
}
},
"julia": {
"command": "julia",
"args" : ["--startup-file=no", "--history-file=no", "-e",
"using LanguageServer;\n using Pkg;\n import StaticLint;\n import SymbolServer;\n env_path = dirname(Pkg.Types.Context().env.project_file);\n debug = false;\n server = LanguageServer.LanguageServerInstance(stdin, stdout, debug, env_path, \"\");\n server.runlinter = true;\n run(server);" ],
"filetypes": ["julia"]
}
}
},
"python.formatting.provider": "black"
}

+ 1
- 1
neovim/.config/nvim/init.vim View File

@ -198,7 +198,7 @@ let g:lightline = {
\ ['cocstatus', 'fugitive', 'readonly', 'filename', 'modified'] ],
\ 'right': [ [ 'lineinfo' ], ['percent'] ]
\ },
\ 'componen_function': {
\ 'component_function': {
\ 'cocstatus': 'coc#status'
\ },
\ 'component': {


+ 68
- 0
scripts/.local/bin/bemenusync View File

@ -0,0 +1,68 @@
#!/bin/sh
mail=$(systemctl --user --quiet is-active mbsync.timer && echo "Disable Mail" || echo "Enable Mail")
cal=$(systemctl --user --quiet is-active vdirsyncer-oneshot.timer && echo "Disable Calendar" || echo "Enable Calendar")
selected=$(echo "Sync All
Sync Mail
Sync Calendar
Sync Outbox
${mail}
${cal}
Enable All
Disable All" | bemenucolor -ip "Web Sync")
case $selected in
"Sync All")
notify-send "Sync started"
systemctl --user start mbsync.service
systemctl --user start msmtpq.service
systemctl --user start vdirsyncer-oneshot.service
notify-send "Sync finished"
;;
"Sync Mail")
notify-send "Mail sync started"
systemctl --user start mbsync.service
systemctl --user start msmtpq.service
notify-send "Mail sync finished"
;;
"Sync Calendar")
notify-send "Calendar sync started"
systemctl --user start vdirsyncer-oneshot.service
notify-send "Calendar sync finished"
;;
"Sync Outbox")
notify-send "Outbox sync started"
systemctl --user start msmtpq.service
notify-send "Outbox sync finished"
;;
"Enable Mail")
systemctl --user start mbsync.timer
systemctl --user start msmtpq.timer
notify-send "Mail sync enabled"
;;
"Disable Mail")
systemctl --user stop mbsync.timer
systemctl --user stop msmtpq.timer
notify-send "Mail sync disabled"
;;
"Enable Calendar")
systemctl --user start vdirsyncer-oneshot.timer
notify-send "Calendar sync enabled"
;;
"Disable Calendar")
systemctl --user stop vdirsyncer-oneshot.timer
notify-send "Calendar sync disabled"
;;
"Enable All")
systemctl --user start mbsync.timer
systemctl --user start msmtpq.timer
systemctl --user start vdirsyncer-oneshot.timer
notify-send "Web sync enabled"
;;
"Disable All")
systemctl --user stop mbsync.timer
systemctl --user stop msmtpq.timer
systemctl --user stop vdirsyncer-oneshot.timer
notify-send "Web sync disabled"
;;
esac

+ 2
- 0
zsh/.config/zsh/.zshrc View File

@ -33,6 +33,8 @@ setopt HIST_VERIFY
setopt INTERACTIVECOMMENTS
setopt CORRECT
setopt autocd
# completions
fpath=($HOME/.local/bin/zsh-completions $fpath)
autoload -U compinit


+ 3
- 2
zsh/.config/zsh/aliases View File

@ -6,7 +6,7 @@ alias -s cpp=nvim
alias -s java=nvim
alias -s md=nvim
alias -s tex=nvim
alias -s log="less -MN"
alias -s log="less -MNR"
# aliases for configs
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
@ -87,6 +87,7 @@ vactivate() {
[ -z "$1" ] && venv_dir="env"
. $venv_dir/bin/activate
}
alias pysetup='python -m pip install --upgrade pip && python -m pip install jupyter pynvim black pylint'
kernnew() {
basename $VIRTUAL_ENV 2>/dev/null >/dev/null && python -m ipykernel install --user --name=$(basename $VIRTUAL_ENV)
}
@ -124,7 +125,7 @@ jlenv() {
[ -z "$1" ] && venv_dir="env"
julia -e "using VirtualEnv; venv(\"$venv_dir\"; $2)"
}
alias jlsetup='julia -e "using Pkg; Pkg.add(\"Juno\"); Pkg.add(\"Atom\"); Pkg.add(\"IJulia\"); Pkg.add(\"LanguageServer\"); Pkg.add(\"SymbolServer\"); Pkg.add(\"StaticLint\"); Pkg.precompile()"'
alias jlsetup='julia -e "using Pkg; Pkg.add(\"Juno\"); Pkg.add(\"Atom\"); Pkg.add(\"IJulia\"); Pkg.add(\"LanguageServer\"); Pkg.add(\"SymbolServer\"); Pkg.add(\"StaticLint\"); Pkg.add(\"Revise\"); Pkg.precompile()"'
# git aliases
alias lg='lazygit'


Loading…
Cancel
Save