PlebWare | Human-Centred Technology & Independent Learning Banner

Leisure Tools!

Mode-Specific Tool for Leisure!

Script Breakdown: leisure-tools.sh (Leisure Mode Tool Dispatcher)!

This documentation covers the Leisure mode execution flow for the PlebMachine tool launcher. Configured with media and entertainment applications, this script handles launching default media tools in AUTOMATIC state or rendering an interactive GTK selection dialog in COGNITIVE state.


Key Functionality!


Leisure Mode Configuration!

| Setting / Target | Assigned Command / Choice | Purpose | | :โ€” | :โ€” | :โ€” | | DEFAULT_APP (AUTOMATIC) | vlc | Immediately launches VLC media player for video or music playback. | | โ€œVLCโ€ Option | vlc | Media player for local video, audio, and streams. | | โ€œSteamโ€ Option | steam | Gaming platform hub. | | โ€œFirefoxโ€ Option | firefox | Web browser for media streaming, video content, and casual browsing. |


Dependencies!

System Utilities & GUI Engine!

Binary Dependencies!


#!/bin/bash
export DISPLAY="${DISPLAY:-:0}"
export XAUTHORITY="${XAUTHORITY:-$HOME/.Xauthority}"
export GDK_BACKEND="${GDK_BACKEND:-x11}"

SCRIPT_NAME="$(basename "$0" .sh)"
MODE="${SCRIPT_NAME%-tools}"

STATE_FILE="$HOME/.config/plebmachine/state.conf"
if [ -f "$STATE_FILE" ]; then
    PM_STATE=$(grep -i "PM_STATE" "$STATE_FILE" | cut -d'=' -f2 | tr '[:lower:]' '[:upper:]' | xargs)
else
    PM_STATE="COGNITIVE"
fi

# Leisure specific
DEFAULT_APP="vlc"
ZENITY_ITEMS='FALSE "VLC" FALSE "Steam" FALSE "Firefox"'

if [ "$PM_STATE" = "AUTOMATIC" ]; then
    $DEFAULT_APP >/dev/null 2>&1 &
    exit 0
fi

CHOICE=$(zenity --list \
  --checklist \
  --title="PlebMachine Leisure Tools" \
  --text="Select leisure applications to launch:" \
  --column="Pick" \
  --column="App" \
  $ZENITY_ITEMS \
  --separator="|")

if [ $? -ne 0 ]; then
    exit 0
fi

IFS="|" read -ra APPS <<< "$CHOICE"

for app in "${APPS[@]}"; do
  app="${app%\"}"
  app="${app#\"}"
  case "$app" in
    "VLC")        vlc >/dev/null 2>&1 & ;;
    "Steam")      steam >/dev/null 2>&1 & ;;
    "Firefox")    firefox >/dev/null 2>&1 & ;;
    *)            echo "Unknown app: $app" ;;
  esac
done



Review โ€” 2026-09-20!

Review subject: Leisure Tools

Review date: 2026-09-20
Review scope: Documentation, code preservation, description quality, and PlebVox exclusion.

Previous: Graphics Tools!

Next: Everyday Music!

No earlier PlebWare page yet

You haven't visited another PlebWare page in this tab yet. If you arrived from Google or opened this page directly, there may be no earlier page to return to.

You can keep exploring from here:

๐Ÿ”Ž Search PlebWare ๐Ÿ“š Browse All Articles