Add configuration for GNOME
This commit is contained in:
parent
97420532e0
commit
c5f9769acf
24 changed files with 4188 additions and 0 deletions
34
.local/bin/import-gnome-extension-schemas
Executable file
34
.local/bin/import-gnome-extension-schemas
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Make the `GSettings` schemas of all user-installed GNOME Shell extensions
|
||||
# visible to a plain `gsettings`, by symlinking the *.gschema.xml files
|
||||
# into the user schema directory and compiling them
|
||||
#
|
||||
# Idempotent: Re-running refreshes the links, prunes dangling ones
|
||||
# (e.g., from removed extensions), and recompiles
|
||||
|
||||
set -eu
|
||||
|
||||
|
||||
XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||
|
||||
EXTENSIONS_DIR="$XDG_DATA_HOME/gnome-shell/extensions"
|
||||
SCHEMAS_DIR="$XDG_DATA_HOME/glib-2.0/schemas"
|
||||
|
||||
|
||||
mkdir -p "$SCHEMAS_DIR"
|
||||
|
||||
|
||||
# Prune symlinks whose target no longer exists
|
||||
find "$SCHEMAS_DIR" -maxdepth 1 -type l ! -exec test -e {} \; -exec rm -v -- {} \;
|
||||
|
||||
|
||||
# Link every schema shipped by an extension
|
||||
for xml in "$EXTENSIONS_DIR"/*/schemas/*.gschema.xml; do
|
||||
[ -e "$xml" ] || continue # because the glob does not expand if empty
|
||||
echo " $(basename "$xml")"
|
||||
ln -sf -- "$xml" "$SCHEMAS_DIR/"
|
||||
done
|
||||
|
||||
|
||||
glib-compile-schemas "$SCHEMAS_DIR"
|
||||
Loading…
Reference in a new issue