📱

Read on Your E-Reader

Thousands of readers get articles like this delivered straight to their Kindle or Boox. New articles arrive automatically.

Learn More

This is a preview. The full article is published at news.ycombinator.com.

Asahi Linux with Sway on the MacBook Air M2

Asahi Linux with Sway on the MacBook Air M2

By Daniel Lawrence LuHacker News: Front Page

Asahi Linux with Sway on the MacBook Air M2 2024-12-01 I bought a MacBook Air M2. As of writing, it’s very affordable with the 16 GB RAM, 256 GB SSD, 13.6” model available for $750. As of writing, also Asahi Linux doesn’t support anything newer than M2. FIGURE 1 Pic of my laptop. EXIF data Camera FUJIFILM GFX100S Lens GF55mmF1.7 R WR Aperture f/1.7 Shutter 1/42 s ISO ISO 400 Software Digital Camera GFX100S Ver2.12 Date Download I had previously used: 2011-2015: MacBook Air 13.3” with Intel Core i5 1.8 GHz, 8 GB of RAM, and 256 GB SSD (aftermarket upgrade from OWC). I installed Arch Linux on it with the i3 window manager. 2014-2018: Dell XPS 13 Developer Edition. I used the Ubuntu 14.04 that came with it with the i3 window manager. 2018-2024: Lenovo Thinkpad X1 Carbon Gen 6 with Intel Core i7 8640U, 16 GB of RAM, and 1 TB SSD. I installed Arch Linux on it with Sway. 1 Installing Asahi Linux On the Asahi Linux there’s a one liner which you can paste into the Terminal. It worked very well. The only complaint is that it seemed to take hours to copy root.img and boot.img over at 150 KB/s. Since I intended to run it with the Sway Window Manager , and storage space is precious, I installed Fedora minimal. 2 Getting set up I connected to wifi with nmcli device wifi list nmcli device wifi connect 'my_ssid' password 'mypassword' and then I installed a bunch of packages I use, such as: sudo dnf install @sway-desktop-environment fish alacritty rofi ruff rclone pavucontrol-qt i3status mako pass syncthing maim xdg-user-dirs firefox rustup openssl-devel ncdu fd-find neovim Then, I cloned my personal dotfile git repo and ran setup.sh . Of course, my configs weren’t meant for the MacBook, so I had to make some changes (which I’ve pushed to the dotfiles). 3 Customizing for MacBook By default, the whole row containing the notch is disabled, leading to a large-bezels look which I personally don’t like. There has got to be a way to use that screen real estate nicely! I re-enabled that part of the screen with grubby --args=apple_dcp.show_notch=1 --update-kernel=ALL Then, I put the Sway bar on the top to make a seamless appearance where the left and right side are used for useful information but the middle part is all black. By experimentation I found that the notch is 56px tall. bar { position top status_command i3status modifier $mod tray_output primary # the height of the m2 macbook air's notch??? height 56 colors { background #000000 statusline #cfcfd9 separator #000000 # border background text focused_workspace #0c0c0c #413459 #cfcfd9 active_workspace #0c0c0c #413459 #cfcfd9 inactive_workspace #0c0c0c #0c0c0c #cfcfd9 urgent_workspace #2f343a #ff3300 #ffffff } } The full i3status shows a lot of information which might get occluded by the notch, and it doesn’t work with the MacBook battery levels by default, so I had to update the config: general { colors = true interval = 5 } order += "wireless...

Preview: ~500 words

Continue reading at Hacker News

Read Full Article

More from Hacker News: Front Page

Subscribe to get new articles from this feed on your e-reader.

View feed

This preview is provided for discovery purposes. Read the full article at news.ycombinator.com. LibSpace is not affiliated with Hacker News.

Asahi Linux with Sway on the MacBook Air M2 | Read on Kindle | LibSpace