From 093ae443b98cc62eb05622f4a1b823489888fcc6 Mon Sep 17 00:00:00 2001 From: oreodave Date: Tue, 7 Apr 2020 09:43:41 +0100 Subject: ~zshenv -> zshrc Don't use oh-my-zsh anymore, too clunky --- files | 2 +- zshenv | 55 ------------------------------------------------------- zshrc | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 56 deletions(-) delete mode 100644 zshenv create mode 100644 zshrc diff --git a/files b/files index f210f18..890be3f 100644 --- a/files +++ b/files @@ -1 +1 @@ -tmux.conf vimrc zshenv doom.d mpd mpv alacritty.yml ncmpcpp i3status.conf +tmux.conf vimrc zshrc doom.d mpd mpv alacritty.yml ncmpcpp i3status.conf diff --git a/zshenv b/zshenv deleted file mode 100644 index de95342..0000000 --- a/zshenv +++ /dev/null @@ -1,55 +0,0 @@ -# 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:~/Scripts -export guile=guile2.2 -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` -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true -export DOTNET_CLI_TELEMTRY_OPTOUT=1 - -# Programming -editor() { - nohup emacs $@ > /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;; - 'java') git clone https://github.com/Oreodave/JavaTemplate $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;; - 'java') cp -r ~/Code/Templates/JavaTemplate $var;; - *) return;; - esac - rm -rf $var/.git; - done -} - -#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 diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..bc1524f --- /dev/null +++ b/zshrc @@ -0,0 +1,64 @@ +# zshenv -*- mode: sh; lexical-binding: t; -*- + +# Important variables and stuff +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:~/Scripts +export guile=guile2.2 +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` +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true +export DOTNET_CLI_TELEMTRY_OPTOUT=1 + +autoload -U colors && colors +autoload -U compinit +HISTSIZE=10000 +SAVEHIST=10000 +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit + +# Programming +editor() { + nohup emacs $@ > /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;; + 'java') git clone https://github.com/Oreodave/JavaTemplate $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;; + 'java') cp -r ~/Code/Templates/JavaTemplate $var;; + *) return;; + esac + rm -rf $var/.git; + done +} + +#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 -- cgit v1.2.3-13-gbd6f