Pieces tagged with: linux

February 17, 2023

linux java

Java with Adoptium on Linux

Recently I wrote down how to get Java installed on MacOS with the help of Adoptium. Well, it turns out, I also use Linux (Pop!_OS if you were wondering).

To install Java on Linux, go to the Adoptium page and download the tarball according to the version and your architecture. I downloaded the LTS 19 for x64:

tar xfz OpenJDK19U-jdk_x64_linux_hotspot_19.0.2_7.tar.gz
sudo mv jdk-19.0.2+7 /opt/

And now make sure that your shell is able to find it, my shell is Fish, so I added this snippet:

# Java installation through Adoptium
set -l java_version "19.0.2+7"
if test -d "/opt/jdk-$java_version"
    set -x JAVA_HOME "/opt/jdk-$java_version"
    fish_add_path -aP "$JAVA_HOME/bin"

Now you have Java, quickly go install Clojure :)

February 15, 2023

linux utils

Espanso, text expander for Linux

I love the smart dashes – and I use them heavily – on the Mac and it’s something I missed on PopOS!.

Luck be it, Espanso comes along. Installation on a Debian system is easy.

Configuration of Espanso is done by editing configuration files located in ~/.config/espanso directory. You can also find it by tying espanso path. The files contained in the match directory define what Espanso should do. The files contained in the config directory define how Espanso should perform its expansions.

To replace our double dashes with a long dash we are going to edit $CONFIG/match/base.yml add change it to:

  - trigger: "--"
    replace: ""

However, now this also happens in our terminal, which is annoying, so we are going to disable Espanso completely in the terminal with an app specific configuration.

We’ll disable it in Alacritty, my terminal of choice by creating a config/alacritty.yml and match on the class name:

filter_class: Alacritty
enable: false

That’s it, Espanso is super powerful and I can recommend reading the docs on what else it can do. Oh, and it also works on MacOS or Windows.