adding bin files
This commit is contained in:
26
bin/windowpromoter
Executable file
26
bin/windowpromoter
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
receptacle=$(bspc query -N -n ".leaf.!window.local" | awk NR==1)
|
||||
|
||||
window_promotion()
|
||||
{
|
||||
if [ -n "$receptacle" ] > /dev/null ; then
|
||||
bspc node -n "$receptacle"
|
||||
elif [ -z "$(bspc query -N -n last.!automatic.local)" ]; then \
|
||||
bspc node -s biggest.!focused.local; \
|
||||
else \
|
||||
bspc node -n last.!automatic.local; \
|
||||
fi
|
||||
}
|
||||
|
||||
if bspc query -N -n "@/.!automatic" > /dev/null ; then
|
||||
bspc node -n @/ || window_promotion
|
||||
else
|
||||
if [ -n "$receptacle" ] > /dev/null ; then
|
||||
bspc node -n "$receptacle"
|
||||
elif [ -z "$(bspc query -N -n last.!automatic.local)" ]; then \
|
||||
bspc node -s biggest.!focused.local; \
|
||||
else \
|
||||
bspc node -n last.!automatic.local; \
|
||||
fi
|
||||
fi
|
Reference in New Issue
Block a user