krash

@krash@lemmy.ml

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Linux on a 2in1 for Uni (lemmy.world)

Hello linix@lemmy, I got fixed on the idea of replacing my iPad with a 2in1 like the thibkpad X13 for uni since I use the keyboard with my iPad a lot. The only time I need to take handwritten notes is in chemistry, mathematics and to annotate PDFs. Does anyone here have experience with convertibles running Linux? What would be...

krash,

Surface pros work, but they’re not ideal for linux. Expect struggle during the installation, and be aware some parts of the hardware won’t work.

krash,

I really want to have better tiling and window management in Gnome. Ubuntu has an add-on released with 23.10 that I haven’t got around to test yet. And I know that Gnome has that feature in the works, but it annoys me that Windows 11 has better management of windows with window-snapping than my DE of choice.

krash,

I love how tabby contains all keys, identities, configurations etc. But it is sluggish compared to the competition.

krash, (edited )

You can make your own bash/ fish/ python menu pretty easily if what you want is to have an “address book” or a speed dialer to you’re ssh servers. Let me know if you’re curious and I could share mine.

EDIT: so what I use is a fish function, and my “adress book” is hardcoded in it. It was a quick and dirty POC that never moved passed the “conecpt” stage, but ideally - these values should be stored in a csv file so it can be accessible from whatever program you’re making / using.

This can surely be easily adaptable to bash or python through a coding LLM for the lazy.

The code below should be in ~/.config/fish/functions/ssh_menu.fish for fish shell.


<span style="color:#323232;">function ssh_menu
</span><span style="color:#323232;">    </span><span style="color:#0086b3;">set </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">l servers[</span><span style="color:#0086b3;">1</span><span style="color:#323232;">] </span><span style="color:#183691;">"user@ip_or_domainname"
</span><span style="color:#323232;">    </span><span style="color:#0086b3;">set </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">l servers[</span><span style="color:#0086b3;">2</span><span style="color:#323232;">] </span><span style="color:#183691;">"user@ip_or_domainname"
</span><span style="color:#323232;">    </span><span style="color:#0086b3;">set </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">l servers[</span><span style="color:#0086b3;">3</span><span style="color:#323232;">] </span><span style="color:#183691;">"user@ip_or_domainname"
</span><span style="color:#323232;">    </span><span style="color:#0086b3;">set </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">l servers[</span><span style="color:#0086b3;">4</span><span style="color:#323232;">] </span><span style="color:#183691;">"user@ip_or_domainname"
</span><span style="color:#323232;">    </span><span style="color:#0086b3;">set </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">l servers[</span><span style="color:#0086b3;">5</span><span style="color:#323232;">] </span><span style="color:#183691;">"user@ip_or_domainname"
</span><span style="color:#323232;">
</span><span style="color:#323232;">    clear
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">for </span><span style="color:#323232;">i </span><span style="font-weight:bold;color:#a71d5d;">in </span><span style="color:#323232;">(seq (count $servers))
</span><span style="color:#323232;">        echo </span><span style="color:#183691;">"[$i] $servers[$i]"
</span><span style="color:#323232;">    end
</span><span style="color:#323232;">
</span><span style="color:#323232;">    echo </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">n </span><span style="color:#183691;">"Enter the number of the server to SSH into: "
</span><span style="color:#323232;">    read choice
</span><span style="color:#323232;">
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">test </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">n </span><span style="color:#183691;">"$choice" </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">a </span><span style="color:#183691;">"$choice" </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">ge </span><span style="color:#0086b3;">1 </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">a </span><span style="color:#183691;">"$choice" </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">le (count $servers)
</span><span style="color:#323232;">        </span><span style="color:#0086b3;">set </span><span style="color:#323232;">server_info $servers[$choice]
</span><span style="color:#323232;">        </span><span style="color:#0086b3;">set </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">l server_ip (echo $server_info </span><span style="font-weight:bold;color:#a71d5d;">| </span><span style="color:#323232;">awk </span><span style="color:#183691;">'{print $NF}' </span><span style="font-weight:bold;color:#a71d5d;">| </span><span style="color:#323232;">tr </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">d </span><span style="color:#183691;">'()'</span><span style="color:#323232;">)
</span><span style="color:#323232;">        echo </span><span style="color:#183691;">"Connecting to $server_ip..."
</span><span style="color:#323232;">        ssh $server_ip
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">else
</span><span style="color:#323232;">        echo </span><span style="color:#183691;">"Invalid choice."
</span><span style="color:#323232;">    end
</span><span style="color:#323232;">end
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #