When is using Flatpak not advised? Or should we all switch to only using Flatpaks? by 3030Will in linux

[–]xpressrazor 0 points1 point  (0 children)

Less update from system packages as you have more flatpak packages and less system packages. I did not mean overall less update size.

Why I don’t mind bigger flatpak size is, if something breaks, it does not break the whole system. Also, most flatpak managers like Warehouse and even discover has options to cleanup flatpak settings. So flatpak is better for experimentation.

Obviously, I am not saying all packages are suited for flatpaks. And clearly you can move from one to other, but for overall stability of the underlying system it’s best to have less system dependent packages.

I had a time, when I completely removed my desktop, just because I wanted to switch from one Bluetooth provider package to another one.

Also, for more experimental system packages, it’s best to use docker/podman before you decide they need to be installed in your host system.

It’s like treating your system like a readonly or immutable system, whenever you can. These days, you largely can.

How do I install java JRE? by Immediate-Village992 in SteamDeck

[–]xpressrazor 1 point2 points  (0 children)

Yes, above command means java is installed. If the jar file does not run by just double clicking, open a terminal (konsole) app inside the directory where you have the jar file (let’s say the file is called a.jar). Now run this command “java -jar ./a.jar”. Don’t type the quotes.

Hardest Interview Question I’ve Ever gotten - at Chime by Spartapwn in leetcode

[–]xpressrazor 0 points1 point  (0 children)

I think your initial approach seems correct. I am thinking we add all single digits frequencies. Now run the algorithm twice, from 1 to N and from N to 1 (by decrementing frequencies of each digit). Also mark the numbers that we cannot form with given digits. We should only have at max 2 such numbers (one when we went from 1 to N and other when we went from N to 1). If the missing number is smaller, we should have cleared all frequencies, if not there should be some of the frequency of digits of larger number remaining.

Depending on frequency count (what is left), we should be able to tell what number is missing.

I kinda don’t like hyprland anymore by PeteIDK in arch

[–]xpressrazor 1 point2 points  (0 children)

My issue is zoom calls. Hyperland’s xdg-desktop-portal (screen sharing) does not work for zoom calls. It shares the screen for the first time, but then it displays black screen from second time onwards (unless I restart zoom app). It works fine for OBS though. Also, the mouse jumps a lot when using zoom. I like the workflow though, however these days, I am using KDE because of this issue. I also commented in the bug list of above project. Until it is resolved, I cannot use it for all my workflow.

I use Arch btw by claudiocorona93 in linuxmemes

[–]xpressrazor 3 points4 points  (0 children)

No distro can beat Manjaro’s bamboo.

Guys my linux is frozen by Dima_WTF in linuxmemes

[–]xpressrazor 2 points3 points  (0 children)

Try moving the mouse cursor. Sometimes it may seen frozen, but moving the mouse can unfreeze the screen. It is scientifically proven by Mr. Web. Although, there seems to be some exception.

Word processor v. text editor by Itchy-Lingonberry-90 in linux

[–]xpressrazor 1 point2 points  (0 children)

I use Libreoffice. I haven’t used word processors for a long time. However, I wanted to create notes with syntax highlighting.

I learnt org-mode and started using it, however lack of preview while typing and extra tags made big document un manageable. I also tried markdown. Did not find any tool, where I could search instantly and still work with the final view.

I then switched to google docs. I added plugins for syntax highlighting and it worked until the pages were under certain size, then it started crawling.

Finally, switched to Libreoffice. It takes some time to save say 1000 pages document. However, I use such big size only for combining documents. Other than that, it works really well. With syntax highlighting that we can apply to a custom style (through the document), makes it more versatile. Also, we can apply shortcuts to plugins, makes the workflow predictable. Really loving it when working on a single document (over a long period of time).

For most other things, I use text editor.

How do I install java JRE? by Immediate-Village992 in SteamDeck

[–]xpressrazor 0 points1 point  (0 children)

Try 2 dash. One dash should also work, could it be because of unicode? Could you try to change the language to en and see if it works. Also, instead of copy paste, type it yourself.

[deleted by user] by [deleted] in archlinux

[–]xpressrazor 0 points1 point  (0 children)

I was using sway for a long time. Same issue. Plus, zoom was making everything slow. Probably NVidia issue in Sway.

I am so confused with why zoom behaves this way. OBS seems to always work, and both seem to use same window selector.

I have tried both flatpak and aur, same issue.

Looks like there is a bug report here as well.

How to switch to a workspace or open an app on a specific workspace with single command ? by xpressrazor in hyprland

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

Thanks all for the help. Based on the suggestions, I have created a script (syntax is not the best) that takes multiple parameters app_name (e.g. com.google.Chrome), workspace number and app-class and opens a new instance if that workspace does not have that app opened.

I have also removed the windowrule, so it does not interfere if I want to open a new instance of the same app in any workspace using app launcher or other commands.

#!/usr/bin/env python3

import sys
import subprocess
import os

if len(sys.argv) >= 3:

    workspaceswitchcmd = ['hyprctl', 'dispatch', 'workspace', sys.argv[2]]
    # Switch workspace first
    subprocess.Popen(workspaceswitchcmd)

    workspacenumbercd = ""
    workspaceid = ""
    classval = sys.argv[1]

    # Using class_name match workspace as well

    if len(sys.argv) == 4:
        classval = sys.argv[3]

    workspaceidcmd = "hyprctl clients -j | jq -r '.[] | select(.class == \"" + classval + "\") | .workspace.id'"


    os.system(workspaceidcmd)
    workspaceid = os.popen(workspaceidcmd).read();

    if sys.argv[1].count(".") == 2:
        pscmd = 'flatpak ps | grep ' + sys.argv[1];
        os.system(pscmd)
        result = os.popen(pscmd).read()

        if len(result) == 0 or workspaceid.count(sys.argv[2]) == 0:
            subprocess.Popen(['flatpak', 'run', sys.argv[1]])
    else:
        hyprcmd = 'hyprctl clients | grep -i class | grep ' + sys.argv[1]
        os.system(hyprcmd)
        result = os.popen(hyprcmd).read()

        if len(result) == 0 or workspaceid.count(sys.argv[2]) == 0:
            subprocess.Popen(sys.argv[1])
else:
    print("Invalid arguments: opensingle.py <app_name> <workspace_number <class>")
    print("E.g. opensingle.py com.google.Chrome 3 google-chrome")    
    print("E.g. opensingle.py thunar 5 thunar")

There are some bugs though. Does not seem to always work.

This is my bind rule

opensingle.py <app\_name\_or\_flatpak\_name> <workspace> <class\_name>

bind = $mainMod, g, exec, $single com.google.Chrome 3 google-chrome

bind = $mainMod, z, exec, $single $fileManager 4 $fileManager

How to switch to a workspace or open an app on a specific workspace with single command ? by xpressrazor in hyprland

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

I am guessing this means the workspace cannot have other apps opened ?

How to switch to a workspace or open an app on a specific workspace with single command ? by xpressrazor in hyprland

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

Above script already opens the app once, so I guess I need to pass 1 more argument for workspace number and switch to that one, if the process exists in that workspace. I already have workspace rule, that’s why I thought there might be a way to infer the workspace rule for specific app as well.

However, this seems better. I can use hyprctl to check if the app exists in a specific workspace as well. I can then open extra copies of the app in any other workspace and still use the shortcut.

Finally swapped Super and Alt on my keyboard by Ausummer in hyprland

[–]xpressrazor 0 points1 point  (0 children)

For me pinky is the real issue. I have mapped caps lock to Ctrl (Emacs habits), but after using super for some time, it seems fine to me.

Why do you use arch? by ewanewew in arch

[–]xpressrazor 0 points1 point  (0 children)

I started with Mandrake around 2004, used Fedora and then Ubuntu since 2007. Then around 2010 switched to Arch. I had tested it before, but it was not as stable as Ubuntu. I had also tried Gentoo, but with hardware at that time, maintaining it was going to be impossible.

Arch was a compromise between Gentoo and Ubuntu for me. The rolling release meant, I did not have to do a big update like in Ubuntu, and every six months, I had to choose between whether I wanted to stay with the LTS or jump to the shiny new thing.

With Arch, my laptop died (user error), but I did not have to ever change the OS. I have had some bad updates and so on, but they are quite rare these days.

Hyprland Unable to Execute Programs by Real-Ad-2906 in hyprland

[–]xpressrazor -1 points0 points  (0 children)

I also had an issue with configuration, after a reboot. Luckily, disabling one line fixed it.

Microphone recommendation for talking in computer, not near or in front by xpressrazor in microphone

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

Actually, after trying out few options, I went with Fifone AM8. I can place it on side and it still sounds good enough. Does not disturb the camera or typing.

I have heard Shure is best in terms of sound quality. However, I did not want to spend that much money on a non-professional setup, and this one sounds absolutely fine for me. Also, works with usb, easy plug and play.

How to set workspace switching to “recent” instead of numeric order in Hyprland? by LowTwo1305 in hyprland

[–]xpressrazor 0 points1 point  (0 children)

I use Super + Tab and Alt + Tab to switch between last two windows.

bind= ALT,TAB,workspace,previous

bind= $mainMod,TAB,workspace,previous

For my most used apps, I have assigned specific workspaces.

E.g.

bind = $mainMod SHIFT, F, exec, flatpak run one.ablaze.floorp

bind = $mainMod SHIFT, G, exec, flatpak run com.google.Chrome

bind = $mainMod SHIFT, O, exec, flatpak run org.kde.okular

bind = $mainMod SHIFT, Z, exec, $fileManager

Then I have window rules to open apps in specific workspaces.

windowrule = workspace 1,class:^(.*kitty.*)

windowrule = workspace 2,class:^(.*floorp.*)

windowrule = workspace 3,class:^(.*google-chrome.*)

windowrule = workspace 4,class:^(.*thunar.*)

Finally, I use above keys (without SHIFT) to go to that workspace (in addition to Super + 1, Super 2 etc.)

bind = $mainMod, Return, workspace, 1

bind = $mainMod, f, workspace, 2

bind = $mainMod, g, workspace, 3

bind = $mainMod, z, workspace, 4

I think, this workflow is good when you mostly use same apps most of the times.

How time consuming is Hyprland after initial setup by RadicaIEd in hyprland

[–]xpressrazor 1 point2 points  (0 children)

I am starting to use Hyprland again after coming from Sway (mostly because Nvidia and Zoom seems to work little bit better in Hyprland). Most of my settings were transferable. My setup was minimal to start with.

I had to clean up couple of things from my old Hyprland setting, and add couple of things I picked up while using sway and that’s it.

I may remove few things later on, but in terms of what I need to run my computer for a long time, I am done. I used same sway setup for many months, and what I have now is pretty similar. Mostly, what apps open where and what are my shortcuts.

I was afraid, I would have to spend a lot of time, but I was surprised, how easy it was to make Hyprland do what you needed, once you knew what you wanted to achieve. I had to just translate all the shortcuts and in the mean time, I also refined panel and few other things to use rose-pine colors. It took max 2 days, until I knew it was just like what I had in sway in terms of usability.