2022-01-12 00:20:57 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
(lib.mkIf (config.riley.gui) {
|
|
|
|
|
|
|
|
# Add some shell scripts that abstract away the
|
|
|
|
# horrible reality that the clipboard is managed by
|
|
|
|
# the display server.
|
|
|
|
users.users."riley".packages = with pkgs; [
|
|
|
|
|
|
|
|
(writeShellApplication {
|
2022-05-15 16:11:41 +02:00
|
|
|
name = "c";
|
2022-01-12 00:20:57 +01:00
|
|
|
runtimeInputs = [ xclip ];
|
|
|
|
text = "xclip -sel clip -i";
|
|
|
|
})
|
|
|
|
|
|
|
|
(writeShellApplication {
|
2022-05-15 16:11:41 +02:00
|
|
|
name = "p";
|
2022-01-12 00:20:57 +01:00
|
|
|
runtimeInputs = [ xclip ];
|
|
|
|
text = "xclip -sel clip -o";
|
|
|
|
})
|
|
|
|
|
2022-05-15 16:11:41 +02:00
|
|
|
(writeShellApplication {
|
|
|
|
name = "sc";
|
|
|
|
runtimeInputs = [ xclip scrot ];
|
|
|
|
text = ''
|
|
|
|
scrot -zso /tmp/sc.png
|
|
|
|
xclip -t "image/png" -sel clip -i < /tmp/sc.png
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
|
2022-01-12 00:20:57 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
})
|