Re: Proposal: passing user idle time to systemd-logind

2019-05-26 Thread Martin Flöser

Am 2019-05-24 21:51, schrieb Aleix Pol:

On Wed, May 22, 2019 at 6:13 PM Germano Massullo
 wrote:


Hello, I am writing to you to propose the following reasoning, hoping
that it can help making easier (just a bit) third parties development
work on Linux.
I am currently developing BOINC client user idle time detection on
Linux systems (both graphical or tty sessions)
After some studies I started writing a little piece of code that that
is able to print on standard output the user idle time by retrieving
it from systemd-logind IdleSinceHint property (that is exposed on
DBus). By the way I found out that this value was always 0 [1], so I
asked why [2]. I have been told that logind relies on the desktop
environment to pass this information.
Many d.e. expose user idle time to their own DBus path, (i.e.
org.gnome.Mutter.IdleMonitor), so I will be forced to write code that
depends on the specific desktop environment. Since:
1) systemd-logind is just ready for exposing user idle time;
2) for a developer writing code for Linux it would be much easier to
retrieve user idle time from a unique place rather than having to deal
with all various desktop environments;
I would like to ask you what do you think about passing the user idle
time to logind [3] [4] ?

Best regards

[1]: you can try with system console command
$ sleep 2 && gdbus introspect --system --dest org.freedesktop.login1
--object-path /org/freedesktop/login1 | grep IdleSinceHint
[2]: 
https://lists.freedesktop.org/archives/systemd-devel/2019-May/042726.html
[3]: 
https://www.freedesktop.org/wiki/Software/systemd/writing-desktop-environments/
[4]: 
https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/


We are using the kidletime framework to do that on our applications:
https://api.kde.org/frameworks/kidletime/html/index.html

IIRC, In X11 it happens through mere X11 observation, in wayland
there's a protocol for that,
It could make sense to expose this data to logind and even consume it
like that from applications. Why not.


When implementing kidletime support for Wayland I also looked at the 
logind property and came to the conclusion that it's totally useless. 
The property provides the idle time. But that is not what anybody is 
interested in. What one needs are notifications (to the application) 
like idle for five minutes. That's exactly what kidletime provides.


The problem with the idle time in logind is that it keeps 3 applications 
busy:
* the Wayland compositor needs to update the time, although it's 
currently sleeping
* applications need to actively poll the logind property to check how 
much has passed
* logind is kept busy due to the polling of the applications and due to 
the compositor updating the property.


I'm all for having something standardized, ideally working on both X11 
and Wayland, but the logind interface is unfortunately not the solution.


We can add support for logind but it would be very cross. E.g. only 
providing idle for one minute, idle for five minutes, 10 minutes, 15 
minutes, 30 minutes, one hour. Everything else just causes too much 
stress on the sleeping KWin (I like KWin best when it's sleeping ;-) ).


Cheers
Martin


D21417: [ActionListItem] Make QML imports and tooltip consistent

2019-05-26 Thread Björn Feber
GB_2 added a comment.


  In D21417#470381 , @apol wrote:
  
  > But BasicListItem already is a Control.
  >  https://doc.qt.io/qt-5/qml-qtquick-controls2-itemdelegate.html
  
  
  Ok, weird. If I do it without the Control it shows this error: 
`qrc:/qml/ActionListItem.qml:44 Cannot assign object to list property 
"_basicDefault"`

REPOSITORY
  R134 Discover Software Store

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

To: GB_2, #plasma, #vdg
Cc: apol, #vdg, plasma-devel, #plasma, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart


D21296: Add the option to configure the realm

2019-05-26 Thread Jan Grulich
This revision was automatically updated to reflect the committed changes.
Closed by commit R116:179cd8baea41: Add the option to configure the realm 
(authored by jgrulich).

REPOSITORY
  R116 Plasma Network Management Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D21296?vs=58318&id=58699

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

AFFECTED FILES
  vpn/fortisslvpn/fortisslvpnadvanced.ui
  vpn/fortisslvpn/fortisslvpnwidget.cpp
  vpn/fortisslvpn/nm-fortisslvpn-service.h

To: enriquem, jgrulich
Cc: ngraham, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D15341: [Plasma Search KCM] Add a UI tab for editing shortcuts.

2019-05-26 Thread James Smith
smithjd updated this revision to Diff 58698.
smithjd added a comment.


  - [Plasma Search KCM] Re-organize the tab and widget layouts.
  - Add edit actions.

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15341?vs=41183&id=58698

BRANCH
  master-krunnerkeybindings (branched from master)

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

AFFECTED FILES
  kcms/runners/CMakeLists.txt
  kcms/runners/kcm.cpp
  kcms/runners/kcm.h

To: smithjd, #plasma, #vdg, ngraham
Cc: ngraham, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D14739: [KRunner] Allow modifying the keyboard shortcuts.

2019-05-26 Thread James Smith
smithjd updated this revision to Diff 58697.
smithjd added a comment.


  - [KRunner] Change start of line shortcut to CTRL + S.
  - [KRunner] Re-work the shortcut handling to allow modifying the shortcuts.
  - Make edit actions configurable.
  - Follow standard shortcuts nomenclature.
  - Fix clear action.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14739?vs=41182&id=58697

BRANCH
  master-krunnerbashkeybindings (branched from master)

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

AFFECTED FILES
  krunner/CMakeLists.txt
  krunner/view.cpp
  krunner/view.h
  lookandfeel/contents/runcommand/RunCommand.qml

To: smithjd, #plasma, ngraham
Cc: davidedmundson, ngraham, broulik, plasma-devel, jraleigh, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D21414: Allow 'Exclude folders' section in Baloo KCM to fill window

2019-05-26 Thread Nathaniel Graham
ngraham added a comment.


  Tested; LGTM. While you're cleaning up the UI, you could probably remove the 
group box too, and just add a left-aligned label above the list view. What do 
you think?

REPOSITORY
  R119 Plasma Desktop

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

To: kishoreg, #baloo, #vdg, ngraham
Cc: bruns, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D21417: [ActionListItem] Make QML imports and tooltip consistent

2019-05-26 Thread Aleix Pol Gonzalez
apol added a comment.


  But BasicListItem already is a Control.
  https://doc.qt.io/qt-5/qml-qtquick-controls2-itemdelegate.html

REPOSITORY
  R134 Discover Software Store

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

To: GB_2, #plasma, #vdg
Cc: apol, #vdg, plasma-devel, #plasma, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart


D21414: Allow 'Exclude folders' section in Baloo KCM to fill window

2019-05-26 Thread Stefan Brüns
bruns added a comment.


  The code change looks sane for me, although I haven't tested it.
  
  The summary should mention:
  
  - what is currently wrong (space consumed by spacer)
  - what was done to fix it (spacer removed, so the folder list can stretch)
  
  Can you add a before/after screenshot here (the one from the BR is fine for 
before)?
  
  The config layout was imported (more or less) as is 4 years ago, maybe 
inherited from nepomuk. Hard to tell if the spacer ever had a purpose.

REPOSITORY
  R119 Plasma Desktop

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

To: kishoreg, #baloo, #vdg, ngraham
Cc: bruns, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D21417: [ActionListItem] Make QML imports and tooltip consistent

2019-05-26 Thread Björn Feber
GB_2 created this revision.
GB_2 added reviewers: Plasma, VDG.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
GB_2 requested review of this revision.

REVISION SUMMARY
  T10862  and T10873 


TEST PLAN
  The tooltip now behaves correctly.

REPOSITORY
  R134 Discover Software Store

BRANCH
  actionlistitem-make-qml-imports-and-tooltip-consistent (branched from master)

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

AFFECTED FILES
  discover/qml/ActionListItem.qml

To: GB_2, #plasma, #vdg
Cc: #vdg, plasma-devel, #plasma, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D21296: Add the option to configure the realm

2019-05-26 Thread Nathaniel Graham
ngraham added a comment.


  @jgrulich, are you going to land this, or would you like me to do it?

REPOSITORY
  R116 Plasma Network Management Applet

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

To: enriquem, jgrulich
Cc: ngraham, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D21408: RFC: [Notifications] Better notification number alignment

2019-05-26 Thread Noah Davis
ndavis added a comment.


  The patch makes the position of the numbers more consistent, but it's 
consistently slightly to the left of center.

REPOSITORY
  R120 Plasma Workspace

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

To: broulik, #plasma, #vdg
Cc: ngraham, ndavis, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D21414: Allow 'Exclude folders' section in Baloo KCM to fill window

2019-05-26 Thread Kishore Gopalakrishnan
kishoreg created this revision.
kishoreg added a reviewer: Baloo.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
kishoreg requested review of this revision.

REVISION SUMMARY
  I just removed a spacer. It seems like it was added intentionally, so I'm not 
sure if removing it breaks something. I couldn't find any broken behaviour with 
this change.
  
  BUG: 407709

TEST PLAN
  1. Open kcm_baloofile. Check if the exclude folders section fills all 
available space.
  2. Resize the window to make it larger. Check that the exclude folders 
section resizes to match the window.

REPOSITORY
  R119 Plasma Desktop

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

AFFECTED FILES
  kcms/baloo/configwidget.ui

To: kishoreg, #baloo
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D19796: [Device Notifier] Restore Solid notification messages

2019-05-26 Thread Stefan Brüns
bruns requested changes to this revision.
bruns added a comment.
This revision now requires changes to proceed.


  This is just much to complicated, adding layer over layer does not help.
  
  Also, the second problem is unrelated to the change you mention - the 
"hasMessage" property could only be true for one DeviceItem, before and after.

INLINE COMMENTS

> DeviceItem.qml:50
>  
> -readonly property bool hasMessage: statusSource.lastUdi == udi && 
> statusSource.data[statusSource.last] ? true : false
> -readonly property var message: hasMessage ? 
> statusSource.data[statusSource.last] || ({}) : ({})
> +readonly property bool hasMessage: statusSource.trigger && 
> statusSource.lastMessages[udi]
> +readonly property var message: hasMessage ? 
> statusSource.lastMessages[udi] : ({})

trigger is essentially always true

> DeviceItem.qml:125
>  // otherwise the last message will show again when this device 
> reappears
> -statusSource.clearMessage()
> +statusSource.clearMessage(udi)
>  

the item should not mess with the internals of the statusSource

> FullRepresentation.qml:108
>  if (!plasmoid.expanded) {
> -statusSource.clearMessage()
> +statusSource.clearMessages()
>  }

This is IMHO wrong, if the plasmoid shows an error message and I happen to 
close it by clicking elsewhere, I can no longer see the error message, although 
it still applies

> FullRepresentation.qml:181
>  state: sdSource.data[udi] ? sdSource.data[udi].State : 0
> -isRoot: sdSource.data[udi]["File Path"] === "/"
> +isRoot: sdSource.data[udi] ? sdSource.data[udi]["File Path"] === 
> "/" : false
>  

This is an unrelated change, and fixes an error introduced in 
https://phabricator.kde.org/R120:d1a5507bd57aa74c18392354dcd43b65e15ee491

> devicenotifier.qml:218
> +// Source is formatted as follows: " notification"
> +var udi = sources[i].split(' ')[0]
> +if (data[sources[i]].error.length > 0) {

would be much simpler to use `udi = data[sources[i]].udi`

REPOSITORY
  R120 Plasma Workspace

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

To: thsurrel, #plasma, broulik, bruns
Cc: anthonyfieroni, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D21408: RFC: [Notifications] Better notification number alignment

2019-05-26 Thread Kai Uwe Broulik
broulik added a comment.


  In D21408#470122 , @ngraham wrote:
  
  > When there are 2 or digits, maybe the circle can expand to become 
pill-shaped
  
  
  The circle comes from Plasma theme, cannot transform it.

REPOSITORY
  R120 Plasma Workspace

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

To: broulik, #plasma, #vdg
Cc: ngraham, ndavis, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D21296: Add the option to configure the realm

2019-05-26 Thread Enrique Melendez
enriquem added a comment.


  In D21296#467329 , @jgrulich wrote:
  
  > Looks good.
  
  
  Thank you. Anything I need to do further? How is this supposed to be merged 
into the master branch? I don't think I have credentials to do so.

REPOSITORY
  R116 Plasma Network Management Applet

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

To: enriquem, jgrulich
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D21399: Compress color changes without a QTimer

2019-05-26 Thread Volker Krause
This revision was automatically updated to reflect the committed changes.
Closed by commit R169:e5a6ac33f787: Compress color changes without a QTimer 
(authored by vkrause).

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D21399?vs=58644&id=58679

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

AFFECTED FILES
  src/libkirigami/platformtheme.cpp

To: vkrause, apol
Cc: apol, plasma-devel, domson, dkardarakos, davidedmundson, mart, hein