pueue-switch
Switch the position of two enqueued tasks
TLDR
Switch the priority of two tasks
SYNOPSIS
pueue switch [name] [options]
pueue switch --list
pueue switch --create name
pueue switch --delete name
PARAMETERS
name
The name of the Pueue daemon configuration (profile) to switch to. If no name is provided when switching, it typically reverts to the 'default' profile or shows the current active one depending on context.
-c, --create
Creates a new Pueue daemon configuration with the specified name if it doesn't already exist. This option must be used in conjunction with a name.
-d, --delete
Deletes the specified Pueue daemon configuration. This option must be used in conjunction with a name.
-l, --list
Lists all available Pueue daemon configurations and indicates the currently active one.
DESCRIPTION
pueue switch is a subcommand of the Pueue task management system. It allows users to manage and switch between different Pueue daemon configurations, often referred to as 'profiles' or 'contexts'. This functionality is crucial for organizing tasks into separate, independent queues. For instance, a user might have one profile for development tasks, another for long-running data processing, and a third for system maintenance. By switching between these profiles, users can isolate task execution, preventing interference and improving organization. The command enables listing existing configurations, creating new ones, and deleting obsolete ones, providing flexible control over distinct Pueue environments.
CAVEATS
Switching profiles involves stopping the pueued daemon associated with the old profile (if it's not managing active tasks) and starting the daemon for the new profile. This means tasks in the previously active profile might be paused or interrupted until that profile is reactivated. Ensure pueued has the necessary permissions to start and stop services.
CONFIGURATION PATHS
Each Pueue daemon configuration (profile) is stored in a separate YAML file, typically located in ~/.config/pueue/config/. For example, a profile named 'dev_tasks' would have its configuration in ~/.config/pueue/config/dev_tasks.yml. These files define client and daemon settings specific to that profile.
DAEMON MANAGEMENT
When switching to a new profile using pueue switch, the corresponding pueued daemon for that profile is typically started automatically if it's not already running. The daemon for the previously active profile might be stopped or paused depending on its state and whether it has active tasks.
HISTORY
Pueue was created by Arne Beer as a command-line task queue and runner. The switch subcommand was introduced to address the growing demand for managing multiple, independent task queues. This feature significantly enhanced Pueue's utility, allowing users to segment their tasks into logical contexts and thereby improving overall organization and workflow management.