Merged changes from linux hosts
This commit is contained in:
11
.vimrc
11
.vimrc
@@ -108,8 +108,15 @@ endif
|
|||||||
" solarized config
|
" solarized config
|
||||||
set termguicolors
|
set termguicolors
|
||||||
set background=dark " or light
|
set background=dark " or light
|
||||||
colorscheme solarized
|
|
||||||
" colorscheme darcula
|
" colorscheme solarized
|
||||||
|
colorscheme darcula
|
||||||
|
|
||||||
|
" Check if the color scheme file is available before applying it
|
||||||
|
if exists("g:plugs['darcula']") && filereadable(expand("~/.vim/plugged/darcula/colors/darcula.vim"))
|
||||||
|
colorscheme darcula
|
||||||
|
endif
|
||||||
|
|
||||||
hi Visual term=reverse cterm=reverse guibg=Grey
|
hi Visual term=reverse cterm=reverse guibg=Grey
|
||||||
|
|
||||||
" open unfolded
|
" open unfolded
|
||||||
|
|||||||
2
.zshenv
2
.zshenv
@@ -6,7 +6,7 @@ export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/u
|
|||||||
|
|
||||||
|
|
||||||
alias oe='open /Applications/Emacs.app'
|
alias oe='open /Applications/Emacs.app'
|
||||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/.git/ --work-tree=$HOME'
|
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
alias -g N="2>&1 "
|
alias -g N="2>&1 "
|
||||||
alias pig='ping'
|
alias pig='ping'
|
||||||
# export PATH=$HOME/.rd/bin
|
# export PATH=$HOME/.rd/bin
|
||||||
|
|||||||
2
.zshrc
2
.zshrc
@@ -113,7 +113,7 @@ COMPLETION_WAITING_DOTS="true"
|
|||||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(git rsync colorize colored-man-pages vi-mode common-aliases macos themes dircycle iterm2 docker docker-compose zsh-navigation-tools urltools history mercurial tmux zsh-syntax-highlighting zsh-autosuggestions kubectl helm terraform asdf brew web-search)
|
plugins=(git rsync colorize colored-man-pages vi-mode common-aliases macos themes dircycle iterm2 docker docker-compose zsh-navigation-tools urltools history mercurial tmux zsh-syntax-highlighting zsh-autosuggestions kubectl helm terraform asdf brew web-search kubectl helm)
|
||||||
|
|
||||||
# consider plugin fzf - only available for Mac/Linux
|
# consider plugin fzf - only available for Mac/Linux
|
||||||
|
|
||||||
|
|||||||
15
README.org
15
README.org
@@ -1,6 +1,12 @@
|
|||||||
* How to set up this configuration
|
* How to set up this configuration
|
||||||
|
|
||||||
** basic setup
|
** Automated setup
|
||||||
|
|
||||||
|
#+begin_src sh
|
||||||
|
bash -c "$(curl -fsSL https://git.meinlschmidt.org/jetpac/dotfiles/raw/branch/main/bootstrap.sh)"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** manual setup
|
||||||
|
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
# for linux; ignore on other systems
|
# for linux; ignore on other systems
|
||||||
@@ -14,14 +20,17 @@
|
|||||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
config config --local status.showUntrackedFiles no
|
config config --local status.showUntrackedFiles no
|
||||||
config checkout
|
config checkout
|
||||||
zsh
|
|
||||||
|
|
||||||
source ~/.proxies
|
source ~/.proxies
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --unattended --skip-chsh --keep-zshrc"
|
||||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
|
||||||
|
vim +PlugInstall +qall
|
||||||
|
|
||||||
|
zsh
|
||||||
|
|
||||||
# run tmux, prefix + I installs all plugins (needs to have proxies set)
|
# run tmux, prefix + I installs all plugins (needs to have proxies set)
|
||||||
# run vim, :PlugInstall
|
# run vim, :PlugInstall
|
||||||
|
|
||||||
|
|||||||
81
bootstrap.sh
Executable file
81
bootstrap.sh
Executable file
@@ -0,0 +1,81 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
check_installed() {
|
||||||
|
_pkgs=("$@")
|
||||||
|
all_installed=true
|
||||||
|
for pkg in "${_pkgs[@]}"; do
|
||||||
|
if ! command -v "$pkg" > /dev/null 2>&1; then
|
||||||
|
all_installed=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
$all_installed && return 0 || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
install_packages() {
|
||||||
|
# List of packages to install
|
||||||
|
packages=(zsh git)
|
||||||
|
|
||||||
|
if ! check_installed "${packages[@]}"; then
|
||||||
|
# Determine which package manager is available
|
||||||
|
if check_installed apt; then
|
||||||
|
echo "Using apt to install packages..."
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y "${packages[@]}"
|
||||||
|
elif check_installed dnf; then
|
||||||
|
echo "Using dnf to install packages..."
|
||||||
|
sudo dnf install -y "${packages[@]}"
|
||||||
|
elif check_installed yum; then
|
||||||
|
echo "Using yum to install packages..."
|
||||||
|
sudo yum install -y "${packages[@]}"
|
||||||
|
elif check_installed brew; then
|
||||||
|
echo "Using Homebrew to install packages..."
|
||||||
|
brew install "${packages[@]}"
|
||||||
|
else
|
||||||
|
echo "No supported package manager found (apt, dnf, yum, brew)."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
clone_repos () {
|
||||||
|
git clone --bare https://git.meinlschmidt.org/jetpac/dotfiles.git ~/.cfg
|
||||||
|
# alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
|
git --git-dir=$HOME/.cfg config --local status.showUntrackedFiles no
|
||||||
|
git --git-dir=$HOME/.cfg --work-tree=$HOME checkout
|
||||||
|
|
||||||
|
|
||||||
|
# install oh-my-zsh
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/install_ohmyzsh.sh
|
||||||
|
bash /tmp/install_ohmyzsh.sh --unattended --skip-chsh --keep-zshrc
|
||||||
|
|
||||||
|
# powerlevel10k
|
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||||
|
|
||||||
|
# tmux tpm plugin manager
|
||||||
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
|
|
||||||
|
# plug for installing vim plugins
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_vim() {
|
||||||
|
vim +PlugInstall +qall
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_tmux() {
|
||||||
|
echo "run tmux, prefix + I installs all plugins (needs to have proxies set)"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Call the function to execute the installation
|
||||||
|
install_packages
|
||||||
|
clone_repos
|
||||||
|
configure_vim
|
||||||
|
configure_tmux
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# vim: foldmethod=marker:foldmarker={,}:expandtab:sw=4:ts=4:
|
||||||
Reference in New Issue
Block a user