;;; $Id: system.scwmrc,v 1.140 2006/03/05 03:19:53 dsmith Exp $ ;;;; system.scwmrc -- Scwm System Default initialization file ;;;; (from gjb.scwmrc, at release of Scwm-0.99.2) ;;;; ;;;; Copyright (C) 1997, 1998, 1999, 2000 Greg J. Badros ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by ;;;; the Free Software Foundation; either version 2, or (at your option) ;;;; any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;;; GNU General Public License for more details. ;;;; ;;;; You should have received a copy of the GNU General Public License ;;;; along with this software; see the file COPYING. If not, write to ;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, ;;;; Boston, MA 02111-1307 USA ;;;; ;; Uncomment the below to send a single UDP packet to ;; the scwm usage counter machine at startup ;; The single packet just contains the hostname and version number ;; To disable, set environment variable SCWM_DO_NOT_LOG_USAGE ;;(define thank-scwm-authors-with-usage-note #t) (define debug #t) (define (debug-display arg) (if debug (display arg) '())) (if debug (begin (add-hook! module-loaded-hook display-module-loaded) (set! %load-verbosely #t) (debug-enable 'debug 'backtrace) (read-enable 'positions))) (define-public (load-user-file filename) "Load user configuration from $HOME/.scwm/FILENAME." (let ((fname (string-append (getenv "HOME") "/.scwm/" filename))) (debug-display "Attempting load of ") (debug-display fname) (debug-display "\n") (if (file-exists? fname) (begin (load fname) #t) #f))) (define (hyper str) (string-append "H-" str)) (define (show-desk-name new old) (display-message-briefly (string-append "Desk: " (number->string (+ 1 new))))) (define (play-window-flashing-start-sound ignored) (wavplay "Utopia Question.WAV")) (define (select-message-window) (id->message-window (car (select-viewport-position)))) (define (select-and-hide-message-window) (message-window-hide! (select-message-window))) (define* (xmms-send-pause-click) "" (interactive) (let ((lw (list-windows #:only (resource-match?? "XMMS_Player")))) (and lw (not (null? lw)) (send-button 1 (car lw) 'click #f 67 95)))) (define scwm-messages-window #f) (define (reposition-scwm-messages-window) (set! scwm-messages-window (find-window-by-class-resource "XTerm" "scwmmessages")) (if scwm-messages-window (with-window scwm-messages-window (animated-resize-frame 640 96 #f 0 (y- (- 96 (window-frame-border-width) 1))) (set-window-gravity! 'southwest)) (display "Could not find SCWM Messages window---consider using `startscwm' to start Scwm\n"))) (define (display-string-newline-to-error-port str) (display str (current-error-port)) (newline (current-error-port))) (add-hook! error-hook display-string-newline-to-error-port) (debug-display "Starting...\n") ;;(set-mod-mask-numlock! 128) ;; This will make things go a bit faster at the expense ;; of your having to be sure that NumLock and ScrollLock ;; are never on (or are explicitly used in the bindings that ;; you want to apply when they are on). ;;(set-ignore-dubious-modifiers! #f) (load-user-file "startup") (define suppress-xclients #f) (define xlock-command "xlock -remote -nice -19 -mode blank") ;; (define xlock-command "xlock-both") (define server-hosts '(pahtoo glacier june amaebi bauhaus) ) (define other-hosts '( sturgeon thresher coho ;; Ultrix forbidden pinnacle copper ;; AIX pintail edgar bugs-bunny ;; DEC OSF fireweed anemone bugbane buttercup ;; IRIX )) (define linux-hosts '( uni oz saba awabi hirame nishin sake pugsly squiggy kani sodium)) (define solaris-hosts '( tolt elwha chiwawa demille fielder froggie hammahamma hoobes hoh rhodes twain)) (define favorite-hosts '(bowman indy10 elwha.cs.washington.edu uni.cs.washington.edu scwm.mit.edu)) ;; If you want to use the gnome panel, stick ;; "panel &" in your $HOME/.xclients file (and be sure it is u+x) ;; import scwm modules we need for the startup animation (use-scwm-modules base message-window gnome-hints) ;; do this early, since gnome times out in 10 seconds (display "(enable-gnome-hints)\n" (current-error-port)) (enable-gnome-hints) (display "Done: (enable-gnome-hints)\n" (current-error-port)) ;; SCWMDIR is mostly used for testing and running Scwm w/o installing ;; use (scwm-path-prefix) and (scwm-path-exec-prefix) if ;; you want the installation locations (define scwmdir (or (getenv "SCWMDIR") (string-append (scwm-path-prefix) "/share/scwm"))) ;;; set path to use for image searches (append! image-load-path (list (string-append scwmdir "/pixmaps") (string-append (scwm-path-prefix) "/share/scwm/pixmaps") "/usr/share/icons/mini" "/usr/lib/TheNextLevel/pixmaps" "/usr/share/include/X11/pixmaps" "/usr/share/include/X11/bitmaps" "/usr/X11/lib/X11/mini-icons" "/usr/X11/include/X11/pixmaps" "/usr/lib/icons" "/usr/local/X11/include/X11/pixmaps" "/usr/local/lib/icons" "/usr/local/icons" )) ;; be sure you install scwm-icons package for this to work, ;; or update the image-load-path, above (use-scwm-modules lambda-startup-logo) (logo-setup #t) ;; Use below lines for help when debugging a GC issue during startup ;; (set-load-processing-frequency! 1) ;; (add-hook! load-processing-hook (lambda (n) (display n) (newline) (gc))) ;; after loading, do: ;; (reset-hook! load-processing-hook) ;; to restore normal behaviour of scwm-mode under Emacs. ;; (define (gc-repeat) (gc) (add-timer-hook! 1000 gc-repeat)) ;; (gc-repeat) ;; (get-timer-hooks-list) (debug-display "Starting reading scwm modules\n") ;; import the rest of the scwm modules (use-scwm-modules defoption optargs primopts describe where-is focus-stack task-switcher cursor winops winlist winlist-menu wininfo listops placement style stylist basic-styles easyraise face time-convert menus-extras std-menus xlock-menus doc virtual prompt-color flux flux-gtk flash-window key-mover shove-window titlebar-buttons gtk gtk-about fvwm-module path-cache animation themes netscape message-window animated-iconify last-mapped-window modifier-key-bindings window-selection group preferences animated-edge-moves send-string quote background property-respond xprop-extras wavplay dir-focus tile undo synth-events winops-menu image-path-suggestor register window-configuration ) (debug-display "Done reading modules\n") (load-user-file "after-modules") (set! *use-scwm-system-proc* #t) ;;; print some information (for-each (lambda (d) (debug-display d)) (list " *** Reading `scwmrc'...\nScwm " (scwm-version) "\n" (scwm-version-date) "\n" (if (scwm-is-constraint-enabled?) "With Cassowary Constraint Solver\n" "") "Display Size: " (display-size) "\n")) (define mail-spool-dir (getenv "MAIL")) (if (scwm-is-constraint-enabled?) (use-scwm-modules ui-constraints-toggle-menu ui-constraints snap-constraints constraint-investigator)) ;; prefer doc files in scwmdir/doc (set! doc-files (append (map (lambda (s) (string-append scwmdir "/doc/" s)) (list "scwm-procedures.txt" "scwm-variables.txt" "scwm-hooks.txt" "cassowary_scm-procedures.txt")) doc-files)) (append! *theme-path* (list (string-append scwmdir "/themes"))) ;;; Lost window? Get it back with: ;; (move-to 0 0 (select-window-from-window-list #:ignore-winlist-skip #t)) ;;;(documentation "make-menuitem") ;;;(apropos-internal "*") (set! *fvwm2-module-path* (append *fvwm2-module-path* '("/usr/X11R6/lib/X11/fvwm2"))) (define want-fvwm2-pager-module #f) (define want-fvwm2-winlist-module #f) (define want-scwm-pager-module #f) ;; Disabled autoraise by default; ;; would give an instant autoraise with no timeout, which ;; is not all that useful (define want-autoraise #f) ;; Want a Win95-like "X" button at top right of window decoration ;; to immediately close the window? ;; (Generally, I find that that makes it too easy to accidentally ;; destroy a window, so the basic setting is #f) (define want-close-button #f) (define user-image-load-list (list (string-append (user-home) "/pixmaps") (string-append (user-home) "/bitmaps"))) ;;-------------------------------;; ;; set some basic styles info ;; (define font12 (make-font "-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*")) (set-icon-font! font12) (define applications-available-program-information `( ("&Netscape" "nscape" "netscape_3d" "netscape") ("GNU X&Emacs" "edit" "emacs_3d" "xemacs") ("Email (&Gnus)" #f #f "emailuw") ;; ("Calenda&r" "clock" "calendar.next" "PREFERRED_CALENDAR_BIN") ("&Ical" "clock" "calendar.next" "ical") ;; ("&Plan" "clock" "calendar.next" "plan") ("WindowsN&T" #f #f "start_nt") ("&RedBaron" #f #f "redbaron") ("Grail" #f #f "grail") ("&Pine" "letter" "Mail" ,(start-program-in-xterm "pine" "Pine" "pinexterm")) ("Framema&ker" "book2" "book_3d" "framemkr") ("Acroread (PDF Viewer)" #f #f "acroread") ("&Answerbook" "book2" "book_3d" "answerbook") ("Ghost&view" "gv" "view_3d" "ghostview") ("X&Dvi" "doc" "xdvi.next" "xdvi") ("Xvie&w" "xv" "xv.color" "xv") ("Text&edit" "edit" "TextEditor" "textedit -geometry 630x490+95+5") ("Xedit" "edit" "document_3d" "xedit") ("GnuP&lot" "plot" "Chart" ,(start-program-in-xterm "gnuplot" "GnuPlot" "gnuplotxterm")) ("X&Fig" "pencil" "fig_3d" "xfig") ("&XPaint" "paint" "paint_3d" "xpaint") ("Mathematica" #f #f "frontend") ("De&bugger" "bug2" "debug_3d" "debugger") ("Xxgd&b" "bug2" "debug2_3d" "xxgdb") ("gdb" "bug2" "debug2_3d" ,(start-program-in-xterm "gdb" "GDB" "gdbxterm")) ("XWpe" #f #f "xwpe") ("Arena Browser" #f #f "arena") ("XLispstat" #f #f ,(start-program-in-xterm "xlispstat" "XLispStat" "xlispxterm")) ("Chipmunk Basic" #f #f ,(start-program-in-xterm "basic" "Chipmunk Basic" "basicxterm")) ("&Irc" #f #f ,(start-program-in-xterm "irc" "IRC" "ircxterm")) ("&Minicom" #f #f ,(start-program-in-xterm "minicom -c on" "Minicom" "minicomxterm")) ;; ("Tin" #f #f ,(start-program-in-xterm "tin -r" "News (tin)" "tinxterm")) ;; ("T&rn" #f #f ,(start-program-in-xterm "trn" "News (trn)" "trnxterm")) ("Athena" #f #f "athena") ("XGopher" #f #f "xgopher") ("XPdf" #f #f "xpdf") ;; used to have a get-file option ("X&jed" #f #f "xjed") ("Xedit" #f #f "xedit") )) (define utilities-available-program-information `( ("&Control Panel" #f #f "control-panel") ("&Glint" #f #f "glint") ("Color &XTerm" "sh1" "XTERM_ICON" ,(optget *xterm-command*)) ("&Manual pages" "book1" "manpage_3d" "xman") ("XCa&lc" "calc" "Calculator" "xcalc") ("Filemanager" "filemgr" "FileManager" "filemgr") ("X&fm" "filemgr" "FileManager" "xfm") ("XF&tp" "xftp" "ftp_3d" "xftp") ("X&Quote" #f #f "Xquote") ("Ma&gnifying glass" "zoom" "mag_glass_3d" "xmag") ("XLo&ad" "run" "xload.next" "xload") ("Xgrab" "camera" "camera_3d" "xgrab") ("X&colormap" "colors" "colormap_3d" "xcolormap") ("Font&sel" #f #f "xfontsel") ("&Editres" #f #f "editres") ("Clip&board" #f #f "xclipboard") ("X&Osview" #f #f "xosview") ("Cloc&k" #f "oclock_3d" "xclock") ("XBiff" #f #f "xbiff -bg MENUBACK_COLOR") ("Xev" #f #f "xev") )) (define games-available-program-information `( ("X&Board" "slon" "chess_3d" "xboard -sze medium") ("&Spider" #f "cards_3d" "spider") ("X&Lander" #f #f "xlander") ("X&Mahjongg" #f #f "xmahjongg") ("X&Vier" #f #f "xvier") ("XPat&ience" #f #f "xpat2") ("XMo&rph" #f #f "xmorph") ("XE&vil" #f #f "xevil") ("&XBill" #f #f "xbill") ("XBlock&out" #f #f "xbl") ("XSnow" #f #f "xsnow") ("X&Gammon" #f #f "xgammon") )) (define multimedia-available-program-information `( ("XM&ix" "audiovol" "Multimedia" "xmix") ("XMi&xer" "audiovol" "Multimedia" "xmixer") ("&WorkMan" "cdlabel" "cdrom2_3d" "workman") ("XPlay&Cd" "cdlabel" "cdrom2_3d" "xplaycd") ;; ("&Tracker" #f #f "tracker \\$(xgetfile -title 'Select a MOD file for Tracker' -path $MOD_SOUND_PATH -pattern '*.mod')" #f) ;; ("Play&midi" #f #f "xplaymidi \\$(xgetfile -title 'Select a MIDI file for PlayMidi' -path $MIDI_SOUND_PATH -pattern '*.mid')" #f) ("Xm&play" #f #f "xmplay") )) (load-user-file "after-applications") ;;; These can change dynamically and the menus which ;;; used 'menu-bg-color [which is used by default] ;;; will be drawn in the new color the next time they pop up ;; These have no affect now that the menu-style does the right thing ;; --10/10/98 gjb ;; (set! menu-bg-color (make-color "gray80")) ;; (set! menu-text-color (make-color "black")) ;; (color-properties (make-color "#cc88ff")) (menu-style #:fg "black" #:bg "gray80" #:stipple "grey35" #:font (optget *menu-font*)) ;; (select-window-interactively "Pick window #1") ;;(message-window-style default-message-window #:font (optget *message-window-font*) ;; #:fg "black" #:bg "gray80") (message-window-options 'interactive-move #:follow-window #t) (message-window-options 'interactive-resize #:follow-window #t) ;;(set-click-delay! 150) ;;(set-color-map-focus! 'follows-mouse) ;;(set-desk-size! 3 3) ;;(set-window-focus! 'click (get-window)) ;;(window-style "*" #:focus 'click) ;;(window-style "*" #:focus 'mouse) ;;(set-window-focus! 'mouse (get-window)) (set-edge-resistance! 500 10) ;;(set-edge-scroll! (%x 20) (%y 20)) ;;(set-edge-scroll! 0 (%y 100)) ;; Use no X scroll so x2x works (set-edge-scroll! 0 0) ;; Use no X/Y scroll so x2x works (scwm-option-set! *window-font* "-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*") (title-style #:font (optget *window-font*) #:justify 'left #:relief 'raised) (set-rubber-band-mask! 255) (define* (popup-window-group-menu) "Popup the window group menu." (interactive) (popup-menu (make-window-group-menu (get-window))) #t) (define* (popup-window-group-menu-no-warp) "Popup the window group menu without warping to the first menu item." (interactive) (popup-menu (make-window-group-menu (get-window)))) (define* (popup-small-ops) "Popup the small window operations menu." (interactive) (popup-menu (make-small-window-ops-menu (get-window)) #t)) (define* (popup-utilities) "Popup the utilities menu." (interactive) (popup-menu 'menu-utilities #t)) (define* (popup-utilities-no-warp) "Popup the utilities menu without warping to the first menu item." (interactive) (popup-menu 'menu-utilities)) (define* (popup-applications) "Popup the applications menu." (interactive) (popup-menu menu-applications #t)) (define* (popup-applications-no-warp) "Popup the applications menu without warping to the first menu item." (interactive) (popup-menu menu-applications)) (define* (popup-multimedia) "Popup the multimedia applications menu." (interactive) (popup-menu menu-multimedia #t)) (define* (popup-root-start) "Popup the root window start menu." (interactive) (with-window #f ;; ensure that the window context is empty, so that, e.g., ;; window operations menu always prompts for a window (popup-menu menu-root-start #t))) (define* (popup-root-start-no-warp) "Popup the root window start menu without warping to the first menu item." (interactive) (with-window #f ;; ensure that the window context is empty, so that, e.g., ;; window operations menu always prompts for a window (popup-menu menu-root-start))) (define* (popup-window-ops) "Popup the window operations menu." (interactive) (popup-menu menu-window-ops)) (define* (popup-desk) "Popup the desk operations menu." (interactive) (popup-menu menu-desk)) (define* (popup-favorite-hosts-menu) "Popup the favorite hosts menu." (interactive) (popup-menu (make-hosts-menu-gjb favorite-hosts) #t)) (debug-display "Before setting image-load-path\n") (set! image-load-path (append user-image-load-list image-load-path)) ;;(set! image-load-path '()) (debug-display "After setting image-load-path\n") ;;(enable-image-path-suggestor) (define pic-system-button (make-image "mini-sys3d-full.xpm")) (define pic-xterm-mini (make-image "mini-term.xpm")) (define pic-lambda-mini (make-image "lambda.xpm")) (define pic-unknown (make-image "unknown1.xpm")) ;; (reset-scwm-exec-protocol) ;;-------------------------------;; ;; set some window styles ;; (window-style "*" #:fg "black" #:bg "grey76" #:icon #f ;; this turns off icons, but leaves icon titles #:show-icon #f ;; this turns off both icon titles and icons #:icon-box (list (x- 70) 1 69 (y- 141)) #:border-width 4 #:focus 'mouse ; #:plain-border #t #:sticky-icon #t #:mwm-func-hint #t #:mwm-decor-hint #t #:mwm-border #t #:hint-override #t #:decorate-transient #t #:PPosition-hint #f ;; #:mini-icon pic-xterm-mini) #:mini-icon pic-lambda-mini) ;;(window-style "*" #:icon #f #:show-icon #f) (enable-dynamic-netscape-actions) ;; GJB:FIXME:MS: make-face's style of argument passing ;; is different from the window-style method; I imagine ;; MS has a wrapper planned for this (border-style #:hidden-handles #t #:no-inset #t) (define mini-icon-button-face (make-face '((relief flat)) '((pixmap mini-program-icon)))) ;; Can use strings as arg to pixmap (define sticky-button-face (make-face '((relief flat)) '((pixmap "mini-hbars-full.xpm"))) ;; (make-face '((relief raised)) ;; ;;; 4 Horizontal bars (sticky) ;; '((relief-pattern ;; ((10 23 #f) (90 23 #f) (90 28 #f) (10 28 #t) (10 47 #t) ;; (90 47 #f) (90 52 #f) (10 52 #t) (10 70 2) ;; (90 70 #f) (90 76 #f) (10 76 #t))))) ) ;; But can also use a (make-image "file.xpm") (define style-button-face (make-face '((relief flat)) '((pixmap "mini-lightbolt-full.xpm"))) ;; (make-face '((relief raised)) ;; ;;; Big Lighting Bolt (Fat at top, comes to a point) ;; '((relief-pattern ;; ((35 15 #t) (20 50 #t) (40 50 #f) (30 80 #t) (75 40 #f) ;; (50 40 #t) (75 15 #f) (35 15 #t))))) ) (define close-button-face (make-face '((relief flat)) '((pixmap "mini-stylized-x-full.xpm"))) ;; (make-face '((relief raised)) ;; ;;; Stylized X ;; '((relief-pattern ;; ((20 20 #t) (30 20 #t) (50 40 #t) (70 20 #t) (80 20 #t) ;; (80 30 #f) (60 50 #f) (80 80 #f) (70 80 #f) ;; (50 60 #f) (30 80 #f) (20 80 #f) (20 70 #f) ;; (40 50 #t) (20 30 #f) (20 20 #t))))) ) (define tall-maximize-button-face (make-face '((relief flat)) '((pixmap "mini-exp-windows-full.xpm"))) ;; (make-face '((relief raised)) ;; ;;; tall box ;; '((relief-pattern ;; ((40 25 #t) (60 25 #t) (60 75 #f) (40 75 #f) (40 25 #t))))) ) (define iconify-button-face (make-face '((relief flat)) '((pixmap "mini-shrink-windows-full.xpm"))) ;; (make-face '((relief raised)) ;; ;;; 3 stacked square panels like stills of a window being minimized ;; '((relief-pattern ;; ((80 20 #f) (80 60 #f) (60 60 #f) (60 40 #f) (60 70 #f) ;; (40 70 #f) (40 60 #f) (40 85 #f) (15 85 #f) ;; (15 60 #t) (40 60 #t) (30 60 #t) (30 40 #t) ;; (60 40 #t) (45 40 #t) (45 20 #t) (80 20 #t))))) ) (define* (popup-small-ops-or-close) "" (interactive) (case (mouse-event-type) ((double-click) (close-window)) (else (let ((w (get-window))) (popup-menu-from-decoration (make-small-window-ops-menu w) w 1) #f)))) (define* (close-on-double-click) "" (interactive) (case (mouse-event-type) ((double-click one-and-a-half-clicks) (close-window)))) (define* (popup-small-ops-from-decoration) "" (interactive) (let ((w (get-window))) (popup-menu-from-decoration (make-small-window-ops-menu w) w 1)) #f) (define* (popup-small-ops-current-window) "" (interactive) (let ((w (window-with-pointer))) (and w (popup-menu-from-decoration (make-small-window-ops-menu w) w 1)))) (define* (popup-style-menu) "" (interactive) (let ((w (get-window))) (popup-menu-from-decoration (make-window-style-menu w) w 1)) #f) ;; the "1" at the end of the prior line is the button number from which ;; this is popped. (add-left-button mini-icon-button-face close-on-double-click popup-small-ops-from-decoration) ;;(show-titlebar (select-window-interactively)) ;; MS: I presume this is the desired efffect. ;; random thought: A nice extension would be buttons that change ;; appearance with given window properties. This would be an extension of ;; the fvwm2 "MWMButton" concept whereby a button reverses its vector ;; pattern when the window is maximized. It should be much more general, ;; of course. ;; (add-left-button sticky-button-face #f toggle-stick) (add-left-button style-button-face #f popup-style-menu) (if want-close-button (add-right-button close-button-face close-window)) ;; GJB:FIXME:: why does it not work as an immediate proc? ;;(add-right-button tall-maximize-button-face #f toggle-maximize-vertical) (add-right-button tall-maximize-button-face toggle-maximize-vertical #f) (add-right-button iconify-button-face #f animated-iconify) ;; (bind-mouse 'right-button-1 1 toggle-maximize-vertical #f) ;; (bind-mouse 'right-button-1 1 #f (lambda () (display "foo\n"))) ;; (bind-mouse 'right-button-1 1 #f toggle-maximize-vertical) ;; (plain-border (get-window)) fixes the display problem for the selected window ;; something must not be initialized correctly (window-style "scwmmessages" #:no-titlebar #t) (gnome-install-window-styles) ;; This shows a bug in dealing with 0 bordered windows (from HJ Stein) ;;(define desk-widget-hjs ;; (make-style #:plain-border #t #:sticky #t #:winlist-skip #t ;; #:border-width 0 #:circulate-skip #t #:focus 'none)) ;; (window-style "XClock" #:no-titlebar #t #:use-style desk-widget-hjs) (window-style "tooltip" #:use-style desk-widget-on-top-no-titlebar #:border-width 0 #:placement-proc (at-point-placement)) (window-style "scwm" #:placement-proc (at-point-placement) #:transient-placement-proc (at-point-placement)) (window-style (resource-match?? "ScwmUIConstraintsButtons") #:use-style desk-widget-no-titlebar #:easyraise #t) (window-style (resource-match?? "prompt-string") ;; these need to be on top of the ScwmUIConstraintsButtons #:no-titlebar #t #:kept-on-top #t) (window-style "FvwmPager" #:use-style desk-widget-no-titlebar #:easyraise #t) (window-style "Scwm" #:use-style desk-widget-no-titlebar #:easyraise #t) (window-style "zwgc" #:use-style desk-widget-on-top) (window-style "*lock" #:use-style desk-widget) (window-style "xclock*" #:use-style desk-widget-no-titlebar #:easyraise #t) (window-style "xload" #:no-titlebar #t #:use-style desk-widget-no-titlebar #:easyraise #t) (window-style "xscreensaver" #:no-titlebar #t #:use-style desk-widget) (window-style "xbiff" #:no-titlebar #t #:use-style desk-widget-on-top #:mini-icon "mini-xbiff.xpm") (window-style "xcalc" #:icon "xcalc.xpm" #:mini-icon "mini-calc.xpm") (window-style "xman" #:icon "xman.xpm") (window-style "xmag" #:icon "mag_glass.xpm") (window-style "XTerm" #:mini-icon pic-xterm-mini #:icon "xterm.xpm") (window-style "Emacs" #:mini-icon "mini-edit.xpm" #:icon "TextEditor.xpm") ;; GJB:FIXME:: ;; does not give desired effect because Scwm does not know about ;; these windows... (window-style "x2x *" #:kept-on-top #t) (load-user-file "after-window-styles") (debug-display "Before menu-window-ops\n") (define (scwm-help) (netscape-goto-url "http://scwm.mit.edu" #f 'netscape-new-window #:start-netscape-as-needed #t)) (define (exec-xlock) (execute xlock-command)) (define* (quit-verify) "Popup the restart/quit/verify menu." (interactive) (popup-menu menu-quit-verify #t)) (define menu-viavoice (menu (list (menu-title "ViaVoice") menu-separator (menuitem "&Enable voice recognizer" #:action (lambda () (system "killall esd") (use-scwm-modules viavoice) (vv-initialize))) (menuitem "&Disable voice recognizer" #:action (lambda () (use-scwm-modules viavoice) (vv-terminate) (system "esd &")))))) (define menu-applications (menu (cons (menu-title "Applications") (make-menuitems-from-menu-information-list applications-available-program-information) ))) (define menu-utilities (menu (cons (menu-title "Utilities") (append (make-menuitems-from-menu-information-list utilities-available-program-information) (list (menuitem "S&creensaver" #:image-left "mini-display.xpm" #:action 'menu-screensaver)))))) (define menu-multimedia (menu (cons (menu-title "Multimedia") (make-menuitems-from-menu-information-list multimedia-available-program-information) ))) (define menu-games (menu (cons (menu-title "Games") (make-menuitems-from-menu-information-list games-available-program-information) ))) ;; (popup-menu menu-games) ;; (popup-menu menu-hosts #t) (define (make-hosts-menu hosts) (cons menu-separator (fold-menu-list (map (lambda (elem) (menuitem elem #:image-left "mini-display.xpm" #:action (xterm-other-host elem))) hosts)))) (define (menu-hosts-servers) (menu (cons (menu-title "Hosts (Servers)") (make-hosts-menu server-hosts)))) (define (menu-hosts-linux) (menu (cons (menu-title "Hosts (Linux)") (make-hosts-menu linux-hosts)))) (define (menu-hosts-solaris) (menu (cons (menu-title "Hosts (Solaris)") (make-hosts-menu solaris-hosts)))) (define (menu-hosts-other) (menu (cons (menu-title "Hosts (Other)") (make-hosts-menu other-hosts)))) (define menu-preferences-scroll (menu (list (menu-title "Change Scroll Behavior") menu-separator (menuitem "&On" #:action (lambda () (set-edge-scroll 100 100))) (menuitem "O&ff" #:action (lambda () (set-edge-scroll 0 0))) (menuitem "&Horizontal Only" #:action (lambda () (set-edge-scroll 100 0))) (menuitem "&Vertical Only" #:action (lambda () (set-edge-scroll 0 100))) (menuitem "&Partial 1/2" #:action (lambda () (set-edge-scroll 50 50))) (menuitem "Partial 1/&4" #:action (lambda () (set-edge-scroll 25 25)))))) (define menu-preferences (menu (list (menu-title "Preferences") menu-separator (menuitem "Edit &bindings..." #:action (lambda () (use-scwm-modules prompt-binding) (prompt-binding))) (menuitem "Change background color..." #:action (lambda () (prompt-color "New background color" (lambda (c) (set-background-color! c)) #:title "Background color?"))) (menuitem "Change global theme" #:submenu (lambda () (make-menu-global-theme #t))) (menuitem "Reload .Xresources" #:action (exe "xrdb -merge ${HOME}/.Xresources")) (menuitem "Reload .Xresources-cpp" #:action (exe "xrdbcpp -merge ${HOME}/.Xresources-cpp")) (menuitem "Scwm interaction" #:action (run-in-xterm "scwmrepl")) (menuitem "Info on a window" #:action window-info)))) (define menu-screensaver (make-xlock-menu #f)) (define menu-springy-constraints (menu (list (menuitem "&Yes (no auto-reset stay constants)" #:action (lambda () (cl-set-auto-reset-stay-constants! (scwm-master-solver) #f))) (menuitem "&No (auto-reset stay constants on re-solves)" #:action (lambda () (cl-set-auto-reset-stay-constants! (scwm-master-solver) #t)))))) (define menu-snapping (menu (list (menuitem "&Yes" #:action snap-initialize) (menuitem "&No" #:action snap-reset)))) (define menu-constraints (menu (list (menuitem "&Constraints" #:submenu (lambda () (ui-constraints-toggle-menu))) (menuitem "&Springy constraints?" #:submenu menu-springy-constraints) (menuitem "&Augmented Snapping?" #:submenu menu-snapping) (menuitem "Constraint &investigator" #:action (thunk start-constraint-investigator)) (menuitem "Turn &on Constraint Solver" #:action (thunk enable-constraint-solver))))) (define (enable-constraint-solver) (if (scwm-is-constraint-enabled?) (begin (use-scwm-modules constraints) (start-constraints) (cl-set-auto-reset-stay-constants! (scwm-master-solver) #f)) (error "Scwm is not built to support constraints\n\ Get Cassowary from http://www.cs.washington.edu/research/constraints/cassowary/"))) ;; (start-xterm) (define menu-root-start (menu (filter-list (menu-title "Start" #:image-left "mini-exp.xpm") menu-separator (menuitem "&New shell" #:image-left "mini-sh1.xpm" #:action start-xterm) (menuitem "&Applications" #:image-left "mini-x2.xpm" #:submenu menu-applications) (menuitem "&Utilities" #:image-left "mini-hammer.xpm" #:submenu menu-utilities) (menuitem "&Multimedia" #:image-left "mini-audiovol.xpm" #:submenu menu-multimedia) (menuitem "&Games" #:image-left "mini-happy.xpm" #:submenu menu-games) (if (scwm-is-constraint-enabled?) (menuitem "Constraint sol&ver" #:image-left pic-lambda-mini #:submenu menu-constraints) #f) (menuitem "ViaVoice" #:submenu menu-viavoice) menu-separator (menuitem "H&osts - Servers" #:image-left "mini-term.xpm" #:submenu menu-hosts-servers) (menuitem "Hosts - Linux" #:image-left "mini-term.xpm" #:submenu menu-hosts-linux) (menuitem "Hosts - Solaris" #:image-left "mini-term.xpm" #:submenu menu-hosts-solaris) (menuitem "Hosts - Other" #:image-left "mini-term.xpm" #:submenu menu-hosts-other) menu-separator (menuitem "&Window Operations" #:image-left "mini-zoom.xpm" #:submenu menu-window-ops) (menuitem "Windows lis&t" #:image-left "mini-windows.xpm" #:submenu make-window-list-menu) (menuitem "Windows by &resource" #:image-left "mini-windows.xpm" #:submenu (lambda () (make-window-list-menu #:by-resource #t))) menu-separator (menuitem "Scwm &Options...." #:action (lambda () (scwm-options-dialog))) (menuitem "Other &Preferences" #:image-left "mini-prefs.xpm" #:submenu menu-preferences) (menuitem "A&bout Scwm" #:image-left "mini-exclam.xpm" #:action gtk-about-scwm) (menuitem "&Help Scwm" #:image-left "mini-question.xpm" #:action (thunk scwm-help)) menu-separator (menuitem "&Lock Screen" #:image-left "mini-lock.xpm" #:action (thunk exec-xlock)) (menuitem "E&xit Scwm" #:image-left "mini-stop.xpm" #:submenu menu-quit-verify)) #:image-side "scwm-gnu-linux.xpm" #:image-align 'bottom #:color-bg-image-side "blue")) ;; (popup-menu menu-root-start) ;;; now set some mouse and key bindings ;; (define*-public (move-or-shade) "Move the window on a drag, shade on a double-click." (interactive) (case (mouse-event-type) ((double-click) (animated-toggle-window-shade)) (else (move-or-raise)))) (define*-public (move-or-deiconify) "Move the icon on a drag, de-iconify on a double click." (interactive) (case (mouse-event-type) ((motion) (interactive-move)) ((double-click) (animated-deiconify)))) (define* (popup-scwm-root-middle-menu) "Popup the root middle-button menu." (interactive) (popup-menu (menu (cons (menuitem "Scwm" #:extra-label "C-S-M-z" #:image-left pic-lambda-mini #:submenu menu-root-start) (cdadr (menu-properties (make-window-list-menu #:by-resource #t)))) #:popup-delay #f #:hover-delay 0))) (define* (show-window-list-by-focus-with-geometry) "Show the window list using focus order, including window geometries." (interactive) (show-window-list-menu #f #f #:by-focus #t #:show-geometry #t)) (define* (show-window-list-by-resource-with-geometry) "Show the window list split by window resource, including window geometries." (interactive) (show-window-list-menu #f #f #:by-resource #t #:show-geometry #t)) (load-user-file "after-menus") (if (and gnome-sm (not (SM-register))) (message (SM-error-message))) ;;; first our root menus (if gnome-sm (bind-mouse 'root 1 #f gnome-desktop-press-1) (bind-mouse 'root 1 #f popup-root-start-no-warp)) (if gnome-sm (bind-mouse 'root 2 #f popup-scwm-root-middle-menu) (bind-mouse 'root 2 #f show-window-list-by-resource-with-geometry)) (if gnome-sm (bind-mouse 'root 3 #f gnome-desktop-press-3) (bind-mouse 'root 3 #f popup-applications-no-warp)) (bind-mouse 'root "M-3" #f popup-desk) (bind-mouse 'all "A-2" #f show-window-list-by-focus-with-geometry) (bind-key 'all (hyper "r") rename-window-interactively) ;; (lookup-key 'all (hyper "r")) ;; (add-timer-hook! 150 (lambda () (display (lookup-key 'all (get-key-event))) (newline))) ;; (procedure-name rename-window-interactively) (bind-key 'all (hyper "slash") undo) (bind-key 'all (hyper "M-slash") redo) (bind-key 'all (hyper "s") insert-undo-global) (bind-key 'all (hyper "M-h") describe-event) (bind-key 'all (hyper "M-w") where-is) (bind-key 'all "C-M-S-g" interactive-set-window-gravity!) (bind-key 'all "C-A-S-t" toggle-titlebar-in-place) (bind-key 'all "C-A-S-m" show-window-list-matching-interactively) (bind-key 'all "C-A-S-n" show-netscape-window-list-menu) (bind-key 'all "C-M-A-S-n" netscape-new-window) (bind-key 'all (hyper "A-M-C-d") delete-window) ;; (delete-window) ;; (call-interactively delete-window) ;; (lookup-key 'all (hyper "A-M-C-d")) ;;; operations on parts of the window (bind-mouse '(frame-corners frame-sides) 2 popup-small-ops) (bind-mouse 'frame-corners 1 resize-or-raise) (bind-mouse 'frame-sides 1 resize-or-raise) (add-hook! window-flashing-start-hook play-window-flashing-start-sound) (bind-mouse 'title 1 move-or-shade raise-and-stop-flashing) (bind-mouse 'title 2 #f lower-window) (bind-mouse 'title 3 #f popup-window-ops) ;; key bindings for the menus (bind-key 'all "M-S-F1" popup-utilities) (bind-key 'all "M-S-F2" popup-window-ops) ;; C-S-M-t makes netscape go to the url specified by cut buffer 0 (bind-key 'all "C-S-M-t" netscape-goto-selection-url) (bind-key 'all "A-b" netscape-bookmark-search) (bind-key 'all "A-s" netscape-google-search-selection-url) ;;(bind-key 'all "A-s" netscape-metacrawler-search-selection-url) ;;(bind-key 'all "A-s" netscape-av-search-selection-url) ;; http://scwm.mit.edu/scwm ;; highlight w/ mouse and try it! ;; in case of emergency, hit Control-Meta-Q (bind-key 'all "C-M-S-q" quit-verify) (bind-mouse 'icon 1 move-or-deiconify) (bind-mouse 'icon 2 #f animated-deiconify-to-vp-focus) (bind-mouse 'all "C-S-M-1" #f toggle-raise) ;; These always do opaque moves ;;(bind-mouse 'all "C-S-M-2" #f interactive-move) (bind-mouse 'all "C-S-M-2" #f interactive-move-selected-group-or-window) (bind-mouse 'all "C-S-M-3" #f interactive-resize) ;; These always do rubberband moves (except when built for constraint-solver-- ;; with cn solver builds all move/resize operations must be opaque) (bind-mouse 'window (hyper "2") #f interactive-move-rubberband) (bind-mouse 'window (hyper "3") #f interactive-resize-rubberband) (bind-mouse 'window (hyper "1") #f select-window-toggle) (bind-key 'all (hyper "S-s") select-window-toggle) (bind-mouse 'all (hyper "S-1") #f select-window-toggle) (bind-mouse 'all (hyper "A-1") #f select-window-toggle) (bind-mouse 'all (hyper "S-2") #f interactive-move-selected-group-or-window) (bind-mouse 'title "C-1" #f select-window-toggle) (bind-mouse 'title "C-3" #f popup-window-group-menu-no-warp) (if (scwm-is-constraint-enabled?) (begin (bind-mouse 'title (hyper "1") #f move-after-deleting-inferred-constraints) (bind-mouse 'title (hyper "3") #f move-after-deleting-constraints) (bind-mouse 'frame-sides (hyper "1") #f move-after-deleting-inferred-constraints) (bind-mouse 'frame-sides (hyper "3") #f move-after-deleting-constraints) )) (bind-mouse 'all (hyper "M-3") #f popup-window-ops) ;;(bind-mouse 'left-button-1 3 popup-style-menu) (bind-key 'all "C-S-F7" interactive-move-window-with-pointer) (bind-key 'all "C-S-F8" interactive-resize-window-with-pointer) (bind-key 'all "C-S-F9" window-info) (bind-key 'all "C-M-S-e" resize-halfscreen) (bind-key 'all "C-M-S-d" resize-quarterscreen) (bind-key 'all "C-M-S-f" resize-fullscreen) ;; I reserve M-Tab for emacs, but Alt-Tab is fine (bind-key 'all "A-Tab" window-task-switcher-menu) ;;(bind-key 'all (hyper "Tab") window-task-switcher-menu) (bind-key 'all "A-S-Tab" window-task-switcher-menu-backwards) ;; rotate the current window with the keyboard (bind-key 'all "M-S-Tab" next-visible-non-iconified-window) (bind-key 'all "C-M-S-Tab" prev-visible-non-iconified-window) (key-mouse-moves "C-M-S" 5 "h" "j" "k" "l") ;; XInside's old X server steal C-M-h for prev virtual console, so use m too (key-mouse-moves "C-M-S" 5 "m" "j" "k" "l") (key-mouse-moves "C-M-S" 1 "y" "u" "i" "o") (key-viewport-moves "C-M-S" 100 "Left" "Down" "Up" "Right") ;; (raise-easyraise-windows) ;; (lower-easyraise-windows) ;; Raise the pager when C-M-S is depressed. ;;(unbind-four-modifier-key-events XKM_ALT_L XKM_CONTROL_L XKM_SHIFT_L XKM_META_L) (bind-four-modifier-key-events XKM_ALT_L XKM_CONTROL_L XKM_SHIFT_L XKM_META_L toggle-easyraise-windows #f) ;;lower-fvwm2-pager) ;; (bind-three-modifier-key-events XKM_CONTROL_L XKM_SHIFT_L XKM_META_L raise-easyraise-windows #f) ;;lower-fvwm2-pager) ;; (unbind-three-modifier-key-events XKM_CONTROL_L XKM_SHIFT_L XKM_META_L) ;; avoid lots of warnings.... test for this first... (define have-kp-keysyms (let ((v (keysym->keycode "KP_Left"))) (and v (not (null? v))))) (define have-kp-num-keysyms (let ((v (keysym->keycode "KP_4"))) (and v (not (null? v))))) (if have-kp-keysyms (key-viewport-moves "C-M-S" 10 "KP_Left" "KP_Down" "KP_Up" "KP_Right")) (if have-kp-num-keysyms (key-viewport-moves "C-M-S" 10 "KP_4" "KP_2" "KP_8" "KP_6")) (bind-key 'all "C-M-S-Home" switch-to-first-desk) (bind-key 'all "C-M-S-End" switch-to-second-desk) (bind-key 'all "C-M-S-a" popup-applications) (bind-key 'all "C-M-S-r" refresh) (bind-key 'all "C-M-S-5" recapture) (bind-key 'all "C-M-S-x" start-xterm) (bind-key 'all "C-M-S-p" start-xlogo) (bind-key 'all "C-S-F1" popup-small-ops) (bind-key 'all "C-S-F2" show-window-list-by-focus-with-geometry) ;;(bind-key 'all "C-S-F3" popup-favorite-hosts-menu) (bind-key 'all "C-S-F4" popup-applications) (bind-key 'all "C-S-F5" popup-utilities) (bind-key 'all "C-S-F6" popup-multimedia) ;; Set some environment variables for processes that Scwm starts. (setenv "DISPLAY_HEIGHT" (number->string display-height)) (setenv "DISPLAY_WIDTH" (number->string display-width)) (setenv "DISPLAY_PLANES" (number->string display-depth)) (setenv "GNOME_SM" (if gnome-sm "true" "false")) ;;(bind-key 'all "C-S-Down" iconify-window) (bind-key 'all "C-S-Down" animated-iconify) (bind-key 'all "C-M-Return" focus-or-toggle-raise) (bind-key 'all "M-F1" toggle-raise) ;; like SGI's 4dwm (bind-key 'all "C-S-Up" toggle-maximize-vertical) (bind-key 'all "C-S-Right" toggle-maximize-horizontal) (bind-key 'all "C-S-Left" toggle-maximize-both) ;; See the binding for mouse button 2 ;; to add geometry strings to this as well. (bind-key 'all "C-S-Return" show-icon-list-menu) (bind-key 'all "C-S-M-z" popup-root-start) (if gnome-sm (bind-key 'all "C-S-M-w" gnome-desktop-menu)) (bind-key 'all (hyper "z") popup-root-start) (set-click-delay! 150) ;; Fluid, cartoon-like ;(set-animation! '#(-.01 0 .01 .03 .08 .18 .3 .45 .60 .75 .85 .90 .94 .97 .99 1.0)) ;; Linear, mechanical ;(set-animation! '#(0.1 0.2 0.3 0.4 0.6 0.7 0.8 0.9 1.0)) ;; Fluid, cartoon-like, overshoots target ;(set-animation! '#(-.01 0 .01 .03 .08 .18 .3 .45 .60 .75 .85 .90 .94 .97 .99 1.01 1.02 1.01 1)) ;;; GJB:FIXME:: clean this up to factor more out. (if have-kp-num-keysyms (begin (bind-key 'all "C-M-KP_7" animated-move-to-nw) (bind-key 'all "C-M-KP_8" animated-move-to-n) (bind-key 'all "C-M-KP_9" animated-move-to-ne) (bind-key 'all "C-M-KP_4" animated-move-to-w) (bind-key 'all "C-M-KP_5" animated-move-to-center) (bind-key 'all "C-M-KP_6" animated-move-to-e) (bind-key 'all "C-M-KP_1" animated-move-to-sw) (bind-key 'all "C-M-KP_2" animated-move-to-s) (bind-key 'all "C-M-KP_3" animated-move-to-se) )) (if have-kp-keysyms (begin (bind-key 'all "C-M-KP_Home" animated-move-to-nw) (bind-key 'all "C-M-KP_Up" animated-move-to-n) (bind-key 'all "C-M-KP_Prior" animated-move-to-ne) (bind-key 'all "C-M-KP_Left" animated-move-to-w) ;; (bind-key 'all "C-M-KP_NoSymbol" animated-move-to-center) (bind-key 'all "C-M-KP_Right" animated-move-to-e) (bind-key 'all "C-M-KP_End" animated-move-to-sw) (bind-key 'all "C-M-KP_Down" animated-move-to-s) (bind-key 'all "C-M-KP_Next" animated-move-to-se) )) (bind-key 'all (hyper "p") shove-window-prefix) (bind-key 'all (hyper "e") focus-last-mapped-window) (bind-key 'all (hyper "S-e") close-window-and-pop-focus) ;; GJB:FIXME:: modifiers interface could be better... mimic off Emacs? ;; GJB:FIXME:: keys should be first class ;; GJB:FIXME:: bindings and menus should perhaps have a syntax that makes the lambda implicit (bind-key 'all "C-M-S-7" send-button-1) (bind-key 'all "C-M-S-8" send-button-2) (bind-key 'all "C-M-S-9" send-button-3) ;; Need to allow SendEvents in XTerm before synthetic events will work ;;(bind-mouse 'window 1 (lambda () (raise-window) (send-button 1 (get-window) #t #f))) ;;(bind-mouse 'window 3 (lambda () (lower-window) (send-button 3 (get-window) #t #t))) ;; (unbind-mouse 'window 1) ;; (unbind-mouse 'window 3) ;; (bind-mouse 'window 1 raise-window) ;; (set-window-focus! 'click (get-window)) ;; These would be better if they repeated, but they are useful, e.g., ;; in a netscape window (bind-mouse 'window "C-A-S-1" #f send-key-press-up) (bind-mouse 'window "C-A-S-3" #f send-key-press-down) (bind-mouse 'window (hyper "C-A-1") #f send-key-press-prior) (bind-mouse 'window (hyper "C-A-3") #f send-key-press-next) ;; Permit vertical movement of windows via wheel mouse. ;; kinda silly, but kinda cute, too! (bind-mouse 'window (hyper "4") (lambda () (move-window-relative 0 -5))) (bind-mouse 'window (hyper "C-4") (lambda () (move-window-relative 0 -1))) (bind-mouse 'window (hyper "M-4") (lambda () (move-window-relative 0 -25))) (bind-mouse 'window (hyper "5") (lambda () (move-window-relative 0 5))) (bind-mouse 'window (hyper "C-5") (lambda () (move-window-relative 0 1))) (bind-mouse 'window (hyper "M-5") (lambda () (move-window-relative 0 25))) ;; This one is experimental-- sends only the buttonpress event, no buttonrelease (bind-key 'all "C-M-S-0" (lambda () (send-button 2 (get-window) #t #f))) ;; (bind-key 'all "C-M-S-n" (lambda () (write (get-window)) (newline))) (bind-key 'all "C-M-S-s" toggle-stick) ;; (reset-undo!) (bind-key 'all (hyper "M-g") gtk-register-info) (bind-key 'all (hyper "g") jump-to-register) (bind-key 'all (hyper "f") focus-to-register) (bind-key 'all (hyper "c") window-configuration-to-register) (bind-key 'all (hyper "x") global-window-configuration-to-register) (bind-key 'all (hyper "t") selected-windows-to-register) (bind-key 'all (hyper "period") push-window-configuration) (bind-key 'all (hyper "S-period") pop-window-configuration) (bind-key 'all (hyper "M-period") push-focus-window) (bind-key 'all (hyper "M-S-period") pop-focus-window) (bind-key 'all (hyper "d") focus-window-with-pointer) (bind-key 'all (hyper "a") popup-register-winlist) (bind-key 'all "C-S-M-n" dir-focus-west) (bind-key 'all "C-S-M-m" dir-focus-south) (bind-key 'all "C-S-M-comma" dir-focus-north) (bind-key 'all "C-S-M-period" dir-focus-east) (bind-key 'all "C-S-A-p" xmms-send-pause-click) ;;; (define (force-gc) (display "gc...") (gc) (display "done!\n")) ;;; (bind-key 'all "C-S-A-g" force-gc) (bind-key 'all (hyper "q") quote-next-event) ;; (bind-key 'all (hyper "q") quote-key-event) ;; (bind-key 'all (hyper "m") quote-mouse-event) (bind-key 'all "A-space" popup-small-ops-current-window) (bind-key 'all (hyper "M-x") eval-expression-interactively) ;; Hyper-w ;;(bind-key 'all (hyper "w") (lambda () (write (get-window)) (newline))) ;; Alt-w ;;(bind-key 'all "A-w" (lambda () (display "alt-w\n"))) (load-user-file "after-bindings") ;; Handle Gale popup windows-- ;; close them after 1 hour (GJB:FIXME:: should only do so if not directed to user) ;; (add-hook! after-new-window-hook ;; (lambda (w) (if (string=? (window-class w) "Gsubrc") ;; (add-timer-hook! (sec->msec (* 60 60) (thunk (close-window w))))))) ;; (reset-hook! after-new-window-hook) (if want-autoraise (begin (use-scwm-modules auto-raise) (window-style "*" #:auto-raise #t))) (if want-fvwm2-pager-module (begin (register-fvwm2-module-config "FvwmPager" "*FvwmPagerBack grey76" "*FvwmPagerFore black" "*FvwmPagerHilight yellow" "*FvwmPagerFont none" "*FvwmPagerDeskTopScale 50" "*FvwmPagerGeometry -0-0" "*FvwmPagerLabel 0 Top" "*FvwmPagerLabel 1 Bottom" "*FvwmPagerSmallFont 5x8") ;; Actually run the pager. Make it manage desktops 0-2. Save the ;; module object in a variable so we can kill this specific pager ;; later. (define fvwm2-pager (run-fvwm2-module "FvwmPager" '("0" "1"))) ;; This shouldn't be necessary any longer ;; (add-hook! shutdown-hook (lambda () (kill-fvwm2-module fvwm2-pager)))) )) (if want-scwm-pager-module (begin (use-scwm-modules (app scwm scwm-gtk-pager)) (show-pager))) (if want-fvwm2-winlist-module (begin (register-fvwm2-module-config "FvwmWinList" "*FvwmWinListBack gray70" "*FvwmWinListFore Black" "*FvwmWinListFont -helvetica-bold-r-*-*-10-*-*-*-*-*-*-*" "*FvwmWinListAction Click1 Iconify -1,Focus" "*FvwmWinListAction Click2 Iconify" "*FvwmWinListGeometry -0+0" ;; "*FvwmWinListAction Click3 Module FvwmIdent FvwmIdent" "*FvwmWinListUseSkipList") (define fvwm-winlist (run-fvwm2-module "FvwmWinList" '())) ;; work around a race condition in decorating FvwmWinList ;; and notifying FvwmWinList of the configure window event (add-timer-hook! (sec->msec 5) (lambda () (window-style "FvwmWinList" #:use-style desk-widget-on-top-no-titlebar))) )) ;; (reset-hook! change-desk-hook) (use-change-desk-commands #( "xsetroot -solid gray4" "xsetroot -solid cyan4" ;; "xv -root -quit /home/satchell/kde_themes/Factory/gears.jpg" ;; "xearth -once" )) (add-hook! change-desk-hook show-desk-name) ;; (reset-hook! X-ConfigureRequest-hook) ;;(add-hook! X-ConfigureRequest-hook config-request-animate) (append-hook! after-new-window-hook push-window-configuration) ;; enable xterm patch's window flashing behaviour (start-property-respond) (if (and (not (restarted?)) (not suppress-xclients) (not gnome-sm)) (run-dot-xclients-at-startup)) (add-hook! startup-hook reposition-scwm-messages-window) (load-user-file "before-preferences") ;; Get user preferences from $HOME/.scwm-options -- ;; let them take priority over anything done in here (load-preferences) (load-user-file "after-preferences") (logo-remove) (use-gtk-error-window-for-scwm) ;; This is a bug binding for demonstrating above ;; (bind-key 'all (hyper "o") (lambda () (function-with-stupid-name))) (set! window-list-proc focus-change-warp-pointer) (or (load-user-file "done") (wavplay "scwm-startup.wav")) (debug-display " *** `scwmrc' processed.\n")