Sista raden är den som triggar allt som händer. Peter : Första steget är att hämta hem dotfilerna. Jan : När du framställer det på det viset så låter det ju helt självklart ! Nu har vi alla dotfiles på github och vad gör du nu då ? Idag finns ju ingen seriös utvecklare som skulle utveckla kod utan att jobba med ett externt repo med versionhantering, men att tänka på samma sätt med dotfilerna är det inte så många som gör ännu. Det handlar om ett 30-tal olika filer för mig. Har hållit på att finslipa detta under nästan 15 år så det har hänt lite.Īlternativet hade ju varit att göra alla konfigurationsändringar manuellt i enskilda dotfiler på min dator. Genom att titta på commit-historiken kan jag även följa vilka ändringar jag gjort genom årens lopp. Det finns många olika exempel på olika samlingar av dotfiles att hitta på nätet och mina ligger också i ett öppet repo på github.Įftersom alla mina dotfiles ligger i ett externt git-repo på github får jag alltid in samma konfiguration. De är ju som default dolda och några exempel är ~/.zshrc för z-shell, ~/.vimrc för vim osv. Det handlar om de text-baserade konfigurations-filerna som styr konfigurationen för olika applikationer. I det här sammanhanget pratar man ofta om “dotfiles”. Peter : Förutsättningen är att MacOs redan är installerat. Jan : Ok det låter bra, vill du berätta hur du går tillväga om du börjar med en tom maskin ? Det blir väldigt enkelt att återskapa en miljö tex efter en krash eller om man byter dator eller vill jobba på flera olika maskiner. Fördelen med att scripta installationer och konfiguration är att man får bättre kontroll. Peter : Jag det stämmer, systemutveckling är ett hantverk och datorn är mitt snickarbälte:-) Så det är värt att lägga lite tid på att få den effektiv. Jan : Peter jag har förstått att du scriptar det mesta av uppsättningen ? local alacritty = hs.application.Idag skall Peter berätta om hur han konfigurerar sin Mac för att uppnå en bra arbetsmiljö för sina utvecklingsprojekt. hs.:subscribe(hs., function(window, appName) If alacritty = nil and hs.application.launchOrFocus(APP_NAME) thenĪppWatcher = hs.(function(name, event, app) Local space = spaces.activeSpaceOnScreen() If alacritty ~= nil and alacritty:isFrontmost() then Local alacritty = hs.application.get(APP_NAME) Hs.eventtap.keyStroke('cmd', 'return', 0, alacritty) # - buttonless: Title bar, transparent background and no title bar buttons # - transparent: Title bar, transparent background and title bar buttons # Spread additional padding evenly around the terminal content. # by DPI and the specified value is always added at both opposing sides. # Blank space added around the window in pixels. # Window padding (changes require restart) # If the position is not set, the window manager will handle the placement. # Window position (changes require restart) # fall back to the window manager's recommended size. # must be at least `2`, while using a value of `0` for columns and lines will # Number of lines/columns (not pixels) in the terminal. # Window dimensions (changes require restart) After some research, I found the perfect solution using a combination of the Alacritty config and hammerspoon. The only thing that was missing was the sweet Guake-style terminal that I had gotten used to with iTerm2, I'm totally dependent on being able to bring up a terminal on any screen with a keyboard shortcut. Alacritty feels stable as a rock, and the performance is off the charts. A few days ago I had a really frustrating day with iTerm2, so I decided to give Alacritty another try, and wow, what a difference. I tested it a few years ago, and it looked promising, but was way to buggy back then. It's minimal with no extra bells and whistles and it's really fast (no surprise, it's written in Rust). It seems to tick every box that I'm looking for in a good terminal emulator. I have had my eye on Alacritty for a while. One feature that I really liked though, was support for a Guake-style terminal (also called HUD or Quake style named after the game), you know the one that slides over the active window from the top of the screen. Using tmux I have no need for all the extra crap that is bundled into iTerm2 like tabs, panes, keyboard shortcuts, paste history, as this is handled by tmux in a standard manner everywhere I use a terminal. It is pretty nice, but I also use tmux (if you haven't heard about it, check it out immediately). As a programmer I spend a good chunk of my working day in a terminal and have up until recently used iTerm2 for MacOS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |