X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=i3-konsole;h=92afe30ef25f9be91af00f2da8c913c7a98d120a;hb=ca61084446e48fb0703ce2a203c1bd18ceaf4dfb;hp=74fd2c29f2d0bd52fd26b91e26db70650461db91;hpb=989554cab0d0c59d1aab20496ba9550acd17e6e6;p=distro-setup diff --git a/i3-konsole b/i3-konsole index 74fd2c2..92afe30 100755 --- a/i3-konsole +++ b/i3-konsole @@ -26,18 +26,7 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR -if i3-msg -t get_tree | jq --stream -r 'select(.[1]|scalars!=null) | "\(.[0]|join(".")): \(.[1]|tojson)"' | grep 'marks.0: "term"$' &>/dev/null; then - h=$(i3-msg -t get_tree | jq -r ".. | select(.focused? == true) | .rect.height") - - cur_workspace=$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused? == true) | .name') - - # h tests if we have a current focus, but that is just a random guess. - if [[ $cur_workspace == 2 && $h ]]; then - i3-msg "swap container with mark term; [con_mark=\"term\"] focus" - else - i3-msg "[con_mark=\"term\"] focus" - fi -else +if ! /a/c/i3-focus-maybe term; then i3-split-maybe konsole & sleep 1