neige d'aoust

knowledge, art, and other stuff

User Tools

Site Tools


snippets

This is an old revision of the document!


Useful snippets to put in your ~/.local/bin

man

Too lazy to download man-db? Yeah just let your web browser do it for you :)

man
#!/bin/sh
if [ $# -ge 2 ]
then
        cat=".$1"
        shift
fi
if [ $# -ge 1 ]
then
        xdg-open "https://man.archlinux.org/search?q=$@$cat&go=Go"
else
        echo "man what?"
fi

remotehyprctl

Useful when you want to launch stuff on your Hyprland via ssh.

remotehyprctl
#!/bin/sh
HYPRLAND_INSTANCE_SIGNATURE=$(hyprctl instances -j | jq -r ".[0].instance") WAYLAND_DISPLAY=$(hyprctl instances -j | jq -r ".[0].wl_socket") hyprctl $@

update-repo

Small tool to take your paru cache and turn it into a repo, useful if you manage a lot of Arch installs.

update-repo
#!/bin/sh
pkgs=/home/yuki/.cache/paru/clone
repo=/srv/http/html/pkg/
suffix="*.pkg.tar.zst*"
 
rm $repo/$suffix
find $pkgs -name "$suffix" -exec ln -s {} $repo \;
cd $repo
find . -name "$suffix" -exec repo-add -np yuki.db.tar.gz {} \;
snippets.1750717520.txt.gz · Last modified: by Yuki