Paste number 314571: untitled

Paste number 314571: untitled
Pasted by: jmd
When:6 years, 3 months ago
Share:Tweet this! | http://paste.lisp.org/+6QQ3
Channel:None
Paste contents:
Raw Source | XML | Display As
e Edit Options Buffers Tools Scheme Help                                                                                             
#!/usr/bin/guile
!#


(use-modules (ncurses curses)
             (gnu packages)
             (guix)
             (ncurses panel))


(define (put-name-in-window win)
 (fold-packages
   (lambda (pkg lst)  (if (> lst 10) lst (begin (addstr win (string-append (package-name pkg) "\n")) (refresh win) (touchwin win) (upda\
te-panels)  (doupdate) (+ 1 lst))))
   0 ))

;  )                                                                                                                                    

;; ; (string-append (package-name pkg) "\n")                                                                                            
;; )) '()))                                                                                                                             

(define stdscr (initscr))

(let* (
       (swidth (cols))
       (slines (lines))
       (win1 (newwin slines (floor (/ swidth 2)) 0 0))
       (swin1 (subwin win1 (- slines 2) (- (floor (/ swidth 2)) 2) 1 1))
       (win2 (newwin slines (floor (/ swidth 2)) 0 (floor (/ swidth 2))))
       (panel1 (new-panel win1))
       (panel2 (new-panel win2))
       )

  (box win1 (acs-vline) (acs-hline))
  (scrollok! swin1 #t)

;  (put-name-in-window swin1)                                                                                                           
  (addstr swin1 "THIS\n")
  (addstr swin1 "that\n")
  (addstr swin1 "END\n")

  (box win2 (acs-vline) (acs-hline))
  (addstr win2 "box 2" #:y 1 #:x 1)

  (touchwin win1)
  (update-panels)
  (doupdate)
  (sleep 4)

  ;;  (move-panel panel1 0 10)                                                                                                          
  ;; (scrl swin1 -3)                                                                                                                    

  ;; (update-panels)                                                                                                                    
  ;; (doupdate)                                                                                                                         
  ;; (sleep 6)                                                                                                                          

  ;; ;                                                                                                                                  
  #t
  )

(endwin)

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.