1

I have an issue in which I was unable to find a solution till now. While I use several scripts to launch specific commands through URXvt:

#!/bin/sh

urxvt -geometry 40x20+990+30 -w 0 -b 0 -e nmtui

when I try to launch the same window with cal command I get.. no urxvt window!

Is there a way to do it?

1 Answers1

1

urxvt has a -hold|+hold option to “not immediately destroy its window when the program executed within it exits” (see man urxvt):

urxvt -geometry 40x20+990+30 -w 0 -b 0 -hold -e cal

A different approach would be to spawn a shell (which doesn’t just exit) to keep the window open:

urxvt -geometry 40x20+990+30 -w 0 -b 0 -e 'cal;sh'
dessert
  • 39,392
  • 12
  • 115
  • 163
  • The first command seems to do the trick (the second gives no output/terminal window), however I cannot close the terminal window afterwards unless I kill it (in i3wm its shift+mod+Q) – Giorgos_Kappa Feb 09 '19 at 11:55
  • @Giorgos_Kappa Kudos for using a WM as great as i3! I changed the second command, please try now. As for the first: Yes, that’s expected. How did you want to close the window? – dessert Feb 09 '19 at 13:04
  • thank you for your time and effort! The second command is still not working but I am fine with the first one. In short I am using urxvt as a popup-window for some actions in polybar. This one in example is launched uppon left click on the time text and creates a simple dialog window with the current month calendar. I don't want to use gsimplecal or any other gtk derivative so what I try to do is to close this window without killing it xD – Giorgos_Kappa Feb 09 '19 at 18:28
  • @Giorgos_Kappa Oh, that’s a peculiar use case – I think I’d use `osd_cat` from the `xosd-bin` for a thing like that, or maybe `yad`/`zenity` – *or* kill the terminal window from the script after some time. – dessert Feb 10 '19 at 07:41