From 20110a0d5cb50189e3e0d802ead7dac618d757e3 Mon Sep 17 00:00:00 2001 From: joy Date: Wed, 9 Oct 2024 13:02:52 +0200 Subject: [PATCH] mpv script imporvment --- modules/apps/home/newsboat/default.nix | 24 +++++++++++++++--------- modules/wm/hyprland/scripts/mpv.sh | 9 ++++----- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/modules/apps/home/newsboat/default.nix b/modules/apps/home/newsboat/default.nix index 1ee329e..8a4850f 100644 --- a/modules/apps/home/newsboat/default.nix +++ b/modules/apps/home/newsboat/default.nix @@ -125,14 +125,20 @@ } ]; extraConfig = '' - bind-key j down - bind-key k up - bind-key j next articlelist - bind-key k prev articlelist - bind-key ge end - bind-key gg home - bind-key l open - bind-key h quit - macro c set browser "setsid -f mpv --no-terminal %u &" ; open-in-browser ; set browser "elinks %u" ''; + bind-key j down + bind-key k up + bind-key j next articlelist + bind-key k prev articlelist + bind-key ge end + bind-key gg home + bind-key l open + bind-key h quit + macro o set browser "setsid -f mpv --no-terminal %u &" ; open-in-browser ; set browser "elinks %u" + # color listnormal white black + color listnormal_unread black white bold + color listfocus white blue bold + color listfocus_unread white blue bold + color info white blue + ''; }; } diff --git a/modules/wm/hyprland/scripts/mpv.sh b/modules/wm/hyprland/scripts/mpv.sh index 2eccf05..33acebe 100755 --- a/modules/wm/hyprland/scripts/mpv.sh +++ b/modules/wm/hyprland/scripts/mpv.sh @@ -1,12 +1,11 @@ #!/bin/sh -# Get the link from the clipboard using wl-paste link=$(wl-paste) -# Check if a link was provided if [ -n "$link" ]; then - # Open the link in mpv - mpv "$link" + mpv "$link" & + + notify-send "Opening Link" "$link" --icon=video-x-generic else - echo "No URL provided." + notify-send "Error" "No URL provided." --icon=dialog-error fi