Set up wayland qr code scanner
This commit is contained in:
parent
6ea5de0e56
commit
a5e34b52d7
|
@ -37,11 +37,20 @@
|
||||||
| ${wl-copy}
|
| ${wl-copy}
|
||||||
${_ pkgs.libnotify} "Run ocr on area with output \"$(${wl-paste})\""
|
${_ pkgs.libnotify} "Run ocr on area with output \"$(${wl-paste})\""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
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})\""
|
||||||
|
'';
|
||||||
# }}}
|
# }}}
|
||||||
in
|
in
|
||||||
with pkgs; [
|
with pkgs; [
|
||||||
libnotify # Send notifications
|
libnotify # Send notifications
|
||||||
wl-ocr # Custom ocr script
|
wl-ocr # Custom ocr script
|
||||||
|
wl-qr # Custom qr scanner script
|
||||||
wl-clipboard # Clipboard manager
|
wl-clipboard # Clipboard manager
|
||||||
hyprpicker # Color picker
|
hyprpicker # Color picker
|
||||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast # Screenshot tool
|
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast # Screenshot tool
|
||||||
|
|
|
@ -87,9 +87,10 @@ bind = $mod, C, killactive, # Kill current
|
||||||
bind = $mod, F, fullscreen, # Fullscreen
|
bind = $mod, F, fullscreen, # Fullscreen
|
||||||
|
|
||||||
# Execute external things
|
# Execute external things
|
||||||
bind = $mod, return, exec, wezterm # Launch wezterm
|
bind = $mod, return, exec, wezterm
|
||||||
bind = $mod, T, exec, wl-ocr # Use ocr script
|
bind = $mod, T, exec, wl-ocr
|
||||||
bind = $mod SHIFT, T, exec, hyprpicker | wl-copy && libnotify "Copied color $(wp-paste)" # Color picker
|
bind = $mod SHIFT, T, exec, wl-qr
|
||||||
|
bind = $mod CONTROL, T, exec, hyprpicker | wl-copy && libnotify "Copied color $(wp-paste)" # Color picker
|
||||||
bind = $mod, Q, exec, wlogout # Show logout menu
|
bind = $mod, Q, exec, wlogout # Show logout menu
|
||||||
bind = $mod, L, exec, loginctl lock-session # Lock screen
|
bind = $mod, L, exec, loginctl lock-session # Lock screen
|
||||||
bind = $mod, P, exec, anyrun
|
bind = $mod, P, exec, anyrun
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
sops.secrets.porkbun_secrets.sopsFile = ./secrets.yaml;
|
sops.secrets.porkbun_secrets.sopsFile = ./secrets.yaml;
|
||||||
security.acme.acceptTerms = true;
|
security.acme.acceptTerms = true;
|
||||||
security.acme.defaults = {
|
security.acme.defaults = {
|
||||||
# TODO: update this email
|
email = "acme@moonythm.dev";
|
||||||
email = "rafaeladriel11@gmail.com";
|
|
||||||
dnsProvider = "porkbun";
|
dnsProvider = "porkbun";
|
||||||
environmentFile = config.sops.secrets.porkbun_secrets.path;
|
environmentFile = config.sops.secrets.porkbun_secrets.path;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue