Re: screen session remember

2024-03-14 Thread Neal Fultz
M='\$(pwd)'!' ~/.screendb" > fi > fi > > the "WINDOW" variable is already do the `screen -Q number` thing and I use > the > external ".screendb" for storage. > > > d0=/home/myusr/prj/tool > d1=/home/myusr > d2=/tmp > d

Re: screen session remember

2024-03-13 Thread Neal Fultz
z/projects SNUM=`screen -Q number` SNUM=d${SNUM%% *} if [ -n "${!SNUM}" ] ; then cd "${!SNUM}" PROMPT_COMMAND="$PROMPT_COMMAND; sed -i 's!$SNUM=.*!$SNUM='\$(pwd)'!' ~/.bashrc" fi fi This could/should be made much more

Re: installation

2023-11-03 Thread Neal Fultz
I've used screen with scientific applications, mainly R and SAS, for many years - I haven't touched IDL since graduate school but screen will run IDL fine. I learned screen from https://web.archive.org/web/20040401203516/http://www.kuro5hin.org/story/2004/3/9/16838/14935 and it is still a good tut

Re: imgcat script not working in screen

2023-09-01 Thread Neal Fultz
I use similar scripts from google's hterm project; to the extent that hterm is "iterm2 compatible" maybe they will work for you. I adapted them to support screen for the terminal graphics device in R. IIRC the scripts have a tweak to work with screen's buffer size for escaped data. https://chromiu

Re: How to use groups from the command line (or at all)?

2023-05-30 Thread Neal Fultz
/929be520ad026011ac98420f4a56fa93dff06899 On Tue, May 30, 2023 at 7:04 PM Neal Fultz wrote: > > Once you have started a screen session, and then made a group inside > it, it will put you in the groups "windowlist" (C-A ") - at that point > you can start new shells the normal way (C-A c). To switch out of

Re: How to use groups from the command line (or at all)?

2023-05-30 Thread Neal Fultz
Once you have started a screen session, and then made a group inside it, it will put you in the groups "windowlist" (C-A ") - at that point you can start new shells the normal way (C-A c). To switch out of the group to the default one, either switch by number to a shell, or go into the windowlist a

Re: Support for OSC 52?

2022-09-08 Thread Neal Fultz
even when nested. On Thu, Sep 8, 2022 at 3:09 AM Nieko Maatjes wrote: > Hi Neal! > > On Fri 02 Sep 2022 at 07:55:24 -0700, Neal Fultz wrote: > > > In my Alacritty terminal (on Debian testing, with TERM=xterm-256color), > > > if I run the following, it puts "te

PATCH: OSC foreground and cursor color

2022-09-07 Thread Neal Fultz
I am trying to retrieve the background, foreground / cursor color through the appropriate xterm escape OSC 10/11/12. This will allow me to create terminal mode graphics in R with the current terminal theme. (Black is the default plotting color and you can't see it on a dark terminal, and it's bett

Re: Support for OSC 52?

2022-09-02 Thread Neal Fultz
I would recommend trying the helper functions from hterm: https://chromium.googlesource.com/apps/libapps/+/master/hterm/etc echo 123 | osc52 works fine with hterm -> ssh -> screen 4.08 You can read the script to see the extra escaping they do. Based on my experience with osc 1337 it also may ha

Re: Get current window title in bash

2022-02-09 Thread Neal Fultz
I took a try at this, but didn't find any ideal solution. Usually people set the window title from bash's prompt command, not the other way around. There is an xterm escape code for "reporting a window title" that screen appears to support. There's a SO post that implies that it's usually disable

Re: reading an environment variable from screen

2020-12-16 Thread Neal Fultz
> Thanks, this is even closer. z is being set, but it outputs something to > the screen which does go away after a few seconds. Any idea how to > stop it from doing that? I wonder if there's some code I could output > that turned off display output, did this command, then turn it back on > again

Re: reading an environment variable from screen

2020-12-16 Thread Neal Fultz
There is not a getenv command to match setenv iirc. There's a -Q flag for query - z=$(screen -S $STY -Q echo '$SSH_AUTH_SOCK') Getting the shell quoting correct will probably be pretty fiddly though. On Wed, Dec 16, 2020 at 7:09 AM Michael Grant wrote: > > When I reattach to screen, the SSH_AUT

Re: Re: Persistence of a window's title?

2020-05-19 Thread Neal Fultz
ng. > > One other line in my "~/.screenrc" file that may be relevant is: > > term screen-256color > > Any other pointers? > > -- Steve Ross > On 5/18/2020 4:37 PM, Neal Fultz wrote: > > I would recommend checking your $PROMPT_COMMAND - some shell >

Re: Persistence of a window's title?

2020-05-18 Thread Neal Fultz
I would recommend checking your $PROMPT_COMMAND - some shell configurations reset the Xterm title, and screen can pick that up as a window title or pass it through depending on your environment. See also https://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x395.html and https://unix.stackexchange.com/ques

Re: Using the stuff command in screen

2020-04-11 Thread Neal Fultz
Starting lynx and running "stuff o" from the screen command mode (^A :) brings up the options page for me. The problem might be higher up the stack? If you want to dig in further, strace should let you watch the keystrokes it as you are manually testing, I would strace both the screen process and

Re: Stacking screen commands addendum

2020-03-27 Thread Neal Fultz
Try the eval command On Fri, Mar 27, 2020, 9:17 AM dan d. wrote: > > I should have mention that I looked athe man page and a google without > finding an answer. > > Thanks. > > -- > XB > >

Re: setup screen session as an IDE on shell

2019-12-27 Thread Neal Fultz
I would try doing chdir build screen -t build tmux instead of doing `screen cd build` - the error message is correct: cd is not a program you can run, it's typically built in to the shell. It isn't clear to me what you are trying to do with the final step, I haven't ever used tmux insid

Re: Question

2019-07-09 Thread Neal Fultz
You can pass the command line to bash, for example something like this is fine: screen bash -c "echo 1 2 3 4 | pv -pL 1 | wc && sleep 5" Be careful about your quoting, though. On Tue, Jul 9, 2019 at 6:08 AM Андрей Резниченко wrote: > Dear all! > There is a question..a task..to run a comm

Re: Using screens with a graphics terminal

2019-03-29 Thread Neal Fultz
OSC 1337, which is supported by iTerm (mac) and hterm (chrome) kinda works already for screen [1], by passing an escape code to screen that causes it to ignore the image file and send it straight to the terminal. However, if you leave the window and come back, the image will be gone (because screen

Re: Screen Feature Request

2019-03-14 Thread Neal Fultz
You can do bind o focus prev to make Ctrl-a o do that. On Thu, Mar 14, 2019 at 10:57 AM John Haverlack wrote: > Greeting Screeners, > > Please forgive me if this is a duplicate feature request. I searched the > screen mailing list but did not find this feature. I'm running screen > version

Re: Could I contribute a patch to increase the default remote command buffer size?

2018-09-12 Thread Neal Fultz
super helpful. >> >> Regards. >> >> On Tue, Sep 11, 2018 at 11:33 AM 张小潘 wrote: >> >>> Hi Neal, >>> >>> Using 'readbuf' and 'paste' looks also very cool! >>> >>> On Tue, Sep 11, 2018 at 9:11 AM Neal Fult

Re: Is there a screen command to identify the current visible window number?

2018-09-12 Thread Neal Fultz
Also IIRC the number command gives the number of the process which has focus - if you use splits more than one may be visible, but only one has focus at a time. On Wed, Sep 12, 2018 at 5:52 AM FLJ wrote: > Hello Xiaopan, > > perhaps I misunderstood, but at least on recent version of Ubuntu, > R

Re: Could I contribute a patch to increase the default remote command buffer size?

2018-09-11 Thread Neal Fultz
I have a similar vim shortcut - for me, instead of using the stuff command, I write to /tmp/screen-exchange, and then use readbuf and paste screen commands. This also lets you send text containing multiple lines eg for python. On Tue, Sep 11, 2018 at 8:43 AM 张小潘 wrote: > Hi there, > > I have be

Re: #define TOPSTAT in Screen v.4.6.2 and newer

2018-05-25 Thread Neal Fultz
This is (IIRC) a run time option instead of compile time: hardstatus firstline region captions have a similar option also. On Fri, May 25, 2018 at 7:58 AM, Dun Peal wrote: > Hi folks, > > I used to #define TOPSTAT in config.h to set the status line to render > on the first line of the termin

Re: Help with keybinding and exec command

2017-12-07 Thread Neal Fultz
Can you provide more details? bind h exec /usr/bin/htop works for me to start htop and returns when I quit. On Thu, Dec 7, 2017 at 7:42 PM, dan d. wrote: > > Hello, > > Years ago I had a screenrc with a key binding that allowed using the exec > command. > > It would drop me to a sub-shell and

Re: Possible to put some kind of if then test in screenrc?

2017-11-14 Thread Neal Fultz
This should be possible if you write a backtick that prints only if CPU > 90; then you could combine that with %? : %?%1`%{.R.}%?% to conditionally change the color On Tue, Nov 14, 2017 at 4:41 AM, David Woodfall wrote: > I have a hardstatus backtick command that prints CPU %. I would like > t

Re: Several queries

2017-10-02 Thread Neal Fultz
On Mon, Oct 2, 2017 at 3:39 AM, Manas Thakur wrote: > > 3. Coming from tmux, miss the feature where I could zoom onto a tmux-pane > and unzoom back after some moments. Is there I way I could *expand a > splitted region* to occupy the whole width/height temporarily and > un-expand it back so that t

Re: How to programmatically open new screen window?

2016-12-23 Thread Neal Fultz
One good example of this type of program is the screen plugin for vim; it checks the $STY environment variable to determine whether it is already inside screen or not. If that variable is already set, any screen command you execute will apply to that session. On Fri, Dec 23, 2016 at 7:54 AM, Micha

Re: Switching windows with added command

2016-11-25 Thread Neal Fultz
I would recommend switching to the new window using it's title rather then it's number. Here is an example of binding C-a M to switch to mutt, then sending a y to make it open the mailbox list: bind m eval "select mutt" "stuff y" On Fri, Nov 25, 2016 at 11:36 AM, ed wrote: > On Fri, Nov 25, 2

Re: Sending Command Pipeline to a detached Screen

2016-11-22 Thread Neal Fultz
*screen -d -m -S Screen-Name* *screen -S Screen-Name -p 0 -X stuff "Command1; Command2 | Command3 && Command4"$(echo -ne '\015')* This first creates a screen session running a shell, most likely bash. Second, it sends some commands to the terminal input using stuff. In this case, you could append

Re: How to add environment variable value to hardstatus line

2015-03-11 Thread Neal Fultz
I do something similar, I use the following in my screenrc to set the title to current dir: setenv PROMPT_COMMAND 'echo -ne "\033_`pwd`\033\\"' Then you can use %t in the status bar or wherever. On Wed, Mar 11, 2015 at 2:04 PM, Shigehiko SASAKI wrote: > Hi Mario > > you can output escape sequ

Re: Scrollback and other commands don't work

2014-04-14 Thread Neal Fultz
You have the line for capturing the xterm title in your screenrc. Is that doing it? On Mon, Apr 14, 2014 at 12:42:53PM -0400, Alex wrote: > Hi all, I posted the message below about a week ago and received no > responses. I could really use some help here. Is there anyone who can help? > Are there