Share a script/alias you use a lot
Share a script/alias you use a lot
A while ago I made a tiny function in my ~/.zshrc to download a video from the link in my clipboard. I use this nearly every day to share videos with people without forcing them to watch it on whatever site I found it. What's a script/alias that you use a lot?
# Download clipboard to tmp with yt-dlp tmpv() { cd /tmp/ && yt-dlp "$(wl-paste)" }
I try to organise my data in the cleanest way possible, with the less double possible etc... I end up using a lot of symbolic links. When doing maintenance, sometimes I want to navigate in the "unlogical" way the data are organized, but the PWD variable is not necessarily very cooperative. This alias is really useful in my case :
Here is an example :
I also do some X application, compositor and WM development, and I have a few aliases to simplify tasks like copying from an Xorg session to an Xnest (and the other way around), or reload the
xrandr
command from my.xinitrc
without duplicating it.I have an alias for using MPV+yt-dlp with my firefox cookies :
I can't stand too long lines of text on my monitor, particularly when reading manpages, so I set the MANWIDTH env variable.
I use null-pointers a lot, with a shorthand.
The usual fake editor in my path, so that browsers and other applications open Vim the correct way.
My
.xinitrc
is quite classical, I still have this in it (setup for dwm's title bar, people usually install much complicated programs) :I also have a lot of stupid scripts for server and desktop maintenance, disks cleaning etc... those are handy but are also very site-specific, let me know if your interested.