Skip to content

Instantly share code, notes, and snippets.

@ugursogukpinar
Last active March 13, 2024 15:11
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ugursogukpinar/f390d9f4c829fb1b05fc74a12dd482bb to your computer and use it in GitHub Desktop.
Save ugursogukpinar/f390d9f4c829fb1b05fc74a12dd482bb to your computer and use it in GitHub Desktop.
wf-recorder for swaywm
set $screenrecorder `bash $HOME/scripts/toggle-screen-recorder.sh`
bindsym --to-code $mod+Shift+R exec $screenrecorder
#!/bin/bash
pid=`pgrep wf-recorder`
status=$?
if [ $status != 0 ]
then
wf-recorder -f $(xdg-user-dir VIDEOS)/$(date +'recording_%Y-%m-%d-%H%M%S.mp4');
else
pkill --signal SIGINT wf-recorder
fi;
"custom/recorder": {
"format": "",
"return-type": "json",
"interval": 1,
"exec": "echo '{\"class\": \"recording\"}'",
"exec-if": "pgrep wf-recorder"
}
#custom-recorder {
font-size: 18px;
margin: 2px 7px 0px 7px;
color:#c9545d;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment