Skip to content

Instantly share code, notes, and snippets.

@ugursogukpinar

ugursogukpinar/sway-config

Last active Apr 18, 2021
Embed
What would you like to do?
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