I like these kinda videos where the presenter shows the problem and how they solved it, from a purely problem-solving mindset, instead of holding your hand telling you what to do so that you can just copy-paste their code and learn nothing from it
@agushex3 жыл бұрын
Totally agree, when coding mistakes WILL happen, people need to understand that because they tend to believe that if something doesn't work something is going to break... which well can be true in some extreme cases like it happen to me yesterday but if you're just playing with sed and grep it's okay xD
@temudjin11553 жыл бұрын
That is what I like when I watch your videos : You make mistakes and you show how to deal with the problems. Great man
@Noukkis3 жыл бұрын
You can get rid of the invert grep by using '^\s*, ("' instead of ', ("' o the first one, or even simply '^, ("' if you get rid of the spaces first. And also, you can use \s instead of [\t ] in sour sed command (\s basically means "all stuff that looks like a space but might not actually be that actual character")
@yoannguillard68773 жыл бұрын
So something like this : ^\s*[[,] (" Would do complete job !
@jeremywhetzel40073 жыл бұрын
What a great idea! That's been the one thing that's made it hard for me to get into tiling window managers, and it never occurred to me to just parse the bindings out of the config file. Thanks for showing how easy it can be!
@freedombsd25393 жыл бұрын
AwesomeWM Windows Manager is not as Awesome as Derek's tips and tutorials! I no longer fear the terminal and scripts. Thank you for my daily dose of DT.
@Zoltar3583 жыл бұрын
Ingenious. I think you should make more videos like that.
@justjie10083 жыл бұрын
I really like how your terminal looks as it shows terminal with having the word “terminal” on the top
@Not-THAT-ChrisPratt3 жыл бұрын
Thanks for introducing yad. I appreciate these little utility programs. Please introduce more of these as you see fit.
@edwardsmith12373 жыл бұрын
A very nice tutorial, DT, and a great way to show less confident users that you can make nice and useful scripts by starting with an idea of what you want to achieve, and then working thru the steps bit by bit. I like how you tested each step before proceeding to the next one. Yes, I'm sure the super duper ninja scripters will (and have) point out faster ways of doing this, but that's missing the point. Keep up the good work!
@matthewmiller36302 жыл бұрын
Distro, you are an underreated teacher. Thanks for these great videos.
@fakharhaider23573 жыл бұрын
Just the video I needed, I literally subbed to this channel so that I can learn a bit about Linux before switching to it, nice to see that this channel actually gives you the content you need, awesome video keep it up, I Hope you make a video about sudo and other command previleges and how to remember them just like this method Thanks
@clayotissmith1583 жыл бұрын
I am personally a huge fan of using grep like: grep (-v) "first pattern\|second pattern\|third pattern" Rather than multiple grep commands or splitting it between multiple lines. I know that Linux source commits mandate lines be less than 100 columns, but damn is bash hard to read when split between multiple lines with how terse it is. I just wish see had a similar technique to prevent a large sed command from being so hard to read and follow.
@whale50863 жыл бұрын
Awesome vid! Taught me a few neat tricks. Wasn't aware of the Yad program either, and I've been looking for something exactly like that for one of my own scripts! Thanks :)
@torsten.breswald3 жыл бұрын
parsing through a text file, transform the text and put it out, that screams for awk, and you can use awk for everything i learned on a channel called distrotube, maybe you've heard of ^^ i'm just to lazy right now to tinker it out myself, but i would try to filter for "spawn" then set the delimiter to the double quote " to have like 4 fields, strip away some unneeded stuff and give that to yad, yea as i think about it, it wouldn't be any shorter then, so many ways lead to rome i guess i appreciate you leaving your fails in the video, often times these mistakes help me more than just the run over the script
@IvicaAnteski3 жыл бұрын
thank you DT, just what I needed!
@Danielddiniz3 жыл бұрын
Derek You always anticipate our needs my friend! Thanks 😊 🙏🏻 as always for the video and your teaching skills are amazing!
@stevie1da_3 жыл бұрын
I have a little script in my qtile build that generates a markdown file with all my keybinds whenever I restart qtile. I also have a bind that opens that markdown file in a viewer for a quick help menu!
@krzysztofwaleska2 жыл бұрын
Do you share it somewhere? I would be very much interested in something like this. MarkDown sounds like very good idea. Qtile lacks functionality in that region.
@SilentFire083 жыл бұрын
I see you changed your audio recommed audio software from audacity to ardour can you make a video about it?
@indrajitsarkar31693 жыл бұрын
great timing, I was looking for a solution to this exact problem
@snipzmattio58873 жыл бұрын
This is a amazing idea/video! Thank you so much
@Chris-ip8uv3 жыл бұрын
Good stuff, DT. Thank you!
@Jeff_Seely Жыл бұрын
I am really enjoying the DTOS config and this is a good piece to the key bindings puzzle😁. And Awesome is very aptly named. Being rather new to TWM I find it quite a bit easier to hop around on. All good things though 👍
@himalpoudel75583 жыл бұрын
This is what I wanted forever
@RAndrewNeal3 жыл бұрын
Before getting 5 minutes into the video, I paused it and did it for my i3 config file. I colored all the output to make it easy to read. But since I colored it with ANSI escape codes, I couldn't properly display it in YAD, so it displays in the terminal.
@GodIsTheReason3 жыл бұрын
This is a fun idea for someone who already likes tinkering with TWMs and shell scripts, but honestly... I don't think you're going to convince anyone else to start using TWMs and shell scripting with this video ;)
@jrlepage3 жыл бұрын
@DT this was amazing!! Btw, how much caffeine did you consume before recording this? 😂
@BenitoF20093 жыл бұрын
Hey DT! Thank you very much! That came exactly at the right time! 👍 And it works great with xfce. I only just had to change the file to read from and some commands.
@Phydoux21123 жыл бұрын
Great stuff! I love shell scripting! Yad is a new one for me. I'll have to play around with that one of these days. Looks pretty slick. BTW, I'm running AwesomeWM and I tried the holding the Super Key and the shortcuts did not come up.
@ZuluEchoRomeoOscar3 жыл бұрын
Super + 's' in the default config I believe...
@Phydoux21123 жыл бұрын
@@ZuluEchoRomeoOscar thanks. I'll try that when I get home tonight.
@lamprospitsillou63253 жыл бұрын
Can you please do a video on yad? There isn't much online and my imagination goes wild from the uses i can think in scripts!
@MrQwebek3 жыл бұрын
Is it like when you love your old car and keep upgrading it instead of switching to new one and live further?
@florianfelix82953 жыл бұрын
A true real world problem :D
@soanvig3 жыл бұрын
I would print this as table using column command
@FedoraRose3 жыл бұрын
Man that’s really helpful 😂👌
@bostickdoesmusic17463 жыл бұрын
I always just write out a text file called like .keyhelp or something and list all the keybindings there. Then I alias it in my zshrc with cat so "keyhelp" just pops them out in the terminal for me.
@XenHat3 жыл бұрын
Nice! You really need to up your regex game though, DT.
@TheJustinist3 жыл бұрын
@@detboi2287 But is really powerful even with just the basics
@dkosmari3 жыл бұрын
I was going to comment something like this, but he's actually teaching a very useful way to build up a regex by iteration. Instead of having to think how to combine multiple regexes, it's easier to just supply them separately.
@gerarddelapatefeuilletee40633 жыл бұрын
I wonder if I have a hearing problem or a vision problem: I hear you say that you use emacs, but what I see is vim and its typical keystrokes. Anyways, thanks for the scripting tips and tricks, I must see that yad thing.
@YannMetalhead2 жыл бұрын
Fantastic video.
@maskedredstonerproz3 жыл бұрын
11:11 Can't you pipe everything through awk, and then use that to print the keybindings and what they are used for??
@act.13.413 жыл бұрын
He stated in the video that he could have done it in awk, but viewers have been asking for things done other ways. This was done for the noobs (like me) who don't know awk.
@elys75633 жыл бұрын
Can we make some(4-5) keybinding script and show it in yad and by select any script would show the particular dialogue? Like in qutebrowser
@megabates90163 жыл бұрын
Great video, thx 👍👍
@fauzirfandika3 жыл бұрын
Hey DT, great vid as usual! I've been trying to record a video/podcast (linux related stuffs, in my language) and having trouble with the speech (kinda nervous and all), any tips on that? Do you make script about the topics? I would love to see and learn how you do the creative process (mainly pre-recording stuffs like topic research, script writing, etc) on making a video!
@TON-vz3pe3 жыл бұрын
Shell script is pretty easy to write once practice.
@j777111able3 жыл бұрын
3+ people with perfect memories disliked this video. 🤷♂️
@terrydaktyllus13203 жыл бұрын
More like three self-entitled people with parents that didn't say the word "no" enough to them in their formative years.
@MsAlfred19963 жыл бұрын
Where can I learn all this programs like grep, sed and such ?? How do I know how many of these are ??
@foobars38163 жыл бұрын
learn regex ask they all just use that.
@MsAlfred19963 жыл бұрын
@@foobars3816 What is "regex" ?
@beardog52452 жыл бұрын
That was awesome
@hamzab18213 жыл бұрын
Make more of this worflow video. awesome
@dougtilaran34963 жыл бұрын
XFCE rules the key game.
@GreyDeathVaccine3 жыл бұрын
XML file?
@JuanPerez-iu9vk Жыл бұрын
Thank you
@noferblatz3 жыл бұрын
Wouldn't it have been easier to just use "spawn" for your search criteria? Is that guaranteed to catch all the key bindings?
@DistroTube3 жыл бұрын
The "spawn" isn't used in all keybindings.
@jondow19883 жыл бұрын
its diffcult if you have keybindings all around your config files. maybe awk is a better option to do that. since it process line by line all the file.
@jondow19883 жыл бұрын
very easy with awk interpreter. just get the patterns you wanna grab, and awk will output all lines matching those patterns. and also you can use awk interpreter. no need to use the shell. an awk script would be nice.
@leviticus89303 жыл бұрын
Dude, who do you use for internet? I would have done gone Nick Saban on them.
@bullpup1337 Жыл бұрын
I would have used awk I think.
@ejbully3 жыл бұрын
In all honesty After I remeber my binds They are similar across $USER I sort of like the mysteriousisty of not having a handicap. Only I know my shortcuts. It doesn't need to advertised. BUT regardless scripting is ALWAYS fun
@misterchief53783 жыл бұрын
dwm lists all the keybindings in config.h
@FreeRoger3 жыл бұрын
5th! I mean 3rd!
@FreeRoger3 жыл бұрын
@Hai Red i was doing a monty python reference
@dkosmari3 жыл бұрын
"So what's the best way to do this" is how you start on the wrong foot, as a shell script programmer. The time to second guess yourself is after the point of no return.
@terrydaktyllus13203 жыл бұрын
Nonsense! That's exactly how you ***DO*** write a shell script - you decide what the problem is you want to solve, and that start thinking about the best ways to do each part. And what do you mean by "second guess yourself"? How can you "guess" something that is already inside your own head anyway? How many shell scripts have you written? Not too many by the sound of it, if you spend that much time faffing about.
@ananthuskumar12863 жыл бұрын
use regex instead of 2 grep, ^
@terrydaktyllus13203 жыл бұрын
Why? He's trying to solve a problem, not impress someone looking over his shoulder with his coding expertise. Once a script works and you've solved the problem that you need to solve, then you can keep going back to it later and refining it. If you're always trying to "impress your friends", you'll never get anything finished.
@Tn5421Me3 жыл бұрын
tfw DT isn't a Haskell Witch
@tetbundy56833 жыл бұрын
Use column -s ',' -t to get a nice table format instead of substituting with colon Not respected by yad tough :(
@moutasim_ayoubi3 жыл бұрын
First
@DistroTube3 жыл бұрын
Confirmed!
@jrlepage3 жыл бұрын
Doh did ya beat me? Haha congrats 🎊
@moutasim_ayoubi3 жыл бұрын
@@jrlepage Haha Gg
@FekuEntertainmentLtd2 жыл бұрын
Why not just use an inverse grep, with pattern "\-\- *" and remove all comments.
@alexzander__63343 жыл бұрын
please update video title to mention that these keybindings are ONLY for xmonad
@killistan3 жыл бұрын
Performance wise (not that it matters), I think you could do all of that with a single invocation of sed. Sanity wise, maybe Perl would be a good fit for this?