[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 7013b01 2/2: Add header-line format support in per
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm 7013b01 2/2: Add header-line format support in per-application configurations |
Date: |
Sat, 3 Mar 2018 12:41:28 -0500 (EST) |
branch: externals/exwm
commit 7013b0122a79df24b93e1db44e4bebff8fe9acd4
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Add header-line format support in per-application configurations
* exwm-manage.el (exwm-manage-configurations):
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating): Allow customizing header-line format
for floating/tiling X windows.
---
exwm-floating.el | 20 ++++++++++++++++++--
exwm-manage.el | 3 +++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/exwm-floating.el b/exwm-floating.el
index f9b1402..0c8fc6f 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -216,7 +216,9 @@ This is also used by X window containers.")
(frame-height (+ height (- (frame-pixel-height frame)
(- (elt edges 3) (elt edges 1)))))
(floating-mode-line (plist-get exwm--configurations
- 'floating-mode-line)))
+ 'floating-mode-line))
+ (floating-header-line (plist-get exwm--configurations
+ 'floating-header-line)))
(if floating-mode-line
(setq exwm--mode-line-format (or exwm--mode-line-format
mode-line-format)
@@ -231,6 +233,16 @@ This is also used by X window containers.")
exwm--mode-line-format (or exwm--mode-line-format
mode-line-format)
mode-line-format nil)))
+ (if floating-header-line
+ (setq header-line-format floating-header-line)
+ (if (and (not (plist-member exwm--configurations
+ 'floating-header-line))
+ exwm--mwm-hints-decorations)
+ (setq header-line-format nil)
+ ;; The header-line need to be hidden in floating header.
+ (setq frame-height (- frame-height (window-header-line-height
+ (frame-root-window frame)))
+ header-line-format nil)))
(set-frame-size frame frame-width frame-height t)
;; Create the frame container as the parent of the frame.
(xcb:+request exwm--connection
@@ -375,7 +387,11 @@ This is also used by X window containers.")
(setq exwm--mode-line-format (or exwm--mode-line-format
mode-line-format)
mode-line-format (plist-get exwm--configurations
- 'tiling-mode-line))))
+ 'tiling-mode-line)))
+ (if (not (plist-member exwm--configurations 'tiling-header-line))
+ (setq header-line-format nil)
+ (setq header-line-format (plist-get exwm--configurations
+ 'tiling-header-line))))
;; Only show X windows in normal state.
(unless (exwm-layout--iconic-state-p)
(pop-to-buffer-same-window buffer)))
diff --git a/exwm-manage.el b/exwm-manage.el
index 0091447..94aefd8 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -63,6 +63,9 @@ You can still make the X windows floating afterwards."
(const :tag "Fullscreen" fullscreen)
(const :tag "Floating mode-line" floating-mode-line)
(const :tag "Tiling mode-line" tiling-mode-line)
+ (const :tag "Floating header-line"
+ floating-header-line)
+ (const :tag "Tiling header-line" tiling-header-line)
(const :tag "Char-mode" char-mode)
(const :tag "Prefix keys" prefix-keys)
(const :tag "Simulation keys" simulation-keys)