Copier has a few quirks with vcs that I just discovered by trying to test out some changes. I may have some config that I have long forgotten about somewhere deep in my dotfiles, I don’t think so, but id love to be wrong and corrected, please reach out.
What Doesn’t Work #
I tried throwing everything at this template to make it work. I tried a bunch of flags that did not work. I tried making commits to the local repo to get rid of the dirty warning. I really wanted to test new changes locally without committing and pushing untested and potentially broken changes.
uvx copier copy ../markata-blog-starter .
uvx copier copy gh:waylonwalker/markata-blog-starter@develop .
uvx copier copy ../markata-blog-starter . -wlg --trust
What Works - –vcs-ref #
Finally after trying everything to get the local copy to work, and my guess of @branch not working I found this to work. It does require me to go to the repo on my develop branch.
uvx copier copy gh:waylonwalker/markata-blog-starter --vcs-ref develop .
git">What Works - delete .git #
Really this might be my best option to make quick changes and test them locally without going through a version control system. It is not ideal, but makes it easy to quickly iterate on. I might be renaming .git, or copying to /tmp for quick iteration.
rm -rf .git
uvx copier copy ../markata-blog-starter .
Copier I love #
Copier is a great templating tool. I really love it. I use it every single day to create posts on this blog using Tmux hotkey for copier templates. This is the first time this quirk has got me and it had me puzzled for 45 minutes as I did not expect this behavior whatsoever.
I’ve been using gitingest web ui [[ thoughts-516 ]] for quite awhile to serialize git repo into llm friendly text files. This gives tools context about repos that are not in the training data so that it knows about it and how to use the code in the repo. gitingest also has a python library [[ thoughts-517 ]]
I had a use case for a project not yet on git, and found yek.
Installing yek #
Their instructions tell you to curl to bash.
curl -fsSL https://bodo.run/yek.sh | bash
I don’t like curl to bash from random sites, so I have my own self hosted version of i.jpillora.com. I like using this because it pulls from github and I trust github as a source for artifacts as good as the repo I am pulling from.
curl https://i.jpillora.com/bodo-run/yek | bash
Using yek #
yek
/tmp/yek-output/yek-output-bb01e621.txt
This will give you a link to a text file that you can add to many llm tools. This happened so fast for me that I didn’t even believe that it worked properly.
more options #
As with most clis, you can run yek --help to see the options available.
yek --help
Today I discovered brightnessctl to adjust the screen brightness on my
AwesomeWM machine. Its a command line utility that you can use to adjust the
brightness of your screen. A command line interface like this gives you the
ability to bind keys with something like [[xbindkeys]] or your window manager
configuration.
sudo apt install brightnessctl
# or
paru -S brightnessctl
Now that you have it installed you can use it to adjust the brightness of your screen, this worked particularly well for my laptop screen, I don’t think this works for monitors, in my experience they are usually controlled by the built in osd.
# Increase brightness by 10%
brightnessctl set +10%
# Decrease brightness by 10%
brightnessctl set 10%-
# Set brightness to 50%
brightnessctl set 50%
# Set brightness to 100%
brightnessctl set 100%
Note
on my machine I had to use `sudo` to run the command, otherwise I got the following error:
Can't modify brightness: Permission denied
You should run this program with root privileges.
Alternatively, get write permissions for device files.
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