riazj.com

source code for this website
git clone https://riazj.com/git/riazj.com
Log | Files | Refs | LICENSE

commit ab8723ae58330bc5b425815d0d56754be943fac6
parent 7985ed7f4cf57f6a892bf04a2cd4ece1c846c7d2
Author: Riaz <riaz@riazj.com>
Date:   Sat,  4 Oct 2025 21:54:54 -0700

Update sxhkd configuration for sdcv

Diffstat:
Marticles/dictionaries.html | 20++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/articles/dictionaries.html b/articles/dictionaries.html @@ -12,12 +12,19 @@ <h1>Notes on Offline English Dictionaries</h1> <hr> <article> +<pre>export SDCV_PAGER=less</pre> +<pre> +alt + d + phrase="$(:|dmenu -p "Define:")" &amp;& st sdcv "$phrase" +</pre> +<h2>Previous Setups</h2> +<h3>dictd</h3> <p><a href="https://wiki.archlinux.org/title/Dictd">Install dictd, and configure it to use offline dictionaries.</a></p> <p>To use dict with dmenu, create an index. The following assumes that you are using the WordNet dictionary.</p> <pre> cd ~/.local/state cp /usr/share/dictd/wn.index . -sed "s/&#9;.*//g" wn.index | sort -n &gt; wn.tmp &amp;& mv wn.tmp wn.index +sed "s/ .*//g" wn.index | sort -n &gt; wn.tmp &amp;& mv wn.tmp wn.index </pre> <p>Note that in the sed command above, there is a tab, but your browser might show a space. If you copy it to your clipboard, it should work regardless.</p> <p>To use this with sxhkd:</p> @@ -25,16 +32,9 @@ sed "s/&#9;.*//g" wn.index | sort -n &gt; wn.tmp &amp;& mv wn.tmp wn.index alt + shift + d definition="$XDG_RUNTIME_DIR/dmenu_dict"; \ dict "$(dmenu -i -l 10 &lt; $XDG_STATE_HOME/wn.index)" &gt; "$definition"; \ - [ -s "$definition" ] && st less -+F -c "$definition" -</pre> -<p>2025 Aug 8th: I switched back to sdcv since the AUR has a repository with only the WordNet files without its programs.</p> -<pre> -alt + d - def="$XDG_RUNTIME_DIR/sdcv"; \ - sdcv -n "$(:|dmenu -p "Define:")" > "$def"; \ - [ -s "$def" ] && st less "$def" + [ -s "$definition" ] &amp;& st less -+F -c "$definition" </pre> -<p>I no longer use the following hacky setup with GCIDE. Its custom markup sucks.</p> +<h3>GCIDE</h3> <pre> cd gcide for f in CIDE*; do; mv $f "${f#*.}"; done