Launcher appears on correct display, Action centre can be triggered by control command
This commit is contained in:
@@ -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}")),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user