diff options
author | Yaroslav <contact@yaroslavps.com> | 2019-10-27 04:25:34 +0300 |
---|---|---|
committer | Yaroslav <contact@yaroslavps.com> | 2019-10-27 04:25:34 +0300 |
commit | 75058c4bdfbe1b4fd5eef4ffcbae02ec73e9c71f (patch) | |
tree | e6de7e01b0277cc274872c089386469ef908ff16 /dotfiles/.scripts/ddquakemite | |
parent | a22a92b7befd6f18217d128550751c7781571486 (diff) | |
download | swayrice-75058c4bdfbe1b4fd5eef4ffcbae02ec73e9c71f.tar.gz swayrice-75058c4bdfbe1b4fd5eef4ffcbae02ec73e9c71f.zip |
make dropdown terminal spawn on the top part of the screen
Diffstat (limited to 'dotfiles/.scripts/ddquakemite')
-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 |