Add movie mode for watching videos on the external monitor
The screen layout and trayer setup moved from xmonad.hs to a shared screen-layout script. lf opens videos with movie.
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# Plays videos on the external monitor only, with the laptop screen off.
|
||||
# Opened from lf for video/* files; restores the normal layout when mpv exits.
|
||||
|
||||
# Single-screen mode only makes sense with the external monitor plugged in
|
||||
if ! xrandr --query | grep -q '^HDMI-1-0 connected'; then
|
||||
exec mpv "$@"
|
||||
fi
|
||||
|
||||
trap ~/.local/bin/screen-layout EXIT
|
||||
trap 'exit 130' INT TERM HUP
|
||||
|
||||
xrandr --output eDP-1 --off
|
||||
mpv "$@"
|
||||
Reference in New Issue
Block a user