45 lines
906 B
Nu
Executable File
45 lines
906 B
Nu
Executable File
#!/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"
|
|
}
|