
Nightmode
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
Nightmode is a kwin plugin that makes the entire screen darker. The reason behind this for when you are using the laptop at night, either outside or in bed - and find that even on the darkest screen backlight level the screen is way too bright.
The plugin can be turned on or off by a simple key combination, and the amount of dimming can be configured.
10 years ago
0.2: Added icon made by srog.
0.2: Ubuntu package by srog
10 years ago
0.2: Added icon made by srog.
0.2: Ubuntu package by srog
bugsbane
5 years ago
CMake Error at CMakeLists.txt:11 (include):
include could not find load file:
KDE4Defaults
CMake Error at CMakeLists.txt:12 (include):
include could not find load file:
MacroLibrary
CMake Error at CMakeLists.txt:17 (kde4_add_plugin):
Unknown CMake command "kde4_add_plugin".
-- Configuring incomplete, errors occurred!
Is there any way to use this beautiful plugin any more?
Report
srog
4 years ago
This KWin effect uses the KDE4 but I don't think that it works with the KF5 - without the developers love.
Report
srog
4 years ago
This KWin effect uses the KDE4 but I don't think that it works with the KF5 - without the developers love.
Report
dantefff
6 years ago
Is there anytnig I can do to debug it? Can I force it to load in the all effects tab?
I am in solydk (debian based) and kde 4.12.1
Report
bugsbane
8 years ago
/home/user/Apps/nightmode/nightmode.cpp: In member function ‘virtual void NightmodeEffect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&)’:
/home/user/Apps/nightmode/nightmode.cpp:77:49: error: invalid use of member function (did you forget the ‘()’ ?)
make[2]: *** [CMakeFiles/kwin4_effect_nightmode.dir/nightmode.o] Error 1
make[1]: *** [CMakeFiles/kwin4_effect_nightmode.dir/all] Error 2
make: *** [all] Error 2
Man I wish this would just get added in KDE by default. I mean we have the explosion effect that I've never seen anyone use and but not this... :|
Report
mrm0j0risin
7 years ago
data.brightness *= (m_brightness / 100.0);
should be changed to:
data.setBrightness(data.brightness() * (m_brightness / 100.0));
and the plugin will compile and work properly with KDE 4.10, but as I don't have the necessary qualifications, someone who knows the platform must verify my assumptions.
Report
srog
7 years ago
Thank you of the fix.
Report
bugsbane
8 years ago
Any chance the darkest setting could be made darker? Ideally the slider would go from 5% (yes, barely visible) brightness to 95%. I don't know the numbers, but right now it looks like it goes from about 25% to 90%
I tried to poke around in the code and find it myself, but having the coding experience of a walrus, it generally fell down in a blubbery heap.
Anyway, thanks for creating this must have, keeps-my-kids-asleep-and-my-spouse-happy plugin. It rocks! :D
Report
bugsbane
8 years ago
Thanks again for this very simple, but incredibly handy effect!
Report
bugsbane
8 years ago
git clone git://anongit.kde.org/scratch/davidedmundson/nightmode
Report
acidrums4
9 years ago
I tried compiling it again, but I get the following:
[ 0%] Built target kcm_kwin4_effect_nightmode_automoc
[ 25%] Building CXX object CMakeFiles/kcm_kwin4_effect_nightmode.dir/nightmode_config.o
/home/mp/Escritorio/nightmode/nightmode_config.cpp: In member function 'virtual void KWin::NightmodeConfig::load()':
/home/mp/Escritorio/nightmode/nightmode_config.cpp:88: error: variable 'KConfigGroup conf' has initializer but incomplete type
/home/mp/Escritorio/nightmode/nightmode_config.cpp:88: error: invalid use of incomplete type 'struct KConfigGroup'
/usr/include/kconfigbase.h:32: error: forward declaration of 'struct KConfigGroup'
/home/mp/Escritorio/nightmode/nightmode_config.cpp: In member function 'virtual void KWin::NightmodeConfig::save()':
/home/mp/Escritorio/nightmode/nightmode_config.cpp:99: error: variable 'KConfigGroup conf' has initializer but incomplete type
/home/mp/Escritorio/nightmode/nightmode_config.cpp:99: error: invalid use of incomplete type 'struct KConfigGroup'
/usr/include/kconfigbase.h:32: error: forward declaration of 'struct KConfigGroup'
make[2]: *** [CMakeFiles/kcm_kwin4_effect_nightmode.dir/nightmode_config.o] Error 1
make[1]: *** [CMakeFiles/kcm_kwin4_effect_nightmode.dir/all] Error 2
make: *** [all] Error 2
I don't know much about C++, but for my ignorance seems that the API of KDELibs changed (at least, for 'KConfigGroup')...
Report
DavidEdmundson
9 years ago
Try this version
git clone git://anongit.kde.org/scratch/davidedmundson/nightmode
Let me know if it fixes it/is still broken.
Report
bugsbane
9 years ago
I am getting a "The following plugins can't be activated: Darken screen for night viewing" popup. This is odd as I've used Nightmode on Kubuntu+FGLRX on this machine before.
Can I do anything to get you more useful information? Night mode is such a crucial plugin to me. I still don't understand how the explode plugin is included by default but not this...
Report
DavidEdmundson
9 years ago
I'm very busy at the moment, but remind me constantly (you can see my email at the top of any of the source files) and I'll get round to it.
Alternately you can possibly post on the kwin bugzilla page saying "you've broken this plugin". It's a bit rude, but I think technically valid. KDE Libs isn't allowed to break compatibility within a 4.x series.
Report
dcimafonte
8 years ago
~/.xsession-errors
Quote:OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 945GM x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 8.0.4
OpenGL shading language version string: 1.20
Driver: Intel
GPU class: i915/i945
OpenGL version: 1.4
GLSL version: 1.20
Mesa version: 8.0.4
X server version: 1.11.3
Linux kernel version: 3.2
Direct rendering: yes
Requires strict binding: yes
GLSL shaders: limited
Texture NPOT support: yes
kwin(2769) KWin::EffectsHandlerImpl::loadEffect: Effect "kwin4_effect_nightmode" requires unsupported API version 157
Report
acidrums4
9 years ago
Report
avlas
9 years ago
Report
bugsbane
9 years ago
I am getting a "The following plugins can't be activated: Darken screen for night viewing" popup. This is odd as I've used Nightmode on Kubuntu+FGLRX on this machine before.
Can I do anything to get you more useful information? Night mode is such a crucial plugin to me. I still don't understand how the explode plugin is included by default but not this...
Report
bugsbane
9 years ago
Report
DavidEdmundson
9 years ago
I'm on Kubuntu too. Will report it
Report
cmoh
10 years ago
However, the source code link is not working now. Also the link from kde-apps.org is broken.
What happened? Can you put it back?
Report
DavidEdmundson
10 years ago
Sorry! Fixed now.
Report
cmoh
10 years ago
For reference, here is the gentoo bug report containing the Gentoo ebuild responsible for bringing your nice plugin on my machines.
http://bugs.gentoo.org/show_bug.cgi?id=317291
Report
tomsdale
10 years ago
Your plugin stopped working when I upgraded to KDE 4.5.X. It was running fine on 4.4.X.
Is this just my configuration or is there an incompatibility with 4.5?
I totally love your plugin. I have an external screen attached and while I can control the laptop with software your plugin allows me to just 'dim it down' at night which is so much easier on the eyes.
Report
DavidEdmundson
10 years ago
Report