From 1fc250c084a7b5299e1c29e982516a389ec8d36d Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 30 Oct 2020 22:16:28 +0100 Subject: [PATCH] minor qol changes - if file is c and makefile exists do a make run - change the prompt color to blue --- .config/zsh/.zshrc | 4 ++-- .local/bin/tools/nvim/compiler | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index b06de77..595ec78 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -46,8 +46,8 @@ function +vi-git-stash() { fi } zstyle ':vcs_info:git*+set-message:*' hooks git-st git-stash -PS1='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}\$%b ' -RPROMPT='%B%{$fg[magenta]%}$vcs_info_msg_0_%{$reset_color%}%b' +PS1='%B%{$fg[blue]%}[%{$fg[blue]%}%n%{$fg[blue]%}@%{$fg[blue]%}%M %{$fg[blue]%}%~%{$fg[blue]%}]%{$reset_color%}\$%b ' +RPROMPT='%B%{$fg[blue]%}$vcs_info_msg_0_%{$reset_color%}%b' # History in cache directory HISTSIZE=10000 diff --git a/.local/bin/tools/nvim/compiler b/.local/bin/tools/nvim/compiler index 087c4fa..f36cf42 100755 --- a/.local/bin/tools/nvim/compiler +++ b/.local/bin/tools/nvim/compiler @@ -30,7 +30,7 @@ case "$file" in *\.tex) textype "$file" ;; *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; *config.h) sudo make install ;; - *\.c) cc "$file" -o "$base" && "$base" ;; + *\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;; *\.py) python "$file" ;; *\.go) go run "$file" ;; *\.sent) setsid sent "$file" 2>/dev/null & ;;