mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-10-12 20:16:16 +02:00
fixed install.sh removing the entire home directory
This commit is contained in:
parent
c584e93215
commit
0a67016b07
8
config/git/settings.yml
Normal file
8
config/git/settings.yml
Normal file
@ -0,0 +1,8 @@
|
||||
# current machine's name, optional; it can be used to filter settings or in the commit message
|
||||
hostname: ""
|
||||
profile: main
|
||||
# sync on remote git
|
||||
repository:
|
||||
type: git
|
||||
url: git@github.com:Mastermindzh/code-settings.git
|
||||
branch: master
|
1
dependencies/aur.txt
vendored
1
dependencies/aur.txt
vendored
@ -18,7 +18,6 @@ sysmontask
|
||||
keychain
|
||||
nomachine
|
||||
chili-sddm-theme
|
||||
robo3t-bin
|
||||
dive
|
||||
gnome-text-editor
|
||||
greenclip
|
||||
|
37
dependencies/pacman.txt
vendored
37
dependencies/pacman.txt
vendored
@ -3,14 +3,9 @@
|
||||
#
|
||||
base-devel
|
||||
git
|
||||
xorg-server
|
||||
xorg-xinit
|
||||
mesa
|
||||
wget
|
||||
libconfig
|
||||
compton
|
||||
wmctrl
|
||||
zenity
|
||||
xorg-xrandr
|
||||
acpi
|
||||
ntp
|
||||
openssh
|
||||
@ -18,10 +13,26 @@ gvfs-smb
|
||||
sddm
|
||||
polkit-gnome
|
||||
gnome-keyring
|
||||
libgnome-keyring
|
||||
python-keyring
|
||||
libsecret
|
||||
seahorse
|
||||
reflector
|
||||
|
||||
#
|
||||
# i3wm
|
||||
#
|
||||
i3-gaps
|
||||
i3lock
|
||||
xorg-xrandr
|
||||
|
||||
#
|
||||
# Xorg stuff
|
||||
#
|
||||
xorg-server
|
||||
xorg-xinit
|
||||
mesa
|
||||
zenity
|
||||
|
||||
#
|
||||
# Programming
|
||||
@ -93,9 +104,7 @@ neofetch
|
||||
network-manager-applet
|
||||
networkmanager
|
||||
networkmanager-l2tp
|
||||
noto-fonts-emoji
|
||||
obsidian
|
||||
otf-font-awesome
|
||||
papirus-icon-theme
|
||||
pavucontrol
|
||||
peek
|
||||
@ -114,10 +123,16 @@ system-config-printer
|
||||
thefuck
|
||||
thunar
|
||||
thunar-archive-plugin
|
||||
ttf-font-awesome
|
||||
ttf-ubuntu-font-family
|
||||
|
||||
w3m
|
||||
wget
|
||||
|
||||
xclip
|
||||
xfce4-terminal
|
||||
xorg-xkill
|
||||
|
||||
# fonts
|
||||
fontconfig
|
||||
noto-fonts-emoji
|
||||
otf-font-awesome
|
||||
ttf-font-awesome
|
||||
ttf-ubuntu-font-family
|
||||
|
5
dependencies/pip.txt
vendored
5
dependencies/pip.txt
vendored
@ -1,5 +0,0 @@
|
||||
msrestazure
|
||||
azure.common
|
||||
azure.mgmt
|
||||
azure.mgmt.containerservice
|
||||
azure.graphrbac
|
27
install.sh
27
install.sh
@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# =======================================
|
||||
# Script setup
|
||||
# =======================================
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# =======================================
|
||||
# Helper functions
|
||||
# =======================================
|
||||
@ -45,7 +52,7 @@ function linkDir {
|
||||
|
||||
# replace line endings with a space (for use in package managers)
|
||||
function fileToList {
|
||||
echo $(cat "$1" | sed '/^\s*#\([^!]\|$\)/d' | sed ':a;N;$!ba;s/\n/ /g')
|
||||
echo $(cat "$1" | sed '/^\s*#\([^!]\|$\)/d' | tr +'\n' ' ' | tr -s ' ')
|
||||
}
|
||||
|
||||
# create and copy files to directory
|
||||
@ -91,9 +98,9 @@ function install_config {
|
||||
linkDir "$PWD"/config/notify-osd/notify-osd ~/.notify-osd
|
||||
linkDir "$PWD"/config/terminal/xfce4-term ~/.config/xfce4/terminal
|
||||
linkDir "$PWD"/config/polybar ~/.config/polybar
|
||||
linkDir "$PWD"/bash/.aliases ~/
|
||||
|
||||
# link user files
|
||||
ln -sf "$PWD"/bash/.aliases ~/
|
||||
ln -sf "$PWD"/bash/.bashrc ~/.bashrc
|
||||
ln -sf "$PWD"/bash/.dotnet-install.sh ~/.dotnet-install.sh
|
||||
ln -sf "$PWD"/bash/.alias.sh ~/.alias
|
||||
@ -105,6 +112,8 @@ function install_config {
|
||||
ln -sf "$PWD"/config/mimeapps.list ~/.config/mimeapps.list
|
||||
ln -sf "$PWD"/config/greenclip.toml ~/.config/greenclip.toml
|
||||
ln -sf "$PWD"/config/terminalrc ~/.config/xfce4/terminal/terminalrc
|
||||
mkdir -p ~/.config/Code/User/globalStorage/zokugun.sync-settings
|
||||
ln -sf "$PWD"/config/git/settings.yml ~/.config/Code/User/globalStorage/zokugun.sync-settings/settings.yml
|
||||
|
||||
mkdir -p ~/.config/rofi
|
||||
ln -sf "$PWD"/config/rofi/rofi.rasi ~/.config/rofi/config.rasi
|
||||
@ -150,12 +159,15 @@ function install_dependencies {
|
||||
|
||||
install_trizen
|
||||
fileToList dependencies/aur.txt | xargs trizen -S --noconfirm
|
||||
|
||||
fileToList dependencies/pip.txt | xargs sudo pip install
|
||||
|
||||
fileToList dependencies/npm.txt | xargs sudo npm install -g
|
||||
}
|
||||
|
||||
# set up a new ssh key
|
||||
function create_ssh_key {
|
||||
ssh-keygen -t ed25519 -C "info@rickvanlieshout.com"
|
||||
eval "$(ssh-agent -s)"
|
||||
}
|
||||
|
||||
# =======================================
|
||||
# User output functions
|
||||
# =======================================
|
||||
@ -214,6 +226,11 @@ ask "Do you want to continue installing my config and rice?" Y &&
|
||||
install_dependencies
|
||||
fi
|
||||
|
||||
# Ask for SSH generation
|
||||
if ask "Do you want to generate a new SSH key?" Y; then
|
||||
create_ssh_key
|
||||
fi
|
||||
|
||||
# Ask for config installation
|
||||
if ask "Do you want to install the config files?" Y; then
|
||||
install_config
|
||||
|
Loading…
Reference in New Issue
Block a user