mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
22 lines
639 B
Bash
Executable File
22 lines
639 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# make window floating
|
|
hyprctl dispatch togglefloating
|
|
socket_file="/tmp/jellyfin-mpvsocket"
|
|
|
|
# use fallback if specified file doesn't exist
|
|
[ -e "$socket_file" ] || socket_file="/tmp/mpvsocket"
|
|
|
|
# dimension to resize the mpv window
|
|
dimension=$(printf '{ "command": ["get_property", "width"] }\n{ "command": ["get_property", "height"] }\n' | socat - "$socket_file" | sed -nE 's|.*"data":([^,]*),.*|\1|p' | tr '\n' ' ')
|
|
|
|
# resize window to match video resolution
|
|
hyprctl dispatch resizeactive exact $dimension
|
|
|
|
# move window to bottom right
|
|
hyprctl dispatch movewindow r
|
|
hyprctl dispatch movewindow d
|
|
|
|
#pin
|
|
#hyprctl dispatch pin
|