Skip to content

Commit 98b69c4

Browse files
Merge pull request #16 from PierreBorine/toggle-pin-window
refactor(pin): use the new `TogglePinWindow`
2 parents 6577385 + 2e92817 commit 98b69c4

File tree

5 files changed

+17
-124
lines changed

5 files changed

+17
-124
lines changed

Cargo.lock

Lines changed: 12 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ categories = ["command-line-utilities"]
1313

1414
[dependencies]
1515
chrono = "0.4.38"
16-
hyprland = "0.4.0-beta.2"
16+
hyprland = "0.4.0-beta.3"
1717
notify = "8.1.0"
1818

1919
[dev-dependencies]

src/daemon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::HYPRSCRATCH_DIR;
88
use hyprland::data::{Client, Clients};
99
use hyprland::dispatch::*;
1010
use hyprland::prelude::*;
11-
use hyprland::shared::HyprError;
11+
use hyprland::error::HyprError;
1212
use hyprland::Result;
1313
use std::fs::{create_dir, remove_file};
1414
use std::io::prelude::*;

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::daemon::initialize_daemon;
1010
use crate::extra::*;
1111
use crate::logs::*;
1212
use crate::utils::*;
13-
use hyprland::shared::HyprError;
13+
use hyprland::error::HyprError;
1414
use hyprland::Result;
1515
use std::env::args;
1616

src/utils.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ pub fn send_request(socket: Option<&str>, request: &str, message: &str) -> Resul
101101
pub fn set_pin(client: &Client, set_to: bool) -> Result<()> {
102102
if client.pinned != set_to {
103103
hyprland::dispatch!(
104-
Custom,
105-
"pin",
106-
format!("address:{}", client.address).as_str()
104+
TogglePinWindow,
105+
WindowIdentifier::Address(client.address.clone())
107106
)?;
108107
}
109108
Ok(())

0 commit comments

Comments
 (0)