• 1 Post
  • 74 Comments
Joined 3 years ago
cake
Cake day: June 14th, 2023

help-circle
  • I have a similar scriptlet that I use to open YouTube URLs in mpv, using just and wl-clipboard… I just copy the URL and press my G1 key (it has a keybind of just yt-paste attached) which launches the yt-paste snippet below, reads the url from the clipboard, parses it and passes it to mpv.

    # Parse the clipboard for YouTube URLs and open them in mpv
    yt-paste:
      #!/usr/bin/env bash
      YOUTUBE_URL_REGEX="^https:\/\/(www\.youtube\.com\/watch\?v=|youtu\.be\/)[a-zA-Z0-9_-]{11}"
      YOUTUBE_PLAYLIST_URL_REGEX="^https:\/\/(www\.youtube\.com\/playlist\?list=)[a-zA-Z0-9_-]+"
      YOUTUBE_SHORTS_URL_REGEX="^https:\/\/(www\.youtube\.com\/shorts\/)[a-zA-Z0-9_-]{11}"
      # Youtube URL
      if [[ "$(wl-paste)" =~ $YOUTUBE_URL_REGEX ]]; then
        echo "Opening valid YouTube URL" >&2
        notify-send --app-name="YT-Paste" --icon=mpv --transient "Opening YouTube URL"
        mpv "$(wl-paste)"
      # Youtube Playlist URL
      elif [[ "$(wl-paste)" =~ $YOUTUBE_PLAYLIST_URL_REGEX ]]; then
        echo "Opening valid YouTube Playlist URL" >&2
        notify-send --app-name="YT-Paste" --icon=mpv --transient "Opening YouTube Playlist URL"
        mpv "$(wl-paste)"
      # Youtube Short URL
      elif [[ "$(wl-paste)" =~ $YOUTUBE_SHORTS_URL_REGEX ]]; then
        echo "Opening valid YouTube Shorts URL" >&2
        notify-send --app-name="YT-Paste" --icon=mpv --transient "Opening YouTube Shorts URL"
        mpv "$(wl-paste)"
      # No Match
      else
        echo "Clipboard does not contain a valid YouTube URL" >&2
        notify-send --app-name="YT-Paste" --icon=mpv --transient "Whoops!" "Clipboard does not contain a valid YouTube URL"
        exit 1
      fi
    














  • EccTM@lemmy.mltoComic Strips@lemmy.worldBusy day
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 months ago

    We have both! The Taoiseach is like a prime minister, and then the President is more on the ceremonial side of things, a diplomat. Our current president, Michael D. Higgins, is known for having two huge Bernese Mountain Dogs that show up at lots of events.




  • What you call necrodisease, the rest of the world calls common sense.

    At this point, the issue the original thread was created for was already solved, and more than half the thread was people being trolls. anyone that cared in that thread had long since moved on to other things. Why would notifying them be of any use? You’re not even facing the same issue! Start a fresh thread, outline all the details involved (including that you’re playing with a co-op mod!) in your own thread, and discuss it without any irrelevant baggage.

    The answer to your question is that in vanilla DX, you press Right Mouse Button, and if the body has items on it, you’ll loot those first, and then pressing RMB again would pick up the body. If there’s no free space in your inventory, you’ll just be stuck trying to loot the body. In mods like DX: Revision, they made tweaks so the items would be dropped on the ground if you’ve no inventory space, but you’re playing with an unnamed co-op mod, so all bets are off. Seeing as all the missions were made with only one player in mind, Player 2 might be stuck trying to loot it over and over, because the flag that says the body was searched is only getting set for Player 1.