tilix icon indicating copy to clipboard operation
tilix copied to clipboard

Is there a way to edit the default profile inside dconf without knowing its ID?

Open lowgos opened this issue 1 year ago • 2 comments

Hey ! This is more of a question but I saw in a previous issue of this project that editing the profiles/default key should work but I guess that nowadays the default profile uses a random ID.

I'm currently using nixOS and I try to declaratively configure Tilix to use a custom font by using dconf but because it's declarative nothing is initiated yet and I cannot read/dump the Tilix configuration beforehand. Which means I cannot fetch the default profile ID.

I would like to access the profile keys without knowing the ID beforehand. Is it possible?

lowgos avatar May 24 '23 09:05 lowgos

I think the default profile is the first one in the list of profiles (not sure). Get a profile not by id, but by name:

#!/bin/bash

for i in $(dconf list /com/gexperts/Tilix/profiles/ | grep -v 'list'); do

    name=$(dconf read /com/gexperts/Tilix/profiles/${i}visible-name)

    if [ "$name" == "'bash'" ]; then

        # List parameters of profile with name 'bash'

        dconf list /com/gexperts/Tilix/profiles/${i}

        # Read parameter, font for example:

        dconf read /com/gexperts/Tilix/profiles/${i}font
    fi

done

237dmitry avatar May 24 '23 19:05 237dmitry

I want to be able to do this too in order to set login-shell=true as a default value for any profile for all users. Is there a way to do this?

chrisadamsonmcri avatar Sep 08 '23 07:09 chrisadamsonmcri