hiiro 0.1.339 → 0.1.340
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 +9 -0
- data/bin/h-notify +29 -7
- 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: 413a819364e3fce84109acbe813f653663567f5c2cb7025a2f2af4ab940051a5
|
|
4
|
+
data.tar.gz: 3b2082944a38035fcb96635c376b738e2aff83ad6d63e211e12d4693c738058a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e0dc534669ec4d03fc1549167a7bae54229398d253f843025a10fb99ee1b727eebb80c9287cb5c17d15e46186257049edad67f55de5126e900590b9e05a4ea8
|
|
7
|
+
data.tar.gz: 1451f79da21cbe8be1c98b46425e66f405fe2a2e87be9039b99ad753c7901dff025676fa73cea0e801a9f82c7234d1de554a1e0ceff282ba3b589a673d115f03
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.340] - 2026-04-07
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- `h notify jump` now runs `switch-client` before `select-window`/`select-pane` so jumping to a pane in a different session actually works
|
|
7
|
+
- `h notify ls` and `h notify menu` now auto-prune stale entries for panes that no longer exist
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- `h notify prune` — explicitly remove all notifications for dead panes
|
|
11
|
+
|
|
3
12
|
## [0.1.339] - 2026-04-07
|
|
4
13
|
|
|
5
14
|
### Added
|
data/bin/h-notify
CHANGED
|
@@ -121,16 +121,37 @@ Hiiro.run(*ARGV, tasks: true) do
|
|
|
121
121
|
if data.empty?
|
|
122
122
|
puts "No notifications."
|
|
123
123
|
else
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
live_ids = Hiiro::Tmux::Panes.fetch(all: true).ids.to_set
|
|
125
|
+
pruned = data.reject { |e| live_ids.include?(e['pane_id']) }
|
|
126
|
+
data = data.select { |e| live_ids.include?(e['pane_id']) }
|
|
127
|
+
write_log(data) if pruned.any?
|
|
128
|
+
|
|
129
|
+
if data.empty?
|
|
130
|
+
puts "No notifications (#{pruned.size} stale entries removed)."
|
|
131
|
+
else
|
|
132
|
+
puts "(#{pruned.size} stale entries removed.)" if pruned.any?
|
|
133
|
+
data.each_with_index do |e, i|
|
|
134
|
+
time_str = Time.at(e['timestamp']).strftime('%H:%M:%S')
|
|
135
|
+
prefix = TYPE_PRESETS[e['type']]&.dig(:prefix) || '[INFO]'
|
|
136
|
+
puts "%3d) %s [%s/%s] %s: %s (%s)" % [i, prefix, e['session'], e['pane_id'], e['pane_cmd'], e['message'], time_str]
|
|
137
|
+
end
|
|
128
138
|
end
|
|
129
139
|
end
|
|
130
140
|
end
|
|
131
141
|
|
|
142
|
+
add_subcmd(:prune) do
|
|
143
|
+
data = read_log
|
|
144
|
+
live_ids = Hiiro::Tmux::Panes.fetch(all: true).ids.to_set
|
|
145
|
+
pruned = data.reject { |e| live_ids.include?(e['pane_id']) }
|
|
146
|
+
write_log(data.select { |e| live_ids.include?(e['pane_id']) })
|
|
147
|
+
puts "Removed #{pruned.size} stale notification(s). #{data.size - pruned.size} remaining."
|
|
148
|
+
end
|
|
149
|
+
|
|
132
150
|
add_subcmd(:menu) do
|
|
133
|
-
|
|
151
|
+
data = read_log
|
|
152
|
+
live_ids = Hiiro::Tmux::Panes.fetch(all: true).ids.to_set
|
|
153
|
+
entries = data.select { |e| live_ids.include?(e['pane_id']) }
|
|
154
|
+
write_log(entries) if entries.size != data.size
|
|
134
155
|
|
|
135
156
|
if entries.empty?
|
|
136
157
|
next
|
|
@@ -169,8 +190,9 @@ Hiiro.run(*ARGV, tasks: true) do
|
|
|
169
190
|
next
|
|
170
191
|
end
|
|
171
192
|
|
|
172
|
-
|
|
173
|
-
|
|
193
|
+
system('tmux', 'switch-client', '-t', entry['session'])
|
|
194
|
+
system('tmux', 'select-window', '-t', entry['window_id'])
|
|
195
|
+
system('tmux', 'select-pane', '-t', entry['pane_id'])
|
|
174
196
|
|
|
175
197
|
data.delete_at(index)
|
|
176
198
|
write_log(data)
|
data/lib/hiiro/version.rb
CHANGED