Compare commits

..

39 Commits

Author SHA1 Message Date
d8efeb6b36 Update vencord and update script 2025-12-02 23:22:28 +00:00
ece5804d9d Update scripts 2025-11-16 18:08:17 +00:00
42b5c1f77a Fix incorrect whiptail package provider 2025-11-16 17:57:23 +00:00
83d9cc6e31 Protected W_MAIN against incorrect expansions. 2025-11-16 17:51:57 +00:00
fd0ba91c65 Switch main script to bash 2025-11-16 17:45:58 +00:00
e463952473 Add GNOME Setup script and collection of small tweaks 2025-11-16 17:44:57 +00:00
de5161811b Remove password-store and fix wallpaper bug 2025-09-27 21:28:05 +00:00
7761e3282c Improve vulnerability notifier 2025-08-08 18:30:12 +01:00
cef46c8b1e Remove broken symlinks search from updates 2025-08-08 18:22:02 +01:00
7f3458fe73 Improve update script and add vuln check 2025-08-08 18:19:56 +01:00
f1ee483b9e Improve motherboard info 2025-08-07 15:45:18 +01:00
54fe57df62 Add pacman conf and fix fetch 2025-08-06 10:29:01 +01:00
6b53dc0384 Remove APT support since some packages would break it; Fixed ssh keyring 2025-08-05 22:36:12 +01:00
8d3d4a2eb7 Fix gnome-keyring bug and find fastest mirrors with reflector 2025-08-05 21:04:03 +01:00
549aa12b46 Add Arch Linux support; Various tweaks 2025-08-05 19:41:13 +01:00
1df7b20fc5 Moved server directory to a private repo 2025-07-30 13:23:02 +01:00
1e34967c82 Add port forward table 2025-07-30 12:58:47 +01:00
550616e187 Add XMPP 2025-07-29 18:32:41 +01:00
53f85a9378 Work on the compose file 2025-07-26 17:11:51 +01:00
71d4a5ba98 Removed PiHole 2025-07-24 17:33:34 +01:00
092fd4fcc9 Add immich and pihole 2025-07-23 19:35:39 +01:00
529b1342a0 update scripts and work on server setup 2025-07-23 18:43:58 +01:00
c3c919e8f6 Add N8N and network changes 2025-07-23 16:53:14 +01:00
27bae0d0b9 add initial sensor configuration files 2025-07-16 17:07:57 +01:00
97291b32de Use hostname instead of IP 2025-07-15 15:39:34 +01:00
5cf3e2f019 Fix MD syntax 2025-07-15 15:14:43 +01:00
ff7cfdd7e6 Add local ip 2025-07-15 15:13:58 +01:00
7fa6a4f7bc Update domains 2025-07-15 15:12:47 +01:00
f6df29828b Add prosody
currently broken
2025-07-15 15:02:06 +01:00
90863a0643 Add filebrowser 2025-07-15 11:38:11 +01:00
df99836ae3 Finish removing nc 2025-07-15 11:00:39 +01:00
494afeb8ec Remove nextcloud since it doesn't store data on the disk array, and instead resets every time the hardware changes. 2025-07-15 10:55:02 +01:00
598f74f8ed Change HA networking to host to work with whisper and piper 2025-07-15 10:48:03 +01:00
a844896cb1 Fix esphome networking 2025-07-15 10:18:25 +01:00
3ee1681134 Add ESPHome 2025-07-14 22:50:09 +01:00
5d8e4b5e2c Set NGINX to use the default network 2025-07-05 17:03:02 +01:00
4962cf5464 Switch from GitHub to TrudeGIT 2025-07-05 14:17:45 +01:00
7bd52ac02e Fix ssh for Gitea 2025-07-05 12:24:26 +01:00
d1978dc7d9 Build server setup using docker-compose 2025-07-05 12:17:16 +01:00
24 changed files with 343 additions and 860 deletions

View File

@@ -1,7 +1,7 @@
# Trude's Dotfiles # Trude's Dotfiles
<p align="center"> <p align="center">
<img src="images/dotfiles-logo.png" alt="Logo Circle" width="200" align="middle"> <img src="images/logo-circle.png" alt="Logo Circle" width="200" align="middle">
</p> </p>

View File

@@ -2,7 +2,7 @@
color-shading-type='solid' color-shading-type='solid'
picture-options='zoom' picture-options='zoom'
picture-uri='file:///usr/share/backgrounds/gnome/bg.png' picture-uri='file:///usr/share/backgrounds/gnome/bg.png'
picture-uri-dark='file:///usr/share/backgrounds/gnome/bg-dark.svg' picture-uri-dark='file:///usr/share/backgrounds/gnome/dragon.png'
primary-color='#000000' primary-color='#000000'
secondary-color='#000000' secondary-color='#000000'
@@ -42,7 +42,7 @@ dynamic-workspaces=true
[org/gnome/shell] [org/gnome/shell]
disabled-extensions=['tiling-assistant@ubuntu.com', 'ubuntu-dock@ubuntu.com', 'ding@rastersoft.com'] disabled-extensions=['tiling-assistant@ubuntu.com', 'ubuntu-dock@ubuntu.com', 'ding@rastersoft.com']
enabled-extensions=['gsconnect@andyholmes.github.io', 'appindicatorsupport@rgcjonas.gmail.com', 'caffeine@patapon.info', 'Vitals@CoreCoding.com'] enabled-extensions=['blur-my-shell@aunetx', 'gsconnect@andyholmes.github.io', 'appindicatorsupport@rgcjonas.gmail.com', 'caffeine@patapon.info', 'Vitals@CoreCoding.com']
[org/gnome/shell/extensions/dash-to-dock] [org/gnome/shell/extensions/dash-to-dock]
dash-max-icon-size=32 dash-max-icon-size=32
@@ -113,7 +113,7 @@ remember-passwords=false
[org/gnome/shell/extensions/vitals] [org/gnome/shell/extensions/vitals]
fixed-widths=false fixed-widths=false
hot-sensors=['_memory_usage_', '_processor_usage_', '__temperature_max__'] hot-sensors=['_processor_usage_', '_gpu#1_usage_', '_memory_usage_', '__temperature_max__']
icon-style=1 icon-style=1
menu-centered=false menu-centered=false
position-in-panel=0 position-in-panel=0

View File

@@ -30,6 +30,16 @@ fi
set completion-ignore-case On set completion-ignore-case On
export OFLAGS="--ozone-platform-hint=auto" # Enable programmable completion features (loads all available completions)
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
# Set SSH_AUTH_SOCK to use gnome-keyring via GCR
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
export PATH=$PATH:$HOME/.local/bin export PATH=$PATH:$HOME/.local/bin

View File

@@ -0,0 +1 @@
#

0
home/Templates/text.txt Normal file
View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -8,172 +8,162 @@ CYAN="\e[36m"
BOLD="\e[1m" BOLD="\e[1m"
NC="\e[0m" NC="\e[0m"
install_gnome_extension() {
uuid="$1"
if [ -z "$uuid" ]; then
printf "%b\n" "${RED}Usage: install_gnome_extension <extension-uuid>${NC}"
return 1
fi
if ! gnome-extensions list | grep -qw "$uuid"; then
printf "%b\n" "${YELLOW}[+]${NC} Sent install request for $uuid."
gdbus call --session --dest org.gnome.Shell.Extensions \
--object-path /org/gnome/Shell/Extensions \
--method org.gnome.Shell.Extensions.InstallRemoteExtension \
"$uuid" >/dev/null 2>&1
return 0
elif gnome-extensions list --updates | grep -qw "$uuid"; then
printf "%b\n" "${YELLOW}[+]${NC} Sent update request for $uuid."
gdbus call --session --dest org.gnome.Shell.Extensions \
--object-path /org/gnome/Shell/Extensions \
--method org.gnome.Shell.Extensions.InstallRemoteExtension \
"$uuid" >/dev/null 2>&1
return 0
else
printf "%b\n" "${GREEN}[✓]${NC} GNOME Extension $uuid is already installed."
return 0
fi
}
trap 'printf "${RED}install.sh interrupted.${NC}"; exit 1' INT TERM trap 'printf "${RED}install.sh interrupted.${NC}"; exit 1' INT TERM
if ! command -v whiptail >/dev/null 2>&1; then if ! command -v whiptail >/dev/null 2>&1; then
echo "${YELLOW}Installing whiptail...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Installing whiptail..."
sudo apt install -y whiptail sudo pacman -S libnewt
fi fi
testing_branch="trixie"
window_height='15' window_height='15'
window_width='60' window_width='60'
W_MAIN=$( W_MAIN=$(
whiptail --notags --title "Trude's Dotfiles" \ whiptail --notags --title "Trude's Dotfiles" \
--cancel-button "Exit" \ --cancel-button "Exit" \
--menu "Main Menu" $window_height $window_width 3 \ --menu "Main Menu" $window_height $window_width 8 \
"setup" "Install GNOME & Core Apps" \
"install" "Install Dotfiles" \ "install" "Install Dotfiles" \
"" "" \
"reload" "Reload Configuration" \ "reload" "Reload Configuration" \
"update" "Update Debian" \ "paru" "Install Paru AUR Helper" \
"flatpak" "Install Flatpak" \
"update" "Update Distro" \
"vulns" "Check for Vulnerabilities" \
3>&1 1>&2 2>&3 3>&1 1>&2 2>&3
) )
if [ -z $W_MAIN ]; then if [ -z "$W_MAIN" ]; then
exit 1 exit 1
fi fi
if [ $W_MAIN = "update" ]; then if [ "$W_MAIN" = "update" ]; then
./scripts/update ./scripts/update
exit 0 exit 0
fi fi
if [ $W_MAIN = "install" ]; then
W_DEB_SOURCES=$(whiptail --notags --title "Debian Sources" \
--cancel-button "Skip" \
--menu "Choose your Debian source:" $window_height $window_width 2 \
"stable" "Stable" \
"testing" "Testing ($testing_branch)" \
3>&1 1>&2 2>&3)
fi
install_gnome_extension() {
uuid="$1"
if [ -z "$uuid" ]; then
echo "${RED}Usage: install_gnome_extension <extension-uuid>${NC}"
return 1
fi
if ! gnome-extensions list | grep -qw "$uuid"; then
echo "${GREEN}Sent install request for $uuid.${NC}"
gdbus call --session --dest org.gnome.Shell.Extensions \
--object-path /org/gnome/Shell/Extensions \
--method org.gnome.Shell.Extensions.InstallRemoteExtension \
"$uuid" >/dev/null 2>&1
return 0
elif gnome-extensions list --updates | grep -qw "$uuid"; then
echo "${GREEN}Sent update request for $uuid.${NC}"
gdbus call --session --dest org.gnome.Shell.Extensions \
--object-path /org/gnome/Shell/Extensions \
--method org.gnome.Shell.Extensions.InstallRemoteExtension \
"$uuid" >/dev/null 2>&1
return 0
else
echo "${GREEN}GNOME Extension $uuid is already installed.${NC}"
return 0
fi
}
# Clone Dotfiles if not already present # Clone Dotfiles if not already present
cd "$HOME/dotfiles" cd "$HOME/dotfiles"
if [ "$(pwd)" != "$HOME/dotfiles" ]; then if [ "$(pwd)" != "$HOME/dotfiles" ]; then
echo "${YELLOW}Cloning dotfiles repository...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Cloning dotfiles repository..."
sudo apt update sudo pacman -S git
sudo apt install -y git
if ! git clone https://git.trude.dev/trude/dotfiles --depth 1; then if ! git clone https://git.trude.dev/trude/dotfiles --depth 1; then
echo "${RED}Error cloning dotfiles repository. Update skipped...${NC}" printf "%b\n" "${RED}Error cloning dotfiles repository. Update skipped...${NC}"
fi fi
cd dotfiles || exit cd dotfiles || exit
echo "${GREEN}dotfiles repository cloned successfully.${NC}" printf "%b\n" "${GREEN}[✓]${NC} Dotfiles repository cloned successfully."
# else else
# echo "${YELLOW}Updating dotfiles repository...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Updating dotfiles repository..."
# pull_output=$(git pull) pull_output=$(git pull)
# echo "$pull_output" echo "$pull_output"
# if ! echo "$pull_output" | grep -q "Already up to date."; then if ! echo "$pull_output" | grep -q "Already up to date."; then
# echo "${YELLOW}Changes detected. Re-running script...${NC}" printf "%b\n" "${YELLOW}Changes detected. Please re-run the script. Ignore this warning if you don't have an internet connection.${NC}"
# exec "$0" "$@" fi
# fi
fi fi
mkdir -p "$HOME/dotfiles/logs" mkdir -p "$HOME/dotfiles/logs"
if [ $W_MAIN = "install" ]; then if [ "$W_MAIN" = "flatpak" ]; then
echo "${YELLOW}Setting Debian Sources...${NC}" sudo pacman -S flatpak
case $W_DEB_SOURCES in
"stable")
echo "${CYAN}Using Stable sources.${NC}"
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bckp
sudo sh -c 'cat > /etc/apt/sources.list <<EOF
deb http://deb.debian.org/debian stable main contrib non-free
deb-src http://deb.debian.org/debian stable main contrib non-free
deb http://security.debian.org/debian-security stable-security main contrib non-free
deb-src http://security.debian.org/debian-security stable-security main contrib non-free
deb http://deb.debian.org/debian stable-updates main contrib non-free
deb-src http://deb.debian.org/debian stable-updates main contrib non-free
EOF'
break
;;
"testing")
echo "${CYAN}Using Testing sources.${NC}"
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bckp
sudo sh -c "cat > /etc/apt/sources.list <<EOF
deb http://deb.debian.org/debian $testing_branch main contrib non-free
deb-src http://deb.debian.org/debian $testing_branch main contrib non-free
deb http://security.debian.org/debian-security $testing_branch-security main contrib non-free
deb-src http://security.debian.org/debian-security $testing_branch-security main contrib non-free
deb http://deb.debian.org/debian $testing_branch-updates main contrib non-free
deb-src http://deb.debian.org/debian $testing_branch-updates main contrib non-free
EOF"
break
;;
*)
echo "${CYAN}Skipped.${NC}"
break
;;
esac
./scripts/update
echo "${YELLOW}Installing Dependencies...${NC}"
sudo apt install git tmux fzf tealdeer pass-otp zbar-tools bat ufw unp network-manager flatpak \
gir1.2-gtop-2.0 lm-sensors # Vitals Extension deps
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
echo "${YELLOW}Installing GNOME...${NC}"
sudo apt install gnome-core gnome-software-plugin-flatpak
# Remove Firefox (Epiphany installed instead)
echo "${YELLOW}Removing Firefox...${NC}"
sudo apt purge firefox-esr
# Enable Network Manager
echo "${YELLOW}Enabling Network Manager...${NC}"
sudo mv /etc/network/interfaces /etc/network/interfaces.bckp
sudo systemctl restart networking
sudo service NetworkManager restart
fi fi
if [ "$W_MAIN" = "vulns" ]; then
printf "%b\n" "${CYAN}[I]${NC} Packages that contain known vulnerabilities:"
arch-audit
printf "\n%b\n" "${RED}[I]${NC} Packages that can be fixed by updating:"
arch-audit -u
fi
if [ "$W_MAIN" = "paru" ]; then
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git --depth=1
cd paru
makepkg -si
cd ..
rm -rf paru
fi
if [ "$W_MAIN" = "setup" ]; then
printf "%b\n" "${YELLOW}[+]${NC} Installing GNOME..."
sudo pacman -S gnome
printf "%b\n" "${YELLOW}[+]${NC} Installing GNOME Circle Apps..."
sudo pacman -S --needed amberol apostrophe audio-sharing blanket collision curtail decoder dialect eartag errands eyedropper fragments gnome-podcasts graphs health hieroglyphic identity impression iotas komikku letterpress mousai newsflash obfuscate paper-clip pika-backup raider resources secrets shortwave solanum switcheroo valuta video-trimmer warp wike
if whiptail --title "Developer Tools" --yesno "Are you a developer?\n\nInstall GNOME development tools?" 10 64; then
printf "%b\n" "${YELLOW}[+]${NC} Installing GNOME development tools..."
sudo pacman -S --needed manuals binary commit emblem gnome-builder lorem textpieces webfont-kit-generator sysprof gnome-boxes d-spy dconf-editor
printf "%b\n" "${CYAN}[I]${NC} Install workbench through the AUR for more convenient prototyping."
else
printf "%b\n" "${CYAN}[+]${NC} Skipped installing development tools."
fi
printf "%b\n" "${YELLOW}[+]${NC} Enabling GDM..."
sudo systemctl enable gdm.service
fi
if [ "$W_MAIN" = "install" ]; then
sudo cp -f ./pacman.conf /etc/pacman.conf
./scripts/update
printf "%b\n" "${YELLOW}[+]${NC} Installing Dependencies..."
sudo pacman -S --needed git fzf tealdeer bat ufw unp bash-completion gnome-keyring libsecret pacman-contrib reflector arch-audit
# Enable GNOME Keyring SSH agent
printf "%b\n" "${YELLOW}[+]${NC} Enabling GNOME Keyring SSH agent..."
systemctl enable --user gcr-ssh-agent.socket
systemctl start --user gcr-ssh-agent.socket
printf "%b\n" "${YELLOW}[+]${NC} Selecting Fastest Arch Mirrors..."
sudo reflector --sort rate --fastest 10 --verbose --protocol https --latest 200 --save /etc/pacman.d/mirrorlist
fi
if [ ""$W_MAIN"" = "install" ] || [ ""$W_MAIN"" = "reload" ]; then
# Copy files # Copy files
echo "${YELLOW}Installing Dotfiles...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Installing Dotfiles..."
cp -r "$HOME/dotfiles/home/." "$HOME" cp -r "$HOME/dotfiles/home/." "$HOME"
# Copy wallpapers # Copy wallpapers
echo "${YELLOW}Installing Wallpapers...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Installing Wallpapers..."
sudo mkdir -p /usr/share/backgrounds/gnome/
sudo cp -r $HOME/dotfiles/wallpapers/* /usr/share/backgrounds/gnome/ sudo cp -r $HOME/dotfiles/wallpapers/* /usr/share/backgrounds/gnome/
# Copy scripts # Copy scripts
echo "${YELLOW}Installing Scripts...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Installing Scripts..."
mkdir -p "$HOME/.local/bin" mkdir -p "$HOME/.local/bin"
cp -r "$HOME/dotfiles/scripts/." "$HOME/.local/bin/" cp -r "$HOME/dotfiles/scripts/." "$HOME/.local/bin/"
# Install fonts # Install fonts
echo "${YELLOW}Installing fonts...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Installing fonts..."
mkdir -p "$HOME/.local/share/fonts" mkdir -p "$HOME/.local/share/fonts"
cp -rf "$HOME/dotfiles/fonts/"* "$HOME/.local/share/fonts/" cp -rf "$HOME/dotfiles/fonts/"* "$HOME/.local/share/fonts/"
if [ ! -f "$HOME/dotfiles/logs/font_install.log" ]; then if [ ! -f "$HOME/dotfiles/logs/font_install.log" ]; then
@@ -182,11 +172,11 @@ fi
# UFW Firewall # UFW Firewall
if [ "$reload" = false ]; then if [ "$reload" = false ]; then
echo "${YELLOW}Setting up UFW...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Setting up UFW..."
sudo ufw default deny incoming sudo ufw default deny incoming
sudo ufw default allow outgoing sudo ufw default allow outgoing
if systemctl is-active --quiet sshd; then if systemctl is-active --quiet sshd; then
echo "${YELLOW}SSH Server detected; Enabling SSH rule...${NC}" printf "%b\n" "${YELLOW}[+]${NC} SSH Server detected; Enabling SSH rule..."
sudo ufw limit 22/tcp sudo ufw limit 22/tcp
fi fi
sudo ufw enable sudo ufw enable
@@ -203,51 +193,36 @@ if [ "$USER" = "trude" ]; then
git config --global user.signingkey ~/.ssh/id_ed25519.pub git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global user.name "TrudeEH" git config --global user.name "TrudeEH"
git config --global user.email "ehtrude@gmail.com" git config --global user.email "ehtrude@gmail.com"
git config --global core.editor "/usr/bin/re.sonny.Commit"
# Clone password-store # Configure SSH
if [ ! -f "$HOME/.ssh/id_ed25519" ] || [ ! -f "$HOME/.ssh/id_ed25519.pub" ]; then if [ ! -f "$HOME/.ssh/id_ed25519" ] || [ ! -f "$HOME/.ssh/id_ed25519.pub" ]; then
echo "${RED}ED25519 key not found in ${CYAN}$HOME/.ssh/id_ed25519. ${RED}Please add your ED25519 key pair for password-store.${NC}" printf "%b\n" "${RED}ED25519 key not found in ${CYAN}$HOME/.ssh/id_ed25519${NC}."
elif ! gpg --list-keys "ehtrude@gmail.com" >/dev/null 2>&1; then
echo "${RED}GPG key for ehtrude@gmail.com not found. Please import the key for password-store.${NC}"
else else
if [ ! -d "$HOME/.password-store" ]; then
echo "${YELLOW}Cloning password-store...${NC}"
chmod 700 ~/.ssh chmod 700 ~/.ssh
chmod 600 ~/.ssh/* chmod 600 ~/.ssh/*
if ! git clone git@git.trude.dev:trude/password-store.git "$HOME/.password-store"; then
echo "${RED}Error cloning password-store.${NC}"
else
echo "${GREEN}Password-store cloned successfully.${NC}"
fi
else
echo "${CYAN}Password-store already present.${NC}"
fi
fi fi
fi fi
# Set up GNOME Desktop # Set up GNOME Desktop
case "$XDG_CURRENT_DESKTOP" in case "$XDG_CURRENT_DESKTOP" in
*GNOME*) *GNOME*)
echo "${YELLOW}Installing GNOME Extensions...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Installing GNOME Extensions..."
install_gnome_extension "caffeine@patapon.info" install_gnome_extension "caffeine@patapon.info"
install_gnome_extension "Vitals@CoreCoding.com" install_gnome_extension "Vitals@CoreCoding.com"
install_gnome_extension "appindicatorsupport@rgcjonas.gmail.com" install_gnome_extension "appindicatorsupport@rgcjonas.gmail.com"
install_gnome_extension "gsconnect@andyholmes.github.io" install_gnome_extension "gsconnect@andyholmes.github.io"
install_gnome_extension "blur-my-shell@aunetx"
echo "${YELLOW}Loading Dconf settings...${NC}" printf "%b\n" "${YELLOW}[+]${NC} Loading Dconf settings..."
if ! dconf load / <"$HOME/dotfiles/dconf-settings.ini"; then if ! dconf load / <"$HOME/dotfiles/dconf-settings.ini"; then
echo "${RED}Error loading Dconf settings.${NC}" printf "%b\n" "${RED}Error loading Dconf settings.${NC}"
fi fi
;; ;;
*) *)
echo whiptail --title "Warning" --msgbox \
echo "Dconf settings and GNOME extensions can only be installed from within GNOME.\n\nPlease run this script again from within a GNOME session." \
echo "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${NC}" 15 60
echo
echo "${CYAN}Dconf settings and GNOME extensions can only be installed after restarting."
echo "${CYAN}Please run the script again from within GNOME (with the reload option).${NC}"
echo
echo "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${NC}"
echo
;; ;;
esac esac
fi

47
pacman.conf Normal file
View File

@@ -0,0 +1,47 @@
# See the pacman.conf(5) manpage for option and repository directives
[options]
HoldPkg = pacman glibc
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
Color
CheckSpace
VerbosePkgLists
ParallelDownloads = 7
DownloadUser = alpm
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
# -------- REPOS ---------
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
# 32-bit pkgs
[multilib]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

View File

@@ -1,33 +0,0 @@
#! /bin/sh
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
MAGENTA="\e[35m"
CYAN="\e[36m"
BOLD="\e[1m"
NC="\e[0m"
BATTERY_INFO=$(upower -i "$(upower -e | grep 'BAT')")
BATTERY_PERCENT=$(echo "$BATTERY_INFO" | grep -oP 'percentage:\s+\K\d+')
BATTERY_STATUS=$(echo "$BATTERY_INFO" | grep -oP 'state:\s+\K\w+')
CHARGE_CYCLES=$(echo "$BATTERY_INFO" | grep -oP 'cycle-count:\s+\K\d+')
WARNING_LEVEL=$(echo "$BATTERY_INFO" | grep -oP 'warning-level:\s+\K\w+')
if [ "$BATTERY_STATUS" = "charging" ] || [ "$BATTERY_STATUS" = "pending" ]; then
COLOR=$CYAN
elif [ "$BATTERY_PERCENT" -ge 80 ]; then
COLOR=$GREEN
elif [ "$BATTERY_PERCENT" -ge 30 ]; then
COLOR=$YELLOW
else
COLOR=$RED
fi
echo "${BOLD}Battery: ${COLOR}$BATTERY_PERCENT% ($BATTERY_STATUS)${NC}"
if [ -n "$CHARGE_CYCLES" ]; then
echo "${BOLD}Charge Cycles: ${MAGENTA}$CHARGE_CYCLES${NC}"
fi
if [ "$WARNING_LEVEL" != "none" ]; then
echo "${BOLD}Warning Level: ${RED}$WARNING_LEVEL${NC}"
fi

View File

@@ -1,40 +0,0 @@
#! /bin/sh
YELLOW="\e[33m"
NC="\e[0m"
echo "\n${YELLOW}Downloading APT dependencies...${NC}\n"
sudo apt install build-essential git -y
sudo apt build-dep linux -y
echo "\n${YELLOW}Downloading kernel source...${NC}\n"
mkdir linux-parent && cd linux-parent || exit 1
git clone --depth 1 https://github.com/torvalds/linux
cd linux || exit 1
cp /boot/config-"$(uname -r)" .config # Copy current kernel config
make nconfig # Edit the current kernel configuration
diff /boot/config-"$(uname -r)" .config # Check your changes
# Do not include debugging symbols. Alternatively, use `strip` to remove them. (these configs are working as of 6.14)
scripts/config --undefine GDB_SCRIPTS
scripts/config --undefine DEBUG_INFO
scripts/config --undefine DEBUG_INFO_SPLIT
scripts/config --undefine DEBUG_INFO_REDUCED
scripts/config --undefine DEBUG_INFO_COMPRESSED
scripts/config --set-val DEBUG_INFO_NONE y
scripts/config --set-val DEBUG_INFO_DWARF5 n
scripts/config --disable DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
echo "\n${YELLOW}Compiling the kernel...${NC}\n"
make -j"$(nproc)" deb-pkg LOCALVERSION=-custom
echo "\n${YELLOW}Installing the generated dpkg packages...${NC}\n"
sudo dpkg -i ../linux-headers*-custom*.deb
sudo dpkg -i ../linux-image*-custom*.deb
echo "\n${YELLOW}Cleaning up...${NC}\n"
cd ../..
rm -rf linux-parent
dpkg --list | grep linux-image

View File

@@ -1,66 +0,0 @@
#!/bin/sh
# Variables (edit these as needed)
ARRAY_NAME="md0"
MOUNT_POINT="/mnt/md0"
MDADM_CONF="/etc/mdadm/mdadm.conf"
# Colors
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
MAGENTA="\e[35m"
CYAN="\e[36m"
BOLD="\e[1m"
NC="\e[0m"
echo "${CYAN}${BOLD}=== RAID Array Setup Script ===${NC}"
if ! sudo mdadm --help >/dev/null 2>&1; then
echo "${YELLOW}[+]${NC} Installing mdadm package..."
sudo apt install mdadm -y
echo "${GREEN}[✓]${NC} mdadm installed successfully"
else
echo "${GREEN}[✓]${NC} mdadm is already installed"
fi
# Check if array is already assembled
if [ "/dev/${ARRAY_NAME}" ]; then
echo "${GREEN}[✓]${NC} Array /dev/${ARRAY_NAME} exists."
sudo mdadm --detail "/dev/${ARRAY_NAME}"
cat /proc/mdstat
# Check if array is degraded
if sudo mdadm --detail "/dev/${ARRAY_NAME}" | grep -q "degraded"; then
echo "${RED}[!] WARNING:${NC} Array is degraded! Check which drives need to be re-added."
echo "${YELLOW}[i]${NC} You may need to run: ${CYAN}sudo mdadm --manage /dev/${ARRAY_NAME} --re-add <missing_drive>${NC}"
fi
else
echo "${YELLOW}[+]${NC} Assembling RAID array..."
sudo mdadm --assemble --scan
fi
# Optionally update mdadm.conf
if ! grep -q "/dev/${ARRAY_NAME}" "$MDADM_CONF"; then
echo "${YELLOW}[+]${NC} Updating $MDADM_CONF..."
sudo mdadm --detail --scan | sudo tee -a "$MDADM_CONF"
fi
# Mount the array
if [ ! -d "$MOUNT_POINT" ]; then
sudo mkdir -p "$MOUNT_POINT"
echo "${GREEN}[✓]${NC} Mount point created"
fi
if ! mountpoint -q "$MOUNT_POINT"; then
echo "${YELLOW}[+]${NC} Mounting /dev/${ARRAY_NAME} to $MOUNT_POINT..."
sudo mount "/dev/${ARRAY_NAME}" "$MOUNT_POINT"
echo "${GREEN}[✓]${NC} Array mounted successfully at $MOUNT_POINT"
else
echo "${GREEN}[✓]${NC} Array is already mounted at $MOUNT_POINT"
fi
echo "${CYAN}${BOLD}=== Setup Complete ===${NC}"
echo "${CYAN}[i]${NC} Array device: ${CYAN}/dev/${ARRAY_NAME}${NC}"
echo "${CYAN}[i]${NC} Mount point: ${CYAN}$MOUNT_POINT${NC}"

View File

@@ -10,46 +10,58 @@ BOLD="\e[1m"
NC="\e[0m" NC="\e[0m"
# User and host info # User and host info
echo "${BOLD}${MAGENTA}${USER}@$(hostname)${NC}" printf "%b\n" "${BOLD}${MAGENTA}${USER}@${HOSTNAME}${NC}"
echo "---------" printf "%b\n" "---------"
# OS and architecture # OS and architecture
OS=$(grep '^PRETTY_NAME=' /etc/os-release | cut -d= -f2 | tr -d '"') OS=$(grep '^PRETTY_NAME=' /etc/os-release | cut -d= -f2 | tr -d '"')
ARCH=$(uname -m) ARCH=$(uname -m)
echo "${CYAN}OS:${NC} $OS $ARCH" printf "%b\n" "${CYAN}OS:${NC} $OS $ARCH"
# Host Model
HOST_MODEL=$(cat /sys/class/dmi/id/product_name 2>/dev/null)
HOST_VERSION=$(cat /sys/class/dmi/id/product_version 2>/dev/null)
echo "${CYAN}Host:${NC} ${HOST_VERSION} (${HOST_MODEL})"
# Kernel version # Kernel version
echo "${CYAN}Kernel:${NC} Linux $(uname -r)" printf "%b\n" "${CYAN}Kernel:${NC} Linux $(uname -r)"
# Uptime # Uptime
UPTIME=$(uptime -p | sed 's/up //') UPTIME=$(uptime -p | sed 's/up //')
echo "${CYAN}Uptime:${NC} $UPTIME" printf "%b\n" "${CYAN}Uptime:${NC} $UPTIME"
# Package counts: dpkg and flatpak # Package counts: detect package manager and count packages
if command -v pacman >/dev/null 2>&1; then
# Arch Linux - count pacman and AUR packages
PKG_COUNT=$(pacman -Q 2>/dev/null | wc -l)
AUR_COUNT=$(pacman -Qm 2>/dev/null | wc -l)
FLAT_COUNT=$(flatpak list 2>/dev/null | wc -l)
printf "%b\n" "${CYAN}Packages:${NC} ${PKG_COUNT} (pacman), ${AUR_COUNT} (AUR), ${FLAT_COUNT} (flatpak)"
elif command -v dpkg >/dev/null 2>&1; then
# Debian/Ubuntu - count dpkg packages
PKG_COUNT=$(dpkg-query -f '${binary:Package}\n' -W 2>/dev/null | wc -l) PKG_COUNT=$(dpkg-query -f '${binary:Package}\n' -W 2>/dev/null | wc -l)
FLAT_COUNT=$(flatpak list 2>/dev/null | wc -l) FLAT_COUNT=$(flatpak list 2>/dev/null | wc -l)
echo "${CYAN}Packages:${NC} ${PKG_COUNT} (dpkg), ${FLAT_COUNT} (flatpak)" printf "%b\n" "${CYAN}Packages:${NC} ${PKG_COUNT} (dpkg), ${FLAT_COUNT} (flatpak)"
else
# Fallback - just count flatpak
FLAT_COUNT=$(flatpak list 2>/dev/null | wc -l)
printf "%b\n" "${CYAN}Packages:${NC} ${FLAT_COUNT} (flatpak)"
fi
# Shell and version # Shell and version
BASH_VER=$(bash --version | head -n1 | awk '{print $4}' | cut -d'(' -f1) BASH_VER=$(bash --version | head -n1 | awk '{print $4}' | cut -d'(' -f1)
echo "${CYAN}Shell:${NC} bash ${BASH_VER}" printf "%b\n" "${CYAN}Shell:${NC} bash ${BASH_VER}"
# Desktop Environment # Desktop Environment
DE=${XDG_CURRENT_DESKTOP:-"Unknown"} DE=${XDG_CURRENT_DESKTOP:-"Unknown"}
echo "${CYAN}DE:${NC} $DE" printf "%b\n" "${CYAN}DE:${NC} $DE"
# Motherboard Model
BOARD_NAME=$(cat /sys/devices/virtual/dmi/id/board_name 2>/dev/null)
printf "%b\n" "${CYAN}Motherboard:${NC} ${BOARD_NAME}"
# CPU model from /proc/cpuinfo # CPU model from /proc/cpuinfo
CPU=$(awk -F: '/model name/ {print $2; exit}' /proc/cpuinfo | sed 's/^[ \t]*//') CPU=$(awk -F: '/model name/ {print $2; exit}' /proc/cpuinfo | sed 's/^[ \t]*//')
echo "${CYAN}CPU:${NC} $CPU" printf "%b\n" "${CYAN}CPU:${NC} $CPU"
# GPU info # GPU info
GPU=$(lspci | grep -i 'vga\|3d' | head -n1 | cut -d: -f3 | sed 's/^[ \t]*//') GPU=$(lspci | grep -i 'vga\|3d' | head -n1 | cut -d: -f3 | sed 's/^[ \t]*//')
echo "${CYAN}GPU:${NC} $GPU" printf "%b\n" "${CYAN}GPU:${NC} $GPU"
# Memory usage # Memory usage
mem_info=$(free | awk '/Mem:/ {print $2, $3}') mem_info=$(free | awk '/Mem:/ {print $2, $3}')
@@ -68,7 +80,7 @@ fi
mem_total=$(free -h | awk '/Mem:/ {print $2}') mem_total=$(free -h | awk '/Mem:/ {print $2}')
mem_used=$(free -h | awk '/Mem:/ {print $3}') mem_used=$(free -h | awk '/Mem:/ {print $3}')
echo "${CYAN}Memory:${NC} ${mem_used} / ${mem_total} (${percent_color}${percent}%${NC})" printf "%b\n" "${CYAN}Memory:${NC} ${mem_used} / ${mem_total} (${percent_color}${percent}%${NC})"
# Swap usage # Swap usage
swap_used=$(free -h | awk '/Swap/ {print $3}') swap_used=$(free -h | awk '/Swap/ {print $3}')
@@ -83,7 +95,7 @@ else
swap_perc_color=$RED swap_perc_color=$RED
fi fi
echo "${CYAN}Swap:${NC} ${swap_used} / ${swap_total} (${swap_perc_color}${swap_perc}%${NC})" printf "%b\n" "${CYAN}Swap:${NC} ${swap_used} / ${swap_total} (${swap_perc_color}${swap_perc}%${NC})"
# Root disk usage # Root disk usage
root_line=$(df -h / | awk 'NR==2') root_line=$(df -h / | awk 'NR==2')
@@ -97,7 +109,7 @@ elif [ "$root_percent" -le 80 ]; then
else else
root_color=$RED root_color=$RED
fi fi
echo "${CYAN}Disk (/):${NC} ${root_used} / ${root_total} (${root_color}${root_percent}%${NC})" printf "%b\n" "${CYAN}Disk (/):${NC} ${root_used} / ${root_total} (${root_color}${root_percent}%${NC})"
# /home disk usage # /home disk usage
home_line=$(df -h /home 2>/dev/null | awk 'NR==2') home_line=$(df -h /home 2>/dev/null | awk 'NR==2')
@@ -112,7 +124,7 @@ if [ -n "$home_line" ]; then
else else
home_color=$RED home_color=$RED
fi fi
echo "${CYAN}Disk (/home):${NC} ${home_used} / ${home_total} (${home_color}${home_percent}%${NC})" printf "%b\n" "${CYAN}Disk (/home):${NC} ${home_used} / ${home_total} (${home_color}${home_percent}%${NC})"
fi fi
# Determine the primary network interface used for internet access # Determine the primary network interface used for internet access
@@ -120,11 +132,11 @@ PRIMARY_IFACE=$(ip route get 8.8.8.8 2>/dev/null | awk '{print $5; exit}')
if [ -n "$PRIMARY_IFACE" ]; then if [ -n "$PRIMARY_IFACE" ]; then
LOCAL_IP=$(ip addr show "$PRIMARY_IFACE" | awk '/inet / {print $2}' | cut -d'/' -f1) LOCAL_IP=$(ip addr show "$PRIMARY_IFACE" | awk '/inet / {print $2}' | cut -d'/' -f1)
echo "${CYAN}Local IP ($PRIMARY_IFACE):${NC} ${LOCAL_IP}" printf "%b\n" "${CYAN}Local IP ($PRIMARY_IFACE):${NC} ${LOCAL_IP}"
else else
echo "${RED}Local IP:${NC} Unable to determine primary network interface." printf "%b\n" "${RED}Local IP:${NC} Unable to determine primary network interface."
fi fi
# Current locale setting # Current locale setting
LOCALE=$(locale | awk -F= '/^LANG=/{print $2; exit}') LOCALE=$(locale | awk -F= '/^LANG=/{print $2; exit}')
echo "${CYAN}Locale:${NC} $LOCALE" printf "%b\n" "${CYAN}Locale:${NC} $LOCALE"

View File

@@ -1,61 +0,0 @@
#!/bin/sh
# Colors
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
MAGENTA="\e[35m"
CYAN="\e[36m"
GRAY="\e[90m"
BOLD="\e[1m"
NC="\e[0m"
echo "${CYAN}${BOLD}=== Docker Installation Script ===${NC}"
echo "${YELLOW}[+]${NC} Updating APT..."
echo "${GRAY}"
sudo apt-get update
echo "${NC}"
echo "${YELLOW}[+]${NC} Installing required packages..."
echo "${GRAY}"
sudo apt-get install -y ca-certificates curl gnupg lsb-release
echo "${NC}"
echo "${YELLOW}[+]${NC} Adding Docker's official GPG key..."
echo "${GRAY}"
sudo mkdir -p /etc/apt/keyrings
curl -fsSL "https://download.docker.com/linux/$(
. /etc/os-release
echo "$ID"
)/gpg" | sudo gpg --dearmor >/tmp/docker.gpg
sudo mv /tmp/docker.gpg /etc/apt/keyrings/docker.gpg
sudo chmod 644 /etc/apt/keyrings/docker.gpg
echo "${YELLOW}[+]${NC} Setting up the Docker repository..."
echo "${GRAY}"
ARCH=$(dpkg --print-architecture)
OS_ID=$(awk -F= '/^ID=/{gsub(/\"/, "", $2); print $2}' /etc/os-release)
RELEASE=$(lsb_release -cs)
echo "deb [arch=$ARCH signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$OS_ID $RELEASE stable" |
sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
echo "${YELLOW}[+]${NC} Updating APT..."
echo "${GRAY}"
sudo apt-get update
echo "${NC}"
echo "${YELLOW}[+]${NC} Installing Docker Engine..."
echo "${GRAY}"
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
echo "${GREEN}[✓]${NC} Docker installation complete!"
echo "${GRAY}"
docker --version
echo "${NC}"
echo "${YELLOW}[+]${NC} Allowing Docker use without sudo..."
echo "${GRAY}"
sudo usermod -aG docker ${USER}
exec sg docker newgrp
echo "${NC}${GREEN}[✓]${NC} User added to docker group"

View File

@@ -1,27 +0,0 @@
#!/bin/sh
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
NC="\e[0m"
mem_info=$(free | awk '/Mem:/ {print $2, $3}')
set -- $mem_info
total=$1
used=$2
percent=$(awk "BEGIN {printf \"%.0f\", ($used/$total)*100}")
mem_total=$(free -h | awk '/Mem:/ {print $2}')
mem_used=$(free -h | awk '/Mem:/ {print $3}')
if [ -t 1 ]; then
if [ "$percent" -le 60 ]; then
percent_color=$GREEN
elif [ "$percent" -le 80 ]; then
percent_color=$YELLOW
else
percent_color=$RED
fi
echo " ${mem_used} / ${mem_total} (${percent_color}${percent}%${NC})"
else
echo "${mem_used} ${mem_total} ${percent}"
fi

View File

@@ -1,75 +0,0 @@
#! /bin/sh
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
CYAN="\e[36m"
NC="\e[0m"
trap "echo '${CYAN}System Monitor interrupted.${NC}'; exit 1" INT TERM
echo
echo
echo
# Cache in tmpfs to improve speed and reduce SSD load
cache=/tmp/cpu-script-cache
rm /tmp/cpu-script-cache 2>/dev/null
while true; do
# CPU
cpu_stats=$(awk '/^cpu / {print $2 + $3 + $4 + $5, $5}' /proc/stat)
if [ ! -f "$cache" ]; then
echo "$cpu_stats" >"$cache"
cpu_color=$CYAN
usage="--"
else
prev_stats=$(cat "$cache")
total=$(echo "$prev_stats" | awk '{print $1}')
prev_idle=$(echo "$prev_stats" | awk '{print $2}')
curr_total=$(echo "$cpu_stats" | awk '{print $1}')
curr_idle=$(echo "$cpu_stats" | awk '{print $2}')
total_diff=$((curr_total - total))
idle_diff=$((curr_idle - prev_idle))
if [ "$total_diff" -eq 0 ]; then
usage=0 # Avoid division by zero
else
usage=$((100 * (total_diff - idle_diff) / total_diff))
fi
if [ "$usage" -lt 50 ]; then
cpu_color=$GREEN
elif [ "$usage" -lt 70 ]; then
cpu_color=$YELLOW
else
cpu_color=$RED
fi
fi
# MEMORY
mem_info=$(free | awk '/Mem:/ {print $2, $3}')
set -- $mem_info
total=$1
used=$2
percent=$(awk "BEGIN {printf \"%.0f\", ($used/$total)*100}")
mem_total=$(free -h | awk '/Mem:/ {print $2}')
mem_used=$(free -h | awk '/Mem:/ {print $3}')
if [ "$percent" -le 60 ]; then
mem_color=$GREEN
elif [ "$percent" -le 80 ]; then
mem_color=$YELLOW
else
mem_color=$RED
fi
printf "\033[4A"
echo "============================="
echo " ${cpu_color}${usage}%${NC} "
echo " ${mem_used} / ${mem_total} (${mem_color}${percent}%${NC}) "
echo "============================="
echo "$cpu_stats" >"$cache"
sleep 2
done

View File

@@ -1,13 +0,0 @@
#!/bin/sh
# Wifi
if [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'up' ]; then
wifiicon="$(awk '/^[[:space:]]*w/ { gsub(/[[:space:]]+/, " "); print " ", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ]; then
wifiicon=" "
fi
# Ethernet
[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="󰛳 " || ethericon="󰅛 "
printf "%s%s\n" "$wifiicon" "$ethericon"

View File

@@ -1,215 +0,0 @@
#! /bin/bash
# Cross-distro package manager UI
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
BLUE="\e[34m"
MAGENTA="\e[35m"
CYAN="\e[36m"
GRAY="\e[90m"
BOLD="\e[1m"
FAINT="\e[2m"
ITALIC="\e[3m"
UNDERLINE="\e[4m"
NC="\e[0m"
pcheck() {
local pms=()
if command -v nix >/dev/null 2>&1; then
pms+=("nix")
fi
if command -v brew >/dev/null 2>&1; then
pms+=("brew")
fi
if command -v apt >/dev/null 2>&1; then
pms+=("apt")
elif command -v pacman >/dev/null 2>&1; then
if command -v paru >/dev/null 2>&1; then
pms+=("paru")
fi
pms+=("pacman")
elif command -v dnf >/dev/null 2>&1; then
pms+=("dnf")
fi
if command -v flatpak >/dev/null 2>&1; then
pms+=("flatpak")
fi
echo "${pms[@]}"
}
p() (
trap "echo -e '\n${RED}p interrupted.${NC}'; exit 1" SIGINT SIGTERM
packageManagers=($(pcheck))
updateP() {
if [[ ${packageManagers[@]} =~ "flatpak" ]]; then
printf "%b\n" "${YELLOW}Updating flatpak...${NC}"
flatpak update
flatpak uninstall --unused --delete-data
fi
if [[ ${packageManagers[@]} =~ "nix" ]]; then
printf "%b\n" "${YELLOW}Updating nix...${NC}"
nix-channel --update
nix-collect-garbage --delete-older-than 7d &>/dev/null
if command -v nixos-rebuild >/dev/null 2>&1; then
sudo nix-channel --update
printf "${YELLOW}Rebuilding NixOS...${NC}\n"
sudo nixos-rebuild switch &>/tmp/nixos_rebuild.log || (
cat /tmp/nixos_rebuild.log | grep --color error && false
)
fi
fi
if [[ ${packageManagers[@]} =~ "brew" ]]; then
printf "%b\n" "${YELLOW}Updating brew...${NC}"
brew update
brew doctor
brew upgrade
fi
if [[ ${packageManagers[@]} =~ "apt" ]]; then
printf "%b\n" "${YELLOW}Updating apt...${NC}"
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
sudo apt autoclean
elif [[ ${packageManagers[@]} =~ "pacman" ]]; then
printf "%b\n" "${YELLOW}Updating pacman...${NC}"
sudo sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
if [[ ${packageManagers[@]} =~ "paru" ]]; then
paru -Syu
else
sudo pacman -Syu
fi
sudo pacman -Rsn $(pacman -Qdtq)
if [ ! "$(command -v reflector)" ]; then
printf "%b\n" "${YELLOW}Selecting fastest pacman mirrors...${NC}"
sudo pacman -Sy --noconfirm reflector rsync curl
iso=$(curl -4 ifconfig.co/country-iso)
extra="FR"
sudo reflector -a 48 -c $iso -c $extra -f 5 -l 30 --verbose --sort rate --save /etc/pacman.d/mirrorlist
fi
if [ ! "$(command -v paccache)" ]; then
sudo pacman -Sy --noconfirm pacman-contrib
fi
paccache -rk1
elif [[ ${packageManagers[@]} =~ "dnf" ]]; then
printf "%b\n" "${YELLOW}Updating dnf...${NC}"
sudo dnf upgrade --refresh
sudo dnf autoremove
fi
}
installP() {
for pm in "${packageManagers[@]}"; do
printf "%b\n" "${YELLOW}Attempting ${pm} install...${NC}"
case "$pm" in
flatpak)
flatpak install "$1"
;;
paru)
paru -Sy "$1"
;;
apt)
sudo apt install "$1"
;;
pacman)
sudo pacman -Sy "$1"
;;
dnf)
sudo dnf install "$1"
;;
brew)
brew install "$1"
;;
*)
continue
;;
esac
if [[ $? == 0 ]]; then
return 0
fi
done
printf "%b\n" "${RED}ERROR: $1 not found.${NC}"
return 1
}
removeP() {
for pm in "${packageManagers[@]}"; do
printf "%b\n" "${YELLOW}Attempting ${pm} uninstall...${NC}"
case "$pm" in
flatpak)
flatpak uninstall "$1"
;;
brew)
brew uninstall "$1"
;;
apt)
sudo apt remove "$1"
;;
pacman)
sudo pacman -Rs "$1"
;;
paru)
paru -Rns "$1"
;;
dnf)
sudo dnf remove "$1"
;;
*)
continue
;;
esac
if [[ $? == 0 ]]; then
return 0
fi
done
printf "%b\n" "${RED}ERROR: $1 not found.${NC}"
return 1
}
shellP() {
if [[ ${packageManagers[@]} =~ "nix" ]]; then
printf "%b\n" "${YELLOW}Attempting to create nix shell...${NC}"
nix-shell -p $1
if [[ $? == 0 ]]; then
return 0
fi
fi
}
# If no parameter or u
printf "%b\n" "${CYAN}Detected package managers: ${MAGENTA}${packageManagers[*]}${NC}"
if [ -z $1 ] || [ $1 = "u" ]; then
updateP
return 0
elif [ $1 = "i" ]; then # If first parameter is i (install)
shift
for package in "$@"; do
installP $package
done
elif [ $1 = "r" ]; then # If first parameter is r (remove)
shift
for package in "$@"; do
removeP $package
done
elif [ $1 = "c" ]; then # If first parameter is c (check)
shift
for package in "$@"; do
checkP $package
done
elif [ $1 = "s" ]; then # If first parameter is s (shell)
shift
shellP $@
else
printf "%b\n" "${YELLOW}${UNDERLINE}[i] Usage:${NC}"
printf "%b\n" "p (u) ${FAINT}- update os${NC}"
printf "%b\n" "p i package ${FAINT}- install package${NC}"
printf "%b\n" "p r package ${FAINT}- remove package${NC}"
printf "%b\n" "p s packages ${FAINT}- launch a nix shell with the specified packages${NC}"
printf "%b\n" "${FAINT}Supported package managers: flatpak, nix, brew, apt, paru, pacman, dnf${NC}"
return 1
fi
)

View File

@@ -1,5 +0,0 @@
#!/bin/bash
paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) |
column -s "$(printf '\t')" -t |
sed 's/\(.\)..$/.\1°C/'

View File

@@ -1,32 +1,34 @@
#! /bin/sh #! /bin/sh
YELLOW="\e[33m" YELLOW="\e[33m"
GRAY="\e[90m"
NC="\e[0m" NC="\e[0m"
printf "%b\n" "${YELLOW}[+]${NC} Updating repos..." printf "%b\n" "${YELLOW}[+]${NC} Updating Arch using paru..."
printf "%b" "${GRAY}" paru
sudo apt-get update
printf "%b" "${NC}"
printf "%b\n" "${YELLOW}[+]${NC} Upgrading packages..." printf "%b\n" "${YELLOW}[+]${NC} Updating CPU microcode..."
printf "%b" "${GRAY}" vendor=$(grep -m 1 'vendor_id' /proc/cpuinfo | awk '{print $3}')
sudo apt-get full-upgrade if [ "$vendor" == "GenuineIntel" ]; then
printf "%b" "${NC}" echo "CPU Detected: Intel"
paru -S intel-ucode --needed
elif [ "$vendor" == "AuthenticAMD" ]; then
echo "CPU Detected: AMD"
paru -S amd-ucode --needed
else
echo "Unknown CPU Vendor: $vendor"
fi
printf "%b\n" "${YELLOW}[+]${NC} Removing orphaned dependencies..." printf "%b\n" "${YELLOW}[+]${NC} Removing orphaned dependencies..."
printf "%b" "${GRAY}" sudo pacman -Rsn $(pacman -Qdtq)
sudo apt-get autoremove
printf "%b" "${NC}"
printf "%b\n" "${YELLOW}[+]${NC} Cleaning up..." printf "%b\n" "${YELLOW}[+]${NC} Checking for config changes..."
printf "%b" "${GRAY}" sudo pacdiff
sudo apt-get autoclean
printf "%b" "${NC}" printf "%b\n" "${YELLOW}[+]${NC} Checking for vulnerabilities..."
arch-audit -u
if command -v flatpak >/dev/null 2>&1; then if command -v flatpak >/dev/null 2>&1; then
printf "%b\n" "${YELLOW}[+]${NC} Updating flatpak packages..." printf "%b\n" "${YELLOW}[+]${NC} Updating flatpak packages..."
printf "%b" "${GRAY}"
flatpak update flatpak update
flatpak uninstall --unused --delete-data flatpak uninstall --unused --delete-data
printf "%b" "${NC}" printf "%b" "${NC}"

View File

@@ -1,9 +1,6 @@
#!/bin/sh #!/bin/sh
# Close all upnpc ports # Close all upnpc ports
sudo apt install miniupnpc -y
upnpc -l | sed -n 's/^[[:space:]]*[0-9]\+\s\+\(TCP\|UDP\)\s\+\([0-9]\+\).*/\1 \2/p' | while read proto port; do upnpc -l | sed -n 's/^[[:space:]]*[0-9]\+\s\+\(TCP\|UDP\)\s\+\([0-9]\+\).*/\1 \2/p' | while read proto port; do
upnpc -d "$port" "$proto" upnpc -d "$port" "$proto"
done done

View File

@@ -1,28 +0,0 @@
#!/bin/sh
# Prints the current volume or  if muted.
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
# If muted, print  and exit.
[ "$vol" != "${vol%\[MUTED\]}" ] && echo " " && exit
vol="${vol#Volume: }"
split() {
# For ommiting the . without calling and external program.
IFS=$2
set -- $1
printf '%s' "$@"
}
vol="$(printf "%.0f" "$(split "$vol" ".")")"
case $1 in
$((vol >= 70))) icon=" " ;;
$((vol >= 30))) icon=" " ;;
$((vol >= 1))) icon=" " ;;
*) echo " " && exit ;;
esac
echo "$icon$vol%"

View File

@@ -1,33 +0,0 @@
TZ=Europe/Lisbon
# Nginx
NGINX_DATA=/mnt/md0/nginx/data
NGINX_LETSENCRYPT=/mnt/md0/nginx/letsencrypt
# Nextcloud
NEXTCLOUD_DATA=/mnt/md0/nextcloud/data
NEXTCLOUD_DB_DATA=/mnt/md0/nextcloud/db
NEXTCLOUD_DB_PASSWORD=K7m9P2xQ8vN3rY6sL4dF1jH5eW9zB2cX
NC_DOMAIN=nc.trude.dev
REDIS_PASSWORD=R3d1sP@ssw0rd2025SecureCache
# Gitea
GITEA=/mnt/md0/gitea
# N8N Automation
N8N_HOST=n8n.trude.dev
N8N_DATA=/mnt/md0/n8n/data
N8N_FILES=/mnt/md0/n8n/files
# Home Assistant
HA_CONFIG=/mnt/md0/ha/config
PIPER_DATA=/mnt/md0/ha/piper-data
WHISPER_DATA=/mnt/md0/ha/whisper-data
# ESPHome
ESPHOME_CONFIG=/mnt/md0/esphome/config
# Ejabberd
EJABBERD_CONF=/mnt/md0/ejabberd/conf
EJABBERD_DB_DATA=/mnt/md0/ejabberd/db
EJABBERD_DB_PASSWORD=zX7weGFvRJo8ElLun0e74hRQV6vrYN

View File

@@ -2,17 +2,18 @@
"settings": { "settings": {
"autoUpdate": true, "autoUpdate": true,
"autoUpdateNotification": true, "autoUpdateNotification": true,
"useQuickCss": false, "useQuickCss": true,
"themeLinks": [], "themeLinks": [],
"enabledThemes": [ "enabledThemes": [
"trude.theme.css" "trude.theme.css"
], ],
"enableReactDevtools": false, "enableReactDevtools": true,
"frameless": false, "frameless": false,
"transparent": false, "transparent": false,
"winCtrlQ": false, "winCtrlQ": false,
"disableMinSize": true, "disableMinSize": true,
"winNativeTitleBar": false, "winNativeTitleBar": false,
"localPlugins": true,
"plugins": { "plugins": {
"ChatInputButtonAPI": { "ChatInputButtonAPI": {
"enabled": true "enabled": true
@@ -93,15 +94,17 @@
"copyRoleColorInProfilePopout": false "copyRoleColorInProfilePopout": false
}, },
"BetterSessions": { "BetterSessions": {
"enabled": false "enabled": true,
"backgroundCheck": false
}, },
"BetterSettings": { "BetterSettings": {
"enabled": true, "enabled": true,
"disableFade": true, "disableFade": true,
"eagerLoad": true "eagerLoad": true,
"organizeMenu": true
}, },
"BetterUploadButton": { "BetterUploadButton": {
"enabled": false "enabled": true
}, },
"BiggerStreamPreview": { "BiggerStreamPreview": {
"enabled": true "enabled": true
@@ -134,7 +137,7 @@
"enabled": false "enabled": false
}, },
"CopyEmojiMarkdown": { "CopyEmojiMarkdown": {
"enabled": false "enabled": true
}, },
"CopyFileContents": { "CopyFileContents": {
"enabled": true "enabled": true
@@ -172,9 +175,6 @@
"DontRoundMyTimestamps": { "DontRoundMyTimestamps": {
"enabled": false "enabled": false
}, },
"EmoteCloner": {
"enabled": true
},
"Experiments": { "Experiments": {
"enabled": true, "enabled": true,
"toolbarDevMenu": false "toolbarDevMenu": false
@@ -222,7 +222,7 @@
"enabled": true "enabled": true
}, },
"GameActivityToggle": { "GameActivityToggle": {
"enabled": false, "enabled": true,
"oldIcon": false "oldIcon": false
}, },
"GifPaste": { "GifPaste": {
@@ -258,7 +258,17 @@
"enabled": false "enabled": false
}, },
"LastFMRichPresence": { "LastFMRichPresence": {
"enabled": false "enabled": false,
"shareUsername": false,
"shareSong": true,
"hideWithSpotify": true,
"hideWithActivity": false,
"statusName": "some music",
"statusDisplayType": "off",
"nameFormat": "status-name",
"useListeningStatus": false,
"missingArt": "lastfmLogo",
"showLastFmLogo": true
}, },
"LoadingQuotes": { "LoadingQuotes": {
"enabled": false, "enabled": false,
@@ -271,7 +281,8 @@
"MemberCount": { "MemberCount": {
"enabled": true, "enabled": true,
"memberList": true, "memberList": true,
"toolTip": true "toolTip": true,
"voiceActivity": true
}, },
"MentionAvatars": { "MentionAvatars": {
"enabled": true, "enabled": true,
@@ -287,7 +298,8 @@
"enabled": true, "enabled": true,
"latency": 2, "latency": 2,
"detectDiscordKotlin": true, "detectDiscordKotlin": true,
"showMillis": false "showMillis": false,
"ignoreSelf": false
}, },
"MessageLinkEmbeds": { "MessageLinkEmbeds": {
"enabled": true, "enabled": true,
@@ -380,7 +392,7 @@
"enabled": true "enabled": true
}, },
"NoF1": { "NoF1": {
"enabled": false "enabled": true
}, },
"NoMaskedUrlPaste": { "NoMaskedUrlPaste": {
"enabled": false "enabled": false
@@ -491,7 +503,7 @@
"enabled": true "enabled": true
}, },
"ReadAllNotificationsButton": { "ReadAllNotificationsButton": {
"enabled": true "enabled": false
}, },
"RelationshipNotifier": { "RelationshipNotifier": {
"enabled": true, "enabled": true,
@@ -568,7 +580,8 @@
"enabled": true, "enabled": true,
"mode": "nick-user", "mode": "nick-user",
"displayNames": false, "displayNames": false,
"inReplies": true "inReplies": true,
"friendNicknames": "dms"
}, },
"ShowTimeoutDuration": { "ShowTimeoutDuration": {
"enabled": true "enabled": true
@@ -578,10 +591,10 @@
"persistState": false "persistState": false
}, },
"SilentTyping": { "SilentTyping": {
"enabled": false, "enabled": true,
"showIcon": false, "showIcon": true,
"contextMenu": true, "contextMenu": true,
"isEnabled": true "isEnabled": false
}, },
"SortFriendRequests": { "SortFriendRequests": {
"enabled": true, "enabled": true,
@@ -670,8 +683,7 @@
"enabled": true "enabled": true
}, },
"VcNarrator": { "VcNarrator": {
"enabled": true, "enabled": false,
"voice": "Google US English",
"volume": 1, "volume": 1,
"rate": 1, "rate": 1,
"sayOwnName": false, "sayOwnName": false,
@@ -720,7 +732,21 @@
"enabled": true "enabled": true
}, },
"XSOverlay": { "XSOverlay": {
"enabled": false "enabled": false,
"webSocketPort": 42070,
"preferUDP": false,
"botNotifications": false,
"serverNotifications": true,
"dmNotifications": true,
"groupDmNotifications": true,
"callNotifications": true,
"pingColor": "#7289da",
"channelPingColor": "#8a2be2",
"soundPath": "default",
"timeout": 3,
"lengthBasedTimeout": true,
"opacity": 1,
"volume": 0.2
}, },
"NoTrack": { "NoTrack": {
"enabled": true, "enabled": true,
@@ -742,7 +768,7 @@
"enabled": true "enabled": true
}, },
"FixImagesQuality": { "FixImagesQuality": {
"enabled": false "enabled": true
}, },
"AppleMusicRichPresence": { "AppleMusicRichPresence": {
"enabled": true, "enabled": true,
@@ -776,7 +802,7 @@
}, },
"ShikiCodeblocks": { "ShikiCodeblocks": {
"enabled": false, "enabled": false,
"theme": "https://raw.githubusercontent.com/shikijs/textmate-grammars-themes/2d87559c7601a928b9f7e0f0dda243d2fb6d4499/packages/tm-themes/themes/catppuccin-mocha.json", "theme": "https://raw.githubusercontent.com/shikijs/textmate-grammars-themes/2d87559c7601a928b9f7e0f0dda243d2fb6d4499/packages/tm-themes/themes/dark-plus.json",
"tryHljs": "SECONDARY", "tryHljs": "SECONDARY",
"useDevIcon": "GREYSCALE", "useDevIcon": "GREYSCALE",
"bgOpacity": 100 "bgOpacity": 100
@@ -794,10 +820,19 @@
"enabled": true "enabled": true
}, },
"HideMedia": { "HideMedia": {
"enabled": false "enabled": true
}, },
"DisableDeepLinks": { "DisableDeepLinks": {
"enabled": true "enabled": true
},
"ExpressionCloner": {
"enabled": true
},
"CopyStickerLinks": {
"enabled": true
},
"ImageFilename": {
"enabled": false
} }
}, },
"notifications": { "notifications": {
@@ -811,8 +846,8 @@
"authenticated": false, "authenticated": false,
"url": "https://api.vencord.dev/", "url": "https://api.vencord.dev/",
"settingsSync": false, "settingsSync": false,
"settingsSyncVersion": 1748808073030 "settingsSyncVersion": 1764014321902
} }
}, },
"quickCss": "\n" "quickCss": ".buttons__74017 {\n position: fixed !important;\n top: 8px !important;\n right: 100px !important; /* distance from inbox button */\n z-index: 1000 !important;\n display: flex !important;\n flex-direction: row !important;\n align-items: center !important;\n justify-content: flex-end !important; /* align icons to the right */\n gap: 4px !important;\n height: 1rem;\n}\n"
} }

BIN
wallpapers/dragon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 MiB