blob: 8760e1439e1b340d1f926c110b99d2b7a8073af8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/sh
if ! [ -z "$(swaymsg -t get_tree | grep 'ddterminal')" ]; then
if [ -z "$(swaymsg -t get_tree | grep -A 46 'ddterminal' | tail -n 1 | grep 'true')" ]; then
swaymsg '[title="ddterminal"] scratchpad show'
else
swaymsg '[title="ddterminal"] move scratchpad'
fi
else
$TERMINAL -t "ddterminal" -e tmuxatt &
sleep 0.2s
currenty=$(swaygetcurrentwindow | cut -d ' ' -f1 | cut -d ',' -f2 )
let moveup=$currenty-25
swaymsg move up "$moveup px"
fi
|