diff --git a/Cargo.lock b/Cargo.lock
index 7486a62082b2a420b1de6575592202cc574ab6bc..05701b7c56009e791c54b44d3e1917841b9394db 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1126,6 +1126,30 @@ dependencies = [
"workspace",
]
+[[package]]
+name = "contacts_status_item"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "client",
+ "collections",
+ "editor",
+ "futures",
+ "fuzzy",
+ "gpui",
+ "language",
+ "log",
+ "menu",
+ "picker",
+ "postage",
+ "project",
+ "serde",
+ "settings",
+ "theme",
+ "util",
+ "workspace",
+]
+
[[package]]
name = "context_menu"
version = "0.1.0"
@@ -7122,6 +7146,7 @@ dependencies = [
"collections",
"command_palette",
"contacts_panel",
+ "contacts_status_item",
"context_menu",
"ctor",
"diagnostics",
diff --git a/assets/icons/zed_32.svg b/assets/icons/zed_32.svg
new file mode 100644
index 0000000000000000000000000000000000000000..f8c0c537c394d4b6287dec7e06bf169248a35bfe
--- /dev/null
+++ b/assets/icons/zed_32.svg
@@ -0,0 +1,22 @@
+
diff --git a/crates/contacts_status_item/Cargo.toml b/crates/contacts_status_item/Cargo.toml
new file mode 100644
index 0000000000000000000000000000000000000000..df115a384220553afd75c37b6276931fe6794fb3
--- /dev/null
+++ b/crates/contacts_status_item/Cargo.toml
@@ -0,0 +1,32 @@
+[package]
+name = "contacts_status_item"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+path = "src/contacts_status_item.rs"
+doctest = false
+
+[dependencies]
+client = { path = "../client" }
+collections = { path = "../collections" }
+editor = { path = "../editor" }
+fuzzy = { path = "../fuzzy" }
+gpui = { path = "../gpui" }
+menu = { path = "../menu" }
+picker = { path = "../picker" }
+project = { path = "../project" }
+settings = { path = "../settings" }
+theme = { path = "../theme" }
+util = { path = "../util" }
+workspace = { path = "../workspace" }
+anyhow = "1.0"
+futures = "0.3"
+log = "0.4"
+postage = { version = "0.4.1", features = ["futures-traits"] }
+serde = { version = "1.0", features = ["derive", "rc"] }
+
+[dev-dependencies]
+language = { path = "../language", features = ["test-support"] }
+project = { path = "../project", features = ["test-support"] }
+workspace = { path = "../workspace", features = ["test-support"] }
diff --git a/crates/contacts_status_item/src/contacts_status_item.rs b/crates/contacts_status_item/src/contacts_status_item.rs
new file mode 100644
index 0000000000000000000000000000000000000000..928eecb8fe27d128a8d7b5074d8ffa5989eb0a5a
--- /dev/null
+++ b/crates/contacts_status_item/src/contacts_status_item.rs
@@ -0,0 +1,36 @@
+use gpui::{color::Color, elements::*, Entity, RenderContext, View};
+
+pub struct ContactsStatusItem;
+
+impl Entity for ContactsStatusItem {
+ type Event = ();
+}
+
+impl View for ContactsStatusItem {
+ fn ui_name() -> &'static str {
+ "ContactsStatusItem"
+ }
+
+ fn render(&mut self, cx: &mut RenderContext) -> ElementBox {
+ MouseEventHandler::new::(0, cx, |state, cx| {
+ Svg::new("icons/zed_32.svg")
+ .with_color(if state.clicked.is_some() {
+ Color::red()
+ } else {
+ Color::blue()
+ })
+ .boxed()
+ })
+ .on_down(gpui::MouseButton::Left, |_, cx| {})
+ .on_up(gpui::MouseButton::Left, |_, cx| {})
+ .contained()
+ .with_background_color(Color::green())
+ .boxed()
+ }
+}
+
+impl ContactsStatusItem {
+ pub fn new() -> Self {
+ Self
+ }
+}
diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml
index 6d2a617d4c81c3f7db5905b546e24df2287f9771..446139eaafbd25c8f4c4374b0f6538ee44586b58 100644
--- a/crates/zed/Cargo.toml
+++ b/crates/zed/Cargo.toml
@@ -27,6 +27,7 @@ context_menu = { path = "../context_menu" }
client = { path = "../client" }
clock = { path = "../clock" }
contacts_panel = { path = "../contacts_panel" }
+contacts_status_item = { path = "../contacts_status_item" }
diagnostics = { path = "../diagnostics" }
editor = { path = "../editor" }
file_finder = { path = "../file_finder" }
diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs
index 43a403ab7f3307dc107ce0aae9eb8aa058256947..287ac721fdc7e7d30dca312ce74fa42140e59b9d 100644
--- a/crates/zed/src/main.rs
+++ b/crates/zed/src/main.rs
@@ -14,6 +14,7 @@ use client::{
http::{self, HttpClient},
UserStore, ZED_SECRET_CLIENT_TOKEN,
};
+use contacts_status_item::ContactsStatusItem;
use fs::OpenOptions;
use futures::{
channel::{mpsc, oneshot},
@@ -87,7 +88,8 @@ fn main() {
});
app.run(move |cx| {
- std::mem::forget(cx.platform().add_status_item());
+ cx.add_status_bar_item(|_| ContactsStatusItem::new());
+
let client = client::Client::new(http.clone());
let mut languages = LanguageRegistry::new(login_shell_env_loaded);
languages.set_language_server_download_dir(zed::paths::LANGUAGES_DIR.clone());