marnanel: (party hat)Monument ([personal profile] marnanel) wrote,
@ 2011-01-28 03:18 pm UTC
Entry tags:code, pccu, pgo
It would be rather useful if there was a PermittedHours field in the .desktop file spec. It would list the hours during which the program could be run. That's not just for kids, it's also for me, in the manner of LeechBlock:

[Desktop Entry]
Version=1.0
Type=Application
Name=Some Program I Use For Work
Comment=But let's say I don't want to be tempted to spend all evening working on it
Exec=foo
PermittedHours=9-17

[Desktop Entry]
Version=1.0
Type=Application
Name=Aisleriot
Comment=And I definitely shouldn't be playing this during work hours
Exec=aisleriot
PermittedHours=0-9,17-23


I wonder how best we could do per-user settings, though.

My idea is to prevent launching the program during those hours. What would happen if the system saw the program was still running when the time had expired, I'm not sure. Maybe nothing, or maybe it would put up a notification telling me I have five minutes to quit or the process gets it.

I know nanny does some of this, but I wonder whether it's generally something that should exist in application launchers.

What do you think? Worth suggesting to them?


(Read 7 comments) - (Post a new comment)
(Flat) (Top-level comments only)

does it make sense in the .desktop file?


(Anonymous)
2011-01-28 08:45 pm UTC (link)
I've definitely wished for something like Leechblock for the desktop a times, but I'm not sure that doing it in the desktop file makes the most sense. First, that would complicate the process of getting it set compared to just having configuration somewhere since configuring it would come down to "menu editing" with user overrides of files in /usr/share/applications. Second, I'm not sure that it's obvious there is exactly one thing we'd want - allowed hours - it seems like something you'd want to play with. I don't want to be forbidden to use xchat during work hours, but maybe I'd like to be able to say that I can only spend 1 hour total in the day in xchat.

What I was idly thinking of was a GNOME 3 shell extension - that would allow a lot of flexibility - it could allow the program to be running but just not allow switching to it, etc. And it could just read config for the user that would refer to application ID (that is, the name of the desktop file).

- Owen

(Reply to this)  (Thread


marnanel: (party hat)

Re: does it make sense in the .desktop file?


[personal profile] marnanel
2011-01-28 09:03 pm UTC (link)
I like your take on it. Yes, that's a much better idea.

*goes off and thinks about it*

(Reply to this)  (Thread from start)  (Parent



(Read 7 comments) - (Post a new comment)
(Flat) (Top-level comments only)