diff options
| author | Louis-Michel Raynauld <louismichel@pweb.ca> | 2019-05-09 12:58:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-09 12:58:41 -0700 |
| commit | fd7c65f8ff7b90be0bd97a39aed6fb06541a1089 (patch) | |
| tree | 7a0ce7366b0d276bfae79625510984bb572974e8 /.scripts | |
| parent | 4b8d80ed67929e769b041c7de945cd8503231fef (diff) | |
| download | eibhear-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/ddspawn | 2 |
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 |
