#!/usr/bin/env nu const REPO_ROOT = path self | path dirname # Quickshell SKYG apps def "main" [] { help main } # Run the app carousel def "main carousel" [ path_to_config: string # path to JSON config ] { $env.SKYG_APP_CAROUSEL = $path_to_config qs -p ($REPO_ROOT | path join "app-carousel") } const WS_PATH = $REPO_ROOT | path join "workspace-manager" # Send an IPC call to the running workspace manager def ws-ipc [fn: string] { qs ipc -p $WS_PATH call workspace $fn } # Run the workspace manager def "main workspace-manager" [ --daemon (-d) # detach from the terminal ] { if $daemon { qs -d -n -p $WS_PATH } else { qs -n -p $WS_PATH } } # Toggle the rename bar. Also closes the carousel. def "main workspace-manager toggle" [] { ws-ipc "toggle" } # Open the workspace carousel def "main workspace-manager goto" [] { ws-ipc "goTo" } const WC_PATH = $REPO_ROOT | path join "window-carousel" # Send an IPC call to the running window carousel def wc-ipc [fn: string] { qs ipc -p $WC_PATH call windows $fn } # Run the window carousel def "main window-carousel" [ --daemon (-d) # detach from the terminal ] { if $daemon { qs -d -n -p $WC_PATH } else { qs -n -p $WC_PATH } } # Toggle the window carousel def "main window-carousel toggle" [] { wc-ipc "toggle" } # Open the window carousel def "main window-carousel open" [] { wc-ipc "open" }