mirror of
https://github.com/alrayyes/legacy-dotfiles
synced 2023-11-13 18:16:41 +00:00
using zsh again as backup shell
This commit is contained in:
parent
b73e4b6a3b
commit
a66bd6eb0d
28
README.org
28
README.org
@ -8,10 +8,6 @@
|
|||||||
- [[#maintainers][Maintainers]]
|
- [[#maintainers][Maintainers]]
|
||||||
- [[#prerequisites][Prerequisites]]
|
- [[#prerequisites][Prerequisites]]
|
||||||
- [[#configured-applications][Configured Applications]]
|
- [[#configured-applications][Configured Applications]]
|
||||||
- [[#zsh][Zsh]]
|
|
||||||
- [[#theme][Theme]]
|
|
||||||
- [[#plugin-manager][Plugin Manager]]
|
|
||||||
- [[#plugins][Plugins]]
|
|
||||||
- [[#license][License]]
|
- [[#license][License]]
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
@ -35,30 +31,6 @@ Legacy dotfiles that I don't use anymore
|
|||||||
- [[https://vifm.info/][vifm]]
|
- [[https://vifm.info/][vifm]]
|
||||||
- [[http://zsh.sourceforge.net/][zsh]]
|
- [[http://zsh.sourceforge.net/][zsh]]
|
||||||
|
|
||||||
* Zsh
|
|
||||||
** Theme
|
|
||||||
- [[https://github.com/denysdovhan/spaceship-prompt][spaceship zsh]]
|
|
||||||
** Plugin Manager
|
|
||||||
- [[https://github.com/zplug/zplug][zplug]]
|
|
||||||
** Plugins
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/archlinux][archlinux]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/composer][composer]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker][docker]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker-compose][docker-compose]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/extract][extract]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fzf][fzf]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git][git]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gitignore][gitignore]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/pass][pass]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ripgrep][ripgrep]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rsync][rsync]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/sudo][sudo]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/systemd][systemd]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/tmux][tmux]]
|
|
||||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/vi-mode][vi-mode]]
|
|
||||||
- [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]]
|
|
||||||
- [[https://github.com/zsh-users/zsh-syntax-highlighting][zsh-syntax-highlighting]]
|
|
||||||
|
|
||||||
* License
|
* License
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: license
|
:CUSTOM_ID: license
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
|
|
||||||
exec startx
|
|
||||||
fi
|
|
57
zsh/.zshenv
57
zsh/.zshenv
@ -1,57 +0,0 @@
|
|||||||
path_if_exists() {
|
|
||||||
if [[ -d $1 ]]; then
|
|
||||||
export PATH="$1:$PATH"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Stop tmux bitching about 256 colours
|
|
||||||
TERM="xterm-256color"
|
|
||||||
|
|
||||||
# PATH
|
|
||||||
path_if_exists ~/.config/yarn/global/node_modules/.bin
|
|
||||||
path_if_exists ~/.local/bin
|
|
||||||
path_if_exists ~/.emacs.d/bin
|
|
||||||
|
|
||||||
# Set GPG TTY
|
|
||||||
export GPG_TTY="$(tty)"
|
|
||||||
|
|
||||||
# Set default browser
|
|
||||||
if [ -e "/usr/bin/brave" ]; then
|
|
||||||
export BROWSER="brave"
|
|
||||||
else
|
|
||||||
if [ -e "/usr/bin/firefox" ]; then
|
|
||||||
export BROWSER="firefox"
|
|
||||||
elif [ -e "/usr/bin/iceweasel" ]; then
|
|
||||||
export BROWSER="iceweasel"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set default terminal
|
|
||||||
export TERMINAL="alacritty"
|
|
||||||
|
|
||||||
# pkg editor
|
|
||||||
export VISUAL="nvim"
|
|
||||||
|
|
||||||
# editor
|
|
||||||
export EDITOR="nvim"
|
|
||||||
|
|
||||||
# Enable password store extensions
|
|
||||||
export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
|
|
||||||
|
|
||||||
# This needs to be set for bspwm to see config
|
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
|
||||||
|
|
||||||
# Save history file in proper place
|
|
||||||
HISTFILE=~/.cache/zsh/history
|
|
||||||
|
|
||||||
# Use alternative muhome
|
|
||||||
export MU_HOME="/home/alrayyes/.cache/mu"
|
|
||||||
|
|
||||||
# Needed to get zsh to play nice with emacs vterm
|
|
||||||
if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
|
|
||||||
alias clear='printf "\e]51;Evterm-clear-scrollback\e\\";tput clear'
|
|
||||||
fi
|
|
||||||
vterm_prompt_end() {
|
|
||||||
printf "\e]51;A$(whoami)@$(hostname):$(pwd)\e\\"
|
|
||||||
}
|
|
||||||
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
|
|
81
zsh/.zshrc
81
zsh/.zshrc
@ -1,81 +0,0 @@
|
|||||||
source_if_exists() {
|
|
||||||
if [[ -f $1 ]]; then
|
|
||||||
source $1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if zplug is installed
|
|
||||||
if [[ ! -d ~/.zplug ]]; then
|
|
||||||
git clone https://github.com/b4b4r07/zplug ~/.zplug
|
|
||||||
fi
|
|
||||||
source ~/.zplug/init.zsh
|
|
||||||
|
|
||||||
# Spaceship theme
|
|
||||||
zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
|
|
||||||
|
|
||||||
# Oh my zsh lugins
|
|
||||||
# sudo must start after vi-mode for it to work properly
|
|
||||||
zplug "plugins/archlinux", from:oh-my-zsh
|
|
||||||
zplug "plugins/composer", from:oh-my-zsh
|
|
||||||
zplug "plugins/docker", from:oh-my-zsh
|
|
||||||
zplug "plugins/docker-compose", from:oh-my-zsh
|
|
||||||
zplug "plugins/extract", from:oh-my-zsh
|
|
||||||
zplug "plugins/fzf", from:oh-my-zsh
|
|
||||||
zplug "plugins/git", from:oh-my-zsh
|
|
||||||
zplug "plugins/gitignore", from:oh-my-zsh
|
|
||||||
zplug "plugins/pass", from:oh-my-zsh
|
|
||||||
zplug "plugins/ripgrep", from:oh-my-zsh
|
|
||||||
zplug "plugins/rsync", from:oh-my-zsh
|
|
||||||
zplug "plugins/systemd", from:oh-my-zsh
|
|
||||||
zplug "plugins/tmux", from:oh-my-zsh
|
|
||||||
zplug "plugins/vi-mode", from:oh-my-zsh
|
|
||||||
zplug "plugins/sudo", from:oh-my-zsh
|
|
||||||
zplug "plugins/yarn", from:oh-my-zsh
|
|
||||||
zplug "zsh-users/zsh-autosuggestions", from:github, defer:3
|
|
||||||
zplug "zsh-users/zsh-syntax-highlighting", from:github, defer:3
|
|
||||||
|
|
||||||
# Install packages
|
|
||||||
if ! zplug check --verbose; then
|
|
||||||
printf "Install zplug plugins? [y/N]: "
|
|
||||||
if read -q; then
|
|
||||||
echo
|
|
||||||
zplug install
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
zplug load
|
|
||||||
|
|
||||||
# vim alias
|
|
||||||
alias v="nvim"
|
|
||||||
alias sv="sudo nvim"
|
|
||||||
|
|
||||||
# ls alias
|
|
||||||
alias ls="exa"
|
|
||||||
alias l="exa -al"
|
|
||||||
|
|
||||||
# vifm alias
|
|
||||||
alias vifm="vifmrun"
|
|
||||||
|
|
||||||
# Use lf to switch directories and bind it to ctrl-o
|
|
||||||
lfcd() {
|
|
||||||
tmp="$(mktemp)"
|
|
||||||
lf -last-dir-path="$tmp" "$@"
|
|
||||||
if [ -f "$tmp" ]; then
|
|
||||||
dir="$(cat "$tmp")"
|
|
||||||
rm -f "$tmp"
|
|
||||||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
bindkey -s '^o' 'lfcd\n'
|
|
||||||
|
|
||||||
# Set GPG TTY
|
|
||||||
export GPG_TTY="$(tty)"
|
|
||||||
|
|
||||||
# Refresh gpg-agent tty in case user switches into an X session
|
|
||||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
|
||||||
|
|
||||||
# Needed for broot
|
|
||||||
source /home/alrayyes/.config/broot/launcher/bash/br
|
|
||||||
|
|
||||||
neofetch
|
|
Loading…
Reference in New Issue
Block a user