summaryrefslogtreecommitdiffstats
path: root/.scripts
diff options
context:
space:
mode:
authorLouis-Michel Raynauld <louismichel@pweb.ca>2019-05-09 12:58:41 -0700
committerGitHub <noreply@github.com>2019-05-09 12:58:41 -0700
commitfd7c65f8ff7b90be0bd97a39aed6fb06541a1089 (patch)
tree7a0ce7366b0d276bfae79625510984bb572974e8 /.scripts
parent4b8d80ed67929e769b041c7de945cd8503231fef (diff)
downloadeibhear-fd7c65f8ff7b90be0bd97a39aed6fb06541a1089.tar.gz
eibhear-fd7c65f8ff7b90be0bd97a39aed6fb06541a1089.tar.zst
eibhear-fd7c65f8ff7b90be0bd97a39aed6fb06541a1089.zip
Fix for spawning scripts that require no args
For example, "ddspawn vifm" is generating the failing commad "st vifm -e vifm" without this fix. This proposed change fixes this issue so that "ddspawn vifm" generates the correct "st -e vifm". It also simplify the i3 command in my view. Thanks for sharing this helpful script, I used it everywhere!
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/i3cmds/ddspawn2
1 files changed, 1 insertions, 1 deletions
diff --git a/.scripts/i3cmds/ddspawn b/.scripts/i3cmds/ddspawn
index ef86abf..3a616b8 100755
--- a/.scripts/i3cmds/ddspawn
+++ b/.scripts/i3cmds/ddspawn
@@ -13,5 +13,5 @@ then
i3 "[instance=\"dropdown_$1\"] scratchpad show; [instance=\"dropdown_$1\"] move position center"
else
echo "Window not detected... spawning."
- i3 "exec --no-startup-id $TERMINAL -n dropdown_$1 $(echo "$@" | cut -d ' ' -f2-) -e $1"
+ i3 "exec --no-startup-id $TERMINAL -n dropdown_$1 ${@:2} -e $1"
fi