diff --git a/CHANGELOG.md b/CHANGELOG.md index fda573a7..ad59d79b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,10 @@ release is checked here and released on by hand. - iPhones: the control center's battery page shows the battery size in mAh (AryaVora621). +- Apps that run in a terminal, and the menu's Install or Remove Package + entries, open in foot. They did nothing before: xdg-terminal-exec was + called but not installed, and no default terminal was named (ozz1ee-dev). + ## [0.4.10] - 2026-12-05 Built on orchard 0.3.24. diff --git a/system/overlay/etc/xdg/xdg-terminals.list b/system/overlay/etc/xdg/xdg-terminals.list new file mode 100644 index 00000000..c4df3d7e --- /dev/null +++ b/system/overlay/etc/xdg/xdg-terminals.list @@ -0,0 +1,3 @@ +# The tablet's terminal is foot. Desktop entries with Terminal=true, and +# menu actions that call xdg-terminal-exec, use this list. +foot.desktop diff --git a/tests/test_xdg_terminals.py b/tests/test_xdg_terminals.py new file mode 100644 index 00000000..5e7b4b41 --- /dev/null +++ b/tests/test_xdg_terminals.py @@ -0,0 +1,27 @@ +"""xdg-terminal-exec is pointed at foot, so Terminal=true entries have a terminal.""" +from pathlib import Path +import unittest + +PROJECT = Path(__file__).resolve().parents[1] +LIST = PROJECT / 'system/overlay/etc/xdg/xdg-terminals.list' + + +class XdgTerminals(unittest.TestCase): + def test_the_system_list_names_foot(self): + text = LIST.read_text() + names = [line.strip() for line in text.splitlines() + if line.strip() and not line.lstrip().startswith('#')] + self.assertEqual(names, ['foot.desktop']) + + def test_the_package_installs_the_list(self): + import sys + sys.path.insert(0, str(PROJECT)) + from package_tree import system_files + files = system_files() + self.assertIn('etc/xdg/xdg-terminals.list', files) + self.assertEqual(files['etc/xdg/xdg-terminals.list'][0], LIST.read_bytes()) + self.assertEqual(files['etc/xdg/xdg-terminals.list'][1], 0o644) + + +if __name__ == '__main__': + unittest.main()