Archive of

Weekend reading: "Scarlet letter" edition

A weekend break in Palermo

My wife had to work this weekend, so she said I could do whatever I want. I mentioned that my colleague went to Palermo a week before, and she said, Well, why won't you go to Palermo, too? And I said, Yeah, why won't I?

Long story short, I went to Palermo. And I have a handful of snapshots to prove it.

Running a systemd service as a regular user

A "note to self" post on how to create a systemd service and run it a regular user.

Assuming, you're logged in as a regular user, create the ~/.config/systemd/user/ directory using the mkdir -p ~/.config/systemd/user/ command. Then, create a .service file:

nano ~/.config/systemd/user/my_service.service

Specify the service options:

[Unit]
Description=My_service

[Service]
Restart=always
ExecStart=/path/to/executable
ExecStop=/usr/bin/kill -HUP $MAINPID

[Install]
WantedBy=default.target

It's important that WantedBy is set to default.target.

Save the unit file, and reload the systemd daemon using the systemctl --user daemon-reload command. Enable and start the service as the user:

systemctl --user enable my_service.service
systemctl --user start my_service.service

Finally, run the loginctl enable-linger $USER command.

Give the notebook battery some TLC with TLP

Notebook batteries are fickle creatures. They don't like being charged to 100%. But they also not keen on being completely depleted. According to the conventional wisdom, to give your notebook's battery a long, productive, and healthy life, you should avoid charging it above 80% and discharging it below 25%.

Sounds simple, but how can you actually accomplish that without keeping your eyes peeled to the battery charge indicator? By letting the TLP worry about that. Install the tool on your system, configure battery charging thresholds, and leave it to TLP to take care of the rest. Here's how to do this on Linux Mint.

Continue reading

Mejiro: Easter 2023 update

Although I use Mejiro pretty much all the time, I haven't done any work on it for quite a while. Mostly because it does what it's supposed to do, and I didn't have any ideas for improvements. That changed last weekend. I wanted to tweak Mejiro a bit, and I ended up spending the entire weekend, and then some, fixing and improving the application.

Mejiro screenshot

Continue reading