aboutsummaryrefslogtreecommitdiff
path: root/typebookmarks
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-04-13 17:37:26 +0200
committerLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-04-13 17:37:26 +0200
commit51d43498b07dc97d795947964534f0903cd05db5 (patch)
tree735712bd50b5c244ef922a3b873c709ecce604cd /typebookmarks
parent39711cf6c2ec5a3b4480dcb4800cc3802bda5bf2 (diff)
downloadbin-51d43498b07dc97d795947964534f0903cd05db5.tar.gz
bin-51d43498b07dc97d795947964534f0903cd05db5.zip
routine backup
Diffstat (limited to 'typebookmarks')
-rwxr-xr-xtypebookmarks16
1 files changed, 13 insertions, 3 deletions
diff --git a/typebookmarks b/typebookmarks
index 559075a..a0bcab7 100755
--- a/typebookmarks
+++ b/typebookmarks
@@ -1,5 +1,15 @@
-#! /bin/sh
+#!/bin/sh
+# Bind this script to a shortcut key in dwm config.h
+# Lines starting with # are section headers and hidden from results
+# Tab-separated comments are shown in dmenu for context but stripped before pasting
-# map this script as a shortcut key for dwm in config.h
+xdotool type "$(grep -v '^#' "$HOME/.snippets" | dmenu -i -l 50 | sed 's/\t.*//')"
+```
-xdotool type "$(grep -v '^#' ${HOME}/.snippets | dmenu -i -l 50 | sed 's/\s*#.*//')"
+---
+
+In `.snippets` manually edited it looks like this (tab between bookmark and `# comment`):
+```
+# --- git ---
+git log --oneline --graph --all # pretty git tree
+git reset --soft HEAD~1 # undo last commit