;; gwmrc.scm
;;
;; In this file you can specify your personal settings for Gwm.

(define-module (guile-user) :use-module (ice-9 debug))
(debug-enable 'backtrace)

(define simple-clients (list 'XLoad 'XClock 'XBiff 'XBatt 'Gwm window-transient-for))

(define rpos -5)
(define rposdiff 13)

;; General Packages
(require 'pick-window "pick")
(require 'zoom-window "zoom")
(set! zoom-window-method-list `((XTerm . ,zoom-window-vert)
                                (XVroot . ,zoom-window-prop)
                                (#t . ,zoom-window-full)))
(set! raise-on-resize #t)
(set! raise-on-move #t)
(set! screen-cursor (make-cursor 68))

;; Icon Manager
(require 'icon-mgr)
(set! icon-mgr-title-background "royalblue")
(set! icon-mgr-title-foreground "white")
(set! icon-mgr-background "gainsboro")
(set! icon-mgr-sort #t)
(set! iconify-on-start-list '(XConsole "^gwm$"))
(set! icon-mgr-omit-list simple-clients)
(set! icon-mgr-xpos rpos)
(set! icon-mgr-ypos 4)
(set! rpos (- rpos icon-mgr-width rposdiff))

;; Virtual Screen
(require 'virtual)
(require 'virtual-map)
(require 'virtual-door)
(require 'virtual-pan)
(set! virtual-horizontal-step (screen-width))
(set! virtual-vertical-step (screen-height))
(set! virtual-omit-nailed #f)
(set! virtual-omit-list simple-clients)
(set! virtual-fancy-colors '((#f #f "royalblue") (#t #f "white")))
(set! virtual-background "gainsboro")
(set! virtual-xpos rpos)
(set! virtual-ypos 4)
(set! virtual-size '(2 2))
(set! rpos (- rpos virtual-pixsize rposdiff))

;;Ventana pegajosas
(set! virtual-nailed-list (append simple-clients '("Dali Clock" "^gwm$")))

;;(set! initial-doors '("Home" "Free"))
;;(set! door-background "lightyellow")
;;(set! door-borderwidth 1)
;;(set! door-mgr-xpos 4)
;;(set! door-mgr-ypos 4)

;; Focus
(set! focus-mode 'enter)

;; Wm2 style
(require 'wm2)

;; Placements
(define top-place-order '(XBiff XBatt XClock XLoad))
(define top-placement 
  (make-tiled-placement rpos 4 200 5 'horizontal
                        :separator 3
                        :sort (lambda (w1 w2)
                                (< (or (list-index top-place-order (string->symbol (window-client-class w1))) 1000)
                                   (or (list-index top-place-order (string->symbol (window-client-class w2))) 1000)))))
(define right-placement
  (make-tiled-placement -5 200 4 (screen-height) 'vertical))

(set-placement 'XBiff top-placement)
(set-placement 'XBatt top-placement)
(set-placement 'XClock top-placement)
(set-placement 'XLoad top-placement)

(set-icon-placement #t right-placement)

;; menu specifications in a separate file
(primitive-load-path "menurc.scm")
;; acciones del raton y teclado
(primitive-load-path "bindings.scm")
