mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-21 22:33:42 +01: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
|
keychain
|
||||||
nomachine
|
nomachine
|
||||||
chili-sddm-theme
|
chili-sddm-theme
|
||||||
robo3t-bin
|
|
||||||
dive
|
dive
|
||||||
gnome-text-editor
|
gnome-text-editor
|
||||||
greenclip
|
greenclip
|
||||||
|
37
dependencies/pacman.txt
vendored
37
dependencies/pacman.txt
vendored
@ -3,14 +3,9 @@
|
|||||||
#
|
#
|
||||||
base-devel
|
base-devel
|
||||||
git
|
git
|
||||||
xorg-server
|
wget
|
||||||
xorg-xinit
|
|
||||||
mesa
|
|
||||||
libconfig
|
libconfig
|
||||||
compton
|
|
||||||
wmctrl
|
wmctrl
|
||||||
zenity
|
|
||||||
xorg-xrandr
|
|
||||||
acpi
|
acpi
|
||||||
ntp
|
ntp
|
||||||
openssh
|
openssh
|
||||||
@ -18,10 +13,26 @@ gvfs-smb
|
|||||||
sddm
|
sddm
|
||||||
polkit-gnome
|
polkit-gnome
|
||||||
gnome-keyring
|
gnome-keyring
|
||||||
|
libgnome-keyring
|
||||||
|
python-keyring
|
||||||
libsecret
|
libsecret
|
||||||
seahorse
|
seahorse
|
||||||
|
reflector
|
||||||
|
|
||||||
|
#
|
||||||
|
# i3wm
|
||||||
|
#
|
||||||
i3-gaps
|
i3-gaps
|
||||||
i3lock
|
i3lock
|
||||||
|
xorg-xrandr
|
||||||
|
|
||||||
|
#
|
||||||
|
# Xorg stuff
|
||||||
|
#
|
||||||
|
xorg-server
|
||||||
|
xorg-xinit
|
||||||
|
mesa
|
||||||
|
zenity
|
||||||
|
|
||||||
#
|
#
|
||||||
# Programming
|
# Programming
|
||||||
@ -93,9 +104,7 @@ neofetch
|
|||||||
network-manager-applet
|
network-manager-applet
|
||||||
networkmanager
|
networkmanager
|
||||||
networkmanager-l2tp
|
networkmanager-l2tp
|
||||||
noto-fonts-emoji
|
|
||||||
obsidian
|
obsidian
|
||||||
otf-font-awesome
|
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
pavucontrol
|
pavucontrol
|
||||||
peek
|
peek
|
||||||
@ -114,10 +123,16 @@ system-config-printer
|
|||||||
thefuck
|
thefuck
|
||||||
thunar
|
thunar
|
||||||
thunar-archive-plugin
|
thunar-archive-plugin
|
||||||
ttf-font-awesome
|
|
||||||
ttf-ubuntu-font-family
|
|
||||||
w3m
|
w3m
|
||||||
wget
|
|
||||||
xclip
|
xclip
|
||||||
xfce4-terminal
|
xfce4-terminal
|
||||||
xorg-xkill
|
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
|
#!/bin/bash
|
||||||
|
|
||||||
|
# =======================================
|
||||||
|
# Script setup
|
||||||
|
# =======================================
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
# =======================================
|
# =======================================
|
||||||
# Helper functions
|
# Helper functions
|
||||||
# =======================================
|
# =======================================
|
||||||
@ -45,7 +52,7 @@ function linkDir {
|
|||||||
|
|
||||||
# replace line endings with a space (for use in package managers)
|
# replace line endings with a space (for use in package managers)
|
||||||
function fileToList {
|
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
|
# 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/notify-osd/notify-osd ~/.notify-osd
|
||||||
linkDir "$PWD"/config/terminal/xfce4-term ~/.config/xfce4/terminal
|
linkDir "$PWD"/config/terminal/xfce4-term ~/.config/xfce4/terminal
|
||||||
linkDir "$PWD"/config/polybar ~/.config/polybar
|
linkDir "$PWD"/config/polybar ~/.config/polybar
|
||||||
linkDir "$PWD"/bash/.aliases ~/
|
|
||||||
|
|
||||||
# link user files
|
# link user files
|
||||||
|
ln -sf "$PWD"/bash/.aliases ~/
|
||||||
ln -sf "$PWD"/bash/.bashrc ~/.bashrc
|
ln -sf "$PWD"/bash/.bashrc ~/.bashrc
|
||||||
ln -sf "$PWD"/bash/.dotnet-install.sh ~/.dotnet-install.sh
|
ln -sf "$PWD"/bash/.dotnet-install.sh ~/.dotnet-install.sh
|
||||||
ln -sf "$PWD"/bash/.alias.sh ~/.alias
|
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/mimeapps.list ~/.config/mimeapps.list
|
||||||
ln -sf "$PWD"/config/greenclip.toml ~/.config/greenclip.toml
|
ln -sf "$PWD"/config/greenclip.toml ~/.config/greenclip.toml
|
||||||
ln -sf "$PWD"/config/terminalrc ~/.config/xfce4/terminal/terminalrc
|
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
|
mkdir -p ~/.config/rofi
|
||||||
ln -sf "$PWD"/config/rofi/rofi.rasi ~/.config/rofi/config.rasi
|
ln -sf "$PWD"/config/rofi/rofi.rasi ~/.config/rofi/config.rasi
|
||||||
@ -150,12 +159,15 @@ function install_dependencies {
|
|||||||
|
|
||||||
install_trizen
|
install_trizen
|
||||||
fileToList dependencies/aur.txt | xargs trizen -S --noconfirm
|
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
|
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
|
# User output functions
|
||||||
# =======================================
|
# =======================================
|
||||||
@ -214,6 +226,11 @@ ask "Do you want to continue installing my config and rice?" Y &&
|
|||||||
install_dependencies
|
install_dependencies
|
||||||
fi
|
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
|
# Ask for config installation
|
||||||
if ask "Do you want to install the config files?" Y; then
|
if ask "Do you want to install the config files?" Y; then
|
||||||
install_config
|
install_config
|
||||||
|
Loading…
Reference in New Issue
Block a user