;;; Last edited on 2026-02-06 18:12:26 by stolfi ;;; Sets up standard frames (defun stolfi-frames () (interactive) (progn (stolfi-make-frame "Funnycode" 1 90 35 "/home/stolfi/Funnycode2.txt") (stolfi-make-frame "FB FromBeinecke" 4 90 35 "/home/stolfi/projects/voynich/FromBeinecke") (stolfi-make-frame "MSI MultiSpectral" 4 90 35 "/home/stolfi/projects/voynich/MultiSpectral/davis") (stolfi-make-frame "join25e1" 4 90 35 "/home/stolfi/projects/voynich/work/Notes/074/join25e1.ivt") (stolfi-make-frame "desc25e1" 4 90 35 "/home/stolfi/projects/voynich/work/Notes/073/desc25e1.txt") (stolfi-make-frame "star25e1" 4 90 35 "/home/stolfi/projects/voynich/work/Notes/074/star25e1.ivt") (stolfi-make-frame "work" 4 160 35 "/home/stolfi/projects/voynich/work") (stolfi-make-frame "074 Transcription" 4 160 35 "/home/stolfi/projects/voynich/work/Notes/074/Note-074.txt") (stolfi-make-frame "075 Retracing" 5 160 35 "/home/stolfi/projects/voynich/work/Notes/075/report") (stolfi-make-frame "076 Star Parags" 4 160 35 "/home/stolfi/projects/voynich/work/Notes/076/Note-076.txt") (stolfi-make-frame "077 SPSxSBJ" 4 160 35 "/home/stolfi/projects/voynich/work/Notes/077/Note-077.txt") (stolfi-make-frame "092 HEAxHEB" 4 160 35 "/home/stolfi/projects/voynich/work/Notes/092/Note-092.txt") (stolfi-make-frame "093 Word Struc" 4 160 35 "/home/stolfi/projects/voynich/work/Notes/093/Note-093.txt") nil ) ) (defun stolfi-test-frames () (interactive) (progn nil ) ) (defun stolfi-make-frame (name wsp-num width height file) ; Creates a new buffer, loads into it the specified {file}, ; then creates new emacs frame with title "{name}" and specfied dimensions, ; showing that buffer, and moves it to the workspace "Workspace {wsp-num}". (save-mark-and-excursion (let* ( (buf (progn (find-file file) (current-buffer))) (frame (progn (set-buffer buf) (make-frame (list (cons 'name name) (cons 'width width) (cons 'height height) ) ) ) ) (frame-id (frame-parameter frame 'outer-window-id)) ) (when frame-id (shell-command (format "wmctrl -i -r %s -t %d" frame-id (- wsp-num 1))) ) ) ) )