From 0fb0039433c0777027f9f9fc63d6ec77117a7f48 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 21 Jul 2021 16:54:47 +0300 Subject: feat: move zsh and git packages to env --- env/.gitconfig | 7 +++++++ env/.zshrc | 37 +++++++++++++++++++++++++++++++++++++ git/.gitconfig | 7 ------- scripts/.local/bin/linkgrabber.sh | 4 ++++ zsh/.zshrc | 37 ------------------------------------- 5 files changed, 48 insertions(+), 44 deletions(-) create mode 100644 env/.gitconfig create mode 100644 env/.zshrc delete mode 100644 git/.gitconfig create mode 100755 scripts/.local/bin/linkgrabber.sh delete mode 100644 zsh/.zshrc diff --git a/env/.gitconfig b/env/.gitconfig new file mode 100644 index 0000000..132f42d --- /dev/null +++ b/env/.gitconfig @@ -0,0 +1,7 @@ +[user] + email = eug-vs@keemail.me + name = eug-vs +[core] + editor = nvim +[pull] + rebase = true diff --git a/env/.zshrc b/env/.zshrc new file mode 100644 index 0000000..6746f4b --- /dev/null +++ b/env/.zshrc @@ -0,0 +1,37 @@ +autoload -U colors && colors +PS1="%B%{$fg[white]%}[%{$fg[cyan]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[yellow]%}%~%{$fg[white]%}]%{$reset_color%}$%b " +bindkey -e + +# History in cache directory: +HISTSIZE=10000 +SAVEHIST=10000 +HISTFILE=~/.cache/zsh/history + +# Completion +autoload -U compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) + +# Edit line in vim with ctrl-e: +autoload edit-command-line; zle -N edit-command-line +bindkey '^e' edit-command-line + +# Aliases +alias vi=nvim +alias vim=nvim +alias config='git --git-dir=$HOME/.dotfiles.git --work-tree=$HOME' + +# Env +export LESS=R # Option to less so that git log/diff hide output after exit +export EDITOR=nvim +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +export PATH=$PATH:~/.local/bin + + +# Syntax highlighting, must be last +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh diff --git a/git/.gitconfig b/git/.gitconfig deleted file mode 100644 index 132f42d..0000000 --- a/git/.gitconfig +++ /dev/null @@ -1,7 +0,0 @@ -[user] - email = eug-vs@keemail.me - name = eug-vs -[core] - editor = nvim -[pull] - rebase = true diff --git a/scripts/.local/bin/linkgrabber.sh b/scripts/.local/bin/linkgrabber.sh new file mode 100755 index 0000000..ab90f6c --- /dev/null +++ b/scripts/.local/bin/linkgrabber.sh @@ -0,0 +1,4 @@ +#!/bin/sh +regex='(((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]' +url=$(grep -Po "$regex" | dmenu -p "Go:" -w "$WINDOWID" -l 10) || exit +brave "$url" diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 100644 index 6746f4b..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1,37 +0,0 @@ -autoload -U colors && colors -PS1="%B%{$fg[white]%}[%{$fg[cyan]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[yellow]%}%~%{$fg[white]%}]%{$reset_color%}$%b " -bindkey -e - -# History in cache directory: -HISTSIZE=10000 -SAVEHIST=10000 -HISTFILE=~/.cache/zsh/history - -# Completion -autoload -U compinit -zstyle ':completion:*' menu select -zmodload zsh/complist -compinit -_comp_options+=(globdots) - -# Edit line in vim with ctrl-e: -autoload edit-command-line; zle -N edit-command-line -bindkey '^e' edit-command-line - -# Aliases -alias vi=nvim -alias vim=nvim -alias config='git --git-dir=$HOME/.dotfiles.git --work-tree=$HOME' - -# Env -export LESS=R # Option to less so that git log/diff hide output after exit -export EDITOR=nvim -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - -export PATH=$PATH:~/.local/bin - - -# Syntax highlighting, must be last -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -- cgit v1.2.3