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