|
|
@ -134,11 +134,11 @@ wm_autoset_for_both() {
|
|
|
|
# need to sleep first time to wait for window to be created
|
|
|
|
# need to sleep first time to wait for window to be created
|
|
|
|
map_post_oneshot() {
|
|
|
|
map_post_oneshot() {
|
|
|
|
sleep 0.1 && \
|
|
|
|
sleep 0.1 && \
|
|
|
|
i3-msg "[id=$1] floating enable" && \
|
|
|
|
i3-msg "[id=$1] floating enable" > /dev/null && \
|
|
|
|
xdotool windowmove "$1" "$xoff" "$yoff" windowsize "$1" "$width" "$height"
|
|
|
|
xdotool windowmove "$1" "$xoff" "$yoff" windowsize "$1" "$width" "$height"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
map_post() {
|
|
|
|
map_post() {
|
|
|
|
i3-msg "[id=$1] floating enable" && \
|
|
|
|
i3-msg "[id=$1] floating enable" > /dev/null && \
|
|
|
|
xdotool windowmove "$1" "$xoff" "$yoff" windowsize "$1" "$width" "$height"
|
|
|
|
xdotool windowmove "$1" "$xoff" "$yoff" windowsize "$1" "$width" "$height"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -214,7 +214,7 @@ map_pre_command() {
|
|
|
|
if [[ -n $map_pre ]]; then
|
|
|
|
if [[ -n $map_pre ]]; then
|
|
|
|
eval "$map_pre"
|
|
|
|
eval "$map_pre"
|
|
|
|
# use automatically set function if exists
|
|
|
|
# use automatically set function if exists
|
|
|
|
elif [[ -n $(type map_pre) ]]; then
|
|
|
|
elif [[ -n $(type map_pre 2> /dev/null) ]]; then
|
|
|
|
# needed when creating oneshot rules for programs where cmd differs from actual class name
|
|
|
|
# needed when creating oneshot rules for programs where cmd differs from actual class name
|
|
|
|
if [[ $1 == "gnome-terminal" ]]; then
|
|
|
|
if [[ $1 == "gnome-terminal" ]]; then
|
|
|
|
map_pre "Gnome-terminal"
|
|
|
|
map_pre "Gnome-terminal"
|
|
|
@ -227,11 +227,11 @@ map_pre_command() {
|
|
|
|
map_post_command() {
|
|
|
|
map_post_command() {
|
|
|
|
if [[ -n $oneshot_post ]] && [[ $1 == oneshot ]]; then
|
|
|
|
if [[ -n $oneshot_post ]] && [[ $1 == oneshot ]]; then
|
|
|
|
eval "$oneshot_post"
|
|
|
|
eval "$oneshot_post"
|
|
|
|
elif [[ -n $(type map_post_oneshot) ]] && [[ $1 == oneshot ]]; then
|
|
|
|
elif [[ -n $(type map_post_oneshot 2> /dev/null) ]] && [[ $1 == oneshot ]]; then
|
|
|
|
map_post_oneshot "$2"
|
|
|
|
map_post_oneshot "$2"
|
|
|
|
elif [[ -n $map_post ]]; then
|
|
|
|
elif [[ -n $map_post ]]; then
|
|
|
|
eval "$map_post"
|
|
|
|
eval "$map_post"
|
|
|
|
elif [[ -n $(type map_post) ]]; then
|
|
|
|
elif [[ -n $(type map_post 2> /dev/null) ]]; then
|
|
|
|
map_post "$1"
|
|
|
|
map_post "$1"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -239,13 +239,13 @@ map_post_command() {
|
|
|
|
unmap_post_command() {
|
|
|
|
unmap_post_command() {
|
|
|
|
if [[ -n $unmap_post ]]; then
|
|
|
|
if [[ -n $unmap_post ]]; then
|
|
|
|
eval "$unmap_post"
|
|
|
|
eval "$unmap_post"
|
|
|
|
elif [[ -n $(type unmap_post) ]]; then
|
|
|
|
elif [[ -n $(type unmap_post 2> /dev/null) ]]; then
|
|
|
|
unmap_post
|
|
|
|
unmap_post
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
maybe_cancel_auto_show() {
|
|
|
|
maybe_cancel_auto_show() {
|
|
|
|
if $cancel_auto_show && [[ $1 == "$(< /tmp/tdrop/auto_hidden/wid)" ]]; then
|
|
|
|
if $cancel_auto_show && [[ $1 == "$(cat /tmp/tdrop/auto_hidden/wid 2> /dev/null)" ]]; then
|
|
|
|
> /tmp/tdrop/auto_hidden/wid
|
|
|
|
> /tmp/tdrop/auto_hidden/wid
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -363,7 +363,7 @@ wid_toggle() {
|
|
|
|
|
|
|
|
|
|
|
|
get_geometry() {
|
|
|
|
get_geometry() {
|
|
|
|
# so that won't float a tiled window later when showing
|
|
|
|
# so that won't float a tiled window later when showing
|
|
|
|
if [[ -n $(type is_floating) ]] && [[ -z $(is_floating "$1") ]]; then
|
|
|
|
if [[ -n $(type is_floating 2> /dev/null) ]] && [[ -z $(is_floating "$1") ]]; then
|
|
|
|
# window is not floating; don't bother saving geometry
|
|
|
|
# window is not floating; don't bother saving geometry
|
|
|
|
echo "false"
|
|
|
|
echo "false"
|
|
|
|
else
|
|
|
|
else
|
|
|
|