/**
 * @fileoverview Shared utility for wrapping commands with `nice` priority.
 *
 * Extracted as a shared utility for tmux-manager and other consumers.
 *
 * @module utils/nice-wrapper
 */
/**
 * Wraps a command with `nice` for priority adjustment.
 */
export function wrapWithNice(cmd, config) {
    if (!config.enabled)
        return cmd;
    const niceValue = Math.max(-20, Math.min(19, config.niceValue));
    return `nice -n ${niceValue} ${cmd}`;
}
//# sourceMappingURL=nice-wrapper.js.map