<h2>Binding things to just the Super key in KDE</h2>
<ol>
<li>Bind it to some other keyboard shortcut using KDE's typical GUI methods. Any shortcut will do.</li>
<li>Find the entry for it in <code>~/.config/khotkeysrc</code>. There should be a line that looks like: <code>Uuid=<u>{77575b17-36d6-4b4e-b01f-2f1156e38583}</u></code>. Copy the contents of that line, specifically everything I have underlined there.</li>
<li>Find the entry for it in <code>~/.config/khotkeysrc</code>. There should be a line that looks like: <code>Uuid={77575b17-36d6-4b4e-b01f-2f1156e38583}</code>. Copy everything inside the curly braces, including the braces themselves.</li>
<tr><td><code>"te$(command)xt"<br>"as$((math))df"</code></td><td>Both can be inserted into strings.</td></tr>
<tr><td><code>"some $variable text"<br>"more${variable}text"</code></td><td>Both of these are valid ways to insert a variable into a string.</td></tr>
<tr><tdcolspan="2"><h4>grep</h4></td></tr>
<tr><td><code>-v</code></td><td>inverts it, so matches are excluded</td></tr>
<tr><td><code>-E "/regex/"</code></td><td>lets you use regex</td></tr>
<tr><td><code>-v</code></td><td>Inverts it, so matches are excluded</td></tr>
<tr><td><code>-E "/regex/"</code></td><td>Lets you use regex</td></tr>
<tr><tdcolspan="2"><h4>cut</h4></td></tr>
<tr><td><code>-d 'string'</code></td><td>determines the delimiter string</td></tr>
<tr><td><code>-f n</code></td><td>specifies a field to output, delimited by <code>-d</code></td></tr>
<tr><td><code>-d 'string'</code></td><td>Determines the delimiter string, the default is the TAB character</td></tr>
<tr><td><code>-f n</code></td><td>Specifies a field to output, delimited by <code>-d</code></td></tr>
<tr><td><code>sed 's/ */ /g' | cut -d ' '</code></td><td>Piping your thing through this <spantitle="It's not foolproof, though. Make sure you understand what this is doing so you can adapt it if it breaks.">helps</span> with parsing a lot of Linux commands that output tabular data</td></tr>
<tr><tdcolspan="2"><h4>sed</h4></td></tr>
<tr><td><code>sed "s/regex/replacement/flags"</code></td><td>The basic sed replacement command, checks a line of input against the provided regular expression <code>regex</code> and replaces matches with <code>replacement</code>.</td></tr>
<tr><td><code>sed "s/a/b/;s/c/d/"</code></td><td>Multiple sed commands can be strung together in one, like so.</td></tr>
<tr><td><code>sed "s/a/b/g"</code></td><td>The <code>g</code> flag makes sed replace all occurences of the pattern, not just the first</td></tr>
<tr><td><code>sed "s/a/b/<number>"</code></td><td>Insert any number to tell sed to replace only that occurence. Counts from 1. Theoretically, <code>s/a/b/</code> is the same as <code>s/a/b/1</code>.</td></tr>
<tr><td><code>sed "s/a/b/i"</code></td><td>GNU extension - Match case-insensitively.</td></tr>
<tr><td><code>sed "s/^a/b/"</code></td><td>Require that a match be at the beginning of the line.</td></tr>
<tr><td><code>sed "s/a$/b/"</code></td><td>Require that a match be at the end of the line.</td></tr>
<tr><td><code>sed "s/^a$/b/"</code></td><td>Require that a match be both at the beginning and the end - in other words, require that a match be the entire line.</td></tr>
<tr><tdcolspan="2"><h4>misc</h4></td></tr>
<tr><td><code>xrandr --output <display name> --brightness <brightness></code></td><tdtitle="It would definitely for sure be better to change this via the monitor's built-in menus, but that requires navigating both of my monitors' built-in menus.">Janky software-side display brightness setting with xrandr</td></tr>
<tr><td><code>wget "https://example.com/file.zip" -O temp.zip; unzip temp.zip; rm temp.zip</code></td><td>Bash one-liner to unzip a file from the internet to the current directory</td></tr>