- 51
- 482 190
Bread on Penguins
United States
Приєднався 19 бер 2016
Bread (me), on penguins (linux).
If you read this, make a comment about an actual irl penguin to confuse people :^)
If you read this, make a comment about an actual irl penguin to confuse people :^)
Linux shell magic and bash easter eggs
Bash wizardry, zsh tetris (yeah that's a thing), calendar of 1752, and more :^)
Painting is by Friedrich Voltz, called Hirtenkinder im Wald mit Kühen und Schafen - circa 1850.
Painting is by Friedrich Voltz, called Hirtenkinder im Wald mit Kühen und Schafen - circa 1850.
Переглядів: 2 760
Відео
Window Transparency & Blur on Linux with picom compositor
Переглядів 2,8 тис.16 годин тому
my config: github.com/BreadOnPenguins/dots github.com/yshui/picom picom.app wiki.archlinux.org/title/Picom
Notifications on Linux window managers (notify-send & dunst)
Переглядів 4,5 тис.14 днів тому
A full guide to setting up desktop notifications with libnotify (notify-send) and dunst - for WMs like dwm, i3, Hyprland, etc - anything that comes without a notification server. Arch Linux wiki page: wiki.archlinux.org/title/Desktop_notifications Dunst github: github.com/dunst-project/dunst Dunst docs: dunst-project.org/documentation/
snow
Переглядів 2,8 тис.14 днів тому
music and footage by me ua-cam.com/video/Zukh7-w41R0/v-deo.html kdenlive / lmms
Simple video recording and editing with ffmpeg on Linux
Переглядів 7 тис.21 день тому
Scripts: github.com/BreadOnPenguins/scripts ffmpeg: ffmpeg.org/ a useful guide: amiaopensource.github.io/ffmprovisr/ Wayland example: ffmpeg -device /dev/dri/card1-re-fkms-grab -i - -vf hw:vaapi=force_hw_enc_id=VP9,format=bgra test.mkv
THIS is how to control RGB on Linux (OpenRGB)
Переглядів 5 тис.28 днів тому
1:11 How to download and install 1:45 Supported devices 2:32 How to install plugins manually 3:45 Application tour 5:50 How to set up RGB audio visualizer 7:28 CLI options OpenRGB: openrgb.org/ Plugins: openrgb.org/plugins.html and its FAQ page: gitlab.com/OpenRGBDevelopers/OpenRGB-Wiki/-/blob/stable/User-Documentation/Frequently-Asked-Questions.md For setting up an audio visualizer, commands t...
Brute-forcing New Year's Resolutions
Переглядів 4 тис.Місяць тому
Brute-forcing New Year's Resolutions
some music
Переглядів 7 тис.Місяць тому
Bartók's Romanian Folk Dances. Scuffed, but worth sharing ;^) Next vid Sunday.
my pc setup (YEAH I KNOW IT'S CRINGE)
Переглядів 24 тис.Місяць тому
aRcH LiNuX gAmEr FleXeS bAttLEstAtioN (setup tour) 5:00 for my pc build, mic is a Tonor TC 777.
dwmblocks - script for music now-playing module 🎵
Переглядів 4 тис.Місяць тому
The shell script: github.com/BreadOnPenguins/scripts Dwmblocks in depth: ua-cam.com/video/zmrTL0S2u1E/v-deo.html Playerctl: github.com/altdesktop/playerctl Painting is by Estonian artist Konrad Mägi (1878 - 1925): Maastik Eestist. Audio visualizer: github.com/karlstav/cava
Definition shell script and how to use dictionaries on Linux
Переглядів 4 тис.Місяць тому
Painting is by Estonian artist Konrad Mägi (1878 - 1925): Maastik Eestist. Script: github.com/BreadOnPenguins/scripts API: github.com/meetDeveloper/freeDictionaryAPI StarDict guide: owenh.net/stardict Dictd: wiki.archlinux.org/title/Dictd
Custom theme ANY website (Firefox or Chrome)
Переглядів 6 тис.Місяць тому
Custom theme ANY website (Firefox or Chrome)
wttr.in - the best way to check weather
Переглядів 10 тис.Місяць тому
wttr.in - the best way to check weather
Can I stop distro-hopping music players?
Переглядів 7 тис.2 місяці тому
Can I stop distro-hopping music players?
Learning isn't worth my time!1!!1!1
Переглядів 9 тис.2 місяці тому
Learning isn't worth my time!1!!1!1
Cliphist script, and my new github
Переглядів 4,8 тис.2 місяці тому
Cliphist script, and my new github
More shell tricks and bash wizardry !
Переглядів 7 тис.2 місяці тому
More shell tricks and bash wizardry !
Where I find wallpapers, & pywal (highly requested lol)
Переглядів 7 тис.2 місяці тому
Where I find wallpapers, & pywal (highly requested lol)
5:17 - haha, what if you replaced the spin characters with ✃ ✂ ✁ ✂ ? :D [note, this emojified some of those, but it looks different in shell] [I'm sure lots of other fun choices could be made, too.]
3:41 - FWIW, in zsh, this last-command check can be done without running a separate command, using the "%(...)" expansion... which is documented in man zshmisc (or man zshall) under "%(x.true-text.false-text)"... so in this case something like "%(?.$GREEN.$RED)>$NORM " would do the trick, assuming you'd pre-assigned those color escapes to the appropriate variables. :) Similar possibilities exist in bash, though less elegant... For example, I like to actually put the numeric value of the exit status into my prompt (because it varies, and is occasionally meaningful). For doing so, this works (assuming all the color names are set to the appropriate escapes already -- or you could set them to test strings to see how it works) in at least ksh (it lingers in my files from when I was using that, and I just tested it to double check), bash, and zsh, and makes the exit status show up as either red or green depending on whether it was non-zero or zero, respectively: PSs="${RED}\${?#0}${NORM}${GREEN}\${?##[1-9]*}${NORM}" (It works by making an empty string out of a 0 value in the red portion, and an empty string out of a non-zero value in the green portion.) Though, I later discovered that I actually wanted to distinguish between a 1 exit status (which I make yellow), a 130 exit status (what happens when you use ctrl-C to kill something, which I make magenta), a 0 exit status (green), or any other non-zero exit status (red)... I do that in my .zshrc with the following lines (which I guess I should put in a public repo somewhere?? anyway...) PS1_EXIT_STATUS="%{%(?.${GREEN}.%(1?.${YELLOW}.%(130?.${MAGENTA}.${RED})))%}%?%{${NORM}%}" # red '#' for root or green '$' for non-root: PS1_ULTIMATE_PROMPT="%(#.%{%{${RED}%}#.%{${GREEN}%}\$)%{${NORM}%}" SMALL_PS1=": %3C-${PS1_EXIT_STATUS}-${PS1_ULTIMATE_PROMPT}; " PS1=": ${BASE_PS1}-${PS1_EXIT_STATUS}-${PS1_ULTIMATE_PROMPT}; " (FYI, I use ": ...; " as my prompt, because then my prompt is a null command, so I can copy/paste command lines including my prompt and they'll run just the command portion. Fun little hack. Also, I'd previously set BASE_PS1 to a bunch of other stuff including various other % escapes as documented in zshmisc. Also, the %{/%} stuff, also documented in zshmisc, is there to let the shell know that the escape sequences should be treated as zero-width, which helps when lines wrap and stuff.) Hopefully any of this even comes through in youtube comments...... 😕
I started using Linux because Windows 11 was terrible and filled my 120G m.2 with just the OS, I had my personal files and programs on a separate drive. Not to mention I had to break the hardware check to just get it installed. Linux Mint has been a dream, I do miss some Windows only software like MS 3D builder which was my 3D printing modeller of choice and Linux just doesn't have an equivalent yet but I would never go back to Windows.
1:36 Fork Bomb: As an admin you can mitigate this happening if you use resource limits (ulimit -u 1000) to restrict the number of processes a user can create.
htop is cool, but i prefer bottom... btm (after its installed) i think htop should come standard tho vs regular top... annoying i always have to install it...
The underling issue is that some countries, notably most states America, do not prohibit personal identifying information like your name, email address and actual address, from being sold/given away. In the UK and EU those practices are illegal
man, this ruined my day... i love the time i spend in the terminal ;P
If you can add a feature in under 1M of space, I don't consider that bloat, at least not nowadays. Back when I got started, I would've said bloat at 1K, but now I've got literal terabytes of storage space. In fact, I think I might be willing to go as high as 10M before I grouse.
i like what you are saying, right... but every sixty seconds, right.... there is a vapid repitition that just shuts my brain down, right... and i say that as a hypocrite because i know when i speak i have my own useless repetition words... if only i could run my life prefacing everything with sudo...
HOW DARE YOU TELL ME HOW TO CONTROL MY OWN MIND AND EMOTIONS INTERNALLY! ;)
😂 dang the tetris lol
i couldn't believe the zsh one, i thought you must be confusing zsh with oh my zsh and so i installed the zsh package myself and lo and behold, tetris. fascinating
I have "secs" alias for date (time with seconds), since I often work in full screen vscode and jump around to terminal a lot on ubuntu. Needless to aay its suggestive word :D
this channel rocks
Also if you wanted even shorter, to get a clock I do `watch date` and can use `-n 2` to change the time. Just a llittle faster to type and I love the watch command
More tricks and tips!!!! Just the tips
I have my arrow keys binded to vim keys so this worked out of the box!
Oh, good. Now I don't need emacs to play Tetris. :)
haha, right? 😂
I just installed Mint, then Manjaro, then Arch, then Gentoo, I think I learned linux by now, but it took about 4 years in total, you can't really rush learning something, you need to make it part of your life for years, only then it will stay in your long term memory. I wasn't touching Gentoo for like 4 years but pretty sure I can still compile my own slim kernel, make my own initramfs, installing btrfs manually and all of that, I may not remember the exact commands but looking it up will take seconds because I know what to look up in the first place.
I knew about the forkbomb, I didn't know that there is Tetris in ncurses hidden in zsh. A cool easter egg. I also have a PS1 prompt which becomes red when I enter a non-command. Just a coincidence, I downloaded one when I switched to zsh.
Everybody born between the 2nd and teh 14th Setember will be one year younger - a free year minus 20 days will be added to your lifespan
Can you make a video to go over the various terminal customizations you have and maybe you neo vim configuration?
I’ve wondered abit if there’s a prompt to print the time a command started and ended.
Enjoyed it, thanks, like the game of Tetris, tho…whats is history in the painting of background, ok painting, I like…👩💻🥰⭐️💎
Big up to Zsh. I started using Bash in the 90s (🙏bash-2.04g.tar.gz hehe), I've lost count of the number of times I've read the manpage. I even use arrays in bash, that's how damned kinky I am. I moved to Zsh a couple of years ago and I've never regretted it for a second. I would recommend to all bash-heads to give zsh a whirl. It's a drop-in replacement for bash, except for array handling, which is 10 times better in Zsh. I've been a Linux user for 25 years and I had some decades old habits that I've shaken up recently and been extremely pleased with the results. Some examples ... Vim -> Neovim Bash -> Zsh Screen -> Tmux * -> NixOS All of thse have been very positive. I think the split between Windows users and LInux users is that the former see their computer as a tool and the latter see their computer as both a tool *and* a toy. Changing up one's workflow is like getting a new toy hehe. EDIT: Love the video, I was happy to find out about tetriscurses. Synchronicity at work, I've been rekindling an addiction to xtris in the last few weeks, but tetriscurses is something I can play at work! 🤣
why use `:>filename` instead of `>filename`?
: is usually mapped to the 'true' pseudo-command (which just outputs nothing). > filename technically works too, and is fine to use on the command-line, but in scripts it's better to explicitly redirect from some command, because it can be a source of bugs like `command & > output.txt` when `command &> output.txt` was meant.
Funny story, I had to dump bash previous week. I have no idea why but somehow a recent update of some program made bash crash all the time. I switched to zsh and dash and the crashes disappeared. I would guess that it is related to my hardware.
i really doubt bash crashing after an update is a hardware issue
@@Toxikuu If it wouldn't be then I should have heard others about it by now. I use Arch. Anyway, I guarantee you that it is bash which crashed and it is a fact that the crashes happened long after the last bash update around late september in 2024 so an update of another program made it crash on my system, that much is certain. When you can't do anything anymore in any terminal or tty, your shell-commands (via the windowmanager hotkeys) don't work but all regular hotkeys for the windowmanager itself do work and open programs still function with the exception of the terminals, alt least for a while, that makes it abundantly clear that your shell crashed. That happened at least around once every hour until I changed to other shells, dash as 'POSIX-compliant' shell (sh=>dash), zsh as the shell of the user (chsh). Nothing else changed.
Do you have a command or function in your .bashrc that is hardware-specific or refers to a command/program that makes the whole session crash? Otherwise bash should work if the other shells work too.
@@audiolatroushearetic1822 Nothing interesting relevant. One line for ghcup which I also have in my zshrc, other than that just a lot of aliases and a few functions. Also, as far as I know this either works or doesn't, it shouldn't suddenly crash. I suspect that ffmpeg could somehow make bash crash but I can't proof it yet. It only crashes while i play audio or video.
more content like this, please instant subscribe! straight to the point, no screwing around simple and informative
So, does that mean that, according to the Julian calendar, I am writing this comment on January 18, 2025? Whelp, guess I'm going back in time to the massive cold snap that hit my area, that we just emerged from! D:
Bread speaks Linux better than she does English...its scary! 😂
Cool to see the carriage return used to, you know, return the carriage.
😀
maybe one day, we will get that beautiful nvim setup 😭😭😭😭😭😭
Microsoft pushed an update that caused my XP machine to bluescreen and I read about ubuntu and just installed it. Been using linux since I was in middle school in '08
It's hard for me to move to another shell like zsh, fish and etc, after using bash for 15 years.
I moved to Zsh this past year I absolutely love it
zsh is just bash+ anyways, fish is the odd one
Most linux distros you can prevent the fork bomb by limiting users processes in limits.conf along with controlling any other out of control process. At least that used to be the way not sure if that has been superseded by something yet.
peace 🖐
I've been using BASH since I started back in the early 90s. Doesn't matter if what i'm logging into wants me to use zsh, csh, tcsh, dash, ksh/pdksh (yes, I've had ot deal with all of them)... BASH either gets installed or my shell gets changed to it if it's already installed. Why? Because it's always done what I need a shell to do. That said, it is neat to see oddball things like the zsh tetris.
ups, forgotten the time while playin Tetris in my shell
Very brave to choose Arch as a first distro. For newcomers, Mint is probably the best, with its Cinnamon DE which closely resembles Windows. You may want to move on to other distros (e.g. openSUSE) that are a little more complex, AFTER you have become familiar with Linux, especially the command line, but Mint is probably the easiest one to begin with. IMHO, Arch is only for those who love to tinker with their OS and have LOTS of time to do it.
Again, a thoroughly enjoyable video. I like the spinner, it brings back fond memories. A few years back I decided to enhance it a bit so it can display a startup banner: #!/bin/bash # Spinner on steroids: spin letters to reveal words usage() { echo "Usage: $0 \"text\"" echo echo " where \"text\" is the text to reveal" exit 1 } spinner() { ("$@") & pid="$!" # spin[0]="-"; spin[1]="\\"; spin[2]="|"; spin[3]="/" spinword="aBcDeFgHiJkLmNoPqRsTuVwXyZ" spin=() for ((i=0 ; i<l ; i++)) do spin[i]=${spinword:i:1} done echo -n "${spin[0]}" while kill -0 "$pid" 2>/dev/null do for i in "${spin[@]}" do echo -ne "\b$i" sleep 0.006 done done } oneletter() { spinner sleep 0.05; echo -ne '\b'"$1" } # MAIN if [ "$#" -ne 1 ]; then usage fi in="$1" targetword=' '"$in"' ' l=${#targetword} y=() for ((i=0 ; i<l ; i++)) do y[i]=${targetword:i:1} done for i in "${y[@]}" do oneletter "$i" done echo # stackoverflow.com/questions/7578930/bash-split-string-into-character-array # stackoverflow.com/questions/7578930/bash-split-string-into-character-array#comment51981929_7579016 # unix.stackexchange.com/a/276558 # stackoverflow.com/a/12498305 # Thure Dührsen, 2018 # end of file
love your videos, keep it up!!
Confirmed that fork bomb works. Tried it in virtual machine so no harm done. Out of curiosity: do Americans always treat Sunday as first day of the week? I see it's default in many places and I always have to change it.
American here. Monday is the first day of my week.
Oh, as everyone else has said: "I too am enjoying you YT's".
Nice 😁 I need to stop watching all the shit I watch on yt, and start relearning all I have forgotten about linux. I'll keep watching good content like this. Another great video Bread.
Thanks, I like this format
Cool. Thanks! (Also, could you upload your .bashrc to your Github?) Regards!
Sweet vid.
wow ! I knew cal, but didn't knew about that year 1752 thing !
You have to prepare a magic hat for the next video for this series
Oh I totally should
Your PS1 doesn't have to be a mess, you can set variables for the colors for example... ``` # ~/.bashrc prompt() { exit_code=$? local red="\[\033[1;31m\]" local grn="\[\033[1;32m\]" PS1="" [ -n "$SSH_CLIENT" ] && PS1+="(ssh from ${SSH_CLIENT%% *}) " if test "${exit_code:-0}" -eq 0;then PS1+="${grn}( •_•)${rst} " else PS1+="${red}(;☉_☉)${rst} " fi } PROMPT_COMMAND="prompt;" ```
True, good point. I'm spoiled by just using hex color codes in zsh :-)
Adding to this from the aspect of calling something compute-heavy: one could prepend the actual calling by test (if cwd contains .git, then query the branch, otherwise do nothing) and do some memorization (if it's know that the state is preserved within the time frame, store and reuse it, otherwise reevaluate)