The rich console is themeable, I’ve been a long time user of rich and had no
Idea. You can define your own theme keywords and use them just like you use
normal rich keywords in square brackets like'[bold red]'.
from rich.console import Console
from rich.theme import Theme
custom_theme = Theme({
"info": "dim cyan",
"warning": "magenta",
"danger": "bold red"
})
console = Console(theme=custom_theme)
console.print("This is information", style="info")
console.print("[warning]The pod bay doors are locked[/warning]")
console.print("Something terrible happened!", style="danger")
You can unset multiple environment variables at once. I did not know this was a
thing, its something that ended up happening organically on a call and asking
someone to run unset. They had never done it before and did not know how it
works, but did exactly as I said instead of what I meant. I like this handy
shortcut doing it in one line rather than each one individually, I will be
using this in the future. You might need this for something like
running aws cli commands with localstack.
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION
i3lock is a fantastic lockscreen for tiling window managers.
If you are using a tiling window manager within a public space you need to add a lockscreen. I have one machine that I take with me to a public space. Its secure enough that I can leave it, but not secure enough that I want to leave it unlocked. So when I need to leave it behind for the restroom I need to lock it up.
paru -S i3lock
# or
apt install i3lock
Now that you have i3lock installed lets lock that screen.
# lock it with a pure white flashbang
i3lock
# lock it with a black background
i3lock -c 000000
# lock it with a custom color
i3lock -c 2e1330
# lock it with a wallpaper
i3lock -c 000000 ~/Pictures/Wallpapers/mywallpaper.png
You can use your window manager or something more generic like xbindkeys to set
a hotkey. This way you don’t have to open a terminal and type out the command
every time you leave your desk. You can just press something like SUPER+L
like you would on other OS’s.
Fancy #
If you like it a bit fancier, you can use i3lock-fancy, it can blur,
pixelate, and greyscale your current screen. I did not really like this
because you can still tell what is going on the screen. It’s probably secure
enough and looks better, but I went with regular i3lock.
paru -S i3lock-fancy-git
# or
apt install i3lock-fancy