def running
      puts
      set_window_width

      searching = true
      [
        -> {
          @kat.search @page
          searching = false
        },

        -> {
          i = 0
          while searching
            print "\rSearching...".yellow + '\\|/-'[i % 4]
            i += 1
            sleep 0.1
          end
        }
      ].map { |w| Thread.new { w.call } }.each(&:join)

      puts((res = format_results))

      if res.size > 1
        case (answer = prompt)
        when 'i' then @show_info = !@show_info
        when 'n' then @page += 1 if next?
        when 'p' then @page -= 1 if prev?
        when 'q' then return false
        else
          if (1..@kat.results[@page].size).include?((answer = answer.to_i))
            print "\nDownloading".yellow <<
                  ": #{ @kat.results[@page][answer - 1][:title] }... "
            puts download @kat.results[@page][answer - 1]
          end
        end

        true
      else
        false
      end
    end
def running
      puts
      set_window_width

      searching = true
      [
        -> {
          @kat.search @page
          searching = false
        },

        -> {
          i = 0
          while searching
            print "\rSearching...".yellow + '\\|/-'[i % 4]
            i += 1
            sleep 0.1
          end
        }
      ].map { |w| Thread.new { w.call } }.each(&:join)

      puts((res = format_results))

      if res.size > 1
        case (answer = prompt)
        when 'i' then @show_info = !@show_info
        when 'n' then @page += 1 if next?
        when 'p' then @page -= 1 if prev?
        when 'q' then return false
        else
          if (1..@kat.results[@page].size).include?((answer = answer.to_i))
            print "\nDownloading".yellow <<
                  ": #{ @kat.results[@page][answer - 1][:title] }... "
            puts download @kat.results[@page][answer - 1]
          end
        end

        true
      else
        false
      end
    end
Do the search, output the results and prompt the user for what to do next.
 Returns false on error or the user enters 'q', otherwise returns true to
 signify to the main loop it should run again.