-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
install
executable file
·31 lines (25 loc) · 920 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl fd imagemagick ripgrep sd xorg.xrandr
# shellcheck shell=bash
# vim: ft=sh
set -euo pipefail
echo Installing rime packages
curl -LSs https://git.io/rime-install \
| rime_dir=~/.local/share/fcitx5/rime bash -s -- prelude essay luna-pinyin
rm -rf plum
echo Creating symlinks
src=$(dirname "$(realpath "$0")")/home
fd --base-directory "$src" -Ht f -x \
sh -c "mkdir -p '$HOME/{//}' && ln -sf '$src/{}' '$HOME/{}'"
echo Downloading wallpaper
res=$(xrandr | rg -F \* | sd "\s*(\d+x\d+).*" \$1)
curl -LSs https://raw.githubusercontent.com/NixOS/nixos-artwork/master/wallpapers/nix-wallpaper-nineish-dark-gray.svg \
| convert svg:- \
-gamma 1.14,1.16,1.25 \
-resize "$res^" \
-gravity center \
-extent "$res" \
~/.config/wallpaper.png
echo Configuring mpd
mkdir -p ~/.local/share/mpd
touch ~/.local/share/mpd/mpd.db