diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2019-05-12 07:55:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-12 07:55:04 -0400 |
| commit | 18e001db07d7105ab4dc4f4f836ca0d3a516a791 (patch) | |
| tree | ee7a3c4b6fb801f7fdf9ba86747f0c5f2547ad97 /.scripts | |
| parent | 4b8d80ed67929e769b041c7de945cd8503231fef (diff) | |
| parent | 48c6ea530a3cf77739e6fc8735f3547a41c2d47d (diff) | |
| download | eibhear-18e001db07d7105ab4dc4f4f836ca0d3a516a791.tar.gz eibhear-18e001db07d7105ab4dc4f4f836ca0d3a516a791.tar.zst eibhear-18e001db07d7105ab4dc4f4f836ca0d3a516a791.zip | |
Merge pull request #296 from loumray/patch-1
Fix for spawning scripts that require no args
Diffstat (limited to '.scripts')
| -rwxr-xr-x | .scripts/i3cmds/ddspawn | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/.scripts/i3cmds/ddspawn b/.scripts/i3cmds/ddspawn index ef86abf..d4a4034 100755 --- a/.scripts/i3cmds/ddspawn +++ b/.scripts/i3cmds/ddspawn @@ -7,11 +7,13 @@ [ -z "$1" ] && exit -if xwininfo -tree -root | grep "(\"dropdown_$1\" "; +script=$1 +shift +if xwininfo -tree -root | grep "(\"dropdown_$script\" "; then echo "Window detected." - i3 "[instance=\"dropdown_$1\"] scratchpad show; [instance=\"dropdown_$1\"] move position center" + i3 "[instance=\"dropdown_$script\"] scratchpad show; [instance=\"dropdown_$script\"] 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_$script $@ -e $script" fi |
