Skip to content

Commit 552100d

Browse files
committed
bump flake.lock && bump dependencies with appropriate changes to code && change version 1.3.0-dev -> 1.3.0
1 parent 7756d1f commit 552100d

File tree

9 files changed

+253
-150
lines changed

9 files changed

+253
-150
lines changed

Cargo.lock

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

flake.lock

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

swhkd.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
rustPlatform.buildRustPackage rec {
1111

1212
pname = "swhkd";
13-
version = "1.3.0-dev";
13+
version = "1.3.0";
1414

1515
src = lib.cleanSource ./.;
1616

swhkd/Cargo.toml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,25 @@
22
description = "Sxhkd clone for Wayland (works on TYY and X11 too)"
33
edition = "2021"
44
name = "Simple-Wayland-HotKey-Daemon"
5-
version = "1.3.0-dev"
6-
authors = [
7-
"Shinyzenith <aakashsensharma@gmail.com>\n",
8-
"Angelo Fallaria <ba.fallaria@gmail.com>\n",
9-
"EdenQwQ <lsahlm1eden@gmail.com>\n",
10-
]
5+
version = "1.3.0"
116

127
[build-dependencies]
13-
flate2 = "1.0.24"
8+
flate2 = "1.0.30"
149

1510
[dependencies]
16-
clap = { version = "4.1.0", features = ["derive"] }
17-
env_logger = "0.9.0"
18-
evdev = { version = "0.12.0", features = ["tokio"] }
19-
itertools = "0.10.3"
20-
log = "0.4.14"
21-
nix = "0.23.1"
22-
signal-hook = "0.3.13"
11+
clap = { version = "4.5.8", features = ["derive"] }
12+
env_logger = "0.11.3"
13+
evdev = { version = "0.12.2", features = ["tokio"] }
14+
itertools = "0.13.0"
15+
log = "0.4.22"
16+
nix = "0.26.4"
17+
signal-hook = "0.3.17"
2318
signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"] }
24-
sysinfo = "0.23.5"
25-
tokio = { version = "1.24.2", features = ["full"] }
26-
tokio-stream = "0.1.8"
19+
sysinfo = "0.30.12"
20+
tokio = { version = "1.38.0", features = ["full"] }
21+
tokio-stream = "0.1.15"
2722
tokio-udev = "0.9.1"
2823

29-
[features]
30-
rfkill = []
31-
3224
[[bin]]
3325
name = "swhkd"
3426
path = "src/daemon.rs"

swhkd/src/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ impl PartialEq for KeyBinding {
164164

165165
pub trait Prefix {
166166
fn send(self) -> Self;
167+
#[cfg(test)]
167168
fn on_release(self) -> Self;
168169
}
169170

@@ -189,6 +190,7 @@ impl Prefix for KeyBinding {
189190
self.send = true;
190191
self
191192
}
193+
#[cfg(test)]
192194
fn on_release(mut self) -> Self {
193195
self.on_release = true;
194196
self
@@ -241,6 +243,7 @@ impl Prefix for Hotkey {
241243
self.keybinding.send = true;
242244
self
243245
}
246+
#[cfg(test)]
244247
fn on_release(mut self) -> Self {
245248
self.keybinding.on_release = true;
246249
self

swhkd/src/daemon.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use config::Hotkey;
44
use evdev::{AttributeSet, Device, InputEventKind, Key};
55
use nix::{
66
sys::stat::{umask, Mode},
7-
unistd::{Group, Uid},
7+
unistd::{Group, Uid}
88
};
99
use signal_hook::consts::signal::*;
1010
use signal_hook_tokio::Signals;
@@ -19,7 +19,7 @@ use std::{
1919
path::{Path, PathBuf},
2020
process::{exit, id},
2121
};
22-
use sysinfo::{ProcessExt, System, SystemExt};
22+
use sysinfo::System;
2323
use tokio::select;
2424
use tokio::time::Duration;
2525
use tokio::time::{sleep, Instant};
@@ -470,7 +470,7 @@ pub fn setup_swhkd(invoking_uid: u32, runtime_path: String) {
470470
let mut sys = System::new_all();
471471
sys.refresh_all();
472472
for (pid, process) in sys.processes() {
473-
if pid.to_string() == swhkd_pid && process.exe() == env::current_exe().unwrap() {
473+
if pid.to_string() == swhkd_pid && process.exe() == env::current_exe().unwrap().parent() {
474474
log::error!("Swhkd is already running!");
475475
log::error!("pid of existing swhkd process: {}", pid.to_string());
476476
log::error!("To close the existing swhkd process, run `sudo killall swhkd`");

swhkd/src/uinput.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use evdev::{
33
AttributeSet, Key, RelativeAxisType, SwitchType,
44
};
55

6-
use nix::ioctl_none;
7-
use std::fs::File;
8-
use std::os::unix::io::AsRawFd;
6+
//use nix::ioctl_none;
7+
//use std::fs::File;
8+
//use std::os::unix::io::AsRawFd;
99

1010
#[cfg(feature = "rfkill")]
1111
ioctl_none!(rfkill_noinput, b'R', 1);

swhks/Cargo.toml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,14 @@ description = "Server for swhkd to run shell commands at invoking user level."
33
edition = "2021"
44
license = "BSD-2-Clause"
55
name = "swhks"
6-
version = "1.3.0-dev"
7-
authors = [
8-
"Shinyzenith <aakashsensharma@gmail.com>\n",
9-
"Angelo Fallaria <ba.fallaria@gmail.com>\n",
10-
"EdenQwQ <lsahlm1eden@gmail.com>\n",
11-
]
6+
version = "1.3.0"
127

138
[dependencies]
14-
env_logger = "0.9.0"
15-
log = "0.4.14"
16-
nix = "0.23.1"
17-
sysinfo = "0.23.5"
18-
clap = { version = "4.1.0", features = ["derive"] }
9+
env_logger = "0.11.3"
10+
log = "0.4.22"
11+
nix = "0.26.4"
12+
sysinfo = "0.30.12"
13+
clap = { version = "4.5.8", features = ["derive"] }
1914

2015
[[bin]]
2116
name = "swhks"

swhks/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::{
1313
path::{Path, PathBuf},
1414
process::{exit, id, Command, Stdio},
1515
};
16-
use sysinfo::{ProcessExt, System, SystemExt};
16+
use sysinfo::System;
1717

1818
mod environ;
1919

@@ -85,7 +85,7 @@ fn main() -> std::io::Result<()> {
8585
let mut sys = System::new_all();
8686
sys.refresh_all();
8787
for (pid, process) in sys.processes() {
88-
if pid.to_string() == swhks_pid && process.exe() == env::current_exe().unwrap() {
88+
if pid.to_string() == swhks_pid && process.exe() == env::current_exe().unwrap().parent() {
8989
log::error!("Server is already running!");
9090
exit(1);
9191
}

0 commit comments

Comments
 (0)