xi-frontend / xi-term

A terminal frontend for Xi
MIT License
485 stars 37 forks source link

Would love windows support... #6

Open mrcaron opened 7 years ago

mrcaron commented 7 years ago

Perhaps using something like this... https://github.com/rschmitt/heatseeker/blob/master/src/screen/windows.rs

wendivoid commented 6 years ago

This is blocked by ticki/termion#103

prabirshrestha commented 5 years ago

There is a termion PR for support for windows but it hasn't moved. https://gitlab.redox-os.org/redox-os/termion/merge_requests/151. I was able to compile xi-term to windows using it.

index 224032a..a4e1b76 100644
--- a/src/core/tui.rs
+++ b/src/core/tui.rs
@@ -11,7 +11,6 @@ use xrl::{
 };

 use failure::Error;
-use xdg::BaseDirectories;

 use core::{Command, Terminal, TerminalEvent};
 use widgets::{CommandPrompt, Editor};
@@ -26,11 +25,8 @@ pub struct Tui {

 impl Tui {
     pub fn new(mut client: Client, events: UnboundedReceiver<CoreEvent>) -> Result<Self, Error> {
-        let conf_dir = BaseDirectories::with_prefix("xi")
-            .ok()
-            .and_then(|dirs| Some(dirs.get_config_home().to_string_lossy().into_owned()));
         run(client
-            .client_started(conf_dir.as_ref().map(|dir| &**dir), None)
+            .client_started(Some("d:\\tmp"), None)
             .map_err(|_| ())
         );

Seems like xdg should be optional for windows builds.

It seems like the first step to get it working properly would be to have the termion PR merge to master.

image