[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-148-g63909e9
Philippe Brochard
pbrochard at common-lisp.net
Mon Oct 15 21:16:56 UTC 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".
The branch, master has been updated
via 63909e9545ac18fe3a76b1bdedcb818b05e95168 (commit)
via 6c832664a41082e36acc88f4750b1991e1ac7f48 (commit)
via 9f258de18367e521e2eff1a1e86b9f88fb99ae22 (commit)
via d56a1f85b333734eb091adb66d5e8111760f2915 (commit)
via b0ae2233ceccfe9ebb92505131af426f472e5b37 (commit)
via 32c8813fb1c7da8fc7d4e286621ed8c7c77f1868 (commit)
via c67507777b0a81d5ed2f37ad0c27de861c1db128 (commit)
from b70ba53d6adfb212f261bf8bb54abf5f3846b0f1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 63909e9545ac18fe3a76b1bdedcb818b05e95168
Merge: 6c83266 b70ba53
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date: Mon Oct 15 23:14:35 2012 +0200
Merge branch 'master' of ssh://common-lisp.net/var/git/projects/clfswm/clfswm
commit 6c832664a41082e36acc88f4750b1991e1ac7f48
Author: Michael Raitza <spacefrogg-clfswm at meterriblecrew.net>
Date: Sat Oct 13 14:24:50 2012 +0200
Added query-mode-complete-suggest and helpers.
diff --git a/src/clfswm-query.lisp b/src/clfswm-query.lisp
index 8353677..a178b79 100644
--- a/src/clfswm-query.lisp
+++ b/src/clfswm-query.lisp
@@ -32,6 +32,7 @@
(defparameter *query-history* (list ""))
(defparameter *query-complet-list* nil)
+(defparameter *query-completion-state* nil)
(defparameter *query-message* nil)
(defparameter *query-string* nil)
@@ -108,7 +109,9 @@
(defun query-print-string ()
(let ((dec (min 0 (- (- (x-drawable-width *query-window*) 10)
(+ 10 (* *query-pos* (xlib:max-char-width *query-font*))))))
- (complet (query-find-complet-list)))
+ (complet (if *query-completion-state*
+ (first *query-completion-state*)
+ (query-find-complet-list))))
(clear-pixmap-buffer *query-window* *query-gc*)
(setf (xlib:gcontext-foreground *query-gc*) (get-color *query-message-color*))
(xlib:draw-glyphs *pixmap-buffer* *query-gc* 5 (+ (xlib:max-char-ascent *query-font*) 5)
@@ -277,6 +280,37 @@
(subseq *query-string* *query-pos*))
*query-pos* (+ pos (length common)))))))))
+(defun query-mode-complete-suggest ()
+ (flet ((complete (completions completion-pos pos initial-pos)
+ (when completions
+ (let ((completion (if (equal completion-pos (list-length completions))
+ (subseq *query-string* pos initial-pos)
+ (nth completion-pos completions))))
+ (setf *query-string* (concatenate 'string
+ (subseq *query-string* 0 pos)
+ completion
+ (subseq *query-string* *query-pos*))
+ *query-pos* (+ pos (length completion))))
+ (setf *query-completion-state*
+ (list completions completion-pos pos initial-pos)))))
+ (if *query-completion-state*
+ (complete (first *query-completion-state*)
+ (mod (1+ (second *query-completion-state*))
+ (1+ (list-length (first *query-completion-state*))))
+ (third *query-completion-state*)
+ (fourth *query-completion-state*))
+ (multiple-value-bind (comps pos) (query-find-complet-list)
+ (complete comps 0 pos *query-pos*)))))
+
+(add-hook *query-key-press-hook* 'query-mode-complete-suggest-reset)
+
+(defun query-mode-complete-suggest-reset (code state)
+ "Reset the query-completion-state if another key was pressed than a key
+that calls query-mode-complete-suggest."
+ (unless (equal 'query-mode-complete-suggest
+ (first (find-key-from-code *query-keys* code state)))
+ (setf *query-completion-state* nil)
+ (query-print-string)))
(add-hook *binding-hook* 'set-default-query-keys)
@@ -336,7 +370,8 @@
(setf *query-message* message
*query-string* default
*query-pos* (length default)
- *query-complet-list* complet-list)
+ *query-complet-list* complet-list
+ *query-completion-state* nil)
(with-grab-keyboard-and-pointer (92 93 66 67 t)
(generic-mode 'query-mode 'exit-query-loop
:enter-function #'query-enter-function
commit 9f258de18367e521e2eff1a1e86b9f88fb99ae22
Author: Michael Raitza <spacefrogg-clfswm at meterriblecrew.net>
Date: Sat Oct 13 14:07:58 2012 +0200
Refactored run-program-from-query-string.
diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp
index 6a298f3..841cbed 100644
--- a/src/clfswm-util.lisp
+++ b/src/clfswm-util.lisp
@@ -603,13 +603,21 @@
(let ((commands (command-in-path)))
(defun run-program-from-query-string ()
"Run a program from the query input"
- (multiple-value-bind (program return)
- (query-string "Run:" "" commands)
- (when (and (equal return :return) program (not (equal program "")))
- (setf *second-mode-leave-function* (let ((cmd (concatenate 'string "cd $HOME && " program)))
- (lambda ()
- (do-shell cmd))))
- (leave-second-mode)))))
+ (labels ((run-program-from-query-string-fun ()
+ (multiple-value-bind (program return)
+ (query-string "Run:" "" commands)
+ (when (and (equal return :return) program (not (equal program "")))
+ (let ((cmd (concatenate 'string "cd $HOME && exec " program)))
+ (lambda ()
+ (do-shell cmd)))))))
+ (let ((fun (run-program-from-query-string-fun)))
+ (when fun
+ (if *in-second-mode*
+ (progn
+ (setf *second-mode-leave-function* fun)
+ (leave-second-mode))
+ (funcall fun)))))))
+
commit d56a1f85b333734eb091adb66d5e8111760f2915
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date: Fri Oct 12 23:19:55 2012 +0200
src/clfswm-query.lisp (set-default-query-keys): Bind query-backspace-clear to C-u and S-C-Backspace
diff --git a/src/clfswm-query.lisp b/src/clfswm-query.lisp
index c781973..8353677 100644
--- a/src/clfswm-query.lisp
+++ b/src/clfswm-query.lisp
@@ -287,6 +287,8 @@
(define-query-key ("Tab") 'query-mode-complet)
(define-query-key ("BackSpace") 'query-backspace)
(define-query-key ("BackSpace" :control) 'query-backspace-word)
+ (define-query-key ("BackSpace" :control :shift) 'query-backspace-clear)
+ (define-query-key ("u" :control) 'query-backspace-clear)
(define-query-key ("Delete") 'query-delete)
(define-query-key ("Delete" :control) 'query-delete-word)
(define-query-key ("Home") 'query-home)
commit b0ae2233ceccfe9ebb92505131af426f472e5b37
Author: Michael Raitza <spacefrogg-clfswm at meterriblecrew.net>
Date: Fri Oct 12 23:12:10 2012 +0200
Added query-backspace-clear.
diff --git a/src/clfswm-query.lisp b/src/clfswm-query.lisp
index feef765..c781973 100644
--- a/src/clfswm-query.lisp
+++ b/src/clfswm-query.lisp
@@ -183,8 +183,11 @@
(defun query-backspace-word ()
"Delete a word backward"
- (generic-backspace (or (position #\Space *query-string* :from-end t :end *query-pos*) 0))))
+ (generic-backspace (or (position #\Space *query-string* :from-end t :end *query-pos*) 0)))
+ (defun query-backspace-clear ()
+ "Delete backwards until beginning"
+ (generic-backspace 0)))
(labels ((generic-delete (del-pos)
(when (<= del-pos (length *query-string*))
commit 32c8813fb1c7da8fc7d4e286621ed8c7c77f1868
Author: Michael Raitza <spacefrogg-clfswm at meterriblecrew.net>
Date: Fri Oct 12 23:09:53 2012 +0200
Added set-layout-simple
diff --git a/src/clfswm-layout.lisp b/src/clfswm-layout.lisp
index 9af5020..710bbc0 100644
--- a/src/clfswm-layout.lisp
+++ b/src/clfswm-layout.lisp
@@ -60,6 +60,10 @@
(fixe-real-size-current-child)
(set-layout-dont-leave #'no-layout))
+(defun set-layout-simple (layout)
+ "Set the layout of the current child"
+ (set-layout-dont-leave layout)
+ (show-all-children))
(defun get-managed-child (parent)
"Return only the windows that are managed for tiling"
commit c67507777b0a81d5ed2f37ad0c27de861c1db128
Author: Desmond O. Chang <dochang at gmail.com>
Date: Fri Oct 12 23:00:55 2012 +0200
man page added
diff --git a/clfswm.1 b/clfswm.1
new file mode 100644
index 0000000..3725c53
--- /dev/null
+++ b/clfswm.1
@@ -0,0 +1,123 @@
+'\" t
+.\" Title: clfswm
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: 10/12/2012
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "CLFSWM" "1" "10/12/2012" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+clfswm \- A(nother) Common Lisp Full Screen Window Manager
+.SH "SYNOPSIS"
+.sp
+\fBclfswm\fR [\fIimplementation\fR]
+.SH "DESCRIPTION"
+.sp
+CLFSWM is a 100% Common Lisp X11 window manager (based on Tinywm and Stumpwm\&. Many thanks to them)\&. It can be driven only with the keyboard or with the mouse\&.
+.sp
+CLFSWM uses the following rules to determine which implementation should be used:
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 1.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 1." 4.2
+.\}
+the first command line argument\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 2.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 2." 4.2
+.\}
+environment variable $LISP
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 3.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 3." 4.2
+.\}
+the first line like "debian=<impl>" in its configuration file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 4.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 4." 4.2
+.\}
+clisp
+.RE
+.sp
+CLFSWM handles clisp, sbcl and cmucl internally\&. If you specify a different implementation, CLFSWM will try to execute the command clfswm\-<implementation>\&. See /usr/share/doc/clfswm/README\&.Debian for details\&.
+.SH "OPTIONS"
+.PP
+\fIimplementation\fR
+.RS 4
+Indicates which implementation should be used\&.
+.RE
+.SH "ENVIRONMENT"
+.PP
+\fILISP\fR
+.RS 4
+Indicates which implementation should be used\&.
+.RE
+.SH "FILES"
+.PP
+\fI$XDG_CONFIG_HOME/clfswm/clfswmrc\fR
+.RS 4
+User configuration file\&. If XDG_CONFIG_HOME is undefined,
+\fI$HOME/\&.config/clfswm/clfswmrc\fR
+will be used\&.
+.RE
+.PP
+\fI$HOME/\&.clfswmrc\fR
+.RS 4
+Deprecated\&. This file will be used only if the previous file does not exist\&.
+.RE
+.PP
+\fI/etc/clfswmrc\fR
+.RS 4
+System\-wide configuration file\&.
+.RE
+.SH "SEE ALSO"
+.sp
+clisp(1), sbcl(1), cmucl(1)\&.
+.SH "AUTHOR"
+.sp
+CLFSWM was written by Philippe Brochard <pbrochard at common\-lisp\&.net>\&.
+.sp
+This manual page was written by Desmond O\&. Chang <dochang at gmail\&.com>, for the Debian project (and may be used by others)\&.
diff --git a/doc/clfswm.1.txt b/doc/clfswm.1.txt
new file mode 100644
index 0000000..df742d7
--- /dev/null
+++ b/doc/clfswm.1.txt
@@ -0,0 +1,73 @@
+// -*- mode: doc -*-
+// Use "a2x -f manpage clfswm.1.txt" to generate the man page.
+CLFSWM(1)
+=========
+:doctype: manpage
+
+
+NAME
+----
+clfswm - A(nother) Common Lisp Full Screen Window Manager
+
+
+SYNOPSIS
+--------
+*clfswm* ['implementation']
+
+
+DESCRIPTION
+-----------
+CLFSWM is a 100% Common Lisp X11 window manager (based on Tinywm and
+Stumpwm. Many thanks to them). It can be driven only with the
+keyboard or with the mouse.
+
+CLFSWM uses the following rules to determine which implementation
+should be used:
+
+. the first command line argument.
+. environment variable $LISP
+. the first line like "debian=<impl>" in its configuration file.
+. clisp
+
+CLFSWM handles clisp, sbcl and cmucl internally. If you specify a
+different implementation, CLFSWM will try to execute the command
+`clfswm-<implementation>`. See /usr/share/doc/clfswm/README.Debian
+for details.
+
+
+OPTIONS
+-------
+'implementation'::
+ Indicates which implementation should be used.
+
+
+ENVIRONMENT
+-----------
+'LISP'::
+ Indicates which implementation should be used.
+
+
+FILES
+-----
+'$XDG_CONFIG_HOME/clfswm/clfswmrc'::
+ User configuration file. If XDG_CONFIG_HOME is undefined,
+ '$HOME/.config/clfswm/clfswmrc' will be used.
+
+'$HOME/.clfswmrc'::
+ Deprecated. This file will be used only if the previous file
+ does not exist.
+
+'/etc/clfswmrc'::
+ System-wide configuration file.
+
+
+SEE ALSO
+--------
+clisp(1), sbcl(1), cmucl(1).
+
+AUTHOR
+------
+CLFSWM was written by Philippe Brochard <pbrochard at common-lisp.net>.
+
+This manual page was written by Desmond O. Chang <dochang at gmail.com>,
+for the Debian project (and may be used by others).
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CLFSWM - A(nother) Common Lisp FullScreen Window Manager
More information about the clfswm-cvs
mailing list