* Fix pdf and plain text previws in lf
Pdf previws don't appear because are generated with wrong filename.
Plain text previws with `bat` don't respect terminal theme and have
annoying border.
* Revert pdf cache filename to work properly
The s/\\&/&/g operation only effect is to add "amp;" after any ampersand in the artist or song name. "&" displays just fine anyways, so there's no reason to include an operation to replace it.
The part
```
for open in $decrypted; do
[ "$uuid" = "$open" ] && break 1
done
```
exits with `0` if the variable `$decrypted` is empty, causing none of the encrypted devices to be put into the `$unopenedluks` variable. This commit fixes this problem.
You can see the example video below (15 seconds).
## Improvements
- Directories are excluded. You can't mistakenly rename directories now or you don't have to exclude them manually.
- The extensions are excluded. Therefore, creating macros or editing in general is easier in the editor and there is no chance of messing up extensions. The extensions will be there as they are after editing.
## Justifications
- The original code fetched filenames without any specific order. In the new version, filenames are fetched in version sort order (sort -fV) to ensure a natural order, making it more intuitive for users. This is particularly useful when dealing with sequences of files (like episodes of a TV show or a series of images).
- Previously, the code used ls to get the file names. This approach can be problematic. The updated version uses find, a more robust and dependable method to retrieve files, and cut to trim the unnecessary ./ from the beginning. This change also helps us exclude directories from the list.
- It now separately stores the base filenames and their extensions. This prevents accidental renaming of file extensions, ensuring that only the desired part of the filename is modified. It adds an extra layer of precision, ensuring that a user doesn't mistakenly rename a file extension.
- It utilizes multiple file descriptors (3, 4, and 5) to read from the temporary files concurrently. This allows for a more structured loop when renaming files, making the code clearer and more maintainable. This removes the need for line by line operations and makes the process much more minimal and faster.
- The script can still work with Dash as a /bin/sh link.
## Performance Optimizations:
- The script still has minimal dependencies.
- Instead of reading and writing the entire content of files multiple times, the script uses the mktemp command to create temporary files and then employs file descriptors to read them concurrently. This minimizes file IO operations that can be a significant bottleneck.
- The script processes most data in-memory. Reading from and writing to memory is much faster than disk operations as you already know.
- The while loop uses file descriptors to read three files concurrently. This parallelization minimizes the number of loop iterations, making the loop more efficient than sequential alternatives.
* Added timeout to getforecast to prevent status bar breakage.
A 2 second timeout is used in the case that wttr.in is inaccessible when dwm is started; as otherwise it tries to curl wttr.in indefinitely, not allowing other status bar modules to be loaded.
* Update music status bar module on player state change
The previous pull request on LARBS turned out not to work, so make sure `arkenfox-auto-update` runs `arkenfox-update` as the user of the firefox profile. Otherwise it complains that it's running as root and stops.
The way of getting the username is safe, because it gets the username from the owner of the user.js file of that profile.
application/octet-stream mime-type is used for arbitrary binary files, so the best guess at opening those kind of should be based on the extension. before this all of this kind of files were tried to be opened with zathura, now it is the last resort in case the file extension is unknown.
Very arcane.
C ANSI standard requires a newline at the end. GCC will complain.
Email signatures should have a space after the -- according to the
standard. Neomutt does this automatically for you if you have a
signature.
Co-authored-by: Spenser Truex <truex@equwal.com>
In the current update, the libreoffice package doesn't have any binary for libreoffice writer, calc, impress, draw, etc. So it's better to open all of the document using the 'libreoffice' binary as it can work in the old version of libreoffice as well as the new one.