| [Sawfish] Re: Add compton module to sawfish |
[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]
Hi, On Fri, 13 Sep 2013 21:47:31 +0200 wrote fuchur <flohtransporter@xxxxxxxxx>: >Hi, > >On Thu, 12 Sep 2013 15:59:27 +0200 >wrote fuchur <flohtransporter@xxxxxxxxx>: > >>Hi, >> >>I have build a patch to add support for transparency in sawfish. >>It use compton and you can use sawfish to set the most settings. >> > >With this patch i have add some settings for shadows. Changes: > >Disable shadows by windows with tabs, but you can force shadows for >windows with tabs. >Improve shadows for windows with tabs. > >Selectable: >Don’t draw shadows on menus. >Don’t draw shadows on drag-and-drop windows. >Don’t draw shadows on shaped windows. >Only draw shadows on normal windows and dialogs. > >Add window match whether a window never become shadows. >Better xinerama support (remove shadows by fullscreen on a head) >Add "--detect-rounded-corners". > > >Should now complete, if you missing something important please >send a mail. > With this patch we set all inactiv/background tabs shade. Tabbed windows now also looks like normal windows. Also improve translucency for shadows settings. -- Regards, Fuchur GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53 C116 E5BC 70D5 B8D7 B2B0
diff -urNad sawfish.orig/lisp/sawfish/wm/prg/compton.jl sawfish/lisp/sawfish/wm/prg/compton.jl
--- sawfish.orig/lisp/sawfish/wm/prg/compton.jl
+++ sawfish/lisp/sawfish/wm/prg/compton.jl
@@ -110,11 +110,11 @@
:options (25 20 15 10 5 0 -05 -10 -15 -20 -25 -30 -35 -40 -45 -50)
:after-set (lambda () (switch-opacity)))
- (defcustom translucency 75 "The translucency for shadows. (Default 75)"
+ (defcustom translucency 80 "The translucency for shadows. (Default 80)"
:depends opacity-enable
:group (appearance window-effects)
:type symbol
- :options (05 15 30 45 60 75 90 105 120 135 150)
+ :options (10 20 30 40 50 60 70 80 90 100)
:after-set (lambda () (switch-opacity)))
(defcustom blur-radius 12 "The blur radius for shadows. (Default 12)"
diff -urNad sawfish.orig/lisp/sawfish/wm/tabs/tabgroup.jl sawfish/lisp/sawfish/wm/tabs/tabgroup.jl
--- sawfish.orig/lisp/sawfish/wm/tabs/tabgroup.jl
+++ sawfish/lisp/sawfish/wm/tabs/tabgroup.jl
@@ -160,6 +160,9 @@
(setq release-window t)
(when (window-tabbed-p w)
(let ((wins (list (remove w (tab-group-window-index w)))))
+ (if (not (window-get w 'shaded))
+ (mapcar (lambda (w)
+ (unshade-window w)) (tab-group-window-index w)))
(tab-delete-window-from-group w (tab-window-group-index w))
(window-put w 'fixed-position nil)
(tab-refresh-group oldgroup 'frame)
@@ -185,7 +188,13 @@
(let* ((index (tab-window-group-index win))
(wins (tab-group-window-list (nth index tab-groups)))
(focus (tab-group-offset win 0))
- (unfocus (remove focus wins)))
+ (unfocus (remove focus wins))
+ not-shaded)
+ (mapcar (lambda (w)
+ (if (not (window-get w 'shaded)) (setq not-shaded 't))) wins)
+ (if not-shaded
+ (mapcar (lambda (w)
+ (unshade-window w)) wins))
(cond
((eq prop 'raise)
(raise-windows focus wins))
@@ -266,13 +275,11 @@
(if (not (eq viewport-sticky tab-viewport-sticky))
(if viewport-sticky
(make-window-sticky/viewport w)
- (make-window-unsticky/viewport w)))) unfocus)))
- ((eq prop 'shade)
- (mapcar (lambda (w)
- (shade-window w)) unfocus))
- ((eq prop 'unshade)
+ (make-window-unsticky/viewport w)))) unfocus))))
+ (when (cdr (tab-group-window-index win))
+ (if not-shaded (unshade-window win))
(mapcar (lambda (w)
- (unshade-window w)) unfocus))))
+ (shade-window w)) (remove win (tab-group-window-index win)))))
(setq tab-refresh-lock t))))
;; Entry points
@@ -413,8 +420,8 @@
"Releas win from the tabgroup and iconify the rest from the group."
(let* ((default-window-animator 'none)
(index (tab-window-group-index win))
- (wins (tab-group-window-list (nth index tab-groups)))
- (tabs (remove win (tab-group-window-list (nth index tab-groups)))))
+ (wins (tab-group-window-index win))
+ (tabs (remove win (tab-group-window-index win))))
(tab-delete-window-from-group win index)
(reframe-window win)
(setq tab-refresh-lock nil)
@@ -511,13 +518,10 @@
(add-hook 'before-resize-hook (lambda (win) (if (window-tabbed-p win) (before-move-resize win)))))
(add-hook 'after-resize-hook (lambda (win) (after-move-resize win)))
(add-hook 'focus-in-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'raise))))
- (add-hook 'shade-window-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'shade))))
- (add-hook 'unshade-window-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'unshade))))
(add-hook 'iconify-window-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'iconify))))
(add-hook 'uniconify-window-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'uniconify))))
(add-hook 'window-maximized-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'maximized))))
(add-hook 'window-unmaximized-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'maximized))))
- (add-hook 'add-to-workspace-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'frame))))
(add-hook 'destroy-notify-hook tab-delete-window-from-tab-groups))
(gaol-add set-tab-theme-name tab-refresh-group tab-group-window-index))
diff -urNad sawfish.orig/themes/StyleTab/theme.jl sawfish/themes/StyleTab/theme.jl
--- sawfish.orig/themes/StyleTab/theme.jl
+++ sawfish/themes/StyleTab/theme.jl
@@ -516,11 +516,11 @@
(mapcar (lambda (w)
(window-put w 'title-position dest)) wins)
- (call-window-hook 'window-state-change-hook w (list '(title-position)))
- (mapcar (lambda (w)
- (reframe-window w)
- (move-window-to w pos-x pos-y)
- (resize-window-to w dim-x dim-y)) wins))))
+
+ (reframe-window w)
+ (move-window-to w pos-x pos-y)
+ (resize-window-to w dim-x dim-y)
+ (tab-refresh-group w 'move))))
(define (tabbartotop)
"Move tab-bar to top."
Attachment:
signature.asc
Description: PGP signature
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |