From 6ba97a85a6e1a117eb64d9f6020a970aef151d2c Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 25 Apr 2023 19:03:26 -0500 Subject: make scratchpads spawn (almost) instantly in view with one command) --- spblue | 6 +++++- sphtop | 6 +++++- spirss | 6 +++++- spmutt | 6 +++++- spncmp | 6 +++++- sppmxr | 6 +++++- spprof | 6 +++++- spqpwg | 6 +++++- spterm | 6 +++++- sptodo | 6 +++++- sptrmc | 6 +++++- 11 files changed, 55 insertions(+), 11 deletions(-) diff --git a/spblue b/spblue index 9017b2b..f3fea15 100755 --- a/spblue +++ b/spblue @@ -4,5 +4,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" echo "$COUNT" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" bluetoothctl + hyprctl dispatch exec "[workspace special:spblue;float;noanim] foot -a \"$(basename $0)\" -w '960x540' bluetoothctl" + hyprctl dispatch togglespecialworkspace spblue + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace spblue diff --git a/sphtop b/sphtop index 7b37751..3d77a3f 100755 --- a/sphtop +++ b/sphtop @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" htop + hyprctl dispatch exec "[workspace special:sphtop;float;noanim] foot -a \"$(basename $0)\" -w '960x540' htop" + hyprctl dispatch togglespecialworkspace sphtop + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace sphtop diff --git a/spirss b/spirss index b75c28d..8f1c31f 100755 --- a/spirss +++ b/spirss @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" irssi + hyprctl dispatch exec "[workspace special:spirss;float;noanim] foot -a \"$(basename $0)\" -w '960x540' irssi" + hyprctl dispatch togglespecialworkspace spirss + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace spirss diff --git a/spmutt b/spmutt index 90988e2..fbae957 100755 --- a/spmutt +++ b/spmutt @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" neomutt + hyprctl dispatch exec "[workspace special:spmutt;float;noanim] foot -a \"$(basename $0)\" -w '960x540' neomutt" + hyprctl dispatch togglespecialworkspace spmutt + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace spmutt diff --git a/spncmp b/spncmp index 9948e6f..8fefd83 100755 --- a/spncmp +++ b/spncmp @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" ncmpcpp + hyprctl dispatch exec "[workspace special:spncmp;float;noanim] foot -a \"$(basename $0)\" -w '960x540' ncmpcpp" + hyprctl dispatch togglespecialworkspace spncmp + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace spncmp diff --git a/sppmxr b/sppmxr index 79cec95..b3c8f99 100755 --- a/sppmxr +++ b/sppmxr @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" pulsemixer + hyprctl dispatch exec "[workspace special:sppmxr;float;noanim] foot -a \"$(basename $0)\" -w '960x540' pulsemixer" + hyprctl dispatch togglespecialworkspace sppmxr + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace sppmxr diff --git a/spprof b/spprof index a564543..030ca16 100755 --- a/spprof +++ b/spprof @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" profanity + hyprctl dispatch exec "[workspace special:spprof;float;noanim] foot -a \"$(basename $0)\" -w '960x540' profanity" + hyprctl dispatch togglespecialworkspace spprof + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace spprof diff --git a/spqpwg b/spqpwg index a35aa5f..4d83b36 100755 --- a/spqpwg +++ b/spqpwg @@ -4,5 +4,9 @@ COUNT="$(pgrep -U "$(whoami)" -f qpwgraph | wc -l)" echo "$COUNT" if [ "${COUNT:-0}" -eq "0" ]; then - exec qpwgraph + hyprctl dispatch exec "[workspace special:spqpwg;float;noanim] qpwgraph" + hyprctl dispatch togglespecialworkspace spqpwg + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace spqpwg diff --git a/spterm b/spterm index c3a2579..4c17f30 100755 --- a/spterm +++ b/spterm @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" + hyprctl dispatch exec "[workspace special:spterm;float;noanim] foot -a \"$(basename $0)\" -w '960x540'" + hyprctl dispatch togglespecialworkspace spterm + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace spterm diff --git a/sptodo b/sptodo index 20e0832..46826be 100755 --- a/sptodo +++ b/sptodo @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" todo + hyprctl dispatch exec "[workspace special:sptodo;float;noanim] foot -a \"$(basename $0)\" -w '960x540' todo" + hyprctl dispatch togglespecialworkspace sptodo + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace sptodo diff --git a/sptrmc b/sptrmc index cf0e93d..28eef72 100755 --- a/sptrmc +++ b/sptrmc @@ -3,5 +3,9 @@ COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)" if [ "${COUNT:-0}" -lt "3" ]; then - exec foot -a "$(basename $0)" -w "960x540" tremc + hyprctl dispatch exec "[workspace special:sptrmc;float;noanim] foot -a \"$(basename $0)\" -w '960x540' tremc" + hyprctl dispatch togglespecialworkspace sptrmc + sleep 0.03 fi + +hyprctl dispatch togglespecialworkspace sptrmc -- cgit v1.2.3