summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrx862023-07-20 21:11:13 +0800
committerBrx862023-07-20 21:11:13 +0800
commit5f9917da7ea18684c120225ce156e554fa925205 (patch)
treead6d0d7b2e93008ff5dff9041c63f1de3c67990b
parent739ba0809d4bae827b7c03b311d6003b6af1db57 (diff)
downloadaur-xstop.tar.gz
add notify
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD8
-rwxr-xr-xxstop4
-rw-r--r--xstop-pause.pngbin0 -> 618 bytes
-rw-r--r--xstop-resume.pngbin0 -> 720 bytes
5 files changed, 13 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index daa268b6ed31..793e582eada9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -11,6 +11,10 @@ pkgbase = xstop
depends = xorg-xprop
provides = xstop
source = xstop
- sha256sums = cd4f5c78ae660d9b93ce6d882c5d0bacb6babaf84867fc85053ac2a15f8e3416
+ source = xstop-pause.png
+ source = xstop-resume.png
+ sha256sums = d62d0629e88d63231611ea125989c3966561a80d40c64d3008a356b6b8c5ec71
+ sha256sums = 0cf450a42f44711e301a86ca6e103ab09492879df27022901d61471a768702b5
+ sha256sums = 265cd2db16a1fa320a79c4c5ee047c8dba8be5d9251620f2697ebc188e8de6d5
pkgname = xstop
diff --git a/PKGBUILD b/PKGBUILD
index 805e769537c4..65cf1af80696 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,9 +9,13 @@ arch=("x86_64")
license=("GPL3")
depends=("libnotify" "procps-ng" "python" "xorg-xprop")
provides=("xstop")
-source=("xstop")
-sha256sums=('cd4f5c78ae660d9b93ce6d882c5d0bacb6babaf84867fc85053ac2a15f8e3416')
+source=("xstop" "xstop-pause.png" "xstop-resume.png")
+sha256sums=('d62d0629e88d63231611ea125989c3966561a80d40c64d3008a356b6b8c5ec71'
+ '0cf450a42f44711e301a86ca6e103ab09492879df27022901d61471a768702b5'
+ '265cd2db16a1fa320a79c4c5ee047c8dba8be5d9251620f2697ebc188e8de6d5')
package() {
install -Dm755 "xstop" -t "$pkgdir/usr/bin"
+ install -Dm644 "xstop-pause.png" -t "$pkgdir/usr/share/icons/hicolor/48x48/actions/"
+ install -Dm644 "xstop-resume.png" -t "$pkgdir/usr/share/icons/hicolor/48x48/actions/"
}
diff --git a/xstop b/xstop
index c8210847a13b..ff51d9bd0a69 100755
--- a/xstop
+++ b/xstop
@@ -15,8 +15,8 @@ if info:
if state == "T":
# 如果已暂停,则发送恢复信号
os.popen(f"kill -CONT {pid} {child_pids}")
- print(f"Resume: {pid} {name}")
+ os.popen(f"notify-send 'Resume: {name}' -i xstop-resume -t 5000")
else:
# 如果正在运行,则发送暂停信号
os.popen(f"kill -STOP {pid} {child_pids}")
- print(f"Stop: {pid} {name}")
+ os.popen(f"notify-send 'Pause: {name}' -i xstop-pause -t 5000")
diff --git a/xstop-pause.png b/xstop-pause.png
new file mode 100644
index 000000000000..ca30e662c3bc
--- /dev/null
+++ b/xstop-pause.png
Binary files differ
diff --git a/xstop-resume.png b/xstop-resume.png
new file mode 100644
index 000000000000..d8d113f93685
--- /dev/null
+++ b/xstop-resume.png
Binary files differ