KWin: Toggle grayscale KDE destop effect with script
I'm very new to KDE (running Kubuntu 18.10) and want to be able to quickly toggle grayscale through the terminal. I can make the script to do this but I don't know what to call to toggle the Desktop Effect.
Currently I'm using the extension described in this answer from this Github reop. Everything works great, the only problem is that I want to quickly switch to grayscale instead of going into System Settings
> Desktop Behavior
>Desktop Effects
and click Apply
. This is way to many steps for me to use more than once or twice a day.
My question is what command do I call to toggle this from the command line so I can write a script to do this?
I'm looking at the qdbus and trying something like:
qdbus org.kde.KWwin /Effects toggleEffect Grayscale
But nothing happens.
kubuntu kde kwin
add a comment |
I'm very new to KDE (running Kubuntu 18.10) and want to be able to quickly toggle grayscale through the terminal. I can make the script to do this but I don't know what to call to toggle the Desktop Effect.
Currently I'm using the extension described in this answer from this Github reop. Everything works great, the only problem is that I want to quickly switch to grayscale instead of going into System Settings
> Desktop Behavior
>Desktop Effects
and click Apply
. This is way to many steps for me to use more than once or twice a day.
My question is what command do I call to toggle this from the command line so I can write a script to do this?
I'm looking at the qdbus and trying something like:
qdbus org.kde.KWwin /Effects toggleEffect Grayscale
But nothing happens.
kubuntu kde kwin
Thanks, yes, that quirk was present but everything works fine once I applied the Desktop Effects with Grayscale off and on. I'm reading up on how KWin extension work so might get somewhere.
– fizzyh2o
Mar 19 at 6:23
When you toggle the Grayscale effect, changes are written to ~/.config/kwinrc in the [Plugins] section. Specifically, toggling changes kwin4_effect_grayscaleEnabled=false to kwin4_effect_grayscaleEnabled=true or vice versa. If you don't use the default GUI, but use the command line (or a script) usingkwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "false"
(or "true"), you need to reload KWin to effect the change.kwin_x11 --replace & disown
reloads KWin but may make the system unstable! There maybe a better way of which I'm not aware.
– DK Bose
Mar 19 at 10:20
In short, my experience of not using the default GUI isn't a happy one!
– DK Bose
Mar 19 at 10:21
There's alsoqdbus org.kde.KWin /KWin reconfigure
which I found here but haven't tried. zren is a KDE developer.
– DK Bose
Mar 19 at 10:27
add a comment |
I'm very new to KDE (running Kubuntu 18.10) and want to be able to quickly toggle grayscale through the terminal. I can make the script to do this but I don't know what to call to toggle the Desktop Effect.
Currently I'm using the extension described in this answer from this Github reop. Everything works great, the only problem is that I want to quickly switch to grayscale instead of going into System Settings
> Desktop Behavior
>Desktop Effects
and click Apply
. This is way to many steps for me to use more than once or twice a day.
My question is what command do I call to toggle this from the command line so I can write a script to do this?
I'm looking at the qdbus and trying something like:
qdbus org.kde.KWwin /Effects toggleEffect Grayscale
But nothing happens.
kubuntu kde kwin
I'm very new to KDE (running Kubuntu 18.10) and want to be able to quickly toggle grayscale through the terminal. I can make the script to do this but I don't know what to call to toggle the Desktop Effect.
Currently I'm using the extension described in this answer from this Github reop. Everything works great, the only problem is that I want to quickly switch to grayscale instead of going into System Settings
> Desktop Behavior
>Desktop Effects
and click Apply
. This is way to many steps for me to use more than once or twice a day.
My question is what command do I call to toggle this from the command line so I can write a script to do this?
I'm looking at the qdbus and trying something like:
qdbus org.kde.KWwin /Effects toggleEffect Grayscale
But nothing happens.
kubuntu kde kwin
kubuntu kde kwin
asked Mar 19 at 1:31
fizzyh2ofizzyh2o
1011
1011
Thanks, yes, that quirk was present but everything works fine once I applied the Desktop Effects with Grayscale off and on. I'm reading up on how KWin extension work so might get somewhere.
– fizzyh2o
Mar 19 at 6:23
When you toggle the Grayscale effect, changes are written to ~/.config/kwinrc in the [Plugins] section. Specifically, toggling changes kwin4_effect_grayscaleEnabled=false to kwin4_effect_grayscaleEnabled=true or vice versa. If you don't use the default GUI, but use the command line (or a script) usingkwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "false"
(or "true"), you need to reload KWin to effect the change.kwin_x11 --replace & disown
reloads KWin but may make the system unstable! There maybe a better way of which I'm not aware.
– DK Bose
Mar 19 at 10:20
In short, my experience of not using the default GUI isn't a happy one!
– DK Bose
Mar 19 at 10:21
There's alsoqdbus org.kde.KWin /KWin reconfigure
which I found here but haven't tried. zren is a KDE developer.
– DK Bose
Mar 19 at 10:27
add a comment |
Thanks, yes, that quirk was present but everything works fine once I applied the Desktop Effects with Grayscale off and on. I'm reading up on how KWin extension work so might get somewhere.
– fizzyh2o
Mar 19 at 6:23
When you toggle the Grayscale effect, changes are written to ~/.config/kwinrc in the [Plugins] section. Specifically, toggling changes kwin4_effect_grayscaleEnabled=false to kwin4_effect_grayscaleEnabled=true or vice versa. If you don't use the default GUI, but use the command line (or a script) usingkwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "false"
(or "true"), you need to reload KWin to effect the change.kwin_x11 --replace & disown
reloads KWin but may make the system unstable! There maybe a better way of which I'm not aware.
– DK Bose
Mar 19 at 10:20
In short, my experience of not using the default GUI isn't a happy one!
– DK Bose
Mar 19 at 10:21
There's alsoqdbus org.kde.KWin /KWin reconfigure
which I found here but haven't tried. zren is a KDE developer.
– DK Bose
Mar 19 at 10:27
Thanks, yes, that quirk was present but everything works fine once I applied the Desktop Effects with Grayscale off and on. I'm reading up on how KWin extension work so might get somewhere.
– fizzyh2o
Mar 19 at 6:23
Thanks, yes, that quirk was present but everything works fine once I applied the Desktop Effects with Grayscale off and on. I'm reading up on how KWin extension work so might get somewhere.
– fizzyh2o
Mar 19 at 6:23
When you toggle the Grayscale effect, changes are written to ~/.config/kwinrc in the [Plugins] section. Specifically, toggling changes kwin4_effect_grayscaleEnabled=false to kwin4_effect_grayscaleEnabled=true or vice versa. If you don't use the default GUI, but use the command line (or a script) using
kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "false"
(or "true"), you need to reload KWin to effect the change. kwin_x11 --replace & disown
reloads KWin but may make the system unstable! There maybe a better way of which I'm not aware.– DK Bose
Mar 19 at 10:20
When you toggle the Grayscale effect, changes are written to ~/.config/kwinrc in the [Plugins] section. Specifically, toggling changes kwin4_effect_grayscaleEnabled=false to kwin4_effect_grayscaleEnabled=true or vice versa. If you don't use the default GUI, but use the command line (or a script) using
kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "false"
(or "true"), you need to reload KWin to effect the change. kwin_x11 --replace & disown
reloads KWin but may make the system unstable! There maybe a better way of which I'm not aware.– DK Bose
Mar 19 at 10:20
In short, my experience of not using the default GUI isn't a happy one!
– DK Bose
Mar 19 at 10:21
In short, my experience of not using the default GUI isn't a happy one!
– DK Bose
Mar 19 at 10:21
There's also
qdbus org.kde.KWin /KWin reconfigure
which I found here but haven't tried. zren is a KDE developer.– DK Bose
Mar 19 at 10:27
There's also
qdbus org.kde.KWin /KWin reconfigure
which I found here but haven't tried. zren is a KDE developer.– DK Bose
Mar 19 at 10:27
add a comment |
0
active
oldest
votes
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1126786%2fkwin-toggle-grayscale-kde-destop-effect-with-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1126786%2fkwin-toggle-grayscale-kde-destop-effect-with-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Thanks, yes, that quirk was present but everything works fine once I applied the Desktop Effects with Grayscale off and on. I'm reading up on how KWin extension work so might get somewhere.
– fizzyh2o
Mar 19 at 6:23
When you toggle the Grayscale effect, changes are written to ~/.config/kwinrc in the [Plugins] section. Specifically, toggling changes kwin4_effect_grayscaleEnabled=false to kwin4_effect_grayscaleEnabled=true or vice versa. If you don't use the default GUI, but use the command line (or a script) using
kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "false"
(or "true"), you need to reload KWin to effect the change.kwin_x11 --replace & disown
reloads KWin but may make the system unstable! There maybe a better way of which I'm not aware.– DK Bose
Mar 19 at 10:20
In short, my experience of not using the default GUI isn't a happy one!
– DK Bose
Mar 19 at 10:21
There's also
qdbus org.kde.KWin /KWin reconfigure
which I found here but haven't tried. zren is a KDE developer.– DK Bose
Mar 19 at 10:27