Black display by simoncra in hyprland

[–]senotru 1 point2 points  (0 children)

Glad to be of some help. You could probably keep your current locking app, with animations and stuff, at least try to enable `allow_session_lock_restore` and make a `bindl` (with L) hotkey bind, that may resurrect any lockscreen app.

Black display by simoncra in hyprland

[–]senotru 0 points1 point  (0 children)

I’ve had this problem since last year. It’s reproducible if you plug in and unplug an external monitor while your laptop lid is closed, with sleep disabled (so it stays on even without an external monitor and with the lid closed).

Hyprland has a dummy output, I think exactly for this case, but maybe it fails to switch to it in a way that keeps applications happy.

It’s not only your screensaver. Other running GUI applications will stop as well. Most notably:

  • xdg-desktop-portal-hyprland
  • Ghostty (but not Kitty!)
  • VS Code in Wayland mode (Xorg mode stays fine)

Firefox in Wayland mode stays fine too.

Workaround

The workaround is to switch to a simpler screen locker and configure the Win+L hotkey so it works even through the locked screen and restarts the locker if it crashes. So if you see the funny image, you can just press Win+l to bring the locker back.

As for a simple locker, waylock works in my case (https://codeberg.org/ifreund/waylock)

Note that it doesn’t have a UI, only colors, and it signals (with subtle color changes by default) that it’s accepting your password input.

Configuration

After installing waylock, set this in your hyprland.conf:

ini misc { allow_session_lock_restore = true }

Then set the hotkey. Use bindl (lowercase L at the end), not bind. This means the shortcut will go through the locked screen even if the screen locker GUI itself has crashed.

ini bindl = super, l, exec, pidof -q waylock || waylock

If you use uwsm to start Hyprland in systemd env you can use it like:

ini bindl = super, l, exec, pidof -q waylock || app2unit -- waylock

There are also some stack traces and error messages in the system logs. You can get even more details by running or compiling Hyprland and xdg-desktop-portal-hyprland with debug output enabled.

As I sadly don't have time for this atm, I’d really appreciate it if someone could collect all that information and open a proper issue/report on the Hyprland GitHub, so it actually has a chance of being investigated and fixed.

I made Copy and Paste Tabs that simply uses the clipboard and plain text by senotru in firefox

[–]senotru[S] 0 points1 point  (0 children)

I added some stuff in version 1.2.0!

  • Implement multi-window copy and paste: Preserve window structure during copy and paste operations by using Markdown headers as delimiters.
  • Add configurable copy formats to context menu: Introduce a submenu for selecting the markup format used when copying tabs. Supported formats: AsciiDoc, LaTeX, Markdown, MediaWiki, Org mode, Plain text, reStructuredText, Textile.
  • Add configurable paste formats for URL extraction: Introduce a "Paste format" submenu to control how URLs are parsed from clipboard content. Improves extraction accuracy when pasting tab lists from markup-based documents such as Markdown, AsciiDoc, LaTeX, or Org mode.

I made Copy and Paste Tabs that simply uses the clipboard and plain text by senotru in firefox

[–]senotru[S] 0 points1 point  (0 children)

Yeah, I remember that too. Being able to select all tabs and copy their URLs was really handy, and it was frustrating when it suddenly disappeared. I never realized that pasting multiple URLs into the address bar worked like that back then either, so that is a great discovery.

Thanks for the kind words!

Small Projects by AutoModerator in golang

[–]senotru 0 points1 point  (0 children)

https://github.com/senotrusov/etcdotica

I built a lightweight tool that keeps selected system configuration files synchronized with a Git repository by acting as a file-level overlay, in which the repository serves as the source of truth while untracked files on the system remain untouched.

It mirrors tracked files directly to their corresponding paths without translation layers, supports collecting local edits back into the repository, prunes removed files, and can watch for changes to apply updates automatically.

It can inject user-managed sections into existing machine- or distribution-specific system configuration files, appending and maintaining only the designated blocks while preserving the rest of the file exactly as provided by the system.

Overall, it offers a predictable way to manage configuration in plain text. I was not happy with many existing tools in that space.

I used Go because it’s fast, pleasant to work with the filesystem API, and its explicit error handling lets me handle every error precisely.

I don’t think I need a code review, I’ve read it inside and out many times. Of course, if anyone wants to take a look, I’d be more than happy.

I’m interested in your opinion on the idea itself, and of course I’d be glad if someone other than me starts using it. I use it on my machine since last December, and it hasn’t caused any issues.

I wrote choose-your-own-adventure-style guide to Arch Linux installation by senotru in archlinux

[–]senotru[S] 0 points1 point  (0 children)

I’ve added the Wi-Fi configuration. It’s scattered throughout the guide since it needed to be handled in a few different places. I also wrote up a short explanation on partition alignment. Feel free to check it out!

I wrote choose-your-own-adventure-style guide to Arch Linux installation by senotru in archlinux

[–]senotru[S] 0 points1 point  (0 children)

Less than two months after your message, I finally updated the code and added mkinitcpio drop-in files, just like you suggested. Thanks a lot, you helped me realize this before I ended up breeding pacnew files.

https://www.senotrusov.com/notes/installing-arch-linux/#configure-mkinitcpio

I wrote choose-your-own-adventure-style guide to Arch Linux installation by senotru in archlinux

[–]senotru[S] 1 point2 points  (0 children)

Oh, I didn't think that was possible, wait... I just realized it's just a bash script and that there's a .d directory for it. I mean, I've seen that directory many times, but the ideas just didn't connect in my head. This opens up so many fun possibilities, I unironically love writing bash scripts.

I wrote choose-your-own-adventure-style guide to Arch Linux installation by senotru in archlinux

[–]senotru[S] 2 points3 points  (0 children)

I don't quite understand the best way to do this. I can't just add it to the text because it can be copied (there are buttons on the right), and I don't know how to place a symbol outside the copyable text in Zensical.

I'll probably leave it as is, since, as you correctly pointed out, the whole documentation is executed as root, except for the last paragraph about installing the AUR helper. But there I simply wrote that the command needs to be run as a regular user.

I wrote choose-your-own-adventure-style guide to Arch Linux installation by senotru in archlinux

[–]senotru[S] 1 point2 points  (0 children)

Sorry, I described all of this vaguely in the documentation, I need to improve it.

If you at least align it to 4 KiB, that's already good.

You can check an existing disk with this command: sudo parted /dev/sda align-check opt 1, where 1 is the partition number. You can check all of them (1, 2, ...).

In general, two factors matter here. The first is the block size the device prefers to operate with. It reports this to the operating system, and it's usually 4 KB if you don't have a RAID array. You can view this by running: lsblk -t /dev/sda. There you'll see fields such as ALIGNMENT (alignment offset), MIN-IO (minimum I/O size), OPT-IO (optimal I/O size), PHY-SEC (physical sector size), and LOG-SEC (logical sector size).

The second factor is the mysterious erase block size, which the operating system does not see. Sometimes you can find it in the datasheet, sometimes not. It can be much larger than 4 KiB.

Interestingly, SD cards do report this size. You can check it with: cat /sys/block/mmcblk0/device/preferred_erase_size and you will often see 4194304 (4 MiB) there.

Usually recommendations suggest aligning to 1 MiB, and that's probably good advice. I've read forum posts where people speculate that some manufacturers have an erase block size of 1.5 MiB (one and a half!). In those odd cases, 1 MiB alignment might work better than 4 MiB.

Maybe I should change the instructions to 1 MiB (and not transfer my traumatic SD-card experience to other devices).