VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » IT, programs, coding
Want A List Of Your Keybindings? Write A Shell Script! DistroTube

Want A List Of Your Keybindings? Write A Shell Script! DistroTube

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Want A List Of Your Keybindings? Write A Shell Script! DistroTube I love showing real-world problems being solved through the use of shell scripting. One question I often get is How can I get complete list of my keybindings for my window manager? So I will show you how I could quickly write a script to do this for my Xmonad desktop, and you could do the same for any window manager that you use. NOTE: I have NOT uploaded the script in this video to my GitLab yet due to an Internet outage (again!). I will try to upload it for you guys tomorrow
Date: 2022-03-30

Comments and reviews: 10


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.

reply

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!
reply

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!
reply

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.
reply

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
reply

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.
reply

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

reply

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.

reply

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 ;)
reply

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!
reply
Add a review, comment






Other channel videos