Creating A "Help" Program For DTOS Using Dmenu

  Рет қаралды 11,972

DistroTube

DistroTube

Күн бұрын

Пікірлер: 54
@user-ux2kk5vp7m
@user-ux2kk5vp7m 3 жыл бұрын
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
@DistroTube
@DistroTube 3 жыл бұрын
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. ;)
@haidermirza192
@haidermirza192 3 жыл бұрын
Thank you for making videos on scripting. Has become VERY useful lately.
@sharqueeshajohnalaneesha2019
@sharqueeshajohnalaneesha2019 3 жыл бұрын
2:47 No, it was a beginner’s mistake
@vlatkosurlan545
@vlatkosurlan545 2 жыл бұрын
Should've been 'Shift+v G' to select visually everything to the end of the buffer. Thanks for your work! Love it!
@Miguel_GM
@Miguel_GM 3 жыл бұрын
Great video. I like this step-by-step scripting videos. They are very educational. Thanks!
@Chinmoku_No_Te
@Chinmoku_No_Te 3 жыл бұрын
Much appreciated brah, I'm totally loving DTOS!!! I got it on my main production desktop and laptop!!!
@DistroTube
@DistroTube 3 жыл бұрын
^^ This guys lives dangerously! :D
@haidermirza192
@haidermirza192 3 жыл бұрын
I did it the very first minute you posted the initial video on my main machine.
@zhenya2055
@zhenya2055 3 жыл бұрын
Testing in PROD is the best kind of testing. Finds all the bugs extremely quickly. And fixes get implemented at an expedited pace. :D
@BlindRambler
@BlindRambler 3 жыл бұрын
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.
@jonnypeace2810
@jonnypeace2810 3 жыл бұрын
Always learn something from fellow script writers, great stuff :)
@ewancox4895
@ewancox4895 3 жыл бұрын
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.
@wer3eng760
@wer3eng760 3 жыл бұрын
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.
@0x007A
@0x007A 3 жыл бұрын
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.
@stephenreaves3205
@stephenreaves3205 3 жыл бұрын
Have you gone over how you make the strikethroughs in your vims replacement? Or is that an evil mode feature?
@DistroTube
@DistroTube 3 жыл бұрын
The default behavior in Doom Emacs.
@swayamshree5951
@swayamshree5951 3 жыл бұрын
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
@SlideRSB
@SlideRSB 3 жыл бұрын
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]}
@DistroTube
@DistroTube 3 жыл бұрын
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.
@SlideRSB
@SlideRSB 3 жыл бұрын
@@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.
@ganeshhkuramsetti
@ganeshhkuramsetti 3 жыл бұрын
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 😊
@henrikmunch8609
@henrikmunch8609 3 жыл бұрын
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!
@vgg175
@vgg175 3 жыл бұрын
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)
@mohammedhaman6517
@mohammedhaman6517 3 жыл бұрын
Yup.
@edbeckerich3737
@edbeckerich3737 3 жыл бұрын
Get rid of YT adds too
@Ironpants57
@Ironpants57 3 жыл бұрын
If only the cache wasn't so slow in mpv :/
@robertoaks8260
@robertoaks8260 3 жыл бұрын
First DT ❤️
@DistroTube
@DistroTube 3 жыл бұрын
🎉 Congrats!
@voiceofthetrue1849
@voiceofthetrue1849 3 жыл бұрын
Hey DT! You should pip it to mpv instead.
@DistroTube
@DistroTube 3 жыл бұрын
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.
@amiraloi1694
@amiraloi1694 3 жыл бұрын
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.
@deansundquist9601
@deansundquist9601 3 жыл бұрын
This man would have been a wonderful radio host if it was 1935. Give er a bad shebang
@svenkarlsen2702
@svenkarlsen2702 3 жыл бұрын
Aren't array keys limited by length/charset?
@ocsanik502
@ocsanik502 3 жыл бұрын
Always end if statements with a hanging ifelse just to scare it into working.
@simondj8572
@simondj8572 3 жыл бұрын
waht about sway wm ?
@michaelplaczek9385
@michaelplaczek9385 3 жыл бұрын
Hey DT, why do you Emacs instead of Vim?
@ShitTot
@ShitTot 3 жыл бұрын
Might be answered in his video here... [Vim vs Emacs. Which is Better?] kzbin.info/www/bejne/jJKllZ-ZjsaNgrM
@SlideRSB
@SlideRSB 3 жыл бұрын
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_
@stevie1da_ 3 жыл бұрын
Its funny, ChrisTitusTech just finished his arch install script. Now you can combine forces and make a proper arch based distro
@fallsdp
@fallsdp 3 жыл бұрын
They are approaching things from somewhat different perspectives. But…yes….these two have very interesting projects.
@N0zer0
@N0zer0 3 жыл бұрын
No, it's not funny. CTT stopped using Linux, switched back to Windows and promotes that. Just ignore that guy.
@ghareluvlogger3234
@ghareluvlogger3234 3 жыл бұрын
please try a steno keyboard
@mrchristoph5674
@mrchristoph5674 3 жыл бұрын
Hope be doesn't get de monitized for "assarray"
@aratof18
@aratof18 3 жыл бұрын
Not first
@DistroTube
@DistroTube 3 жыл бұрын
Confirmed!
@thefossenjoyer3346
@thefossenjoyer3346 3 жыл бұрын
Nah, I'm not first.
@11WicToR11
@11WicToR11 3 жыл бұрын
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 !
@edbeckerich3737
@edbeckerich3737 3 жыл бұрын
Pipe it ytfzf
@leviticus8930
@leviticus8930 3 жыл бұрын
Dmenu. No Bloat. Merica
@hy42jo
@hy42jo 3 жыл бұрын
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 ?
@thenextpoetician6328
@thenextpoetician6328 3 жыл бұрын
Beginner's ...
Want A List Of Your Keybindings? Write A Shell Script!
27:11
DistroTube
Рет қаралды 24 М.
Essential Linux Commands - Cat, Tac and Tee
21:07
DistroTube
Рет қаралды 24 М.
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН
«Жат бауыр» телехикаясы І 30 - бөлім | Соңғы бөлім
52:59
Qazaqstan TV / Қазақстан Ұлттық Арнасы
Рет қаралды 340 М.
Solve Problems With Shell Scripting And Dmenu
18:26
DistroTube
Рет қаралды 33 М.
Let's Share Our Favorite Bash Aliases
16:28
DistroTube
Рет қаралды 32 М.
TCP/IP for Programmers
3:03:31
Eli the Computer Guy
Рет қаралды 243 М.
dmenu: Your own Custom Script Menus!
10:29
Luke Smith
Рет қаралды 139 М.
Systemd Explained: The Ultimate Deep Dive for Linux Users
47:41
Learn Linux TV
Рет қаралды 206 М.
Essential Keybindings For Bash, Fish and Zsh
16:41
DistroTube
Рет қаралды 30 М.
I Used NixOS For 9 Months - Long Term Review
35:54
The Linux Cast
Рет қаралды 68 М.
So, I Tried Arch Linux.. (and Hyprland btw)
36:10
Livakivi
Рет қаралды 239 М.