Skip to content

u/MaybE_Tree

In this archive from May 2016 to Sep 2023

9
posts
110
comments
7
media
624
score
1 saved before deletion

As for the wallpaper, I searched for it on TinEye, and one of the results was called vlcsnap, so my guess is that this is just a screenshot from the show

2 points

Hmm it has many different features. Here are some ideas:

  1. For "click with your keyboard", you can get that behavior on websites by installing Vimperator, Vimium, VimVixen, or similar extensions in your browser. Don't think there's an easy way to do this in native apps tho.
  2. For "search menus", there's plotinus, but it's limited to only GTK apps, and also doesn't work very reliably
  3. For "search and summon windows", you could just use something like wmctrl -l | cut -d ' ' -f 5- | dmenu -l 100 -i | xargs wmctrl -a. Not sure whether you can do something like that in Wayland tho.
1 points

You can also use bubblewrap, the sandboxing solution from Flatpak. IIRC it's just a thin wrapper for Linux namespaces, so it basically works the same as Docker, but a bit easier to use. I have the following script for launching semi-untrusted executables:

#!/bin/sh

# Where is the executable?
EXECUTABLE="/path/to/executable.sh"

# What folder should we use as the persistent home directory in the sandbox?
HOMEDIR="/path/to/homedir"

bwrap \
 `# Core system directories` \
 --ro-bind /usr /usr \
 --symlink usr/bin /bin --symlink usr/bin /sbin \
 --symlink usr/lib /lib --symlink usr/lib /lib64 \
 --dev /dev \
 --tmpfs /var \
 --tmpfs /tmp \
 --tmpfs /run --dir /run/user/$UID \
 --ro-bind /etc /etc \
 --proc /proc \
 `# Isolated home directory` \
 --bind $HOMEDIR $HOME \
 `# Allow to access installed themes and icons` \
 --ro-bind ~/.themes ~/.themes \
 --ro-bind ~/.icons ~/.icons \
 `# Sound` \
 `#--ro-bind "$XDG_RUNTIME_DIR/pipewire-0" "$XDG_RUNTIME_DIR/pipewire-0" ` \
 --ro-bind "$XDG_RUNTIME_DIR/pulse" "$XDG_RUNTIME_DIR/pulse" \
 --ro-bind $HOME/.Xauthority $HOME/.Xauthority \
 `# X11` \
 --bind /tmp/.X11-unix/X0 /tmp/.X11-unix/X0 \
 `#--bind /run/dbus /run/dbus ` \
 `#--bind /var/lib/dbus /var/lib/dbus ` \
 --unshare-all \
 --unshare-net \
 --setenv PATH ~/bwrap-sandbox-bin:/usr/bin:~/.local/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl \
 `#--setenv DBUS_SESSION_BUS_ADDRESS "unix:path=/run/user/$UID/bus" ` \
 "$EXECUTABLE"

Keep in mind tho, any X11 app can spy on any other X11 app and monitor keystrokes. So not the most secure solution, but at least it will keep out any ransomware / "breaking shit for the heck of it" malware. Also notice the --unshare-net flag, it completely disables networking inside the sandbox (here it is redundant with --unshare-all, I keep it around in case I want to quickly change it to --share-net). Another limitation is that you'll only be able to edit files from inside the sandbox. So you'll have to copy files to $HOMEDIR, edit them, and copy them back. Or you can manually share any project you're working on with the sandbox. Normally, flatpak apps get around this limitation with desktop-portal, but I doubt it's possible/easy to get Sublime to use it, instead of just the baked-in filepicker.

1 points

#Comment deleted. The API pricing changes don't affect me personally, but it was the push I needed to quit Reddit. Have some broken Unicode: x̵̸̶̵̴̴̸̷̵̸̡̨̧̢̨̧̧̢̡̨̧̧̧̢̧̡̨̡̢̢̡̨̛̛̛̛̛͕͓̹͇̯̦̬͈̝̲̤͕̜̻̳̺͙̝̩̜̙̭̪̟̪̯̖̣̣̟̩̟̰̼̩̮̺̰̜͚̲̜͈̘̦̬̰̘̜̫̜͎͍̩̺͕̟̲͇̳͕̩̬͔͚̜̮̻̮̖͎͔̠̠̪͉̻͓͎̠͓̬͚̩̻̯̠̬̪̟̥̯̮̹͍̜̘͙̖̘͇̠̜̘͇̳̻͙̤̞̜̙͙͓͖̺͙͚̯̟͕͇̝͈͖̠͉̜̺̖͇͎͎̠̙̬̫̬͓͍̘͉̲͔̝͙̺̙̪͖̦̭̻͙̠̫͖͓̤͇̝̦̮͍̪͖̩̹̮͕͍̫̝͎͖̪̱̦̘̙̪̣̖̙̪͎̤̱̭͂̀́̾̄͐͗́́̆̾̌̈́͗̉̎͑̃̑̎̒͌̍̏͒̿́̄́̐̆͋̓̈́̊͛͌̿̊̒̊͒̈́͑̎̈́̌̉̿̈́̀̈̓͑̿̂̐̈́̾̂̍̏̒̑͂͆͂͂̾̿̌̔̓͛̌̀̈̽͒͂͛̌̂͒́̋̈́̌͂͑̎́̑̉̑̌̎̀̒̅̆͐͗̓̈̇̀̐̔̓̊̓̿̇͊͗̏̈́̐͋̔̆̌͆͂̿̑̊͌͋̂̑͛͐͋͐̓͊̓̋̋̈́͂̏̉͆͌͂̿̉̀͒̔̃̄́̈́͌͛͛̆̓͛͌̋̃̄̅̔͒̃̾͋̈́̉̈̀̒̑̋̈́͐̍̒̅͊͘̚̕̚̚̚̚̕̕͘̚̚̚̕͘̚͘͘͜͠͝͝͠͝͝͝͝͠ͅͅͅͅͅͅͅͅͅ�‮ -- mass edited with https://redact.dev/

1 points

#Comment deleted. The API pricing changes don't affect me personally, but it was the push I needed to quit Reddit. Have some broken Unicode: x̵̸̶̵̴̴̸̷̵̸̡̨̧̢̨̧̧̢̡̨̧̧̧̢̧̡̨̡̢̢̡̨̛̛̛̛̛͕͓̹͇̯̦̬͈̝̲̤͕̜̻̳̺͙̝̩̜̙̭̪̟̪̯̖̣̣̟̩̟̰̼̩̮̺̰̜͚̲̜͈̘̦̬̰̘̜̫̜͎͍̩̺͕̟̲͇̳͕̩̬͔͚̜̮̻̮̖͎͔̠̠̪͉̻͓͎̠͓̬͚̩̻̯̠̬̪̟̥̯̮̹͍̜̘͙̖̘͇̠̜̘͇̳̻͙̤̞̜̙͙͓͖̺͙͚̯̟͕͇̝͈͖̠͉̜̺̖͇͎͎̠̙̬̫̬͓͍̘͉̲͔̝͙̺̙̪͖̦̭̻͙̠̫͖͓̤͇̝̦̮͍̪͖̩̹̮͕͍̫̝͎͖̪̱̦̘̙̪̣̖̙̪͎̤̱̭͂̀́̾̄͐͗́́̆̾̌̈́͗̉̎͑̃̑̎̒͌̍̏͒̿́̄́̐̆͋̓̈́̊͛͌̿̊̒̊͒̈́͑̎̈́̌̉̿̈́̀̈̓͑̿̂̐̈́̾̂̍̏̒̑͂͆͂͂̾̿̌̔̓͛̌̀̈̽͒͂͛̌̂͒́̋̈́̌͂͑̎́̑̉̑̌̎̀̒̅̆͐͗̓̈̇̀̐̔̓̊̓̿̇͊͗̏̈́̐͋̔̆̌͆͂̿̑̊͌͋̂̑͛͐͋͐̓͊̓̋̋̈́͂̏̉͆͌͂̿̉̀͒̔̃̄́̈́͌͛͛̆̓͛͌̋̃̄̅̔͒̃̾͋̈́̉̈̀̒̑̋̈́͐̍̒̅͊͘̚̕̚̚̚̚̕̕͘̚̚̚̕͘̚͘͘͜͠͝͝͠͝͝͝͝͠ͅͅͅͅͅͅͅͅͅ�‮ -- mass edited with https://redact.dev/

2 points

#Comment deleted. The API pricing changes don't affect me personally, but it was the push I needed to quit Reddit. Have some broken Unicode: x̵̸̶̵̴̴̸̷̵̸̡̨̧̢̨̧̧̢̡̨̧̧̧̢̧̡̨̡̢̢̡̨̛̛̛̛̛͕͓̹͇̯̦̬͈̝̲̤͕̜̻̳̺͙̝̩̜̙̭̪̟̪̯̖̣̣̟̩̟̰̼̩̮̺̰̜͚̲̜͈̘̦̬̰̘̜̫̜͎͍̩̺͕̟̲͇̳͕̩̬͔͚̜̮̻̮̖͎͔̠̠̪͉̻͓͎̠͓̬͚̩̻̯̠̬̪̟̥̯̮̹͍̜̘͙̖̘͇̠̜̘͇̳̻͙̤̞̜̙͙͓͖̺͙͚̯̟͕͇̝͈͖̠͉̜̺̖͇͎͎̠̙̬̫̬͓͍̘͉̲͔̝͙̺̙̪͖̦̭̻͙̠̫͖͓̤͇̝̦̮͍̪͖̩̹̮͕͍̫̝͎͖̪̱̦̘̙̪̣̖̙̪͎̤̱̭͂̀́̾̄͐͗́́̆̾̌̈́͗̉̎͑̃̑̎̒͌̍̏͒̿́̄́̐̆͋̓̈́̊͛͌̿̊̒̊͒̈́͑̎̈́̌̉̿̈́̀̈̓͑̿̂̐̈́̾̂̍̏̒̑͂͆͂͂̾̿̌̔̓͛̌̀̈̽͒͂͛̌̂͒́̋̈́̌͂͑̎́̑̉̑̌̎̀̒̅̆͐͗̓̈̇̀̐̔̓̊̓̿̇͊͗̏̈́̐͋̔̆̌͆͂̿̑̊͌͋̂̑͛͐͋͐̓͊̓̋̋̈́͂̏̉͆͌͂̿̉̀͒̔̃̄́̈́͌͛͛̆̓͛͌̋̃̄̅̔͒̃̾͋̈́̉̈̀̒̑̋̈́͐̍̒̅͊͘̚̕̚̚̚̚̕̕͘̚̚̚̕͘̚͘͘͜͠͝͝͠͝͝͝͝͠ͅͅͅͅͅͅͅͅͅ�‮ -- mass edited with https://redact.dev/

1 points

#Comment deleted. The API pricing changes don't affect me personally, but it was the push I needed to quit Reddit. Have some broken Unicode: x̵̸̶̵̴̴̸̷̵̸̡̨̧̢̨̧̧̢̡̨̧̧̧̢̧̡̨̡̢̢̡̨̛̛̛̛̛͕͓̹͇̯̦̬͈̝̲̤͕̜̻̳̺͙̝̩̜̙̭̪̟̪̯̖̣̣̟̩̟̰̼̩̮̺̰̜͚̲̜͈̘̦̬̰̘̜̫̜͎͍̩̺͕̟̲͇̳͕̩̬͔͚̜̮̻̮̖͎͔̠̠̪͉̻͓͎̠͓̬͚̩̻̯̠̬̪̟̥̯̮̹͍̜̘͙̖̘͇̠̜̘͇̳̻͙̤̞̜̙͙͓͖̺͙͚̯̟͕͇̝͈͖̠͉̜̺̖͇͎͎̠̙̬̫̬͓͍̘͉̲͔̝͙̺̙̪͖̦̭̻͙̠̫͖͓̤͇̝̦̮͍̪͖̩̹̮͕͍̫̝͎͖̪̱̦̘̙̪̣̖̙̪͎̤̱̭͂̀́̾̄͐͗́́̆̾̌̈́͗̉̎͑̃̑̎̒͌̍̏͒̿́̄́̐̆͋̓̈́̊͛͌̿̊̒̊͒̈́͑̎̈́̌̉̿̈́̀̈̓͑̿̂̐̈́̾̂̍̏̒̑͂͆͂͂̾̿̌̔̓͛̌̀̈̽͒͂͛̌̂͒́̋̈́̌͂͑̎́̑̉̑̌̎̀̒̅̆͐͗̓̈̇̀̐̔̓̊̓̿̇͊͗̏̈́̐͋̔̆̌͆͂̿̑̊͌͋̂̑͛͐͋͐̓͊̓̋̋̈́͂̏̉͆͌͂̿̉̀͒̔̃̄́̈́͌͛͛̆̓͛͌̋̃̄̅̔͒̃̾͋̈́̉̈̀̒̑̋̈́͐̍̒̅͊͘̚̕̚̚̚̚̕̕͘̚̚̚̕͘̚͘͘͜͠͝͝͠͝͝͝͝͠ͅͅͅͅͅͅͅͅͅ�‮ -- mass edited with https://redact.dev/

1 points

#Comment deleted. The API pricing changes don't affect me personally, but it was the push I needed to quit Reddit. Have some broken Unicode: x̵̸̶̵̴̴̸̷̵̸̡̨̧̢̨̧̧̢̡̨̧̧̧̢̧̡̨̡̢̢̡̨̛̛̛̛̛͕͓̹͇̯̦̬͈̝̲̤͕̜̻̳̺͙̝̩̜̙̭̪̟̪̯̖̣̣̟̩̟̰̼̩̮̺̰̜͚̲̜͈̘̦̬̰̘̜̫̜͎͍̩̺͕̟̲͇̳͕̩̬͔͚̜̮̻̮̖͎͔̠̠̪͉̻͓͎̠͓̬͚̩̻̯̠̬̪̟̥̯̮̹͍̜̘͙̖̘͇̠̜̘͇̳̻͙̤̞̜̙͙͓͖̺͙͚̯̟͕͇̝͈͖̠͉̜̺̖͇͎͎̠̙̬̫̬͓͍̘͉̲͔̝͙̺̙̪͖̦̭̻͙̠̫͖͓̤͇̝̦̮͍̪͖̩̹̮͕͍̫̝͎͖̪̱̦̘̙̪̣̖̙̪͎̤̱̭͂̀́̾̄͐͗́́̆̾̌̈́͗̉̎͑̃̑̎̒͌̍̏͒̿́̄́̐̆͋̓̈́̊͛͌̿̊̒̊͒̈́͑̎̈́̌̉̿̈́̀̈̓͑̿̂̐̈́̾̂̍̏̒̑͂͆͂͂̾̿̌̔̓͛̌̀̈̽͒͂͛̌̂͒́̋̈́̌͂͑̎́̑̉̑̌̎̀̒̅̆͐͗̓̈̇̀̐̔̓̊̓̿̇͊͗̏̈́̐͋̔̆̌͆͂̿̑̊͌͋̂̑͛͐͋͐̓͊̓̋̋̈́͂̏̉͆͌͂̿̉̀͒̔̃̄́̈́͌͛͛̆̓͛͌̋̃̄̅̔͒̃̾͋̈́̉̈̀̒̑̋̈́͐̍̒̅͊͘̚̕̚̚̚̚̕̕͘̚̚̚̕͘̚͘͘͜͠͝͝͠͝͝͝͝͠ͅͅͅͅͅͅͅͅͅ�‮ -- mass edited with https://redact.dev/

3 points

Now I would just need a midi translator on linux that can launch commands after receiving a MIDI CC message

If you don't want to use Python, you could instead use aseqdump, a program that listens for all midi events and prints them as text into the console. Here is an example shell script that runs a simple echo command on Note Up events:

aseqdump -p 0 | while read line
    do echo "$line" | grep "Note on" && {
        echo "Note on event!"
        }
    done

Basically, it uses aseqdump to convert MIDI events to simple text lines, and then uses grep to search every line for the phrase Note on. If grep succeeds, then the block inside the curly brackets is executed. You could change it to look for CC events instead (just run aseqdump on its own to see what text it generates for the specific event that you want). Then, you could replace the echo command with a uhubctl invocation, and you're pretty much done!

I hope this helps. If you have any further questions, I will be happy to help.

1 points

I doubt that this is as easy as you think it is. To the extent of my knowledge, most consumer laptops don't let the operating system control whether a USB port receives power or not. The most control over the 5v rails that you will get is whether or not the usb port gets power when the laptop is sleeping or powered off (you can find this setting in the laptop's BIOS probably).

To accomplish what you want, you will almost certainly need to use some custom hardware. For example, you can use a USB development board such as a Teensy or Arduino to control the lamp, and have your computer talk to it via USB serial. You said that you have no coding knowledge, but I think it wouldn't be too hard, if you are willing to make good use of Google and/or ChatGPT. Depending on how powerful your lamp is, you may be able to connect it directly to digital output pins on your micro-controller. If, however, your lamp draws more current than the output pin is rated for, you will probably want to use a MOSFET to control the lamp. Send me a DM if you need help picking a development board or writing the code.

A (much more cursed) approach that doesn't require a microcontroller would be to use something that you can control from inside the OS as a proxy for controlling the lamp. Various indicator LEDs tend to be a good bet. For example, on my Thinkpad X1 Carbon, I can use the file /sys/devices/platform/thinkpad_acpi/leds/tpacpi::lid_logo_dot/brightness to control the brightness of the logo LED on the back of the top lid. If your laptop has a similar controllable LED, then you can tape a photoresistor to it, and, through an op-amp comparator, power your lamp.

Finally, you could try shopping for a USB hub that lets you control which ports receive power. These are not very common, but I have heard of some people using them. Keep in mind, the software that lets you do the controlling may not be available for Linux.

As for listening for MIDI messages, I can't really help you here any more than Google can. aseqdump is a command that lets you print MIDI messages to the terminal, so it can be a good place to start. Then, you could probably use Python and some MIDI library to actually implement something that listens for MIDI messages and turns on the lamp. Python is a relatively easy programming language to learn, you shouldn't have much trouble with it. And it's installed by default on most linux systems, you can type python in the temrinal and it'll launch an interactive shell. Again, if you need any help with code, feel free to send me a DM.

2 points

Flashing: All data is copied from source to destination, bit-by-bit. The source and destination are guaranteed to be identical. For example, if you are flashing an ISO file to a usb disk, the usb disk will have the same partition table and/or filesystem as the ISO file.

Copying files: only the data in the files is copied over. Anything that lies outside of files (for example, unallocated space) will not be copied over. Moreover, depending on what you use to copy the files, metadata such as permissions or creation time may be changed. Copying files to a usb disk from an ISO file requires the disk to already have a filesystem on it, which may or may not be the same as the filesystem used inside the ISO file.

In the context of creating Linux bootable media (such as an installation or live system USB disk), flashing is required for installers that boot in MBR (Master Boot Record) mode, since the MBR header is stored in a specific location at the start of the disk, not associated with any file. By contrast, uEFI-based live media may be created by simply transferring files to a FAT32 or FAT16 partition on the disk, since uEFI "speaks" FAT natively and does not rely on the MBR header.

As a real-world example, take a look at the install instruction for the Clonezilla Live USB [https://clonezilla.org/liveusb.php], which has instructions for both MBR mode (flashing) and uEFI mode (copying files).

1 points

No problem. By the way, there's also another difference with Windows. While Windows can only be installed on NTFS formatted partitions, in the Linux world there are actually two competing filesystems: ext4 and btrfs. ext4 is "ol' reliable", while btrfs is the hot new thing.

The reason I want you to know this is that while my explanation holds for ext4 and most other filesystems, things might get a little more complicated if you installed your system on a btrfs partition. See, btrfs has this thing called "subvolumes" which are basically like virtual partitions within a "real" btrfs partition. So, the same btrfs partition can actually be mounted in multiple different mountpoints and show different files at every one of those mountpoints, depending on which subvolume is mounted there.

IIRC, Ubuntu uses ext4 as default, so you probably don't need to worry about this. But if you manually pick btrfs during installation, then, IIRC, Ubuntu will create two different subvolumes for / and /home on your partition.

You can think of subvolumes as essentially "handles" attached to folders in the btrfs file tree. There is always at least one subvolume, the root subvolume, which is attached to / in the btrfs filesystem. But there may be other ones "attached" to different directories. When you mount a btrfs filesystem, you can specify which subvolume to use (e.g. mount /dev/sdb1 /mnt/mountpoint -o subvol=/path/to/subvolume). It will then get treated as the new root, and /mnt/mountpoint will show the contents of /path/to/subvolume on the btrfs disk.

You can use gnome disk utility to check what your disk is formatted as. lsblk is also a good commandline utility to check what disks are mounted where. For example, on my system, lsblk gives:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 931.5G  0 disk
├─sda1   8:1    0  1000M  0 part
├─sda5   8:5    0 794.4G  0 part /mnt/fstree
│                                /
└─sda6   8:6    0  17.2G  0 part [SWAP]

Which shows that my boot partition, /dev/sda5, has two different subvolumes mounted at / and /mnt/fstree. That's because my filesystem root is actually not the root of the partition. I have multiple snapshots of my system stored in a directory called /subvolumes relative to the btrfs root. Snapshots are a type of subvolumes that are kind of like backups that don't actually take up space. So, when I boot normally, /subvolumes/root gets mounted as /, but if I wanted to boot to an earlier backup, I could add an EFI boot entry that tells Linux to mount /subvolumes/2022-03-12 as /, for example. The other mountpoint, /mnt/fstree/, is the actual root of the btrfs partition. I have it mounted so that I can see/manage all of the existing snapshots from within my booted system.

1 points

You know how in Windows, you can "mount" disks to specific folders instead of drive letters? This is pretty much how the Linux file hierarchy works. When the system boots, the main partition gets mounted into /. Any other partitions get mounted "on top of" empty folders in the main partition. For example, mount /dev/sdb1 /mnt/mountpoint will mount partition 1 of the disk detected as sdb into the folder /mnt/mountpoint. So, even if /mnt/mountpoint is an empty folder on your main disk, that path will now show the contents of the first partition on disk sdb.

You can use df to show the currently active mountpoints. You said you're on Ubuntu, so you will probably also see a bunch of virtual disks that Snap uses.

If you want to, for example, use a separate disk for your games, you could make a mountpoint in your home directory, and connect the disk there. You can accomplish this manually by editing the /etc/fstab file, or you could use Gnome's disk utility (which should be automatically installed on Ubuntu). Click on the disk you want to use, select the desired partition, then click the cog icon, and select edit mount options. From there, change the Mount Point parameter to point to an empty folder that you want to use as the mountpoint.

5 points

There's just something so comfy about this setup. Debian, Courier font, XFWM, 10 series graphics card... everything just speaks "Ol' Reliable" to me haha. Nice color coordination too, and great wallpaper from a great game!

Is xfwm the default wm in lxqt, or did you manually switch to it?

3 points

I am 99% sure that this is showing the graphical mode of emacs, not in a terminal. As explained in this comment, pixel-precise scrolling would be very difficult to implement in a terminal-based program.

As a test, I went and compiled emacs 30 myself. I can see that enabling pixel-scroll-precision-mode in graphical mode does exactly what is shown in the demo, but has no effect in terminal mode (i.e. when launched with -nw).

I've never used emacs before, so there is always a possibility that I'm doing something wrong, and they did actually manage to implement pixel-precise scrolling inside a terminal through some arcane form of black magic. But even if that is the case, I don't see how that can help you achieve your goal of universal pixel-precise scrolling, unless you're willing to use emacs as your pager.

So, in conclusion, I don't think there's an easy way to do what you want. The best I can suggest is setting your $EDITOR and $PAGER to a graphical applications that do support pixel-precise scrolling. Here is a stackoverflow question about something similar. Of course, this might be a bit jarring, since it will open a new window every time instead of staying in the terminal.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.