Skip to content

Commit 66815eb

Browse files
committed
🐛 fix: Improvements to detection for the theme, jamesdsp, and correct keyboard for Cinnamon.
1 parent 2cd1af9 commit 66815eb

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

biglinux-livecd/usr/share/biglinux/calamares/src/utils/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Application Information
1010
APP_NAME = "BigLinux Calamares Config"
1111
APP_ID = "com.biglinux.calamares-config"
12-
APP_VERSION = "1.0.2"
12+
APP_VERSION = "1.0.3"
1313

1414
# Paths and Directories
1515
BASE_DIR = Path(__file__).parent.parent.parent

biglinux-livecd/usr/share/biglinux/livecd/services.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def __init__(self, test_mode: bool = False):
3939
self.tmp_theme_file = "/tmp/big_desktop_theme"
4040
self.tmp_jamesdsp_file = "/tmp/big_enable_jamesdsp"
4141
self.tmp_display_profile_file = "/tmp/big_improve_display"
42-
self.tmp_simple_theme_file = "/tmp/big_simple_theme"
4342

4443
def _run_command(
4544
self,
@@ -144,9 +143,24 @@ def apply_keyboard_layout(self, layout: str):
144143
self._run_command(["setxkbmap", layout_cleaned])
145144

146145
home = os.path.expanduser("~")
147-
kxkbrc_path = os.path.join(home, ".config", "kxkbrc")
148-
kxkbrc_content = f"[Layout]\nLayoutList={layout_cleaned}\nUse=true\n"
149-
self._write_user_config_file(kxkbrc_path, kxkbrc_content)
146+
desktop_env = self.get_desktop_environment()
147+
148+
if desktop_env == "Cinnamon":
149+
# Configure keyboard layout via dconf settings file for Cinnamon
150+
settings_file = self._get_settings_file_path(desktop_env)
151+
if settings_file:
152+
sources_value = f"[('xkb', '{layout_cleaned}')]"
153+
self._modify_settings_file(settings_file, {
154+
"org/gnome/desktop/input-sources": {
155+
"sources": sources_value
156+
}
157+
})
158+
logger.info(f"Configured keyboard layout '{layout_cleaned}' in settings.cinnamon")
159+
else:
160+
# KDE/Plasma uses kxkbrc
161+
kxkbrc_path = os.path.join(home, ".config", "kxkbrc")
162+
kxkbrc_content = f"[Layout]\nLayoutList={layout_cleaned}\nUse=true\n"
163+
self._write_user_config_file(kxkbrc_path, kxkbrc_content)
150164

151165
def get_available_desktops(self) -> List[str]:
152166
"""Returns a list of available desktop layout names."""
@@ -185,7 +199,7 @@ def apply_simple_theme(self, theme: str):
185199
theme: Either "light" or "dark"
186200
"""
187201
logger.info(f"Applying simple theme: {theme}")
188-
self._write_tmp_file(self.tmp_simple_theme_file, theme)
202+
self._write_tmp_file(self.tmp_theme_file, theme)
189203

190204
desktop_env = self.get_desktop_environment()
191205

biglinux-livecd/usr/share/biglinux/livecd/ui/app_window.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ def _on_simple_theme_selected(self, view, theme):
468468
self.config.enable_jamesdsp = jamesdsp
469469
self.config.enable_enhanced_contrast = contrast
470470
logger.info(f"JamesDSP: {jamesdsp}, Enhanced Contrast: {contrast}")
471+
472+
# Apply JamesDSP settings immediately when theme is selected
473+
self.system_service.apply_jamesdsp_settings(jamesdsp)
471474
else:
472475
logger.warning("Could not get theme_view from stack")
473476

0 commit comments

Comments
 (0)