mirror of
https://github.com/VectorKappa/dotfiles.git
synced 2025-12-19 16:26:10 +01:00
added binfiles from chrysostomus/bspwm-scripts, fixed eaten space
This commit is contained in:
29
bin/pseudo_automatic_mode
Executable file
29
bin/pseudo_automatic_mode
Executable file
@@ -0,0 +1,29 @@
|
||||
#! /bin/sh
|
||||
|
||||
fwid=$(bspc query -N -n focused.automatic)
|
||||
wid=$1
|
||||
class=$2
|
||||
instance=$3
|
||||
title=$(xtitle "$wid")
|
||||
receptacle=$(bspc query -N -n ".leaf.!window.local" | awk NR==1)
|
||||
#floats=$(bspc query -N -n .local.floating | wc -l)
|
||||
|
||||
if bspc query -N -n "@/.!automatic" > /dev/null ; then
|
||||
echo "node=@/"
|
||||
fi
|
||||
|
||||
if [ -n "$receptacle" ] > /dev/null ; then
|
||||
echo "node=$receptacle"
|
||||
elif [ -n "$fwid" ] ; then
|
||||
wattr wh $fwid | {
|
||||
read width height
|
||||
if [ $width -gt $height ] ; then
|
||||
echo "split_dir=west"
|
||||
else
|
||||
echo "split_dir=south"
|
||||
fi
|
||||
# echo "split_ratio=0.5"
|
||||
}
|
||||
fi
|
||||
wmctrl -i -r "$wid" -b add,maximized_vert,maximized_horz &>/dev/null &
|
||||
#window-placer $floats $wid
|
||||
Reference in New Issue
Block a user