D9288: support for defining autostart apps in lnf packages

2017-12-13 Thread Marco Martin
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:49ae81f280bd: support for defining autostart apps in lnf 
packages (authored by mart).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D9288?vs=23869=23870#toc

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D9288?vs=23869=23870

REVISION DETAIL
  https://phabricator.kde.org/D9288

AFFECTED FILES
  kcms/lookandfeel/kcm.cpp

To: mart, #plasma, davidedmundson
Cc: ngraham, mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-13 Thread David Edmundson
davidedmundson accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  phab/lnfautostartwq!

REVISION DETAIL
  https://phabricator.kde.org/D9288

To: mart, #plasma, davidedmundson
Cc: ngraham, mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-13 Thread Marco Martin
mart updated this revision to Diff 23869.
mart added a comment.


  - only mess with autostart if we apply the layout

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D9288?vs=23805=23869

BRANCH
  phab/lnfautostartwq!

REVISION DETAIL
  https://phabricator.kde.org/D9288

AFFECTED FILES
  kcms/lookandfeel/kcm.cpp

To: mart, #plasma
Cc: ngraham, mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-12 Thread Michail Vourlakos
mvourlakos added a comment.


  In https://phabricator.kde.org/D9288#178638, @mart wrote:
  
  > we could add a new named file in the lnf package for the latte layout: in 
what format is it exported?
  >  so lattedock upon startup may go read that file (is already possible for 
any app to access that package via standard KPackage api and reading the 
current lnf from kdeglobals, adding a new named file just makes it a bit more 
official)
  
  
  nice! I can play with it with some guidance to test it in order to support it 
both for 0.7 and master Latte versions if this is possible.
  the layout file is just a text file that ends with **.layout.latte** .
  Inside it looks like just like a plasma's appletsrc file with some extra 
configgroups that Latte needs.
  The name of the file is also used as a layout name, e.g. 
**Plasma.layout.latte** means a Latte layout named **Plasma** .
  
  If you want to take a look of one layout file a small example is: F5543871: 
Plasma.layout.latte 
  
  Theoretically it should be also possible to download/install from 
store.kde.org any applets that can be found inside the **layout.latte** file
  and cant be found in the user's environment.
  Just like plasma is doing, I think.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D9288

To: mart, #plasma
Cc: ngraham, mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-12 Thread Marco Martin
mart updated this revision to Diff 23805.
mart added a comment.


  - e Qtring::section

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D9288?vs=23764=23805

BRANCH
  phab/lnfautostartwq!

REVISION DETAIL
  https://phabricator.kde.org/D9288

AFFECTED FILES
  kcms/lookandfeel/kcm.cpp

To: mart, #plasma
Cc: ngraham, mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-12 Thread Marco Martin
mart marked 2 inline comments as done.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D9288

To: mart, #plasma
Cc: ngraham, mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-12 Thread Marco Martin
mart added inline comments.

INLINE COMMENTS

> apol wrote in kcm.cpp:387
> Also I'm not sure if it works, but something along the lines of `systemctl 
> --user stop servicename` should work. Or at least it's a thing.

it seems to look for a systemd service file?

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D9288

To: mart, #plasma
Cc: ngraham, mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-12 Thread Marco Martin
mart added a comment.


  In https://phabricator.kde.org/D9288#178442, @mvourlakos wrote:
  
  > in the future would it be possible for these apps to include also their 
layout in the Look N' Feel package?
  >  For example Latte supports import/export of its layouts so it is possible 
to dynamically change its layout
  >  from a Look n' Feel package.
  
  
  we could add a new named file in the lnf package for the latte layout: in 
what format is it exported?
  so lattedock upon startup may go read that file (is already possible for any 
app to access that package via standard KPackage api and reading the current 
lnf from kdeglobals, adding a new named file just makes it a bit more official)

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D9288

To: mart, #plasma
Cc: ngraham, mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-11 Thread Michail Vourlakos
mvourlakos added a comment.


  @mart I suppose this mechanism is the first step in order to load external 
apps (such as lattedock) through the Look N' Feel package. Fantastic news of 
course! :)
  
  in the future would it be possible for these apps to include also their 
layout in the Look N' Feel package?
  For example Latte supports import/export of its layouts so it is possible to 
dynamically change its layout
  from a Look n' Feel package.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D9288

To: mart, #plasma
Cc: mvourlakos, apol, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-11 Thread Aleix Pol Gonzalez
apol added inline comments.

INLINE COMMENTS

> kcm.cpp:387
> +//FIXME: quite ugly way to stop things, and what about non 
> KDE things?
> +QProcess::startDetached(QStringLiteral("kquitapp5"), 
> {service.property(QStringLiteral("X-DBUS-ServiceName")).toString().split(QChar('.')).last()});
> +}

Use splitRef or section

> kcm.cpp:387
> +//FIXME: quite ugly way to stop things, and what about non 
> KDE things?
> +QProcess::startDetached(QStringLiteral("kquitapp5"), 
> {service.property(QStringLiteral("X-DBUS-ServiceName")).toString().split(QChar('.')).last()});
> +}

Also I'm not sure if it works, but something along the lines of `systemctl 
--user stop servicename` should work. Or at least it's a thing.

> kcm.cpp:400
> +as.setAutostarts(true);
> +KRun::runApplication(service, QList(), nullptr);
> +}

`{}`

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D9288

To: mart, #plasma
Cc: apol, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, mart


D9288: support for defining autostart apps in lnf packages

2017-12-11 Thread Marco Martin
mart created this revision.
mart added a reviewer: Plasma.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  meant to support layouts that want external apps such as lattedock
  or conky, it adds services (in the defaults file they're saved as
  the filename of the desktop file) in autostart and starts immediately
  the app as well.
  before applying a lnf, it removes from autostart anything the old
  package had and attempts to stop the apps

TEST PLAN
  tried to start/stop lattedock with the mechanism
  some fallback may be needed for non kde apps

REPOSITORY
  R119 Plasma Desktop

BRANCH
  phab/lnfautostartwq!

REVISION DETAIL
  https://phabricator.kde.org/D9288

AFFECTED FILES
  kcms/lookandfeel/kcm.cpp

To: mart, #plasma
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart