diff --git a/blog/posts/guide_things_i_keep_having_to_google/index.php b/blog/posts/guide_things_i_keep_having_to_google/index.php index e35dce0..4baedf0 100644 --- a/blog/posts/guide_things_i_keep_having_to_google/index.php +++ b/blog/posts/guide_things_i_keep_having_to_google/index.php @@ -34,7 +34,7 @@

Binding things to just the Super key in KDE

  1. Bind it to some other keyboard shortcut using KDE's typical GUI methods. Any shortcut will do.
  2. -
  3. Find the entry for it in ~/.config/khotkeysrc. There should be a line that looks like: Uuid={77575b17-36d6-4b4e-b01f-2f1156e38583}. Copy the contents of that line, specifically everything I have underlined there.
  4. +
  5. Find the entry for it in ~/.config/khotkeysrc. There should be a line that looks like: Uuid={77575b17-36d6-4b4e-b01f-2f1156e38583}. Copy everything inside the curly braces, including the braces themselves.
  6. Run the following commands:
$ kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta "org.kde.kglobalaccel,/component/khotkeys,org.kde.kglobalaccel.Component,invokeShortcut,<YOUR UUID HERE>"
$ qdbus org.kde.KWin /KWin reconfigure
@@ -55,12 +55,21 @@ "te$(command)xt"
"as$((math))df"
Both can be inserted into strings. "some $variable text"
"more${variable}text"
Both of these are valid ways to insert a variable into a string.

grep

- -vinverts it, so matches are excluded - -E "/regex/"lets you use regex + -vInverts it, so matches are excluded + -E "/regex/"Lets you use regex

cut

- -d 'string'determines the delimiter string - -f nspecifies a field to output, delimited by -d + -d 'string'Determines the delimiter string, the default is the TAB character + -f nSpecifies a field to output, delimited by -d sed 's/ */ /g' | cut -d ' 'Piping your thing through this helps with parsing a lot of Linux commands that output tabular data +

sed

+ sed "s/regex/replacement/flags"The basic sed replacement command, checks a line of input against the provided regular expression regex and replaces matches with replacement. + sed "s/a/b/;s/c/d/"Multiple sed commands can be strung together in one, like so. + sed "s/a/b/g"The g flag makes sed replace all occurences of the pattern, not just the first + sed "s/a/b/<number>"Insert any number to tell sed to replace only that occurence. Counts from 1. Theoretically, s/a/b/ is the same as s/a/b/1. + sed "s/a/b/i"GNU extension - Match case-insensitively. + sed "s/^a/b/"Require that a match be at the beginning of the line. + sed "s/a$/b/"Require that a match be at the end of the line. + sed "s/^a$/b/"Require that a match be both at the beginning and the end - in other words, require that a match be the entire line.

misc

xrandr --output <display name> --brightness <brightness>Janky software-side display brightness setting with xrandr wget "https://example.com/file.zip" -O temp.zip; unzip temp.zip; rm temp.zipBash one-liner to unzip a file from the internet to the current directory