Method: Twterm::Notifier#initialize

Defined in:
lib/twterm/notifier.rb

#initializeNotifier

Returns a new instance of Notifier.



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/twterm/notifier.rb', line 6

def initialize
  @window = stdscr.subwin(2, stdscr.maxx, stdscr.maxy - 2, 0)
  @queue = Queue.new
  @help = ''

  Thread.new do
    while notification = @queue.pop
      show(notification)
      sleep 3
      show
    end
  end
end