pekwm_dialog(1)

πŸ’– pekwm_dialog πŸ’–

okay bestie, gather round, because this little cutie has a whole manual and we're gonna read it together. it's the pekwm_dialog page from the user manual, and honestly? it's giving "tiny app, huge personality." ✨


🌸 NAME 🌸

pekwm_dialog β€” a dialog application that was inspired by xmessage, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

pekwm_dialog [--display] message

πŸŽ€ DESCRIPTION πŸŽ€

so basically, pekwm_dialog pops up a simple little dialog for you. inside it there's a title, an image, some message text, and then a button for every single option you specified. and if you specified no options at all? it just gives you one lone Ok button. simple. iconic. πŸ’…

now here's the part that actually matters: the caller figures out which option got picked by checking the exit code of the application. the first option exits with status code 0, the next one exits with 1, and so on and so on down the line. first one gets a zero, everyone after that just counts up. πŸ”₯

and because of that exact behavior, the recommended play is to make ok your first option, then cancel as the second one, and then whatever further options you want after that. why? because it caters for the standard exit code 0 on ok, and then cancel would give the same exit code as on errors. that's the whole vibe β€” first option = 0 = ok, second option = 1 = also what errors give you. πŸ‘‘

here's a little illustration showing how the dialog elements lay out:

--------------------------------------------
| TITLE                                    |
--------------------------------------------
|                                          |
| Image if any is displayed here           |
|                                          |
--------------------------------------------
| Message text goes here                   |
|                                          |
--------------------------------------------
|           [Option1] [Option2]            |
--------------------------------------------

title up top, image in the middle, message text below that, buttons at the bottom. layout understood, we move. 🫢


✨ OPTIONS ✨

  • --help β€” shows you the help information. a lil "what is this" moment, we love her for it. 🌈
  • --display DISPLAY β€” connects to DISPLAY instead of whatever DISPLAY is set to in the environment. so you can point it somewhere else entirely, periodt. πŸ’œ
  • --geometry GEOMETRY β€” sets the geometry of the window. the default is 200x50, and it'll expand to fit the image size. so if you drop a big image in there, she grows. πŸ’€
  • --image IMAGE β€” path to the image you want to display. your moment to shine, bestie. πŸŽ€
  • --option STRING β€” an option title. and yes, multiple options are supported, so stack them up like it's a group chat. each one becomes its own button. πŸ¦‹
  • --title STRING β€” the title string. that's the thing chillin' in the top bar of the illustration up there. ⭐

lowkey reminder: the order you pass those --option flags in is the order the exit codes come out in. first option = 0, second = 1, and on we go. so plan your buttons accordingly, iykyk. πŸ™ˆ

and that's the whole page, bestie! this lil manual came out of the pekwm_dialog user manual, dated February 2021 ✨ β€” sending you off with all the love, all the vibes, and all the exit codes. mwah. πŸ’–πŸŒΈπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from