feat: turn off KDE's middle-click paste
Inside a Chromium application the flag settles this on its own - with autoscroll on, Blink stops pasting the primary selection. Everywhere else on the desktop middle click goes on pasting, which is the thing this whole program exists to get away from. KWin has a switch for it, on Wayland, where the paste is a protocol the compositor either offers or does not: EnablePrimarySelection in kwinrc. Written with kwriteconfig, the way System Settings would, because kwinrc has a cascade behind it. What the key said before goes in the ledger, so disable puts it back - and a key that already said false is left alone and not recorded, so a paste the user switched off themselves is never switched back on. X11 has no such switch and nothing is written there.
This commit is contained in:
1 parent
0c4e7645d0
commit
004094ef78
11 files changed
+259
-4
No files matched your search
@@ -194,6 +194,18 @@ mca_ui_status() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# Not an ON/OFF like the rows around it: what is being reported is the state
|
||||
# of the paste, not of a switch, and off is the state this program is after.
|
||||
if mca_kde_available; then
|
||||
if [[ "$(mca_kde_read)" == false ]]; then
|
||||
_mca_row "$(mca_msg "Middle-click paste")" \
|
||||
"${MCA_C_GREEN}$(mca_msg "off")${MCA_C_RESET}"
|
||||
else
|
||||
_mca_row "$(mca_msg "Middle-click paste")" \
|
||||
"${MCA_C_DIM}$(mca_msg "on")${MCA_C_RESET}"
|
||||
fi
|
||||
fi
|
||||
|
||||
_mca_row "$(mca_msg "Last applied")" "$(mca_time_ago "$last")"
|
||||
|
||||
if [[ $CFG_ENABLED == yes ]]; then
|
||||
@@ -216,6 +228,7 @@ MCA_SETTINGS=(
|
||||
"PatchAutostart|bool|yes|Programs that start themselves at login"
|
||||
"PatchSteam|bool|yes|Steam"
|
||||
"PatchSpotify|bool|yes|Spotify"
|
||||
"DisablePaste|bool|yes|Turn off KDE's middle-click paste"
|
||||
"WatchNewApps|bool|yes|Apply to newly installed applications"
|
||||
"ExtraFlags|text||Additional Chromium arguments"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user