Announcement

Collapse
No announcement yet.

Shortcuts to enable/disable desktop effect

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Shortcuts to enable/disable desktop effect

    I need to be able to enable/disable a specific desktop effect using keyboard shortcuts.
    Specifically I would like to switch between the "Looking Glass" and "Zoom" options
    Is there any way to do it?
    Click image for larger version

Name:	7IG1KPV.png
Views:	1
Size:	162.2 KB
ID:	649553

    #2
    Er... sorry, misunderstood question, gave wrong answer :·/

    Now if it can't be done directly, you could do it indirectly :·)
    That is, make two scripts that replace your kwinrc ( probably in ~/.config/ ) with the one of your choice... (call those with shortcuts)... and restart kwin. :·(
    Which basically means restarting Plasma... not something I would want to try.

    Thing is, my guess is, it can't be done without restarting Plasma.
    Sorry I can't be of more help, but since I'd answered (wrongly) anyway...
    Last edited by Don B. Cilly; Dec 03, 2019, 03:20 AM.

    Comment


      #3
      What I want is to achieve a similar operation to what Microsoft Windows offers.
      In Microsoft Windows I use the following keyboard shortcuts to manipulate the magnifying glass:
      Ctrl + + for zoom in
      Ctrl + - to zoom out
      Ctrl + alt + F for full screen mode
      Ctrl + alt + L for lens mode

      The first two I managed to configure, the problem is the last two.

      I understand that I can make a script and execute it using a shortcut, but:
      What is the command to change from "Looking Glass" to "Zoom"?
      And from "Zoom" to "Looking Glass"?

      Comment


        #4
        Well, lens and full screen seem to be separate effects.
        As you say, Looking Glass and Zoom.
        Zoom has a few more options than the others (including Magnifier that is), but not what you want:

        Click image for larger version

Name:	zooms.png
Views:	1
Size:	21.6 KB
ID:	644442

        So, what I was suggesting was, copy your kwinrc to kwinrc_1 when you have it in one mode (that you're satisfied with), and to kwinrc_2 when in the other.
        While you're at it copy it to kwinrc.bak just in case :·)
        Then you can
        cp kwinrc_1 kwinrc
        (or kwinrc_2) and assign shortcuts to those commands
        then... restart Plasma.

        Which is probably not a good idea, as restarting Plasma is not something you'd want to do unless you had serious problems with it.
        Just to say, I don't think there is a simple way to do it.
        Which doesn't mean someone else who actually knows something about this won't know of one.

        Again, sorry I answered this, misunderstood question, gave wrong answer :·/, and I guess I'm just digging myself further down the hole... :·)

        Comment


          #5
          I made a script, which does what you say, exchange two configuration files, one for each case.

          Code:
          #!/bin/bash
          
          originalConfigFile="/home/$USER/.config/kwinrc"
          auxiliarConfigFile="/home/$USER/.scripts/kwinrc"
          temporalConfigFile="/home/$USER/.scripts/kwinrc.tmp"
          
          if [ ! -e $originalConfigFile ]; then
            echo "ERROR: File does not exist $originalConfigFile"
            exit 1
          fi
          if [ ! -e $auxiliarConfigFile ]; then
            echo "ERROR: File does not exist $auxiliarConfigFile"
            exit 1
          fi
          
          mv $originalConfigFile $temporalConfigFile
          mv $auxiliarConfigFile $originalConfigFile
          mv $temporalConfigFile $auxiliarConfigFile
          
          kwin_x11 --replace & disown
          
          exit 0
          It seems to work fine, although it is uncomfortable to restart Kwin every time.
          It is a very inefficient solution, it seems to me that Linux in general should improve its accessibility features, they are very limited (at least for my needs)
          Even so, I will be aware of new responses in this thread

          Comment


            #6
            Now, contrary to my cilly suggestions in this thread, which were not any good... what might be good (for your purpose, and in general) could be:
            Sign up on https://forum.kde.org/ and ask your question there. It's worth signing up anyway - if you like KDE.

            If they don't have a solution - they might - chances are someone there can actually modify the whole looking-glass/magnifier effect to make it better.

            Comment

            Working...
            X