
Various KDE 1.-4. Improvements
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This is a set of scripts to popup a kdialog message about the currently compiling package(s).
ikgenlop.sh is the more advanced one. It uses the inotify API to watch emerge.log and inform you when something new happens.
It can be run from KDE autostart, or xinitrc or whatever, no need for cron.
The simpler one, kgenlop.sh script will just call genlop and pop up a message when it has something to say.
You can run it as a cron job e.g. like this:
[indent]*/5 * * * * /home/user/bin/kgenlop.sh 2>/dev/null[/indent]
You need app-portage/genlop and of course kde-base/kdialog installed.
The included Makefile will copy the script to ~/bin and set up a symlink in the KDE autostart folder (~/.kde4/Autostart). Do not run make if you don't want this.
9 years ago
1.6: mostly cosmetic changes, typos etc. changed calls to inotify to only report on rw changes, not only ro so other apps don't cause a storm of popups.
1.5: moved settings to ~/.ikgenloprc, create this file on first run, introduce a PID file and use it to detect multiple instances.
1.4: added a couple of tunables to steer verbosity. Thanks to Krog for testing.
1.3: many more features for iknotify to make it more annoying ;)
1.2: many changes, use a combination if inotify and tail to push status updates to kdialog. Please excuse the brute-force usage of awk and friends. Cleanup will follow later.
1.1: Added inotify based version after suggestion from user Krog.
1.0: first revision
9 years ago
1.6: mostly cosmetic changes, typos etc. changed calls to inotify to only report on rw changes, not only ro so other apps don't cause a storm of popups.
1.5: moved settings to ~/.ikgenloprc, create this file on first run, introduce a PID file and use it to detect multiple instances.
1.4: added a couple of tunables to steer verbosity. Thanks to Krog for testing.
1.3: many more features for iknotify to make it more annoying ;)
1.2: many changes, use a combination if inotify and tail to push status updates to kdialog. Please excuse the brute-force usage of awk and friends. Cleanup will follow later.
1.1: Added inotify based version after suggestion from user Krog.
1.0: first revision
Krog
10 years ago
ikgenlop-1.5.sh: line 232: USER_FREQ * : syntax error: operand expected (error token is "* ")
end.
1.4 seems unaffected
Report
nephros
10 years ago
Try replacing the affected line with this:
# back off a bit
FREQ=$(( USER_FREQ * FREQ_BACKOFF ))
Report
nephros
10 years ago
It should be ~/.kde4/Autostart instead of ~/.kde4/share/autostart.
That should be fixed in the 1.5 version, coming Real Soon Now...
Report
Krog
10 years ago
In the future release there will be other changes/improvements?
Report
nephros
10 years ago
Probably the next step should be an ebuild.
But before that it needs to be possible to be installed system-wide (right now I assume everything will be in $HOME) and I still need to figure out where to put stuff for that.
Report
Krog
10 years ago
also looking the script it seems that it will only work in :0 but sometimes I have more than one session active
Report
Krog
10 years ago
Report
Krog
10 years ago
Thanks for the new version :-)
I like to set FREQ=0.
Now, it could be good to filter what message to show... for example, the uninstall of the old package afer an upgrade is usless to show and adds too much messages.
Again thanks for your job :-)
Report
nephros
10 years ago
Here's 1.4 where you can configure to your hearts content!
Report
Krog
10 years ago
many messages from a single package BUT small packages that require just some couple of seconds (i'm on a core i7 cpu!) are emerged without message
tested WITHOUT -t ${FREQUENCY}:
it's compiling, but no messages until now and it compiled 3 packages now...
p.s. one of the two links is not working... the old one
Report
nephros
10 years ago
Dependency computation, configure, merge etc. and packages which don't compile anything are ignored.
I'll play around with it more, maybe I can find a better way.
Ant feedback is appreciated ;)
Report
GODLiKE64
10 years ago
Report
nephros
10 years ago
Removed the dead link, try the tarball.
Report
Krog
10 years ago
Report
Krog
10 years ago
Report
nephros
10 years ago
You can set FREQUENCY to a higher value (in seconds) if you want less messages.
If you want just one message per compile you can remove -t ${FREQUENCY} from the inotifywait line.
I find having multiple messages for very long compiles useful because it tells me how long I have to wait - but tastes are different :) ...
Thanks for your feedback.
Report
Krog
10 years ago
But maybe it's not good to automatically run this script continuously...
I wonder if it is not possible to make it automatic?
perhaps using "tail -F /var/log/emerge.log|grep emerge" as a source of information...
there was a plasmoid that was showing this information as a box... perhaps merging that thing with the notify system...
of course i'm not a programmer, it's just an idea :-)
Report
nephros
10 years ago
I don't see however how running tail | grep is any less "running continuously" than a cron job is. At least the latter is automatic and tunable.
I will try to cook up an inotify-based solution which avoids the cron thing and only fires a notification wen stuff is really happening.
Report
Krog
10 years ago
Report
nephros
10 years ago
Report