hiiro 0.1.373 → 0.1.374
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/CLAUDE.md +1 -1
- data/lib/hiiro/notification.rb +15 -18
- data/lib/hiiro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2eeea73b7e9f5a66d4156b20253a3b5815802c65c1ca9740694647fd9e2347e4
|
|
4
|
+
data.tar.gz: 3f79d0998110b47a4bc98f27764042a0ac48f263a6a2abb1ed8d59a6ddf512c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b023e9228aa0f2bc9053df47ce1fb37ad81b545c4ddbbb81735e0a32da501641252b61ed86ecd9319188b2838c90c9183283f3233087c825799e48905cb5d0bb
|
|
7
|
+
data.tar.gz: 5c952b79fb9bcf1697e7a1b88d86f097e6ba91220db03dc682ced02475ec10fa638da33578019e55fa2cfc441665a3808cee2ba7b45107056a8676cedf23ab2d
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.1.374] - 2026-09-14
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- `h alert` plays sounds through terminal-notifier's `-sound` (macOS system sound names, `none` for silent, `-S` accepted as an alias for `-s`) instead of a separate `afplay` process
|
|
9
|
+
|
|
10
|
+
### Removed
|
|
11
|
+
- Support for custom sound files in `~/.config/hiiro/sounds/`
|
|
12
|
+
|
|
5
13
|
## [0.1.372] - 2026-09-14
|
|
6
14
|
|
|
7
15
|
### Changed
|
data/CLAUDE.md
CHANGED
|
@@ -331,7 +331,7 @@ macOS notification wrapper using terminal-notifier:
|
|
|
331
331
|
|
|
332
332
|
```ruby
|
|
333
333
|
Hiiro::Notification.show(hiiro) # Show notification based on hiiro.args
|
|
334
|
-
# Supports: -m message, -t title, -l link, -c command, -s sound
|
|
334
|
+
# Supports: -m message, -t title, -l link, -c command, -s sound (macOS system sound name via terminal-notifier -sound; none for silent)
|
|
335
335
|
```
|
|
336
336
|
|
|
337
337
|
### Hiiro::Queue (lib/hiiro/queue.rb)
|
data/lib/hiiro/notification.rb
CHANGED
|
@@ -13,7 +13,8 @@ class Hiiro
|
|
|
13
13
|
|
|
14
14
|
def options
|
|
15
15
|
@options ||= Options.parse(args) do
|
|
16
|
-
option(:sound, short: :s, default: '
|
|
16
|
+
option(:sound, short: :s, default: 'Basso', desc: 'macOS system sound name, or none')
|
|
17
|
+
option(:sound_alias, short: :S, desc: 'alias for -s')
|
|
17
18
|
option(:title, short: :t, desc: 'title')
|
|
18
19
|
option(:message, short: :m, desc: 'message')
|
|
19
20
|
option(:link, short: :l, desc: 'link to open')
|
|
@@ -25,32 +26,28 @@ class Hiiro
|
|
|
25
26
|
@args ||= hiiro.args
|
|
26
27
|
end
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
end
|
|
29
|
+
# System sound name for terminal-notifier's -sound, or nil for silent.
|
|
30
|
+
# Herdr has its own sounds, so no separate afplay process is started.
|
|
31
|
+
def sound
|
|
32
|
+
name = (options.sound_alias || options.sound).to_s.strip
|
|
33
|
+
return nil if name.empty? || name.casecmp?('none')
|
|
34
|
+
name == 'default' ? name : name.capitalize
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
def
|
|
38
|
-
return unless has_cmd?
|
|
39
|
-
|
|
37
|
+
def command
|
|
40
38
|
cmd = [binpath]
|
|
41
39
|
cmd += ['-message', options.message] if options.message
|
|
42
40
|
cmd += ['-title', options.title.tr('()[]', '')] if options.title
|
|
43
41
|
cmd += ['-open', options.link] if options.link
|
|
44
42
|
cmd += ['-execute', options.command] if options.command
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
play_sound
|
|
43
|
+
cmd += ['-sound', sound] if sound
|
|
44
|
+
cmd
|
|
48
45
|
end
|
|
49
46
|
|
|
50
|
-
def
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
def show
|
|
48
|
+
return unless has_cmd?
|
|
49
|
+
|
|
50
|
+
Process.detach(spawn(*command))
|
|
54
51
|
end
|
|
55
52
|
|
|
56
53
|
def binpath
|
data/lib/hiiro/version.rb
CHANGED