Compare commits
2 Commits
de73605221
...
1e1bb5caab
Author | SHA1 | Date | |
---|---|---|---|
1e1bb5caab | |||
a58c51fd4a |
@ -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
45
scripts/pcs-clean-config
Executable 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
|
@ -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"
|
||||
|
Reference in New Issue
Block a user