From 5737cda04a74317ee4cc3bc794ec01378a446694 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 30 Jan 2024 18:15:32 +0700 Subject: [PATCH] Add warning to middle-click disable method in faq (#451) * faq: warn power consumption for middle-click paste disable using wl-paste * faq: middle-click paste disabling warning: explanation * not recursion, but a loop * Update _index.md --- pages/FAQ/_index.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pages/FAQ/_index.md b/pages/FAQ/_index.md index ba47c0e..a5a1eff 100644 --- a/pages/FAQ/_index.md +++ b/pages/FAQ/_index.md @@ -233,15 +233,21 @@ env = XDG_CURRENT_DESKTOP,Hyprland # How to disable middle-click paste? -The middle-click paste action pastes from a separate buffer (primary buffer) than what the regular clipboard uses (clipboard buffer). Since the primary buffer is unrelated to the clipboard buffer, it's easy to simply keep the primary buffer empty, allowing the middle-click action to retain the rest of its functionality without having anything to paste. Run the following command (in your config with `exec-once`, for example) to achieve this: - -`wl-paste -p --watch wl-copy -p ''` (`wl-paste -p --watch` watches for changes to the primary buffer, `wl-copy -p ''` clears the primary buffer) - - -Alternatively, you can simply intercept the middle-click action all together, via hyprland binds for example. The drawbacks to this solution are that 1. it disables the rest of the functionality of the middle-click action, such as auto scroll, closing browser tabs, etc., and 2. many applications (such as kitty) manually intercept the middle-click events and bind them to paste from the primary buffer themselves, bypassing the solution altogether. For this solution, add this bind to your config: +You can simply intercept the middle-click action all together, via hyprland binds for example. The drawbacks to this solution are that 1. it disables the rest of the functionality of the middle-click action, such as auto scroll, closing browser tabs, etc., and 2. many applications (such as kitty) manually intercept the middle-click events and bind them to paste from the primary buffer themselves, bypassing the solution altogether. For this solution, add this bind to your config: `bind = , mouse:274, exec, ;`. Note that the exact bindcode may vary, so you may want to check it with `wev` first. +
+ Alternative method using wl-paste (warning: major power consumption) + + The middle-click paste action pastes from a separate buffer (primary buffer) than what the regular clipboard uses (clipboard buffer). Since the primary buffer is unrelated to the clipboard buffer, it's easy to simply keep the primary buffer empty, allowing the middle-click action to retain the rest of its functionality without having anything to paste. Run the following command (in your config with `exec-once`, for example) to achieve this: + + `wl-paste -p --watch wl-copy -p ''` (`wl-paste -p --watch` watches for changes to the primary buffer, `wl-copy -p ''` clears the primary buffer) + + **As you can see, however, this creates an endless loop (found copied text -> copy -> found copied text...). Therefore this method is not recommended.** + +
+ # How do I make Hyprland draw as little power as possible on my laptop? **_Useful Optimizations_**: