stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] [PATCH] Add show-window-properties command.


From: John Li
Subject: [STUMP] [PATCH] Add show-window-properties command.
Date: Sat, 30 Aug 2008 23:07:16 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

---
New, much nicer patch for show-window-properties command.

 NEWS      |    2 ++
 user.lisp |   12 ++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 774ae15..5023134 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@ This file documents user visible changes between versions of 
StumpWM
 
 ** added g{next,prev}-with-window commands
 
+** added show-window-properties command
+
 * Changes since 0.9.3
 ** new %interactivep% variable
 see defcommand in the manual.
diff --git a/user.lisp b/user.lisp
index 2f895a6..8b08b9b 100644
--- a/user.lisp
+++ b/user.lisp
@@ -434,3 +434,15 @@ (defmacro defprogram-shortcut (name &key (command 
(string-downcase (string name)
      (defcommand ,name () ()
        (run-or-raise ,command ,props))
      (define-key ,map ,key ,(string-downcase (string name)))))
+
+(defcommand show-window-properties () ()
+  "Shows the properties of the current window. These properties can be
+used for matching windows with run-or-raise or window placement
+rules."
+  (let ((w (current-window)))
+    (message-no-timeout "class: ~A~%instance: ~A~%type: :~A~%role: ~A~%title: 
~A"
+                        (window-class w)
+                        (window-res w)
+                        (string (window-type w))
+                        (window-role w)
+                        (window-title w))))
-- 
1.5.6.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]