X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=i3-konsole;h=c18e588ef59db4ae03da343e6abfcc09764ebcfb;hb=HEAD;hp=74fd2c29f2d0bd52fd26b91e26db70650461db91;hpb=ee27d59f1eea7a83b1764ec41bfb3015bb463a26;p=distro-setup diff --git a/i3-konsole b/i3-konsole index 74fd2c2..c18e588 100755 --- a/i3-konsole +++ b/i3-konsole @@ -26,18 +26,8 @@ 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-msg "workspace 2" i3-split-maybe konsole & sleep 1