Skip to content

Commit 01e50c4

Browse files
authored
Merge pull request #7 from wawe/add_primary_flag
Add primary flag to Output struct
2 parents 8ef4d14 + 46a5eb5 commit 01e50c4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ impl I3Connection {
367367
reply::Output {
368368
name: o.find("name").unwrap().as_string().unwrap().to_owned(),
369369
active: o.find("active").unwrap().as_boolean().unwrap(),
370+
primary: o.find("primary").unwrap().as_boolean().unwrap(),
370371
current_workspace: match o.find("current_workspace").unwrap().clone() {
371372
json::Value::String(c_w) => Some(c_w),
372373
json::Value::Null => None,

src/reply.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ pub struct Output {
6363
pub name: String,
6464
/// Whether the output is currently active (has a valid mode).
6565
pub active: bool,
66+
/// Whether the output is currently the primary output.
67+
pub primary: bool,
6668
/// The name of the current workspace that is visible on this output. None if the output is
6769
/// not active.
6870
pub current_workspace: Option<String>,

0 commit comments

Comments
 (0)