Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Aug 18, 2024
1 parent 370183e commit 5f6facb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions overlays/pkgs/sway-helper/src/commands/focus_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ impl CliRun for FocusWindow {
// TODO
println!("{:#?}", tree);
let container_id = 12;

sway.run_command(format!("[con_id={container_id}] focus")).unwrap();

sway.run_command(format!("[con_id={container_id}] focus"))
.unwrap();
}
}
9 changes: 6 additions & 3 deletions overlays/pkgs/sway-helper/src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
mod focus_window;
mod rename_workspace;
mod switch_to_workspace;
mod focus_window;

use self::{focus_window::FocusWindow, rename_workspace::RenameWorkspace, switch_to_workspace::SwitchToWorkspace};
use self::{
focus_window::FocusWindow, rename_workspace::RenameWorkspace,
switch_to_workspace::SwitchToWorkspace,
};
use clap::Subcommand;

pub(crate) trait CliRun {
Expand All @@ -23,7 +26,7 @@ impl CliRun for Command {
Self::Run => todo!(),
Self::RenameWorkspace => RenameWorkspace {}.run(sway),
Self::SwitchToWorkspace => SwitchToWorkspace {}.run(sway),
Self::FocusWindow => FocusWindow{}.run(sway),
Self::FocusWindow => FocusWindow {}.run(sway),
}
}
}

0 comments on commit 5f6facb

Please sign in to comment.