From 5eee5b44924bf9079a67d5bc7612bfad56ddeed3 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Fri, 17 Jan 2020 19:14:34 +0300 Subject: config restructuring and cleanup --- dotfiles/.local/bin/ddquakemite | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 dotfiles/.local/bin/ddquakemite (limited to 'dotfiles/.local/bin/ddquakemite') diff --git a/dotfiles/.local/bin/ddquakemite b/dotfiles/.local/bin/ddquakemite new file mode 100755 index 0000000..ef67955 --- /dev/null +++ b/dotfiles/.local/bin/ddquakemite @@ -0,0 +1,16 @@ +#!/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 + swaymsg '[title="quakemite"] scratchpad show' + else + swaymsg '[title="quakemite"] move scratchpad' + fi +else + $TERMINAL -t "quakemite" -e "$SHELL -c 'TERM=xterm-256color; 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 + -- cgit v1.2.3