There have been a lot of blog entries, lately, about setting yourself up with the FZF fuzzy finder. Here's mine.
It includes an implementation of autojump.
| #include <iostream> | |
| #include <memory> | |
| #include <mpd/client.h> | |
| #include <string> | |
| #include <tuple> | |
| #include <vector> | |
| namespace mpd { | |
| using namespace std::string_literals; |
| Computer Information: | |
| Manufacturer: Unknown | |
| Model: Unknown | |
| Form Factor: Desktop | |
| No Touch Input Detected | |
| Processor Information: | |
| CPU Vendor: GenuineIntel | |
| CPU Brand: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz | |
| CPU Family: 0x6 |
| #!/usr/bin/env python3 | |
| # Dependencies: | |
| # pip install python-musicpd | |
| import musicpd | |
| import collections | |
| def main(): |
| Time Sum Command | |
| 3640 14814 > builtin source /usr/local/Cellar/fish/3.1.0/share/fish/config.fish | |
| 129 129 -> set -g IFS \n\ \t | |
| 47 47 -> set -qg __fish_added_user_paths | |
| 48 48 -> set -g __fish_added_user_paths | |
| 11 54 -> if not set -q __fish_initialized | |
| set -U __fish_initialized 0 | |
| if set -q __fish_init_2_39_8 | |
| set __fish_initialized 2398 | |
| else if set -q __fish_init_2_3_0 |
I've knocked up a system for managing WINE prefixes from the command-line. It's for FISH, because that's what I use, and it's reasonably versatile and maintainable.
Note 1: I'm going to use "prefix" and "bottle" interchangeably.
Note 2: This is for hardcore command-line users, and it's similar to tools like virtualenv and rbenv. Most people would probably want to use Lutris.
Anyway...
| #!/usr/bin/env zsh | |
| # Keyboard LED indicator for embedding into things like tint2, xmobar and dzen2. | |
| # The order is Caps Lock, Num Lock, Scroll Lock | |
| xset q | grep Caps | tr -s ' ' | cut -d ' ' -f 5,9,13 | sed 's/on/▣/g' | sed 's/off/▢/g' | |
| # Or alternately: | |
| # xset q | awk '/Caps/ {gsub("off", "▢"); gsub("on", "▣") ; print $4 " " $8 " " $12}' |
| #!/usr/bin/env python3 | |
| """ | |
| Python script that takes a directory, and displays files in that directory | |
| tree with the same sizes, grouped by size. | |
| Useful for hunting down duplicate files. | |
| """ | |
| from argparse import ArgumentParser, ArgumentTypeError |