@@ -52,7 +52,7 @@ impl Launcher {
5252}
5353
5454const DEFAULT_TERMINALS : [ ( & str , & str , & str ) ; 5 ] = [
55- ( "alacratty " , "--class=" , "-e" ) ,
55+ ( "alacritty " , "--class=" , "-e" ) ,
5656 ( "foot" , "--app-id=" , "-e" ) ,
5757 ( "ghostty" , "--class=" , "-e" ) ,
5858 ( "kitty" , "--class=" , "-e" ) ,
@@ -91,6 +91,7 @@ fn create_launcher(cfg: &PluginConfig, nvim: &String) -> Result<Launcher> {
9191 args. push ( "--neovim-bin" . to_string ( ) ) ;
9292 args. push ( nvim. clone ( ) ) ;
9393
94+ // only add class on linux
9495 if cfg ! ( target_os = "linux" ) {
9596 args. push ( "--wayland_app_id" . to_string ( ) ) ;
9697 args. push ( VAR_CLASSNAME . to_string ( ) ) ;
@@ -125,7 +126,10 @@ fn create_launcher(cfg: &PluginConfig, nvim: &String) -> Result<Launcher> {
125126 }
126127 }
127128
128- if let Some ( class_arg) = class_arg {
129+ // only add class on linux
130+ if cfg ! ( target_os = "linux" )
131+ && let Some ( class_arg) = class_arg
132+ {
129133 if class_arg. ends_with ( '=' ) {
130134 args. push ( class_arg. clone ( ) + VAR_CLASSNAME ) ;
131135 } else {
@@ -169,11 +173,14 @@ fn create_launcher(cfg: &PluginConfig, nvim: &String) -> Result<Launcher> {
169173 . find ( |( name, _, _) | * name == exe_name)
170174 && let Ok ( path) = which ( name)
171175 {
172- if class_arg. ends_with ( '=' ) {
173- args. push ( ( * class_arg) . to_string ( ) + VAR_CLASSNAME ) ;
174- } else {
175- args. push ( ( * class_arg) . to_string ( ) ) ;
176- args. push ( VAR_CLASSNAME . to_string ( ) ) ;
176+ // only add class on linux
177+ if cfg ! ( target_os = "linux" ) {
178+ if class_arg. ends_with ( '=' ) {
179+ args. push ( ( * class_arg) . to_string ( ) + VAR_CLASSNAME ) ;
180+ } else {
181+ args. push ( ( * class_arg) . to_string ( ) ) ;
182+ args. push ( VAR_CLASSNAME . to_string ( ) ) ;
183+ }
177184 }
178185
179186 if run_arg. ends_with ( '=' ) {
@@ -195,11 +202,14 @@ fn create_launcher(cfg: &PluginConfig, nvim: &String) -> Result<Launcher> {
195202 // try finding one of our supported default terminals
196203 for ( name, class_arg, run_arg) in & DEFAULT_TERMINALS {
197204 if let Ok ( path) = which ( name) {
198- if class_arg. ends_with ( '=' ) {
199- args. push ( ( * class_arg) . to_string ( ) + VAR_CLASSNAME ) ;
200- } else {
201- args. push ( ( * class_arg) . to_string ( ) ) ;
202- args. push ( VAR_CLASSNAME . to_string ( ) ) ;
205+ // only add class on linux
206+ if cfg ! ( target_os = "linux" ) {
207+ if class_arg. ends_with ( '=' ) {
208+ args. push ( ( * class_arg) . to_string ( ) + VAR_CLASSNAME ) ;
209+ } else {
210+ args. push ( ( * class_arg) . to_string ( ) ) ;
211+ args. push ( VAR_CLASSNAME . to_string ( ) ) ;
212+ }
203213 }
204214
205215 if run_arg. ends_with ( '=' ) {
0 commit comments