mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Add container support for winopen
This commit is contained in:
parent
b1cc20cc4a
commit
d9ac0cf2c5
2 changed files with 13 additions and 3 deletions
|
@ -2291,6 +2291,7 @@ export async function tabopen(...addressarr: string[]): Promise<browser.tabs.Tab
|
||||||
args.shift()
|
args.shift()
|
||||||
argParse(args)
|
argParse(args)
|
||||||
} else if (args[0] === "-c") {
|
} else if (args[0] === "-c") {
|
||||||
|
if (args.length < 2) throw new Error(`You must provide a container name!`)
|
||||||
// Ignore the -c flag if incognito as containers are disabled.
|
// Ignore the -c flag if incognito as containers are disabled.
|
||||||
if (!win.incognito) {
|
if (!win.incognito) {
|
||||||
if (args[1] === "firefox-default" || args[1].toLowerCase() === "none") {
|
if (args[1] === "firefox-default" || args[1].toLowerCase() === "none") {
|
||||||
|
@ -2729,6 +2730,8 @@ export async function mute(...muteArgs: string[]): Promise<void> {
|
||||||
*
|
*
|
||||||
* `winopen -popup [...]` will open it in a popup window. You can combine the two for a private popup.
|
* `winopen -popup [...]` will open it in a popup window. You can combine the two for a private popup.
|
||||||
*
|
*
|
||||||
|
* `winopen -c containername [...]` will open the result in a container while ignoring other options given. See [[tabopen]] for more details on containers.
|
||||||
|
*
|
||||||
* Example: `winopen -popup -private ddg.gg`
|
* Example: `winopen -popup -private ddg.gg`
|
||||||
*/
|
*/
|
||||||
//#background
|
//#background
|
||||||
|
@ -2740,15 +2743,20 @@ export async function winopen(...args: string[]) {
|
||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
case "-private":
|
case "-private":
|
||||||
createData.incognito = true
|
createData.incognito = true
|
||||||
args = args.slice(1, args.length)
|
args.shift()
|
||||||
firefoxArgs = "--private-window"
|
firefoxArgs = "--private-window"
|
||||||
break
|
break
|
||||||
|
|
||||||
case "-popup":
|
case "-popup":
|
||||||
createData.type = "popup"
|
createData.type = "popup"
|
||||||
args = args.slice(1, args.length)
|
args.shift()
|
||||||
break
|
break
|
||||||
|
|
||||||
|
case "-c":
|
||||||
|
if (args.length < 2) throw new Error(`You must provide a container name!`)
|
||||||
|
args.shift()
|
||||||
|
return composite(`tabopen -c ${args.join(" ")} | sleep 100 | tabdetach`)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
done = true
|
done = true
|
||||||
break
|
break
|
||||||
|
|
|
@ -9,8 +9,10 @@ The perceived benefits of this feature are as described by the Firefox Test Pilo
|
||||||
|
|
||||||
### Container related commands
|
### Container related commands
|
||||||
* `containercreate name [color] [icon]` Creates a new container. Supplying `name` only will create a container called `name`, a random color and the fingerprint icon.
|
* `containercreate name [color] [icon]` Creates a new container. Supplying `name` only will create a container called `name`, a random color and the fingerprint icon.
|
||||||
* `containerupdate name newname color icon` Updates the container.
|
* `containerupdate name newname color icon` Updates the container.
|
||||||
* `containerclose name` Closes all tabs in a specified container.
|
* `containerclose name` Closes all tabs in a specified container.
|
||||||
* `containerdelete name` Deletes a container, calls `containerclose` before deletion
|
* `containerdelete name` Deletes a container, calls `containerclose` before deletion
|
||||||
|
* `tabopen -c name [url]` Opens a new tab in the container called `name`
|
||||||
|
* `winopen -c name [url]` Opens a new window in the container called `name`
|
||||||
|
|
||||||
The <a href='./7-native_messenger.html' rel='next'>next page</a> is about the native messenger. <a href='./5-settings.html' rel="prev"></a>
|
The <a href='./7-native_messenger.html' rel='next'>next page</a> is about the native messenger. <a href='./5-settings.html' rel="prev"></a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue