Skip to content

Action to Start/Stop Screen Recording #14

@icedcoffeeee

Description

@icedcoffeeee

Hi, thanks for the quickshell and plugins. I've been trying to add a widget action to the main bar that starts and stops screen recording with wl-screenrec, something like noctalia shell's.

Steps to Reproduce

  1. dependencies: wl-screenrec, slurp, notify-desktop, killall
  2. create a file ~/record.sh with the following:
    #! /usr/bin/env bash
    RECORDER=wl-screenrec
    if [[ $(ps -A|grep $RECORDER) ]] then
      killall $RECORDER
      notify-desktop "Stopped Screen Recording" -a $RECORDER
    else
      AREA=$(slurp)
      notify-desktop "Started Screen Recording" -a $RECORDER
      OUT="$(date -Iminutes|sed 's/[:+-]//g').mp4"
      $RECORDER -f "$OUT" -g "$AREA" &
    fi
  3. make executable: chmod +x ~/record.sh.
  4. add the script to the left click hook of the Dank Action plugin.
  5. add the action to the main bar.
  6. clicking the added widget does nothing.
  7. reloading the plugin suddenly triggers slurp, but no recording or notification is created.

System Details

  • NixOS 25.11
  • Niri 25.08
  • DMS 0.6.2
  • Dank Action 8715ca3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions