diff options
Diffstat (limited to 'dotfiles')
-rwxr-xr-x | dotfiles/.scripts/ddquakemite | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dotfiles/.scripts/ddquakemite b/dotfiles/.scripts/ddquakemite index 16855f4..699c60f 100755 --- a/dotfiles/.scripts/ddquakemite +++ b/dotfiles/.scripts/ddquakemite @@ -1,12 +1,16 @@ -#!/bin/sh +#!/bin/bash -if ! [ -z $(swaymsg -t get_tree | grep 'quakemite') ]; then - if [ -z $(swaymsg -t get_tree | grep -A 42 'quakemite' | tail -n 1 | grep 'true') ]; then +if ! [ -z "$(swaymsg -t get_tree | grep 'quakemite')" ]; then + if [ -z "$(swaymsg -t get_tree | grep -A 42 'quakemite' | tail -n 1 | grep 'true')" ]; then swaymsg '[title="quakemite"] scratchpad show' else swaymsg '[title="quakemite"] move scratchpad' fi else - $TERMINAL -t "quakemite" -e "$SHELL -c 'TERM=st; TERMINAL=termite; tmux a || tmux'" + $TERMINAL -t "quakemite" -e "$SHELL -c 'TERM=st; TERMINAL=termite; tmux a || tmux'" & + sleep 0.2s + currenty=$(swaygetcurrentwindow | cut -d ' ' -f1 | cut -d ',' -f2 ) + let moveup=$currenty-25 + swaymsg move up "$moveup px" fi |