SLOPSHOPPER

dcg-approve

Suggests dcg allow-once for the last command dcg blocked in a turn

newguard
A shopper browsing a rack in a slop shop
README

Dotfiles

Managed using GNU Stow

Reminders

Structure: "name-of-package"/path-to/destination stow "package-to-install" to set up symlinks stow -D "package-to-uninstall" to remove symlinks

OMP on Omarchy

Install both packages with stow omp omarchy, then apply an Omarchy theme to generate the OMP palette. Restart OMP once after setup so it starts with the custom theme's file watcher. Subsequent Omarchy theme switches update OMP live. Changing the theme through Appearance settings alone does not start the watcher in the current OMP runtime.

Vivaldi on Omarchy

Install the packages and browser UI modification from the repository root as your desktop user:

make install-vivaldi

The target runs Stow, prompts for sudo to patch Vivaldi's system resources, and reapplies the current Omarchy theme. Stow alone is not sufficient. Restart Vivaldi once after it completes. Subsequent theme switches update its interface within about a second, without a debugging port or local server. The integration selects its own Omarchy theme and disables Vivaldi's theme scheduling.

Run make install-vivaldi again after Vivaldi updates, then restart the browser. The modification uses Vivaldi's internal API and may need changes when that API changes. The installation supports one desktop user and shares that user's palette with every Vivaldi profile using this installation.

To stop syncing, remove the omarchy-theme.js script tag from /opt/vivaldi/resources/vivaldi/window.html, restart Vivaldi, and select your preferred theme and scheduling settings.

Required tools

  • stow
  • make
  • kitty
  • tmux and TPM
  • starship
  • gh, with extensions dlvhdr/gh-dash and dlvhdr/gh-enhance
  • lazygit
  • lazydocker
  • fzf
  • ripgrep
  • zoxide
  • eza
  • uv
  • python 3.14 or newer
  • stylua
  • dcg, from github.com/Dicklesworthstone/destructive_command_guard, and jq
  • shellcheck and lua-language-server, installed by nvim through Mason
Source 1 files
hooks/register.ts 29 lines
1import type { Register } from 'claude-code'
2
3const DCG_TOOLS: ReadonlySet<string> = new Set(['Bash', 'PowerShell', 'Monitor'])
4const DENIAL_CODE = /approve it with: dcg allow-once (\d+)$/m
5
6let blockedCode: string | undefined
7
8export const register: Register = on => {
9  on('tool.call', async ($, e, next) => {
10    const outcome = await next(e)
11    if (!DCG_TOOLS.has(e.tool)) return outcome
12    const denial = 'deny' in outcome ? outcome.deny : outcome.isError ? outcome.text : undefined
13    const code = denial?.match(DENIAL_CODE)?.[1]
14    if (code !== undefined) blockedCode = code
15    return outcome
16  })
17
18  on('turn.complete', async ($, e, next) => {
19    const completed = await next(e)
20    if (e.agentId === undefined) {
21      if (!e.isAborted && blockedCode !== undefined) {
22        void $.prompt.suggest({ text: `! dcg allow-once -y ${blockedCode}` })
23      }
24      blockedCode = undefined
25    }
26    return completed
27  })
28}
29