[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: IMG_3008.jpg (36 KB, 512x512)
36 KB
36 KB JPG
I never got into screen or tmux. I just ctrl+z and fg %#
>>
>>107801886
I like screen. It lets me leave long-running commands going over ssh without worrying about sleeping or rebooting the client machine, and then reattaching to them later. It's absolutely pointless for local terminals though, unless you're using a shit terminal that makes things like copy/paste or tab switching a pain.

Notably I often use screen in Termux on my phone when I'm using a physical keyboard. It doesn't have good keyboard controls for window switching or the ability to tile multiple windows. And copy/paste need a long press and finicky dragging to select, which is annoying when my hands are on the keyboard, so Screen's cut buffer is mostly superior.

Tmux is probably the better option today but I have muscle memory for Screen's shortcuts so I continue to use it.
>>
>>107801886
i use job control. I use tmux windows. I use vim splits. I use tmux splits. I use screen sessions.

>>107802165
>I have muscle memory for Screen's shortcuts
Aren't they basically the same? Just C-A/C-B
>>
>>107802183
>Aren't they basically the same?
The basics are but a lot of them are different. It's possible to change one to act more like the other with its config file though, I just haven't spent the time to do it yet.
>>
>>107801886
>It lets me leave long-running commands going over ssh
I just
ctrl+z
bg
disown %#
>vim splits
me too and also :ls :b etc
>>
>>107802165
>It's absolutely pointless for local terminals though
how do you solve opening a new terminal in the same path when you need a second window? With tmux I have a binding that sets the current default dir
>>
File: 1753093020380.gif (1.62 MB, 350x190)
1.62 MB
1.62 MB GIF
I still have an irssi process running under screen to an irc server with no users talking to this very day. There's no reason for it to exist other than sentimentality, but I won't take it down. Why should I?
>>
>>107801886
ssh wojak@10.0.1.2
screen
snapraid sync
>>
>>107801886
tmux is comfy
imo don't customize the hell out of it, just learn the basics to attach/detach, split, zoom, search
Here's the one setting in my .tmux.conf
>set -g mouse on

>>107802568
>ctrl+z
>bg
>disown %#
Well you're screwed if the shell closes prematurely
>>
>>107801886
vim is my terminal multiplexer
>>
>>107803869
Some terminals do that when you open a new tab.
>>
>>107801886
ctrl-a as prefix
ctrl-d to close a window
>>
>>107801886
>get used to i3 commands
>someone tells me to use tmux
>now whole bunch of commands i need to learn using a different meta key
No thanks niggers, im just gonna open a new terminal with a new ssh session. Im sick of learning.
>>
>>107802568
>ctrl+z
>bg
>disown %#
How do I reattach to this?
>>
>>107801886
How can tmux survive disconnects but other processes can't?
>>
>>107803869
the alacritty-cwd script when I was using that.
I just use ctrl-shift-n in wezterm, or open a tab or split.
>>
>>107803869
Forgot where I found this.
alacritty-cwd
#!/bin/bash
# Spawn a new instance of Alacritty using the CWD of the currently focused
# Alacritty process.
#
# This is useful in environment like i3 where terminals are opened using a
# key-combination while another terminal is already focused.
#
# If the script is run with a non-Alacritty window in focus or a non-compliant
# version of Alacritty, an instance will be spawned in the user's $HOME.

ACTIVE_WM_CLASS=$(xdotool getactivewindow getwindowclassname)
if [[ $ACTIVE_WM_CLASS == 'Alacritty' ]]
then
# Get PID. If _NET_WM_PID isn't set, bail.
PID=$(xdotool getactivewindow getwindowpid)
if [[ "$PID" == "" ]]
then
alacritty
fi
# Get first child of terminal
CHILD_PID=$(pgrep -oP $PID)
if [[ "$PID" == "" ]]
then
alacritty
fi
# Get current directory of child. The first child should be the shell.
SHELL_CWD=$(readlink -e /proc/${CHILD_PID}/cwd)
# Start alacritty with the working directory
alacritty --working-directory $SHELL_CWD
else
alacritty
fi



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.