reorganize to use stow to manage configs, remove fish and stumpwm configs

This commit is contained in:
2020-07-21 06:50:01 +02:00
parent 8dfd72a3de
commit a8668f5409
23 changed files with 24 additions and 272 deletions

View File

@ -0,0 +1,6 @@
Directory for plugins. Checkout here
1. zsh-autosuggestions (https://github.com/zsh-users/zsh-autosuggestions)
2. zsh-syntax-highlighting (https://github.com/zsh-users/zsh-syntax-highlighting)
or install then with package manager in /usr/share/zsh/plugins/ and symlink.

37
shell/.profile Normal file
View File

@ -0,0 +1,37 @@
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
export EDITOR=emacsclient
export VISUAL=emacsclient
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
if [ -d "$HOME/.cargo/bin" ] ; then
PATH="$HOME/.cargo/bin:$PATH"
fi
if [ -d "$HOME/go/bin" ] ; then
PATH="$HOME/go/bin:$PATH"
fi
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
export PATH
# start X at login
[[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null && exec sx ~/.xsession

6
shell/.zprofile Normal file
View File

@ -0,0 +1,6 @@
# start X at login on first console or otherwise source ~/.profile
if [[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null; then
exec sx ~/.xsession
else
source ~/.profile
fi

81
shell/.zshrc Normal file
View File

@ -0,0 +1,81 @@
# History.
HISTFILE=${ZDOTDIR:-~}/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt append_history
setopt extended_history
setopt hist_expire_dups_first
setopt hist_find_no_dups
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
setopt inc_append_history
setopt share_history
# Prompt.
autoload -Uz vcs_info
precmd () { vcs_info }
setopt prompt_subst
zstyle ':vcs_info:git:*' formats '%F{yellow}(%b)%r%f '
zstyle ':vcs_info:*' enable git
PS1='%B%F{green}%n@%m%f %F{blue}%~%f%b ${vcs_info_msg_0_}%B%#%f%b '
RPROMPT='%(?..%B%F{red}%?%f%b)'
# Completion.
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
# Options.
setopt auto_cd
setopt extended_glob
setopt glob_complete
setopt interactive_comments
setopt no_flow_control
WORDCHARS=
# Terminal title.
autoload -Uz add-zsh-hook
function xterm_title_precmd () {
print -Pn -- '\e]2;%n@%m %~\a'
}
function xterm_title_preexec () {
print -Pn -- '\e]2;%n@%m %~ %# ' && print -n -- "${(q)1}\a"
}
if [[ "$TERM" == (alacritty*|gnome*|konsole*|putty*|rxvt*|screen*|tmux*|xterm*) ]]; then
add-zsh-hook -Uz precmd xterm_title_precmd
add-zsh-hook -Uz preexec xterm_title_preexec
fi
# Plugins.
source_if_exists() {
[ -e "$1" ] && source "$1"
}
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=5,underline"
source_if_exists ~/.config/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
if source_if_exists ~/.config/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh; then
ZSH_HIGHLIGHT_STYLES[comment]=fg=cyan,bold
fi
# Directory stack.
DIRSTACKSIZE=10
setopt auto_pushd pushd_minus pushd_silent pushd_to_home pushd_ignore_dups
# Aliases.
alias dh='dirs -v'
alias e='emacsclient -n'
alias history='history -i'
alias ls='ls --color=tty'