From 8b48a7719d632be305bc0458c4e5a44c5f12ffe3 Mon Sep 17 00:00:00 2001 From: joygnu Date: Sat, 24 Aug 2024 22:34:54 +0200 Subject: [PATCH] little rofi menu for opening links in mvp --- home/hyprland/default.nix | 1 + home/hyprland/scripts/mpv.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100755 home/hyprland/scripts/mpv.sh diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index a64ad05..69e1d49 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -82,6 +82,7 @@ "$mod+Shift, Z, exec, grim - | swappy -f -" "$mod, Z, exec, sh ~/nix/home/hyprland/scripts/screen.sh" "$mod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy" + "$mod, O, exec, sh ~/home/nix/hyprland/scripts/mpv.sh" # controles "$mod, Q, killactive" diff --git a/home/hyprland/scripts/mpv.sh b/home/hyprland/scripts/mpv.sh new file mode 100755 index 0000000..b428da2 --- /dev/null +++ b/home/hyprland/scripts/mpv.sh @@ -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