Compare commits

...

3 Commits

Author SHA1 Message Date
24ac06f925 Start updating install script 2021-11-15 20:05:04 +01:00
89eacee8c4 Add tmux config 2021-11-15 20:04:52 +01:00
85c3b5e36b Add pyenv support 2021-11-15 20:04:41 +01:00
3 changed files with 87 additions and 23 deletions

View File

@ -1,8 +1,9 @@
set -x DOTFILES $HOME/dotfiles
if test -z "$FISH_SETUP_PATH"
set -x PATH $HOME/dotfiles/bin $PATH
set -x PATH . $PATH
set -xp PATH $HOME/.pyenv/bin
set -xp PATH $HOME/dotfiles/bin
set -xp PATH .
set -x FISH_SETUP_PATH
end
@ -11,4 +12,9 @@ set -x LANG sv_SE.UTF-8
set -x LC_ALL sv_SE.UTF-8
set -x EDITOR nvim
alias v vim
alias v nvim
if type -q pyenv
pyenv init --path | source
end
# pyenv virtualenv-init - | source

View File

@ -1,11 +1,41 @@
#!/bin/bash
sudo -n apt-get update
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
function install_dependencies() {
sudo -n apt-get update
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
fish \
neovim
}
function setup_ssh() {
mkdir -p ~/.ssh
touch ~/.ssh/config
chmod 644 ~/.ssh/config
}
function setup_git() {
cat << EOF > ~/.gitconfig
[include]
path = ${HOME}/dotfiles/git/gitconfig
[core]
excludesfile = ${HOME}/dotfiles/git/gitignore_global
EOF
mkdir -p ~/.ssh
cat << EOF >> ~/.ssh/config
Host github.com
User git
Host gitea
HostName git.torpet.thomasloven.com
User git
EOF
chmod 644 ~/.ssh/config
}
USER=`whoami`
install_dependencies
sudo -n chsh $USER -s $(which fish)
echo "exec $(which fish) -l" >> ~/.profile
echo "exec $(which fish) -l" >> ~/.bashrc
@ -14,24 +44,11 @@ echo "exec $(which fish) -l" >> ~/.zshrc
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
sudo locale-gen
cat << EOF > ~/.gitconfig
[include]
path = ${HOME}/dotfiles/git/gitconfig
[core]
excludesfile = ${HOME}/dotfiles/git/gitignore_global
EOF
mkdir -p ~/.ssh
cat << EOF > ~/.ssh/config
Host github.com
User git
Host gitea
HostName git.torpet.thomasloven.com
User git
EOF
chmod 644 ~/.ssh/config
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

41
tmux/tmux.conf Normal file
View File

@ -0,0 +1,41 @@
setw -g mode-keys vi
set -g default-terminal tmux-256color
set-option -g base-index 1
set-option -g prefix C-a
unbind C-b
bind a send-prefix
bind-key C-a last-window
unbind %
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind-key / split-window -h -c "#{pane_current_path}"
bind-key c neww -c "#{pane_current_path}"
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key k confirm-before -p "Kill window #w? (y/n)" kill-window
set -g mouse on
unbind Space
bind-key Space next-window
set -sg escape-time 50
set -g status-justify centre
set -g status-bg colour16
set -g status-left-length 100
set -g status-fg colour12
set -g status-left '#[fg=green]#(hostname -s)#[fg=colour12]:#[fg=colour12]#S '
set -g window-status-format '#[fg=colour12]#I:#W '
set -g window-status-current-format '#[fg=red]#I:#W#[fg=green]#F #[fg=colour12]'