mpv script imporvment

This commit is contained in:
joy 2024-10-09 13:02:52 +02:00
parent e757693059
commit 20110a0d5c
2 changed files with 19 additions and 14 deletions

View file

@ -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
'';
};
}

View file

@ -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