Skip to content

Commit 12531ce

Browse files
authored
Merge pull request #17 from rafamadriz/ghostty-support
Add support for Ghostty terminal
2 parents 94959cf + a6c7f1c commit 12531ce

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/supported_terminals.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub static SUPPORTED_TERMINALS: LazyLock<Vec<SupportedTerminal>> = LazyLock::new
2222
("Foot", "footclient", "-e"),
2323
("Xterm", "xterm", "-e"),
2424
("COSMIC Terminal", "cosmic-term", "-e"),
25+
("Ghostty", "ghostty", "-e"),
2526
]
2627
.iter()
2728
.map(|(name, program, separator_arg)| SupportedTerminal {

src/terminal_combo_row.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ mod imp {
3131
obj.set_title("Preferred Terminal");
3232
obj.set_use_subtitle(true);
3333

34-
let terminals = SUPPORTED_TERMINALS
34+
let mut terminals = SUPPORTED_TERMINALS
3535
.iter()
3636
.map(|x| x.name.as_ref())
3737
.collect::<Vec<&str>>();
38+
// case-insensitive sort
39+
terminals.sort_by(|a, b| a.to_lowercase().cmp(&b.to_lowercase()));
3840
let selected_position = terminals.iter().position(|x| {
3941
Some(x)
4042
== obj

0 commit comments

Comments
 (0)