Software recommendation - Desktop Customization & Workflow

Users browsing this thread: 1 Guest(s)
z3bra
Grey Hair Nixers
(05-05-2020, 06:54 PM)phillbush Wrote: I want a window manager that can "dock" xclock(1) in the corner of the window and make windows do not maximize over it.
I think he's not talking about stacking order, but rather limit the virtual workspace size from top-left to the corner of "docked" windows.

You can do this with wmutils (of course!).

Code:
# dock.sh
# toggle "window docked mode".
# Their geometry and position will change how "maximize.sh" behave, by never overlapping a docked window.
# Behavior is unexpected with a docked window positioned in top-left corner
#
# usage: dock.sh [window ID]

[ -z "$1" ] && exit 1
if -n "$(atomx DOCKED $1)"; then
    atomx -d DOCKED $1
else
    atomx DOCKED=yes $1
fi

Code:
# maximize.sh
# resize a window to fill the whole area between top left corner, and the closest "docked" window from top and left corner
#
# usage: maximize.sh [window ID]


# set your monitor size here
maxh=1080
maxw=1920


for wid in $(lsw); do
    # ignore position of non-docked windows
    test -z "$(atomx DOCKED $wid)" && continue
    x=$(wattr x $wid)
    y=$(wattr y $wid)

    # reduce width/height of the area according to docked windows
    [ $x -lt $maxw ] && maxw=$x
    [ $y -lt $maxh ] && maxh=$y
done

# teleport window to the calculated area
wtp 0 0 $maxw $maxh $1

note: this is obviously untested, and extremely subject to bugs. Enjoy !


Messages In This Thread
Software recommendation - by pranomostro - 07-11-2018, 05:52 AM
RE: Software recommendation - by venam - 07-11-2018, 06:28 AM
RE: Software recommendation - by jkl - 07-11-2018, 08:55 AM
RE: Software recommendation - by z3bra - 08-11-2018, 12:02 PM
RE: Software recommendation - by seninha - 05-05-2020, 06:54 PM
RE: Software recommendation - by neeasade - 05-05-2020, 08:25 PM
RE: Software recommendation - by Wildefyr - 07-05-2020, 07:04 AM
RE: Software recommendation - by z3bra - 07-05-2020, 08:36 AM
RE: Software recommendation - by twee - 07-05-2020, 09:07 AM
RE: Software recommendation - by z3bra - 07-05-2020, 01:27 PM
RE: Software recommendation - by seninha - 08-05-2020, 08:55 AM
RE: Software recommendation - by z3bra - 08-05-2020, 06:21 PM
RE: Software recommendation - by seninha - 08-05-2020, 09:06 PM
RE: Software recommendation - by z3bra - 09-05-2020, 05:32 AM
RE: Software recommendation - by seninha - 10-05-2020, 04:09 PM