dotfiles

Configuration for the software I use.
git clone https://git.sr.ht/~jbauer/dotfiles
Log | Files | Refs | README | LICENSE

commit 903517117703f719e0a641d71ac5d43b0ed96ff2
parent d20dad73e3ff30c32905b7fbe452e131ec3d2255
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Mon, 14 Nov 2022 22:22:48 -0500

Update dotfiles

Diffstat:
M.local/bin/bar-action | 0
M.local/bin/convert_hex_xterm | 0
M.local/bin/flac-to-mp3 | 0
Mpkglist | 1-
Msetup.sh | 44++++++++++++++++++++++++++++++++++++--------
5 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/.local/bin/bar-action b/.local/bin/bar-action diff --git a/.local/bin/convert_hex_xterm b/.local/bin/convert_hex_xterm diff --git a/.local/bin/flac-to-mp3 b/.local/bin/flac-to-mp3 diff --git a/pkglist b/pkglist @@ -19,6 +19,5 @@ picom-- quirks-- rsync-- spectrwm-- -usmb-- xbanish-- xclip-- diff --git a/setup.sh b/setup.sh @@ -1,27 +1,32 @@ #!/bin/sh -set -e +if [ ! -x "$(command -v git)" ]; then + echo "Please install git first, then re-run this script." + exit 1 +fi chmod 700 ~ # Remove stuff OpenBSD adds by default that I don't need rm -f ~/.cshrc ~/.cvsrc ~/.login ~/.mailrc ~/.Xdefaults ~/.profile +# Remove stuff Linux adds by default that I don't need +rm -f ~/.bash* + # Create directory structure mkdir -p \ ~/Documents/projects \ ~/Music \ ~/Pictures \ ~/Downloads \ - ~/NAS \ ~/.ssh -# Clone dotfiles and apply them to the system +# Grab latest dotfiles and apply them to the system if [ -d ~/Documents/projects/dotfiles ]; then cd ~/Documents/projects/dotfiles git pull --ff-only else - git clone https://git.sr.ht/~jbauer/dotfiles ~/Documents/projects/dotfiles + git clone git://git.paritybit.ca/dotfiles ~/Documents/projects/dotfiles cd ~/Documents/projects/dotfiles fi @@ -29,8 +34,31 @@ for file in .????*; do cp -r "$file" ~ done -echo "Installing packages, you might want to grab a cup of tea..." -doas pkg_add -l ~/Documents/projects/dotfiles/pkglist -echo "Done!" +# Xenodm config +cp xenodm.Xresources /etc/X11/xenodm/Xresources +cp xenodm.Xsetup_0 /etc/X11/xenodm/Xsetup_0 + +# Light or dark theme? +echo "Light or dark theme (light/dark) [light]: " +read theme +if [ "$theme" = "dark" ]; then + echo "Selected: dark" + ln -s ~/.Xresources-dark ~/.Xresources +else + echo "Selected: light" + ln -s ~/.Xresources-light ~/.Xresources +fi + +# Install packages +if [ ! -x "$(command -v pkg_add)" ]; then + echo "Looks like this isn't an OpenBSD machine; not auto-installing + packages." + echo "Consider installing equivalents to these:" + printf "%s\n" "$(cat pkglist | tr -d '-' | tr '\n' ' ')" +else + echo "Installing packages, you might want to grab a cup of tea..." + doas pkg_add -l ~/Documents/projects/dotfiles/pkglist + echo "Done!" +fi -echo "Don't forget to run 'rcctl enable apmd; rcctl set apmd flags -A -Z 10; rcctl start apmd' if on a laptop." +echo "Don't forget to run power-management utilities if on a laptop"