feat: move windows between spaces and toggle bsp
This commit is contained in:
19
src/move-window-prev.ts
Normal file
19
src/move-window-prev.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { showHUD } from "@raycast/api";
|
||||
import { runYabaiCommand } from "./helpers/scripts";
|
||||
import { showFailureToast } from "@raycast/utils";
|
||||
|
||||
export default async function Command() {
|
||||
try {
|
||||
const { stderr } = await runYabaiCommand("-m window --space prev --focus");
|
||||
|
||||
if (stderr) {
|
||||
throw new Error(stderr);
|
||||
}
|
||||
|
||||
showHUD(`Moved window to previous space`);
|
||||
} catch (error) {
|
||||
showFailureToast(error, {
|
||||
title: "Failed to move window.",
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user