• 0 Posts
  • 23 Comments
Joined 11 months ago
cake
Cake day: December 19th, 2023

help-circle

  • Flatpak usually ships very outdated drivers.

    I’ve been in the support channel for yuzu linux, and you would not believe all the issues people have with games freezing, etc that are instantly fixed by using the appimage instead of the flatpak.

    Also flatpaks are non-xdg compliant, since it creates the useless ~/.var directory. And they have said over and over that they won’t fix that. So fuck them.

    Not to mention all the issues people have with their theming and integration into the system.

    Appimages are just simpler and better, the other day I was thinking how many issues would be fixed if Steam shipped as an appimage.

    • It would allow for shipping a patch glibc with EAC
    • It would allow for moving all the nonsense that steam puts in the home user dir, since appimages support a portable home.
    • It would allow for shipping the 32bit libraries instead of having to install them system wide.

    And depending on how you go about, appimages will even take less disk space than flatpaks or native packages even though you don’t get shared libraries with those, because they are compressed which reduces their size significantly.

    Like for example the LibreWolf appimage is 110MiB while a the native package for librewolf 300MiB. Same with LibreOffice, the appimage is 300MiB while the native package is 600 MiB.

    It also makes it easier to downgrade if you run into an issue, like I had to had an older appimage of ferdium because the latest version is affected by an electron bug that broke its zoom functionality.



  • Oh I can tell you that zram will not result in an OOM that zswap would prevent:

    I once ran into a bug when using foobar2000 with wine to convert my music library that resulted in an insanely high ram usage, like my 16 GIB ram was filled and then my 32 GIB zram was also filled and the PC froze.

    I just went and edited my zram config to make my zram 48GIB and ran foobar again, it ended the conversion without issue kek. No idea wtf happened but whatever data was being written in memory was being compressed good by zRAM, like very few people would even use a swap partition or file that is more than 32 GIB to begin with.

    I also tested running Zelda tears of the kingdom in yuzu using 4GiB of ram with a big zram and it worked, that game in yuzu is a ramhog and on windows people need 16 GiB of ram and they still max out their swapfile.

    There is also a vid on yt titled zram vs windows pagefile where a user running endevour demostrates how zram can take a bunch of Minecraft mods while windows with the help its of pagefile cant

    Edit: Here is the vid: https://www.youtube.com/watch?v=nMYTBsjeoTc





  • The issue with many of those distros is that it usually means that you have to install everything from 0.

    Arch is good at this because the archinstall script speeds it up and you don’t have to choose a DE. But with other distros that use a graphical installer, you are forced to use whatever they ship as the default desktop environment.

    edit: And holy shit properly configuring Btrfs subvolumes from 0 is something that I tried with voidlinux and I ended up breaking the entire install.



  • alias totally works, but if you want to simplify it for multiple package managers then it is better to use a script.

    Like this example that when the user types pkginstall vim, pkginstall would be a script in path that would do the operation regarless of the package manager:

    # Install with 'pacman' (if available)
    if command -v pacman >/dev/null 2>&1; then
        sudo pacman -S $@ || exit 1
    fi
    
    # Install with 'apt' (if available)
    if command -v apt >/dev/null 2>&1; then
        sudo apt install $@ || exit 1
    fi
    
    # Install with 'dnf' (if available)
    if command -v dnf >/dev/null 2>&1; then
        sudo dnf install $@ || exit 1
    fi
    

    They could even install it in their ~/.local/bin, and as long as their distro makes that part of PATH (which arch does not kek) by just using that same home with another distro they already could install/remove packages and update using those wrapper scripts regardless of the distro.

    If you are wondering why the script needs to check if the package manager exists, it is because when testing it I discovered that if the first one is not installed it will cancel the operation and not continue, and if I remove the exit 1 it will attempt to use the next package manager when canceling the operation with ctrl+c.


  • Oh I totally agree with that. But I don’t think the regular a new user should be using CLI tools to install packages. There are plenty of GUI tools that should be doing that for you instead.

    And if they did, it should be very simplified with a wrapper script like in the example above, iirc the common command update-grub is a wrapper script that simplifies it, it is a shame this isn’t more common with other tasks.

    This could be even standardized, like regardless of the distro if you type installpkg vim, the installpkg script would do something like this that will run it thru the most popular packages managers to do the simple operation:

    # Install with 'pacman' (if available)
    if command -v pacman >/dev/null 2>&1; then
        sudo pacman -S $@ || exit 1
    fi
    
    # Install with 'apt' (if available)
    if command -v apt >/dev/null 2>&1; then
        sudo apt install $@ || exit 1
    fi
    
    # Install with 'dnf' (if available)
    if command -v dnf >/dev/null 2>&1; then
        sudo dnf install $@ || exit 1
    fi
    
    echo "No package manager found"
    

  • You can use an alias for that. Or even a wrapper script that intercepts that.

    For example you could place this script in your PATH named idk mmm installpkg (install might be an issue for a name)

    Which would do the following:

    #!/bin/sh
    
    sudo pacman -S $@
    

    So when you type installpkg vim it will run sudo pacman -S vim

    You can repeat that for pacman -Syu, pacman -Rsn, etc. You can even replace pacman for your aur helper instead. (remove the sudo if you will use an aur helper instead).


  • Some defaults I would like to see:

    • Have zsh as the interactive shell (And also have its dotfiles in a better location like XDG_CONFIG_HOME/zsh)

    • Btrfs with compression enabled and subvolumes set. (Maybe also timeshift installed, not sure because not everyone uses timeshift for btrfs snapshots).

    • ZRAM (With proper sysctl.conf like PopOS does).

    • Pacman as the package manager with an Aur helper already installed.

    • No bloat™ preinstalled, nothing of shipping flatpak or snap by default or even a DE. So I can just boot into a tty without having to do the minimal install from zero.

    • Comply with the FHS and XDG specs (Arch fucking installs packages to /opt and doesnt set ~/.local/bin as part of PATH)

    • Dont break userspace (arch did this recently with an update to glibc that removed a patch that breaks steam games)


    Edit: Also forgot to mention:

    • Ship x86-64 v3 binaries, common arch, even Gentoo is doing it while on arch you have to use non official repos.


  • Been using Btrfs for a year, I once had an issue that my filesystem was read only, I went to the Btrfs reddit and after some troubleshooting it turned out that my ssd was dying, I couldn’t believe it at first because my SMART report was perfectly clean and the SSD was only 2 years old, then a few hours later SMART began reporting thousands of dead sectors.

    The bloody thing was better than smart at detecting a dying ssd lol.



  • I was like you using arch packages for everything until ferdium was hit by a terrible bug that broke its zoom function and wont be fixed in months since it is an issue with electron. Now I use the appimage version of it to downgrade to an older version.

    And then there are the rust programs that you can only find as aur git packages which means installing a bunch of dependencies and all the crap that cargo puts into my home dir just to build one binary, for that I just instead take the appimage version or sometimes the binary if they release it and place it in ~/.local/bin.

    Another good thing is that the appimages get compressed and take less disk space, for example the libreoffice package in arch is 600 MiB while the appimage is 300 MiB.

    And the great thing is that I can just drop my homedir into any distro and as long as I make sure that fuse is installed everything will work out of the box.



  • I use mod+enter or mod+~ (the key is called grave) to open rofi

    mod+q closes the program while mod+shift+q opens rofi-power-menu which is what I use to reset, shutdown, logout, etc

    mod+d is part of my navigation keys, that way I can move focus or programs around with just the left hand:

    mod+esdf to move focus

    mod+shift+esdf to move the window

    mod+control+esdf to resize the window


  • i3 here, mine is very different from the usual, I made it to use the left hand as much as possible:

    How I launch commonly used programs:

    bindsym $mod+F1 exec --no-startup-id pgrep librewolf && i3-msg "[class=LibreWolf] focus" && dunstify -r 34 -t 1500 "LibreWolf"  || librewolf | dunstify -r 34 -t 2000 "Launching non-XDG Compliant Software: LibreWolf"
    bindsym $mod+Shift+F1 exec --no-startup-id librewolf | dunstify -r 35 -t 1000 "New LibreWolf Window"
    bindsym $mod+F2 exec --no-startup-id thunar
    bindsym $mod+F3 exec --no-startup-id pgrep deadbeef && i3-msg "[class=Deadbeef] focus" && dunstify -r 36 -t 1500 "DeaDBeef" || deadbeef | dunstify -r 36 -t 2000 "Launching DeaDBeef"
    bindsym $mod+F4 exec --no-startup-id pgrep ferdium && i3-msg "[class=Ferdium] focus" && dunstify -r 37 -t 1500 "Ferdium" || ferdium | dunstify -r 37 -t 2000 "Launching Ferdium"
    bindsym $mod+F5 exec --no-startup-id pgrep freetube && i3-msg "[class=FreeTube] focus" && dunstify -r 38 -t 1500 "FreeTube" || freetube | dunstify -r 38 -t 2000 "Launching Freetube"
    bindsym $mod+F6 exec --no-startup-id pgrep steam && i3-msg "[class=steam] focus" && dunstify -r 39 -t 1500 "Steam" || exec steam | dunstify -r 39 -t 2000 "Launching Ruthless non-XDG Compliant Software: Steam" "(Also fucks your screensaver lol)"
    bindsym $mod+F7 exec --no-startup-id pgrep yuzu && i3-msg "[class=yuzu] focus" && dunstify -r 40 -t 1500 "yuzu" || gamemoderun yuzu | dunstify -r 40 -t 2000 "Launching yuzu"
    

    If the program is already opened and I press the key it will focus on it instead of opening another window, to open another window for the browser I need to press Shift. (And yes I have some beef against programs that don’t follow xdg base directory specs lol)

    For navigation keys, I use esdf instead of wasd, I can also use the arrow keys:

    
    bindsym $mod+Shift+r layout toggle splitv tabbed splith
    bindsym $mod+r layout toggle splith tabbed splitv
    bindsym $mod+q kill
    bindsym $mod+z split toggle
    bindsym $mod+g fullscreen toggle
    bindsym $mod+Shift+space floating toggle, resize set 710 400, move position center
    bindsym $mod+Mod1+space floating toggle
    bindsym $mod+space focus mode_toggle
    bindsym $mod+Shift+x move scratchpad, exec --no-startup-id dunstify -r 33 -t 1500 "Window Moved to Scratchpad"
    bindsym $mod+x scratchpad show, exec --no-startup-id dunstify -r 33 -t 1500 "Scratchpad Show"
    bindsym $mod+Left focus left
    bindsym $mod+Down focus down
    bindsym $mod+Up focus up
    bindsym $mod+Right focus right
    bindsym $mod+a exec --no-startup-id ~/.local/bin/scripts/togglefocus.sh 
    
    bindsym $mod+s focus left
    bindsym $mod+d focus down
    bindsym $mod+e focus up
    bindsym $mod+f focus right
    
    bindsym $mod+Ctrl+Left resize shrink width 100 px or 15 ppt
    bindsym $mod+Ctrl+Down resize shrink height 100 px or 15 ppt
    bindsym $mod+Ctrl+Up resize grow height 100 px or 15 ppt
    bindsym $mod+Ctrl+Right resize grow width 100 px or 15 ppt
    
    bindsym $mod+Ctrl+s resize shrink width 100 px or 15 ppt
    bindsym $mod+Ctrl+d resize shrink height 100 px or 15 ppt
    bindsym $mod+Ctrl+e resize grow height 100 px or 15 ppt
    bindsym $mod+Ctrl+f resize grow width 100 px or 15 ppt
    

    I had to use an script for mod+a because i3 can’t use the same keybind to focus parent and focus child (I use it like select all thing).

    The default config of i3 has a resize mode, I got rid of all of that, it is much better to use mod+control to resize lol.

    I also have the mouse side buttons to control media playback as well as making the window float with middleclick:

    bindsym --whole-window $mod+button2 floating toggle, resize set 710 400, move position center
    bindsym --whole-window $mod+button9 exec --no-startup-id playerctl next
    bindsym --whole-window $mod+button8 exec --no-startup-id playerctl previous
    bindsym --whole-window $mod+Shift+button8 exec --no-startup-id playerctl play-pause && sleep 0.2 && playerctl metadata --format '{{ status }}: {{ title }} by {{ artist }}' | xargs -0 -I {} dunstify -r 11 -t 2000 "Playback" "{}"
    

    edit: lemmy can’t display && when I paste it as code lol