Functions with dependencies on non-standard installed tools (on macOS 10.14)
function | depends on | which is installed by |
---|---|---|
build_iosevka | nodejs, ttfautohint & otfcc | brew |
chosts | dateutils & wget | brew |
fixdate | SetFile * | Xcode |
fixmp4metadata | AtomicParsley | brew |
mans | ripgrep | brew |
mdb | tag | brew |
mwp_status | dateutils | brew |
npodl & vidl | youtube-dl | brew |
testmovies | mediainfo | brew |
tv | video_transcoding | gem |
* From its local manpage:
Tools supporting Carbon development, including /usr/bin/SetFile, were deprecated with Xcode 6.
Note: Its local documentation says it is deprecated, but for now it works.
On Apple's site it is in the Retired Documents Library referencing Xcode 5.
With Xcode 10 it still gets installed.
-
ag
Change the colors of ag (the silver searcher) output. I don't like the yellow boxes that show up in the default settings. Changed to green underlined matches, light yellow pathnames & light blue line numbers. -
apply_settings
Set up fish universal variables. At the moment all color related.
I'm using a customized SpaceGray theme. The standard colors fish comes with don't work very well with this theme. When I set up a Mac this function makes it easy to apply the colors that I found to be working best for me. It has taken an inordinate amount of time to get to these, so it's important to preserve them even if this function is never called again during the computers lifetime. -
brdeps
Print a list ofbrew
installed tools and their dependencies.
Takes optional arguments, if there are none it will display a list of all installed tools.
Output:
tool_name depends on: some_other_tool(s)
-
brused
Print a list ofbrew
installed tools and which other tools use this.
Takes optional arguments, if there are none it will display a list of all installed tools.
Output:
tool_name used by: some_other_tool(s)
-
build_iosevka
A script to build a custom version of the Iosevka font. -
bup
Three consecutive commands to keep homebrew up to date and lean.
brew update
,brew upgrade
and finallybrew cleanup
.
This will update everything that is installed via a brew command for which a newer version is available. -
cdl
Change to a directory and list its contents with a long listing. -
chosts
Compare the local date with the date on the net for my hosts file and see if it's behind. -
cleands
Recursively delete ".DS_Store" files -
cleanLaunchServices
Clean up LaunchServices to remove duplicates in the "Open With" menu. -
cpuhogs
Find what's hogging the CPU. Kinda like a Top 10 list. -
decrypt
Decrypt a file. -
domaininfo
Get information for a FQDN (fully qualified domain name). It's a wrapper arounddig
, ipinfo.io & awhois
query.
I used this to block Facebook, after reading this blogpost. Useful to block tracking servers or other pests on the internet. -
down4me
Checks whether a website is down just for you, or everybody. -
emptytrash
Empty the Trash on all mounted volumes and the main HDD.
Also, clear Apple’s System Logs (asl) to improve shell startup speed. -
encrypt
Encrypt a file. -
extract
Extract the given archive into a folder. -
fish_some_function functions for the shell's own use.
-
fish_command_timer (within
conf.d
).
Time stamp & command execution time at the right hand side of the terminal.
Copied from jichu4n and slightly adapted -
fish_greeting
Displays OS & uptime. -
fish_prompt
Prompt line with git info.
-
-
fixdate
Extract dates from filenames and put those in the date created & modified metadata. -
fixmp4metadata
Fixes titles and clears comments for mp4 files and then callsfixdate
function to fix the dates. -
free
Emulates thefree
function from Linux.
Shows free & used memory in human readable format. -
fzf
The famous fzf (fuzzy finder) is also present here, with some keybindings files.fish_user_key_bindings.fish
and a sym-linked filefzf_key_bindings.fish
. -
getnet
Get network information.
I don't use this anymore because newer Mac's may not have a physical Ethernet port.
Replacement isnetinfo
. -
git_helpers (within
conf.d
).
get a nice git log output with colors and in neat columns.
A reconstruction of Gary Bernhardt'sgithelpers.sh
script & his.gitconfig
aliases.
This is how it looks:
and a bit more interesting
-
hosts
Open the hosts file in my favorite editor. -
img_size
Find out the dimensions of an image. -
lmas
List all applications that were downloaded from the Mac App Store. -
mans
Search for something in a man page.
mans manpage searchterm
Displays paginated result with colored search terms and seven lines surrounding each hit. -
mdb
A script to create a simple plain text movie database. -
mwp_status
Check Apple's malware protection status.
It shows version number & date/time last updated of:- XProtect
- Gatekeeper
- SIP
- MRT
- CoreSuggest
- IncompatibelKernelExt
- CoreLSDK
and SIP status disabled or enabled
-
netinfo
Get network information.
The successor ofgetnet.fish
.
Works on Mac's without a physical Ethernet port. See in the comments. -
npodl
Download a video with youtube-dl with predefined setting. -
nvimrc
Open theinit.vim
file. -
print_fish_colors
Prints a table of colors used by fish. -
prompt_git_status
Helper function for fish_prompt. -
restore_original_fish_colors
Like it says on the tin. -
source_script
Source sh/csh file. Seems useful, but I can't remember if I ever used it. -
testmovies
A script to extract the height of movie files in a directory & if it's over 720 put their names in a file for further processing with Don Melton's video transcoding tools. -
totrash
Move a specified file to the Trash. -
tv
Transcode a video to 720p & add dutch subtitles if available. Uses Don Melton's video transcoding tools. -
updhosts
Update my/private/etc/hosts
file from four different online sources and append my personal blocklist to it.
Then flush the DNS cache to make the changes take effect.
All to block ads & malware sites, trackers and other annoyances like facebook & co. -
vimrc
Open the.vimrc
file. -
vidl
Download a video with youtube-dl with predefined setting. -
weer
The weather forecast for a city. Type incity,country
(case insensitive) as arguments. -
z
z lets you jump around directories. It learns while youcd
to directories and scores how often you go to a particular directory. It uses that info to decide where to go. You don't have to be precise with dir-names, it does some sort of fuzzy finding.
Thez
command lives inconf.d
& sets up the whole system. Insidefunctions
there are__z*
files that perform various actions. The last file of this is theuninstall.fish
which removes the files thatz
creates.
I've tried to attribute the people from whom I stole some code.
If you feel that I have missed something, open an Issue here.
Also if you find bugs, ditto.