mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-04-29 17:25:34 +00:00
Dotfiles install and backup script
This commit is contained in:
parent
63a9f7a787
commit
9e6448c6ae
21
.dotfiles/.zshrc
Normal file
21
.dotfiles/.zshrc
Normal file
@ -0,0 +1,21 @@
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=99999999
|
||||
SAVEHIST=99999999
|
||||
setopt appendhistory autocd extendedglob nomatch notify
|
||||
unsetopt beep
|
||||
bindkey -e
|
||||
zstyle :compinstall filename '~/.zshrc'
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# Text Editor
|
||||
alias emacs='emacs -nw'
|
||||
alias e='emacs -nw'
|
||||
alias i='sudo dnf install'
|
||||
alias d='sudo dnf'
|
||||
alias c='git commit -m '
|
||||
alias g='git'
|
||||
alias gp='git pull'
|
||||
|
||||
export TERM=linux
|
16
scripts/dotfiles.sh
Normal file
16
scripts/dotfiles.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#! /bin/bash
|
||||
|
||||
# source backup sudo
|
||||
files=(~/.zshrc ~/.config/.dotfiles/.zshrc 'n')
|
||||
|
||||
for (( i=0; i<${#files[@]} ; i+=3 )) ; do
|
||||
if [[ $* == *-b* ]]; then
|
||||
cp ${files[i]} ${files[i+1]}
|
||||
else
|
||||
if [[ ${files[i+2]} == *'y'* ]]; then
|
||||
sudo cp ${files[i+1]} ${files[i]}
|
||||
else
|
||||
cp ${files[i+1]} ${files[i]}
|
||||
fi
|
||||
fi
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user