adding server files and removing old stuff
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/fish
|
||||
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
|
||||
@@ -1,8 +0,0 @@
|
||||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhistcnt =6
|
||||
let g:netrw_dirhist_6='/Users/adamska/.vim/ftdetect'
|
||||
let g:netrw_dirhist_5='/Users/adamska/Documents/work/dotfiles/mac'
|
||||
let g:netrw_dirhist_4='/Users/adamska/Documents/work/dotfiles'
|
||||
let g:netrw_dirhist_3='/Users/adamska/Documents/work'
|
||||
let g:netrw_dirhist_2='/usr/share/vim/vim90'
|
||||
let g:netrw_dirhist_1='/Users/adamska/.vim'
|
||||
@@ -1,25 +0,0 @@
|
||||
" Vim color file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2001 Jul 23
|
||||
|
||||
" This is the default color scheme. It doesn't define the Normal
|
||||
" highlighting, it uses whatever the colors used to be.
|
||||
|
||||
" Set 'background' back to the default. The value can't always be estimated
|
||||
" and is then guessed.
|
||||
hi clear Normal
|
||||
set bg&
|
||||
|
||||
" Remove all existing highlighting and set the defaults.
|
||||
hi clear
|
||||
|
||||
hi LineNr ctermfg=Green
|
||||
|
||||
" Load the syntax highlighting defaults, if it's enabled.
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let colors_name = "real_def"
|
||||
|
||||
" vim: sw=2
|
||||
-132
@@ -1,132 +0,0 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: .zshrc
|
||||
# Revn: 01-02-2025 2.0
|
||||
# Func: Define user-made aliases and functions to make using the terminal easier
|
||||
#
|
||||
# TODO: make bt functions to check for connection before dc/connecting
|
||||
# research git command stuff
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 09-06-2023: init
|
||||
# copied over useful aliases from ocelot
|
||||
# wrote function to ssh into ocelot remotely, ip robust
|
||||
# 09-09-2023: added aliases to gcc and g++
|
||||
# 09-10-2023: added moved tdm and donut to ~/bin/, changed alias accordingly
|
||||
# 09-15-2023: made ocelot and sentinel try local ssh before using $ip
|
||||
# 09-18-2023: added vim alias to correct vim loading shitty colors
|
||||
# 12-28-2023: added blueutil aliases to connect/dc from M50x's
|
||||
# 01-18-2024: converted btutil aliases into functions
|
||||
# added power on/off to btfunctions
|
||||
#*04-11-2024: removed constant ip call, because of ddns (thanks luke)
|
||||
# added o and p flags to ls alias
|
||||
# gutted remote ssh calls, replaced with ddns
|
||||
# 05-11-2024: added git branch recognition of some sort
|
||||
# 05-16-2024: updated pi static IP's ( fuck speccy )
|
||||
# fixed accidental yank and place of "-p 23" in sentinel
|
||||
# 06-07-2024: updated pi public IP's ( fuck speccy again )
|
||||
# fixed accidental renaming ofrsentinel as rocelot
|
||||
# 10-22-2024: updated prompt, moving git branch to beginning
|
||||
# placed branch inside double brackets, [[ ]] ( vcs_git )
|
||||
# 12-20-2024: added -p flag to vim alias
|
||||
#*01-02-2025: wrote and commented oops()
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
|
||||
# User specific aliases and functions
|
||||
## Aliases
|
||||
|
||||
### Shows everything in detail, except . and ..
|
||||
# A - list ALL ( except for . and .. )
|
||||
# F - put symbols behind items in list
|
||||
# G - force color
|
||||
# h - human readable file sizes
|
||||
# l - long, list long
|
||||
# o - list long, omit group
|
||||
alias ll="ls -AFGhlo"
|
||||
alias l="ls -AFGhlo"
|
||||
|
||||
### Go home
|
||||
alias home="cd ~"
|
||||
|
||||
### local ssh
|
||||
alias ocelot="ssh ocelot@192.168.1.152"
|
||||
alias sentinel="ssh pi@192.168.1.139"
|
||||
alias rocelot="ssh ocelot@97.70.74.80"
|
||||
alias rsentinel="ssh -p 23 pi@97.70.74.80"
|
||||
|
||||
|
||||
### mac gcc is an alias for clang
|
||||
### after downloading gcc, it's not in the global bin, it's local
|
||||
alias gcc="/usr/local/bin/gcc-13"
|
||||
alias g++="/usr/local/bin/g++-13"
|
||||
|
||||
### donut
|
||||
alias donut="~/bin/donut"
|
||||
|
||||
### tdm
|
||||
alias tdm="~/bin/tdm"
|
||||
|
||||
### vim
|
||||
alias vim="vim +\"colo real_def\" -p"
|
||||
|
||||
### load changes to .zshrc
|
||||
alias src="source ~/.zshrc"
|
||||
|
||||
## Aliases
|
||||
|
||||
|
||||
## Functions
|
||||
### turn on bluetooth and connect to m50x-bt
|
||||
### TODO make more robust? how does btutil react when bt is on
|
||||
### btutil -p 1 is run?
|
||||
bt() {
|
||||
blueutil -p 1
|
||||
blueutil --connect 00-0a-45-19-a0-4e
|
||||
}
|
||||
|
||||
|
||||
### turn off bluetooth and dc from m50x-bt
|
||||
btdc() {
|
||||
blueutil --disconnect 00-0a-45-19-a0-4e
|
||||
blueutil -p 0
|
||||
}
|
||||
|
||||
|
||||
### correct mistaken commands
|
||||
oops() {
|
||||
# not exactly sure this works on zsh
|
||||
# but in *bash*
|
||||
# $1 is the argument given to the function
|
||||
# and $_ is the arguments from the previous command
|
||||
# so the idea is that if you do like
|
||||
# ls ~/.vim/syntax/commentS.txt
|
||||
# and you wanna do vim ~/.vim/syntax/commentS.txt
|
||||
# but don't wanna type it all out again
|
||||
# you do can just do
|
||||
# ls ~/.vim/syntax/commentS.txt
|
||||
# oops vim
|
||||
# and it works
|
||||
$1 $_
|
||||
# TODO improve with bangs, so the correct command is stored in
|
||||
# history
|
||||
}
|
||||
|
||||
## Functions
|
||||
|
||||
|
||||
autoload -Uz vcs_info
|
||||
precmd() { vcs_info }
|
||||
|
||||
zstyle ':vcs_info:git:*' formats '%F{white}<<%f%F{red}[[%b]]%f'
|
||||
|
||||
# zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html
|
||||
setopt PROMPT_SUBST
|
||||
# %F{color}...%f colors the encompassed text /color/
|
||||
# %m - shows the short machine name
|
||||
# %1d - current working directory
|
||||
PROMPT='%F{green}%m%f%B%F{red}${vcs_info_msg_0_}%b%f::%F{blue}%1~%f ⇌ '
|
||||
#PROMPT='%F{green}%*%f %F{blue}%~%f %F{red}${vcs_info_msg0}%f$ '
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: XXX.xx
|
||||
# Revn: MM-DD-YYYY 0.0
|
||||
# Func:
|
||||
#
|
||||
# TODO: create
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# MM-DD-YYYY: init
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
|
||||
for i in {1..10}
|
||||
do
|
||||
osascript mes.as +15863812670 "hewwo uwu"
|
||||
done
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: mac_dl.sh
|
||||
# Revn: 09-09-2023 0.1
|
||||
# Func: print the apps and links of stuff to download
|
||||
#
|
||||
# TODO: add mathematica
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 09-09-2023: init
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
echo "chrome"
|
||||
echo "https://www.google.com/chrome/"
|
||||
|
||||
echo "spotify"
|
||||
echo "https://www.spotify.com/us/download/mac/"
|
||||
|
||||
echo "minecraft"
|
||||
echo "https://www.minecraft.net/en-us/download"
|
||||
|
||||
echo "notion"
|
||||
echo "https://www.notion.so/desktop"
|
||||
|
||||
echo "arduino"
|
||||
echo "https://www.arduino.cc/en/software"
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: mac_setup.sh
|
||||
# Revn: 01-04-2025 1.0
|
||||
# Func: re-setup terminal tools in mac
|
||||
#
|
||||
# TODO: improve
|
||||
# comment?
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 09-09-2023: init
|
||||
# 04-11-2024: added mkdir for bin and src
|
||||
# moved some clones up a little bit
|
||||
# put binaries in local bin directory
|
||||
# 12-18-2024: made dotfiles symlink instead of copied diverging files
|
||||
# 12-20-2024: corrected relative pathing issue with symlinks
|
||||
# fixed bugs in cp mes.as and dos.sh lines
|
||||
#*01-14-2025: fixed typo in .vimrc symlink
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
brew help > out 2> errout
|
||||
rm out
|
||||
|
||||
if [ -s errout ]; then
|
||||
rm errout
|
||||
echo "installing brew"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
|
||||
|
||||
brew install gcc
|
||||
brew install go
|
||||
brew install htop
|
||||
#brew install btop
|
||||
brew install neofetch
|
||||
brew install onefetch
|
||||
brew install rust
|
||||
brew install tmux
|
||||
brew install wireshark
|
||||
brew install nmap
|
||||
|
||||
mkdir ~/bin
|
||||
mkdir ~/src
|
||||
mkdir ~/Documents/work
|
||||
cd ~/Documents/work
|
||||
|
||||
git clone https://github.com/alexander-the-alright/dotfiles
|
||||
|
||||
ln -s ~/Documents/work/dotfiles/mac/.zshrc ~/.zshrc
|
||||
ln -s ~/Documents/work/dotfiles/.vimrc ~/.vimrc
|
||||
ln -s ~/Documents/work/dotfiles/mac/.vim ~/.vim
|
||||
|
||||
#cp dotfiles/mac/.zshrc ~/
|
||||
#cp dotfiles/mac/.vimrc ~/
|
||||
#cp -r dotfiles/mac/.vim ~/
|
||||
|
||||
cp dotfiles/mac/mes.as ~/
|
||||
cp dotfiles/mac/dos.sh ~/
|
||||
|
||||
git clone https://github.com/alexander-the-alright/soary
|
||||
|
||||
git clone https://github.com/alexander-the-alright/TDM
|
||||
go build TDM/tdm.go
|
||||
mv tdm ~/bin
|
||||
|
||||
/usr/local/bin/gcc-13 -o donut dotfiles/mac/donut.c > /dev/null 2> errout
|
||||
|
||||
if [ -s errout ]; then
|
||||
rm errout
|
||||
echo "gcc failed"
|
||||
else
|
||||
mv donut ~/bin
|
||||
fi
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
on run {targetBuddyPhone, targetMessage}
|
||||
tell application "Messages"
|
||||
set targetService to 1st service whose service type = SMS
|
||||
set targetBuddy to buddy targetBuddyPhone of targetService
|
||||
send targetMessage to targetBuddy
|
||||
end tell
|
||||
end run
|
||||
@@ -1,107 +0,0 @@
|
||||
% Style file for CS5311 "Theory of Computation" documents
|
||||
% Charles Wallace
|
||||
% These style settings are what I use to format the lecture notes and homework assignments.
|
||||
% Feel free to use as much (or as little) of them as you like.
|
||||
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsthm}
|
||||
\usepackage{latexsym}
|
||||
\usepackage{fullpage,parskip,paralist}
|
||||
\usepackage{amsmath,amsthm,amssymb}
|
||||
\usepackage{graphicx}
|
||||
|
||||
\ifdefined\nosol
|
||||
\newcommand{\sol}[1]{}
|
||||
\newcommand{\soltitle}{}
|
||||
\else
|
||||
\newcommand{\sol}[1]{{\bf Solution.} #1}
|
||||
\newcommand{\soltitle}{: Solutions}
|
||||
\fi
|
||||
|
||||
\newcommand{\thetitle}[1]{\title{#1\soltitle}}
|
||||
\author{}
|
||||
\date{CS5311, Theory of Computation}
|
||||
|
||||
% \ie, \eg: the abbreviations the way they are supposed to be written
|
||||
\newcommand{\ie}{{\em i.e.,}}
|
||||
\newcommand{\eg}{{\em e.g.,}}
|
||||
|
||||
% These set common formats for various kinds of names
|
||||
% \prob{P}: name of problem/language P
|
||||
\newcommand{\prob}[1]{\mbox{\bf #1}}
|
||||
% \pprob{P}{M}: problem P restricted to machine class M
|
||||
\newcommand{\pprob}[2]{\mbox{$\prob{#1}_{\prob{\tiny #2}}$}}
|
||||
% \prog{M}: name of program/machine M
|
||||
\newcommand{\prog}[1]{\mbox{\tt #1}}
|
||||
% \enc{M}: string encoding of machine M
|
||||
\newcommand{\enc}[1]{\mbox{[\prog{#1}]}}
|
||||
% \lang{M}: language accepted by machine M
|
||||
\newcommand{\lang}[1]{\mbox{\bf L(\prog{#1})}}
|
||||
|
||||
% definition environment (unnumbered)
|
||||
\theoremstyle{definition}
|
||||
\newtheorem*{definition}{Definition}
|
||||
% numbered environments: theorem, proof, lemma, corollary, claim
|
||||
\newtheorem{theorem}{Theorem}
|
||||
\newtheorem{lemma}{Lemma}
|
||||
\newtheorem{corollary}{Corollary}
|
||||
\newtheorem{claim}{Claim}
|
||||
|
||||
% Proof opening statement
|
||||
\newcommand{\prf}{{\em Proof.}}
|
||||
\newcommand{\prfout}{{\em Proof outline.}}
|
||||
|
||||
% \code{L}{P}{I}{C}: Turing Machine code (as a box containing formatted text)
|
||||
% L: horizontal length of box
|
||||
% P: name of program
|
||||
% I: names of inputs
|
||||
% C: program code
|
||||
\newcommand{\code}[4]{\fbox{\parbox{#1}
|
||||
{\prog{#2}\hfill (Input: #3)
|
||||
\begin{enumerate}
|
||||
#4
|
||||
\end{enumerate}}}}
|
||||
|
||||
% some common problems
|
||||
\newcommand{\atm}{\pprob{A}{TM}}
|
||||
\newcommand{\etm}{\pprob{E}{TM}}
|
||||
\newcommand{\alltm}{\pprob{All}{TM}}
|
||||
\newcommand{\acfl}{\pprob{A}{CFL}}
|
||||
\newcommand{\allcfl}{\pprob{All}{CFL}}
|
||||
\newcommand{\areg}{\pprob{A}{RL}}
|
||||
\newcommand{\allreg}{\pprob{All}{RL}}
|
||||
\newcommand{\anfa}{\pprob{A}{NFA}}
|
||||
\newcommand{\adfa}{\pprob{A}{DFA}}
|
||||
|
||||
% \bigo{T}: big-O of term T
|
||||
\newcommand{\bigo}[1]{\mbox{O$(#1)$}}
|
||||
% \expbigo{T}: 2^(big-O of term T)
|
||||
\newcommand{\expbigo}[1]{\mbox{$2^{\mbox{O$(#1)$}}$}}
|
||||
% \bigom{T}: big-Omega of term T
|
||||
\newcommand{\bigom}[1]{\mbox{$\Omega(#1)$}}
|
||||
% time/space complexity terms
|
||||
\newcommand{\TIME}[1]{\mbox{TIME$(#1)$}}
|
||||
\newcommand{\NTIME}[1]{\mbox{NTIME$(#1)$}}
|
||||
\newcommand{\SPACE}[1]{\mbox{SPACE$(#1)$}}
|
||||
\newcommand{\NSPACE}[1]{\mbox{NSPACE$(#1)$}}
|
||||
% some common complexity classes
|
||||
\newcommand{\PTIME}{\mbox{P}}
|
||||
\newcommand{\NPTIME}{\mbox{NP}}
|
||||
\newcommand{\EXPTIME}{\mbox{EXPTIME}}
|
||||
\newcommand{\PSPACE}{\mbox{PSPACE}}
|
||||
\newcommand{\NPSPACE}{\mbox{NPSPACE}}
|
||||
\newcommand{\LSPACE}{\mbox{L}}
|
||||
\newcommand{\NLSPACE}{\mbox{NL}}
|
||||
\newcommand{\coNLSPACE}{\mbox{coNL}}
|
||||
\newcommand{\NC}{\mbox{NC}}
|
||||
\newcommand{\NPcomplete}{\NPTIME-complete}
|
||||
|
||||
% \polyreduce{P}{Q} polynomial-time reduction relation
|
||||
\newcommand{\polyreduce}[2]{$\prob{#1}\leq_{\mbox{\small P}}\prob{#2}$}
|
||||
% \logreduce{P}{Q}: log-space reduction relation
|
||||
\newcommand{\logreduce}[2]{$\prob{#1}\leq_{\mbox{\small L}}\prob{#2}$}
|
||||
|
||||
\newcommand{\gad}{\mathbf{Gadget}}
|
||||
\newcommand{\domino}[2]
|
||||
{\begin{tabular}{|l|} \hline $#1$\\ \hline $#2$ \\ \hline \end{tabular}}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 MiB |
@@ -1,183 +0,0 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: .bashrc
|
||||
# Revn: 01-04-2025 1.0
|
||||
# Func: Define user-made aliases and functions to make using the terminal easier
|
||||
#
|
||||
# TODO: break down PS1 stuff
|
||||
# color files in ls, and color different file differently
|
||||
# pick a new color and prompt scheme
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 07-12-2023: init
|
||||
# cleaned it up a little
|
||||
# 08-24-2023: updated some PS1 stuff, added documentation
|
||||
# 08-30-2023: added link to color resource
|
||||
# 05-16-2024: updated exe name for ekho, changed call
|
||||
# 06-07-2024: added "if not running interactively" line to make scp
|
||||
# work
|
||||
# 06-09-2024: updated ekho exe to ekho-cli-sen
|
||||
#*01-04-2025: added vim -p alias
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- == *i* ]] || return
|
||||
|
||||
# User specific aliases and functions
|
||||
## Aliases
|
||||
|
||||
### Shows everything in detail, except . and ..
|
||||
alias ll="ls -AFGhl"
|
||||
alias l="ls -AFGhl"
|
||||
alias lr="ls -AFGhlR"
|
||||
|
||||
### Go home
|
||||
alias home="cd ~"
|
||||
|
||||
### TDM stuff
|
||||
alias todo="~/bin/todo"
|
||||
alias mark="~/bin/todo mark"
|
||||
alias delete="~/bin/todo delete"
|
||||
alias show="~/bin/todo show"
|
||||
|
||||
### MOTD stuff
|
||||
alias ekho="~/bin/ekho-cli-sen"
|
||||
|
||||
### vim default to tabs
|
||||
alias vim="vim -p"
|
||||
|
||||
## Aliases
|
||||
|
||||
## Exports
|
||||
|
||||
# Holy shit, export PS1 kept failing, so I had to make it reload every
|
||||
# time a command is run. Hacky and probably really slow, but it works
|
||||
# PROMPT_COMMAND is a command run before it prints the prompt
|
||||
# export PS1 is the command prompt, won't run in this file, only runs
|
||||
# in actual terminal, or here apparently
|
||||
# \e[0;31m is red
|
||||
# \W is the current folder
|
||||
# \e[0;34m is blue
|
||||
# ' -> ' is a space and then an arrow, and then a space
|
||||
# \e0;31m is red again
|
||||
# \e[m is no color
|
||||
#export PROMPT_COMMAND="export PS1='\[\e[0;32m\]\W\[\e[1;31m\] -> \[\e[0;32m\]'"
|
||||
#export PROMPT_COMMAND="export PS1='\e[0;31m$(parse_git_branch) \e[m\W -> '"
|
||||
#export PROMPT_COMMAND="export PS1='\W -> '"
|
||||
#export LSCOLORS=exfxcxdxbxegabagacad
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
|
||||
. "$HOME/.cargo/env"
|
||||
|
||||
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
#TODO come back and break each of these down
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
# PS1 documentation
|
||||
# https://misc.flogisoft.com/bash/tip_colors_and_formatting
|
||||
|
||||
# color resource - https://misc.flogisoft.com/bash/tip_colors_and_formatting
|
||||
e="\e" # escape character
|
||||
# background types
|
||||
rst="[0m"
|
||||
bold="[1m"
|
||||
ul="[4m"
|
||||
blink="[5m"
|
||||
# colors
|
||||
red="[31m"
|
||||
green="[32m"
|
||||
yellow="[33m"
|
||||
blue="[34m"
|
||||
magenta="[35m"
|
||||
cyan="[36m"
|
||||
lred="[91m"
|
||||
lgreen="[92m"
|
||||
lblue="[94m"
|
||||
lmag="[95m"
|
||||
lcyan="[96m"
|
||||
white="[97m"
|
||||
# background colors
|
||||
bred="[40m"
|
||||
bgreen="[42m"
|
||||
bblue="[44m"
|
||||
|
||||
# use different PS1 for each user, while maintaining one bashfile
|
||||
if [ "${USER}" = "venom" ]; then
|
||||
# venom gets diamond dogs
|
||||
#PS1='\[\033[01;34m\]DIAMOND DOGS\[\033[00m\]:\[\033[01;32m\]\W\[\033[00m\] ♢ '
|
||||
PS1="$e$blue""DIAMOND"" "DOGS"$e$rst":"$e$green""\W""$e$rst ♢ "
|
||||
# kaz might get it too
|
||||
elif [ "${USER}" = "ocelot" ]; then
|
||||
# pi/ocelot gets OUTER-HEAVEN
|
||||
# this makes some sense for ocelot, but itd make more sense
|
||||
# for venom or kaz. But still
|
||||
# or something
|
||||
#PS1='\[\033[01;32m\]\h\[\033[00m\]/\[\033[01;37m\]\[\033[07;37m\]XOF\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\] ⇌ '
|
||||
PS1="$e$bold$e$green""\h""$e$rst"::"$e$blue""\W""$e$rst ⇌ "
|
||||
else
|
||||
# use the standard prompt if we don't know the user
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# run quick and dirty program to flash an LED
|
||||
~/bin/boot
|
||||
|
||||
# call motd
|
||||
#~/bin/ekho-cli-sen
|
||||
~/bin/client.o
|
||||
-82
@@ -1,82 +0,0 @@
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: XXX.xx
|
||||
# Revn: MM-DD-YYYY 0.0
|
||||
# Func:
|
||||
#
|
||||
# TODO: create
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# MM-DD-YYYY: init
|
||||
#
|
||||
# ==============================================================================
|
||||
@@ -1,13 +0,0 @@
|
||||
% ==============================================================================
|
||||
% Auth: dodd
|
||||
% File: XXX.xx
|
||||
% Revn: MM-DD-YYYY 0.0
|
||||
% Func:
|
||||
%
|
||||
% TODO: create
|
||||
% ==============================================================================
|
||||
% CHANGE LOG
|
||||
% ------------------------------------------------------------------------------
|
||||
% MM-DD-YYYY: init
|
||||
%
|
||||
% ==============================================================================
|
||||
@@ -1,15 +0,0 @@
|
||||
"""
|
||||
===============================================================================
|
||||
Auth: dodd
|
||||
File: XXX.py
|
||||
Revn: MM-DD-YYYY 0.0
|
||||
Func:
|
||||
|
||||
TODO: create
|
||||
===============================================================================
|
||||
CHANGE LOG
|
||||
-------------------------------------------------------------------------------
|
||||
MM-DD-YYYY: init
|
||||
|
||||
===============================================================================
|
||||
"""
|
||||
@@ -1,13 +0,0 @@
|
||||
// =============================================================================
|
||||
// Auth: dodd
|
||||
// File: XXX.xx
|
||||
// Revn: MM-DD-YYYY 0.0
|
||||
// Func:
|
||||
//
|
||||
// TODO: create
|
||||
// =============================================================================
|
||||
// CHANGE LOG
|
||||
// -----------------------------------------------------------------------------
|
||||
// MM-DD-YYYY: init
|
||||
//
|
||||
// =============================================================================
|
||||
@@ -1 +0,0 @@
|
||||
au BufRead,BufNewFile *.ano set filetype=ano
|
||||
@@ -1,135 +0,0 @@
|
||||
" ==============================================================================
|
||||
" Auth: David Daub <david.daub@googlemail.com>, Alex
|
||||
" Lang: GoLang
|
||||
" Revn: 15-11-2009 Official, 03-27-2020 1.4
|
||||
" Func: Define syntax coloring for .go files when being edited in Vim
|
||||
"
|
||||
" TODO: very much
|
||||
" learn regex
|
||||
" learn Go
|
||||
" ==============================================================================
|
||||
" CHANGE LOG
|
||||
" ------------------------------------------------------------------------------
|
||||
" 12-31-2018: init
|
||||
" 01-01-2019: added header block
|
||||
" added coloring for bool type
|
||||
" changed print/println to Print/Println, added Printf/Sprintf
|
||||
" changed boolean values link to Keyword (Yellow) from Boolean
|
||||
" (Green?)
|
||||
" 01-02-2019: added coloring for main and Scanln
|
||||
" 12-26-2019: changed goBoolean link from Keyword to Type
|
||||
" added coloring for error
|
||||
" 03-27-2020: added while to list of repetition structures
|
||||
"
|
||||
" ==============================================================================
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
" A bunch of useful Go keywords
|
||||
syn keyword goStatement select
|
||||
syn keyword goStatement defer
|
||||
syn keyword goStatement fallthrough range type
|
||||
syn keyword goStatement return
|
||||
|
||||
syn keyword goClause import package
|
||||
syn keyword goConditional if else switch
|
||||
syn keyword goBranch goto break continue
|
||||
syn keyword goLabel case default
|
||||
syn keyword goRepeat for
|
||||
syn keyword goRepeat while
|
||||
" Added this line ^^^
|
||||
syn keyword goType struct const interface func
|
||||
syn keyword goType var map
|
||||
syn keyword goType uint8 uint16 uint32 uint64
|
||||
syn keyword goType int8 int16 int32 int64
|
||||
syn keyword goType float32 float64
|
||||
syn keyword goType float32 float64
|
||||
syn keyword goType byte
|
||||
syn keyword goType uint int float uintptr string
|
||||
syn keyword goType bool
|
||||
" Added this line ^^^
|
||||
syn keyword goType error
|
||||
" Added this line ^^^
|
||||
|
||||
syn keyword goConcurrent chan go
|
||||
|
||||
syn keyword goValue nil
|
||||
syn keyword goBoolean true false
|
||||
|
||||
syn keyword goConstant iota
|
||||
|
||||
" Builtin functions
|
||||
syn keyword goBif len make new close closed cap map
|
||||
|
||||
" According to the language specification it is not garanteed to stay in the
|
||||
" language. See http://golang.org/doc/go_spec.html#Bootstrapping
|
||||
syn keyword goBif Print Println Printf Sprintf Scanln
|
||||
" Changed print[ln] to Print[ln] ^^^
|
||||
|
||||
syn keyword goBif panic panicln main
|
||||
|
||||
" Comments
|
||||
syn keyword goTodo contained TODO FIXME XXX
|
||||
syn match goLineComment "\/\/.*" contains=@Spell,goTodo
|
||||
syn match goCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
|
||||
syn region goComment start="/\*" end="\*/" contains=@Spell,goTodo
|
||||
|
||||
" Numerals
|
||||
syn case ignore
|
||||
"integer number, or floating point number without a dot and with "f".
|
||||
syn match goNumbers display transparent "\<\d\|\.\d" contains=goNumber,goFloat,goOctError,goOct
|
||||
syn match goNumbersCom display contained transparent "\<\d\|\.\d" contains=goNumber,goFloat,goOct
|
||||
syn match goNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
|
||||
" hex number
|
||||
syn match goNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
|
||||
" oct number
|
||||
syn match goOct display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=goOctZero
|
||||
syn match goOctZero display contained "\<0"
|
||||
|
||||
syn match goFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\="
|
||||
syn match goFloat display contained "\d\+e[-+]\=\d\=\>"
|
||||
syn match goFloat display "\(\.[0-9_]\+\)\(e[-+]\=[0-9_]\+\)\=[fl]\=i\=\>"
|
||||
|
||||
" Literals
|
||||
syn region goString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
|
||||
|
||||
syn match goSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
|
||||
syn match goCharacter "L\='[^\\]'"
|
||||
syn match goCharacter "L'[^']*'" contains=goSpecial
|
||||
|
||||
|
||||
hi def link goStatement Statement
|
||||
hi def link goClause Preproc
|
||||
hi def link goConditional Conditional
|
||||
hi def link goBranch Conditional
|
||||
hi def link goLabel Label
|
||||
hi def link goRepeat Repeat
|
||||
hi def link goType Type
|
||||
hi def link goConcurrent Statement
|
||||
hi def link goValue Constant
|
||||
hi def link goBoolean Type
|
||||
" Changed goBoolean link from Boolean to Keyword
|
||||
" Changed goBoolean link from Keyword to Type
|
||||
hi def link goConstant Constant
|
||||
hi def link goBif Function
|
||||
hi def link goTodo Todo
|
||||
hi def link goLineComment goComment
|
||||
hi def link goComment Comment
|
||||
hi def link goNumbers Number
|
||||
hi def link goNumbersCom Number
|
||||
hi def link goNumber Number
|
||||
hi def link goFloat Float
|
||||
hi def link goOct Number
|
||||
hi def link goOctZero Number
|
||||
hi def link goString String
|
||||
hi def link goSpecial Special
|
||||
hi def link goCharacter Character
|
||||
|
||||
|
||||
let b:current_syntax = "go"
|
||||
@@ -1 +0,0 @@
|
||||
au BufRead,BufNewFile *.prv set filetype=prv
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
|
||||
autocmd BufNewFile,BufRead *.txt set filetype=txt
|
||||
|
||||
|
||||
@@ -1,231 +0,0 @@
|
||||
" ====================================================================
|
||||
" Auth: jontino
|
||||
" Lang: ANO
|
||||
" Revn: 04-17-2023 1.0
|
||||
" Func: Define syntax coloring for .ano files when being edited in Vim
|
||||
"
|
||||
" TODO: begin writing, add new words
|
||||
" implement regular expressions for match baby names
|
||||
" ====================================================================
|
||||
" CHANGE LOG
|
||||
" --------------------------------------------------------------------
|
||||
" 04-17-2023: copied from prv.vim
|
||||
"
|
||||
" ====================================================================
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
" Required fields
|
||||
" Comments
|
||||
" header comments # Green
|
||||
" single line comments // Cyan
|
||||
" in/multi line comments /* ... */ Cyan
|
||||
" Quotes
|
||||
" must work multiline
|
||||
" Gray? LightRed?
|
||||
" Names
|
||||
"
|
||||
|
||||
|
||||
|
||||
" XXX Dates:
|
||||
" Date highlighting for the Change Log
|
||||
" the first and last quote define the expression
|
||||
" \d is any digit [0-9]
|
||||
" \{1,2} matches 1 or 2 times, although it should only ever get 2
|
||||
" - literal hyphen, which seperates months, days, and years
|
||||
" The same three elements are repeated again for the days
|
||||
" \d is any digit, used again for the years
|
||||
" \{4} for only four digits can be matched
|
||||
" ends with : because only dates in change log should be highlighted
|
||||
" marked as contained, as it should only be highlighted in comments
|
||||
" contains colon, so I can highlight the color separately
|
||||
" for some reason, the colon doesn't work as keyword, so simple match
|
||||
syn match date "\d\{1,2}-\d\{1,2}-\d\{4}:" contained contains=colon
|
||||
syn match colon ":" contained
|
||||
|
||||
|
||||
|
||||
" XXX Comments:
|
||||
" comments come after #
|
||||
" eg| not comment # now a comment
|
||||
" # comment
|
||||
" not a comment
|
||||
" not
|
||||
" not
|
||||
" ### comment
|
||||
"
|
||||
" first and last quote define the expression
|
||||
" # can come literally, because it doesn't need escaping
|
||||
" . is every non-new line character possible
|
||||
" * matches as many matches as possible
|
||||
" i.e. a pound sign, and then as many characters as possible
|
||||
syn match header "#.*" contains=commentFields,commentTodo,date,names,germ,rus,latin,rusgerm
|
||||
syn match SLcomment "//.*" contains=names,germ,rus,latin,rusgerm
|
||||
syn region ILMLcomment start="/\*" end="\*/" contains=names,germ,rus,latin,rusgerm
|
||||
" commentFields and commentTodo are contained within comments, so they
|
||||
" are as such in the definition of a comment, and listed as contained
|
||||
" in their own definitions
|
||||
" commentFields is match instead of keyword, will contain the space
|
||||
syn keyword commentFields contained Auth Revn File Func
|
||||
syn keyword commentTodo contained TODO todo Todo XXX FIXME
|
||||
syn match commentFields contained "CHANGE LOG"
|
||||
|
||||
|
||||
|
||||
" XXX Quotes:
|
||||
" quotes should exist between odd pairs of quotation marks
|
||||
" eg| "quote" not
|
||||
" "quote" not "quote"
|
||||
" "not
|
||||
" quote"
|
||||
" "quote only if the it rolls
|
||||
" over onto the next line"
|
||||
" Calling the quotation a region instead of pattern match makes it
|
||||
" easier to wrap around a new line
|
||||
" the first and last quote define the expression
|
||||
" \ escapes the next character, allowing \" to appear as a literal "
|
||||
" thus, start and end are both quotes, and the reqion can span lines
|
||||
syn region quote start="\"" end="\"" contains=names,germ,rus,latin,rusgerm
|
||||
" -- DEPRECATED --
|
||||
" the first and last quote define the expression
|
||||
" \ is the escape character, so \" means I want to look for a quote
|
||||
" . is every non-new line character possible
|
||||
" \{,} is \{0,infinity}, means I'm looking for between 0 and infinity
|
||||
" matches for the previous character, which is a wildcard, .
|
||||
" \{-,} will prioritize the smallest amount of matches possible
|
||||
" syn match quote "\".\{-,}\""
|
||||
" -- DEPRECATED --
|
||||
|
||||
|
||||
|
||||
" XXX Notes:
|
||||
" Allow for notes to be left with special highlighting
|
||||
" \c escapes the case, so search is entirely case insensitive
|
||||
" note are all literals
|
||||
" s\? will alow for either 0 or 1 of the character "s" to be matched,
|
||||
" essentially allowing for both notes and note
|
||||
" finally followed by a colon
|
||||
" nextgroup is the actual notes to be taken, as this is just the tag
|
||||
syn match noteTag "\cnotes\?:" nextgroup=notes
|
||||
" define notes as starting with space, ending with exclamation mark
|
||||
" if it's not denoted as contained, then the whole damn thing will be
|
||||
" highlighted
|
||||
syn region notes start=" " end="!" contained
|
||||
|
||||
|
||||
|
||||
" XXX Names:
|
||||
" keyword to the whole list of words
|
||||
" lmfao ignore case sensitivity to avoid writing things twice
|
||||
syn case ignore
|
||||
|
||||
" nicknames for archie
|
||||
syn keyword ambiii archie chicho chach chibo
|
||||
syn keyword ambiii barchie chachfield archibald
|
||||
syn match ambiii "Lord Archibald Mordecai Blackanddecker III"
|
||||
|
||||
" nicknames for olly
|
||||
syn keyword obrg olly bolly boliver oliver ogibler oboe
|
||||
syn match obrg "bolly bear"
|
||||
syn match obrg "bolly ball"
|
||||
syn match obrg "olly ball"
|
||||
syn match obrg "Sir Oliver Boliver Rockford Gubbins"
|
||||
|
||||
" things that apply to both babies
|
||||
syn match both "of Sealand"
|
||||
syn match both "sink boy"
|
||||
syn match both "baby boy"
|
||||
|
||||
" us?
|
||||
syn keyword parents mom dad
|
||||
|
||||
syn case match
|
||||
" lmfao and turn the case sensitivity back on
|
||||
|
||||
|
||||
|
||||
|
||||
" keeping this as it might be useful later
|
||||
" XXX Expressions:
|
||||
" highlight equations, formulas, expressions, etc
|
||||
" expressions: .* is any number of characters
|
||||
" = is literal
|
||||
" .* is any number of characters again
|
||||
" added spaces around = to avoid confusion with =>
|
||||
"
|
||||
" the idea is that it's stuff that equals stuff, and we
|
||||
" worry about what it is later
|
||||
" name: \c case-escapes the sequence
|
||||
" \a is alphabetic characters, probably don't need escaping
|
||||
" \+ is at least 1 match, so it's 1 or more letters is a name
|
||||
" name: \c\a\= is 0 or 1 case-escaped alphabetic characters
|
||||
" _ is literal, best I can get to subscripts
|
||||
" \a\+ is 1 or more case-escaped alphabetic characters
|
||||
" op: inside [] can allow for one choice from any contained characters
|
||||
" =, +, -, /, ^ are all literals for operations
|
||||
" \* escapes the * character, which is now multiplication
|
||||
" Num: see Numbers: below
|
||||
" FIXME try to make name into one thing, probably with \{,1}
|
||||
|
||||
|
||||
" ColorGuide: ctermfg and ctermbg args - - - - source:: :help cterm
|
||||
" Black
|
||||
" LightBlue/Cyan/LightCyan, Blue/DarkBlue/DarkCyan
|
||||
" Green/LightGreen, DarkGreen
|
||||
" Red/LightRed, DarkRed
|
||||
" Magenta/LightMagenta, DarkMagenta
|
||||
" Yellow/LightYellow, DarkYellow/Brown
|
||||
" White
|
||||
" Gray/LightGray, DarkGray
|
||||
" ColorGuide: ctermfg and ctermbg args - - - - source:: :help cterm
|
||||
" ColorGuide: - - - - - - - - - - - - - - - source:: :help group-name
|
||||
" Dates and fields in comments still use links for highlighting to get
|
||||
" access to 'term' arguments that don't want to load correctly, namely
|
||||
" Underline -> PreProc (Magenta in default colo), with underline
|
||||
" ColorGuide: - - - - - - - - - - - - - - - source:: :help group-name
|
||||
|
||||
|
||||
" XXX Coloring:
|
||||
" hi[ghlight] <group> cterm=<style> ctermfg=<color> [ctermbg=<color>]
|
||||
" group is typically a user-made group
|
||||
" cterm is stuff like Underline and Bold
|
||||
" ctermfg is the foreground, or font color
|
||||
" ctermbg is the background color, or highlight color
|
||||
|
||||
" quotes are good
|
||||
hi quote ctermfg=DarkRed
|
||||
|
||||
" header comments are good
|
||||
hi header ctermfg=Green
|
||||
" leaving these as link because I like the color it sets
|
||||
" in theory... I could choose my own colors...
|
||||
"hi def link commentFields Underlined
|
||||
"hi def link date Underlined
|
||||
hi commentFields cterm=Underline ctermfg=Blue
|
||||
hi date cterm=Underline ctermfg=Blue
|
||||
|
||||
" comments are good
|
||||
hi SLcomment ctermfg=Cyan
|
||||
hi ILMLcomment ctermfg=Cyan
|
||||
hi colon ctermfg=Cyan
|
||||
hi commentTodo ctermfg=Black ctermbg=Yellow
|
||||
|
||||
" important notes
|
||||
" could probably do without this, tbh
|
||||
hi noteTag ctermfg=White ctermbg=Red
|
||||
hi notes ctermfg=White ctermbg=Red
|
||||
|
||||
" nicknames for the boys
|
||||
hi ambiii ctermfg=Green
|
||||
hi obrg ctermfg=Red
|
||||
" picked by archie himself
|
||||
hi both ctermfg=LightBlue
|
||||
hi parents ctermfg=DarkGray
|
||||
|
||||
let b:current_syntax = "ano"
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
" ==============================================================================
|
||||
" Auth: David Daub <david.daub@googlemail.com>, Alex
|
||||
" Lang: GoLang
|
||||
" Revn: 15-11-2009 Official, 03-27-2020 1.4
|
||||
" Func: Define syntax coloring for .go files when being edited in Vim
|
||||
"
|
||||
" TODO: very much
|
||||
" learn regex
|
||||
" learn Go
|
||||
" ==============================================================================
|
||||
" CHANGE LOG
|
||||
" ------------------------------------------------------------------------------
|
||||
" 12-31-2018: init
|
||||
" 01-01-2019: added header block
|
||||
" added coloring for bool type
|
||||
" changed print/println to Print/Println, added Printf/Sprintf
|
||||
" changed boolean values link to Keyword (Yellow) from Boolean
|
||||
" (Green?)
|
||||
" 01-02-2019: added coloring for main and Scanln
|
||||
" 12-26-2019: changed goBoolean link from Keyword to Type
|
||||
" added coloring for error
|
||||
" 03-27-2020: added while to list of repetition structures
|
||||
"
|
||||
" ==============================================================================
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
" A bunch of useful Go keywords
|
||||
syn keyword goStatement select
|
||||
syn keyword goStatement defer
|
||||
syn keyword goStatement fallthrough range type
|
||||
syn keyword goStatement return
|
||||
|
||||
syn keyword goClause import package
|
||||
syn keyword goConditional if else switch
|
||||
syn keyword goBranch goto break continue
|
||||
syn keyword goLabel case default
|
||||
syn keyword goRepeat for
|
||||
syn keyword goRepeat while
|
||||
" Added this line ^^^
|
||||
syn keyword goType struct const interface func
|
||||
syn keyword goType var map
|
||||
syn keyword goType uint8 uint16 uint32 uint64
|
||||
syn keyword goType int8 int16 int32 int64
|
||||
syn keyword goType float32 float64
|
||||
syn keyword goType float32 float64
|
||||
syn keyword goType byte
|
||||
syn keyword goType uint int float uintptr string
|
||||
syn keyword goType bool
|
||||
" Added this line ^^^
|
||||
syn keyword goType error
|
||||
" Added this line ^^^
|
||||
|
||||
syn keyword goConcurrent chan go
|
||||
|
||||
syn keyword goValue nil
|
||||
syn keyword goBoolean true false
|
||||
|
||||
syn keyword goConstant iota
|
||||
|
||||
" Builtin functions
|
||||
syn keyword goBif len make new close closed cap map
|
||||
|
||||
" According to the language specification it is not garanteed to stay in the
|
||||
" language. See http://golang.org/doc/go_spec.html#Bootstrapping
|
||||
syn keyword goBif Print Println Printf Sprintf Scanln
|
||||
" Changed print[ln] to Print[ln] ^^^
|
||||
|
||||
syn keyword goBif panic panicln main
|
||||
|
||||
" Comments
|
||||
syn keyword goTodo contained TODO FIXME XXX
|
||||
syn match goLineComment "\/\/.*" contains=@Spell,goTodo
|
||||
syn match goCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
|
||||
syn region goComment start="/\*" end="\*/" contains=@Spell,goTodo
|
||||
|
||||
" Numerals
|
||||
syn case ignore
|
||||
"integer number, or floating point number without a dot and with "f".
|
||||
syn match goNumbers display transparent "\<\d\|\.\d" contains=goNumber,goFloat,goOctError,goOct
|
||||
syn match goNumbersCom display contained transparent "\<\d\|\.\d" contains=goNumber,goFloat,goOct
|
||||
syn match goNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
|
||||
" hex number
|
||||
syn match goNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
|
||||
" oct number
|
||||
syn match goOct display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=goOctZero
|
||||
syn match goOctZero display contained "\<0"
|
||||
|
||||
syn match goFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\="
|
||||
syn match goFloat display contained "\d\+e[-+]\=\d\=\>"
|
||||
syn match goFloat display "\(\.[0-9_]\+\)\(e[-+]\=[0-9_]\+\)\=[fl]\=i\=\>"
|
||||
|
||||
" Literals
|
||||
syn region goString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
|
||||
|
||||
syn match goSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
|
||||
syn match goCharacter "L\='[^\\]'"
|
||||
syn match goCharacter "L'[^']*'" contains=goSpecial
|
||||
|
||||
|
||||
hi def link goStatement Statement
|
||||
hi def link goClause Preproc
|
||||
hi def link goConditional Conditional
|
||||
hi def link goBranch Conditional
|
||||
hi def link goLabel Label
|
||||
hi def link goRepeat Repeat
|
||||
hi def link goType Type
|
||||
hi def link goConcurrent Statement
|
||||
hi def link goValue Constant
|
||||
hi def link goBoolean Type
|
||||
" Changed goBoolean link from Boolean to Keyword
|
||||
" Changed goBoolean link from Keyword to Type
|
||||
hi def link goConstant Constant
|
||||
hi def link goBif Function
|
||||
hi def link goTodo Todo
|
||||
hi def link goLineComment goComment
|
||||
hi def link goComment Comment
|
||||
hi def link goNumbers Number
|
||||
hi def link goNumbersCom Number
|
||||
hi def link goNumber Number
|
||||
hi def link goFloat Float
|
||||
hi def link goOct Number
|
||||
hi def link goOctZero Number
|
||||
hi def link goString String
|
||||
hi def link goSpecial Special
|
||||
hi def link goCharacter Character
|
||||
|
||||
|
||||
let b:current_syntax = "go"
|
||||
@@ -1,283 +0,0 @@
|
||||
" ====================================================================
|
||||
" Auth: jontino
|
||||
" Lang: Providence
|
||||
" Revn: 04-17-2023 1.0
|
||||
" Func: Define syntax coloring for .prv files when being edited in Vim
|
||||
"
|
||||
" TODO: begin writing, add new words
|
||||
" ====================================================================
|
||||
" CHANGE LOG
|
||||
" --------------------------------------------------------------------
|
||||
" 02-13-2023: copied from txt.vim
|
||||
" 04-17-2023: completed
|
||||
"
|
||||
" ====================================================================
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
" Required fields
|
||||
" Comments
|
||||
" header comments # Green
|
||||
" single line comments // Cyan
|
||||
" in/multi line comments /* ... */ Cyan
|
||||
"
|
||||
" Quotes
|
||||
" must work multiline
|
||||
" Gray? LightRed?
|
||||
" Names
|
||||
" each type of character gets a different color
|
||||
" Good
|
||||
" Green
|
||||
" Evil
|
||||
" DarkRed
|
||||
" Neutral/Background
|
||||
" Blue
|
||||
" Places
|
||||
" Words
|
||||
" Latin-derived words
|
||||
" LightBlue
|
||||
" Germanic words
|
||||
" LightGreen
|
||||
" Russian words
|
||||
" Red
|
||||
" Russo-Germanic words
|
||||
" Brown
|
||||
"
|
||||
|
||||
|
||||
|
||||
" XXX Dates:
|
||||
" Date highlighting for the Change Log
|
||||
" the first and last quote define the expression
|
||||
" \d is any digit [0-9]
|
||||
" \{1,2} matches 1 or 2 times, although it should only ever get 2
|
||||
" - literal hyphen, which seperates months, days, and years
|
||||
" The same three elements are repeated again for the days
|
||||
" \d is any digit, used again for the years
|
||||
" \{4} for only four digits can be matched
|
||||
" ends with : because only dates in change log should be highlighted
|
||||
" marked as contained, as it should only be highlighted in comments
|
||||
" contains colon, so I can highlight the color separately
|
||||
" for some reason, the colon doesn't work as keyword, so simple match
|
||||
syn match date "\d\{1,2}-\d\{1,2}-\d\{4}:" contained contains=colon
|
||||
syn match colon ":" contained
|
||||
|
||||
|
||||
|
||||
" XXX Comments:
|
||||
" comments come after #
|
||||
" eg| not comment # now a comment
|
||||
" # comment
|
||||
" not a comment
|
||||
" not
|
||||
" not
|
||||
" ### comment
|
||||
"
|
||||
" first and last quote define the expression
|
||||
" # can come literally, because it doesn't need escaping
|
||||
" . is every non-new line character possible
|
||||
" * matches as many matches as possible
|
||||
" i.e. a pound sign, and then as many characters as possible
|
||||
syn match header "#.*" contains=commentFields,commentTodo,date,names,germ,rus,latin,rusgerm
|
||||
syn match SLcomment "//.*" contains=names,germ,rus,latin,rusgerm
|
||||
syn region ILMLcomment start="/\*" end="\*/" contains=names,germ,rus,latin,rusgerm
|
||||
" commentFields and commentTodo are contained within comments, so they
|
||||
" are as such in the definition of a comment, and listed as contained
|
||||
" in their own definitions
|
||||
" commentFields is match instead of keyword, will contain the space
|
||||
syn keyword commentFields contained Auth Revn File Func
|
||||
syn keyword commentTodo contained TODO todo Todo XXX FIXME
|
||||
syn match commentFields contained "CHANGE LOG"
|
||||
|
||||
|
||||
|
||||
" XXX Quotes:
|
||||
" quotes should exist between odd pairs of quotation marks
|
||||
" eg| "quote" not
|
||||
" "quote" not "quote"
|
||||
" "not
|
||||
" quote"
|
||||
" "quote only if the it rolls
|
||||
" over onto the next line"
|
||||
" Calling the quotation a region instead of pattern match makes it
|
||||
" easier to wrap around a new line
|
||||
" the first and last quote define the expression
|
||||
" \ escapes the next character, allowing \" to appear as a literal "
|
||||
" thus, start and end are both quotes, and the reqion can span lines
|
||||
syn region quote start="\"" end="\"" contains=names,germ,rus,latin,rusgerm
|
||||
" -- DEPRECATED --
|
||||
" the first and last quote define the expression
|
||||
" \ is the escape character, so \" means I want to look for a quote
|
||||
" . is every non-new line character possible
|
||||
" \{,} is \{0,infinity}, means I'm looking for between 0 and infinity
|
||||
" matches for the previous character, which is a wildcard, .
|
||||
" \{-,} will prioritize the smallest amount of matches possible
|
||||
" syn match quote "\".\{-,}\""
|
||||
" -- DEPRECATED --
|
||||
|
||||
|
||||
|
||||
" XXX Notes:
|
||||
" Allow for notes to be left with special highlighting
|
||||
" \c escapes the case, so search is entirely case insensitive
|
||||
" note are all literals
|
||||
" s\? will alow for either 0 or 1 of the character "s" to be matched,
|
||||
" essentially allowing for both notes and note
|
||||
" finally followed by a colon
|
||||
" nextgroup is the actual notes to be taken, as this is just the tag
|
||||
syn match noteTag "\cnotes\?:" nextgroup=notes
|
||||
" define notes as starting with space, ending with exclamation mark
|
||||
" if it's not denoted as contained, then the whole damn thing will be
|
||||
" highlighted
|
||||
syn region notes start=" " end="!" contained
|
||||
|
||||
|
||||
|
||||
" XXX Names:
|
||||
" Separated into three catergories: Good, Neutral, Bad
|
||||
" This taxonomy is pretty self-explanatory
|
||||
" keyword to the whole list of words
|
||||
" lmfao ignore case sensitivity to avoid writing things twice
|
||||
syn case ignore
|
||||
|
||||
syn keyword good dobra miro
|
||||
syn keyword neutral yaroslav
|
||||
syn keyword bad boris mstislav
|
||||
|
||||
|
||||
|
||||
" XXX Places:
|
||||
" Places! Just place names!
|
||||
" keyword to the whole list of words
|
||||
syn keyword place providence
|
||||
|
||||
|
||||
|
||||
" XXX Words:
|
||||
" Different types of words:
|
||||
" words referring to norway, russian, etc
|
||||
" Latin
|
||||
" Slavic
|
||||
" Germanic
|
||||
" Russo-Germanic
|
||||
|
||||
" Highlight norwegian shit green
|
||||
" Highlight Russian shit red
|
||||
|
||||
syn keyword latin constable
|
||||
|
||||
syn keyword slavic slava
|
||||
|
||||
syn keyword germanic reeve
|
||||
|
||||
syn keyword russogerm skazarktos
|
||||
|
||||
syn keyword norwegian nordic nordics
|
||||
syn keyword norwegian norse
|
||||
syn keyword norwegian norway
|
||||
syn keyword norwegian norge
|
||||
syn keyword norwegian norsk
|
||||
syn keyword norwegian norwegian norwegians
|
||||
|
||||
syn keyword russian russian russians
|
||||
syn keyword russian rusky ruskies
|
||||
syn keyword russian russia
|
||||
syn keyword russian slav slavs
|
||||
syn keyword russian slavic
|
||||
syn case match
|
||||
" lmfao and turn the case sensitivity back on
|
||||
|
||||
|
||||
|
||||
|
||||
" keeping this as it might be useful later
|
||||
" XXX Expressions:
|
||||
" highlight equations, formulas, expressions, etc
|
||||
" expressions: .* is any number of characters
|
||||
" = is literal
|
||||
" .* is any number of characters again
|
||||
" added spaces around = to avoid confusion with =>
|
||||
"
|
||||
" the idea is that it's stuff that equals stuff, and we
|
||||
" worry about what it is later
|
||||
" name: \c case-escapes the sequence
|
||||
" \a is alphabetic characters, probably don't need escaping
|
||||
" \+ is at least 1 match, so it's 1 or more letters is a name
|
||||
" name: \c\a\= is 0 or 1 case-escaped alphabetic characters
|
||||
" _ is literal, best I can get to subscripts
|
||||
" \a\+ is 1 or more case-escaped alphabetic characters
|
||||
" op: inside [] can allow for one choice from any contained characters
|
||||
" =, +, -, /, ^ are all literals for operations
|
||||
" \* escapes the * character, which is now multiplication
|
||||
" Num: see Numbers: below
|
||||
" FIXME try to make name into one thing, probably with \{,1}
|
||||
|
||||
|
||||
" ColorGuide: ctermfg and ctermbg args - - - - source:: :help cterm
|
||||
" Black
|
||||
" LightBlue/Cyan/LightCyan, Blue/DarkBlue/DarkCyan
|
||||
" Green/LightGreen, DarkGreen
|
||||
" Red/LightRed, DarkRed
|
||||
" Magenta/LightMagenta, DarkMagenta
|
||||
" Yellow/LightYellow, DarkYellow/Brown
|
||||
" White
|
||||
" Gray/LightGray, DarkGray
|
||||
" ColorGuide: ctermfg and ctermbg args - - - - source:: :help cterm
|
||||
" ColorGuide: - - - - - - - - - - - - - - - source:: :help group-name
|
||||
" Dates and fields in comments still use links for highlighting to get
|
||||
" access to 'term' arguments that don't want to load correctly, namely
|
||||
" Underline -> PreProc (Magenta in default colo), with underline
|
||||
" ColorGuide: - - - - - - - - - - - - - - - source:: :help group-name
|
||||
|
||||
|
||||
" XXX Coloring:
|
||||
" hi[ghlight] <group> cterm=<style> ctermfg=<color> [ctermbg=<color>]
|
||||
" group is typically a user-made group
|
||||
" cterm is stuff like Underline and Bold
|
||||
" ctermfg is the foreground, or font color
|
||||
" ctermbg is the background color, or highlight color
|
||||
|
||||
" quotes are good
|
||||
hi quote ctermfg=DarkRed
|
||||
|
||||
" header comments are good
|
||||
hi header ctermfg=Green
|
||||
" leaving these as link because I like the color it sets
|
||||
" in theory... I could choose my own colors...
|
||||
"hi def link commentFields Underlined
|
||||
"hi def link date Underlined
|
||||
hi commentFields cterm=Underline ctermfg=Red
|
||||
hi date cterm=Underline ctermfg=Red
|
||||
|
||||
" comments are good
|
||||
hi SLcomment ctermfg=Cyan
|
||||
hi ILMLcomment ctermfg=Cyan
|
||||
hi colon ctermfg=Cyan
|
||||
hi commentTodo ctermfg=Black ctermbg=Yellow
|
||||
|
||||
" important notes
|
||||
" could probably do without this, tbh
|
||||
hi noteTag ctermfg=White ctermbg=Red
|
||||
hi notes ctermfg=White ctermbg=Red
|
||||
|
||||
" different types of characters get different colors
|
||||
hi good ctermfg=Green
|
||||
hi neutral ctermfg=Blue
|
||||
hi bad ctermfg=DarkRed
|
||||
|
||||
" places are underlined
|
||||
" maybe give places a color?
|
||||
hi place ctermfg=White cterm=Underline
|
||||
|
||||
" color words in different registers different colors
|
||||
hi germanic ctermfg=LightGreen
|
||||
hi slavic ctermfg=Red
|
||||
hi latin ctermfg=LightBlue
|
||||
hi russogerm ctermfg=Brown
|
||||
|
||||
let b:current_syntax = "prv"
|
||||
|
||||
@@ -1,385 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: Rust
|
||||
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
||||
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||
" Last Change: Feb 24, 2016
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Syntax definitions {{{1
|
||||
" Basic keywords {{{2
|
||||
syn keyword rustConditional match if else
|
||||
syn keyword rustRepeat loop while
|
||||
" `:syn match` must be used to prioritize highlighting `for` keyword.
|
||||
syn match rustRepeat /\<for\>/
|
||||
" Highlight `for` keyword in `impl ... for ... {}` statement. This line must
|
||||
" be put after previous `syn match` line to overwrite it.
|
||||
syn match rustKeyword /\%(\<impl\>.\+\)\@<=\<for\>/
|
||||
syn keyword rustRepeat in
|
||||
syn keyword rustTypedef type nextgroup=rustIdentifier skipwhite skipempty
|
||||
syn keyword rustStructure struct enum nextgroup=rustIdentifier skipwhite skipempty
|
||||
syn keyword rustUnion union nextgroup=rustIdentifier skipwhite skipempty contained
|
||||
syn match rustUnionContextual /\<union\_s\+\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*/ transparent contains=rustUnion
|
||||
syn keyword rustOperator as
|
||||
syn keyword rustExistential existential nextgroup=rustTypedef skipwhite skipempty contained
|
||||
syn match rustExistentialContextual /\<existential\_s\+type/ transparent contains=rustExistential,rustTypedef
|
||||
|
||||
syn match rustAssert "\<assert\(\w\)*!" contained
|
||||
syn match rustPanic "\<panic\(\w\)*!" contained
|
||||
syn match rustAsync "\<async\%(\s\|\n\)\@="
|
||||
syn keyword rustKeyword break
|
||||
syn keyword rustKeyword box
|
||||
syn keyword rustKeyword continue
|
||||
syn keyword rustKeyword crate
|
||||
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
|
||||
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
|
||||
syn keyword rustKeyword impl let
|
||||
syn keyword rustKeyword macro
|
||||
syn keyword rustKeyword pub nextgroup=rustPubScope skipwhite skipempty
|
||||
syn keyword rustKeyword return
|
||||
syn keyword rustKeyword yield
|
||||
syn keyword rustSuper super
|
||||
syn keyword rustKeyword where
|
||||
syn keyword rustUnsafeKeyword unsafe
|
||||
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
||||
" FIXME: Scoped impl's name is also fallen in this category
|
||||
syn keyword rustKeyword mod trait nextgroup=rustIdentifier skipwhite skipempty
|
||||
syn keyword rustStorage move mut ref static const
|
||||
syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/
|
||||
syn keyword rustAwait await
|
||||
syn match rustKeyword /\<try\>!\@!/ display
|
||||
|
||||
syn keyword rustPubScopeCrate crate contained
|
||||
syn match rustPubScopeDelim /[()]/ contained
|
||||
syn match rustPubScope /([^()]*)/ contained contains=rustPubScopeDelim,rustPubScopeCrate,rustSuper,rustModPath,rustModPathSep,rustSelf transparent
|
||||
|
||||
syn keyword rustExternCrate crate contained nextgroup=rustIdentifier,rustExternCrateString skipwhite skipempty
|
||||
" This is to get the `bar` part of `extern crate "foo" as bar;` highlighting.
|
||||
syn match rustExternCrateString /".*"\_s*as/ contained nextgroup=rustIdentifier skipwhite transparent skipempty contains=rustString,rustOperator
|
||||
syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty
|
||||
|
||||
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||
syn match rustFuncName "\%(r#\)\=\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||
|
||||
syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end="),\=[*+]" contains=TOP
|
||||
syn match rustMacroVariable "$\w\+"
|
||||
syn match rustRawIdent "\<r#\h\w*" contains=NONE
|
||||
|
||||
" Reserved (but not yet used) keywords {{{2
|
||||
syn keyword rustReservedKeyword become do priv typeof unsized abstract virtual final override
|
||||
|
||||
" Built-in types {{{2
|
||||
syn keyword rustType isize usize char bool u8 u16 u32 u64 u128 f32
|
||||
syn keyword rustType f64 i8 i16 i32 i64 i128 str Self
|
||||
|
||||
" Things from the libstd v1 prelude (src/libstd/prelude/v1.rs) {{{2
|
||||
" This section is just straight transformation of the contents of the prelude,
|
||||
" to make it easy to update.
|
||||
|
||||
" Reexported core operators {{{3
|
||||
syn keyword rustTrait Copy Send Sized Sync
|
||||
syn keyword rustTrait Drop Fn FnMut FnOnce
|
||||
|
||||
" Reexported functions {{{3
|
||||
" There’s no point in highlighting these; when one writes drop( or drop::< it
|
||||
" gets the same highlighting anyway, and if someone writes `let drop = …;` we
|
||||
" don’t really want *that* drop to be highlighted.
|
||||
"syn keyword rustFunction drop
|
||||
|
||||
" Reexported types and traits {{{3
|
||||
syn keyword rustTrait Box
|
||||
syn keyword rustTrait ToOwned
|
||||
syn keyword rustTrait Clone
|
||||
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
||||
syn keyword rustTrait AsRef AsMut Into From
|
||||
syn keyword rustTrait Default
|
||||
syn keyword rustTrait Iterator Extend IntoIterator
|
||||
syn keyword rustTrait DoubleEndedIterator ExactSizeIterator
|
||||
syn keyword rustEnum Option
|
||||
syn keyword rustEnumVariant Some None
|
||||
syn keyword rustEnum Result
|
||||
syn keyword rustEnumVariant Ok Err
|
||||
syn keyword rustTrait SliceConcatExt
|
||||
syn keyword rustTrait String ToString
|
||||
syn keyword rustTrait Vec
|
||||
|
||||
" Other syntax {{{2
|
||||
syn keyword rustSelf self
|
||||
syn keyword rustBoolean true false
|
||||
|
||||
" If foo::bar changes to foo.bar, change this ("::" to "\.").
|
||||
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
|
||||
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
|
||||
syn match rustModPathSep "::"
|
||||
|
||||
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
|
||||
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
|
||||
|
||||
" This is merely a convention; note also the use of [A-Z], restricting it to
|
||||
" latin identifiers rather than the full Unicode uppercase. I have not used
|
||||
" [:upper:] as it depends upon 'noignorecase'
|
||||
"syn match rustCapsIdent display "[A-Z]\w\(\w\)*"
|
||||
|
||||
syn match rustOperator display "\%(+\|-\|/\|*\|=\|\^\|&\||\|!\|>\|<\|%\)=\?"
|
||||
" This one isn't *quite* right, as we could have binary-& with a reference
|
||||
syn match rustSigil display /&\s\+[&~@*][^)= \t\r\n]/he=e-1,me=e-1
|
||||
syn match rustSigil display /[&~@*][^)= \t\r\n]/he=e-1,me=e-1
|
||||
" This isn't actually correct; a closure with no arguments can be `|| { }`.
|
||||
" Last, because the & in && isn't a sigil
|
||||
syn match rustOperator display "&&\|||"
|
||||
" This is rustArrowCharacter rather than rustArrow for the sake of matchparen,
|
||||
" so it skips the ->; see http://stackoverflow.com/a/30309949 for details.
|
||||
syn match rustArrowCharacter display "->"
|
||||
syn match rustQuestionMark display "?\([a-zA-Z]\+\)\@!"
|
||||
|
||||
syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustPanic
|
||||
syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic
|
||||
|
||||
syn match rustEscapeError display contained /\\./
|
||||
syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
|
||||
syn match rustEscapeUnicode display contained /\\u{\%(\x_*\)\{1,6}}/
|
||||
syn match rustStringContinuation display contained /\\\n\s*/
|
||||
syn region rustString matchgroup=rustStringDelimiter start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
|
||||
syn region rustString matchgroup=rustStringDelimiter start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
||||
syn region rustString matchgroup=rustStringDelimiter start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
|
||||
|
||||
" Match attributes with either arbitrary syntax or special highlighting for
|
||||
" derives. We still highlight strings and comments inside of the attribute.
|
||||
syn region rustAttribute start="#!\?\[" end="\]" contains=@rustAttributeContents,rustAttributeParenthesizedParens,rustAttributeParenthesizedCurly,rustAttributeParenthesizedBrackets,rustDerive
|
||||
syn region rustAttributeParenthesizedParens matchgroup=rustAttribute start="\w\%(\w\)*("rs=e end=")"re=s transparent contained contains=rustAttributeBalancedParens,@rustAttributeContents
|
||||
syn region rustAttributeParenthesizedCurly matchgroup=rustAttribute start="\w\%(\w\)*{"rs=e end="}"re=s transparent contained contains=rustAttributeBalancedCurly,@rustAttributeContents
|
||||
syn region rustAttributeParenthesizedBrackets matchgroup=rustAttribute start="\w\%(\w\)*\["rs=e end="\]"re=s transparent contained contains=rustAttributeBalancedBrackets,@rustAttributeContents
|
||||
syn region rustAttributeBalancedParens matchgroup=rustAttribute start="("rs=e end=")"re=s transparent contained contains=rustAttributeBalancedParens,@rustAttributeContents
|
||||
syn region rustAttributeBalancedCurly matchgroup=rustAttribute start="{"rs=e end="}"re=s transparent contained contains=rustAttributeBalancedCurly,@rustAttributeContents
|
||||
syn region rustAttributeBalancedBrackets matchgroup=rustAttribute start="\["rs=e end="\]"re=s transparent contained contains=rustAttributeBalancedBrackets,@rustAttributeContents
|
||||
syn cluster rustAttributeContents contains=rustString,rustCommentLine,rustCommentBlock,rustCommentLineDocError,rustCommentBlockDocError
|
||||
syn region rustDerive start="derive(" end=")" contained contains=rustDeriveTrait
|
||||
" This list comes from src/libsyntax/ext/deriving/mod.rs
|
||||
" Some are deprecated (Encodable, Decodable) or to be removed after a new snapshot (Show).
|
||||
syn keyword rustDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy
|
||||
|
||||
" dyn keyword: It's only a keyword when used inside a type expression, so
|
||||
" we make effort here to highlight it only when Rust identifiers follow it
|
||||
" (not minding the case of pre-2018 Rust where a path starting with :: can
|
||||
" follow).
|
||||
"
|
||||
" This is so that uses of dyn variable names such as in 'let &dyn = &2'
|
||||
" and 'let dyn = 2' will not get highlighted as a keyword.
|
||||
syn match rustKeyword "\<dyn\ze\_s\+\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)" contains=rustDynKeyword
|
||||
syn keyword rustDynKeyword dyn contained
|
||||
|
||||
" Number literals
|
||||
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
|
||||
" Special case for numbers of the form "1." which are float literals, unless followed by
|
||||
" an identifier, which makes them integer literals with a method call or field access,
|
||||
" or by another ".", which makes them integer literals followed by the ".." token.
|
||||
" (This must go first so the others take precedence.)
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\|\.\)\@!"
|
||||
" To mark a number as a normal float, it must have at least one of the three things integral values don't have:
|
||||
" a decimal point and more numbers; an exponent; and a type suffix.
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\(f32\|f64\)\="
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)"
|
||||
|
||||
" For the benefit of delimitMate
|
||||
syn region rustLifetimeCandidate display start=/&'\%(\([^'\\]\|\\\(['nrt0\\\"]\|x\x\{2}\|u{\%(\x_*\)\{1,6}}\)\)'\)\@!/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime
|
||||
syn region rustGenericRegion display start=/<\%('\|[^[:cntrl:][:space:][:punct:]]\)\@=')\S\@=/ end=/>/ contains=rustGenericLifetimeCandidate
|
||||
syn region rustGenericLifetimeCandidate display start=/\%(<\|,\s*\)\@<='/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime
|
||||
|
||||
"rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting
|
||||
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
|
||||
syn match rustLabel display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*:"
|
||||
syn match rustLabel display "\%(\<\%(break\|continue\)\s*\)\@<=\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
|
||||
syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
|
||||
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
|
||||
syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
||||
syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
|
||||
syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u{\%(\x_*\)\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
|
||||
|
||||
syn match rustShebang /\%^#![^[].*/
|
||||
syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
|
||||
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
|
||||
syn region rustCommentLineDocError start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell contained
|
||||
syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell
|
||||
syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNest,rustCommentBlockDocRustCode,@Spell
|
||||
syn region rustCommentBlockDocError matchgroup=rustCommentBlockDocError start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained
|
||||
syn region rustCommentBlockNest matchgroup=rustCommentBlock start="/\*" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell contained transparent
|
||||
syn region rustCommentBlockDocNest matchgroup=rustCommentBlockDoc start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell contained transparent
|
||||
syn region rustCommentBlockDocNestError matchgroup=rustCommentBlockDocError start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained transparent
|
||||
|
||||
" FIXME: this is a really ugly and not fully correct implementation. Most
|
||||
" importantly, a case like ``/* */*`` should have the final ``*`` not being in
|
||||
" a comment, but in practice at present it leaves comments open two levels
|
||||
" deep. But as long as you stay away from that particular case, I *believe*
|
||||
" the highlighting is correct. Due to the way Vim's syntax engine works
|
||||
" (greedy for start matches, unlike Rust's tokeniser which is searching for
|
||||
" the earliest-starting match, start or end), I believe this cannot be solved.
|
||||
" Oh you who would fix it, don't bother with things like duplicating the Block
|
||||
" rules and putting ``\*\@<!`` at the start of them; it makes it worse, as
|
||||
" then you must deal with cases like ``/*/**/*/``. And don't try making it
|
||||
" worse with ``\%(/\@<!\*\)\@<!``, either...
|
||||
|
||||
syn keyword rustTodo contained TODO FIXME XXX NB NOTE SAFETY
|
||||
|
||||
" asm! macro {{{2
|
||||
syn region rustAsmMacro matchgroup=rustMacro start="\<asm!\s*(" end=")" contains=rustAsmDirSpec,rustAsmSym,rustAsmConst,rustAsmOptionsGroup,rustComment.*,rustString.*
|
||||
|
||||
" Clobbered registers
|
||||
syn keyword rustAsmDirSpec in out lateout inout inlateout contained nextgroup=rustAsmReg skipwhite skipempty
|
||||
syn region rustAsmReg start="(" end=")" contained contains=rustString
|
||||
|
||||
" Symbol operands
|
||||
syn keyword rustAsmSym sym contained nextgroup=rustAsmSymPath skipwhite skipempty
|
||||
syn region rustAsmSymPath start="\S" end=",\|)"me=s-1 contained contains=rustComment.*,rustIdentifier
|
||||
|
||||
" Const
|
||||
syn region rustAsmConstBalancedParens start="("ms=s+1 end=")" contained contains=@rustAsmConstExpr
|
||||
syn cluster rustAsmConstExpr contains=rustComment.*,rust.*Number,rustString,rustAsmConstBalancedParens
|
||||
syn region rustAsmConst start="const" end=",\|)"me=s-1 contained contains=rustStorage,@rustAsmConstExpr
|
||||
|
||||
" Options
|
||||
syn region rustAsmOptionsGroup start="options\s*(" end=")" contained contains=rustAsmOptions,rustAsmOptionsKey
|
||||
syn keyword rustAsmOptionsKey options contained
|
||||
syn keyword rustAsmOptions pure nomem readonly preserves_flags noreturn nostack att_syntax contained
|
||||
|
||||
" Folding rules {{{2
|
||||
" Trivial folding rules to begin with.
|
||||
" FIXME: use the AST to make really good folding
|
||||
syn region rustFoldBraces start="{" end="}" transparent fold
|
||||
|
||||
if !exists("b:current_syntax_embed")
|
||||
let b:current_syntax_embed = 1
|
||||
syntax include @RustCodeInComment <sfile>:p:h/rust.vim
|
||||
unlet b:current_syntax_embed
|
||||
|
||||
" Currently regions marked as ```<some-other-syntax> will not get
|
||||
" highlighted at all. In the future, we can do as vim-markdown does and
|
||||
" highlight with the other syntax. But for now, let's make sure we find
|
||||
" the closing block marker, because the rules below won't catch it.
|
||||
syn region rustCommentLinesDocNonRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\).\+$' end='^\z1$' keepend contains=rustCommentLineDoc
|
||||
|
||||
" We borrow the rules from rust’s src/librustdoc/html/markdown.rs, so that
|
||||
" we only highlight as Rust what it would perceive as Rust (almost; it’s
|
||||
" possible to trick it if you try hard, and indented code blocks aren’t
|
||||
" supported because Markdown is a menace to parse and only mad dogs and
|
||||
" Englishmen would try to handle that case correctly in this syntax file).
|
||||
syn region rustCommentLinesDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\|edition201[58]\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment,rustCommentLineDocLeader
|
||||
syn region rustCommentBlockDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\%(\s*\*\)\?\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\|edition201[58]\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment,rustCommentBlockDocStar
|
||||
" Strictly, this may or may not be correct; this code, for example, would
|
||||
" mishighlight:
|
||||
"
|
||||
" /**
|
||||
" ```rust
|
||||
" println!("{}", 1
|
||||
" * 1);
|
||||
" ```
|
||||
" */
|
||||
"
|
||||
" … but I don’t care. Balance of probability, and all that.
|
||||
syn match rustCommentBlockDocStar /^\s*\*\s\?/ contained
|
||||
syn match rustCommentLineDocLeader "^\s*//\%(//\@!\|!\)" contained
|
||||
endif
|
||||
|
||||
" Default highlighting {{{1
|
||||
hi def link rustDecNumber rustNumber
|
||||
hi def link rustHexNumber rustNumber
|
||||
hi def link rustOctNumber rustNumber
|
||||
hi def link rustBinNumber rustNumber
|
||||
hi def link rustIdentifierPrime rustIdentifier
|
||||
hi def link rustTrait rustType
|
||||
hi def link rustDeriveTrait rustTrait
|
||||
|
||||
hi def link rustMacroRepeatDelimiters Macro
|
||||
hi def link rustMacroVariable Define
|
||||
hi def link rustSigil StorageClass
|
||||
hi def link rustEscape Special
|
||||
hi def link rustEscapeUnicode rustEscape
|
||||
hi def link rustEscapeError Error
|
||||
hi def link rustStringContinuation Special
|
||||
hi def link rustString String
|
||||
hi def link rustStringDelimiter String
|
||||
hi def link rustCharacterInvalid Error
|
||||
hi def link rustCharacterInvalidUnicode rustCharacterInvalid
|
||||
hi def link rustCharacter Character
|
||||
hi def link rustNumber Number
|
||||
hi def link rustBoolean Boolean
|
||||
hi def link rustEnum rustType
|
||||
hi def link rustEnumVariant rustConstant
|
||||
hi def link rustConstant Constant
|
||||
hi def link rustSelf Constant
|
||||
hi def link rustFloat Float
|
||||
hi def link rustArrowCharacter rustOperator
|
||||
hi def link rustOperator Operator
|
||||
hi def link rustKeyword Keyword
|
||||
hi def link rustDynKeyword rustKeyword
|
||||
hi def link rustTypedef Keyword " More precise is Typedef, but it doesn't feel right for Rust
|
||||
hi def link rustStructure Keyword " More precise is Structure
|
||||
hi def link rustUnion rustStructure
|
||||
hi def link rustExistential rustKeyword
|
||||
hi def link rustPubScopeDelim Delimiter
|
||||
hi def link rustPubScopeCrate rustKeyword
|
||||
hi def link rustSuper rustKeyword
|
||||
hi def link rustUnsafeKeyword Exception
|
||||
hi def link rustReservedKeyword Error
|
||||
hi def link rustRepeat Conditional
|
||||
hi def link rustConditional Conditional
|
||||
hi def link rustIdentifier Identifier
|
||||
hi def link rustCapsIdent rustIdentifier
|
||||
hi def link rustModPath Include
|
||||
hi def link rustModPathSep Delimiter
|
||||
hi def link rustFunction Function
|
||||
hi def link rustFuncName Function
|
||||
hi def link rustFuncCall Function
|
||||
hi def link rustShebang Comment
|
||||
hi def link rustCommentLine Comment
|
||||
hi def link rustCommentLineDoc SpecialComment
|
||||
hi def link rustCommentLineDocLeader rustCommentLineDoc
|
||||
hi def link rustCommentLineDocError Error
|
||||
hi def link rustCommentBlock rustCommentLine
|
||||
hi def link rustCommentBlockDoc rustCommentLineDoc
|
||||
hi def link rustCommentBlockDocStar rustCommentBlockDoc
|
||||
hi def link rustCommentBlockDocError Error
|
||||
hi def link rustCommentDocCodeFence rustCommentLineDoc
|
||||
hi def link rustAssert PreCondit
|
||||
hi def link rustPanic PreCondit
|
||||
hi def link rustMacro Macro
|
||||
hi def link rustType Type
|
||||
hi def link rustTodo Todo
|
||||
hi def link rustAttribute PreProc
|
||||
hi def link rustDerive PreProc
|
||||
hi def link rustDefault StorageClass
|
||||
hi def link rustStorage StorageClass
|
||||
hi def link rustObsoleteStorage Error
|
||||
hi def link rustLifetime Special
|
||||
hi def link rustLabel Label
|
||||
hi def link rustExternCrate rustKeyword
|
||||
hi def link rustObsoleteExternMod Error
|
||||
hi def link rustQuestionMark Special
|
||||
hi def link rustAsync rustKeyword
|
||||
hi def link rustAwait rustKeyword
|
||||
hi def link rustAsmDirSpec rustKeyword
|
||||
hi def link rustAsmSym rustKeyword
|
||||
hi def link rustAsmOptions rustKeyword
|
||||
hi def link rustAsmOptionsKey rustAttribute
|
||||
|
||||
" Other Suggestions:
|
||||
" hi rustAttribute ctermfg=cyan
|
||||
" hi rustDerive ctermfg=cyan
|
||||
" hi rustAssert ctermfg=yellow
|
||||
" hi rustPanic ctermfg=red
|
||||
" hi rustMacro ctermfg=magenta
|
||||
|
||||
"syn sync minlines=200
|
||||
"syn sync maxlines=500
|
||||
|
||||
let b:current_syntax = "rust"
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
@@ -1,37 +0,0 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: test.prv
|
||||
# Revn: 04-17-2023 1.0
|
||||
# Func: show all of the functions of the prv syntax highlighting
|
||||
#
|
||||
# TODO: update as needed
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 04-17-2023: wrote and commented
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
// we out here in that single line comment
|
||||
|
||||
/* in-line comment */ un highlighted, not in brackets
|
||||
|
||||
/* also functions as a
|
||||
multiline comment */ notice how this is not highlighted
|
||||
|
||||
// archie nicknames
|
||||
archie chach chibo
|
||||
|
||||
// olly nicknames
|
||||
olly olly bolly bear
|
||||
Oliver Boliver Rockford Gubbins
|
||||
|
||||
// both
|
||||
sink boy
|
||||
of sealaND
|
||||
|
||||
// parents
|
||||
mom and dad
|
||||
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: test.prv
|
||||
# Revn: 04-17-2023 1.0
|
||||
# Func: show all of the functions of the prv syntax highlighting
|
||||
#
|
||||
# TODO: update as needed
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 04-17-2023: wrote and commented
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
// we out here in that single line comment
|
||||
|
||||
/* in-line comment */ un highlighted, not in brackets
|
||||
|
||||
/* also functions as a
|
||||
multiline comment */ notice how this is not highlighted
|
||||
|
||||
// bad people names
|
||||
mstislav Mstislav Boris boris
|
||||
// neutral people names
|
||||
yaroslav Yaroslav
|
||||
// good people names
|
||||
miro Miro Dobra dobra
|
||||
|
||||
// place names :)
|
||||
Providence
|
||||
|
||||
|
||||
// latin word, german word
|
||||
constable reeve
|
||||
// russogermanic, slavic
|
||||
skazarktos slava
|
||||
@@ -1,53 +0,0 @@
|
||||
# ====================================================================
|
||||
# Auth: dodd
|
||||
# File: template.txt
|
||||
# Revn: 10-16-2020 1.0
|
||||
# Func: Demonstrate everything the text syntax file can do
|
||||
#
|
||||
# TODO: create
|
||||
# ====================================================================
|
||||
# CHANGE LOG
|
||||
# --------------------------------------------------------------------
|
||||
# 10-16-2020: init
|
||||
#
|
||||
# ====================================================================
|
||||
|
||||
|
||||
Attribute:: explanation for a little while, really how ever long you
|
||||
want it to go on for. The double quote marks this text as
|
||||
a property. For the time being, this text also serves as
|
||||
the body, and is really hard to properly color
|
||||
-> this marks a field. This is the first field, field 1
|
||||
# this is a comment. below this is field 2
|
||||
-> here's field 2, the second field
|
||||
=> this is also a field, field 3
|
||||
==> fields can be "indented" to acknowledge that things are
|
||||
subortinate to the prior
|
||||
---> check out that quote
|
||||
-> "Ask not what your country can do for you, but what you
|
||||
can do for your country" - Old Man
|
||||
-> "I made numbers like 5 highlight differently in quotes"
|
||||
|
||||
(1) Fs = 2 * f_max
|
||||
(2) x = e^(j*2*pi*f*t)
|
||||
|
||||
==> See above in (1) where I have defined the Nyquist
|
||||
Sampling Theorem. Expressions only highlight when there
|
||||
is at least one space before and after the equal sign.
|
||||
Adding this kept it from highlighting the ==> arrows
|
||||
==> In (2), we can see that e, j (also i), and pi are seen as
|
||||
numbers
|
||||
|
||||
NOTE: I added this next part for fun!
|
||||
-> I want to live in Norway, I wish I was Norwegian, I want
|
||||
to be Norse, in Norge, Speaking Norsk like the Norwegians
|
||||
-> Or perhaps live in Russia, be Russian, a slav, and speak
|
||||
a slavic language like the Ruskies
|
||||
note: anything between "note:" and ! will be highlighted
|
||||
NoTe: the trigger is case insensitive!
|
||||
|
||||
-> whatever <this> is, I'm not sure yet, but it does it
|
||||
--> also contains <numb3rs>
|
||||
|
||||
|
||||
|
||||
@@ -1,297 +0,0 @@
|
||||
" ====================================================================
|
||||
" Auth: dodd
|
||||
" Lang: Text
|
||||
" Revn: 10-16-2020 1.5
|
||||
" Func: Define syntax coloring for .txt files when being edited in Vim
|
||||
"
|
||||
" TODO: make comments create new comments on line overrun and newline
|
||||
" add highlighting for titles, vocab words, definitions
|
||||
" create a better template file showing all the highlighting
|
||||
" get term=underline working to avoid using link statements
|
||||
" ====================================================================
|
||||
" CHANGE LOG
|
||||
" --------------------------------------------------------------------
|
||||
" 09-29-2020: copy over from go.vim
|
||||
" 10-01-2020: gutted entire file
|
||||
" made my own quote regex
|
||||
" made comment
|
||||
" added link to list of group names and their colors
|
||||
" 10-02-2020: rewrote quotes to allow multiline quotes with rollover
|
||||
" added recognition for numbers
|
||||
" separated numbers into numbers and numbers in quotes
|
||||
" added date recognition, underlines dates in change log
|
||||
" made comments recognize Auth, Lang, Revn, Func, Todo
|
||||
" underline Auth, Lang, Revn, Func, Todo, and Change Log
|
||||
" recognized fields, the field delimiter (::), and
|
||||
" property delimiter (->)
|
||||
" added tags for notes to self, and the body of such
|
||||
" began writing something to passively color body
|
||||
" colored things Norse things green, and Russian red
|
||||
" added Color Guide, and source
|
||||
" changed some colors up a bit
|
||||
" made property delimiter of variable length, also use =>
|
||||
" 10-03-2020: added reminded to color explicitly in Todo
|
||||
" 10-11-2020: replaced most links with explicit ctermfg statements
|
||||
" added expressions, names, operations
|
||||
" changed some colors up a bit
|
||||
" shortened lines down to <= 70 characters
|
||||
" 10-16-2020: added Norge to norwegian words
|
||||
" added spaces around = in expression to avoid confusion
|
||||
" with => marker
|
||||
" changed noteTag color from DkRed to Red to match notes
|
||||
" added <> region
|
||||
" added i, j, e, pi as numbers
|
||||
"
|
||||
" ====================================================================
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
" XXX Expressions:
|
||||
" highlight equations, formulas, expressions, etc
|
||||
" expressions: .* is any number of characters
|
||||
" = is literal
|
||||
" .* is any number of characters again
|
||||
" added spaces around = to avoid confusion with =>
|
||||
"
|
||||
" the idea is that it's stuff that equals stuff, and we
|
||||
" worry about what it is later
|
||||
" name: \c case-escapes the sequence
|
||||
" \a is alphabetic characters, probably don't need escaping
|
||||
" \+ is at least 1 match, so it's 1 or more letters is a name
|
||||
" name: \c\a\= is 0 or 1 case-escaped alphabetic characters
|
||||
" _ is literal, best I can get to subscripts
|
||||
" \a\+ is 1 or more case-escaped alphabetic characters
|
||||
" op: inside [] can allow for one choice from any contained characters
|
||||
" =, +, -, /, ^ are all literals for operations
|
||||
" \* escapes the * character, which is now multiplication
|
||||
" Num: see Numbers: below
|
||||
" FIXME try to make name into one thing, probably with \{,1}
|
||||
syn match expression ".* = .*" contains=name,op,num skipwhite
|
||||
syn match name "\c\a\+" contained
|
||||
syn match name "\c\a\=_\a\+" contained
|
||||
syn match op "[=+-/^\*]" contained
|
||||
|
||||
|
||||
" XXX Quotes:
|
||||
" quotes should exist between odd pairs of quotation marks
|
||||
" eg| "quote" not
|
||||
" "quote" not "quote"
|
||||
" "not
|
||||
" quote"
|
||||
" "quote only if the it rolls
|
||||
" over onto the next line"
|
||||
" Calling the quotation a region instead of pattern match makes it
|
||||
" easier to wrap around a new line
|
||||
" the first and last quote define the expression
|
||||
" \ escapes the next character, allowing \" to appear as a literal "
|
||||
" thus, start and end are both quotes, and the reqion can span lines
|
||||
" added contains num on the off chance I want to embed a number
|
||||
" added contains for norwegian and russian for the hell of it
|
||||
syn region quote start="\"" end="\"" contains=numQuote,norwegian,russian
|
||||
" -- DEPRECATED --
|
||||
" the first and last quote define the expression
|
||||
" \ is the escape character, so \" means I want to look for a quote
|
||||
" . is every non-new line character possible
|
||||
" \{,} is \{0,infinity}, means I'm looking for between 0 and infinity
|
||||
" matches for the previous character, which is a wildcard, .
|
||||
" \{-,} will prioritize the smallest amount of matches possible
|
||||
" syn match quote "\".\{-,}\""
|
||||
" -- DEPRECATED --
|
||||
|
||||
|
||||
" XXX Unnamed Field:
|
||||
" match, because it should really only span one line
|
||||
" < and > are literals
|
||||
" .* means any character any number of times
|
||||
" contains numQuote
|
||||
syn match unnamed "<.*>" contains=numQuote
|
||||
|
||||
|
||||
" XXX Numbers:
|
||||
" num and numQuote allow for the coloring of numbers. numQuote exists
|
||||
" for the sole purpose of coloring numbers differently for when
|
||||
" they're inside of a quote, thus the contained keyword for numQuote
|
||||
" the first and last quote define the expression
|
||||
" - is the negative symbol, \? allows for 0 or 1 matchings, which
|
||||
" allows for negative numbers
|
||||
" \d is any digit [0-9], \+ is 1 or more matches, which means there
|
||||
" MUST be at least one number for a match to be seen
|
||||
" \a is any letter [a-zA-Z], * allows any number of them for variables
|
||||
" \. escapes the . character so decimal points can be represented
|
||||
" \? allows 0 or 1 matches of \., because number only have 1 decimal
|
||||
" \d for numbers after the decimal
|
||||
" * for any number of matches, using \+ (one or more matches) would
|
||||
" have only allowed for 2 digit numbers minimum
|
||||
" i, j, e, pi are all common numbers
|
||||
syn match numQuote "-\?\d\+\a*\.\?\d*" contained
|
||||
syn keyword numQuote j i e pi contained
|
||||
syn match num "-\?\d\+\a*\.\?\d*"
|
||||
syn keyword num j i e pi
|
||||
|
||||
|
||||
|
||||
" XXX Dates:
|
||||
" Date highlighting for the Change Log
|
||||
" the first and last quote define the expression
|
||||
" \d is any digit [0-9]
|
||||
" \{1,2} matches 1 or 2 times, although it should only ever get 2
|
||||
" - literal hyphen, which seperates months, days, and years
|
||||
" The same three elements are repeated again for the days
|
||||
" \d is any digit, used again for the years
|
||||
" \{4} for only four digits can be matched
|
||||
" ends with : because only dates in change log should be highlighted
|
||||
" marked as contained, as it should only be highlighted in comments
|
||||
" contains colon, so I can highlight the color separately
|
||||
" for some reason, the colon doesn't work as keyword, so simple match
|
||||
syn match date "\d\{1,2}-\d\{1,2}-\d\{4}:" contained contains=colon
|
||||
syn match colon ":" contained
|
||||
|
||||
|
||||
" XXX Comments:
|
||||
" comments come after #
|
||||
" eg| not comment # now a comment
|
||||
" # comment
|
||||
" not a comment
|
||||
" not
|
||||
" not
|
||||
" ### comment
|
||||
"
|
||||
" first and last quote define the expression
|
||||
" # can come literally, because it doesn't need escaping
|
||||
" . is every non-new line character possible
|
||||
" * matches as many matches as possible
|
||||
" i.e. a pound sign, and then as many characters as possible
|
||||
syn match comments "#.*" contains=commentFields,commentTodo,date,norwegian,russian
|
||||
" commentFields and commentTodo are contained within comments, so they
|
||||
" are as such in the definition of a comment, and listed as contained
|
||||
" in their own definitions
|
||||
" commentFields is match instead of keyword, will contain the space
|
||||
syn keyword commentFields contained Auth Revn File Func
|
||||
syn keyword commentTodo contained TODO
|
||||
syn match commentFields contained "CHANGE LOG"
|
||||
|
||||
|
||||
" XXX Fields:
|
||||
" Denotes properties, things that are of importance
|
||||
" first and last quote define the expression
|
||||
" . is any character
|
||||
" * is any number of that character
|
||||
" :: is the literal characters '::', which denotes the property
|
||||
" Using nextgroup would have been better praxis, but this works
|
||||
" After, denote the delimiter as own syntax element to color uniquely
|
||||
" FIXME: make this better with nextgroup
|
||||
syn match fields ".*::" contains=delim
|
||||
syn match delim "::"
|
||||
|
||||
" XXX Properties:
|
||||
" Denotes a property of a field
|
||||
" -\+ is one or more hyphens
|
||||
" =\+ is one or more equals signs
|
||||
" > is a literal
|
||||
syn match properties "-\+>"
|
||||
syn match properties "=\+>"
|
||||
|
||||
|
||||
" XXX Notes:
|
||||
" Allow for notes to be left with special highlighting
|
||||
" \c escapes the case, so search is entirely case insensitive
|
||||
" note are all literals
|
||||
" s\? will alow for either 0 or 1 of the character "s" to be matched,
|
||||
" essentially allowing for both notes and note
|
||||
" finally followed by a colon
|
||||
" nextgroup is the actual notes to be taken, as this is just the tag
|
||||
syn match noteTag "\cnotes\?:" nextgroup=notes
|
||||
" define notes as starting with space, ending with exclamation mark
|
||||
" if it's not denoted as contained, then the whole damn thing will be
|
||||
" highlighted
|
||||
syn region notes start=" " end="!" contained
|
||||
|
||||
|
||||
" FIXME Body:
|
||||
" This is the rest of the text
|
||||
" I found out with notes, if this isn't given as contained, it'll just
|
||||
" highlight everything
|
||||
"syn region body start=" " end=" "
|
||||
|
||||
|
||||
" XXX Norwegian:
|
||||
" XXX Russian:
|
||||
" lmfao ignore case sensitivity to avoid writing things twice
|
||||
" Highlight norwegian shit green
|
||||
syn case ignore
|
||||
syn keyword norwegian nordic nordics
|
||||
syn keyword norwegian norse
|
||||
syn keyword norwegian norway
|
||||
syn keyword norwegian norge
|
||||
syn keyword norwegian norsk
|
||||
syn keyword norwegian norwegian norwegians
|
||||
" Highlight Russian shit red
|
||||
syn keyword russian russian russians
|
||||
syn keyword russian rusky ruskies
|
||||
syn keyword russian russia
|
||||
syn keyword russian slav slavs
|
||||
syn keyword russian slavic
|
||||
syn case match
|
||||
" lmfao and turn the case sensitivity back on
|
||||
|
||||
|
||||
|
||||
" ColorGuide: ctermfg and ctermbg args - - - - source:: :help cterm
|
||||
" Black
|
||||
" LightBlue/Cyan/LightCyan, Blue/DarkBlue/DarkCyan
|
||||
" Green/LightGreen, DarkGreen
|
||||
" Red/LightRed, DarkRed
|
||||
" Magenta/LightMagenta, DarkMagenta
|
||||
" Yellow/LightYellow, DarkYellow/Brown
|
||||
" White
|
||||
" Gray/LightGray, DarkGray
|
||||
" ColorGuide: ctermfg and ctermbg args - - - - source:: :help cterm
|
||||
" ColorGuide: - - - - - - - - - - - - - - - source:: :help group-name
|
||||
" Dates and fields in comments still use links for highlighting to get
|
||||
" access to 'term' arguments that don't want to load correctly, namely
|
||||
" Underline -> PreProc (Magenta in default colo), with underline
|
||||
" ColorGuide: - - - - - - - - - - - - - - - source:: :help group-name
|
||||
|
||||
|
||||
" XXX Coloring:
|
||||
" hi[ghlight] <group> ctermfg=<color> [ctermbg=<color>]
|
||||
" group is typically a user-made group
|
||||
" ctermfg is the foreground, or font color
|
||||
" ctermbg is the background color, or highlight color
|
||||
|
||||
" Note: Keep ctermfg for expression and op the same value
|
||||
hi expression ctermfg=Blue
|
||||
hi name ctermfg=LightGreen
|
||||
hi op ctermfg=Blue
|
||||
hi num ctermfg=Magenta
|
||||
|
||||
hi unnamed ctermfg=Magenta
|
||||
hi quote ctermfg=DarkRed
|
||||
hi numQuote ctermfg=Green
|
||||
|
||||
hi comments ctermfg=Green
|
||||
" I want the underlines, but I can't figure out how to make them work
|
||||
" Normally, you add 'term=Underline', but that doesn't quite work
|
||||
hi def link commentFields Underlined
|
||||
hi def link date Underlined
|
||||
hi colon ctermfg=Cyan
|
||||
hi commentTodo ctermfg=Black ctermbg=Yellow
|
||||
|
||||
hi fields ctermfg=Red
|
||||
hi delim ctermfg=Yellow
|
||||
|
||||
hi properties ctermfg=Red
|
||||
hi noteTag ctermfg=White ctermbg=Red
|
||||
hi notes ctermfg=White ctermbg=Red
|
||||
|
||||
"hi body ctermfg=LightBlue
|
||||
|
||||
hi norwegian ctermfg=Green
|
||||
hi russian ctermfg=Red
|
||||
|
||||
let b:current_syntax = "txt"
|
||||
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
// =============================================================================
|
||||
// Auth: dodd
|
||||
// File: boot.go
|
||||
// Revn: 06-23-2022 0.1
|
||||
// Func: Blink a light when the pi boots (or on login, but who cares)
|
||||
//
|
||||
// TODO: create
|
||||
// =============================================================================
|
||||
// CHANGE LOG
|
||||
// -----------------------------------------------------------------------------
|
||||
// 06-23-2022: init
|
||||
//
|
||||
// =============================================================================
|
||||
|
||||
package main
|
||||
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/stianeikeland/go-rpio"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
/*
|
||||
Toggles a LED on physical pin 19 (mcu pin 10)
|
||||
Connect a LED with resistor from pin 19 to ground.
|
||||
*/
|
||||
|
||||
|
||||
// Use mcu pin 10, corresponds to physical pin 19 on the pi
|
||||
var pin rpio.Pin
|
||||
|
||||
|
||||
func main() {
|
||||
|
||||
pin = rpio.Pin( 10 )
|
||||
// Open and map memory to access gpio, check for errors
|
||||
if err := rpio.Open(); err != nil {
|
||||
fmt.Println( "Fatal: pin open failed" )
|
||||
fmt.Println( "Error: ", err.Error() )
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Unmap gpio memory when done
|
||||
defer rpio.Close()
|
||||
|
||||
// Set pin to output mode
|
||||
pin.Output()
|
||||
|
||||
// Toggle pin 2 times
|
||||
for i := 0; i < 4; i++ {
|
||||
pin.Toggle()
|
||||
time.Sleep(time.Second / 10)
|
||||
}
|
||||
}
|
||||
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
k;double sin()
|
||||
,cos();main(){float A=
|
||||
0,B=0,i,j,z[1760];char b[
|
||||
1760];printf("\x1b[2J");for(;;
|
||||
){memset(b,32,1760);memset(z,0,7040)
|
||||
;for(j=0;6.28>j;j+=0.07)for(i=0;6.28
|
||||
>i;i+=0.02){float c=sin(i),d=cos(j),e=
|
||||
sin(A),f=sin(j),g=cos(A),h=d+2,D=1/(c*
|
||||
h*e+f*g+5),l=cos (i),m=cos(B),n=s\
|
||||
in(B),t=c*h*g-f* e;int x=40+30*D*
|
||||
(l*h*m-t*n),y= 12+15*D*(l*h*n
|
||||
+t*m),o=x+80*y, N=8*((f*e-c*d*g
|
||||
)*m-c*d*e-f*g-l *d*n);if(22>y&&
|
||||
y>0&&x>0&&80>x&&D>z[o]){z[o]=D;;;b[o]=
|
||||
".,-~:;=!*#$@"[N>0?N:0];}}/*#****!!-*/
|
||||
printf("\x1b[H");for(k=0;1761>k;k++)
|
||||
putchar(k%80?b[k]:10);A+=0.04;B+=
|
||||
0.02;}}/*****####*******!!=;:~
|
||||
~::==!!!**********!!!==::-
|
||||
.,~~;;;========;;;:~-.
|
||||
..,--------,*/
|
||||
-129
@@ -1,129 +0,0 @@
|
||||
# ========================================================================
|
||||
# Auth: dodd
|
||||
# File: setup.sh
|
||||
# Revn: 01-07-2025 2.0
|
||||
# Func: automate pi setup
|
||||
#
|
||||
# TODO
|
||||
# [X] get link to newer version of go
|
||||
# [X] make useful directories
|
||||
# [ ] build TDM
|
||||
# [ ] build ekho
|
||||
# [ ] make symlinks to executables to ~/bin
|
||||
# [ ] make symlinks to source in ~/src
|
||||
# [X] make symlinks to .bashrc + friends
|
||||
# [ ] connect to internet
|
||||
# [ ] test?
|
||||
# ========================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------
|
||||
# 07-05-2023: added apt installs for vim, neofetch, tmux
|
||||
# 07-06-2023: install stuffs for golang, rust, github
|
||||
# 07-10-2023: added apt install for tshark
|
||||
# 07-11-2023: mv calls for github/bash and github/TDM
|
||||
# building TDM
|
||||
# sudo echo calls for /etc/dhcpcd.conf for static ip
|
||||
# empty and refill /etc/motd
|
||||
# enabled ssh?
|
||||
# fixed typo in golang download, had one, wanted L
|
||||
# 10-07-2024: updated git clone commands
|
||||
# symlink command for bashrc + friends
|
||||
# added big todo list
|
||||
# made bin/src directories
|
||||
# 12-14-2024: updated golang version number
|
||||
#*01-04-2025: added command to install nmap
|
||||
# uncommented building TDM and mv'ing binary to ~/bin
|
||||
# built ekho, moved to ~/bin/
|
||||
# copied, built, and moved donut/boot to ~/src/ and ~/bin/
|
||||
#*01-07-2025: added symlink for .tmux.conf
|
||||
#
|
||||
# ========================================================================
|
||||
|
||||
# update apt
|
||||
sudo apt update && sudo apt upgrade
|
||||
|
||||
# install vim
|
||||
sudo apt install -y vim
|
||||
|
||||
# install neofetch
|
||||
sudo apt install -y neofetch
|
||||
|
||||
# install tmux
|
||||
sudo apt install -y tmux
|
||||
|
||||
# install tshark
|
||||
sudo apt install -y tshark
|
||||
|
||||
# install nmap
|
||||
sudo apt install -y nmap
|
||||
|
||||
# TODO get newer version of Go
|
||||
# install golang
|
||||
wget https://dl.google.com/go/go1.21.1.linux-armv6l.tar.gz
|
||||
sudo tar -C /usr/local -xzf go1.21.1.linux-armv6l.tar.gz
|
||||
rm go1.21.1.linux-armv6l.tar.gz
|
||||
echo "PATH=$PATH:/usr/local/go/bin" >> ~/.profile
|
||||
echo "GOPATH=$HOME/go" >> ~/.profile
|
||||
|
||||
# install rust
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
|
||||
# create the directory "Documents" if it doesn't exist
|
||||
# if it does exist, who cares TODO test
|
||||
cd ~
|
||||
mkdir bin
|
||||
mkdir src
|
||||
mkdir Documents 2> /dev/null
|
||||
cd Documents
|
||||
|
||||
# github treats
|
||||
# lol good luck, without a PAT, this shit BREAKS
|
||||
# start with my stuff
|
||||
git clone https://github.com/alexander-the-alright/dotfiles
|
||||
git clone https://github.com/alexander-the-alright/TDM
|
||||
git clone https://github.com/alexander-the-alright/soary
|
||||
git clone https://github.com/alexander-the-alright/ekho
|
||||
|
||||
# TODO make go
|
||||
# build todo manager
|
||||
go build TDM/tdm.go
|
||||
mv tdm ~/bin/tdm
|
||||
|
||||
# make ekho
|
||||
go build ekho/client
|
||||
mv client ~/bin/client.o
|
||||
|
||||
# TODO symlinks
|
||||
cd ~
|
||||
ln -sf ~/Documents/dotfiles/pi/.vim ~/.vim
|
||||
ln -sf ~/Documents/dotfiles/.vimrc ~/.vimrc
|
||||
ln -sf ~/Documents/dotfiles/pi/.bash_profile ~/.bashrc
|
||||
ln -sf ~/Documents/dotfiles/pi/.tmux.conf ~/.tmux.conf
|
||||
|
||||
# copy and build binaries
|
||||
cp ~/Documents/dotfiles/pi/donut.c ~/src
|
||||
cp ~/Documents/dotfiles/pi/boot.go ~/src
|
||||
gcc -o donut.o src/donut.c
|
||||
gcc -o boot src/boot.go
|
||||
mv boot ~/bin/
|
||||
mv donut.o ~/bin/
|
||||
|
||||
# elsewhere
|
||||
git clone https://github.com/stianeikeland/go-rpio
|
||||
git clone https://github.com/golemparts/rppal
|
||||
|
||||
|
||||
# TODO internet
|
||||
|
||||
# XXX this dumb router breaks this
|
||||
# create static local ip address
|
||||
#sudo echo "" >> /etc/dhcpcd.conf
|
||||
#sudo echo "" >> /etc/dhcpcd.conf
|
||||
#sudo echo "interface wlan0" >> /etc/dhcpcd.conf
|
||||
#sudo echo "static ip_address=192.168.1.160/24" >> /etc/dhcpcd.conf
|
||||
#sudo echo "static routers=192.168.1.1" >> /etc/dhcpcd.conf
|
||||
#sudo echo "static domain_name_servers=192.168.1.1" >> /etc/dhcpcd.conf
|
||||
|
||||
# enable ssh?
|
||||
sudo touch /boot/ssh
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
earth-1.net
|
||||
|
||||
reverse_proxy :3000
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Run dynamic DNS service script
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=300
|
||||
User=oracle
|
||||
ExecStart=/home/oracle/.config/dynu/dynu.sh
|
||||
WorkingDirectory=/home/oracle/.config/dynu/
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Run dynamic DNS service script
|
||||
|
||||
[Timer]
|
||||
OnBootSec=15min
|
||||
OnUnitActiveSec=15min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=Gitea (Git with a cup of tea)
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
User=oracle
|
||||
Group=oracle
|
||||
WorkingDirectory=/home/oracle/Documents/gitea/data/gitea-repositories
|
||||
#WorkingDirectory=/var/lib/gitea/
|
||||
ExecStart=/home/oracle/Documents/gitea/gitea web
|
||||
# --config /etc/gitea/app.ini
|
||||
Restart=always
|
||||
Environment=USER=oracle HOME=/home/oracle/ GITEA_WORK_DIR=/home/oracle/Documents/gitea/data/gitea-repositories
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user