2023-05-24 03:17:09 +02:00
|
|
|
# Common wayland stuff
|
2024-04-01 05:57:56 +02:00
|
|
|
{ lib, pkgs, ... }: {
|
2023-05-28 02:00:10 +02:00
|
|
|
imports = [
|
2023-05-31 04:53:44 +02:00
|
|
|
./wlsunset.nix
|
2023-08-14 13:49:55 +02:00
|
|
|
./wlogout.nix
|
2024-01-04 20:35:10 +01:00
|
|
|
./waybar.nix
|
2023-08-22 17:24:04 +02:00
|
|
|
./anyrun.nix
|
2023-12-02 00:46:56 +01:00
|
|
|
|
|
|
|
../desktop
|
2023-05-28 02:00:10 +02:00
|
|
|
];
|
2023-05-28 00:40:40 +02:00
|
|
|
|
2024-02-29 11:49:36 +01:00
|
|
|
home.sessionVariables.NIXOS_OZONES_WL = "1";
|
|
|
|
services.swayosd.enable = true;
|
2023-12-12 14:32:06 +01:00
|
|
|
|
2023-05-24 03:17:09 +02:00
|
|
|
home.packages =
|
|
|
|
let
|
2023-12-12 14:32:06 +01:00
|
|
|
# {{{ OCR script
|
2023-05-24 03:17:09 +02:00
|
|
|
_ = lib.getExe;
|
|
|
|
|
2023-05-28 00:40:59 +02:00
|
|
|
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
|
|
|
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
|
|
|
|
2023-05-28 00:40:40 +02:00
|
|
|
# TODO: put this in it's own file perhaps?
|
2023-05-24 03:17:09 +02:00
|
|
|
# Taken from [here](https://github.com/fufexan/dotfiles/blob/3b0075fa7a5d38de13c8c32140c4b020b6b32761/home/wayland/default.nix#L14)
|
|
|
|
wl-ocr = pkgs.writeShellScriptBin "wl-ocr" ''
|
|
|
|
${_ pkgs.grim} -g "$(${_ pkgs.slurp})" -t ppm - \
|
|
|
|
| ${_ pkgs.tesseract5} - - \
|
2023-05-28 00:40:59 +02:00
|
|
|
| ${wl-copy}
|
|
|
|
${_ pkgs.libnotify} "Run ocr on area with output \"$(${wl-paste})\""
|
2023-05-24 03:17:09 +02:00
|
|
|
'';
|
2024-02-12 14:32:59 +01:00
|
|
|
|
|
|
|
wl-qr = pkgs.writeShellScriptBin "wl-qr" ''
|
|
|
|
${_ pkgs.grim} -g "$(${_ pkgs.slurp})" -t ppm - \
|
|
|
|
| ${pkgs.zbar}/bin/zbarimg --quiet - \
|
|
|
|
| awk '{sub(/^QR-Code:/, "", $1); print $1}' \
|
|
|
|
| ${wl-copy}
|
|
|
|
${_ pkgs.libnotify} "Scanned qr code on area with output \"$(${wl-paste})\""
|
|
|
|
'';
|
2023-11-11 06:55:14 +01:00
|
|
|
# }}}
|
2023-05-24 03:17:09 +02:00
|
|
|
in
|
|
|
|
with pkgs; [
|
2023-05-28 00:40:59 +02:00
|
|
|
libnotify # Send notifications
|
2023-05-24 03:17:09 +02:00
|
|
|
wl-ocr # Custom ocr script
|
2024-02-12 14:32:59 +01:00
|
|
|
wl-qr # Custom qr scanner script
|
2023-05-24 03:17:09 +02:00
|
|
|
wl-clipboard # Clipboard manager
|
2023-11-11 06:55:14 +01:00
|
|
|
hyprpicker # Color picker
|
2024-04-01 05:57:56 +02:00
|
|
|
grimblast # Screenshot tool
|
2023-05-24 03:17:09 +02:00
|
|
|
];
|
|
|
|
}
|