48
submitted 6 months ago* (last edited 2 months ago) by communist@lemmy.frozeninferno.xyz to c/linux@lemmy.ml
$sinkswitch = wpctl set-default $(pw-dump | jaq -r '.[]|select(.type=="PipeWire:Interface:Node" and .info.props["media.class"]=="Audio/Sink")|[.id,.info.props["node.name"],.info.props["node.description"]]|@tsv' | awk -F'\t' -v d="$(wpctl inspect @DEFAULT_AUDIO_SINK@|awk -F'"' '/node.name/{print $2;exit}')" '$2!=d&&$2!="easyeffects_sink"{a[$3]=$1;n[++devs]=$3}END{if(devs>1){c="walker -d -p \"Audio Device: \"";for(i=1;i<=devs;i++)print n[i]|&c;close(c,"to");c|&getline p;if(p!=""){print a[p];system("notify-send --urgency=low --icon=/run/current-system/sw/share/icons/Flat-Remix-Red-Dark/panel/audio-volume-high-symbolic.svg \""p"\" -h string:x-canonical-private-synchronous:sink-state")}}else if(devs==1){for(k in a){print a[k];system("notify-send --urgency=low --icon=/run/current-system/sw/share/icons/Flat-Remix-Red-Dark/panel/audio-volume-high-symbolic.svg \""k"\" -h string:x-canonical-private-synchronous:sink-state")}}}') >/dev/null && pw-play --volume=0.2 /run/current-system/sw/share/sounds/freedesktop/stereo/audio-volume-change.oga >/dev/null &!


or, escaped for waybar:

"wpctl set-default $(pw-dump | jaq -r '.[]|select(.type==\"PipeWire:Interface:Node\" and .info.props[\"media.class\"]==\"Audio/Sink\")|[.id,.info.props[\"node.name\"],.info.props[\"node.description\"]]|@tsv' | awk -F'\\t' -v d=\"$(wpctl inspect @DEFAULT_AUDIO_SINK@|awk -F'\\\"' '/node.name/{print $2;exit}')\" '$2!=d&&$2!=\"easyeffects_sink\"{a[$3]=$1;n[++devs]=$3}END{if(devs>1){c=\"walker -d -p \\\"Audio Device: \\\"\";for(i=1;i<=devs;i++)print n[i]|&c;close(c,\"to\");c|&getline p;if(p!=\"\"){print a[p];system(\"notify-send --urgency=low --icon=/run/current-system/sw/share/icons/Flat-Remix-Red-Dark/panel/audio-volume-high-symbolic.svg \\\"\"p\"\\\" -h string:x-canonical-private-synchronous:sink-state\")}}else if(devs==1){for(k in a){print a[k];system(\"notify-send --urgency=low --icon=/run/current-system/sw/share/icons/Flat-Remix-Red-Dark/panel/audio-volume-high-symbolic.svg \\\"\"k\"\\\" -h string:x-canonical-private-synchronous:sink-state\")}}}') >/dev/null && pw-play --volume=0.2 /run/current-system/sw/share/sounds/freedesktop/stereo/audio-volume-change.oga >/dev/null &!"

there's probably a lot to improve here, took forever to get this working, did not do a cleanup pass, jfc this took forever, replace tofi with your menu of choice, thought people should have this.

wishlist: change the icon based on volume level

[-] communist@lemmy.frozeninferno.xyz 39 points 8 months ago* (last edited 8 months ago)

Be preinstalled on laptops/desktops.

everything else is ready unless you use niche software. Most people just use a browser and word or a pdf editor.

note the distro MUST be an immutable up to date kde flatpak using one for normal people, however

6
Make waybar stable and reliable (lemmy.frozeninferno.xyz)
submitted 9 months ago* (last edited 5 months ago) by communist@lemmy.frozeninferno.xyz to c/linuxquestions@lemmy.zip

So, i'm on hyprland and right now i've setup

exec-once = zsh -c 'sleep 1' && ps aux | rg ' [w]aybar' || while pgrep -f Hyprland > /dev/null ; do (waybar); done

what i need is to add a clause that terminates the "while true; do (waybar); done" that way when the compositor is restarted it kills the previous instance of while true do waybar

Just to break down the reasoning for my current command,

sleep 1 is to prevent certain stupid bugs from occurring that might be fixed now but weren't in the early days

ps aux part is to make sure waybar isn't already running

while pgrep -f Hyprland is SUPPOSED to end the loop when Hyprland ends, but it does not. I don't know why.

The reason for the while loop is to restart waybar if it crashes, but right now, when i restart hyprland (I use wl-restart) the previous while loop doesn't actually close, and waybar binds to the previous hyprlands IPC and I end up with no workspace icons or window names. Any ideas for making this work?

edit: old solution was needlessly complex,

exec-once = pidof waybar > /dev/null || while true ; do (waybar > /dev/null); done

works perfectly!

[-] communist@lemmy.frozeninferno.xyz 41 points 11 months ago

Relevant post I made:

A lot of people are going to recommend you mint, I honestly think mint is an outdated suggestion for beginners, I think immutability is extremely important for someone who is just starting out, as well as starting on KDE since it’s by far the most developed DE that isn’t gnome and their… design decisions are unfortunate for people coming from windows.

I don’t think we should be recommending mint to beginners anymore, if mint makes an immutable, up to date KDE distro, that’ll change, but until then, I think bazzite is objectively a better starting place for beginners.

The mere fact that bazzite and other immutables generate a new system for you on update and let you switch between and rollback automatically is enough for me to say it’s better, but it also has more up to date software, and tons of guides (fedora is one of the most popular distros, and bazzite is essentially identical except with some QoL upgrades).

How common is the story of “I was new to linux and completely broke it”? that’s not a good user experience for someone who’s just starting, it’s intimidating, scary, and I just don’t think it’s the best in the modern era. There’s something to be said about learning from these mistakes, but bazzite essentially makes these mistakes impossible.

Furthermore because of the way bazzite works, package management is completely graphical and requires essentially no intervention on the users part, flathub and immutability pair excellently for this reason.

Cinnamon (the default mint environment) doesn’t and won’t support HDR, the security/performance improvements from wayland, mixed refresh rate displays, mixed DPI displays, fractional scaling, and many other things for a very very long time if at all. I don’t understand the usecase for cinnamon tbh, xfce is great if you need performance but don’t want to make major sacrifices, lxqt is great if you need A LOT of performance, cinnamon isn’t particularly performant and just a strictly worse version of kde in my eyes from the perspective of a beginner, anyway.

I have 15 years of linux experience and am willing to infinitely troubleshoot if you add me on matrix.

40

Literally explained how the two things I said make sense together and he banned me for "not manning up to lying"

...Ironically in doing so, he did not man up about his falsehood, which is that I said contradictory things.

I don't agree that he's a nazi but he did some pretty heinous things, like tricking these people into writing this horrible sign:

https://www.theverge.com/2017/2/13/14605060/pewdiepie-disney-deal-lost-nazi-anti-semitic-imagery

and he did a hard-r on stream.

I don't think this qualifies for being a nazi (he doesn't advocate for an authoritarian dictatorship or a protectionist economy, nor does he want to scapegoat a group for all of his countries problems), but it is awful, racist, and disgusting.

But I don't really care if people do call him a nazi, to be clear, it's probably more effective messaging anyway.

honeybees are an invasive species, fun fact

unfortunately they outcompeted a lot of the native pollinators so we're fucked without them though

[-] communist@lemmy.frozeninferno.xyz 34 points 1 year ago* (last edited 1 year ago)

Antivirus is completely unnecessary and terrible on windows and linux... and on linux it's uniquely useless. Everything is installed from a centralized repo, antiviruses won't be of any help at all. antiviruses came about because windows let executables just be run easily and simply and used them as the default way of installing software, this was beyond idiotic and the reason that OS became infested with malware. Linux never made that mistake from the start, and so antivirus is unnecessary.

Norton is basically just malware, however.

Damn, marcan and asahi lina...

asahi project might be dead in the water now, that blows.

49

I'm not finding any information online other than that it's difficult

1

Right now I have the modem/router in the attic, where most of the computers are, but i also have a computer in the basement, to get to that computer i have a powerline network adapter with two ethernet ports.

However, there is now a laptop that needs to be connected down there and doesn't have ethernet, wifi range down there is terrible, i'd like to plug something into the additional ethernet that just outputs the same wifi as upstairs (that way i don't even have to change wifi connections, and it connects automatically to the best one), what would be the best way to do that?

Should be wayland by default, finally.

The wayland transition is almost over. JFC it took forever.

All that's left is steam itself, wine/proton, and i'd say we're basically done.

-11

I'm just baffled that i've been banned for this, I just wanted evidence that chinese elections are being rigged, and explained why that evidence was insufficient, and what evidence would be??

Tankies don't ever show up in these threads because they know this is indefensible.

"Pick a distro" is why they're waiting for steamos, presumably.

He won the popular vote...

[-] communist@lemmy.frozeninferno.xyz 44 points 2 years ago* (last edited 2 years ago)

"In 2023, 74 bills were introduced supporting ranked-choice voting and 57 of these bills had only Democrat sponsors. In fact, just eight percent of the total bills received bipartisan support."

No, but there's one party that has shown support for it and one party that has attempted to outright ban it.

It's an easy choice.

If you have a problem with this line of reasoning then your actual problem is first past the post voting.

Abolish first past the post voting and you can finally actually vote for things you like, rather than against things you hate, but we're stuck in first past the post voting, so, you must vote strategically.

13

I like the glove80, but I don't want my keyboard to have any lights on it, and I want blank keycaps

I feel like I could find it for much cheaper without these things, but I also want it to have that instant actuation/deactuation found in certain gaming keyboards that makes the latency effectively tiny

Is there anything like this on the market? I can't find anything.

view more: next ›

communist

joined 2 years ago