you can find my sticker designs from now on on my git repository: https://git.bau-ha.us/nachtpfoetchen/sticker
Category: tech
Screen isolation in sway (locking mouse to one screen)
Some games and other full screen applications are not locking my mouse to one screen (like fallout 4 for me). So i wrote a little binding mode to fix this. The idea is to set my right screen diagonal to my left screen. so the mouse cannot get to it. After playing i can go back to my default setting easily.
This way we are locking the mouse to to the screen and thus also to the workspaces on the screen.
If you want to use this mode for yourself, keep in mind that you have to enter your screen, resolution, and orientation manually (you can find more information about this in the wiki).
The binding mode must be added to the sway configuration file.
#isolate screens
set $mode_screeniso (i)solate screens, (d)efault
mode "$mode_screeniso" {
bindsym i exec --no-startup-id output HDMI-A-1 pos 0 0 res 1920x1080 , output HDMI-A-2 transform 270 pos 1920 9999 res 2560x1440 , mode "default"
bindsym d exec --no-startup-id output HDMI-A-1 pos 0 330 res 1920x1080 , output HDMI-A-2 transform 270 pos 1920 0 res 2560x1440 , mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+n mode "$mode_screeniso"
How to batch add subtitles to videos using ffmpeg
for n in $(seq -w 01 26); do ffmpeg -i inputvideo${n}.mkv -i inputsubtitle${n}.srt -c copy outputvideo${n}_sub.mkv; done
So in this example we have all video files and subtitle files in one folder. The video files are named all in the pattern “inputvideo${n}.mkv” and the subtitles in “inputsubtitle${n}.srt” In total we have 26 videos and 26 subtitles that we want to map to them. Thats why we count from 01 to 26 in the beginning “$(seq -w 01 26)”. The output files are only videos. because we want to embedd the subtitle file into the video file. Our output videos are called “outputvideo${n}_sub.mkv” in that way we make sure that we easily can see (_sub at the end of the file name) what file has a subtitle attached to it and which one not.
the -c copy option means we want to copy it all into a new file. the -i mark the inputs for ffmpeg.
I hope this is helpful for you to batch add subtitles to video files.