Skip to content

Commit

Permalink
Disable middle mouse button click paste
Browse files Browse the repository at this point in the history
  • Loading branch information
asciimoth committed Oct 14, 2023
1 parent b5e9d43 commit 6660f5b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions machines/pcLexell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ in {
./dev.nix
./steam.nix
./ranger.nix
./desel.nix

#./ssh.nix
./ssh_client.nix
Expand Down
36 changes: 36 additions & 0 deletions machines/pcLexell/desel.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Infrastructure config by ASCIIMoth
#
# To the extent possible under law, the person who associated CC0 with
# this work has waived all copyright and related or neighboring rights
# to it.
#
# You should have received a copy of the CC0 legalcode along with this
# work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
{
config,
pkgs,
lib,
inputs,
...
}: let
constants = import ./constants.nix;
in {
home-manager.users."${constants.MainUser}".systemd.user.services.desel = {
Service = {
ExecStart = toString (pkgs.writeShellScript "desel" ''
while(true)
do
echo -n | ${pkgs.xsel}/bin/xsel -n -i
${pkgs.coreutils-full}/bin/sleep 0.5
done
'');
};
Unit = {
Description = "Disable xclip selection";
After = ["graphical-session.target"];
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
}

0 comments on commit 6660f5b

Please sign in to comment.