Comments (9)
It is to uniquely identify a video.
I could have removed it and researched the field using grep but that doesnt work 100% with some titles having wierd characters.
I will remove the urls and replace them by serial numbers to make it look clean.
One more solution is to alter the width, if the width is big enough the url will be hidden. Ill add this as a default in the fzf version.
from ytfzf.
Excellent idea with the ID looks much cleaner.
My 14" x230 has not much screen :)
Finally a usable solution with the most amount of Info's.
Especially with the youtube-dowoad mpv plugin.
Love the work.
from ytfzf.
Thankyou,
I am not a programmer, and this is my first proper project. Please do let me know if you find me making mistakes.
The current version auto resizes the search result fields based on the terminal size.
format_fzf () {
dur_len=7
view_len=10
date_len=14
url_len=12
t_size="$(stty size | cut -f2 -d' ')" # This gives you terminal size
if [ $t_size -lt 75 ]; then
# title channel
frac=$(((t_size - 1)/4))
title_len=$((frac * 3))
channel_len=$((frac * 1 + 7))
elif [ $t_size -lt 95 ]; then
# title channel time
frac=$(((t_size - 4)/8))
title_len=$((frac * 5 - 1))
channel_len=$((frac * 2 - 1))
dur_len=$((frac * 1 + 10))
elif [ $t_size -lt 110 ]; then
# title channel time views
frac=$(((t_size - 1)/9))
title_len=$((frac * 5 ))
channel_len=$((frac * 2 ))
dur_len=$((frac * 1))
view_len=$((frac * 1 + 7))
elif [ $t_size -lt 130 ]; then
# title channel time views date
frac=$(((t_size - 5)/11))
title_len=$((frac * 5 - 1))
channel_len=$((frac * 2))
dur_len=$((frac * 1))
view_len=$((frac * 1))
date_len=$((frac * 2 + 20))
else # all
frac=$(((t_size - 5 - 12)/11))
title_len=$((frac * 6 - 1))
channel_len=$((frac * 3/2))
dur_len=$((frac * 1))
view_len=$((frac * 1))
- date_len=$((frac * 3/2 ))
+ date_len=$((frac * 3/2 + 20 ))
fi
}
One solution could be to push the url to the right by changing the last line as such
I will replace url with serial no. in the next push.
from ytfzf.
I have updated fzf formatting to hide the urls
from ytfzf.
that's how it looks on a 14"
https://imagebin.ca/v/5slnhrIkHgzP
Thanks
from ytfzf.
The image doesnt seem to open can you it send again.
from ytfzf.
from ytfzf.
Okay, so the width is too much since your screen size is low.
YTFZF_EXTMENU_LEN=150 ytfzf -D
Run this for different values, till you find something you are comfortable with .
Then export it in your rc files (example: ~/.bashrc)
export YTFZF_EXTMENU_LEN=150
from ytfzf.
@se7en-x230
Let me know if this solves the width issue you are facing.
from ytfzf.
Related Issues (20)
- [BUG]: readline bindings don't work as expected in fzf interface HOT 2
- [BUG]: [ERROR]: Nothing was scraped HOT 4
- Using submenus HOT 2
- strange bug overwriting and repeat text on top of first text HOT 8
- [Feature request]: interactively change the sort order HOT 2
- [BUG]: Misaligned description items on start with --preview-side=bottom HOT 2
- [Feature request]: Enable external thumbnails without info pane in fzf or preserve thumbnail viewer window HOT 2
- [BUG]: Broken character encoding when using the yt-music scraper HOT 11
- [BUG]: socat, and mpv must be installed for the mpv thumbnail viewer
- [BUG]: mpv installed with flatpak is not recognized HOT 4
- [BUG]: thumbnails won't load when requesting more pages HOT 2
- [BUG]: shift `-1` is not a valid option HOT 1
- [BUG]: using nonalphanumeric characters in optstring produces unspecified results HOT 2
- [Feature request]: shuffle playlist HOT 4
- How do I change the default quality of the videos? HOT 2
- [Feature request]: YouTube Podcast
- how to show the video thumbnail imae on the terminal HOT 1
- how to play only audio using elisa music player
- Subscriptions are not working on OpenBSD HOT 1
- [BUG]: ERROR: Nothing was scraped no matter which instance I use HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ytfzf.