Skip to content

Commit 8e05daf

Browse files
feat: apply theme font to iTerm2 terminal sessions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3845b27 commit 8e05daf

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

python_search/apps/iterm_terminal.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import tempfile
22
import os
33

4+
from python_search.apps.theme.theme import get_current_theme
5+
46

57
class ITermTerminal:
68
"""
@@ -13,6 +15,8 @@ def wrap_cmd_into_terminal(self, cmd, title=None, hold_terminal_open_on_end=True
1315
Creates a temporary shell script to avoid complex escaping issues.
1416
"""
1517
title_str = title if title else "PythonSearch"
18+
theme = get_current_theme()
19+
font_spec = f"{theme.font} {theme.font_size}"
1620

1721
# Create a temporary script file to execute
1822
fd, script_path = tempfile.mkstemp(suffix=".sh", prefix="pythonsearch_")
@@ -55,13 +59,15 @@ def wrap_cmd_into_terminal(self, cmd, title=None, hold_terminal_open_on_end=True
5559
create tab with default profile command "{script_path}"
5660
tell current session
5761
set name to "{title_str}"
62+
set normal font to "{font_spec}"
5863
end tell
5964
end tell
6065
on error
6166
create window with default profile command "{script_path}"
6267
tell current window
6368
tell current session
6469
set name to "{title_str}"
70+
set normal font to "{font_spec}"
6571
end tell
6672
end tell
6773
end try

0 commit comments

Comments
 (0)