Last active
September 20, 2024 16:12
-
-
Save ugursogukpinar/f390d9f4c829fb1b05fc74a12dd482bb to your computer and use it in GitHub Desktop.
wf-recorder for swaywm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set $screenrecorder `bash $HOME/scripts/toggle-screen-recorder.sh` | |
bindsym --to-code $mod+Shift+R exec $screenrecorder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"custom/recorder": { | |
"format": "", | |
"return-type": "json", | |
"interval": 1, | |
"exec": "echo '{\"class\": \"recording\"}'", | |
"exec-if": "pgrep wf-recorder" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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