-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-dots
More file actions
executable file
·95 lines (73 loc) · 3.35 KB
/
Copy pathupdate-dots
File metadata and controls
executable file
·95 lines (73 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
# Pretty print (function).
info_print () {
echo -e "${BOLD}${BGREEN}[ ${BYELLOW}•${BGREEN} ] $1${RESET}"
}
# Pretty print for input (function).
input_print () {
echo -ne "${BOLD}${BYELLOW}[ ${BGREEN}•${BYELLOW} ] $1${RESET}"
}
# Alert user of bad input (function).
error_print () {
echo -e "${BOLD}${BRED}[ ${BBLUE}•${BRED} ] $1${RESET}"
}
isPackageInstalled() {
pacman -Qi "$packageName" &> /dev/null
echo $?
}
# CD into dotfiles and initialise the git submodules
git submodule init
git submodule update --remote --merge
# source "$HOME/.config/zsh/.zshrc"
# mkdir -p $HOME/.config
# cp -rv "$HOME/nescafe-dotfiles/config/zsh" "$HOME/.config"
# make all the directories defined in the zshenv
# mkdir -p "$HOME/.local/share/fonts XDG_DATA_HOME XDG_CACHE_HOME $XDG_CACHE_HOME/packages XDG_CONFIG_HOME GEM_PATH GEM_SPEC_CACHE NPM_CONFIG_USERCONFIG GNUPGHOME _JAVA_OPTIONS GTK2_RC_FILES ZDOTDIR CARGO_HOME FFF_TRASH GEM_HOME GOPATH NPM_CONFIG_USERCONFIG NPM_PACKAGES NODE_PATH $HOME/.cargo/bin $HOME/.local/bin XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_STATE_HOME XDG_CONFIG_DIRS XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR FFF_TRASH MANPATH INFOPATH GNUPGHOME GTK2_RC_FILES"
# Setup ZSH environment
cp -v ./.zshenv $HOME/
# copy .Xresources
cp -v ./.Xresources $HOME/
# Set up the .config folder
cp -rv ./config/* $HOME/.config/
input_print "Are you using a laptop or a desktop? (Any option other than d or D will choose laptop)? [l/d]?: "
read -r laptop_response
if ! [[ "${laptop_response,,}" =~ ^(d|D)$ ]]
then
info_print "You chose laptop. Battery widget has been added to top bar and terminal font size is 10"
else
info_print "Disabling battery module from panel"
sed -i 's/^[^--]*s.battery*/--&/' $HOME/.config/awesome/ui/panels/top-panel/init.lua
info_print "Changing terminal font size from 10 to 12"
sed -i 's/size: 10/size: 12/' $HOME/.config/alacritty/fonts.yml
fi
input_print "Does your device have wifi? (Any option other than n or N will choose yes)? [y/n]?: "
read -r wifi_response
if ! [[ "${wifi_response,,}" =~ ^(n|N)$ ]]
then
info_print "You chose wifi. Wifi widget has been added to the top bar"
else
info_print "Disabling wifi module from panel"
sed -i 's/^[^--]*s.network*/--&/' $HOME/.config/awesome/ui/panels/top-panel/init.lua
fi
info_print "Cheking if picom-ibhagwan-git is installed"
if [ $(isPackageInstalled 'picom-ibhagwan-git') ]; then
info_print "removing picom-ibhagwan-git"
paru -Rns picom-ibhagwan-git --noconfirm
fi
# make package build directory not tempfs because it is a massive install
# sudo mkdir $HOME/.cache/packages
# sudo sed -i "s+BUILDDIR.*+BUILDDIR=$HOME/.cache/packages+" /etc/makepkg.conf
# Install the packages
paru -Sy $(grep -Ev '^#|^$' ./packagelist.txt) --needed --noconfirm --noremovemake --batchinstall
# Copy the fonts
cp -rv ./fonts/* $HOME/.local/share/fonts/
fc-cache -fv
broot --install
cp -rv ./scripts/updatemydots $HOME/.local/bin
chmod +x $HOME/.local/bin/updatemydots
cp -rv ./scripts/install_music_and_create_playlist $HOME/.local/bin
chmod +x $HOME/.local/bin/install_music_and_create_playlist
# Copy gtk theme
sudo cp -rv ./themes/gtk/Aesthetic-Night/* /usr/share/themes
# Copy lightdm settings
sudo cp -rv ./lightdm/* /etc/lightdm/