references
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
7dea2849ea1ad91ac5ccd6c7a6f376ba90800758- Parents
-
98612e8 - Tree
1851a09
7dea284
7dea2849ea1ad91ac5ccd6c7a6f376ba9080075898612e8
1851a09| Status | File | + | - |
|---|---|---|---|
| A |
notes/functions.md
|
91 | 0 |
| A |
notes/hyprland.md
|
96 | 0 |
| A |
notes/micro.md
|
80 | 0 |
| A |
notes/tmux.md
|
29 | 0 |
notes/functions.mdadded@@ -0,0 +1,91 @@ | ||
| 1 | +# Fish Functions – Quick Reference | |
| 2 | + | |
| 3 | +Drop these files in `~/.config/fish/functions/` (one function per file with the same basename). | |
| 4 | +Most commands expose `-h/--help` or print usage on bad args (by convention). | |
| 5 | + | |
| 6 | +--- | |
| 7 | + | |
| 8 | +## Workflow & Navigation | |
| 9 | + | |
| 10 | +- **`cdf`** — Fuzzy-jump into a directory (fzf picker), then `cd` there. | |
| 11 | + **Usage:** `cdf` or `cdf <pattern>` | |
| 12 | + | |
| 13 | +- **`f`** — Fuzzy-find a file and open it in `$EDITOR` (or print path if no editor set). | |
| 14 | + **Usage:** `f` or `f <pattern>` | |
| 15 | + | |
| 16 | +- **`open_at_line`** — Open a file at a specific line in your editor (e.g., `nvim +{line} {file}`). | |
| 17 | + **Usage:** `open_at_line <file> <line>` | |
| 18 | + | |
| 19 | +- **`viewnotes`** — Launch your notes TUI layout (three panes: selector | renderer | preview). | |
| 20 | + **Usage:** `viewnotes` | |
| 21 | + *Notes:* Designed to wire up tmux + previewers; expects your note tree configured. | |
| 22 | + | |
| 23 | +--- | |
| 24 | + | |
| 25 | +## Git Helpers | |
| 26 | + | |
| 27 | +- **`glog`** — Pretty, condensed `git log` (graph, decorate, relative dates). | |
| 28 | + **Usage:** `glog [<path>] [-n <N>]` | |
| 29 | + | |
| 30 | +- **`gb`** — Fuzzy switch/checkout git branches (create if `!exists` when you type a new name). | |
| 31 | + **Usage:** `gb` | |
| 32 | + | |
| 33 | +--- | |
| 34 | + | |
| 35 | +## Search & Clipboard | |
| 36 | + | |
| 37 | +- **`rga`** — Wrapper around ripgrep-all for searching text, PDFs, media metadata, etc. | |
| 38 | + **Usage:** `rga <pattern> [path]` | |
| 39 | + | |
| 40 | +- **`clipf`** — Copy file contents (or stdin) to the clipboard (`wl-copy`/`xclip` fallback). | |
| 41 | + **Usage:** `clipf [file]` (no args → read stdin) | |
| 42 | + | |
| 43 | +--- | |
| 44 | + | |
| 45 | +## Packages & System | |
| 46 | + | |
| 47 | +- **`packin`** — “Search → choose → install” helper for Arch (paru/pacman under the hood). | |
| 48 | + **Usage:** `packin <pkg|pattern>` | |
| 49 | + | |
| 50 | +- **`sysrs`** — Restart a *system* service (via `sudo systemctl restart`). | |
| 51 | + **Usage:** `sysrs <service>` | |
| 52 | + | |
| 53 | +- **`sysru`** — Restart a *user* service (`systemctl --user restart`). | |
| 54 | + **Usage:** `sysru <service>` | |
| 55 | + | |
| 56 | +--- | |
| 57 | + | |
| 58 | +## Processes & Ports | |
| 59 | + | |
| 60 | +- **`fkill`** — Fuzzy-pick a process and kill it (smart SIGTERM→SIGKILL escalation). | |
| 61 | + **Usage:** `fkill` or `fkill <pattern>` | |
| 62 | + | |
| 63 | +- **`fport`** — Show what’s bound to a port; optionally kill it. | |
| 64 | + **Usage:** `fport <port>` | |
| 65 | + | |
| 66 | +--- | |
| 67 | + | |
| 68 | +## Files & Links | |
| 69 | + | |
| 70 | +- **`hardlink_all`** — Hard-link every regular file from a source dir into a dest dir (same filesystem only). | |
| 71 | + **Usage:** `hardlink_all <src_dir> <dst_dir>` | |
| 72 | + *Notes:* Requires source and destination on the same filesystem; skips non-regular files. | |
| 73 | + | |
| 74 | +--- | |
| 75 | + | |
| 76 | +## SSH | |
| 77 | + | |
| 78 | +- **`sshf`** — Fuzzy-select and SSH into a host from your `~/.ssh/config` (or known_hosts). | |
| 79 | + **Usage:** `sshf` | |
| 80 | + | |
| 81 | +--- | |
| 82 | + | |
| 83 | +## Internals & Keybinds | |
| 84 | + | |
| 85 | +- **`_fzf`** — Shared fzf defaults (preview, keybinds, colors). | |
| 86 | + **Usage:** *(internal; sourced by other functions)* | |
| 87 | + | |
| 88 | +- **`fish_user_key_bindings`** — Centralized keybindings (sets up fzf bindings, extras). | |
| 89 | + **Usage:** *(auto-loaded by fish; not called directly)* | |
| 90 | + | |
| 91 | +--- | |
notes/hyprland.mdadded@@ -0,0 +1,96 @@ | ||
| 1 | +# Hyprland Keybind & Workspace Summary | |
| 2 | + | |
| 3 | +## Core Applications | |
| 4 | +| Keybind | Action | | |
| 5 | +|------------------------|-------------------------------------------| | |
| 6 | +| $mainMod + RETURN | Launch terminal (Alacritty) | | |
| 7 | +| $mainMod + E | Launch file manager (Dolphin) | | |
| 8 | +| $mainMod + SPACE | Launch app launcher (Wofi) | | |
| 9 | +| $mainMod + SHIFT + M | Exit Hyprland (terminate user session) | | |
| 10 | + | |
| 11 | +## Window Management | |
| 12 | +| Keybind | Action | | |
| 13 | +|------------------------|-------------------------------------------| | |
| 14 | +| $mainMod + Q | Close window | | |
| 15 | +| $mainMod + Y | Pin window (all workspaces) | | |
| 16 | +| $mainMod + F | Toggle fullscreen | | |
| 17 | +| $mainMod + J | Toggle split mode (dwindle) | | |
| 18 | +| $mainMod + V | Toggle float/tile | | |
| 19 | +| $mainMod + LMB drag | Move window | | |
| 20 | +| $mainMod + RMB drag | Resize window | | |
| 21 | + | |
| 22 | +### Moving Windows & Focus | |
| 23 | +| Keybind | Action | | |
| 24 | +|-------------------------------|----------------------------| | |
| 25 | +| $mainMod + Arrow Keys | Move focus | | |
| 26 | +| $mainMod + SHIFT + Arrow Keys | Move window | | |
| 27 | + | |
| 28 | +### Resizing | |
| 29 | +| Keybind | Action | | |
| 30 | +|----------------------------------------|-----------------------| | |
| 31 | +| $mainMod + R | Enter resize mode | | |
| 32 | +| h / j / k / l, Arrows (resize mode) | Resize | | |
| 33 | +| Esc | Exit resize mode | | |
| 34 | +| $mainMod + CTRL + Arrows | Resize (small) | | |
| 35 | +| $mainMod + CTRL + SHIFT + Arrows | Resize (medium) | | |
| 36 | +| $mainMod + ALT + CTRL (+ SHIFT) Arrows | Resize (large) | | |
| 37 | + | |
| 38 | +## Workspaces | |
| 39 | +| Keybind | Action | | |
| 40 | +|------------------------|-------------------------------------------| | |
| 41 | +| $mainMod + [1–0] | Switch to workspace | | |
| 42 | +| $mainMod + CTRL + [1–0]| Move window & switch to workspace | | |
| 43 | +| $mainMod + SHIFT + [1–0]| Move window silently to workspace | | |
| 44 | +| $mainMod + COMMA | Previous workspace | | |
| 45 | +| $mainMod + PERIOD | Next workspace | | |
| 46 | +| $mainMod + Slash | Switch to previous workspace | | |
| 47 | +| $mainMod + mouse scroll| Cycle workspaces | | |
| 48 | + | |
| 49 | +### Special Workspaces (Scratchpads) | |
| 50 | +| Keybind | Action | | |
| 51 | +|------------------------|-------------------------------------------| | |
| 52 | +| $mainMod + Z | Zen Browser | | |
| 53 | +| $mainMod + T | Terminal (Ghostty) | | |
| 54 | +| $mainMod + D | Discord | | |
| 55 | +| $mainMod + A | Audacity | | |
| 56 | +| $mainMod + O | TickTick | | |
| 57 | +| $mainMod + B | Bitwarden | | |
| 58 | +| $mainMod + M | Spotify | | |
| 59 | +| $mainMod + Minus | Toggle default scratchpad | | |
| 60 | +| $mainMod + SHIFT+Minus | Send window to scratchpad | | |
| 61 | + | |
| 62 | +*(Auto-launch rules: REAPER → ws9, LibreWolf → ws10. Scratchpads launch respective apps if empty.)* | |
| 63 | + | |
| 64 | +## Media & System | |
| 65 | +| Keybind | Action | | |
| 66 | +|------------------------|-------------------------------------------| | |
| 67 | +| XF86AudioRaiseVolume | Volume up (+5%) | | |
| 68 | +| XF86AudioLowerVolume | Volume down (–5%) | | |
| 69 | +| XF86AudioMute | Toggle mute | | |
| 70 | +| XF86AudioPlay | Play/pause | | |
| 71 | +| XF86AudioNext | Next track | | |
| 72 | +| XF86AudioPrev | Previous track | | |
| 73 | +| XF86MonBrightnessUp | Increase brightness (+5%) | | |
| 74 | +| XF86MonBrightnessDown | Decrease brightness (–5%) | | |
| 75 | + | |
| 76 | +## Utilities | |
| 77 | +| Keybind | Action | | |
| 78 | +|------------------------|-------------------------------------------| | |
| 79 | +| $mainMod + L | Lock screen (swaylock-fancy) | | |
| 80 | +| $mainMod + W | Reload Waybar | | |
| 81 | +| Print | Screenshot (area) | | |
| 82 | +| Alt + Print | Screenshot (screen) | | |
| 83 | +| Ctrl + Print | Screenshot (window) | | |
| 84 | + | |
| 85 | +--- | |
| 86 | + | |
| 87 | +## Environment & Rules | |
| 88 | +- Animations: windows, workspaces, borders use slide/overshot effects | |
| 89 | +- Window Rules: | |
| 90 | + - REAPER → workspace 9 | |
| 91 | + - LibreWolf → workspace 10 | |
| 92 | + - Scratchpads auto-launch (Discord, Spotify, Zen, etc.) | |
| 93 | +- Monitors: | |
| 94 | + - DP-1 → 3840×2160 (primary) | |
| 95 | + - HDMI-A-1 → 2560×1440 (secondary) | |
| 96 | +- Autostart: Waybar, swaybg, fcitx5, mako, nm-applet, polkit, idle handler | |
notes/micro.mdadded@@ -0,0 +1,80 @@ | ||
| 1 | +# Micro — keys & workflow (fish + plugins) | |
| 2 | + | |
| 3 | +--- | |
| 4 | + | |
| 5 | +## Core (built-in) | |
| 6 | +- **Ctrl-E** — Command bar. Run `help …`, `plugin list`, `open`, `fzfinder`, `log`, etc. | |
| 7 | +- **Ctrl-S** — Save. **Ctrl-Q** — Close current buffer (quit if last). **Ctrl-O** — Open file (fallback; you’ll usually use **Alt-f**). | |
| 8 | + | |
| 9 | +--- | |
| 10 | + | |
| 11 | +## fzfinder (fast file open) | |
| 12 | +**Open:** **Alt-f** | |
| 13 | +**What it does:** Fuzzy-find files using our git-aware wrapper (`mfzf`). In repos it lists `git ls-files`; otherwise it uses `fd`. Preview shows with `bat`. Opens in a **new tab**. | |
| 14 | + | |
| 15 | +**Inside the picker (fzf):** | |
| 16 | +- Type to filter; **↑/↓** or **Ctrl-j/Ctrl-k** to move | |
| 17 | +- **Enter** open selection **Tab / Shift-Tab** multi-select (if enabled) | |
| 18 | +- Our options: `--height=85% --layout=reverse [--multi] --preview 'bat -f -p {}'` | |
| 19 | + | |
| 20 | +**Tweakable:** | |
| 21 | +- `settings.json` → `fzfarg`, `fzfopen` (`newtab` or `open`), `fzfpath` (`relative` or `absolute`). | |
| 22 | +- Edit `/usr/local/bin/mfzf` to ignore heavy dirs (`node_modules`, `dist`, `target`, …). | |
| 23 | + | |
| 24 | +--- | |
| 25 | + | |
| 26 | +## Palettero (command palette) | |
| 27 | +**Open:** **Ctrl-P** (also **Alt-Ctrl-Space**) | |
| 28 | +**What it does:** Fuzzy-search *any* Micro/plug-in command (and text filters) and run it. Great for discovery. | |
| 29 | + | |
| 30 | +**Use:** Open → type (“jump”, “tree”, “help fzfinder”, “pipe jq .”, …) → **Enter**. | |
| 31 | + | |
| 32 | +**Pro tip:** add your favorite one-liners as palette items (JSON format via `editmenu`), e.g. JSON pretty, YAML⇄JSON, sort unique. | |
| 33 | + | |
| 34 | +--- | |
| 35 | + | |
| 36 | +## Quickfix (project grep & jump) | |
| 37 | +**Search word under cursor:** **Alt-g** | |
| 38 | +**Prompted search:** **Ctrl-Alt-g** | |
| 39 | +**What it does:** Runs ripgrep (`rg -n`) and drops results into a quickfix list. Select a line → **Enter** jumps to file/line. | |
| 40 | + | |
| 41 | +**Flow:** Trigger search → use **↑/↓** to browse results → **Enter** to jump. Close the panel when done. | |
| 42 | + | |
| 43 | +--- | |
| 44 | + | |
| 45 | +## runit (run/build) | |
| 46 | +**Run current file:** **F5** **Make:** **F12** **Make (background):** **F9** | |
| 47 | +**What it does:** Saves & runs the active file (language/shebang aware). In projects with a `Makefile`, use F12/F9 for builds. | |
| 48 | + | |
| 49 | +**Tips:** | |
| 50 | +- For scripts, add a proper shebang (e.g., `#!/usr/bin/env python3`) so F5 “just works”. | |
| 51 | +- Use the command bar to run custom commands on demand if there’s no Makefile. | |
| 52 | + | |
| 53 | +--- | |
| 54 | + | |
| 55 | +## Filemanager (side tree) | |
| 56 | +**Toggle tree:** **Ctrl-b** | |
| 57 | +**What it does:** Opens/closes a file tree pane you can navigate with arrows and open with **Enter**. Handy for quick browsing. | |
| 58 | + | |
| 59 | +**Tip:** Set `filemanager.openonstart = true` if you want it by default (add in `settings.json`). | |
| 60 | + | |
| 61 | +--- | |
| 62 | + | |
| 63 | +## Jump (symbols / headings) | |
| 64 | +**Open outline:** **F4** | |
| 65 | +**What it does:** Fuzzy-jump within the current buffer (functions, classes, Markdown headings, etc.). | |
| 66 | + | |
| 67 | +--- | |
| 68 | + | |
| 69 | +## LSP (optional) | |
| 70 | +**What it does:** Hover/definition/references/completion/formatting with language servers. | |
| 71 | +**Typical defaults:** hover, go-to-definition, references, completion (check `help lsp` after installing servers). | |
| 72 | + | |
| 73 | +--- | |
| 74 | + | |
| 75 | +## Handy palette one-liners | |
| 76 | +Run these from **Ctrl-E** (or bind keys to them): | |
| 77 | +- `pipe jq .` — pretty-print JSON | |
| 78 | +- `pipe yq -P` — pretty JSON→YAML (needs `yq`) | |
| 79 | +- `pipe sort -u` — sort unique lines | |
| 80 | +- `pipe sed -E 's/[[:space:]]+$//'` — strip trailing whitespace | |
notes/tmux.mdadded@@ -0,0 +1,29 @@ | ||
| 1 | +# Plugin Defaults — Quick Reference | |
| 2 | + | |
| 3 | +> “prefix” means your tmux prefix key (default: Ctrl+b). | |
| 4 | + | |
| 5 | +| Plugin | Default keys | Context | What it does | Notes / Tips | | |
| 6 | +|---|---|---|---|---| | |
| 7 | +| tmux-yank | prefix + **y** | Normal mode | Copy the current command-line text to system clipboard. | Also **prefix + Y** copies the pane’s CWD. | | |
| 8 | +| | **y** | Copy-mode | Yank the current selection to system clipboard. | **Y** “puts” selection to the command line. | | |
| 9 | +| tmux-copycat | prefix + **/** | Normal mode | Start regex (or plain text) search; enter “copycat mode”. | Then **n/N** next/prev match; **Enter** to copy (vi mode). | | |
| 10 | +| | prefix + **Ctrl-f** | Normal mode | Predefined search: files. | Other presets below. | | |
| 11 | +| | prefix + **Ctrl-g** | Normal mode | Predefined search: `git status` files. | | | |
| 12 | +| | prefix + **Alt-h** | Normal mode | Predefined search: SHA hashes. | | | |
| 13 | +| | prefix + **Ctrl-u** | Normal mode | Predefined search: URLs. | | | |
| 14 | +| | prefix + **Ctrl-d** | Normal mode | Predefined search: numbers (digits). | | | |
| 15 | +| | prefix + **Alt-i** | Normal mode | Predefined search: IP addresses. | | | |
| 16 | +| tmux-open | **o** | Copy-mode | Open highlighted path/URL with system default app. | **Ctrl-o** open in `$EDITOR`; **Shift-s** search the text. | | |
| 17 | +| tmux-fzf | prefix + **F** (Shift+f) | Normal mode | Launch fzf-driven session/window/pane switcher (popup on modern tmux). | Inside fzf: **Tab/Shift-Tab** to multi-select. | | |
| 18 | +| tmux-fzf-url | prefix + **u** | Normal mode | Fuzzy-pick any URL visible in the pane and open it. | Change with `set -g @fzf-url-bind 'x'` if desired. | | |
| 19 | +| tmux-resurrect | prefix + **Ctrl-s** | Normal mode | Save full tmux state (sessions/windows/panes, dirs, layout). | | | |
| 20 | +| | prefix + **Ctrl-r** | Normal mode | Restore last saved state. | | | |
| 21 | +| tmux-continuum | *(no keys; runs in background)* | — | Auto-saves every ~15 min; auto-restore on tmux start if enabled. | Enable restore: `set -g @continuum-restore 'on'`. | | |
| 22 | +| tmux-prefix-highlight | *(no keys)* | — | Adds `#{prefix_highlight}` segment showing when prefix is active. | Add it to your status-left/right to display. | | |
| 23 | +| TPM (plugin manager) | prefix + **I** | Normal mode | Install/refresh plugins. | | | |
| 24 | +| | prefix + **U** | Normal mode | Update plugins. | | | |
| 25 | +| | prefix + **Alt+u** | Normal mode | Uninstall plugins removed from config. | | | |
| 26 | + | |
| 27 | +## Verify what’s bound in *your* session | |
| 28 | +- List keys: `tmux list-keys | grep -Ei 'yank|copycat|open|fzf|resurrect|continuum|tpm'` | |
| 29 | +- Some plugins adapt to tmux version/OS; use the command above as source of truth. | |