Launcher appears on correct display, Action centre can be triggered by control command

This commit is contained in:
jmb05
2026-11-02 19:55:43 +01:00
parent f46c2408a5
commit 541ce5ccb2
5 changed files with 33 additions and 15 deletions

View File

@@ -9,12 +9,14 @@ pub const SOCKET_PATH: &str = "/run/user/1000/jmb-bar.sock";
#[derive(Clone, Debug)]
pub enum ControlCommand {
OpenRunMenu,
OpenNetMenu,
}
impl Display for ControlCommand {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
ControlCommand::OpenRunMenu => f.write_str("menu"),
ControlCommand::OpenNetMenu => f.write_str("net"),
}
}
}
@@ -25,6 +27,7 @@ impl FromStr for ControlCommand {
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"menu" => Ok(ControlCommand::OpenRunMenu),
"net" => Ok(ControlCommand::OpenNetMenu),
other => Err(format!("Unknown command: {other}")),
}
}