From 3220e22408795d63be93f0548b84ec9b5edf850f Mon Sep 17 00:00:00 2001 From: LLoyderino Date: Sat, 1 Nov 2025 14:08:08 +0100 Subject: Theme utility will now require Gnome rather than Linux If one runs Linux but doesn't have Gnome it will lead to issues --- init.el | 7 +------ theme.el | 12 ++++++++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/init.el b/init.el index c044d85..0784c7b 100644 --- a/init.el +++ b/init.el @@ -126,12 +126,7 @@ (vundo-compact-display t)) ;; Catppuccin theme -(if (eq system-type 'windows-nt) - (use-package catppuccin-theme - :config ;; On Windows I am happy with perma dark mode - (setq catppuccin-flavor 'mocha) - (load-theme 'catppuccin :no-confirm)) - (load (locate-user-emacs-file "theme.el"))) +(load (locate-user-emacs-file "theme.el")) ;; Completion (use-package corfu diff --git a/theme.el b/theme.el index 514687f..2a574bd 100644 --- a/theme.el +++ b/theme.el @@ -5,6 +5,9 @@ (use-package catppuccin-theme) +(defun has-gsettings () + (= (call-process-shell-command "gsettings --version") 0)) + (defun set-color-scheme () (set-theme (string-trim @@ -28,8 +31,13 @@ (set-process-query-on-exit-flag process nil))) ;; Initialize settings -(set-color-scheme) -(monitor-theme-changes) +(when (has-gsettings) + (set-color-scheme) + (monitor-theme-changes)) + +(when (not (has-gsettings)) + (setq catppuccin-flavor 'mocha) + (load-theme 'catppuccin :no-confirm)) (provide 'theme) -- cgit v1.3.1