mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
Feat: New Scripts, new functions
This commit is contained in:
21
hypr/pinmpv
Executable file
21
hypr/pinmpv
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user