Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:ghedamat/wmiirc

  • Loading branch information...
commit 3cac8cb127b0824d9d57313ce26587d244519ebc 2 parents 1f676b8 + 6801d84
@ghedamat authored
Showing with 7 additions and 11 deletions.
  1. +6 −10 control/action/launch.yaml
  2. +1 −1  status/weather.yaml
View
16 control/action/launch.yaml
@@ -1,7 +1,3 @@
-require:
- - pathname
- - set
-
script:
after:
- action 'launch_menu_rehash'
@@ -10,12 +6,12 @@ control:
action:
launch_menu_rehash: |
- programs = SortedSet.new
- ENV['PATH'].squeeze(':').split(':').each do |d|
- Pathname.new(d).expand_path.children.
- each {|f| programs << f.basename.to_s if f.file? and f.executable? }
- end
- $launch_menu = programs.to_a
+ $launch_menu = ENV['PATH'].to_s.split(/:+/).map do |d|
+ Dir.exist? d and Dir.entries(d).select do |f|
+ entry = File.stat(File.join(d, f))
+ entry.file? and entry.executable?
+ end
+ end.compact.flatten.uniq
launch_menu: |
if choice = key_menu($launch_menu, 'launch:', :program)
View
2  status/weather.yaml
@@ -21,7 +21,7 @@ status:
else "\u2600"
end
- temperature = @weather.temperature.to_s.tr('CF', "\u2103\u2109")
+ temperature = @weather.temperature.to_s(@metric).tr('CF', "\u2103\u2109")
[icon, temperature, status]
Please sign in to comment.
Something went wrong with that request. Please try again.