[sawfish] Made `sawfish-config' minimal, moving most the contents to sawfish.cfg.shell. This facilitates hacks
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish] Made `sawfish-config' minimal, moving most the contents to sawfish.cfg.shell. This facilitates hacks
- Date: Tue, 22 Jun 2010 14:55:15 +0000 (UTC)
commit 8e54bbe9286766d6f8c43aaf3f730cd5e8185e60
Author: Teika kazura <teika lavabit com>
Date: Sun Jun 20 21:51:26 2010 +0900
Made `sawfish-config' minimal, moving most the contents to sawfish.cfg.shell.
This facilitates hacks.
lisp/sawfish/cfg/main.jl.in | 41 ++++-------------------------------------
lisp/sawfish/cfg/shell.jl | 37 ++++++++++++++++++++++++++++++++++---
man/news.texi | 2 ++
3 files changed, 40 insertions(+), 40 deletions(-)
---
diff --git a/lisp/sawfish/cfg/main.jl.in b/lisp/sawfish/cfg/main.jl.in
index 9836f53..f8cf528 100644
--- a/lisp/sawfish/cfg/main.jl.in
+++ b/lisp/sawfish/cfg/main.jl.in
@@ -9,7 +9,7 @@ exec rep "$0" "$@"
!#
-;; nokogiri-main.jl -- entry point
+;; main.jl -- entry point of Sawfish configurator
;;
;; Copyright (C) 2000 John Harper <john dcs warwick ac uk>
;;
@@ -33,10 +33,8 @@ exec rep "$0" "$@"
(open rep
rep.system
- rep.io.streams
rep.io.files
rep.regexp)
- (define socket-id nil)
(when (getenv "SAWFISH_USER_LISP_DIR")
(setq load-path
@@ -45,43 +43,12 @@ exec rep "$0" "$@"
(string-split ":" (getenv "SAWFISH_USER_LISP_DIR")))
load-path)))
- ;; mapcar fails for compilation
- (require 'sawfish.gtk.widget)
- (require 'sawfish.cfg.i18n)
+ ;; This is put here *after* SAWFISH_USER_LISP_DIR is parsed.
(require 'sawfish.cfg.shell)
- (require 'sawfish.cfg.group)
- (when (get-command-line-option "--help")
- (write standard-output "\
-usage: sawfish-config [OPTIONS...]\n
-where OPTIONS are any of:\n
- --group=GROUP-NAME
- --flatten
- --single-level
- --socket-id=WINDOW-ID\n")
- (throw 'quit 0))
-
- (let ((group (get-command-line-option "--group" t)))
- (when group
- (setq group (read-from-string group))
- (set-top-group (if (listp group) group `(root ,group)))))
-
- (when (get-command-line-option "--flatten")
- (setq *nokogiri-flatten-groups* t))
-
- (when (get-command-line-option "--single-level")
- (setq *nokogiri-single-level* t))
-
- (let ((id (get-command-line-option "--socket-id" t)))
- (when id
- (setq socket-id (string->number id))))
-
- (setq interrupt-mode 'exit)
- (i18n-init)
- (add-widget-prefix 'sawfish.cfg.widgets)
- (run-shell socket-id))
+ (run-shell))
;; Local variables:
-;; major-mode: lisp-mode
+;; major-mode: sawfish-mode
;; End:
diff --git a/lisp/sawfish/cfg/shell.jl b/lisp/sawfish/cfg/shell.jl
index 842b3a5..4656b6f 100644
--- a/lisp/sawfish/cfg/shell.jl
+++ b/lisp/sawfish/cfg/shell.jl
@@ -29,9 +29,11 @@
rep.system
rep.regexp
rep.io.files
+ rep.io.streams
rep.io.timers
sawfish.gtk.stock
sawfish.gtk.widget
+ sawfish.cfg.i18n
sawfish.cfg.group
sawfish.cfg.slot
sawfish.cfg.apply
@@ -262,11 +264,40 @@
(gtk-container-remove slot-box-widget w))
(gtk-container-get-children slot-box-widget)))
- (define (run-shell #!optional socket-id)
+ (define (run-shell)
+ (when (get-command-line-option "--help")
+ (write standard-output "\
+usage: sawfish-config [OPTIONS...]\n
+where OPTIONS are any of:\n
+ --group=GROUP-NAME
+ --flatten
+ --single-level
+ --socket-id=WINDOW-ID\n")
+ (throw 'quit 0))
+
+ (let ((group (get-command-line-option "--group" t)))
+ (when group
+ (setq group (read-from-string group))
+ (set-top-group (if (listp group) group `(root ,group)))))
+
+ (when (get-command-line-option "--flatten")
+ (setq *nokogiri-flatten-groups* t))
+
+ (when (get-command-line-option "--single-level")
+ (setq *nokogiri-single-level* t))
+
+ (setq interrupt-mode 'exit)
+ (i18n-init)
+ (add-widget-prefix 'sawfish.cfg.widgets)
+
(initialize-configs)
- (initialize-shell socket-id)
+ (let* ((id (get-command-line-option "--socket-id" t))
+ (socket-id (when id (string->number id))))
+ (initialize-shell socket-id))
+
(catch 'nokogiri-exit
- (recursive-edit)))
+ (recursive-edit))
+ (throw 'quit 0))
(add-hook '*nokogiri-slot-changed-hook* set-button-states t)
(add-hook '*nokogiri-group-selected-hook* add-group-widgets)
diff --git a/man/news.texi b/man/news.texi
index b2a8b5f..2ae0428 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -38,6 +38,8 @@ sawfish-client, too. [Teika Kazura]
@item Doc improvements *
Faq items, on how to hide the mouse pointer, and on application execution *
Manuals (1) describe all options.
+
+ item @code{sawfish-config} is now minimal, moving most of the contents to @code{sawfish.cfg.shell} [Teika Kazura]
@end itemize
@end itemize
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]