You are not logged in.
I am running DWM alongside Tabbed for managing my terminal windows. I am currently trying to implement the ability to attach and detach windows to tabbed based on similar scripts here, here, here, and here. These scripts are running on BSPWM instead of DWM, but I figured that they are similar enough in this scenario.
The issue I am having with regards to attaching windows to active tabbed instances is that my cpu usage will spike to 50% and the entire machine will lag. The cpu usage drops right back down once I switch to a different tab but will return once the focus is brought back to the attached tab. I believe this is some issue with xdotool windowreparent but I am not familiar enough with it to know if I am doing anything wrong.
The other I am having is that when detaching windows, the window will detach fine, the window id will be different from the tabbed window id, but perform certain keybinds (ctrl+shift+enter) will still activate on the tabbed instance when the focus is on the detached window. Not sure why this could be as the window id is different, but perhaps tabbed is still keeping some sort of relation with the detached window.
Here is my script for attaching and detaching. I call this from the window that I wish to attach/detach:
#!/bin/sh
currid=$(xdotool getwindowfocus)
tabbedid=$(xdotool search --class tabbed | tail -n1)
# detach
if [ $currid = $tabbedid ]; then
child=$(xwininfo -id $currid -children | awk 'NR==7 {print $1}')
xdotool windowreparent $child $(xwininfo -root | awk '/Window id:/ {print $4}')
# attach
else
xdotool windowreparent $currid $tabbedid
fiAny help is greatly appreciated.
Use tmux, gnu-screen or a combination of dvtm and abduco. These tools are made for your purpose, dwm is not.
Offline
Use tmux, gnu-screen or a combination of dvtm and abduco. These tools are made for your purpose, dwm is not.
Both tmux and gnu-screen, from what I can tell, detach into the background and attach does not merge the terminal window with the other, at least in tmux. I would like detach to create a separate terminal window and attach to merge terminal windows into a single window with multiple tabs.