Update arch init script

Remove global yarn packages
This commit is contained in:
Observer of Time 2020-03-17 19:24:08 +02:00
parent bc59264df7
commit 7cd5b8f14e
Signed by: chronobserver
GPG Key ID: 8A2DEA1DBAEBCA9E
12 changed files with 171 additions and 165 deletions

View File

@ -51,7 +51,7 @@ export GOPATH="$HOME/.local/go"
# Set the paths used by ruby {{{
export GEM_HOME="$HOME/.local/ruby"
export GEM_SPEC_CACHE="$GEM_HOME/specs"
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/2.6.0"
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/2.7.0"
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME/bundle"
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME/bundle"
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME/bundle"

View File

@ -149,7 +149,6 @@ Checks: >
readability-deleted-default,
readability-implicit-bool-conversion,
readability-inconsistent-declaration-parameter-name,
readability-magic-numbers,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-named-parameter,
@ -214,12 +213,6 @@ CheckOptions:
value: true
- key: readability-inconsistent-declaration-parameter-name.Strict
value: true
- key: readability-magic-numbers.IgnoredIntegerValues
value: "1;10"
- key: readability-magic-numbers.IgnoredFloatingPointValues
value: "1.0"
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues
value: true
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
value: true
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment

View File

@ -80,44 +80,11 @@
conflicts = diff --name-only --diff-filter=U
root = rev-parse --show-toplevel
shallow = clone --single-branch --depth=1
lab = !git clone git@gitlab.com:"$1" "${@:2}" "#"
aur = !git clone aur@aur.archlinux.org:"$1" "${@:2}" "#"
repush = !git commit --amend -a --no-edit && git push --force
fork-sync = "\
fork-sync = "! \
git fetch --verbose upstream && git checkout --progress master && \
git reset --hard upstream/master && git push --verbose --force"
force-pull = "!git fetch -a && git reset --hard ${2:-origin}/${1:-master}"
create-lab = "!f() { \
if [ -z \"$GITLAB_TOKEN\" ]; then \
if [ -f \"$HOME/.local/tokens/gitlab\" ]; then \
GITHUB_TOKEN=\"$(< \"$HOME/.local/tokens/gitlab\" )\"; \
else \
printf \"%s%s%s\\n\" \"export GITLAB_TOKEN\" \
\"or save it in \\$HOME/.local/tokens/gitlab\" \
\"to use this command\" >&2; \
fi; \
fi; \
curl -H \"Content-Type: application/json\" \
-H \"Private-Token: $GITLAB_TOKEN\" \
-sSX POST https://gitlab.com/api/v4/projects \
-d \"{\\\"name\\\": \\\"${1:?}\\\"}\"; printf '\n';}; f"
rename = "!f() { \
if [ -z \"$GITHUB_TOKEN\" ]; then \
if [ -f \"$HOME/.local/tokens/github\" ]; then \
GITHUB_TOKEN=\"$(< \"$HOME/.local/tokens/github\" )\"; \
else \
printf \"%s%s%s\\n\" \"export GITHUB_TOKEN\" \
\"or save it in \\$HOME/.local/tokens/github\" \
\"to use this command\" >&2; \
fi; \
fi; \
user=\"${2:-$(git config --get user.name)}\"; \
old=\"${3:-$(basename \"$(git rev-parse --show-toplevel)\")}\"; \
curl -H \"Content-Type: application/json\" \
-H \"Authorization: Token $GITHUB_TOKEN\" \
-sSX PATCH \"https://api.github.com/repos/$user/$old\" \
-d \"{\\\"name\\\": \\\"${1:?}\\\"}\"; \
git remote set-url \"${4:-origin}\" \"https://github.com/$user/$1\";}; f"
[url "git@github.com:"]
insteadOf = https://github.com/

View File

@ -36,7 +36,7 @@ c.editor.command = [
]
# Default monospace fonts.
c.fonts.monospace = ','.join((
c.fonts.web.family.fixed = ','.join((
'Hack',
'Fira Code',
'Code New Roman',

View File

@ -1,17 +0,0 @@
{
"license": "MIT-0",
"private": true,
"dependencies": {
"american-british-english-translator": "^0.1.2",
"eslint": "^6.7.0",
"grunt-cli": "^1.3.2",
"gulp-cli": "^2.2.0",
"htmlhint": "^0.11.0",
"neovim": "^4.5.0",
"pug-cli": "^1.0.0-alpha6",
"pug-lint": "^2.5.0",
"stylelint": "^12.0.0",
"stylelint-scss": "^3.13.0",
"svgo": "^1.3.0"
}
}

View File

@ -17,6 +17,6 @@
--output "%(title)s.%(ext)s"
# Specify a custom user agent.
--user-agent "Mozilla/5.0 (Linux x86_64) youtube-dl/2020.01.15"
--user-agent "Mozilla/5.0 (Linux x86_64) youtube-dl/2020.03.08"
# vim:ft=conf:

View File

@ -5,25 +5,38 @@ sudo cp /etc/pacman.conf{,.bak}
sudo sed -i /etc/pacman.conf \
-e 's/^#\(Color\)/\1\nILoveCandy/' \
-e '/\[multilib\]/,/Include/s/^#//' \
-e '$ a [quarry]\nServer = https://pkgbuild.com/~anatolik/quarry/x86_64/'
-e '$ a [quarry]\nServer = https://pkgbuild.com/~anatolik/quarry/x86_64/' \
-e '$ a [chaotic-aur]\nServer = https://repo.kitsuna.net/x86_64/' \
-e '$ a Server = http://lonewolf-builder.duckdns.org/chaotic-aur/x86_64/' \
-e '$ a Server = http://chaotic.bangl.de/chaotic-aur/x86_64/'
# }}}
# Update system and install basic packages {{{
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman -Syyu
sudo pacman -S base-devel git aria2 reflector go --noconfirm
git clone https://aur.archlinux.org/yay.git /tmp/yay
(cd /tmp/yay && makepkg -sic --noconfirm)
git clone https://github.com/alfunx/dotfiles.sh \
--single-branch --branch=sparse-edit /tmp/dotfiles.sh
(cd /tmp/dotfiles.sh && sudo make install)
sudo pacman-key --recv-keys 0x3056513887B78AEB
sudo pacman -Syyu --noconfirm
sudo pacman -S git aria2 reflector yay --noconfirm
# }}}
# Clone dotfiles {{{
mkdir -p ~/Documents/Code/GitHub
(cd /tmp; yay -G dotfiles.sh-git)
pushd /tmp/dotfiles.sh-git >/dev/null
patch -n PKGBUILD <<'EOF'
12,13c12,14
< source=("${pkgname%-git}::git+$url")
< md5sums=("SKIP")
---
> source=("${pkgname%-git}::git+$url" "sparse-edit.patch::$url/pull/10.diff")
> md5sums=("SKIP" "6ecafcc0206a730aa40cc751435922ef")
> prepare() (git -C "$srcdir/${pkgname%-git}" apply "$srcdir/sparse-edit.patch")
EOF
makepkg -sic
popd >/dev/null
rm -r /tmp/dotfiles.sh-git
dotfiles clone https://github.com/ObserverOfTime/home.files \
~/Documents/Code/GitHub/home.files && dotfiles checkout -f
"${XDG_CONFIG_HOME:=$HOME/.config}/dotfiles"
dotfiles checkout --force
# }}}
# Rank pacman mirrors {{{
@ -50,7 +63,7 @@ unset REF_OPTS
# }}}
# Use aria2 for makepkg & set packager {{{
NAME="$(awk -F'[:,]' -vu="$USER" '$1 == u {print $5}' /etc/passwd)"
NAME="$(getent passwd "$USER" | awk -F'[:,]' '{print $5}')"
PACKAGER="${NAME:-ObserverOfTime} <chronobserver@disroot.org>"
ARIA='::/usr/bin/aria2c --conf-path=/etc/aria2.conf -o %o %u'
WGET="$(wget -V | awk 'NR == 1 {print $2"/"$3}')"
@ -70,25 +83,23 @@ unset NAME PACKAGER ARIA WGET
# }}}
# Install packages via yay {{{
# shellcheck disable=SC2046,SC2086
_yay() (yay -S --$1 --needed ${*:2} $(<~/.local/arch/packages.$1.txt))
_yay repo --noconfirm && _yay aur
unset -f _yay
# }}}
# Install node packages {{{
yarn global install
# shellcheck disable=SC2046
yay -S --repo --needed --noconfirm \
$(<~/.local/arch/packages.repo.txt)
# shellcheck disable=SC2046
yay -S --aur --needed \
$(<~/.local/arch/packages.aur.txt)
# }}}
# Download binaries from github {{{
ghdl() (curl -L https://git.io/"$1" -o ~/.local/bin/"$2"; chmod +x "$_")
ghdl vhMor aria2magnet
ghdl fjlNS lnk-parse
unset -f ghdl
mkdir -p ~/.local/bin
curl -LSs https://git.io/vhMor -o ~/.local/bin/aria2magnet
curl -LSs https://git.io/fjlNS -o ~/.local/bin/lnk-parse
chmod +x ~/.local/bin/{aria2magnet,lnk-parse}
# }}}
# Install bash completions {{{
DIRECTORY="$XDG_DATA_HOME/bash/completions"
DIRECTORY="${XDG_DATA_HOME:=.local/share}/bash/completions"
declare -A ALIASES=(
[adb]=android
[emulator]=android
@ -101,23 +112,22 @@ declare -A ALIASES=(
[bundler]=bundle
)
mkdir -p "$DIRECTORY"
raw() (printf 'https://raw.githubusercontent.com/%s' "$1/$2/master/$3")
aria2c -d "$DIRECTORY" -i - <<EOF
$(raw mbrubeck android-completion android)
$(raw clerk67 ffmpeg-completion ffmpeg)
$(raw gradle gradle-completion gradle-completion.bash)
https://raw.githubusercontent.com/mbrubeck/android-completion/master/android
https://raw.githubusercontent.com/clerk67/ffmpeg-completion/master/ffmpeg
https://raw.githubusercontent.com/gradle/gradle-completion/master/gradle-completion.bash
out=gradle
$(raw omakoto go-completion.bash go-completion.bash)
https://raw.githubusercontent.com/omakoto/go-completion.bash/master/go-completion.bash
out=go
$(raw llvm-mirror clang utils/bash-autocomplete.sh)
https://raw.githubusercontent.com/llvm-mirror/clang/master/utils/bash-autocomplete.sh
out=clang
$(raw mernen completion-ruby completion-ruby)
https://raw.githubusercontent.com/mernen/completion-ruby/master/completion-ruby
out=ruby
$(raw mernen completion-ruby completion-gem)
https://raw.githubusercontent.com/mernen/completion-ruby/master/completion-gem
out=gem
$(raw mernen completion-ruby completion-bundle)
https://raw.githubusercontent.com/mernen/completion-ruby/master/completion-bundle
out=bundle
$(raw mernen completion-ruby completion-rake)
https://raw.githubusercontent.com/mernen/completion-ruby/master/completion-rake
out=rake
EOF
printf 'complete -o default -F _ffmpeg ffprobe\n' >> "$DIRECTORY/ffmpeg"
@ -132,31 +142,17 @@ pandoc --bash-completion > "$DIRECTORY/pandoc"
poetry completions bash > "$DIRECTORY/poetry"
ln -fvs "$(gem contents travis | grep 'travis.sh$')" "$DIRECTORY/travis"
ln -fvs /usr/share/fzf/completion.bash "$DIRECTORY/fzf"
unset -f DIRECTORY ALIASES raw
# }}}
# Install from github reporisotories {{{
clone() { hub clone --depth=1 "$@" "/tmp/${1##*/}"; }
clone eli-schwartz/dotfiles.sh
(cd /tmp/dotfiles.sh && sudo make)
clone rkitover/vimpager
(cd /tmp/vimpager && sudo make PREFIX=/usr/local docs install)
clone ObserverOfTime/sddm-patema
sudo -E /tmp/sddm-patema/install.sh
# clone ObserverOfTime/PKGBUILDS
# TODO: wait for Jguer/yay#694
unset DIRECTORY ALIASES
# }}}
# Configure grub {{{
THEME=/boot/grub/themes/Lain
SWAP="$(swapon --show=NAME --noheadings)"
SWAP="${SWAP+ resume=$SWAP}"
clone ObserverOfTime/grub2-theme-lain
sudo cp -r /tmp/grub2-theme-lain/Lain "$THEME"
git clone https://git.disroot.org/chronobserver/grub2-theme-lain \
/tmp/grub2-theme-lain --depth=1
rm -rf /tmp/grub2-theme-lain/{.git*,README.md}
sudo cp -r /tmp/grub2-theme-lain "$THEME"
sudo cp /etc/default/grub{,.bak}
sudo tee /etc/default/grub >/dev/null <<EOF
GRUB_DEFAULT=0
@ -172,11 +168,20 @@ GRUB_DISABLE_SUBMENU=true
GRUB_THEME=$THEME/theme.txt
GRUB_FONT=$THEME/fonts/DejaVuSansMono14.pf2
# vim:set ft=cfg et sw=4 ts=4:
# vim:ft=cfg:
EOF
sudo cp /boot/grub/grub.cfg{,.bak}
sudo grub-mkconfig -o /boot/grub/grub.cfg
unset -f URL THEME SWAP clone
unset URL THEME SWAP
# }}}
# Configure SDDM {{{
git clone https://git.disroot.org/chronobserver/sddm-patema \
/tmp/sddm-patema --depth=1
rm -rf /tmp/sddm-patema/{.git*,README.md}
sudo cp -r /tmp/sddm-patema /usr/share/sddm/themes/patema
sudo sed -i /etc/sddm.conf.d/kde_settings.conf \
-e 's/^Current=.*$/Current=patema/'
# }}}
# Make maven use XDG_CACHE_HOME {{{
@ -210,7 +215,7 @@ Name=dev-edition-default
IsRelative=1
Path=6fgcqba8.dev-edition-default
EOF
sudo tee /etc/pacman.d/hooks/firefox.hook >/dev/null <<EOF
sudo tee /etc/pacman.d/hooks/firefox.hook >/dev/null <<'EOF'
[Trigger]
Operation = Upgrade
Type = File
@ -220,10 +225,17 @@ Target = usr/bin/firefox-developer-edition
Description = Setting GTK_USE_PORTAL=1 for Firefox...
When = PostTransaction
Exec = /bin/sed -i /usr/bin/firefox-developer-edition \
-e 's/exec/GTK_USE_PORTAL=1 &/;s/"\$@"/-allow-downgrade &/'
-e 's/exec/GTK_USE_PORTAL=1 &/;s/"$@"/-allow-downgrade &/'
EOF
# }}}
# Set user dirs {{{
xdg-user-dirs-update --set \
TEMPLATES "$HOME/.local/templates"
xdg-user-dirs-update --set \
PUBLICSHARE "$HOME/.local/public"
# }}}
# Set tty font {{{
sudo tee /etc/vconsole.conf >/dev/null <<'EOF'
KEYMAP=us
@ -232,7 +244,7 @@ FONT_MAP=8859-2
EOF
sudo sed -i /etc/mkinitcpio.conf \
-re 's/(^HOOKS="[^"]*)"/\1 consolefont"/'
sudo mkinitcpio -p linux
sudo mkinitcpio -p linux-zen
# }}}
# vim:fdm=marker:fdl=0:

View File

@ -1,36 +1,38 @@
bear
betterdiscordctl-git
android-apktool
cfr
clion
clion-jre
clion-lldb
discord-canary
compiledb
discord-ptb
drawio-desktop-bin
exe-thumbnailer
google-java-format
intellij-idea-ultimate-edition
intellij-idea-ultimate-edition-jre
gulp-cli
htmlhint
hyperfine-bin
iridium-deb
kde-thumbnailer-apk
korla-icon-theme
lab-bin
luacheck
mcomix-gtk3-git
mkv-extractor-qt
mpv-bash-completion-git
nodejs-neovim
nodejs-pug
nvimpager-git
opustags
pandoc-bin
phpstorm
protontricks-git
pug-lint
pycharm-professional
rar
sha3sum
shellcheck-static
snapd
stylelint
svgo
syncplay-git
tor-browser
trackma-git
ttf-ms-fonts
typora
ttf-twemoji-color
vale-bin
waifu2x-converter-cpp
waifu2x-ncnn-vulkan-git
webp-pixbuf-loader
winetricks-git
yarn-completion-git
yay

View File

@ -1,78 +1,118 @@
adobe-source-code-pro-fonts
aegisub
alsa-firmware
alsa-plugins
alsa-utils
ant
aria2
asar
ark
autopep8
base-devel
bash
bash-completion
bc
bluedevil
breeze
breeze-gtk
breeze-icons
cabextract
checkbashisms
calligra
ccache
clang
cmake
ctags
desmume
discord
docx2txt
dnscrypt-proxy
docker
dolphin
dolphin-plugins
dos2unix
dotnet-sdk
efibootmgr
doxygen
eog
eog-plugins
eslint
extra-cmake-modules
fd
ffmpeg
ffmpegthumbs
filezilla
firefox-developer-edition
flatpak
fontconfig
fontforge
fzf
gamemode
gawk
gdb
gimp
git
git-lfs
glances
gnupg
go
goldendict
gradle
grunt-cli
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gtk2
gtk3
gwenview
htop
hub
hunspell-el
hunspell-en_GB
hunspell-en_US
iftop
imagemagick
inkscape
intellij-idea-ultimate-edition
jdk-openjdk
jdk8-openjdk
jemalloc
jq
kcalc
kcolorchooser
kde-servicemenu-rootactions
kde-gtk-config
kdegraphics-thumbnailers
kdeplasma-addons
kdialog
keepassxc
kid3
kile
kimageformats
kio-extras
kio-gdrive
kipi-plugins
kleopatra
kmix
konsole
kotlin
krita
lib32-mesa
lib32-vulkan-intel
libreoffice-fresh
kwin-lowlatency
lib32-alsa-plugins
lib32-ffmpeg
lib32-mesa-aco-git
lib32-vulkan-icd-loader
linux-firmware
linux-zen
linux-zen-headers
lldb
llvm
lsof
lua52
lutris
maven
mesa
meld
mesa-aco-git
mkvtoolnix-cli
mkvtoolnix-gui
mpv
neofetch
neovim
network-manager-applet
networkmanager-openvpn
networkmanager-pptp
newsboat
node-gyp
nodejs
ntfs-3g
odt2txt
okteta
okular
optipng
@ -80,9 +120,12 @@ otf-fantasque-sans-mono
otf-fira-code
p7zip
pacman-contrib
perl-test-perltidy
parallel
pdfjs
perl-tidy
plantuml
plasma-desktop
ppsspp
pygmentize
python-isort
python-netifaces
python-pip
@ -95,31 +138,39 @@ qemu
qutebrowser
r
rclone
reflector
ripgrep
rstcheck
rsync
ruby
ruby-jekyll
ruby-travis
screenfetch
sddm-kcm
shfmt
smplayer
spectacle
sshfs
steam
tor
ttf-hack
ttf-inconsolata
syncplay
texlive-langgreek
texlive-latexextra
thunderbird
tor-browser
ttf-hack
unzip
valgrind
vifm
vim
vint
virt-manager
wget
whois
wine
words
xclip
xdg-user-dirs
xf86-video-amdgpu
xf86-video-intel
xorg-server
yarn
yay
youtube-dl
zathura
zathura-pdf-mupdf

View File

@ -3,7 +3,6 @@
"plugins": ["stylelint-scss"],
"rules": {
"at-rule-name-case": "lower",
"at-rule-name-space-after": "never",
"at-rule-semicolon-newline-after": "always",
"at-rule-semicolon-space-before": "never",
"block-closing-brace-empty-line-before": "never",

View File

@ -10,6 +10,6 @@ init-author-url "https://observeroftime.github.io"
init-license MIT
init-version "0.1.0"
prefix "~/.local"
user-agent "yarn/1.21.1 node/v13.5.0 linux x64"
user-agent "yarn/1.22.4 node/v13.11.0 linux x64"
username ObserverOfTime
version-git-sign true

View File

@ -125,7 +125,6 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Yarn](https://yarnpkg.com/lang/en/)
* [.config/yarn/global/package.json](.config/yarn/global/package.json): package list
* [.yarnrc](.yarnrc): configuration file
## [Yay](https://github.com/Jguer/yay)