Skip to content

Commit

Permalink
Trying to theme prompt a different way
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ngr31 committed Jan 27, 2024
1 parent ec3322a commit d87b4e2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 88 deletions.
21 changes: 6 additions & 15 deletions config/files/usr/bin/dx-user-gsettings
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env bash

# SCRIPT VERSION
USER_SETUP_VER=3
USER_SETUP_VER=4
USER_SETUP_VER_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/cabos/gsettings-configured"
USER_SETUP_VER_RAN=$(cat "$USER_SETUP_VER_FILE")

mkdir -p "$(dirname "$USER_SETUP_VER_FILE")" || exit 1

USER_SETUP_VER_RAN=$(cat "$USER_SETUP_VER_FILE")

## Backup in case local.d config doesn't take for whatever reason

# Run script if updated
Expand Down Expand Up @@ -65,24 +66,14 @@ gsettings set org.gnome.shell.app-switcher current-workspace-only true
gsettings set org.gnome.desktop.session idle-delay 900
gsettings set org.gnome.desktop.screensaver lock-delay 3600


# Prompt theme
if test ! -e "$HOME"/.local/share/org.gnome.Prompt/palettes/lucid.palette; then
mkdir -p "$HOME"/.local/share/org.gnome.Prompt/palettes
cp -f /etc/skel.d/.local/share/org.gnome.Prompt/palettes/lucid.palette "$HOME"/.local/share/org.gnome.Prompt/palettes
fi

# Terminal theme
output=$(gsettings get org.gnome.Prompt profile-uuids)

# Extract the UUID using sed and strip single quotes
PROFILE_UUID=$(echo "$output" | sed "s/[][]//g; s/'//g")

gsettings set org.gnome.Prompt audible-bell false
gsettings set org.gnome.Prompt visual-bell false
gsettings set org.gnome.Prompt use-system-font false
gsettings set org.gnome.Prompt font-name 'Fira Code 10'

dconf write /org/gnome/Prompt/Profiles/$PROFILE_UUID/palette "'lucid'"
dconf write /org/gnome/Prompt/Profiles/$PROFILE_UUID/label "'Default'"
dconf load / < /etc/dconf/db/local.d/01-prompt

# Prevent future executions
echo "Writing state file"
Expand Down
13 changes: 13 additions & 0 deletions config/files/usr/etc/dconf/db/local.d/01-prompt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[org/gnome/Prompt]
restore-session=false
restore-window-size=false
audible-bell=false
visual-bell=false
use-system-font=false
font-name='Fira Code 10'
profile-uuids=['2871e8027773ae74d6c87a5f659bbc74']
default-profile-uuid='2871e8027773ae74d6c87a5f659bbc74'

[org/gnome/Prompt/Profiles/2871e8027773ae74d6c87a5f659bbc74]
palette='lucid'
label='Default'
61 changes: 0 additions & 61 deletions config/files/usr/etc/dconf/db/local.d/99-cabos

This file was deleted.

12 changes: 0 additions & 12 deletions config/files/usr/etc/profile.d/setup-profile.sh.old

This file was deleted.

0 comments on commit d87b4e2

Please sign in to comment.