From 670ddfb42334265efacb1705492b44455b8188f3 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Sun, 6 Nov 2022 14:28:09 +0100 Subject: [PATCH] clarifications --- data/w3m.md | 21 ++++--- distros/redhat/yum.md | 8 +-- distros/void/xbps.md | 28 +++------ hardware/keyboard/keyboard.md | 2 +- networking/scraping/youtube-dl.md | 16 +++--- networking/wpa_supplicant.md | 95 +++++++++++++++---------------- system/default_programs.md | 4 +- vim/basic_vim.md | 2 +- vim/vim-windows.md | 1 - 9 files changed, 79 insertions(+), 98 deletions(-) diff --git a/data/w3m.md b/data/w3m.md index eba6c76..89ebee2 100644 --- a/data/w3m.md +++ b/data/w3m.md @@ -1,16 +1,19 @@ --- title: "w3m" -tags: [ "Documentation", "data" ] +tags: [ "Documentation", "browsers" ] --- -'H' for help. +Open a search tab: -Ctrl+u to go to new url. +> w3m ddg.gg -tab between fields. -B to go back. + then enter to start typing. -o for the love of options. - -T for a new tab. -'{' and '}' to change tabs. +| Key | Thing | +|:---------|:---------------------| +| H | help | +| Tab | switch fields | +| o | options | +| B | back | +| T | new tab | +| { / } | switch tabs | diff --git a/distros/redhat/yum.md b/distros/redhat/yum.md index ae831c6..d15abf8 100644 --- a/distros/redhat/yum.md +++ b/distros/redhat/yum.md @@ -4,12 +4,6 @@ tags: [ "Documentation", "Distros" ] --- # Overview -Forks include CentOS, scientific Linux, Oracle, and Fedora. - -Major features: reliable, shit package selection. - -# Basically yum - > yum search [package] > yum list openssh @@ -20,5 +14,5 @@ Major features: reliable, shit package selection. > yum update -yum remove [package1] [package2] +> yum remove [package1] [package2] diff --git a/distros/void/xbps.md b/distros/void/xbps.md index e7b177e..57a29b9 100644 --- a/distros/void/xbps.md +++ b/distros/void/xbps.md @@ -10,7 +10,8 @@ Look for cowsay > xbps-query -Rs cowsay -Upgrade current packages. -R looks at repositories, -s makes things sloppy. +Upgrade current packages. +`-R` looks at repositories, `-s` makes a sloppy search (for rough matches). > xbps-install -Suv @@ -30,16 +31,12 @@ Reconfigure all packages. Useful for breakages. > xbps-pkgdb -a -Remove all dependencies. +Remove all orphaned dependencies. > xbps-remove -o Show information about cowsay -> xbps-query -RS cowsay - -Search for cows - > xbps-query -Rs cows List packages requiring updates. @@ -58,7 +55,7 @@ Clean. > xbps-remove -O -apt update +Update list of available packages ('sync') > xbps-install -S @@ -66,10 +63,6 @@ Remove package information. > xbps-query -R -Display all cowsay files - -> xbps-query -Rf cowsay - Do I have cowsay installed? > xbps-query -s cowsay @@ -80,10 +73,10 @@ What packages are pointless? > xbps-install -Sn cowsay -A dry-run of installing cowsay, without actually intalling. - # Advanced +A dry-run of installing cowsay, without actually intalling. + > xbps-query -x cowsay Show cowsay's dependencies. The -R flag's required for a remote package. @@ -106,14 +99,7 @@ Look for broken packages. > sudo xbps-pkgdb -a -And if you've found any, you might try: +And if you've found any, you might reconfigure all packages forcefully: > sudo xbps-reconfigure -af -This reconfigures all packages forcefully. - -If that doesn't help the issue, try to find the broken package and forcefully reinstall: - -> xbps-query -s gnutls - -> sudo xbps-install -f gnutls diff --git a/hardware/keyboard/keyboard.md b/hardware/keyboard/keyboard.md index b160ed5..b1604e3 100644 --- a/hardware/keyboard/keyboard.md +++ b/hardware/keyboard/keyboard.md @@ -29,7 +29,7 @@ Remap, e.g., the right Windows key, to Alt_Gr. key {[ ISO_Level3_Shift ]}; ``` -# Set Global Keymap +# Set TTY Keymap Copy your keymap, e.g. if it's polish-1, then: diff --git a/networking/scraping/youtube-dl.md b/networking/scraping/youtube-dl.md index 229157a..2f79664 100644 --- a/networking/scraping/youtube-dl.md +++ b/networking/scraping/youtube-dl.md @@ -1,22 +1,24 @@ --- -title: "youtube-dl" +title: "Download videos" tags: [ "Documentation", "Scraping" ] --- -> youtube-dl --write-auto-sub +Install `yt-dlp`. + +> yt-dlp --write-auto-sub ** It will default to English, but you can specify another language with the flag --sub-lang: -> youtube-dl --sub-lang sv --write-auto-sub +> youtube-dl --sub-lang sv --write-auto-sub ** You can list all available subtitles with: -> youtube-dl --list-subs +> yt-dlp --list-subs ** -It’s also possible to skip the video and only download the subtitle if you add the flag --skip-download: +It's also possible to skip the video and only download the subtitle if you add the flag --skip-download: -> youtube-dl --sub-lang sv --write-auto-sub --skip-download +> yt-dlp --sub-lang sv --write-auto-sub --skip-download ** ## Alternative Try `yt-dlp` for some additional features and workarounds. -It uses the same flags as youtube-dl. +It uses the same flags as yt-dlp. diff --git a/networking/wpa_supplicant.md b/networking/wpa_supplicant.md index df30221..f3a9ac8 100644 --- a/networking/wpa_supplicant.md +++ b/networking/wpa_supplicant.md @@ -5,7 +5,53 @@ tags: [ "Documentation", "Networking" ] wpa_supplicant configurations are stored in /etc/wpa_supplicant/wpa_supplicant-wlan0 (or equivalent). -# Generating Keys Manually +## WiFi Connection + +> wpa_cli + +Once in, scan the network, add an empty place to store credentials, then input them. + +> scan + +> scan_results + +> add_network + +This outputs a network number, e.g. '3'. This is the new network you'll work with. + +> set_network *3* ssid *"Kosachok Cafe"* + +> set_network 3 psk *"Kosachok2019"* + +OR (for no password) + +> set_network *3* key_mgmt NONE + +> enable_network 3 + +> save_config + +This takes a while to connect, so to speed things up, restart the service: + +> sudo sv restart wpa_supplicant + +# Scripts + +You can script like this: + +> wpa_cli add_network + +That returns an ID, so you can say: + +> newNetwork="$(wpa_cli add_network)" + +Then `$newNetwork` would equal that number, and you can add/ remove networks with scripts. + +But remember to escape the quotes, so adding a network would be: + +> wpa_cli set_network *3* psk *\""passphrase"\"* + +## Generating Keys Manually > wpa_passphrase [ssid] [password] @@ -22,50 +68,3 @@ Next up, start wpa_supplicant: > wpa_supplicant -B -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0 The -B flag runs this as a background process. Remove this to see real-time output in order to solve problems. The -i flag denotes the physical device used for the wifi. The -c flag points to the configuration file for use. - -## Automatic WiFi Connection - -> wpa_cli - -This has a number of commands to input. In order: - -> scan - -> scan_results - -> add_network - -This outputs a network number, e.g. '3'. This is the new network you'll work with. - -> set_network 3 ssid "Kosachok Cafe" - -> set_network 3 psk "Kosachok2019" - -OR (for no password) - -> set_network 3 key_mgmt NONE - -> enable_network 3 - -> save_config - -...and for the impatient: - -> sudo sv restart wpa_supplicant - -## Scripts - -You can script like this: - -> wpa_cli add_network - -That returns an ID, so you can say: - -> newNetwork="$(wpa_cli add_network)" - -Then `$newNetwork` would equal that number, and you can add/ remove networks with scripts. - -But remember to escape the quotes, so adding a network would be: - -> wpa_cli set_network 3 psk \""passphrase"\" - diff --git a/system/default_programs.md b/system/default_programs.md index d6a2d8d..19ffcd4 100644 --- a/system/default_programs.md +++ b/system/default_programs.md @@ -3,9 +3,7 @@ title: "Default Programs" tags: [ "Documentation", "Defaults", "Mime Type" ] --- -Install the package `xdg-utils`. - -In general, type these commands with `bash-completion`, and you'll see the right option. +Install the package `xdg-utils`, then make very liberal use of the tab button. ## Ask diff --git a/vim/basic_vim.md b/vim/basic_vim.md index a944d6b..ebb4fae 100644 --- a/vim/basic_vim.md +++ b/vim/basic_vim.md @@ -1,5 +1,5 @@ --- -title: "Basic vim" +title: "vim basics" tags: [ "Documentation", "vim" ] --- diff --git a/vim/vim-windows.md b/vim/vim-windows.md index 8b62263..c6e2c1b 100644 --- a/vim/vim-windows.md +++ b/vim/vim-windows.md @@ -12,4 +12,3 @@ tags: [ "Documentation", "vim" ] | rotate windows | C-w r | | split open new file | :sf path/file | -