Bread on Penguins
Bread on Penguins
  • 51
  • 482 190
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.
Переглядів: 2 760

Відео

a bit of a rant about privacy
Переглядів 7 тис.7 годин тому
a bit of a rant about privacy
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
sometimes you have to fail
Переглядів 3,1 тис.День тому
sometimes you have to fail
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
You do NOT have to rush life.
Переглядів 5 тис.21 день тому
sorry wind was loud lol
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
10k in 3 months, now what?
Переглядів 5 тис.Місяць тому
10k in 3 months, now what?
Custom theme ANY website (Firefox or Chrome)
Переглядів 6 тис.Місяць тому
Custom theme ANY website (Firefox or Chrome)
Gimp 3.0 is pretty good tbh
Переглядів 13 тис.Місяць тому
Gimp 3.0 is pretty good tbh
You control your anger.
Переглядів 6 тис.Місяць тому
You control your anger.
wttr.in - the best way to check weather
Переглядів 10 тис.Місяць тому
wttr.in - the best way to check weather
Is minimalism just a meme?
Переглядів 12 тис.Місяць тому
Is minimalism just a meme?
Why I started using Linux
Переглядів 78 тис.Місяць тому
Why I started using Linux
Переглядів 3,2 тис.2 місяці тому
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
My build of st (simple terminal)
Переглядів 7 тис.2 місяці тому
My build of st (simple terminal)
Cliphist script, and my new github
Переглядів 4,8 тис.2 місяці тому
Cliphist script, and my new github
Find a hobby AWAY from technology
Переглядів 7 тис.2 місяці тому
Find a hobby AWAY from technology
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)
On overcoming perfectionism
Переглядів 3,5 тис.2 місяці тому
On overcoming perfectionism

КОМЕНТАРІ

  • @DavidLindes
    @DavidLindes 18 хвилин тому

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

  • @DavidLindes
    @DavidLindes 31 хвилина тому

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

  • @hopelessdecoy
    @hopelessdecoy Годину тому

    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.

  • @AxelSeedig
    @AxelSeedig 2 години тому

    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.

  • @YeisenAchitel
    @YeisenAchitel 4 години тому

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

  • @danwl9708
    @danwl9708 4 години тому

    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

  • @YeisenAchitel
    @YeisenAchitel 5 годин тому

    man, this ruined my day... i love the time i spend in the terminal ;P

  • @anon_y_mousse
    @anon_y_mousse 5 годин тому

    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.

  • @YeisenAchitel
    @YeisenAchitel 6 годин тому

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

  • @YeisenAchitel
    @YeisenAchitel 6 годин тому

    HOW DARE YOU TELL ME HOW TO CONTROL MY OWN MIND AND EMOTIONS INTERNALLY! ;)

  • @comosaycomosah
    @comosaycomosah 7 годин тому

    😂 dang the tetris lol

  • @milo3733
    @milo3733 8 годин тому

    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

  • @yomajo
    @yomajo 8 годин тому

    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

  • @buttface6t4
    @buttface6t4 9 годин тому

    this channel rocks

  • @JZL003
    @JZL003 9 годин тому

    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

  • @itstoxicqt
    @itstoxicqt 9 годин тому

    More tricks and tips!!!! Just the tips

  • @theprathamdupare
    @theprathamdupare 9 годин тому

    I have my arrow keys binded to vim keys so this worked out of the box!

  • @TheLinuxCast
    @TheLinuxCast 10 годин тому

    Oh, good. Now I don't need emacs to play Tetris. :)

  • @JamesSmith-ix5jd
    @JamesSmith-ix5jd 10 годин тому

    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.

  • @peterjansen4826
    @peterjansen4826 10 годин тому

    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.

  • @RonaldMarillier
    @RonaldMarillier 10 годин тому

    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

  • @thomasbates9189
    @thomasbates9189 11 годин тому

    Can you make a video to go over the various terminal customizations you have and maybe you neo vim configuration?

  • @ianTnai
    @ianTnai 11 годин тому

    I’ve wondered abit if there’s a prompt to print the time a command started and ended.

  • @TheDigitalOne
    @TheDigitalOne 11 годин тому

    Enjoyed it, thanks, like the game of Tetris, tho…whats is history in the painting of background, ok painting, I like…👩‍💻🥰⭐️💎

  • @octomancer
    @octomancer 11 годин тому

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

  • @Toxikuu
    @Toxikuu 11 годин тому

    why use `:>filename` instead of `>filename`?

    • @atijohn8135
      @atijohn8135 4 години тому

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

  • @peterjansen4826
    @peterjansen4826 11 годин тому

    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.

    • @Toxikuu
      @Toxikuu 11 годин тому

      i really doubt bash crashing after an update is a hardware issue

    • @peterjansen4826
      @peterjansen4826 11 годин тому

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

    • @audiolatroushearetic1822
      @audiolatroushearetic1822 7 годин тому

      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.

    • @peterjansen4826
      @peterjansen4826 2 години тому

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

  • @y00t00b3r
    @y00t00b3r 12 годин тому

    more content like this, please instant subscribe! straight to the point, no screwing around simple and informative

  • @Alexs23743
    @Alexs23743 14 годин тому

    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:

  • @EgoShredder
    @EgoShredder 14 годин тому

    Bread speaks Linux better than she does English...its scary! 😂

  • @noodlish
    @noodlish 14 годин тому

    Cool to see the carriage return used to, you know, return the carriage.

  • @ozu7779
    @ozu7779 15 годин тому

    maybe one day, we will get that beautiful nvim setup 😭😭😭😭😭😭

  • @dangus69420
    @dangus69420 15 годин тому

    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

  • @DV-ml4fm
    @DV-ml4fm 15 годин тому

    It's hard for me to move to another shell like zsh, fish and etc, after using bash for 15 years.

    • @itstoxicqt
      @itstoxicqt 9 годин тому

      I moved to Zsh this past year I absolutely love it

    • @atijohn8135
      @atijohn8135 5 годин тому

      zsh is just bash+ anyways, fish is the odd one

  • @guitarbuddha74
    @guitarbuddha74 15 годин тому

    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.

  • @5ergius
    @5ergius 16 годин тому

    peace 🖐

  • @sorphin
    @sorphin 16 годин тому

    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.

  • @5ergius
    @5ergius 16 годин тому

    ups, forgotten the time while playin Tetris in my shell

  • @jamespleger752
    @jamespleger752 16 годин тому

    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.

  • @ThureDuehrsen
    @ThureDuehrsen 16 годин тому

    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

  • @Sr.V85
    @Sr.V85 17 годин тому

    love your videos, keep it up!!

  • @emem666
    @emem666 17 годин тому

    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.

    • @SpaceCatKungFu
      @SpaceCatKungFu 14 годин тому

      American here. Monday is the first day of my week.

  • @tubeDude48
    @tubeDude48 17 годин тому

    Oh, as everyone else has said: "I too am enjoying you YT's".

  •  18 годин тому

    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.

  • @itsamemarkus
    @itsamemarkus 18 годин тому

    Thanks, I like this format

  • @Miguel_GM
    @Miguel_GM 18 годин тому

    Cool. Thanks! (Also, could you upload your .bashrc to your Github?) Regards!

  • @itsfish8672
    @itsfish8672 18 годин тому

    Sweet vid.

  • @Val_Cla
    @Val_Cla 18 годин тому

    wow ! I knew cal, but didn't knew about that year 1752 thing !

  • @shateq
    @shateq 18 годин тому

    You have to prepare a magic hat for the next video for this series

  • @ZentrionDoom
    @ZentrionDoom 18 годин тому

    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;" ```

    • @BreadOnPenguins
      @BreadOnPenguins 18 годин тому

      True, good point. I'm spoiled by just using hex color codes in zsh :-)

    • @gemelen
      @gemelen 14 годин тому

      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)