teach clipboard tool about wayland

This commit is contained in:
Cyryl Płotnicki 2020-07-30 19:40:05 +01:00
parent c1d418a117
commit ddd7f0f818
2 changed files with 9 additions and 1 deletions

View file

@ -16,6 +16,9 @@ in
home.sessionVariables = {
};
home.packages = with pkgs; [
wl-clipboard
];
wayland.windowManager.sway = {
enable = true;

View file

@ -1,2 +1,7 @@
#!/usr/bin/env bash
xclip -selection clipboard
read contents
if [[ -x `which wl-copy` ]]; then
echo "$contents" | wl-copy
else
echo "$contents" | xclip -selection clipboard
fi