alterator-standalone-7.1.1/000075500000000000000000000000001212365115700156445ustar00rootroot00000000000000alterator-standalone-7.1.1/Makefile000064400000000000000000000004621212365115700173060ustar00rootroot00000000000000NAME=standalone all: clean: install: install-module install-sbin install-man include /usr/share/alterator/build/module.mak install-sbin: for i in sbin/* ;do install -Dpm755 $$i $(sbindir)/`basename $$i` ; done install-man: for i in man/*.8; do install -Dpm644 $$i $(mandir)/man8/`basename $$i` ;done alterator-standalone-7.1.1/acc.desktop000064400000000000000000000005111212365115700177620ustar00rootroot00000000000000[Desktop Entry] Type=Application Categories=Settings;System;X-ALTLinux-Alterator; Exec=acc Icon=altlinux Terminal=false Name=System management center Name[kk]=Жүйені басқару орталығы Name[ru]=Центр управления системой Name[tt_RU]=Система белән идарә итү үзәге alterator-standalone-7.1.1/man/000075500000000000000000000000001212365115700164175ustar00rootroot00000000000000alterator-standalone-7.1.1/man/acc.8000064400000000000000000000017451212365115700172450ustar00rootroot00000000000000.TH acc 8 "8/04/2009" "ALT Linux" "Alterator user manual" .SH NAME acc \- graphical user interface to \fBalteratord\fR, system management center. .SH SYNOPSIS .B acc .I [-ld] .SH DESCRIPTION \fBacc\fR opens a window with system management center GUI. The utility will always try to stop currently running \fBalteratord\fR, if any, and (re-)run it as its own subprocess. In \fBlocal mode\fR \fBacc\fR will try to use interface definitions from local project directory and start \fBalteratord\fR in local mode too. .SH OPTIONS .TP \fI-l, --local\fR Work in local mode. .TP \fI-d, --debug\fR Turn on additional debug in Scheme interpreter. This is useful for debugging \fBacc\fR itself. .SH FILES .TP \fI/usr/share/alterator/ui/\fR - module interfaces .TP \fI/usr/share/alterator/applications/\fR - descriptions of modules .TP \fI/usr/share/alterator/desktop-directories/\fR - descriptions of module groups .SH AUTHOR Stanislav Ievlev .SH SEE ALSO \fBalteratord\fR(8) alterator-standalone-7.1.1/man/alterator-standalone.8000064400000000000000000000027051212365115700226370ustar00rootroot00000000000000.TH alterator-standalone 8 "8/04/2009" "ALT Linux" "Alterator user manual" .SH NAME alterator-standalone \- graphical user interface to \fBalteratord\fR, single-module version .SH SYNOPSIS .B alterator-standalone .I [-ld] .I [module] .SH DESCRIPTION \fBalterator-standalone\fR opens a window containing the interface of a single module. Single parameter is a name of the module description file without extension, e.g., if module description is in file \fI/usr/share/alterator/applications/foo.desktop\fR you should start \fBalterator-standalone\fR with parameter \fIfoo\fR. If module name is omitted all available module names will be displayed. Utility will always try to stop running \fBalteratord\fR and run it as its own subprocess. In \fBlocal mode\fR it will try to use interface definitions and module description file from local project directory and will start \fBalteratord\fR in local mode too. .SH OPTIONS .TP \fI-l, --local\fR Work in local mode. .TP \fI-d, --debug\fR Turn on additional debug in Scheme interpreter. This is useful for debugging \fBalterator-standalone\fR itself. .SH EXAMPLE /usr/sbin/alterator-standalone datetime .SH FILES .TP \fI/usr/share/alterator/ui/\fR - interface definitions. .TP \fI/usr/share/alterator/applications/\fR - descriptions of modules. .TP \fI/usr/share/alterator/desktop-directories/\fR - descriptions of module groups. .SH AUTHOR Stanislav Ievlev .SH SEE ALSO \fBalteratord\fR(8) alterator-standalone-7.1.1/sbin/000075500000000000000000000000001212365115700165775ustar00rootroot00000000000000alterator-standalone-7.1.1/sbin/acc000075500000000000000000000021731212365115700172560ustar00rootroot00000000000000#!/usr/bin/guile18 -s !# (use-modules (ice-9 getopt-long) (alterator common) (alterator telegraph) (alterator transport pipe-channel) (alterator lookout) (alterator d)) ;;; functions (define *cmdline* (command-line)) (define (usage) (format #t "Usage: ~A [-ld]~%" (car *cmdline*)) (format #t " -h, --help display help screen~%") (format #t " -l,--local try to use local ui files if available ~%") (format #t " -d,--debug turn on debugging~%~%") (format #t " Report bugs to ~%") (quit)) ;;; main code (define option-spec '((help (single-char #\h) (value #f)) (local (single-char #\l) (value #f)) (debug (single-char #\d) (value #f)))) (define options (getopt-long *cmdline* option-spec)) (and (option-ref options 'help #f) (usage)) (and (option-ref options 'debug #f) (turn-on-debugging)) (if (option-ref options 'local #f) (begin (alterator-init-local) (d-init-local)) (begin (alterator-init-global) (d-init-global))) (telegraph (pipe-in "/usr/bin/alterator-browser-qt") (lookout "/acc") (d)) (telegraph-start) alterator-standalone-7.1.1/sbin/alterator-standalone000075500000000000000000000040161212365115700226510ustar00rootroot00000000000000#!/usr/bin/guile18 -s !# (use-modules (ice-9 getopt-long) (alterator common) (alterator algo) (alterator telegraph) (alterator transport pipe-channel) (alterator lookout) (alterator d)) ;;; functions (define *cmdline* (command-line)) (define (usage) (format #t "Usage: ~A [-ld] [module]~%" (car *cmdline*)) (format #t " -h, --help display help screen~%") (format #t " -l,--local try to use ui files if available~%") (format #t " -d,--debug turn on debugging~%~%") (format #t " If module name is empty all available modules will be displayed~%") (format #t " Report bugs to ~%") (quit)) ;;; Generate list containing filenames (define (files-in-directory dirname) (let ((dir (opendir dirname))) (let next ((f (readdir dir)) (files '())) (cond ((eof-object? f) (closedir dir) files) (else (next (readdir dir) (cons f files))))))) ;; Show all available Alterator modules (define (list-modules) (format #t "Available modules:~%") ;;; Display sorted list of module names (map (lambda (f) (display (format #f "~A~%" (string-drop-right f 8)))) (sort (filter (lambda (f) (equal? (string-suffix-length f ".desktop") 8)) ;; only .desktop file names (files-in-directory "/usr/share/alterator/applications")) string<)) (quit)) ;; main code (define option-spec '((help (single-char #\h) (value #f)) (local (single-char #\l) (value #f)) (debug (single-char #\d) (value #f)))) (define options (getopt-long *cmdline* option-spec)) (and (option-ref options 'help #f) (usage)) (and (option-ref options 'debug #f) (turn-on-debugging)) (if (option-ref options 'local #f) (begin (alterator-init-local) (d-init-local)) (begin (alterator-init-global) (d-init-global))) (define desktop-file (or (cond-car (option-ref options '() #f)) (list-modules))) (telegraph (pipe-in "/usr/bin/alterator-browser-qt") (lookout "/standalone" 'desktop-file desktop-file) (d)) (telegraph-start) alterator-standalone-7.1.1/ui/000075500000000000000000000000001212365115700162615ustar00rootroot00000000000000alterator-standalone-7.1.1/ui/acc/000075500000000000000000000000001212365115700170075ustar00rootroot00000000000000alterator-standalone-7.1.1/ui/acc/index.scm000064400000000000000000000044501212365115700206250ustar00rootroot00000000000000(document:surround "/std/frame") (document:insert "/std/functions") (po-domain "alterator-standalone") ;;; Functions (define centerface (make-widget "centerface")) (define modules (make-attribute 'modules)) (define sections (make-attribute 'sections)) (define current-module (make-attribute 'current-module)) title (_ "System management center") width 600 height 560 (define *helps* (make-cell '())) (define *expert-mode* (make-cell 0)) (define (not-empty-section category module-data) (find (lambda(x) (string=? category (woo-get-option x 'category))) module-data)) (define (make-section module-data) (lambda(x) (let ((category (woo-get-option x 'category))) (and (not-empty-section category module-data) (list category (woo-get-option x 'name) (woo-get-option x 'comment) (woo-get-option x 'icon)))))) (define (make-module x) (list (woo-get-option x 'category) (woo-get-option x 'uri) (woo-get-option x 'name))) (define (make-help data) (cell-set! *helps* (map (lambda(x) (cons (woo-get-option x 'uri) (woo-get-option x 'help))) data))) (define (update-menu) (let ((section-data (woo-list "/menu/avail_sections" 'ui "qt" 'expert_mode (cell-ref *expert-mode*))) (module-data (woo-list "/menu/avail_modules" 'ui "qt" 'expert_mode (cell-ref *expert-mode*)))) (make-help module-data) (cf sections (filter-map (make-section module-data) section-data) modules (map make-module module-data)))) (define (update-help url) (let* ((topic (if (eq? url '/) "acc-qt" (cond-assoc (symbol->string url) (cell-ref *helps*)))) (path (woo-get-option (woo-read-first "/help/" 'topic topic) 'url))) (document:root help path))) ;;; UI (document:id cf (centerface (frame:page) (when clicked (let ((action (cf current-action))) (case action ((base_mode) (cell-set! *expert-mode* 0) (update-menu)) ((expert_mode) (cell-set! *expert-mode* 1) (update-menu))))) (when selected (let ((url (cf current-module))) (frame:replace url) (update-help url))))) ;;; Logic (document:root (when loaded (update-menu) (update-help '/))) alterator-standalone-7.1.1/ui/standalone/000075500000000000000000000000001212365115700204115ustar00rootroot00000000000000alterator-standalone-7.1.1/ui/standalone/index.scm000064400000000000000000000020331212365115700222220ustar00rootroot00000000000000(document:surround "/std/frame") (document:insert "/std/functions") (po-domain "alterator-standalone") (define *desktop-file* (global 'desktop-file)) ;; UI width 600 height 560 (frame:page (gridbox columns "20;60;20" (spacer) (label text (format #f (_ "Module '~A' not found") *desktop-file*) align "center") (spacer) (spacer) (label) (spacer) (spacer) (button name "exit" text (_ "Exit") align "center" (when clicked (quit))) (spacer) )) (label (string-append "" (_ "Press F1 for help") "")) ;; Logic (document:root (when loaded (and-let* (((not-empty-string? *desktop-file*)) (item (woo-read-first "/menu" 'desktopfile *desktop-file* 'ui "qt")) (item-uri (woo-get-option item 'uri #f)) (item-name (woo-get-option item 'name #f)) (item-help (woo-get-option item 'help #f)) (help-path (woo-get-option (woo-read-first "/help/" 'topic item-help) 'url))) (document:root help help-path title item-name) (frame:replace item-uri))))