Compare commits
No commits in common. "5b30acf596603f8999f3505c619a65294a081522" and "311d6a678ba6c5290bc31086773bd57c3e2504eb" have entirely different histories.
5b30acf596
...
311d6a678b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
fish/fish_variables
|
||||
fish/local.fish
|
@ -2,9 +2,7 @@ set -x DOTFILES $HOME/dotfiles
|
||||
|
||||
if test -z "$FISH_SETUP_PATH"
|
||||
set -xp PATH $HOME/.pyenv/bin
|
||||
set -xp PATH $HOME/.local/bin
|
||||
set -xp PATH $HOME/dotfiles/bin
|
||||
set -xp PATH $HOME/bin
|
||||
set -xp PATH .
|
||||
|
||||
set -x FISH_SETUP_PATH
|
||||
@ -22,16 +20,4 @@ end
|
||||
# pyenv virtualenv-init - | source
|
||||
|
||||
alias dc="docker-compose"
|
||||
alias dce="docker-compose exec"
|
||||
alias drh="docker run -it --rm -v (pwd):/usr/(pwd) -w /usr/(pwd)"
|
||||
|
||||
|
||||
fish_vi_key_bindings
|
||||
|
||||
|
||||
# Include local config if present
|
||||
|
||||
if test -r $DOTFILES/fish/local.fish
|
||||
source $DOTFILES/fish/local.fish
|
||||
end
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
[user]
|
||||
name = Thomas Lovén
|
||||
email = thomasloven@gmail.com
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[credential]
|
||||
helper = cache
|
||||
[color]
|
||||
|
24
init.vim
24
init.vim
@ -1,43 +1,24 @@
|
||||
" Display tab characters, trailing spaces and nbsp
|
||||
set list
|
||||
set listchars=tab:→\ ,trail:␣,nbsp:⋅
|
||||
|
||||
" Remove unnecessary stuff from bottom of window
|
||||
set noruler
|
||||
set laststatus=2
|
||||
|
||||
" Nice line numbers
|
||||
set number
|
||||
set relativenumber
|
||||
|
||||
" Spaces over tabs every day of the week (except in makefiles)
|
||||
set expandtab
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
set smartindent
|
||||
|
||||
" Window navigation shortcuts
|
||||
nnoremap <c-h> <c-w>h
|
||||
nnoremap <c-j> <c-w>j
|
||||
nnoremap <c-k> <c-w>k
|
||||
nnoremap <c-l> <c-w>l
|
||||
|
||||
" ö for quick command access on Swedish keyboards
|
||||
nnoremap ö :
|
||||
|
||||
" Some navigation shortcuts for Swedish keyboards
|
||||
nnoremap - `
|
||||
nmap Å [
|
||||
nmap å ]
|
||||
omap Å [
|
||||
omap å ]
|
||||
xmap Å [
|
||||
xmap å ]
|
||||
noremap ÅÅ [[
|
||||
noremap åå ]]
|
||||
|
||||
" Some searching options
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set incsearch
|
||||
@ -48,7 +29,4 @@ noremap / /\v
|
||||
nnoremap * *N
|
||||
noh
|
||||
|
||||
set hidden
|
||||
|
||||
" Uppercase last word on c-^
|
||||
inoremap <C-]> <Esc>gUiw`]a
|
||||
set hidden
|
69
install.sh
69
install.sh
@ -4,17 +4,13 @@ function install_dependencies() {
|
||||
sudo -n apt-get update
|
||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
fish \
|
||||
neovim \
|
||||
tmux
|
||||
neovim
|
||||
}
|
||||
|
||||
function setup_ssh() {
|
||||
mkdir -p ~/.ssh
|
||||
touch ~/.ssh/config
|
||||
chmod 644 ~/.ssh/config
|
||||
cat << EOF >> ~/.ssh/config
|
||||
Include ${HOME}/dotfiles/ssh.config
|
||||
EOF
|
||||
}
|
||||
|
||||
function setup_git() {
|
||||
@ -26,50 +22,43 @@ function setup_git() {
|
||||
EOF
|
||||
|
||||
setup_ssh
|
||||
}
|
||||
|
||||
function setup_tmux() {
|
||||
cat << EOF > ~/.tmux.conf
|
||||
source ${HOME}/dotfiles/tmux/tmux.conf
|
||||
cat << EOF >> ~/.ssh/config
|
||||
Host *
|
||||
AddKeysToAgent yes
|
||||
IdentityFile ~/.ssh/thomas_rsa
|
||||
VisualHostKey yes
|
||||
Host github.com
|
||||
User git
|
||||
Host gitea
|
||||
HostName git.thomasloven.com
|
||||
User git
|
||||
EOF
|
||||
|
||||
}
|
||||
|
||||
function setup_fish() {
|
||||
USER=`whoami`
|
||||
sudo -n chsh $USER -s $(which fish)
|
||||
# Force fish shell for devcontainers
|
||||
echo "exec $(which fish) -l" >> ~/.profile
|
||||
echo "exec $(which fish) -l" >> ~/.bashrc
|
||||
echo "exec $(which fish) -l" >> ~/.zshrc
|
||||
USER=`whoami`
|
||||
|
||||
mkdir -p ~/.config/
|
||||
ln -s ~/dotfiles/fish ~/.config/fish
|
||||
}
|
||||
if [[ ${REMOTE_CONTAINERS} || ${DEVCONTAINER} ]]; then
|
||||
|
||||
function setup_nvim() {
|
||||
mkdir -p ~/.config/nvim/
|
||||
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
||||
}
|
||||
echo "INSTALLING IN DEVCONTAINER"
|
||||
|
||||
function main() {
|
||||
fi
|
||||
|
||||
if [[ ${REMOTE_CONTAINERS} || ${DEVCONTAINER} ]]; then
|
||||
install_dependencies
|
||||
|
||||
echo "INSTALLING IN DEVCONTAINER"
|
||||
sudo -n chsh $USER -s $(which fish)
|
||||
echo "exec $(which fish) -l" >> ~/.profile
|
||||
echo "exec $(which fish) -l" >> ~/.bashrc
|
||||
echo "exec $(which fish) -l" >> ~/.zshrc
|
||||
|
||||
fi
|
||||
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
||||
sudo locale-gen
|
||||
|
||||
install_dependencies
|
||||
setup_ssh
|
||||
setup_git
|
||||
|
||||
mkdir -p ~/.config/
|
||||
ln -s ~/dotfiles/fish ~/.config/fish
|
||||
mkdir -p ~/.config/nvim/
|
||||
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
||||
|
||||
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
||||
sudo locale-gen
|
||||
|
||||
setup_fish
|
||||
setup_ssh
|
||||
setup_git
|
||||
setup_tmux
|
||||
setup_nvim
|
||||
}
|
||||
|
||||
main $@
|
||||
|
@ -1,8 +0,0 @@
|
||||
Host *
|
||||
AddKeysToAgent yes
|
||||
VisualHostKey yes
|
||||
Host github.com
|
||||
User git
|
||||
Host gitea
|
||||
HostName git.thomasloven.com
|
||||
User git
|
@ -4,9 +4,6 @@ cd "$(dirname "$0")/.."
|
||||
|
||||
docker build . -t dotfiles -f test/Dockerfile.devcontainer --force-rm
|
||||
|
||||
docker run --rm -it \
|
||||
-v $(pwd):/workspaces/test \
|
||||
-v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK\
|
||||
dotfiles zsh
|
||||
docker run --rm -it -v $(pwd):/workspaces/test dotfiles zsh
|
||||
|
||||
docker rmi dotfiles
|
||||
|
Loading…
x
Reference in New Issue
Block a user