calendar in terminal (urxvt)
Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
calendar in terminal (urxvt)
$ x-terminal-emulator -e nano
it works fine but
$ x-terminal-emulator -e cal
doesn't.
Why is that?
it works fine but
$ x-terminal-emulator -e cal
doesn't.
Why is that?
Re: calendar in terminal (urxvt)
Because "cal" doesn't hold the terminal. Your second command runs the calendar and then immediately exits.
This should work if you are using a terminal emulator that respects the "-hold" option (urxvt does):
But you will have to kill the process to make it exit.
What are you trying to do? There may be a better way.
This should work if you are using a terminal emulator that respects the "-hold" option (urxvt does):
Code: Select all
x-terminal-emulator -hold -e cal
What are you trying to do? There may be a better way.
Re: calendar in terminal (urxvt)
trying to add
command "calendar" "x-terminal-emulator -e ncal -3"
command "procs" "x-terminal-emulator -e ps -ax"
to .cwmrc (swikee)
in case of ps hold is no option because I need access to terminal eg. to kill process.
command "calendar" "x-terminal-emulator -e ncal -3"
command "procs" "x-terminal-emulator -e ps -ax"
to .cwmrc (swikee)
in case of ps hold is no option because I need access to terminal eg. to kill process.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: calendar in terminal (urxvt)
write some wrappers and put them into /usr/local/bin, or a universal wrapper there, called "term-hold"
then do a
chmod a+x /usr/local/bin/term-hold
This accepts something like "term-hold ncal -3" and closes after enter has been pressed, e.g.
Code: Select all
#/bin/bash
x-terminal-emulator -e $@
read n
chmod a+x /usr/local/bin/term-hold
This accepts something like "term-hold ncal -3" and closes after enter has been pressed, e.g.
..gnutella..
Re: calendar in terminal (urxvt)
$ term-hold cal
still doesn't work. first terminal is on hold instead of the new one with 'cal'
still doesn't work. first terminal is on hold instead of the new one with 'cal'
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: calendar in terminal (urxvt)
Code: Select all
#/bin/bash
x-terminal-emulator -e bash -c "$@ && read"
..gnutella..
Re: calendar in terminal (urxvt)
Code: Select all
man xmessage
Code: Select all
ncal -h -3 | xmessage -file -
ps ax | xmessage -file -
Re: calendar in terminal (urxvt)
Also don't forget "xcal" :
And you might consider just starting htop (or top -- either one will hold the terminal open) in a terminal instead of "ps ax" :
I guess my point is not to get so hung up on one way of doing something that you ignore other options that might be easier or better.
And you might consider just starting htop (or top -- either one will hold the terminal open) in a terminal instead of "ps ax" :
Code: Select all
x-terminal-emulator -e top
Re: calendar in terminal (urxvt)
I left xcal for later, there is separate thread about it.
'top' already added.
'top' already added.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: calendar in terminal (urxvt)
so did that fucking work?machinebacon wrote:Code: Select all
#/bin/bash x-terminal-emulator -e bash -c "$@ && read"
..gnutella..
Re: calendar in terminal (urxvt)
for cal it's fucking perfect.so did that fucking work?
Re: calendar in terminal (urxvt)
Code: Select all
ncal -h -3 | xmessage -file -
anyway I can't figure out full syntax.