Browse Source

A lot of minor changes

master
Micah Halter 9 months ago
parent
commit
85abf980e9
Signed by: mehalter GPG Key ID: 4224A6EA9A8CAAA8
  1. 3
      documents/Documents/latex/tikzit_styles.tikzstyles
  2. 20
      documents/Documents/markdown/templates/jdf.rmd
  3. 5
      etc/sudoers.d/micahprivs
  4. 1
      etc/sudoers.lecture
  5. 10
      etc/systemd/system/i3lock@.service
  6. 2
      etc/udev/rules.d/yubikey.rules
  7. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Casual/RecMono-Casual-1.52.ttf
  8. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Casual/RecMono-CasualBold-1.52.ttf
  9. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Casual/RecMono-CasualBoldItalic-1.52.ttf
  10. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Casual/RecMono-CasualItalic-1.52.ttf
  11. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Duotone/RecMono-Duotone-1.52.ttf
  12. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Duotone/RecMono-DuotoneBold-1.52.ttf
  13. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Duotone/RecMono-DuotoneBoldItalic-1.52.ttf
  14. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Duotone/RecMono-DuotoneItalic-1.52.ttf
  15. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Linear/RecMono-Linear-1.52.ttf
  16. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Linear/RecMono-LinearBold-1.52.ttf
  17. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Linear/RecMono-LinearBoldItalic-1.52.ttf
  18. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/Linear/RecMono-LinearItalic-1.52.ttf
  19. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/SemiCasual/RecMono-SemiCasual-1.52.ttf
  20. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/SemiCasual/RecMono-SemiCasualBold-1.52.ttf
  21. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/SemiCasual/RecMono-SemiCasualBoldItalic-1.52.ttf
  22. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Code/SemiCasual/RecMono-SemiCasualItalic-1.52.ttf
  23. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Desktop/Recursive_VF_1.52.ttf
  24. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Desktop/recursive-statics.otc
  25. BIN
      fonts/.local/share/fonts/Recursive/Recursive_Desktop/recursive-statics.ttc
  26. 2
      git/.config/git/gitignore_global
  27. 6
      i3/.config/i3/config
  28. 4
      isync/.config/isync/mbsyncrc
  29. 2
      khard/.config/khard/khard.conf
  30. 2
      kitty/.config/kitty/kitty.conf
  31. 4
      msmtp/.config/msmtp/config
  32. 1
      mutt/.config/mutt/mailcap
  33. 11
      mutt/.config/mutt/muttrc
  34. 22
      neovim/.config/nvim/coc-settings.json
  35. 6
      neovim/.config/nvim/init.vim
  36. 1
      newsboat/.config/newsboat/urls
  37. 2
      picom/.config/systemd/user/picom.service
  38. 2
      ranger/.config/ranger/rc.conf
  39. 3
      scripts/.local/bin/authcheck
  40. 88
      scripts/.local/bin/calview.rb
  41. 4
      scripts/.local/bin/compiler
  42. 2
      scripts/.local/bin/getbib
  43. 2
      scripts/.local/bin/gohome
  44. 23
      scripts/.local/bin/i3lock
  45. 32
      scripts/.local/bin/lock
  46. 2
      scripts/.local/bin/opout
  47. 2
      vdirsyncer/.config/vdirsyncer/password.sh
  48. 16
      zsh/.config/zsh/.zshrc
  49. 22
      zsh/.config/zsh/aliases

3
documents/Documents/latex/tikzit_styles.tikzstyles

@ -18,6 +18,9 @@
\tikzstyle{outerbox6x17}=[fill=white, draw=black, shape=rectangle, fill opacity=0, rounded corners, minimum width=17cm, minimum height=6cm]
\tikzstyle{outerbox}=[fill=white, draw=black, shape=rectangle, rounded corners, fill opacity=0, minimum width=14cm, minimum height=5cm]
\tikzstyle{outerbox8x4}=[fill=white, draw=black, shape=rectangle, rounded corners, fill opacity=0, minimum height=8cm, minimum width=8cm]
\tikzstyle{outerfram5x7}=[fill=white, draw=black, shape=rectangle, rounded corners, fill opacity=0, minimum height=4cm, minimum width=11.5cm]
\tikzstyle{trapezium}=[fill=white, draw=black, shape=trapezium, shape border rotate=90, inner ysep=1pt, trapezium angle=75, rounded corners=.85mm, align=center]
\tikzstyle{invtrapezium}=[fill=white, draw=black, shape=trapezium, shape border rotate=270, inner ysep=1pt, trapezium angle=75, rounded corners=.85mm, align=center]
% Edge styles
\tikzstyle{new edge style 0}=[->, draw={rgb,255: red,127; green,129; blue,131}, line width=0.6mm]

20
documents/Documents/markdown/templates/jdf.rmd

@ -0,0 +1,20 @@
---
title: |
| <++>
| <++>
author: '<++>'
email: '<++>'
abstract: |
<++>
bibliography: /home/micah/Documents/latex/bibliography.bib
link-citations: yes
output:
pdf_document:
pandoc_args: ["--filter", "pandoc-crossref"]
template: /home/micah/Documents/markdown/jdf-template.pandoc
fig_caption: true
citation_package: biblatex
keep_tex: true
---
<++>

5
etc/sudoers.d/micahprivs

@ -1,4 +1 @@
Defaults lecture_file="/etc/sudoers.lecture"
Defaults lecture="always"
micah ALL= NOPASSWD:/bin/mount,/bin/umount,/bin/mkdir,/usr/bin/openvpn,/usr/bin/openconnect,/usr/bin/light
micah ALL= NOPASSWD:/bin/mount,/bin/umount,/bin/mkdir,/usr/bin/openvpn,/usr/bin/openconnect,/usr/bin/light,/usr/bin/systemctl start i3lock@micah, /usr/bin/systemctl stop i3lock@micah, /usr/bin/systemctl restart i3lock@micah

1
etc/sudoers.lecture

@ -1 +0,0 @@
Activate Yubikey or provide password to continue...

10
etc/systemd/system/i3lock@.service

@ -0,0 +1,10 @@
[Unit]
Description=i3lock
[Service]
User=%I
Type=forking
Environment=DISPLAY=:0
ExecStart=/home/micah/.local/bin/i3lock
ExecStartPre=/usr/bin/killall -SIGUSR1 dunst
ExecStopPost=/usr/bin/killall -SIGUSR2 dunst

2
etc/udev/rules.d/yubikey.rules

@ -0,0 +1,2 @@
ACTION=="remove", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="1050/407*", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/run/user/1000/Xauthority", RUN+="/usr/bin/systemctl start --no-block i3lock@micah.service"
ACTION=="add", ENV{DEVTYPE}=="usb_device", ENV{ID_BUS}=="usb", ENV{PRODUCT}=="1050/407*", RUN+="/home/micah/.local/bin/authcheck /usr/bin/systemctl stop i3lock@micah.service"

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Casual/RecMono-Casual-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Casual/RecMono-CasualBold-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Casual/RecMono-CasualBoldItalic-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Casual/RecMono-CasualItalic-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Duotone/RecMono-Duotone-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Duotone/RecMono-DuotoneBold-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Duotone/RecMono-DuotoneBoldItalic-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Duotone/RecMono-DuotoneItalic-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Linear/RecMono-Linear-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Linear/RecMono-LinearBold-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Linear/RecMono-LinearBoldItalic-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/Linear/RecMono-LinearItalic-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/SemiCasual/RecMono-SemiCasual-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/SemiCasual/RecMono-SemiCasualBold-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/SemiCasual/RecMono-SemiCasualBoldItalic-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Code/SemiCasual/RecMono-SemiCasualItalic-1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Desktop/Recursive_VF_1.52.ttf

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Desktop/recursive-statics.otc

Binary file not shown.

BIN
fonts/.local/share/fonts/Recursive/Recursive_Desktop/recursive-statics.ttc

Binary file not shown.

2
git/.config/git/gitignore_global

@ -1,2 +1,4 @@
root
env
my_sandbox
.vscode

6
i3/.config/i3/config

@ -184,7 +184,7 @@ bindsym $mod+Shift+e exec --no-startup-id bemenulatex --type
bindsym $mod+Control+e exec --no-startup-id bemenuunicode
bindsym $mod+Shift+Control+e exec --no-startup-id bemenulatex
bindsym $mod+r exec --no-startup-id i3-cliprog files "$FILE"
bindsym $mod+r exec --no-startup-id i3-cliprog files "TERM=xterm $FILE"
bindsym $mod+Shift+r exec --no-startup-id i3-cliprog math "R -q --no-save"
#bindsym $mod+Control+r
#bindsym $mod+Shift+Control+r
@ -465,10 +465,10 @@ bindsym $mod+Scroll_Lock exec --no-startup-id lock
bindsym $mod+Home exec --no-startup-id toggleservice micahvpn
#bindsym $mod+Shift+Home
#
bindsym $mod+Insert exec --no-startup-id bash screencast
#bindsym $mod+Insert
#bindsym $mod+Shift+Insert
bindsym $mod+Delete exec --no-startup-id killall ffmpeg & killall screenkey
bindsym $mod+Delete exec --no-startup-id lock
#bindsym $mod+Shift+Delete
#bindsym $mod+Prior

4
isync/.config/isync/mbsyncrc

@ -1,7 +1,7 @@
IMAPAccount gmail
Host imap.gmail.com
User mhalter3378@gmail.com
PassCmd "gopass offlineimap/gmail"
PassCmd "gopass show offlineimap/gmail"
AuthMechs LOGIN
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
@ -24,7 +24,7 @@ SyncState *
IMAPAccount gatech
Host outlook.office365.com
User mhalter3@gatech.edu
PassCmd "gopass offlineimap/gatech"
PassCmd "gopass show offlineimap/gatech"
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

2
khard/.config/khard/khard.conf

@ -3,7 +3,7 @@
[addressbooks]
[[Contacts]]
path = ~/.local/share/Contacts/mehalter/contacts
path = $XDG_DATA_HOME/Contacts/mehalter/contacts
[general]
debug = no

2
kitty/.config/kitty/kitty.conf

@ -1218,7 +1218,7 @@ map kitty_mod+backspace change_font_size all 0
#: screen contents into the scrollback buffer and clear the screen,
#: instead of just clearing the screen::
map ctrl+l combine : clear_terminal scroll active : send_text normal,application \x0c
# map ctrl+l combine : clear_terminal scroll active : send_text normal,application \x0c
#: You can tell kitty to send arbitrary (UTF-8) encoded text to the

4
msmtp/.config/msmtp/config

@ -11,7 +11,7 @@ logfile ~/.logs/msmtp.log
account gmail
from micah@mehalter.com
user mhalter3378@gmail.com
passwordeval "gopass offlineimap/gmail"
passwordeval "gopass show offlineimap/gmail"
host smtp.gmail.com
port 587
@ -19,6 +19,6 @@ port 587
account gatech
from mehalter@gatech.edu
user mhalter3@gatech.edu
passwordeval "gopass offlineimap/gatech"
passwordeval "gopass show offlineimap/gatech"
host outlook.office365.com
port 587

1
mutt/.config/mutt/mailcap

@ -1,6 +1,7 @@
text/plain; $EDITOR %s ;
text/html; tmpopen %s ; nametemplate=%s.html
text/html; w3m -I %{charset} -T text/html; copiousoutput;
text/calendar; calview.rb '%s'; copiousoutput;
image/*; tmpopen %s ; copiousoutput
video/*; setsid mpv --quiet %s &; copiousoutput
application/pdf; tmpopen %s ;

11
mutt/.config/mutt/muttrc

@ -43,7 +43,8 @@ unset move
unset confirmappend
unset help
auto_view text/html
alternative_order text/plain text/enriched text/html
auto_view text/calendar
alternative_order text/calendar text/plain text/enriched text/html
# Vim Bindings
bind index g noop
@ -89,10 +90,10 @@ source $XDG_CONFIG_HOME/mutt/muttcol
# PGP
set pgp_use_gpg_agent
set pgp_replyencrypt
set pgp_replysign
set pgp_replysignencrypted
set pgp_verify_sig=yes
set crypt_replyencrypt
set crypt_replysign
set crypt_replysignencrypted
set crypt_verify_sig=yes
set pgp_show_unusable = no
set pgp_sign_as="0xBEB8056E542A33EB8A4B081F723F998E98D93D50"

22
neovim/.config/nvim/coc-settings.json

@ -1,25 +1,3 @@
{
"languageserver": {
"haskell": {
"command": "hie-wrapper",
"args": ["--lsp"],
"rootPatterns": [
"*.cabal",
"stack.yaml",
"cabal.project",
"package.yaml"
],
"filetypes": [
"hs",
"lhs",
"haskell"
],
"initializationOptions": {
"languageServerHaskell": {
"hlintOn": true
}
}
}
},
"python.formatting.provider": "black"
}

6
neovim/.config/nvim/init.vim

@ -183,6 +183,7 @@ nnoremap <silent> <leader>z :Goyo<CR>
" vimtex
let g:vimtex_view_method='zathura'
let g:vimtex_compiler_progname='nvr'
let g:tex_flavor='latex'
" table-mode
let g:table_mode_corner='|'
@ -328,6 +329,9 @@ autocmd Filetype python,julia,hy vmap <buffer> <silent> <leader>e :FloatermSend!
map 0 ^
map <leader>pp :setlocal paste!<CR>
"" bibliography generation
map <leader>gb :read !getbib -c<CR>
"" Defining guides
inoremap ,, <esc>/<++><CR>"_c4l
vnoremap <leader><leader> <esc>/<++><CR>"_c4l
@ -351,7 +355,7 @@ inoremap <C-Space> <C-n>
inoremap <S-Tab> <C-V><Tab>
" auto closing tags
inoremap </ </<C-x><C-o><C-n><CR>
" inoremap </ </<C-x><C-o><C-n><CR>
" disable highlight
map <silent> <CR> :set hlsearch!<CR>

1
newsboat/.config/newsboat/urls

@ -10,3 +10,4 @@ http://www.businessinsider.com/rss
https://www.engadget.com/rss.xml
https://kotaku.com/rss
https://www.androidauthority.com/feed/
https://www.algebraicjulia.org/blog/feed.xml

2
picom/.config/systemd/user/picom.service

@ -3,7 +3,7 @@ Description=picom
[Service]
Type=simple
ExecStart=picom
ExecStart=picom --experimental-backend
[Install]
WantedBy=default.target

2
ranger/.config/ranger/rc.conf

@ -13,7 +13,7 @@ set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
set preview_images true
set preview_images_method kitty
set preview_images_method ueberzug
set unicode_ellipsis false
set show_hidden_bookmarks true
set colorscheme default

3
scripts/.local/bin/authcheck

@ -0,0 +1,3 @@
#!/bin/bash
echo "" | pamtester system-auth micah authenticate && $@

88
scripts/.local/bin/calview.rb

@ -0,0 +1,88 @@
#!/usr/bin/env ruby
# This is a simple script that takes vcal attachments and displays them in
# pure text. This is suitable for displaying callendar invitations in mutt.
#
# Add this to your to your .mailcap:
# text/calendar; /<pathto>/calview.rb '%s'; copiousoutput
#
# Created by Geir Isene <g@isene.com> in 2020 and released into Public Domain.
class String
def colorize(color_code) # This is for general terminal output - doesn't work inside mutt
"\e[#{color_code}m#{self}\e[0m"
end
def red
colorize(31)
end
def green
colorize(32)
end
def yellow
colorize(33)
end
def blue
colorize(34)
end
end
vcal = ARGF.read
# Get dates and times
if vcal.match( /^DTSTART;TZID=/ )
sdate = vcal[ /^DTSTART;TZID=.*:(.*)T/, 1 ].sub( /(\d\d\d\d)(\d\d)(\d\d)/, '\1-\2-\3')
edate = vcal[ /^DTEND;TZID=.*:(.*)T/, 1 ].sub( /(\d\d\d\d)(\d\d)(\d\d)/, '\1-\2-\3')
stime = vcal[ /^DTSTART;TZID=.*T(\d\d\d\d)/, 1 ].sub( /(\d\d)(\d\d)/, '\1:\2')
etime = vcal[ /^DTEND;TZID=.*T(\d\d\d\d)/, 1 ].sub( /(\d\d)(\d\d)/, '\1:\2')
elsif vcal.match( /DTSTART;VALUE=DATE:/ )
sdate = vcal[ /^DTSTART;VALUE=DATE:(.*)/, 1 ].sub( /(\d\d\d\d)(\d\d)(\d\d)/, '\1-\2-\3')
edate = vcal[ /^DTEND;VALUE=DATE:(.*)/, 1 ].sub( /(\d\d\d\d)(\d\d)(\d\d)/, '\1-\2-\3')
stime = vcal[ /^DTSTART.*T(\d\d\d\d)/, 1 ].sub( /(\d\d)(\d\d)/, '\1:\2')
begin
etime = vcal[ /^DTEND.*T(\d\d\d\d)/, 1 ].sub( /(\d\d)(\d\d)/, '\1:\2')
rescue
etime = stime
end
else
sdate = vcal[ /^DTSTART:(.*)T/, 1 ].sub( /(\d\d\d\d)(\d\d)(\d\d)/, '\1-\2-\3')
edate = vcal[ /^DTEND:(.*)T/, 1 ].sub( /(\d\d\d\d)(\d\d)(\d\d)/, '\1-\2-\3')
stime = vcal[ /^DTSTART.*T(\d\d\d\d)/, 1 ].sub( /(\d\d)(\d\d)/, '\1:\2')
etime = vcal[ /^DTEND.*T(\d\d\d\d)/, 1 ].sub( /(\d\d)(\d\d)/, '\1:\2')
end
# Get organizer
if vcal.match( /^ORGANIZER;CN=/ )
org = vcal[ /^ORGANIZER;CN=(.*)/, 1 ].sub( /:mailto:/i, ' <') + ">"
else
org = vcal[ /^ORGANIZER:(.*)/, 1 ].sub( /MAILTO:/i, ' <') + ">"
end
# Get description
if vcal.match( /^DESCRIPTION;.*?:(.*)^UID/m )
desc = vcal[ /^DESCRIPTION;.*?:(.*)^UID/m, 1 ].gsub( /\n /, '' ).gsub( /\\n/, "\n" ).gsub( /\n\n+/, "\n" ).gsub( / \| /, "\n" ).sub( /^\n/, '' )
else
begin
desc = vcal[ /^DESCRIPTION:(.*)^SUMMARY/m, 1 ].gsub( /\n /, '' ).gsub( /\\n/, "\n" ).gsub( /\n\n+/, "\n" ).gsub( / \| /, "\n" ).sub( /^\n/, '' )
rescue
desc = ""
end
end
sdate == edate ? dates = sdate : dates = sdate + " - " + edate
stime == etime ? times = stime : times = stime + " - " + etime
# Get participants
part = vcal.scan( /^ATTENDEE.*CN=([\s\S]*?@.*)\n/ ).join('%').gsub( /\n /, '').gsub( /%/, ">\n " ).gsub( /:mailto:/i, " <" )
part = " " + part + ">" if part != ""
# Get summary and description
sum = vcal[ /^SUMMARY;.*:(.*)/, 1 ]
sum = vcal[ /^SUMMARY:(.*)/, 1 ] if sum == nil
# Print the result in a tidy fashion
puts "WHAT: " + (sum).yellow
puts "WHEN: " + (dates + ", " + times).green
puts ""
puts "ORGANIZER: " + org
puts "PARTICIPANTS:", part
puts ""
puts "DESCRIPTION:", desc

4
scripts/.local/bin/compiler

@ -21,13 +21,13 @@ pdfpcCleanup() {
}
case "$file" in
*\.uml|*\.pu) plantuml "$file" ;;
*\.uml|*\.pu|*\.puml) plantuml "$file" ;;
*\.gv|*\.dot) dot -Tpng "$file" -o "$base".png ;;
*\.ms) refer -PS -e "$file" | groff -me -ms -kejpt -T pdf > "$base".pdf ;;
*\.mom) refer -PS -e "$file" | groff -mom -kejpt -T pdf > "$base".pdf ;;
*\.rmd) echo "require(rmarkdown);rmarkdown::render('$file', quiet=TRUE)" | R -q --vanilla && pdfpcCleanup ;;
*\.tex) latexmk -synctex=1 --pdf "$file" && [ -e "$base".pdfpc ] && pdfpcCleanup ;;
*\.md) if [ -e "$base"_template.tex ] ; then pandoc --template "$base"_template.tex "$file" --filter pandoc-citeproc --variable urlcolor=blue -o "$base".pdf; else pandoc "$file" --filter pandoc-citeproc --variable urlcolor=blue -o "$base".pdf; fi ;;
*\.md) if [ -e "$base"_template.tex ] ; then pandoc --template "$base"_template.tex "$file" --filter pandoc-crossref --citeproc --variable urlcolor=blue -o "$base".pdf; else pandoc "$file" --filter pandoc-crossref --citeproc --variable urlcolor=blue -o "$base".pdf; fi ;;
*config.h) make && sudo make install ;;
*\.c) gcc "$file" -o "$base" && "$base" ;;
*\.py) python "$file" ;;

2
scripts/.local/bin/getbib

@ -6,6 +6,8 @@ if [ -f "$1" ]; then
doi=$(pdfinfo "$1" | grep -io "doi:.*") ||
doi=$(pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1) ||
exit 1
elif [ "$1" = "-c" ]; then
doi=$(xclip -o -selection clipboard)
else
doi="$1"
fi

2
scripts/.local/bin/gohome

@ -1,6 +1,6 @@
#!/bin/env sh
gopass OpenVpn/micah | sudo openvpn --config "$XDG_CONFIG_HOME"/openvpn/mhalter3-gtri.ovpn --askpass /dev/stdin --script-security 2 \
gopass show OpenVpn/micah | sudo openvpn --config "$XDG_CONFIG_HOME"/openvpn/mhalter3-gtri.ovpn --askpass /dev/stdin --script-security 2 \
--setenv PATH '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
--up /etc/openvpn/scripts/update-systemd-resolved \
--down /etc/openvpn/scripts/update-systemd-resolved \

23
scripts/.local/bin/i3lock

@ -0,0 +1,23 @@
#!/bin/env bash
. "/home/micah/.cache/wal/colors.sh"
i3lock -B 8 \
--radius=110 --ring-width=5 \
--insidecolor="${color0:1:6}ff" --line-uses-inside \
--insidevercolor="${color0:1:6}ff" \
--insidewrongcolor="${color0:1:6}ff" \
--ringcolor="${color7:1:6}ff" \
--separatorcolor="${color0:1:6}ff" \
--keyhlcolor="${color0:1:6}ff" \
--bshlcolor="${color7:1:6}ff" \
--ringvercolor="${color7:1:6}ff" \
--ringwrongcolor="${color2:1:6}ff" \
--timecolor="${color7:1:6}ff" \
--time-font="monospace" \
--timesize=50 \
--timestr="%H:%M" \
--timepos="ix:iy+15" \
--datestr="" \
--clock \
--indicator

32
scripts/.local/bin/lock

@ -1,33 +1,3 @@
#!/bin/env bash
pgrep i3lock > /dev/null && exit 0
lock() {
. "$XDG_CACHE_HOME/wal/colors.sh"
killall -SIGUSR1 dunst
i3lock -n -e -B 8 \
--radius=110 --ring-width=5 \
--insidecolor="${color0:1:6}ff" --line-uses-inside \
--insidevercolor="${color0:1:6}ff" \
--insidewrongcolor="${color0:1:6}ff" \
--ringcolor="${color7:1:6}ff" \
--separatorcolor="${color0:1:6}ff" \
--keyhlcolor="${color0:1:6}ff" \
--bshlcolor="${color7:1:6}ff" \
--ringvercolor="${color7:1:6}ff" \
--ringwrongcolor="${color2:1:6}ff" \
--timecolor="${color7:1:6}ff" \
--time-font="monospace" \
--timesize=50 \
--timestr="%H:%M" \
--timepos="ix:iy+15" \
--datestr="" \
--clock \
--indicator
killall -SIGUSR2 dunst
}
lock &
sudo systemctl start i3lock@micah

2
scripts/.local/bin/opout

@ -4,7 +4,7 @@ basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
case "$1" in
*.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid zathura "$basename".pdf >/dev/null 2>&1 & ;;
*.gv|*.dot|*.uml|*.pu) setsid sxiveh "$basename".png >/dev/null 2>&1 & ;;
*.gv|*.dot|*.uml|*.pu|*.puml) setsid sxiveh "$basename".png >/dev/null 2>&1 & ;;
*.[0-9]) setsid zathura "$basename".pdf >/dev/null 2>&1 & ;;
*.html) setsid "$BROWSER" "$basename".html >/dev/null 2>&1 & ;;
*.py) setsid jupyter qtconsole >/dev/null 2>&1 & ;;

2
vdirsyncer/.config/vdirsyncer/password.sh

@ -1,3 +1,3 @@
#!/bin/sh
gopass vdirsyncer/"$1"
gopass show vdirsyncer/"$1"

16
zsh/.config/zsh/.zshrc

@ -17,7 +17,7 @@ export SPACESHIP_VI_MODE_INSERT='[I]'
export SPACESHIP_VI_MODE_NORMAL='[N]'
export SPACESHIP_VI_MODE_SUFFIX=' '
export SPACESHIP_VI_MODE_COLOR=$SPACESHIP_CHAR_COLOR_SUCCESS
export SPACESHIP_JULIA_SYMBOL=''
export SPACESHIP_JULIA_SYMBOL=''
export HISTIGNORE="&:ls:[bf]g:exit:reset:clear:cd:cd ..:cd.."
export HISTSIZE=25000
@ -29,6 +29,7 @@ setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_REDUCE_BLANKS
setopt HIST_VERIFY
setopt BASH_REMATCH
setopt INTERACTIVECOMMENTS
setopt CORRECT
@ -52,8 +53,14 @@ zle -N zle-keymap-select
bindkey -v
export KEYTIMEOUT=10
bindkey -M viins 'fj' vi-cmd-mode
bindkey -M viins 'jf' vi-cmd-mode
if [[ $TERM == tmux* ]]; then
bindkey '^[[1~' beginning-of-line
bindkey '^[[4~' end-of-line
else
bindkey '^[[H' beginning-of-line
bindkey '^[[F' end-of-line
fi
bindkey '^[[3~' delete-char
bindkey -M viins '^a' vi-beginning-of-line
bindkey -M viins '^e' vi-end-of-line
bindkey -M viins '^k' kill-line
@ -106,3 +113,6 @@ if [[ "$USER" == "root" ]] && [[ "$DEFAULT_USER" == "micah" ]]; then
SUFLAGS="-u"
fi
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION $SUFLAGS
# set up x11 server authority
xhost +local:root > /dev/null

22
zsh/.config/zsh/aliases

@ -114,6 +114,16 @@ jt() {
}
# === Julia Utilities: ===
## Download specified version of julia
jldl() {
if [[ "$1" =~ ^([0-9]+\.[0-9]+)\.[0-9]+$ ]]; then
ver="${BASH_REMATCH[1]}"
sver="${BASH_REMATCH[2]}"
wget "https://julialang-s3.julialang.org/bin/linux/x64/${sver}/julia-${ver}-linux-x86_64.tar.gz" -O - | tar xz -C ${JULIA_HOME}
fi
}
## Call base julia installations or run virtual environment if activated
jl() {
if type julia >/dev/null; then
@ -220,14 +230,13 @@ jlsys() {
if [ -f "${VIRTUAL_ENV}/SysImage.so" ]; then
ver=""
proj="${VIRTUAL_ENV}"
opts="${@}"
jl ${ver} -J${proj}/SysImage.so ${@}
else
ver="${1}"
proj="${JULIA_DEPOT_PATH}/environments/v${ver}-SysImage"
[ ! -f "${proj}/SysImage.so" ] && return 1
opts="${@:2}"
jl ${ver} -J${proj}/SysImage.so ${@:2}
fi
jl ${ver} -J${proj}/SysImage.so ${opts}
}
## Start Julia in the virtual environment project
@ -235,13 +244,12 @@ jlsysproj() {
if [ -n "${VIRTUAL_ENV}" ]; then
ver=""
proj="${VIRTUAL_ENV}"
opts="${@}"
jl ${ver} --project=${proj} ${@}
else
ver="${1}"
proj="${JULIA_DEPOT_PATH}/environments/v${ver}-SysImage"
opts="${@:2}"
jl ${ver} --project=${proj} ${@:2}
fi
jl ${ver} --project=${proj} ${opts}
}
## Run jlpkg in the virtual environment project
@ -257,7 +265,7 @@ jlbuildsysimage() {
proj="${JULIA_DEPOT_PATH}/environments/v${ver}-SysImage"
[ ! -f "${proj}/Project.toml" ] && return 1
fi
jlsysproj ${ver} -e "using PackageCompiler, Pkg; create_sysimage([Symbol(k) for k in keys(Pkg.installed())]; sysimage_path=\"${proj}/SysImage.so\")"
jlsysproj ${ver} -e "using PackageCompiler, Pkg; create_sysimage([Symbol(x.name) for x in values(Pkg.dependencies()) if x.is_direct_dep]; sysimage_path=\"${proj}/SysImage.so\")"
}
# git aliases

Loading…
Cancel
Save