Japanese translation of message catalog for Sawfish Window-Manager
Revisão | 5c256d28aa6a1db014cfd0c828ea2eda9ee2c5a6 (tree) |
---|---|
Hora | 2014-08-20 03:57:00 |
Autor | Christopher Roy Bratusek <nano@jpbe...> |
Commiter | Christopher Roy Bratusek |
enable shade-hover and auto-raise in SawfishConfig, utilize them in tabbing
@@ -128,6 +128,8 @@ | ||
128 | 128 | (autoload-command 'slide-group-down 'sawfish.wm.commands.slide-window) |
129 | 129 | (defgroup gpsy "Grow, Pack, Shrink & Yank" :group move :require sawfish.wm.commands.grow-pack) |
130 | 130 | (defgroup cycle "Window Cycling" :group focus :require sawfish.wm.commands.x-cycle) |
131 | +(defgroup shade-hover "Shade Hover" :group focus :require sawfish.wm.ext.shade-hover) | |
132 | +(defgroup auto-raise "Auto-Raise" :group focus :require sawfish.wm.ext.auto-raise) | |
131 | 133 | (autoload-command 'cycle-windows 'sawfish.wm.commands.x-cycle) |
132 | 134 | (autoload-command 'cycle-windows-backwards 'sawfish.wm.commands.x-cycle) |
133 | 135 | (autoload-command 'cycle-group 'sawfish.wm.commands.x-cycle) |
@@ -34,7 +34,7 @@ | ||
34 | 34 | |
35 | 35 | (defgroup auto-raise "Auto-Raise" :group focus) |
36 | 36 | |
37 | - (defcustom raise-windows-on-focus nil | |
37 | + (defcustom raise-windows-on-focus t | |
38 | 38 | "Raise windows when they are focused." |
39 | 39 | :type boolean |
40 | 40 | :require sawfish.wm.ext.auto-raise |
@@ -20,7 +20,7 @@ | ||
20 | 20 | |
21 | 21 | (define-structure sawfish.wm.ext.shade-hover |
22 | 22 | |
23 | - (export ) | |
23 | + (export clean-up) | |
24 | 24 | |
25 | 25 | (open rep |
26 | 26 | rep.system |
@@ -38,6 +38,7 @@ | ||
38 | 38 | |
39 | 39 | (open rep |
40 | 40 | rep.system |
41 | + rep.io.timers | |
41 | 42 | rep.data.records |
42 | 43 | sawfish.wm.gaol |
43 | 44 | sawfish.wm.misc |
@@ -51,6 +52,8 @@ | ||
51 | 52 | sawfish.wm.stacking |
52 | 53 | sawfish.wm.util.groups |
53 | 54 | sawfish.wm.commands.groups |
55 | + sawfish.wm.ext.auto-raise | |
56 | + sawfish.wm.ext.shade-hover | |
54 | 57 | sawfish.wm.workspace) |
55 | 58 | |
56 | 59 | (define-structure-alias tabgroup sawfish.wm.tabs.tabgroup) |
@@ -317,6 +320,7 @@ sticky, unsticky, fixed-position." | ||
317 | 320 | ;; adopt window settings for the new tab |
318 | 321 | (group-frame-style (window-get win 'frame-style)) |
319 | 322 | (group-frame-type (window-get win 'type)) |
323 | + (group-frame-shade-hover (window-get win 'shade-hover)) | |
320 | 324 | (group-frame-focus-mode (window-get win 'focus-mode)) |
321 | 325 | (group-frame-gravity (window-get win 'gravity)) |
322 | 326 | (group-frame-never-iconify (window-get win 'never-iconify)) |
@@ -349,6 +353,7 @@ sticky, unsticky, fixed-position." | ||
349 | 353 | (if (window-get w 'shaded) (unshade-window w)) |
350 | 354 | (window-put w 'frame-style group-frame-style) |
351 | 355 | (window-put w 'type group-frame-type) |
356 | + (window-put w 'shade-hover group-frame-shade-hover) | |
352 | 357 | (window-put w 'focus-mode group-frame-focus-mode) |
353 | 358 | (window-put w 'gravity group-frame-gravity) |
354 | 359 | (window-put w 'title-position group-frame-title-position) |
@@ -559,7 +564,8 @@ sticky, unsticky, fixed-position." | ||
559 | 564 | (setq tab-refresh-lock t) |
560 | 565 | (when (window-tabbed-p win) |
561 | 566 | (tab-refresh-group win 'move) |
562 | - (tab-refresh-group win 'frame)) | |
567 | + (tab-refresh-group win 'frame) | |
568 | + (set-input-focus (nth 0 (tab-group-windows-stacking-order win)))) | |
563 | 569 | (setq tab-move-resize-lock nil))) |
564 | 570 | |
565 | 571 | (define (unmap-id win) |
@@ -586,6 +592,37 @@ of the windows the same 'tab-group property" | ||
586 | 592 | (when (window-get win 'tab-group) |
587 | 593 | (setq in-tab-group-name (remove (assoc last-unmap-id in-tab-group-name) in-tab-group-name)))) |
588 | 594 | |
595 | + (define timer-raise nil) | |
596 | + (define (focus-in-tab win) | |
597 | + (if (or shade-hover-mode (window-get win 'shade-hover)) | |
598 | + (let ((timer-wait (if raise-windows-on-focus raise-window-timeout '500))) | |
599 | + (if (or (eq focus-mode 'click) | |
600 | + (window-get win 'focus-mode 'click)) | |
601 | + (setq timer-wait '1)) | |
602 | + (setq timer-raise | |
603 | + (make-timer (lambda () | |
604 | + (raise-windows win (tab-group-windows-stacking-order win))) | |
605 | + (quotient timer-wait 1000) (mod timer-wait 1000)))) | |
606 | + (tab-refresh-group win 'raise))) | |
607 | + | |
608 | + (define (focus-out-tab) | |
609 | + (when timer-raise | |
610 | + (delete-timer timer-raise) | |
611 | + (setq timer-raise nil))) | |
612 | + | |
613 | + (define (unshade-tab win) | |
614 | + (let ((unshade-nil)) | |
615 | + (when (window-get win 'shade-hover-unshaded) | |
616 | + (mapcar (lambda (w) | |
617 | + (if (not (window-get w 'shaded)) (setq unshade-nil 't))) (remove win (tab-group-windows win))) | |
618 | + (when unshade-nil | |
619 | + (window-put win 'shade-hover-unshaded nil) | |
620 | + (clean-up) | |
621 | + (setq unshade-nil nil) | |
622 | + (mapcar (lambda (w) | |
623 | + (shade-window w)) (remove win (tab-group-windows win)))) | |
624 | + (set-input-focus win)))) | |
625 | + | |
589 | 626 | (unless batch-mode |
590 | 627 | (add-hook 'after-add-window-hook in-tab-group) |
591 | 628 | (add-hook 'unmap-notify-hook unmap-id) |
@@ -616,7 +653,9 @@ of the windows the same 'tab-group property" | ||
616 | 653 | (when (eq resize-outline-mode 'opaque) |
617 | 654 | (add-hook 'before-resize-hook (lambda (win) (if (window-tabbed-p win) (before-move-resize win))))) |
618 | 655 | (add-hook 'after-resize-hook (lambda (win) (after-move-resize win))) |
619 | - (add-hook 'focus-in-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'raise)))) | |
656 | + (add-hook 'focus-in-hook (lambda (win) (if (window-tabbed-p win) (focus-in-tab win)))) | |
657 | + (add-hook 'focus-out-hook (lambda (win) (if (window-tabbed-p win) (focus-out-tab)))) | |
658 | + (add-hook 'unshade-window-hook (lambda (win) (if (window-tabbed-p win) (unshade-tab win)))) | |
620 | 659 | (add-hook 'iconify-window-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'iconify)))) |
621 | 660 | (add-hook 'uniconify-window-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'uniconify)))) |
622 | 661 | (add-hook 'window-maximized-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'maximized)))) |