Compare commits

...

2 Commits

Author SHA1 Message Date
1e1bb5caab update website publish script 2025-06-15 17:05:09 +02:00
a58c51fd4a update resolution switcher 2025-05-26 09:51:58 +02:00
3 changed files with 48 additions and 2 deletions

View File

@ -1,8 +1,8 @@
#!/bin/bash
# Check if display connected
if xrandr --listactivemonitors | grep -q "1: +DP-3"; then
if xrandr --listactivemonitors | grep -q "2560/597x1440/336+0+0"; then
autorandr --load home_usbc --force
else
echo "Monitor 1 (DP-3) is not connected."
echo "Monitor 1 (DP) is not connected."
fi

45
scripts/pcs-clean-config Executable file
View File

@ -0,0 +1,45 @@
#!/bin/bash
# Get list of config folders
CONFIG_DIR="$HOME/.config"
CONFIG_FOLDERS=($(find "$CONFIG_DIR" -mindepth 1 -maxdepth 1 -type d -printf "%f\n"))
# Get list of installed APT packages
APT_PACKAGES=($(dpkg -l | awk '{print $2}' | tail -n +6))
# Get list of installed Flatpak apps (application IDs only)
FLATPAK_APPS=($(flatpak list --app --columns=application))
# Combine all installed package names
INSTALLED_APPS=("${APT_PACKAGES[@]}" "${FLATPAK_APPS[@]}")
# Initialize list of redundant config folders
REDUNDANT=()
for folder in "${CONFIG_FOLDERS[@]}"; do
FOUND=0
for app in "${INSTALLED_APPS[@]}"; do
if [[ "$folder" == "$app" ]]; then
FOUND=1
break
fi
done
if [[ $FOUND -eq 0 ]]; then
REDUNDANT+=("$CONFIG_DIR/$folder")
fi
done
# Output results
COUNT=${#REDUNDANT[@]}
if [[ $COUNT -eq 0 ]]; then
echo "No redundant config folders found."
else
echo "$COUNT redundant config folders found:"
for path in "${REDUNDANT[@]}"; do
echo "- $path"
done
echo
echo "To remove them, run:"
echo "rm -r ${REDUNDANT[*]}"
fi

View File

@ -1,2 +1,3 @@
hugo --minify
scp -r public/* cloud:/home/pim/website
echo -e "\e[1;32mDon't forget to update your CV as well!\e[0m"