dracula / gnome-terminal

🧛🏻‍♂️ Dark theme for Gnome Terminal
https://draculatheme.com/gnome-terminal
MIT License
326 stars 37 forks source link

Set dracula theme on default profile appears not to work #11

Open R4YM3 opened 3 years ago

R4YM3 commented 3 years ago

Hi!

I am trying to install the Dracula theme on the default gnome-terminal profile given by a fresh Ubuntu install. I am doing this because with a dotfiles installation i don't want to go into the preferences menu manually.

I tried this:

# get current default gnome-terminal profile
PROFILE_ID=$(gsettings get org.gnome.Terminal.ProfilesList default)
PROFILE_NAME=$(gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/$PROFILE_ID/ visible-name)

# set dracula theme on current gnome-terminal profile
cd  dracula/ && ./install.sh -s Dracula -p $PROFILE_NAME --install-dir-colors

This will return: 'Unnamed' is not a valid profile

How do I install the Dracula theme and activate it without going into gnome-terminal preferences? Any help would be appreciated.

R4YM3 commented 3 years ago

For now i am doing:

Copied from profiles.sh

profile_id="$(uuidgen)"
dconf write $dconfdir/default "'$profile_id'"
dconf write $dconfdir/list "['$profile_id']"
profile_dir="$dconfdir/:$profile_id"
dconf write $profile_dir/visible-name "'Default'"

then

cd  dracula/ && ./install.sh -s Dracula -p Default --install-dir-colors

Still need to test though.

Would be great to have a feature to bypass confirmation to create default script + auto select it as profile.

lowranceworks commented 2 years ago

You can install the Dracula theme on your default gnome terminal profile with this command: ./install.sh --scheme Dracula --profile :b1dcc9dd-5262-4d8d-a863-c897e6d979b9 --skip-dircolors

If you run the install.sh without declaring the --profile parameter, you will find that string as an option:

❯ ~/.dracula-terminal/install.sh --scheme Dracula --skip-dircolors

This script will ask you which color scheme you want, and which Gnome Terminal profile to overwrite.

Please note that there is no uninstall option yet. If you do not wish to overwrite any of your profiles, you should create a new profile before you run this script. However, you can reset your colors to the Gnome default, by running:

    Gnome >= 3.8 dconf reset -f /org/gnome/terminal/legacy/profiles:/
    Gnome < 3.8 gconftool-2 --recursive-unset /apps/gnome-terminal

By default, it runs in the interactive mode, but it also can be run non-interactively, just feed it with the necessary options, see 'install.sh --help' for details.

Please select a Gnome Terminal profile:
1) :b1dcc9dd-5262-4d8d-a863-c897e6d979b9 (No name)