From f29e84dcccecdf14e3a08f1a8bb5db2b7bfcc16d Mon Sep 17 00:00:00 2001 From: osconlab <129285747+osconlab@users.noreply.github.com> Date: Wed, 29 Mar 2023 14:30:12 +0200 Subject: [PATCH] up --- .bash_aliases | 9 ++ .bash_exports | 20 +++ .bash_profile | 7 + .bash_wrappers | 25 ++++ .bashrc | 131 +++++++++++++++++++ .screenrc | 30 +++++ .tmux.conf | 65 ++++++++++ .vimrc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 15 +++ install.sh | 15 +++ uninstall.sh | 10 ++ 11 files changed, 668 insertions(+) create mode 100644 .bash_aliases create mode 100644 .bash_exports create mode 100644 .bash_profile create mode 100644 .bash_wrappers create mode 100644 .bashrc create mode 100644 .screenrc create mode 100644 .tmux.conf create mode 100644 .vimrc create mode 100644 README.md create mode 100644 install.sh create mode 100644 uninstall.sh diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..a3b2082 --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,9 @@ +alias gti='git' +alias tmux='tmux -2' +alias less='less -R' +alias diff='colordiff' +alias dc='cd' +alias nethack-online='ssh nethack@nethack.alt.org ; clear' +alias tron-online='ssh sshtron.zachlatta.com ; clear' +alias yams='find . -type f -name "*.yml*" | sed "s|\./||g" | egrep -v "(\.kitchen/|\[warning\]|\.molecule/)" | xargs yamllint -f parsable' +alias glog='git log --oneline --graph --color --all --decorate' diff --git a/.bash_exports b/.bash_exports new file mode 100644 index 0000000..8f1dec1 --- /dev/null +++ b/.bash_exports @@ -0,0 +1,20 @@ +export TERM=xterm-256color + +export LESS='-R' +export LESSOPEN='|~/.lessfilter %s' + +# perl plenv +# export PATH="$HOME/.plenv/bin:$PATH" +# eval "$(plenv init -)" + +# golang +export GOPATH=~/gocode +export PATH="$GOPATH/bin:${PATH}:/usr/local/go/bin" + +# ruby rbenv +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init -)" +export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH" + +export EDITOR=/usr/bin/vim + diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..158bd5a --- /dev/null +++ b/.bash_profile @@ -0,0 +1,7 @@ +if [ -n "$TMUX" ]; then + # called inside tmux session, do tmux things + . ~/.profile + +fi +# Trigger ~/.bashrc commands +. ~/.bashrc diff --git a/.bash_wrappers b/.bash_wrappers new file mode 100644 index 0000000..2025459 --- /dev/null +++ b/.bash_wrappers @@ -0,0 +1,25 @@ +# colored man pages +man() { + env LESS_TERMCAP_mb=$'\E[01;31m' \ + LESS_TERMCAP_md=$'\E[01;38;5;74m' \ + LESS_TERMCAP_me=$'\E[0m' \ + LESS_TERMCAP_se=$'\E[0m' \ + LESS_TERMCAP_so=$'\E[01;33;03;40m' \ + LESS_TERMCAP_ue=$'\E[0m' \ + LESS_TERMCAP_us=$'\E[04;38;5;146m' \ + man "$@" +} + + +whatsgoingon() { + for i in $(find . -maxdepth 1 -type d | sed -e 's/\.\///' -e '/\./d'); do + pushd $i >/dev/null + echo "$(tput bold)$i$(tput sgr0)" + if [ -z "$(git status --porcelain)" ]; then + echo "is clean" + else + git status -s + fi + popd >/dev/null + done +} diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..1710080 --- /dev/null +++ b/.bashrc @@ -0,0 +1,131 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]" +else + PS1='┌──[\u@\h]─[\w]\n└──╼ \$ ' +fi + +# Set 'man' colors +if [ "$color_prompt" = yes ]; then + man() { + env \ + LESS_TERMCAP_mb=$'\e[01;31m' \ + LESS_TERMCAP_md=$'\e[01;31m' \ + LESS_TERMCAP_me=$'\e[0m' \ + LESS_TERMCAP_se=$'\e[0m' \ + LESS_TERMCAP_so=$'\e[01;44;33m' \ + LESS_TERMCAP_ue=$'\e[0m' \ + LESS_TERMCAP_us=$'\e[01;32m' \ + man "$@" + } +fi + +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + alias dir='dir --color=auto' + alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# some more ls aliases +alias ll='ls -l' +alias la='ls -A' +alias l='ls -CF' +alias em='emacs -nw' +alias dd='dd status=progress' +alias _='sudo' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi diff --git a/.screenrc b/.screenrc new file mode 100644 index 0000000..df09f12 --- /dev/null +++ b/.screenrc @@ -0,0 +1,30 @@ +# GNU Screen - main configuration file +# Allow bold colors - necessary for some reason +attrcolor b ".I" + +# Tell screen how to set colors. AB = background, AF=foreground +termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' + +# Enables use of shift-PgUp and shift-PgDn +termcapinfo xterm|xterms|xs|rxvt ti@:te@ + +# Erase background with current bg color +defbce "on" + +# Enable 256 color term +term xterm-256color + +# Cache 30000 lines for scroll back +defscrollback 30000 + +hardstatus alwayslastline +# Very nice tabbed colored hardstatus line +hardstatus string '%{= Kd} %{= Kd}%-w%{= Kr}[%{= KW}%n %t%{= Kr}]%{= Kd}%+w %-= %{KG} %H%{KW}|%{KY}%101`%{KW}|%D %M %d %Y%{= Kc} %C%A%{-}' + +# change command character from ctrl-a to ctrl-b (emacs users may want this) +#escape ^Bb + +# Hide hardstatus: ctrl-a f +bind f eval "hardstatus ignore" +# Show hardstatus: ctrl-a F +bind F eval "hardstatus alwayslastline" diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..14ba8b5 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,65 @@ +# Make it use C-a, similar to screen.. +#unbind C-b +#set -g prefix C-a + +set -g default-terminal "screen-256color" +set -g history-limit 50000 + +# Tmux mouse mode +set-option -g mouse off + +# THEME +set -g status-bg colour235 +set -g status-fg yellow +set-option -g status-attr dim +set-window-option -g window-status-current-fg brightred #orange +set-window-option -g window-status-current-bg colour236 +set-window-option -g window-status-current-attr bright + +set -g status-interval 60 +set -sg escape-time 1000 +set-option -g base-index 1 +setw -g aggressive-resize on +set -g status-justify centre +#set -g status-left '#[fg=green]#(whoami)@#H#[default]' +set -g status-left-length 70 +set -g status-left "#[fg=yellow]#(ifconfig eth0 | grep 'inet ' | awk '{print \"eth0 \" $2}') #(ifconfig eth1 | grep 'inet ' | awk '{print \"eth1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') #(ifconfig ppp0 | grep 'inet ' | awk '{print \"vpn \" $2}')" +# show session name, window & pane number, date and time on right side of status bar +set -g status-right-length 60 +set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: %l:%M %p :: #(date -u | awk '{print $4}')::" +# set pane colors - hilight the active pane +set-option -g pane-border-fg colour235 #base02 +set-option -g pane-active-border-fg colour240 #base01 + + +# use PREFIX | to split window horizontally and PREFIX - to split vertically +#bind | split-window -h +#bind - split-window -v + +# Make the current window the first window +#bind T swap-window -t 1 + +# and use C-h and C-l to cycle thru panes +#bind -r C-h select-window -t :- +#bind -r C-l select-window -t :+ + +#bind ` copy-mode +#bind p paste-buffer + +# Resize window with alt arrow keys +bind-key -n C-S-Up resize-pane -U 10 +bind-key -n C-S-Down resize-pane -D 10 +bind-key -n C-S-Left resize-pane -L 10 +bind-key -n C-S-Right resize-pane -R 10 + +# Rename window with ctrl a r +#bind-key -r r command-prompt 'rename-window %%' + +# Reorder windows +#bind R \ +# move-window -r\; \ +# display-message "Windows reordered..." + +## pane border and colors +set-option -g pane-active-border-fg yellow +set-option -g pane-border-fg white diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..94f3370 --- /dev/null +++ b/.vimrc @@ -0,0 +1,341 @@ +" execute pathogen#infect() + +" Allow saving of files as sudo when I forgot to start vim using sudo. +cmap w!! w !sudo tee > /dev/null % + +" Highlight characters over 80 +"augroup vimrc_autocmds +" autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#111111 +" autocmd BufEnter * match OverLength /\%81v.*/ +"augroup END + +" Make Vim able to edit crontab files again. +set backupskip=/tmp/*,/private/tmp/* +set backup " enable backups +set noswapfile " it's 2015, Vim. +set undodir=~/.vim/tmp/undo// " undo files +set backupdir=~/.vim/tmp/backup// " backups +set directory=~/.vim/tmp/swap// " swap files +" Make those folders automatically if they don't already exist. +if !isdirectory(expand(&undodir)) + call mkdir(expand(&undodir), "p") +endif +if !isdirectory(expand(&backupdir)) + call mkdir(expand(&backupdir), "p") +endif +if !isdirectory(expand(&directory)) + call mkdir(expand(&directory), "p") +endif + +" Resize splits when the window is resized +au VimResized * :wincmd = + +set modelines=1 +set showmode +set history=700 +set undofile +set undoreload=10000 +set matchtime=3 +set splitbelow +set splitright +set autowrite +set autoread +set shiftround +set title +set linebreak +set colorcolumn=+1 + +" Enable filetype plugins +filetype plugin on +filetype indent on + +"Always show current position +set ruler + +"Clipboard stuff +set clipboard=unnamedplus + +" Height of the command bar +set cmdheight=2 + +" A buffer becomes hidden when it is abandoned +set hid + +" Configure backspace so it acts as it should act +set backspace=eol,start,indent +set whichwrap+=<,>,h,l + +" Ignore case when searching +set ignorecase + +" When searching try to be smart about cases +set smartcase + +" Highlight search results +set hlsearch + +" Makes search act like search in modern browsers +set incsearch + +" Don't redraw while executing macros (good performance config) +set lazyredraw + +" For regular expressions turn magic on +set magic + +" Show matching brackets when text indicator is over them +set showmatch + +" No annoying sound on errors +set noerrorbells +set novisualbell +set t_vb= + +"http://sunaku.github.io/vim-256color-bce.html +set t_ut= +set tm=500 + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Colors and Fonts +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Sets 256 color mode if the terminal supports it +set t_Co=256 + +" Enable syntax highlighting +syntax enable + +set nu +set background=dark +"let g:solarized_termcolors=256 +" colorscheme brogrammer + +" Set utf8 as standard encoding and en_US as the standard language +set encoding=utf8 + +" Use Unix as the standard file type +set ffs=unix,dos,mac + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Text, tab and indent related +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Use spaces instead of tabs +set expandtab + +" Be smart when using tabs ;) +set smarttab + +" 1 tab == 4 spaces +set shiftwidth=4 +set tabstop=4 + +" Linebreak on 500 characters +set lbr +set tw=500 + +set ai "Auto indent +set si "Smart indent +set wrap "Wrap lines + + +"""""""""""""""""""""""""""""" +" => Visual mode related +"""""""""""""""""""""""""""""" +" Visual mode pressing * or # searches for the current selection +" Super useful! From an idea by Michael Naumann +vnoremap * :call VisualSelection('f') +vnoremap # :call VisualSelection('b') + + +"""""""""""""""""""""""""""""" +" => Status line +"""""""""""""""""""""""""""""" +" Always show the status line +"set laststatus=1 + +" Format the status line +"set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Moving around, tabs, windows and buffers +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Resize splits +map + - +map - + +map > < +map < > + +" Close the current buffer +map bd :Bclose + +" Close all the buffers +map ba :1,1000 bd! + +" Useful mappings for managing tabs +map tn :tabnew +map to :tabonly +map tc :tabclose +map tm :tabmove + +" Opens a new tab with the current buffer's path +" Super useful when editing files in the same directory +map te :tabedit =expand("%:p:h")/ + +" Switch CWD to the directory of the open buffer +map cd :cd %:p:h:pwd + +" Specify the behavior when switching between buffers +try + set switchbuf=useopen,usetab,newtab + set stal=2 +catch +endtry + +" Return to last edit position when opening files (You want this!) +autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif +" Remember info about open buffers on close +set viminfo^=% + +" Vim split options +" Remaps ctrl w + $key to ctrl $key +" ctrl j = move right +nnoremap +" ctrl k = move up +nnoremap +" ctrl l = move down +nnoremap +" ctrl h = move left +nnoremap + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Helper functions +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +function! CmdLine(str) + exe "menu Foo.Bar :" . a:str + emenu Foo.Bar + unmenu Foo +endfunction + +function! VisualSelection(direction) range + let l:saved_reg = @" + execute "normal! vgvy" + + let l:pattern = escape(@", '\\/.*$^~[]') + let l:pattern = substitute(l:pattern, "\n$", "", "") + + if a:direction == 'b' + execute "normal ?" . l:pattern . "^M" + elseif a:direction == 'gv' + call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.') + elseif a:direction == 'replace' + call CmdLine("%s" . '/'. l:pattern . '/') + elseif a:direction == 'f' + execute "normal /" . l:pattern . "^M" + endif + + let @/ = l:pattern + let @" = l:saved_reg +endfunction + + +" Returns true if paste mode is enabled +function! HasPaste() + if &paste + return 'PASTE MODE ' + en + return '' +endfunction + + +" Trailing whitespace {{{ +" Only shown when not in insert mode so I don't go insane. +augroup trailing + au! + au InsertEnter * :set listchars-=trail:⌴ + au InsertLeave * :set listchars+=trail:⌴ +augroup END + +" Make sure Vim returns to the same line when you reopen a file. +augroup line_return + au! + au BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ execute 'normal! g`"zvzz' | + \ endif +augroup END + +" Reselect last-pasted text +nnoremap gp `[v`] + +"""""""""""""""""""" +" PATHOGEN PLUGINS " +"""""""""""""""""""" + +" START NERDTree if no files are specified +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif + +" Close NERDTree if it's the only window left open +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif + +" https://github.com/nathanaelkane/vim-indent-guides/issues/20 +let g:indent_guides_exclude_filetypes = ['nerdtree'] +" END NERDTree + +" START Airline +let g:airline#extensions#tabline#enabled = 1 +set laststatus=2 +let g:airline_theme='murmur' +let g:airline#extensions#hunks#enabled=0 +let g:airline#extensions#branch#enabled=1 +" END Airline + +" START windowswap +let g:windowswap_map_keys = 0 "prevent default bindings +nnoremap yw :call WindowSwap#MarkWindowSwap() +nnoremap pw :call WindowSwap#DoWindowSwap() +nnoremap ww :call WindowSwap#EasyWindowSwap() +" END windowswap + +" START ctrlp +set runtimepath^=~/.vim/bundle/ctrlp.vim +" END ctrlp + +" START ansible-vim +let g:ansible_extra_keywords_highlight = 1 +let g:ansible_name_highlight = 'b' +let g:ansible_extra_syntaxes = "sh.vim" + +func! DeleteTrailingWS() + exe "normal mz" + %s/\s\+$//ge + exe "normal `z" +endfunc +autocmd BufWrite * :call DeleteTrailingWS() + +" START vim-hclfmt +let g:hcl_fmt_autosave = 1 +let g:tf_fmt_autosave = 0 +let g:nomad_fmt_autosave = 1 +" END vim-hclfmt + +nmap :call ToggleIndentGuidesSpaces() +function! ToggleIndentGuidesSpaces() + if exists('b:iguides_spaces') + call matchdelete(b:iguides_spaces) + unlet b:iguides_spaces + else + let pos = range(1, &l:textwidth, &l:shiftwidth) + call map(pos, '"\\%" . v:val . "v"') + let pat = '\%(\_^\s*\)\@<=\%(' . join(pos, '\|') . '\)\s' + let b:iguides_spaces = matchadd('CursorLine', pat) + endif +endfunction + +" START vim-hashicorp-terraform +let g:terraform_align = 1 +" END vim-hashicorp-terraform diff --git a/README.md b/README.md new file mode 100644 index 0000000..488e18d --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Installation +### Download and change folder +``` +cd ~ +git clone https://github.com/z3r0bu6/dotfiles.git + +cd dotfiles +``` +### Run intstall +``` +./install.sh +Or +bash install.sh +``` + diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..6f7269f --- /dev/null +++ b/install.sh @@ -0,0 +1,15 @@ +#!/bin/bash +for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do + if [ -e ~/$file ]; then + mv -f ~/$file{,.dtbak} + fi + ln -s $PWD/$file ~/$file +done + if hash vim-addon 2>/dev/null; then + echo "vim-addon (vim-scripts) installed" + else + echo "vim-addon (vim-scripts) not installed, running 'sudo yum update; sudo apt install bc'" + sudo apt update; sudo apt install vim-scripts +fi + +echo "Installed" diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..52b3c17 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash +for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do + if [ -h ~/$file ]; then + rm -f ~/$file + fi + if [ -e ~/${file}.dtbak ]; then + mv -f ~/$file{.dtbak,} + fi +done +echo "Uninstalled"