Files
dotfiles/setup_ubuntu_shared.zsh
T

40 lines
1.3 KiB
Bash
Raw Normal View History

2024-07-01 13:39:53 +00:00
#! /usr/bin/zsh
2024-01-10 16:29:27 +01:00
#
# clone_and_link.sh
# Copyright (C) 2016 fabian <fabian@fabi-laptop-arch>
#
# Distributed under terms of the MIT license.
#
sudo apt -y update
sudo apt -y dist-upgrade
2026-10-15 13:18:40 +02:00
sudo apt -y install curl zsh tmux virtualenvwrapper powerline fonts-powerline python3 python3-pip python3-pynvim fzf
2025-05-09 13:56:27 +02:00
sudo snap install --classic nvim
# VMs: the guest agent lets the hypervisor read OS info (virsh guestinfo --os)
default=N; [[ $(systemd-detect-virt 2>/dev/null) == (kvm|qemu) ]] && default=Y
read -r "vm?Is this a VM? [$( [[ $default == Y ]] && echo Y/n || echo y/N )] "
if [[ ${vm:-$default} == [yY]* ]]; then
sudo apt -y install qemu-guest-agent
# Static unit, started by udev; it only runs if the VM defines the channel
if [[ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]]; then
sudo systemctl start qemu-guest-agent
else
echo "No guest agent channel: add org.qemu.guest_agent.0 to the VM definition" >&2
fi
fi
2024-01-10 16:29:27 +01:00
./clone_and_link.sh shared; true
if [ $SHELL != "/bin/zsh" ]; then
chsh -s /usr/bin/zsh;
fi
2024-07-01 13:39:53 +00:00
for filename in zsh/.*_debian.example(N); do
2024-12-20 12:47:54 +01:00
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
2024-01-10 16:29:27 +01:00
done
2024-07-01 13:39:53 +00:00
for filename in tmux/.*_debian.example(N); do
2024-12-20 12:47:54 +01:00
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
2024-01-10 16:29:27 +01:00
done
2024-07-01 13:39:53 +00:00
for filename in nvim/.*_debian.example(N); do
2024-12-20 12:47:54 +01:00
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
2024-01-10 16:29:27 +01:00
done