Created
December 3, 2025 15:48
-
-
Save cheeseonamonkey/a9f668fd12bc86b1dfc518179b9614a0 to your computer and use it in GitHub Desktop.
dump xfce DE config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dump_x_xfce() { | |
| # colors | |
| local H="$(tput setaf 6)" # cyan | |
| local S="$(tput setaf 3)" # yellow | |
| local E="$(tput setaf 1)" # red | |
| local N="$(tput sgr0)" | |
| echo "${H}### X / XFCE Context Dump ###${N}" | |
| echo | |
| # --- Files --- | |
| local files=( | |
| "$HOME/.xinitrc" | |
| "$HOME/.xsession" | |
| "$HOME/.xsessionrc" | |
| "$HOME/.xprofile" | |
| "$HOME/.xserverrc" | |
| "$HOME/.Xresources" | |
| "$HOME/.config/wezterm/wezterm.lua" | |
| "/etc/X11/xinit/xinitrc" | |
| "/etc/X11/Xsession" | |
| "/etc/X11/Xsession.options" | |
| ) | |
| local xml_dir="$HOME/.config/xfce4/xfconf/xfce-perchannel-xml" | |
| local xmls=(xfce4-session.xml xfwm4.xml xsettings.xml xfce4-panel.xml) | |
| for x in "${xmls[@]}"; do files+=("$xml_dir/$x"); done | |
| # --- Directories --- | |
| local dirs=( | |
| "$HOME/.config/xfce4" | |
| "$HOME/.config/xfce4/xfconf/xfce-perchannel-xml" | |
| "$HOME/.config/autostart" | |
| "/etc/X11/Xsession.d" | |
| "/usr/share/xsessions" | |
| "/etc/xdg/xfce4" | |
| "/etc/xdg/autostart" | |
| ) | |
| echo "${S}## Files${N}" | |
| for f in "${files[@]}"; do | |
| if [ -f "$f" ]; then | |
| echo "${H}--- $f${N}" | |
| sed -n '1,200p' "$f" | |
| echo | |
| else | |
| echo "${E}missing:${N} $f" | |
| fi | |
| done | |
| echo "${S}## Directories${N}" | |
| for d in "${dirs[@]}"; do | |
| if [ -d "$d" ]; then | |
| echo "${H}>>> $d${N}" | |
| ls -1 "$d" 2>/dev/null | |
| echo | |
| else | |
| echo "${E}missing:${N} $d" | |
| fi | |
| done | |
| echo "${S}## Quick Summary${N}" | |
| echo "• Found $(printf '%s\n' "${files[@]}" | xargs -I{} test -f {} && echo $? | wc -l) files" | |
| echo "• Found $(printf '%s\n' "${dirs[@]}" | xargs -I{} test -d {} && echo $? | wc -l) directories" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment