Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-08-18 07:25:30

Bazon
Member
Registered: 2014-08-12
Posts: 19

[Solved] Is there a way to set FADE_TIME for xfce4-notifyd?

The  FADE_TIME for xfce4-notifyd is set to 800ms (see here), I would like to have it shorter.
Is it possible to set it? Or simply to switch it off? Without recompiling xfce4-notifyd? ;-)

Thanks!

Offline

#2 2014-08-18 12:02:32

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: [Solved] Is there a way to set FADE_TIME for xfce4-notifyd?

This setting is found at Settings Manager >> Notifications >> "Disappear after" or in the xfce4-notifyd xfconf channel as the property "expire-timeout".

To set it off, I guess you just kill the xfce4-notifyd process.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2014-08-18 12:09:58

Bazon
Member
Registered: 2014-08-12
Posts: 19

Re: [Solved] Is there a way to set FADE_TIME for xfce4-notifyd?

As far as I understand, that is a different thing: The fade begins AFTER the disappear/timeout time. See this bug report for comparison of both times:
https://bugzilla.xfce.org/show_bug.cgi?id=8580

So I don't want to set the disappear/timout-time, but the fade time.

Offline

#4 2014-08-18 12:38:12

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: [Solved] Is there a way to set FADE_TIME for xfce4-notifyd?

Sorry, swung right through that one.

There doesn't appear to be anything that allows you to change that setting - I even had a look at some gtkrc hacks, but none worked. Looks like you'll need to recompile it.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2014-08-18 12:39:30

Bazon
Member
Registered: 2014-08-12
Posts: 19

Re: [Solved] Is there a way to set FADE_TIME for xfce4-notifyd?

OK, thanks for your effort!

Offline

#6 2014-08-18 12:51:02

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: [Solved] Is there a way to set FADE_TIME for xfce4-notifyd?

Not sure if this is useful, but the fade effect is dependent on the compositor being enabled. With the compositor disabled, there is no fade effect.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2014-08-18 13:16:03

Bazon
Member
Registered: 2014-08-12
Posts: 19

Re: [Solved] Is there a way to set FADE_TIME for xfce4-notifyd?

Ah! You're two times right:
1. Yes, disabling compositor disables fade,
2. No, this isn't useful for me: The reason I want to disable is, that I use kwin as window-manager, which has it's own window-close-animation. And it's own compositor. So I see a noticication close-animation twice (first XFCEs fade and than kwins animation). Disabling the compositor in XFCE is no use when I replace the window-manager with kwin, most likely because kwin uses a compositor.

Thanks anyway!

Offline

#8 2014-08-19 12:10:52

Bazon
Member
Registered: 2014-08-12
Posts: 19

Re: [Solved] Is there a way to set FADE_TIME for xfce4-notifyd?

For the record or if it is useful for anyone else:
I solved my problem by disabling the KWin fade effect for xfce4-notifyd by editing /usr/share/apps/kwin/effects/kwin4_effect_fade/contents/code/main.js :
I added

if (w.windowClass == "xfce4-notifyd xfce4-notifyd") {
        return false;
    }

to the isFadeWindow(w) function, so the whole file looks now like this:

    /********************************************************************
     KWin - the KDE window manager
     This file is part of the KDE project.

     Copyright (C) 2007 Philip Falkner <philip.falkner@gmail.com>
     Copyright (C) 2012 Martin Gräßlin <mgraesslin@kde.org>

    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 of the License, 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 program.  If not, see <http://www.gnu.org/licenses/>.
    *********************************************************************/
    function isFadeWindow(w) {
        if (w.deleted && effect.isGrabbed(w, Effect.WindowClosedGrabRole)) {
            return false;
        } else if (!w.deleted && effect.isGrabbed(w, Effect.WindowAddedGrabRole)) {
            return false;
        }
        if (w.windowClass == "xfce4-notifyd xfce4-notifyd") {
            return false;
        }
        return w.onCurrentDesktop && !isLoginWindow(w) && !w.desktopWindow && !w.utility && !w.minimized;
    }

    function isLoginWindow(w) {
        return w.windowClass == "ksplashx ksplashx" || w.windowClass == "ksplashsimple ksplashsimple" || w.windowClass == "qt-subapplication ksplashqml";
    }

    var fadeInTime, fadeOutTime, fadeWindows;
    function loadConfig() {
        fadeInTime = animationTime(effect.readConfig("FadeInTime", 150));
        fadeOutTime = animationTime(effect.readConfig("FadeOutTime", 150)) * 4;
        fadeWindows = effect.readConfig("FadeWindows", true);
    }
    loadConfig();
    effect.configChanged.connect(function() {
        loadConfig();
    });
    effects.windowAdded.connect(function(w) {
        if (fadeWindows && isFadeWindow(w)) {
            effect.animate(w, Effect.Opacity, fadeInTime, 1.0, 0.0);
        }
    });
    effects.windowClosed.connect(function(w) {
        if (fadeWindows && isFadeWindow(w)) {
            animate({
                window: w,
                duration: fadeOutTime,
                animations: [{
                    type: Effect.Opacity,
                    curve: QEasingCurve.OutQuart,
                    to: 0.0
                }]
            });
        }
    });

see https://forum.kde.org/viewtopic.php?f=111&t=122489

Offline

Board footer

Powered by FluxBB