From 36a345b1692bce70c47d10955677582093ef6b30 Mon Sep 17 00:00:00 2001 From: surtur Date: Mon, 27 Apr 2020 22:57:54 +0200 Subject: [PATCH] updated zshrc * spaceship prompt change * added aliases and exports * moved stuff to ~/.dotenv * added quality-of-life improvements for wayland --- .zshrc | 70 ++++++++++++++++++------------------------------- .vimrc => vimrc | 0 2 files changed, 25 insertions(+), 45 deletions(-) rename .vimrc => vimrc (100%) diff --git a/.zshrc b/.zshrc index 709924a..d5e4f14 100644 --- a/.zshrc +++ b/.zshrc @@ -31,23 +31,21 @@ ZSH_THEME="spaceship" SPACESHIP_PROMPT_ADD_NEWLINE=false SPACESHIP_PROMPT_SEPARATE_LINE=true - SPACESHIP_TIME_SHOW=false - SPACESHIP_TIME_COLOR=white SPACESHIP_DIR_PREFIX= SPACESHIP_DIR_COLOR=blue - SPACESHIP_DIR_TRUNC=1 + #SPACESHIP_DIR_TRUNC=3 SPACESHIP_DIR_TRUNC_REPO=false - SPACESHIP_HOST_SHOW=always + SPACESHIP_HOST_SHOW=true SPACESHIP_HOST_PREFIX="@" SPACESHIP_HOST_COLOR=green SPACESHIP_GIT_BRANCH_COLOR=red SPACESHIP_GIT_STATUS_COLOR=yellow SPACESHIP_BATTERY_SHOW=true SPACESHIP_BATTERY_THRESHOLD=35 - SPACESHIP_CHAR_SYMBOL=%% - SPACESHIP_CHAR_COLOR_SUCCESS=white - SPACESHIP_CHAR_SUFFIX=" " + #SPACESHIP_CHAR_SYMBOL=\> + SPACESHIP_CHAR_COLOR_SUCCESS=blue + #SPACESHIP_CHAR_SUFFIX="" # Path to your oh-my-zsh installation. export ZSH=$HOME/.oh-my-zsh @@ -142,27 +140,21 @@ # User configuration # export MANPATH="/usr/local/man:$MANPATH" - export PATH="$HOME/.local/bin:$HOME/utils/bin:$PATH" + export PATH="$HOME/.local/bin:$HOME/utils/bin:$HOME/.cargo/bin:$PATH" # You may need to manually set your language environment export LANG=en_GB.UTF-8 export http_proxy="http://localhost:8118" export QT_QPA_PLATFORMTHEME="qt5ct" -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# if [[ -x "$(command -v vim)" ]]; then -# export EDITOR='vim' -# else -# export EDITOR='nano' -# fi -# else -# if [[ -x "$(command -v vimx)" ]]; then - export EDITOR='vim' -# else -# export EDITOR='nano' -# fi -# fi + + if [ -n "$DESKTOP_SESSION" ];then + eval $(gnome-keyring-daemon --start) + export SSH_AUTH_SOCK + fi + + export EDITOR='vim' + export TERM='xterm-256color' # Compilation flags # export ARCHFLAGS="-arch x86_64" @@ -170,15 +162,12 @@ # ssh # export SSH_KEY_PATH="~/.ssh/rsa_id" -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. - - eval $(TERM=xterm dircolors) + source ~/.dotenv + eval $(TERM=xterm-256color dircolors) alias ls='ls --color=auto' + alias ls='exa' - alias grubup='sudo grub2-mkconfig -o /boot/grub/grub.cfg' + alias grubup='sudo grub2-mkconfig -o /boot/grub2/grub.cfg' alias am='sudo -i' alias mv='mv -i' alias cp='cp -i' @@ -189,21 +178,15 @@ alias grep='grep --color=auto' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' + alias neofetch='neofetch --disable "theme" "icons" packages de hostname cpu gpu resolution title' #alias reth='sudo ethtool -r enp0s25' # ; ip link set enp0s25 down; ip link set enp0s25 up ' #alias rwlan='ip link set wlp3s0 down; ip link set wlp3s0 up' - export utb="$HOME/MEGA/Projects/utb" - export kry="$utb/3semester/KRY/" - export osz="$utb/3semester/OSZ/" - export mw="$utb/4semester/MW/" - export pjc="$utb/4semester/PJC/" - export tso="$utb/4semester/TSO/" - export tew="$utb/4semester/TEW/" - alias wget='wget -c' # allows to restore progress after interruption - if [[ -x "$(command -v vimx)" ]]; then alias vim='vimx'; fi # proper clipboard support - alias v='vimx' # life's too short to type "vim" every time in full - alias vimrc='vimx ~/.vim/vimrc' + if [[ -z "$WAYLAND_DISPLAY" ]]; then alias vim='vimx';alias v='vimx'; else alias v='vim'; fi # life's too short to type "vim" every time in full + alias vimrc='vim ~/.vim/vimrc' + alias zshconfig="vim ~/.zshrc" + alias zshist="vim ~/.zsh_history" alias alltheconfigs='alltheconfigs.sh' export kee="surtur" alias agentssh="ssh-agent -s && ssh-add ~/.ssh/$kee" # add development key on demand @@ -211,7 +194,7 @@ alias rsync-move='rsync -avz --progress -h --remove-source-files' alias rsync-synchronize='rsync -avzu --delete --progress -h' alias rsync-update='rsync -avzu --progress -h' - alias tmpdir='mktemp -d && cd /tmp/$(ls -t /tmp | grep tmp. | head -1)' + alias tmpdir='nutmp=$(mktemp -d);cd "$nutmp";unset nutmp' alias wolm='wol d4:3d:7e:53:c2:b1' alias ta='tmux a -t0' @@ -228,12 +211,9 @@ #source utils/venv/bin/activate export PIP_VIRTUALENV_BASE=~/utils/venv - alias zshconfig="vimx ~/.zshrc" - alias zshist="vimx ~/.zsh_history" -# alias ohmyzsh="mate ~/.oh-my-zsh" - export DOTNET_CLI_TELEMETRY_OPTOUT=1 # why do I always have to take care of this myself... export MOZ_USE_XINPUT2=1 + export _JAVA_AWT_WM_NONREPARENTING=1 #bindkey -v # enabled ohmyzsh vi-mode - more customizable than the original diff --git a/.vimrc b/vimrc similarity index 100% rename from .vimrc rename to vimrc