Permalink
Browse files

Magit+/Monky+ choose recipe appropriately depending on frame size

  • Loading branch information...
1 parent db5f88f commit 5210c1536689832232b85432df562283eb76304b @tkf committed Apr 1, 2012
Showing with 18 additions and 2 deletions.
  1. +16 −1 ne2wm-pst-magit+.el
  2. +2 −1 ne2wm-pst-monky+.el
View
@@ -29,7 +29,22 @@
(eval-when-compile (require 'magit))
-(defvar ne2wm:c-magit+-recipe e2wm:c-magit-recipe)
+(defvar ne2wm:c-magit+-recipe-wide
+ '(| (:left-size-ratio 0.22)
+ (- (:upper-size-ratio 0.8)
+ (- (:upper-size-ratio 0.5) branches files) history)
+ (| (:left-size-ratio 0.666)
+ (| (:left-size-ratio 0.5)
+ (- (:upper-size-ratio 0.7) status sub)
+ main) logs)))
+
+
+(defun ne2wm:c-magit+-recipe-apropos ()
+ (cond
+ ((> (frame-width) 280) ne2wm:c-magit+-recipe-wide)
+ (t e2wm:c-magit-recipe)))
+
+(defvar ne2wm:c-magit+-recipe #'ne2wm:c-magit+-recipe-apropos)
(defvar ne2wm:c-magit+-winfo e2wm:c-magit-winfo)
View
@@ -26,10 +26,11 @@
(require 'e2wm-vcs)
(require 'ne2wm-popwin)
(require 'ne2wm-core)
+(require 'ne2wm-pst-magit+)
(eval-when-compile (require 'monky nil t))
-(defvar ne2wm:c-monky+-recipe e2wm:c-monky-recipe)
+(defvar ne2wm:c-monky+-recipe #'ne2wm:c-magit-recipe-apropos)
(defvar ne2wm:c-monky+-winfo e2wm:c-monky-winfo)

0 comments on commit 5210c15

Please sign in to comment.