astropanel 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/astropanel.rb +13 -8
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fed00878b36e8e7adc0654dab0258717cf9ba35357d10ef354dcd96e3906f11
4
- data.tar.gz: 74e8b61b067cd6dfcac18329869e13ddc675ab2a0c6c5cfae1e7e5582c6d05cb
3
+ metadata.gz: c47f134b937b613504dd72c7b66db713dd46fdea3872df75cf6925dd7f7f4220
4
+ data.tar.gz: 7dc24b7a095e0b02d1c6c769c57736e3eb46a8b0e1e9b426a22242a757b8b545
5
5
  SHA512:
6
- metadata.gz: 2a728efddc555016ff75c35b9163843bf2db4d32cba88157d27027d13ced7bb0f39a8bcf1b5bf16502a42828c9859287e3b0d50c012d0361d6c9a78d858c3f21
7
- data.tar.gz: bcca83fb1c841bdaaa96ae65306e760cd067ecf71ae97cc879ce0963dcccd4cf1a4d8f8482ab2e770b365a4c5ca6d8ee8fb695cca64d411d908f86da41ebfaf5
6
+ metadata.gz: 7cb7dea46293198f6cffc6200198d1730cf8a24e8cb863416b4eb1e5114f8a8c72a4da5ffa87191ad579395c2a8228bcac6111c83dc83f974d289acace680862
7
+ data.tar.gz: b4e59e79208859c5762d62e12d6c7a5ecba3b1948a9d1799aaf3726e5d3c151d75a9f7ca722bb205a6afdf38da0c76f17a05c00bc85c7d648f2b6e90568e2c87
data/bin/astropanel.rb CHANGED
@@ -542,8 +542,8 @@ def getchr # PROCESS KEY PRESSES
542
542
  # Note: Curses.getch blanks out @w_t
543
543
  # @w_l.getch makes Curses::KEY_DOWN etc not work
544
544
  # Therefore resorting to the generic method
545
- c = STDIN.getc
546
- #c = STDIN.getch(min: 0, time: 5) # Non-blocking for future needs
545
+ #c = STDIN.getc
546
+ c = STDIN.getch(min: 0, time: 0.1) # Non-blocking for future needs
547
547
  case c
548
548
  when "\e" # ANSI escape sequences
549
549
  case $stdin.getc
@@ -1110,6 +1110,7 @@ loop do # OUTER LOOP - (catching refreshes via 'r')
1110
1110
  @w_l.update = true
1111
1111
  @w_u.update = true
1112
1112
  @w_d.update = true
1113
+ ix_change = true
1113
1114
  loop do # INNER, CORE LOOP
1114
1115
  @min_index = 0
1115
1116
  @max_index = @weather.size - 1
@@ -1119,15 +1120,19 @@ loop do # OUTER LOOP - (catching refreshes via 'r')
1119
1120
  w_b_info(nil) if @w_b.update
1120
1121
  @w_b.update = true
1121
1122
  # Left and right windows (browser & content viewer)
1122
- w_l_info
1123
- begin
1124
- w_u_info if @w_u.update
1125
- rescue
1126
- w_u_msg("== No info for past time ==")
1123
+ if ix_change
1124
+ w_l_info
1125
+ begin
1126
+ w_u_info if @w_u.update
1127
+ rescue
1128
+ w_u_msg("== No info for past time ==")
1129
+ end
1127
1130
  end
1128
1131
  Curses.curs_set(1) # Clear residual cursor
1129
1132
  Curses.curs_set(0) # ...from editing files
1130
- main_getkey # Get key from user
1133
+ ix = @index
1134
+ main_getkey # Get key from user
1135
+ @index == ix ? ix_change = false : ix_change = true
1131
1136
  @w_u.text = ""
1132
1137
  if @w_d.update
1133
1138
  image_show("clear")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: astropanel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-26 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -33,7 +33,8 @@ dependencies:
33
33
  description: 'This program shows essential data in order to plan your observations:
34
34
  9 days weather forecast, full ephemeris for the Sun, the Moon and all major planets,
35
35
  complete with graphic representation of rise/set times, detailed info for each day
36
- with important astronomical events, star chart displayed in the terminal and more.'
36
+ with important astronomical events, star chart displayed in the terminal and more.
37
+ New in 1.1.4: Made astropanel responsive to terminal size changes.'
37
38
  email: g@isene.com
38
39
  executables:
39
40
  - astropanel.rb