Adding hotkey with custom command

I have got dymoprint working well and attached to a hotkey.

[Ctrl] + [Screenprint] using manjaro Keyboard shortcuts.

zx81@events zx81]$ dymoprint --help
usage: dymoprint [-h] [-f] [-s {r,b,i,n}] [-u [U]] [-v] [-qr]
[-c {code39,code128,ean,ean13,ean8,gs1,gtin,isbn,isbn10,isbn13,issn,jan,pzn,upc,upca}]
[-p PICTURE] [-m M] [-pdb]
text [text …]

Linux Software to print with LabelManager PnP from Dymo written in Python
Version: 0.3.4 (2016-03-14)

positional arguments:
text Text Parameter, each parameter gives a new line

optional arguments:
-h, --help show this help message and exit
-f Draw frame around the text, more arguments for thicker
frame
-s {r,b,i,n} Set fonts style (regular,bold,italic,narrow)
-u [U] Set user font, overrides “-s” parameter
-v Preview label, do not print
-qr Printing the first text parameter as QR-code
-c {code39,code128,ean,ean13,ean8,gs1,gtin,isbn,isbn10,isbn13,issn,jan,pzn,upc,upca}
Printing the first text parameter as barcode
-p PICTURE, --picture PICTURE
Print the specified picture
-m M Override margin (default is 56*2)
-pdb Run pdb if an exception occurs

my problem is this… running dymoprint -f -sb $REQTEXTSTRING?

Is there a way to have a popup requester box from this hotkey so any user can just add a text line? then return to print via a exampleprint.sh bash script or any other method?

Not everyone here likes command line and asfar as I know this is the only way to print labels from a Linux machine?

Hi! Check out program called zenity. This piece of software will help you making pop up GUI dialogs in conjunction with bash Just don’t forget to read man zenity thoroughly. Peace!

The zenity suggested by homomodern is one of the choices, which uses the GTK library. And you can also use kdialog, which uses the QT library. Both of them can meet your requirement.

1 Like

Thankyou.

Zenity is pretty interesting I didn’t know you could do this.

#!/bin/bash

inputStr=$(zenity --width 530 --height 220 --entry --title=Dymoprint --text=“Label:”)
dymoprint -f -sb $inputStr
echo "out " $inputStr
#exit 0

is what I came up with.

Now i’m wondering how to add the other print functions.

Mostly r, b (bold), i, n, u (underline)
Create QR and Barcodes
I’ll get there in time but a little assist would be greatly appreciated.

usage: dymoprint [-h] [-f] [-s {r,b,i,n}] [-u [U]] [-v] [-qr]
[-c {code39,code128,ean,ean13,ean8,gs1,gtin,isbn,isbn10,isbn13,issn,jan,pzn,upc,upca}]
[-p PICTURE] [-m M] [-pdb]
text [text …]

Linux Software to print with LabelManager PnP from Dymo written in Python Version: 0.3.4 (2016-03-14)

positional arguments:
text Text Parameter, each parameter gives a new line

optional arguments:
-h, --help show this help message and exit
-f Draw frame around the text, more arguments for thicker
frame
-s {r,b,i,n} Set fonts style (regular,bold,italic,narrow)
-u [U] Set user font, overrides “-s” parameter
-v (not needed) Preview label, do not print (could this be done with MagicimageK?)

-qr Printing the first text parameter as QR-code
-c {code39,code128,ean,ean13,ean8,gs1,gtin,isbn,isbn10,isbn13,issn,jan,pzn,upc,upca} Printing the first text parameter as barcode

-p PICTURE, --picture PICTURE
Print the specified picture
-m M Override margin (default is 56*2)
-pdb Run pdb if an exception occurs