Krolyxon
Commit 16cc31b

Branches

Refs →

aurora16cc31b

install.sh: add logging

Author
krolxon
Date
2026-01-01 13:45 +0530
Parent
923c012
Commit
16cc31b947975f5e9b00af3ad3875df83be21087

+74 −51

4 files changed

  1. M .config/foot/foot.ini +29 −29
  2. M .config/zsh/.zshrc +1 −1
  3. R .local/bin/snipping-tool → .local/bin/screenshot +0 −0
  4. M install.sh +44 −21
M .config/foot/foot.ini View
@@ -6,35 +6,35 @@ font=JetBrains Mono Nerd Font:size=12
66
77 [colors]
88 alpha=0.85
9−cursor=11111b f5e0dc
10−foreground=cdd6f4
11−background=1e1e2e
12−
13−regular0=45475a
14−regular1=f38ba8
15−regular2=a6e3a1
16−regular3=f9e2af
17−regular4=89b4fa
18−regular5=f5c2e7
19−regular6=94e2d5
20−regular7=bac2de
21−
22−bright0=585b70
23−bright1=f38ba8
24−bright2=a6e3a1
25−bright3=f9e2af
26−bright4=89b4fa
27−bright5=f5c2e7
28−bright6=94e2d5
29−bright7=a6adc8
30−16=fab387
31−17=f5e0dc
32−selection-foreground=cdd6f4
33−selection-background=414356
34−search-box-no-match=11111b f38ba8
35−search-box-match=cdd6f4 313244
36−jump-labels=11111b fab387
37−urls=89b4fa
9+#cursor=11111b f5e0dc
10+#foreground=cdd6f4
11+#background=1e1e2e
12+#
13+#regular0=45475a
14+#regular1=f38ba8
15+#regular2=a6e3a1
16+#regular3=f9e2af
17+#regular4=89b4fa
18+#regular5=f5c2e7
19+#regular6=94e2d5
20+#regular7=bac2de
21+#
22+#bright0=585b70
23+#bright1=f38ba8
24+#bright2=a6e3a1
25+#bright3=f9e2af
26+#bright4=89b4fa
27+#bright5=f5c2e7
28+#bright6=94e2d5
29+#bright7=a6adc8
30+#16=fab387
31+#17=f5e0dc
32+#selection-foreground=cdd6f4
33+#selection-background=414356
34+#search-box-no-match=11111b f38ba8
35+#search-box-match=cdd6f4 313244
36+#jump-labels=11111b fab387
37+#urls=89b4fa
3838
3939 [key-bindings]
4040 search-start=Control+Shift+f
M .config/zsh/.zshrc View
@@ -71,4 +71,4 @@ source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.
7171 source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
7272
7373 # Load pywal colors
74−(cat ~/.cache/wal/sequences &)
74+# (cat ~/.cache/wal/sequences &)
R .local/bin/snipping-tool → .local/bin/screenshot View

[No content changes]

M install.sh View
@@ -1,23 +1,42 @@
11 #!/bin/env bash
22
3+log() {
4+ local level="$1"
5+ shift
6+
7+ case "$level" in
8+ INFO) color='\033[0;32m' ;;
9+ WARN) color='\033[0;33m' ;;
10+ ERROR) color='\033[0;31m' ;;
11+ *) color='\033[0m' ;;
12+ esac
13+
14+ printf '%b[%s] [%s]%b %s\n' \
15+ "$color" "$(date '+%H:%M:%S')" "$level" '\033[0m' "$*"
16+}
17+
318 currentDir="$(dirname "$(readlink -f "$0")")"
419 cd "$currentDir"
520
621 ## Install necessary desktop packages
722 source "$currentDir/packages/pkg_desktop.sh"
823 source "$currentDir/packages/pkg_utils.sh"
24+log INFO "Starting Script"
25+log INFO "Installing necessary packages for hyprland"
926 sudo pacman -Sy --needed "${pkg_desktop[@]}" "${pkg_utils[@]}"
1027
1128 ## Install dev tools
1229 read -rp "Do you wish to install development tools? [y/N]" install_dev_tools
13−source "$currentDir/packages/pkg_dev_tools.sh"
1430 if [[ $install_dev_tools == y ]]; then
31+ log INFO "Installing development tools"
32+ source "$currentDir/packages/pkg_dev_tools.sh"
1533 sudo pacman -S --needed "${pkg_dev_tools[@]}"
1634 fi
1735
1836 ## Install optional packages
1937 read -rp "Do you wish to install optional packages? [y/N]" install_optional_pkg
2038 if [[ $install_optional_pkg == y ]]; then
39+ log INFO "Installing development tools"
2140 source "$currentDir/packages/pkg_optional.sh"
2241 sudo pacman -S --needed "${pkg_optional[@]}"
2342 fi
@@ -25,6 +44,7 @@ fi
2544 ## Install nvidia drivers
2645 read -rp "Do you wish to install Nvidia drivers? [y/N]" install_nvidia_drivers
2746 if [[ $install_nvidia_drivers == y ]]; then
47+ log INFO "Installing Nvidia Drivers"
2848 source "$currentDir/packages/pkg_nvidia.sh"
2949 sudo pacman -S --needed "${pkg_nvidia[@]}"
3050 fi
@@ -35,14 +55,14 @@ read -rp "Do you wish to install aur packages? [y/N]" install_aur_pkg
3555 if [[ $install_aur_pkg == y ]]; then
3656 ## Install paru if it isn't already installed
3757 if ! command -v paru >/dev/null 2>&1; then
38− echo "Installing paru..."
58+ log INFO "Installing Paru (AUR package manager)"
3959 git clone https://aur.archlinux.org/paru-bin.git
4060 cd paru-bin
4161 makepkg -sri
4262 cd ..
4363 rm -rf paru-bin
4464 else
45− echo "Skipping paru (already in PATH)"
65+ log INFO "Skipping paru (already in PATH)"
4666 fi
4767 ## Install aur packages
4868 source "$currentDir/packages/pkg_aur.sh"
@@ -51,20 +71,21 @@ fi
5171
5272
5373 ## Setup dotfiles
54−echo "⚠️ WARNING: This will DELETE any conflicting files and replace them with symlinks from this repo."
55−echo "Make sure you have already backed up all your existing config files (~/.config)"
74+log WARN "⚠️ This will DELETE any conflicting files and replace them with symlinks from this repo."
75+log WARN "Make sure you have already backed up all your existing config files (~/.config)"
5676 read -rp "Continue with stow (y/N): " confirm
5777 if [[ "$confirm" =~ ^[Yy]$ ]]; then
58− echo "Detecting conflicts..."
78+ log INFO "Detecting conflicts..."
5979 conflicts=$(stow . --no-folding -nv 2>&1 | \
6080 sed -n 's/.*existing target \(.*\) since neither.*/\1/p')
6181
6282 if [[ -z "$conflicts" ]]; then
63− echo "No conflicts. Running stow normally..."
64− stow . --no-folding
65− echo "✅ Done."
83+ log INFO "No conflicts. Running stow normally..."
84+ stow . --no-folding \
85+ && log INFO "Dotfiles stowed successfully" \
86+ || log ERROR "Stow failed"
6687 else
67− echo "These paths conflict and will be removed:"
88+ log WARN "These paths conflict and will be removed:"
6889 printf ' %s\n' $conflicts
6990 read -rp "Proceed with deleting these files? (y/N): " ok
7091 if [[ ! "$ok" =~ ^[Yy]$ ]]; then
@@ -73,23 +94,23 @@ if [[ "$confirm" =~ ^[Yy]$ ]]; then
7394
7495 # Remove conflicts relative to $HOME
7596 for path in $conflicts; do
76− echo "Removing $HOME/$path"
77− rm -rf "$HOME/$path"
97+ rm -rf "$HOME/$path" && log INFO "Removed $HOME/$path"
7898 done
7999
80− echo "Running stow..."
81− stow . --no-folding
82− echo "✅ Dotfiles stowed with overwrite."
100+ log INFO "Running stow..."
101+ stow . --no-folding \
102+ && log INFO "✅ Dotfiles stowed with overwrite." \
103+ || log ERROR "Stow failed"
83104 fi
84105 else
85− echo "Aborted stow"
106+ log WARN "Aborted stow, the dotfiles are not synced"
86107 fi
87108
88109
89110 ## Setup neovim dotfiles
90111 read -rp "Clone neovim dotfiles as well? (y/N): " confirm
91112 if [[ "$confirm" =~ ^[Yy]$ ]]; then
92− echo "Taking backup of neovim config (if already exists)"
113+ log INFO "Taking backup of neovim config (if already exists)"
93114 mv ~/.config/nvim{,.bak}
94115 mv ~/.local/share/nvim{,.bak}
95116 mv ~/.local/state/nvim{,.bak}
@@ -98,17 +119,19 @@ if [[ "$confirm" =~ ^[Yy]$ ]]; then
98119 fi
99120
100121 ## Change default shell to zsh
122+log INFO "Changing the default shell to ZSH"
101123 if [[ "$SHELL" != "$(which zsh)" ]]; then
102124 read -rp "Change default shell to ZSH? (y/N): " confirm
103125 if [[ "$confirm" =~ ^[Yy]$ ]]; then
104− echo "Changing default shell to zsh..."
105− chsh -s $(which zsh)
126+ chsh -s $(which zsh) \
127+ && log INFO "Default shell successfully set to zsh" \
128+ || log ERROR "Default shell could not be set to zsh"
106129 fi
107130 else
108− echo "Skipping: zsh is already the default shell"
131+ log INFO "Skipping: zsh is already the default shell"
109132 fi
110133
111134
112135 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
113136 echo ""
114−echo "Done! 😊"
137+log INFO "Done! 😊"