Another way to add quotes to the end of all the lines is to select them and do the command s/$/"/ It replaces the end of each line with a quote. You can do the same with ^ to prepend text to lines
@DistroTube3 жыл бұрын
Yea a substitution works. I could have also used command mode like I did inserting the text at the beginning of the line. But I had already shown both of those, so I thought I'd show how a macro works. ;)
@haidermirza1923 жыл бұрын
Thank you for making videos on scripting. Has become VERY useful lately.
@sharqueeshajohnalaneesha20193 жыл бұрын
2:47 No, it was a beginner’s mistake
@vlatkosurlan5452 жыл бұрын
Should've been 'Shift+v G' to select visually everything to the end of the buffer. Thanks for your work! Love it!
@Miguel_GM3 жыл бұрын
Great video. I like this step-by-step scripting videos. They are very educational. Thanks!
@Chinmoku_No_Te3 жыл бұрын
Much appreciated brah, I'm totally loving DTOS!!! I got it on my main production desktop and laptop!!!
@DistroTube3 жыл бұрын
^^ This guys lives dangerously! :D
@haidermirza1923 жыл бұрын
I did it the very first minute you posted the initial video on my main machine.
@zhenya20553 жыл бұрын
Testing in PROD is the best kind of testing. Finds all the bugs extremely quickly. And fixes get implemented at an expedited pace. :D
@BlindRambler3 жыл бұрын
I'm not going to install yet, but I might actually put it on my current machine when I get a new machine just after January.
@jonnypeace28103 жыл бұрын
Always learn something from fellow script writers, great stuff :)
@ewancox48953 жыл бұрын
In vim, there is a quicker way to add something to multiple lines using "Visual block" mode; 1) Use Ctrl+V to enter mode 2) Then simply down arrow (or J key) to highlight the beginning of all of the desired lines you wish to prefix 3) Then use Shift+I to enter insert mode at the beginning of the top line to start typing 4) Then press Esc key to re-enter normal mode and in doing so, Vim will prepend each of the previously selected lines with the text you entered on the first line. You can also use this method to quickly add text to the end of each line without the need for a macro. Simply follow as above, with a few differences; 1) Go to end of the first line to add text to 2) Use Ctrl+V for Visual block mode and select the desired lines 3) Use Shift+A for append text mode 4) Enter the text to append to each of the lines selected in Step 2 5) Press Esc to exit back to normal mode, writing the text to all of the lines in the process.
@wer3eng7603 жыл бұрын
Not sure if doing 2 normal commands but then resulting to doing a macro just for the closing ending quote is really the way to do that instead of just sticking with normal commands or doing only one macro in the first place. But all right.
@0x007A3 жыл бұрын
DT may have been demonstrating two ways to modify multiple lines of text without worrying about optimisations. The closing quote mark could, as you said, been done the same way as the other two edits.
@stephenreaves32053 жыл бұрын
Have you gone over how you make the strikethroughs in your vims replacement? Or is that an evil mode feature?
@DistroTube3 жыл бұрын
The default behavior in Doom Emacs.
@swayamshree59513 жыл бұрын
It is surprising that this video showed up on my timeline as I am working on my own post installation script for ubuntu using spectrWM
@SlideRSB3 жыл бұрын
13:50 Why are you using printf inside of command substitution to get the video url? Can't you just take the array value and assign it to your url variable? url=${dtvids[$title]}
@DistroTube3 жыл бұрын
Of course, I could do that! Keep in mind that this was a "I'm doing this on the fly" kinda video. ;) That being said, I have removed the unnecessary printf in the script now.
@SlideRSB3 жыл бұрын
@@DistroTube Fair enough. Always interested to see your thought process during a live coding session. As for myself, I don't normally think to resort to command substation until other solutions fail to execute the desired objective.
@ganeshhkuramsetti3 жыл бұрын
may be we can use mpv .. if someone intrested only in the video content but not on the comments or show notes. We can add that choice 😊
@henrikmunch86093 жыл бұрын
6:33 How are you able to highlight not only all the instances of the search, but also the how the text would look after the replacement? PS: great vid!
@vgg1753 жыл бұрын
i have an idea for this script! I think pæaying the video in mpv over qutebrowser would be best (less load time and mpv is better for playing videos)
@mohammedhaman65173 жыл бұрын
Yup.
@edbeckerich37373 жыл бұрын
Get rid of YT adds too
@Ironpants573 жыл бұрын
If only the cache wasn't so slow in mpv :/
@robertoaks82603 жыл бұрын
First DT ❤️
@DistroTube3 жыл бұрын
🎉 Congrats!
@voiceofthetrue18493 жыл бұрын
Hey DT! You should pip it to mpv instead.
@DistroTube3 жыл бұрын
Mpv is going to have a lot of latency and new users are going to wonder if they even selected something when mpv takes forever to load. Of course, anyone could edit the script and change "qutebrowser" to "mpv". But the browser is definitely the better default in this case.
@amiraloi16943 жыл бұрын
Hey DT can you test Qubes OS on a video? I checked tour channel for such a video but I didn't find anything yet.
@deansundquist96013 жыл бұрын
This man would have been a wonderful radio host if it was 1935. Give er a bad shebang
@svenkarlsen27023 жыл бұрын
Aren't array keys limited by length/charset?
@ocsanik5023 жыл бұрын
Always end if statements with a hanging ifelse just to scare it into working.
@simondj85723 жыл бұрын
waht about sway wm ?
@michaelplaczek93853 жыл бұрын
Hey DT, why do you Emacs instead of Vim?
@ShitTot3 жыл бұрын
Might be answered in his video here... [Vim vs Emacs. Which is Better?] kzbin.info/www/bejne/jJKllZ-ZjsaNgrM
@SlideRSB3 жыл бұрын
Instead of editing all of that table data to shoehorn it into an associative array, I think a better approach would have been to wrap it into a Heredoc and then read the entire table into a shell variable. Then you could pipe it into cut or awk to present the list of titles with dmenu. Once a choice has been made, grep the selection against the variable containing the Heredoc to get the line and then use cut or awk again to get the URL. That will also get rid of all your bashisms and make things more POSIX.
@stevie1da_3 жыл бұрын
Its funny, ChrisTitusTech just finished his arch install script. Now you can combine forces and make a proper arch based distro
@fallsdp3 жыл бұрын
They are approaching things from somewhat different perspectives. But…yes….these two have very interesting projects.
@N0zer03 жыл бұрын
No, it's not funny. CTT stopped using Linux, switched back to Windows and promotes that. Just ignore that guy.
@ghareluvlogger32343 жыл бұрын
please try a steno keyboard
@mrchristoph56743 жыл бұрын
Hope be doesn't get de monitized for "assarray"
@aratof183 жыл бұрын
Not first
@DistroTube3 жыл бұрын
Confirmed!
@thefossenjoyer33463 жыл бұрын
Nah, I'm not first.
@11WicToR113 жыл бұрын
and you did that all manually? xD have you heard of youtube-dl ? *youtube-dl -e "video url or channel url"* => gets title *youtube-dl --get-id "video url or channel url"* => gets video id you paste at the end of youtube url its funny that your "linux tingle" didnt go off after you copy and pasted things 50+ times. That baffles me *EDIT:* at the last line of his script add: *mpv $url* when you have youtube-dl and mpv they work together to avoid using entire browser to play ads then video but instead play it in neat separate video player !
@edbeckerich37373 жыл бұрын
Pipe it ytfzf
@leviticus89303 жыл бұрын
Dmenu. No Bloat. Merica
@hy42jo3 жыл бұрын
sorry @DT, I can not really follow you - why putting Data and Programm into one File ? - You can read that from Stream (ls or preprocessed file) - so here you have to preprocess the Data every time it changes manually ??? - have I missed something ?