Last active
August 29, 2015 14:02
-
-
Save hluk/6325e726f11dc5abac08 to your computer and use it in GitHub Desktop.
CopyQ 2.3.0 user commands to move selected items to next or previous tab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Commands] | |
1\Name=Move To Next Tab | |
1\Command=" | |
copyq: | |
how = +1 | |
source = selectedtab() | |
tabs = tab() | |
i = tabs.indexOf(source) | |
j = (i + tabs.length + how) % tabs.length | |
target = tabs[j] | |
tab(source) | |
items = selecteditems() | |
for (i in items) { | |
tab(source) | |
item = getitem(items[i]) | |
tab(target) | |
setitem(i, item) | |
} | |
tab(source) | |
remove.apply(this, items) | |
for (i in items) | |
items[i] = i | |
tab(target) | |
selectitems.apply(this, items) | |
show(target)" | |
1\InMenu=true | |
1\Icon=\xf061 | |
1\Shortcut=Ctrl+Shift+Right | |
2\Name=Move To Previous Tab | |
2\Command=" | |
copyq: | |
how = -1 | |
source = selectedtab() | |
tabs = tab() | |
i = tabs.indexOf(source) | |
j = (i + tabs.length + how) % tabs.length | |
target = tabs[j] | |
tab(source) | |
items = selecteditems() | |
for (i in items) { | |
tab(source) | |
item = getitem(items[i]) | |
tab(target) | |
setitem(i, item) | |
} | |
tab(source) | |
remove.apply(this, items) | |
for (i in items) | |
items[i] = i | |
tab(target) | |
selectitems.apply(this, items) | |
show(target)" | |
2\InMenu=true | |
2\Icon=\xf060 | |
2\Shortcut=Ctrl+Shift+Left | |
size=2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment