Skip to content

Instantly share code, notes, and snippets.

@alexandreprates
Last active September 14, 2016 13:34
Show Gist options
  • Select an option

  • Save alexandreprates/f38e6b789e46765ecfb1878ef5b63dd4 to your computer and use it in GitHub Desktop.

Select an option

Save alexandreprates/f38e6b789e46765ecfb1878ef5b63dd4 to your computer and use it in GitHub Desktop.
Youtube floating popout for i3
#!/bin/bash
tempfile="/tmp/$(date +%s).html"
cat <<EOS > $tempfile
<html>
<head><meta charset="UTF-8"><title>Youtube Pop-up</title></head>
<body><iframe width="640" height="360" src="$1" frameborder="0" allowfullscreen></iframe></body>
</html>
EOS
google-chrome-stable --chrome-frame --window-size=660,380 --app="file://$tempfile" &
sleep 1
rm -v "$tempfile"
@alexandreprates
Copy link
Author

alexandreprates commented Sep 14, 2016

How to install:

  • Add this config to ~/.i3/config
    for_window [window_role="pop-up"] floating enable #Floating pop up window
  • Reload i3 confs (mod+shift+r)
  • Save youtube_popup in somewhere in path
  • Give youtube_popup executable permission

How to use:

  • call youtube_popout with video url as params
    youtube_popup "https://www.youtube.com/watch?v=ZrxsKUYXp9U"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment