little rofi menu for opening links in mvp

This commit is contained in:
joy 2024-08-24 22:34:54 +02:00
parent 0b63389d0b
commit 123b68a39f
2 changed files with 13 additions and 0 deletions

View file

@ -82,6 +82,7 @@
"$mod+Shift, Z, exec, grim - | swappy -f -" "$mod+Shift, Z, exec, grim - | swappy -f -"
"$mod, Z, exec, sh ~/nix/home/hyprland/scripts/screen.sh" "$mod, Z, exec, sh ~/nix/home/hyprland/scripts/screen.sh"
"$mod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy" "$mod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
"$mod, O, exec, sh ~/home/nix/hyprland/scripts/mpv.sh"
# controles # controles
"$mod, Q, killactive" "$mod, Q, killactive"

12
home/hyprland/scripts/mpv.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
# Run rofi to ask for the link
link=$(rofi -dmenu -p )
# Check if a link was provided
if [ -n "$link" ]; then
# Open the link in mpv
mpv "$link"
else
echo "No URL provided."
fi