Just noticed that you can preview files when selecting a file and pressing the space bar on the keyboard. It works for images, docs, audio, videos and even PDF files. You can simply close the preview using ESC. Really handy!
The fact that some applications do not start minimized (in tray) at system startup has been annoying me for quite some time. I find it even more annoying that you can’t simply set this directly via a checkbox in the Startup Applications for each application. The problem seems to be that each application has a different parameter for this, and therefore it cannot be done generally by the operating system (at least that’s my guess). I have therefore researched the necessary parameters for the applications I use. Simply add the parameter at the end of the Startup Applications command. For some applications, you can also activate it directly in the specific settings.
I had some videos in the format “My Episode #01.mkv” which I wanted to rename to “S01E01 My Episode #01.mkv“. This little script did the job for me:
# Specify the directory containing the files. For current directory use: $(dirname "$0")
directory="/path/to/your/directory"
# Loop through all .mkv files in the directory
for file in "$directory"/*.{webm,mkv}; do
# Check if the file exists to avoid errors when no files match
[ -e "$file" ] || continue
# Extract the base filename (without the directory path)
filename=$(basename "$file")
# Use regex to find the episode number (e.g., #01, #02)
if [[ $filename =~ \#([0-9]+) ]]; then
episode_number=${BASH_REMATCH[1]}
# Pad the episode number with a leading zero if it's a single digit
if [ ${#episode_number} -eq 1 ]; then
episode_number="0$episode_number"
fi
# Construct the new filename
new_filename="S01E${episode_number} $filename"
# Rename the file
mv "$file" "$directory/$new_filename"
echo "Renamed: $filename -> $new_filename"
fi
done
Every few months, I run into this issue when adding a torrent to transgui:
Although there is a 5-year-old closed issue on this bug, which also led to a code adjustment, this bug still seems to exist: https://github.com/transmission-remote-gui/transgui/issues/1270 The user Kethsar has probably already found the right cause and gives some hints on how to solve it. At least it helped me to find a workaround:
close transgui if it’s running, otherwise your changes will get overwritten again
# create branch, switch to it and commit changes
git checkout -b hotfix
git commit -a -m 'Commit changes for fix'
# go back to main branch
git checkout main
# merge branch changes to main
git merge hotfix
# delete branch after merging, as it is not needed anymore
git branch -d hotfix
# check on which branch your are
git status
# list all branches including last commit on each branch
git branch -vv
# check which branches are already merged and which are not
git branch --merged
git branch --no-merged
# rename branche locally
git branch --move bad-branch-name corrected-branch-name
# push new name to github/gitlab
git push --set-upstream origin corrected-branch-name
# displays local and remote branches
git branch --all
# delete remote branch
git push origin --delete bad-branch-name
# push branch to remote
git push origin hotfix
I had a few D1 Minis lying around that I wanted to flash WLED onto. But when plugging into my main PC running Linux Mint 21, no device got recognized. The D1 Mini was just flashing its blue LED light 2 times and that was all. I had already checked before, whether the USB cable is also a Data Link cable, because now and then you accidentally grab a USB cable which is charging only.
Since I was pretty sure it wasn’t a hardware problem, I checked dmesg for any suspicious messages. I’m using an alias named klog to beautify the output.
And after removing brltty, my D1 Mini got recognized immediately. Fortunately, the solution was very simple. 🙂
Update 19.01.2024: If you receive Cannot open /dev/ttyUSB0: Permission denied errors, when writing to the esp, you have to add your user to the dialout group and re-login. (*)