I really don't use emacs server anymore, it's kinda annoying and the online features just don't work. Therefore, I'm just going to use Emacs GUI directly. This obsoletes spc and spu, which means I need a new command. This command is editor, which nohups and reroutes the output of Emacs to /dev/null and disjoins it from the terminal.
70 lines
2.0 KiB
Bash
70 lines
2.0 KiB
Bash
# zshenv -*- mode: sh; lexical-binding: t; -*-
|
|
# Important variables
|
|
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:~/.local/bin:~/bin/binaries:~/.emacs.d/bin:~/.cargo/bin
|
|
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
|
export DOTNET_CLI_TELEMTRY_OPTOUT=1
|
|
export PF_INFO="ascii title os memory uptime editor shell"
|
|
export EDITOR="emacs"
|
|
export SHELL="zsh"
|
|
alias yapf='python2 -m yapf'
|
|
alias clip="xclip -sel clip"
|
|
alias paste="xclip -o"
|
|
export force_color_prompt=yes
|
|
export ZSH_THEME="af-magic"
|
|
export XDG_RUNTIME_DIR=/run/user/`id -u`
|
|
|
|
# Programming
|
|
editor() {
|
|
nohup emacs $1 > /dev/null &
|
|
}
|
|
|
|
gentemplate() {
|
|
for var in ${@:2}; do
|
|
case $1 in
|
|
'c') git clone https://github.com/Oreodave/CTemplate $var;;
|
|
'cpp') git clone https://github.com/Oreodave/CPPTemplate $var;;
|
|
'python') git clone https://github.com/Oreodave/PythonTemplate $var;;
|
|
'node') git clone https://github.com/Oreodave/NodeTemplate $var;;
|
|
'ard') git clone https://github.com/Oreodave/ArduinoTemplate $var;;
|
|
*) return;;
|
|
esac
|
|
rm -rf $var/.git;
|
|
done
|
|
}
|
|
|
|
gentemplateoff () {
|
|
for var in ${@:2}; do
|
|
case $1 in
|
|
'c') cp -r ~/Code/Templates/CTemplate $var;;
|
|
'cpp') cp -r ~/Code/Templates/CPPTemplate $var;;
|
|
'python') cp -r ~/Code/Templates/PythonTemplate $var;;
|
|
'node') cp -r ~/Code/Templates/NodeTemplate $var;;
|
|
'ard') cp -r ~/Code/Templates/ArduinoTemplate $var;;
|
|
*) return;;
|
|
esac
|
|
rm -rf $var/.git;
|
|
done
|
|
}
|
|
|
|
# Web Querying
|
|
search () {
|
|
web "duckduckgo.com/?q=$1"
|
|
}
|
|
|
|
web () {
|
|
firefox $1 > /dev/null & disown
|
|
}
|
|
|
|
😂() {
|
|
web "https://youtu.be/qMc6xlZaxYA"
|
|
}
|
|
|
|
|
|
# OPAM configuration
|
|
. /home/oreodave/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
|
|
|
|
#NVM config
|
|
export NVM_DIR="$HOME/.nvm"
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|