Xde-settings: tool for a unified settings administration

XDE Settings (equivalent, or alternative to xdg-settings) is a project that aims to help users have centralized control of their session and (later on) system settings.
It is not a completed project, but it is basically an idea of how we could deal with all these settings, for each ToolKit, Display Environment, Application, Keybindings server, and the list goes on...

The base application is settingsctl in a working state, although only tested on my system and not extensively.

An accompanying application is a rofi menu, that does the same or similar things with settingsctl with a lightweight GUI. Any developer can build another helper application, in their favorite language.
This rofi menu is not ready now. Actually, I had it in a working state, but due to gained experience, I started to work on the command-line tool first. I suppose it will be easier now, that an easy command line tool can provide all those rofi menu lines that I was fetching explicitly.

Why do we need this?

It is mainly targeted to Distributions developers/teams, as a way to maintain the same function/setting that a user/session needs/uses in different environments (DEs, ToolKits etc). If it is adopted, profiles for each DE or Distro flavor could be created once (which is the demanding part), and then change only the Application/ToolKit name, to make a function usable for a different environment.
After the main idea, everything is extendable as far as anyone wants to go. Even sharing templates is possible, for application preferences, keybinding sets/profiles, preferred application groups, limited only by imagination.

I don't have much time now to explain more, but if anyone is curious to find out what I cannot describe in Greek-English, can install (in Arch based distros) settingsctl with the bellow PKGBUILD for the git version.

I will be back after about a month. Do your homework, and prepare ideas! :sweat_smile:

Start with

settingsctl help
settingsctl list <TARGET>

A first attempt for bash completion is added, which only works partially. I would appreciate some help on this, as I find it important for the specific tool.

PKGBUILD for git version
# Maintainer: Petros Samaras (petsam at gitlab)

pkgname=settingsctl-git
_pkgname=settingsctl
pkgver=0.0.1.r4.ga6598e6
pkgrel=1
pkgdesc="A utility for DE settings administration"
arch=('x86_64')
url="https://gitlab.com/petsam/$_pkgname"
license=('GPL3')
provides=('settingsctl')
conflicts=('settingsctl')
depends=()
source=("git+$url.git#branch=main")
sha256sums=('SKIP')

pkgver() {
    cd $_pkgname
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

# Backup all settings files in /etc
backup() {
    cd $_pkgname
    find etc -type f -name "*"
}

package() {
	_srcdir=$srcdir/$_pkgname
	cd $_pkgname
	# Install files to /etc
	mapfile -t _files < <(find etc -type f -name "*" )
	for _file in "${_files[@]}" ; do
		install -Dm755 -t "$pkgdir/${_file%/*}" "$_file"
	done
	# Install binary and bash completions
	install -Dm755 bin/settingsctl "$pkgdir/usr/bin/settingsctl"
	install -Dm755 settingsctl.bash-completion "$pkgdir/usr/share/bash-completion/completions/settingsctl"

}
7 Likes