hiiro 0.1.74 → 0.1.75
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/exe/h +8 -4
- data/lib/hiiro/notification.rb +30 -0
- data/lib/hiiro/version.rb +1 -1
- data/lib/hiiro.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34700bd923f6f8f4cc3eff309a5829ab3e5c2b9987bbe76c25a75a7110a59f3a
|
|
4
|
+
data.tar.gz: 160e694e2e1dc9cf6bd178f529a951961e788ee8f689963d581ecbfd5a5e4f9a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 429e255974c440edd3daf5285d7aff195622527f26297ae43c1348af8f5f8a1f552e4625f3c8406b3998e154aba7736d6eca17f717a0adbed9af6d3aeb062763
|
|
7
|
+
data.tar.gz: e60d8aef2c3bcfd6fea0763de46a4e102f812dfb560b39b1b117aaac1de9341b7032d5fd623dee425bb2eae04aa7a478d7e30818962197b5ca267f76f2d963f3
|
data/exe/h
CHANGED
|
@@ -4,15 +4,15 @@ require "hiiro"
|
|
|
4
4
|
require "fileutils"
|
|
5
5
|
|
|
6
6
|
Hiiro.run(*ARGV, cwd: Dir.pwd, plugins: [Tasks]) do
|
|
7
|
-
|
|
7
|
+
add_subcmd(:version) { |*args|
|
|
8
8
|
puts Hiiro::VERSION
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
add_subcmd(:ping) { |*args|
|
|
12
12
|
puts "pong"
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
add_subcmd(:setup) do |*args|
|
|
16
16
|
gem_root = File.expand_path("../..", __FILE__)
|
|
17
17
|
source_plugins = File.join(gem_root, "plugins")
|
|
18
18
|
source_bins = File.join(gem_root, "bin")
|
|
@@ -42,10 +42,14 @@ Hiiro.run(*ARGV, cwd: Dir.pwd, plugins: [Tasks]) do
|
|
|
42
42
|
puts "Installed #{bin_files.size} subcommands to #{dest_bin}"
|
|
43
43
|
bin_files.each { |f| puts " - #{File.basename(f)}" }
|
|
44
44
|
else
|
|
45
|
-
puts "No
|
|
45
|
+
puts "No subcmds found in #{source_bins}"
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
puts
|
|
49
49
|
puts "Setup complete! Make sure ~/bin is in your PATH."
|
|
50
50
|
end
|
|
51
|
+
|
|
52
|
+
add_subcmd(:alert) do |*args|
|
|
53
|
+
puts Notification.new(self).sounds
|
|
54
|
+
end
|
|
51
55
|
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
class Hiiro
|
|
2
|
+
class Notification
|
|
3
|
+
def self.send(hiiro)
|
|
4
|
+
new(hiiro).send
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
attr_reader :hiiro, :original_args
|
|
8
|
+
|
|
9
|
+
def initialize(hiiro)
|
|
10
|
+
@hiiro = hiiro
|
|
11
|
+
@original_args = hiiro.args.dup
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def args
|
|
15
|
+
@args ||= hiiro.args
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def sounds
|
|
19
|
+
system = Dir.glob('/System/Library/Sounds/*')
|
|
20
|
+
custom = Dir.glob(File.join(Dir.home, '.config/hiiro/sounds/*'))
|
|
21
|
+
|
|
22
|
+
all_sounds = system + custom
|
|
23
|
+
all_sounds.each_with_object({}) do |fn, h|
|
|
24
|
+
basename = File.basename(fn, File.extname(fn))
|
|
25
|
+
puts basename: basename
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
data/lib/hiiro/version.rb
CHANGED
data/lib/hiiro.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hiiro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.75
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joshua Toyota
|
|
@@ -109,6 +109,7 @@ files:
|
|
|
109
109
|
- lib/hiiro/git/worktrees.rb
|
|
110
110
|
- lib/hiiro/history.rb
|
|
111
111
|
- lib/hiiro/history/entry.rb
|
|
112
|
+
- lib/hiiro/notification.rb
|
|
112
113
|
- lib/hiiro/options.rb
|
|
113
114
|
- lib/hiiro/prefix_matcher.rb
|
|
114
115
|
- lib/hiiro/sk.rb
|