Skip to content

Commit

Permalink
Replace xclip with xsel
Browse files Browse the repository at this point in the history
The latter might support large copies:
kfish/xsel#14
  • Loading branch information
Robert Kovacsics committed Sep 27, 2024
1 parent 53709b7 commit 67882b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions home/x11/i3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ let
guile = "${pkgs.guile}/bin/guile";
zsh = "${pkgs.zsh}/bin/zsh";
emacs = "${pkgs.emacs}/bin/emacs";
xclip = "${pkgs.xclip}/bin/xclip";
xsel = lib.getExe pkgs.xsel;
rofi = "${pkgs.rofi}/bin/rofi";
unipicker = "${pkgs.unipicker}/bin/unipicker";
xclip-both = pkgs.writeShellScript "xclip-both" ''
${xclip} -sel pri -f | ${xclip} -sel clip
${xsel} -i -p | ${xsel} -i -b
'';
pgrep = "${pkgs.procps}/bin/pgrep";

Expand Down
8 changes: 4 additions & 4 deletions modules/clipboard.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ in
options.clipboard = {
default-selection = mkOption {
type = types.listOf types.str;
default = [ "-selection" "clipboard" ];
default = [ "--clipboard" ];
description = ''
Argument to the copy/paste program for the default selection (e.g.
CTRL-C/CTRL-V).
'';
};
alternate-selection = mkOption {
type = types.listOf types.str;
default = [ "-selection" "primary" ];
default = [ "--primary" ];
description = ''
Argument to the copy/paste program for the default selection (e.g.
CTRL-C/CTRL-V).
'';
};
copy-command = mkOption {
type = types.listOf types.str;
default = [ "${pkgs.xclip}/bin/xclip" "-i" ];
default = [ (lib.getExe pkgs.xsel) "-i" ];
description = ''
Can be used to override the copy command for programs (e.g. tmux, vim).
For example use win32yank https://github.com/equalsraf/win32yank/ under
Expand All @@ -32,7 +32,7 @@ in
};
paste-command = mkOption {
type = types.listOf types.str;
default = [ "${pkgs.xclip}/bin/xclip" "-o" ];
default = [ (lib.getExe pkgs.xsel) "-o" ];
description = ''
Can be used to override the paste command for programs (e.g. vim). For
example use win32yank https://github.com/equalsraf/win32yank/ under
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-environment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

libnotify
xdotool
xclip
xsel
xorg.xev
xorg.xkbprint
xorg.xkbutils
Expand Down

0 comments on commit 67882b9

Please sign in to comment.