From 50b4a487098df76bcc513790ba7fa5b94fcabee0 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Wed, 10 May 2023 13:43:45 -0400 Subject: [PATCH] Begin cleaning up archlinux directory After using Nix and NixOS for a few days, I can't believe I did something like this in the past. Having a single reproducible flake is significantly more pragmatic than imperatively configuring everything. --- .archlinux/Makefile | 49 --------------------- .archlinux/PKGBUILDs/color-scripts/colorhex | 2 +- .archlinux/README.md | 17 ------- .archlinux/bootstrap.sh | 47 -------------------- 4 files changed, 1 insertion(+), 114 deletions(-) delete mode 100644 .archlinux/Makefile delete mode 100644 .archlinux/README.md delete mode 100755 .archlinux/bootstrap.sh diff --git a/.archlinux/Makefile b/.archlinux/Makefile deleted file mode 100644 index bc41d07..0000000 --- a/.archlinux/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -.PHONY: install -install: - @cd PKGBUILDs/${package} && makepkg -scif --noconfirm - -.ONESHELL: -aur: - @mkdir -p .aur && cd .aur - @git clone "https://aur.archlinux.org/${package}.git" - @cd ${package} - @echo "==================================== Viewing ${package}" - @cat PKGBUILD - @echo "====================================" - @echo -n "Press enter to continue, or Ctrl+C to quit. " && read - @makepkg -sc - @sudo pacman -U *.pkg.tar.zst - -.PHONY: refresh-keys -refresh-keys: - @sudo pacman-key --populate - @sudo pacman-key --refresh-keys - -# https://old.reddit.com/r/archlinux/comments/5r5ep8 -# 1. Disable bitmap fonts (not scalable for modern HiDPI displays) -# 2. Enable sub-pixel RGB rendering -# 3. Enable the LCD filter (reduces color fringing) -.PHONY: fontconfig -fontconfig: - @sudo ln -sf /etc/fonts/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d - @sudo ln -sf /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d - @sudo ln -sf /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d - -# Always use emoji (best with the kitty terminal emulator) -.PHONY: yarnconfig -yarnconfig: - @yarn config set -- --emoji true - -.PHONY: rust -rust: - @rustup install stable - @rustup default stable - -.PHONY: clean -clean: - @rm -fv PKGBUILDs/**/*.pkg.tar.xz - @rm -fv PKGBUILDs/**/*.xpi - @rm -fv PKGBUILDs/**/*.tar.gz - @rm -fv PKGBUILDs/**/*.tar.bz2 - @rm -fv PKGBUILDs/**/*.vim - @rm -rfv .aur diff --git a/.archlinux/PKGBUILDs/color-scripts/colorhex b/.archlinux/PKGBUILDs/color-scripts/colorhex index 873621e..244d7e2 100755 --- a/.archlinux/PKGBUILDs/color-scripts/colorhex +++ b/.archlinux/PKGBUILDs/color-scripts/colorhex @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh colors=($(xrdb -query | sed -n 's/.*color\([0-9]\)/\1/p' | sort -nu | cut -f2)) echo -e "\e[1;37m diff --git a/.archlinux/README.md b/.archlinux/README.md deleted file mode 100644 index dea0b0b..0000000 --- a/.archlinux/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Tari - My Arch Linux setup - -[Arch Linux][archlinux], a [GNU/Linux][gnulinux] distribution, lets you build your own environment. Since you only install what you want, it is easy to customize and control. - -## Features - -- A universal color scheme consistent across all terminal software -- A universal theme across both Qt and GTK applications -- Full HiDPI support for Qt, GTK, and X-level software applications -- Easily switch between both traditional and HiDPI resolution in the same X environment - -## Usage - -On a fresh [Arch install](/.archlinux/install-scripts), run `./bootstrap.sh`. - -[archlinux]: https://www.archlinux.org -[gnulinux]: https://www.gnu.org/gnu/linux-and-gnu.html diff --git a/.archlinux/bootstrap.sh b/.archlinux/bootstrap.sh deleted file mode 100755 index b6c7076..0000000 --- a/.archlinux/bootstrap.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -# End the script on any errors -set -e - -# Change the working directory to this one -cd "$(dirname "$0")" - -# Get administrative privileges -sudo -v - -# Keep pinging sudo until this script finishes -# Source: https://gist.github.com/cowboy/3118588 -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - -# Refresh GPG keys before installing packages -make refresh-keys - -# Install PKGBUILDs -make package=tari-core -make package=color-scripts -make package=xeventbind - -# Install and set the default toolchain for rust -make rust - -# Additional settings -make fontconfig -make yarnconfig - -# Enable the lightweight X11 display manager -systemctl enable lxdm.service - -# Revoke privileges -sudo -K - -# Install dotfiles -make -C .. - -# Change the color scheme to a sane default -wal --theme base16-tomorrow-night - -# Create the user's home directories -xdg-user-dirs-update - -# Run vim for the first time (i.e. install plugins and exit) -nvim