Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add app class 'com.mitchellh.ghostty' #487

Merged
merged 1 commit into from
Dec 31, 2024
Merged

Add app class 'com.mitchellh.ghostty' #487

merged 1 commit into from
Dec 31, 2024

Conversation

kzh
Copy link
Contributor

@kzh kzh commented Dec 31, 2024

Description of the Changes:
This change adds ghostty to the list of supported terminals.

Ghostty: https://github.com/ghostty-org/ghostty

Reason for Changes:

Related Issue(s) or PR(s):

Testing Done:

@RedBearAK RedBearAK merged commit 5db309b into RedBearAK:main Dec 31, 2024
@RedBearAK
Copy link
Owner

@kzh

Thanks for this. I had seen some videos about Ghostty popping up in my YT recs in the last couple of days, but haven't checked it out yet.

In X11 session, apps usually still don't choose to use the Wayland-style app class strings, even if they are new apps. If I'm reading the references to WM_CLASS in the Ghostty code correctly, that means it will be appropriate to add these, which I'm doing in a separate merge after merging your PR:

    "ghostty",
    "ghostty-debug",

Reference:

https://github.com/ghostty-org/ghostty/blob/478fe3917c2882a1c321f9d1eec808b71698974d/src/apprt/gtk/App.zig#L362

@RedBearAK
Copy link
Owner

@kzh

Added a keymap for Ghostty in the default Toshy config file, between these two keymaps:

keymap("Deepin Terminal overrides", {
    C("RC-w"):                  C("Alt-w"),                     # Close only current tab, instead of all other tabs
    C("RC-j"):                  None,                           # Block Cmd+J from remapping to vertical split (Ctrl+Shift+J) 
    C("RC-minus"):              C("C-minus"),                   # Decrease font size/zoom out 
    C("RC-equal"):              C("C-equal"),                   # Increase font size/zoom in
}, when = matchProps(clas="^deepin-terminal$"))

keymap("Ghostty terminal overrides", {
    C("RC-Equal"):              C("C-Equal"),                   # Increase font size [override general terminals remap]
}, when = matchProps(clas="^ghostty$|^ghostty-debug$|^com.mitchellh.ghostty$"))

keymap("Hyper terminal tab switching", {
    C("RC-Equal"):              C("C-Equal"),                   # Increase font size [override general terminals remap]
    C("Shift-LC-Tab"):          C("Shift-C-Tab"),               # Tab nav: Go to prior tab (left) [override general remap]
    C("LC-Tab"):                C("C-Tab"),                     # Tab nav: Go to next tab (right) [override general remap]
}, when = matchProps(clas="^hyper$"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants