KWin: Toggle grayscale KDE destop effect with script












0















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.










share|improve this question























  • 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
















0















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.










share|improve this question























  • 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














0












0








0


0






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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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) 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



















  • 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

















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










0






active

oldest

votes












Your Answer








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
});


}
});














draft saved

draft discarded


















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
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

數位音樂下載

格利澤436b

When can things happen in Etherscan, such as the picture below?