Bash Script Review: My Battery Power i3Blocks Module

preview_player
Показать описание
▬▬▬▬▬▬▬▬▬▬ ► CHECK THESE OUT ◀︎▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ ► SUPPORT THE CHANNEL ◀︎▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ ► My Newsletter ◀︎▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ ► My Gear ◀︎▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ ► Questions? ◀︎▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ ► Social ◀︎▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ ► The Rest ◀︎▬▬▬▬▬▬▬▬▬▬
Thanks for watching and if you liked this video please leave a 👍🏻
Subscribe to my channel and click the 🔔 icon for notifications when I post a new video

If you read this far put a 🐄 in the comments!
▬▬▬▬▬▬▬▬▬▬ ► TAGS ◀︎▬▬▬▬▬▬▬▬▬▬
#obsidian #zettelkasten #bryanjenks
Рекомендации по теме
Комментарии
Автор

If you like these types of script review let me know and ill make more, and/or you can suggest scripts for me to look at :)

BryanJenks
Автор

Question: how does one insert particular glyphs like that battery icon into a script?

cfraizer
Автор

Bash tip: instead of spawning an instance of `sed`, you can do text replacement in "pure" Bash like `status="${status//, /}"`.
Breaking that down:
- `status=` # assign a new value to the Bash variable `status`.
- `status="${ … }"` # I just always use double quotes when doing parameter (and command) substitution.
- `status="${status … }"` # the new value I am assigning to `status` is the expansion of (value of) `status`, BUT first we alter that value…
- # the `//` means "globally replace" (a single `/` would replace the first occurrence of PATTERN)

Not calling out to external utils can make your scripts faster/more efficient.

cfraizer
Автор

Suggestion: a simpler `PS1` such as `PS1="$ "` would be less distracting for viewers. [I'm not trying to nitpick or criticize your personal choices. Just offering feedback that might make help make future videos even more accessible.]

cfraizer
Автор

Could you add a prominent link in the description for the video that links to the code repo?

cfraizer
Автор

Could you help me because it doesn't work on my Laptop idk why but it doesn't show up in the i3blocks bar please help

chroxify