Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

Belka BelkaDev

🌴
On vacation
View GitHub Profile
@BelkaDev
BelkaDev / attach.sh
Last active Apr 18, 2020
dock a terminal (or any window) to any parent window under x environement
View attach.sh
#!/bin/bash
# requires: bspwm,xdotool,wmctrl,wmutils...
# usage: attach.sh [n]
# n is the size of the docked window, 1 equals 100% the parent size, 2 is 50% and so on..
unset x y w h
# kill old instance of the script to save resources: only one terminal allowed
script_name=${BASH_SOURCE[0]}
for pid in $(pidof -x $script_name); do
if [ $pid != $$ ]; then
You can’t perform that action at this time.