more scripts
This commit is contained in:
parent
20c1d5601b
commit
542d57342e
1 changed files with 21 additions and 3 deletions
|
@ -118,9 +118,9 @@ in {
|
||||||
|
|
||||||
action=$(${pkgs.libnotify}/bin/notify-send "Screenshot Captured" \
|
action=$(${pkgs.libnotify}/bin/notify-send "Screenshot Captured" \
|
||||||
--app-name="Screenshot" \
|
--app-name="Screenshot" \
|
||||||
--urgency=normal \
|
--urgency="normal" \
|
||||||
--action="default=Edit Image" \
|
--action="default=Edit Image" \
|
||||||
--icon "$temp_file" \
|
--icon="$temp_file" \
|
||||||
"Click to annotate image")
|
"Click to annotate image")
|
||||||
|
|
||||||
case "$action" in
|
case "$action" in
|
||||||
|
@ -130,7 +130,23 @@ in {
|
||||||
esac
|
esac
|
||||||
'';
|
'';
|
||||||
pickerScript = pkgs.writeShellScript "picker" ''
|
pickerScript = pkgs.writeShellScript "picker" ''
|
||||||
${lib.getExe pkgs.zenity} --color-selection --color $(${lib.getExe pkgs.hyprpicker})
|
${lib.getExe pkgs.hyprpicker} --render-inactive --format hex | sed -z 's/\n//g' | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t text/plain
|
||||||
|
|
||||||
|
${pkgs.libnotify}/bin/notify-send "Color Captured" \
|
||||||
|
--app-name="Picker" \
|
||||||
|
--urgency="normal" \
|
||||||
|
"Color copied to clipboard"
|
||||||
|
'';
|
||||||
|
ocrScript = pkgs.writeShellScript "ocr" ''
|
||||||
|
output=$(${lib.getExe pkgs.grimblast} --freeze save area - | ${lib.getExe pkgs.tesseract5} - -)
|
||||||
|
|
||||||
|
echo "$output" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t text/plain
|
||||||
|
|
||||||
|
${pkgs.libnotify}/bin/notify-send "OCR Captured" \
|
||||||
|
--app-name="OCR" \
|
||||||
|
--urgency="normal" \
|
||||||
|
--icon="text-x-generic-symbolic" \
|
||||||
|
"Text copied to clipboard"
|
||||||
'';
|
'';
|
||||||
in [
|
in [
|
||||||
"$mod, Q, killactive, "
|
"$mod, Q, killactive, "
|
||||||
|
@ -178,6 +194,8 @@ in {
|
||||||
"$mod SHIFT ALT, S, exec, ${screenshotScript} window"
|
"$mod SHIFT ALT, S, exec, ${screenshotScript} window"
|
||||||
# pick color
|
# pick color
|
||||||
"$mod SHIFT, C, exec, ${pickerScript}"
|
"$mod SHIFT, C, exec, ${pickerScript}"
|
||||||
|
# ocr
|
||||||
|
"$mod SHIFT, T, exec, ${ocrScript}"
|
||||||
|
|
||||||
", XF86LaunchA, exec, ${screenshotScript} area"
|
", XF86LaunchA, exec, ${screenshotScript} area"
|
||||||
", XF86LaunchB, exec, ${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20"
|
", XF86LaunchB, exec, ${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue