Skip to content

Instantly share code, notes, and snippets.

@mkg20001
Last active May 26, 2024 19:11
Show Gist options
  • Save mkg20001/70399dfc8149c1c6d8a93e9f9272e57a to your computer and use it in GitHub Desktop.
Save mkg20001/70399dfc8149c1c6d8a93e9f9272e57a to your computer and use it in GitHub Desktop.
Get XFCE4 xfconf settings as home-manager configuration
#!/usr/bin/env bash
# Note: unsupported elements such as arrays with non-strings will be returned as "<<UNSUPPORTED>>"
echo "xfconf.settings = {"
for m in $(xfconf-query -l); do
echo " $m = {"
for p in $(xfconf-query -l -c $m); do
v=$(xfconf-query -l -c $m -p $p -v | sed "s|.* ||g")
echo " \"$(echo "$p" | sed "s|^/||g")\" = \"$v\";"
done
echo " };"
done
echo "};"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment