Compare commits

..

18 Commits

Author SHA1 Message Date
d763b06675 Add XMPP 2025-07-29 18:32:41 +01:00
2504662bbd Work on the compose file 2025-07-26 17:11:51 +01:00
f273a49cf6 Removed PiHole 2025-07-24 17:33:34 +01:00
7394deae26 Add immich and pihole 2025-07-23 19:35:39 +01:00
e949a1cf6e update scripts and work on server setup 2025-07-23 18:43:58 +01:00
9f1f96500b Add N8N and network changes 2025-07-23 16:53:14 +01:00
3dca6ba75d Use hostname instead of IP 2025-07-15 15:39:34 +01:00
cdedfb482a Throw logs to /tmp 2025-07-15 15:22:49 +01:00
80c45ce80b Fix MD syntax 2025-07-15 15:14:43 +01:00
3a0b4da44a Add local ip 2025-07-15 15:13:58 +01:00
687d91d3d2 Update domains 2025-07-15 15:12:47 +01:00
d6fa6a497a Add prosody
currently broken
2025-07-15 15:02:06 +01:00
c8c049fa5d Add filebrowser 2025-07-15 11:38:11 +01:00
fb70f490de Finish removing nc 2025-07-15 11:00:39 +01:00
857fe04865 Add ESPHome 2025-07-14 22:50:09 +01:00
07595e717a Set NGINX to use the default network 2025-07-05 17:03:02 +01:00
524355076f Switch from GitHub to TrudeGIT 2025-07-05 14:17:45 +01:00
8a3ece91d0 Build server setup using docker-compose 2025-07-05 12:17:16 +01:00
24 changed files with 875 additions and 358 deletions

View File

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

View File

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

View File

@@ -30,16 +30,6 @@ fi
set completion-ignore-case On
# 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 OFLAGS="--ozone-platform-hint=auto"
export PATH=$PATH:$HOME/.local/bin

View File

@@ -1 +0,0 @@
#

BIN
images/debian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -8,184 +8,194 @@ CYAN="\e[36m"
BOLD="\e[1m"
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
if ! command -v whiptail >/dev/null 2>&1; then
printf "%b\n" "${YELLOW}[+]${NC} Installing whiptail..."
sudo pacman -S libnewt
echo "${YELLOW}Installing whiptail...${NC}"
sudo apt install -y whiptail
fi
testing_branch="trixie"
window_height='15'
window_width='60'
W_MAIN=$(
whiptail --notags --title "Trude's Dotfiles" \
--cancel-button "Exit" \
--menu "Main Menu" $window_height $window_width 8 \
"setup" "Install GNOME & Core Apps" \
--menu "Main Menu" $window_height $window_width 3 \
"install" "Install Dotfiles" \
"" "" \
"reload" "Reload Configuration" \
"paru" "Install Paru AUR Helper" \
"flatpak" "Install Flatpak" \
"update" "Update Distro" \
"vulns" "Check for Vulnerabilities" \
"update" "Update Debian" \
3>&1 1>&2 2>&3
)
if [ -z "$W_MAIN" ]; then
if [ -z $W_MAIN ]; then
exit 1
fi
if [ "$W_MAIN" = "update" ]; then
if [ $W_MAIN = "update" ]; then
./scripts/update
exit 0
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
cd "$HOME/dotfiles"
if [ "$(pwd)" != "$HOME/dotfiles" ]; then
printf "%b\n" "${YELLOW}[+]${NC} Cloning dotfiles repository..."
sudo pacman -S git
echo "${YELLOW}Cloning dotfiles repository...${NC}"
sudo apt update
sudo apt install -y git
if ! git clone https://git.trude.dev/trude/dotfiles --depth 1; then
printf "%b\n" "${RED}Error cloning dotfiles repository. Update skipped...${NC}"
echo "${RED}Error cloning dotfiles repository. Update skipped...${NC}"
fi
cd dotfiles || exit
printf "%b\n" "${GREEN}[✓]${NC} Dotfiles repository cloned successfully."
else
printf "%b\n" "${YELLOW}[+]${NC} Updating dotfiles repository..."
pull_output=$(git pull)
echo "$pull_output"
if ! echo "$pull_output" | grep -q "Already up to date."; then
printf "%b\n" "${YELLOW}Changes detected. Please re-run the script. Ignore this warning if you don't have an internet connection.${NC}"
fi
echo "${GREEN}dotfiles repository cloned successfully.${NC}"
# else
# echo "${YELLOW}Updating dotfiles repository...${NC}"
# pull_output=$(git pull)
# echo "$pull_output"
# if ! echo "$pull_output" | grep -q "Already up to date."; then
# echo "${YELLOW}Changes detected. Re-running script...${NC}"
# exec "$0" "$@"
# fi
fi
mkdir -p "$HOME/dotfiles/logs"
if [ "$W_MAIN" = "flatpak" ]; then
sudo pacman -S flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
fi
if [ $W_MAIN = "install" ]; then
echo "${YELLOW}Setting Debian Sources...${NC}"
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
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
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
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
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
if [ "$W_MAIN" = "setup" ]; then
printf "%b\n" "${YELLOW}[+]${NC} Installing GNOME..."
sudo pacman -S gnome
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
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
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
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
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
# 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
echo "${YELLOW}Installing GNOME...${NC}"
sudo apt install gnome-core gnome-software-plugin-flatpak
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
# 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
if [ ""$W_MAIN"" = "install" ] || [ ""$W_MAIN"" = "reload" ]; then
# Copy files
printf "%b\n" "${YELLOW}[+]${NC} Installing Dotfiles..."
cp -r "$HOME/dotfiles/home/." "$HOME"
# Copy files
echo "${YELLOW}Installing Dotfiles...${NC}"
cp -r "$HOME/dotfiles/home/." "$HOME"
# Copy wallpapers
printf "%b\n" "${YELLOW}[+]${NC} Installing Wallpapers..."
sudo mkdir -p /usr/share/backgrounds/gnome/
sudo cp -r $HOME/dotfiles/wallpapers/* /usr/share/backgrounds/gnome/
# Copy wallpapers
echo "${YELLOW}Installing Wallpapers...${NC}"
sudo cp -r $HOME/dotfiles/wallpapers/* /usr/share/backgrounds/gnome/
# Copy scripts
printf "%b\n" "${YELLOW}[+]${NC} Installing Scripts..."
mkdir -p "$HOME/.local/bin"
cp -r "$HOME/dotfiles/scripts/." "$HOME/.local/bin/"
# Copy scripts
echo "${YELLOW}Installing Scripts...${NC}"
mkdir -p "$HOME/.local/bin"
cp -r "$HOME/dotfiles/scripts/." "$HOME/.local/bin/"
# Install fonts
printf "%b\n" "${YELLOW}[+]${NC} Installing fonts..."
mkdir -p "$HOME/.local/share/fonts"
cp -rf "$HOME/dotfiles/fonts/"* "$HOME/.local/share/fonts/"
if [ ! -f "$HOME/dotfiles/logs/font_install.log" ]; then
# Install fonts
echo "${YELLOW}Installing fonts...${NC}"
mkdir -p "$HOME/.local/share/fonts"
cp -rf "$HOME/dotfiles/fonts/"* "$HOME/.local/share/fonts/"
if [ ! -f "$HOME/dotfiles/logs/font_install.log" ]; then
fc-cache -fv "$HOME/.local/share/fonts" >"$HOME/dotfiles/logs/font_install.log"
fi
fi
# UFW Firewall
if [ "$reload" = false ]; then
printf "%b\n" "${YELLOW}[+]${NC} Setting up UFW..."
# UFW Firewall
if [ "$reload" = false ]; then
echo "${YELLOW}Setting up UFW...${NC}"
sudo ufw default deny incoming
sudo ufw default allow outgoing
if systemctl is-active --quiet sshd; then
printf "%b\n" "${YELLOW}[+]${NC} SSH Server detected; Enabling SSH rule..."
echo "${YELLOW}SSH Server detected; Enabling SSH rule...${NC}"
sudo ufw limit 22/tcp
fi
sudo ufw enable
sudo ss -tupln | tee "$HOME/dotfiles/logs/open_ports.log"
sudo ufw status numbered | tee "$HOME/dotfiles/logs/ufw_status.log"
fi
fi
# Trude-only settings
if [ "$USER" = "trude" ]; then
# Trude-only settings
if [ "$USER" = "trude" ]; then
# Git config
git config --global commit.gpgsign true
git config --global tag.gpgSign true
@@ -193,36 +203,51 @@ if [ ""$W_MAIN"" = "install" ] || [ ""$W_MAIN"" = "reload" ]; then
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global user.name "TrudeEH"
git config --global user.email "ehtrude@gmail.com"
git config --global core.editor "/usr/bin/re.sonny.Commit"
# Configure SSH
# Clone password-store
if [ ! -f "$HOME/.ssh/id_ed25519" ] || [ ! -f "$HOME/.ssh/id_ed25519.pub" ]; then
printf "%b\n" "${RED}ED25519 key not found in ${CYAN}$HOME/.ssh/id_ed25519${NC}."
echo "${RED}ED25519 key not found in ${CYAN}$HOME/.ssh/id_ed25519. ${RED}Please add your ED25519 key pair for password-store.${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
if [ ! -d "$HOME/.password-store" ]; then
echo "${YELLOW}Cloning password-store...${NC}"
chmod 700 ~/.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
# Set up GNOME Desktop
case "$XDG_CURRENT_DESKTOP" in
*GNOME*)
printf "%b\n" "${YELLOW}[+]${NC} Installing GNOME Extensions..."
# Set up GNOME Desktop
case "$XDG_CURRENT_DESKTOP" in
*GNOME*)
echo "${YELLOW}Installing GNOME Extensions...${NC}"
install_gnome_extension "caffeine@patapon.info"
install_gnome_extension "Vitals@CoreCoding.com"
install_gnome_extension "appindicatorsupport@rgcjonas.gmail.com"
install_gnome_extension "gsconnect@andyholmes.github.io"
install_gnome_extension "blur-my-shell@aunetx"
printf "%b\n" "${YELLOW}[+]${NC} Loading Dconf settings..."
echo "${YELLOW}Loading Dconf settings...${NC}"
if ! dconf load / <"$HOME/dotfiles/dconf-settings.ini"; then
printf "%b\n" "${RED}Error loading Dconf settings.${NC}"
echo "${RED}Error loading Dconf settings.${NC}"
fi
;;
*)
whiptail --title "Warning" --msgbox \
"Dconf settings and GNOME extensions can only be installed from within GNOME.\n\nPlease run this script again from within a GNOME session." \
15 60
*)
echo
echo
echo "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${NC}"
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
fi
esac

View File

@@ -1,47 +0,0 @@
# 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

33
scripts/battery Executable file
View File

@@ -0,0 +1,33 @@
#! /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

40
scripts/build-new-kernel Executable file
View File

@@ -0,0 +1,40 @@
#! /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

66
scripts/disk-array Executable file
View File

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

61
scripts/install-docker Executable file
View File

@@ -0,0 +1,61 @@
#!/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"

27
scripts/mem Executable file
View File

@@ -0,0 +1,27 @@
#!/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

75
scripts/mon Executable file
View File

@@ -0,0 +1,75 @@
#! /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

13
scripts/neticon Executable file
View File

@@ -0,0 +1,13 @@
#!/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"

215
scripts/p.sh Normal file
View File

@@ -0,0 +1,215 @@
#! /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
)

5
scripts/temp Executable file
View File

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

View File

@@ -1,6 +1,9 @@
#!/bin/sh
# 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 -d "$port" "$proto"
done

28
scripts/volume Executable file
View File

@@ -0,0 +1,28 @@
#!/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%"

33
server/.env Normal file
View File

@@ -0,0 +1,33 @@
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,18 +2,17 @@
"settings": {
"autoUpdate": true,
"autoUpdateNotification": true,
"useQuickCss": true,
"useQuickCss": false,
"themeLinks": [],
"enabledThemes": [
"trude.theme.css"
],
"enableReactDevtools": true,
"enableReactDevtools": false,
"frameless": false,
"transparent": false,
"winCtrlQ": false,
"disableMinSize": true,
"winNativeTitleBar": false,
"localPlugins": true,
"plugins": {
"ChatInputButtonAPI": {
"enabled": true
@@ -94,17 +93,15 @@
"copyRoleColorInProfilePopout": false
},
"BetterSessions": {
"enabled": true,
"backgroundCheck": false
"enabled": false
},
"BetterSettings": {
"enabled": true,
"disableFade": true,
"eagerLoad": true,
"organizeMenu": true
"eagerLoad": true
},
"BetterUploadButton": {
"enabled": true
"enabled": false
},
"BiggerStreamPreview": {
"enabled": true
@@ -137,7 +134,7 @@
"enabled": false
},
"CopyEmojiMarkdown": {
"enabled": true
"enabled": false
},
"CopyFileContents": {
"enabled": true
@@ -175,6 +172,9 @@
"DontRoundMyTimestamps": {
"enabled": false
},
"EmoteCloner": {
"enabled": true
},
"Experiments": {
"enabled": true,
"toolbarDevMenu": false
@@ -222,7 +222,7 @@
"enabled": true
},
"GameActivityToggle": {
"enabled": true,
"enabled": false,
"oldIcon": false
},
"GifPaste": {
@@ -258,17 +258,7 @@
"enabled": false
},
"LastFMRichPresence": {
"enabled": false,
"shareUsername": false,
"shareSong": true,
"hideWithSpotify": true,
"hideWithActivity": false,
"statusName": "some music",
"statusDisplayType": "off",
"nameFormat": "status-name",
"useListeningStatus": false,
"missingArt": "lastfmLogo",
"showLastFmLogo": true
"enabled": false
},
"LoadingQuotes": {
"enabled": false,
@@ -281,8 +271,7 @@
"MemberCount": {
"enabled": true,
"memberList": true,
"toolTip": true,
"voiceActivity": true
"toolTip": true
},
"MentionAvatars": {
"enabled": true,
@@ -298,8 +287,7 @@
"enabled": true,
"latency": 2,
"detectDiscordKotlin": true,
"showMillis": false,
"ignoreSelf": false
"showMillis": false
},
"MessageLinkEmbeds": {
"enabled": true,
@@ -392,7 +380,7 @@
"enabled": true
},
"NoF1": {
"enabled": true
"enabled": false
},
"NoMaskedUrlPaste": {
"enabled": false
@@ -503,7 +491,7 @@
"enabled": true
},
"ReadAllNotificationsButton": {
"enabled": false
"enabled": true
},
"RelationshipNotifier": {
"enabled": true,
@@ -580,8 +568,7 @@
"enabled": true,
"mode": "nick-user",
"displayNames": false,
"inReplies": true,
"friendNicknames": "dms"
"inReplies": true
},
"ShowTimeoutDuration": {
"enabled": true
@@ -591,10 +578,10 @@
"persistState": false
},
"SilentTyping": {
"enabled": true,
"showIcon": true,
"enabled": false,
"showIcon": false,
"contextMenu": true,
"isEnabled": false
"isEnabled": true
},
"SortFriendRequests": {
"enabled": true,
@@ -683,7 +670,8 @@
"enabled": true
},
"VcNarrator": {
"enabled": false,
"enabled": true,
"voice": "Google US English",
"volume": 1,
"rate": 1,
"sayOwnName": false,
@@ -732,21 +720,7 @@
"enabled": true
},
"XSOverlay": {
"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
"enabled": false
},
"NoTrack": {
"enabled": true,
@@ -768,7 +742,7 @@
"enabled": true
},
"FixImagesQuality": {
"enabled": true
"enabled": false
},
"AppleMusicRichPresence": {
"enabled": true,
@@ -802,7 +776,7 @@
},
"ShikiCodeblocks": {
"enabled": false,
"theme": "https://raw.githubusercontent.com/shikijs/textmate-grammars-themes/2d87559c7601a928b9f7e0f0dda243d2fb6d4499/packages/tm-themes/themes/dark-plus.json",
"theme": "https://raw.githubusercontent.com/shikijs/textmate-grammars-themes/2d87559c7601a928b9f7e0f0dda243d2fb6d4499/packages/tm-themes/themes/catppuccin-mocha.json",
"tryHljs": "SECONDARY",
"useDevIcon": "GREYSCALE",
"bgOpacity": 100
@@ -820,19 +794,10 @@
"enabled": true
},
"HideMedia": {
"enabled": true
"enabled": false
},
"DisableDeepLinks": {
"enabled": true
},
"ExpressionCloner": {
"enabled": true
},
"CopyStickerLinks": {
"enabled": true
},
"ImageFilename": {
"enabled": false
}
},
"notifications": {
@@ -846,8 +811,8 @@
"authenticated": false,
"url": "https://api.vencord.dev/",
"settingsSync": false,
"settingsSyncVersion": 1764014321902
"settingsSyncVersion": 1748808073030
}
},
"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"
"quickCss": "\n"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 MiB