1
0
forked from extern/nix-config

Compare commits

..

No commits in common. "master" and "dev/refactor-pkgbuilds" have entirely different histories.

231 changed files with 6170 additions and 5100 deletions

16
.archlinux/Makefile Normal file
View File

@ -0,0 +1,16 @@
.PHONY: install
install:
@cd PKGBUILDs/${package} && makepkg -scif --noconfirm
.PHONY: update-keys
update-keys:
@sudo pacman-key --populate
@sudo pacman-key --refresh-keys
.PHONY: clean
clean:
@rm -fv **/*.pkg.tar.xz
@rm -fv **/*.xpi
@rm -fv **/*.tar.gz
@rm -fv **/*.tar.bz2
@rm -fv **/*.vim

30
.archlinux/PKGBUILDs/README.md vendored Normal file
View File

@ -0,0 +1,30 @@
# PKGBUILDs
Here are my PKGBUILDs I use on Arch Linux. Each has a specific use case. I use PKGBUILDs to know exactly what I have on my machine, and to make it easier to sync changes across multiple Arch installations.
Of course, you don't have to use **any** of these packages for your own installation, but if you want to use my setup, you probably want to use the packages I use as well.
## Getting Started
There are some **core packages** that need to be installed before anything else, listed below:
- [tari-core](/.archlinux/PKGBUILDs/tari-core) - Core packages I use for many things
- [tari-cli](/.archlinux/PKGBUILDs/tari-cli) - CLI programs that are nice to have
- [tari-desktop](/.archlinux/PKGBUILDs/tari-desktop) - Packages I use common to all desktop environments
### Add-on packages
Now that everything is installed, it's just a matter of choosing a desktop environment or window manager. Note that you can install multiple DEs and WMs at once, then switch between them with your display manager.
- [tari-gnome](/.archlinux/PKGBUILDs/tari-gnome) - The GNOME desktop environment, with GTK-related software
- [tari-plasma](/.archlinux/PKGBUILDs/tari-plasma) - The Plasma desktop environment, with Qt and KDE-related software
- [tari-bspwm](/.archlinux/PKGBUILDs/tari-bspwm) - The bspwm window manager, with optional Qt and GTK support (through `tari-gnome` and `tari-plasma`)
Other window managers exist, but may not be trivial to use in non-traditional (HiDPI) environments.
### Other packages
- [tari-scripts](/.archlinux/PKGBUILDs/tari-scripts) - Color scripts, purely for aesthetics
- [tari-util-xeventbind](/.archlinux/PKGBUILDs/tari-util-xeventbind) - Useful to change X DPI on resolution change
TODO: More to come soon...

View File

@ -0,0 +1,9 @@
pkgname=tari-bspwm
pkgver=0.1.0
pkgrel=2
pkgdesc="Packages I use specifically for bspwm."
arch=('any')
depends=(bspwm
sxhkd
dunst
compton)

20
.archlinux/PKGBUILDs/tari-cli/PKGBUILD vendored Normal file
View File

@ -0,0 +1,20 @@
pkgname=tari-cli
pkgver=0.1.1
pkgrel=1
pkgdesc="Packages for CLI programs I use independent of a desktop environment."
arch=('any')
depends=(mpd
mpc
ncmpcpp
htop
neofetch
fdupes
youtube-dl
ranger
weechat
ncdu
task
cmatrix
imagemagick
lolcat
figlet)

20
.archlinux/PKGBUILDs/tari-core/PKGBUILD vendored Normal file
View File

@ -0,0 +1,20 @@
pkgname=tari-core
pkgver=0.2.0
pkgrel=2
pkgdesc="Core packages for my Arch setup."
arch=('any')
depends=(stow
python-pywal
rng-tools
fd
exa
ripgrep
fzf
jq
zip
unzip
p7zip
unrar
borg
openssh
openvpn)

View File

@ -0,0 +1,33 @@
pkgname=tari-desktop
pkgver=0.1.1
pkgrel=1
pkgdesc="Packages common to all my desktop setups, such as fonts."
arch=('any')
depends=(ttf-dejavu
ttf-liberation
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
ttf-hack
ttf-fira-mono
ttf-font-awesome
arc-solid-gtk-theme
arc-kde
papirus-icon-theme
lxdm-gtk3
xorg-xmodmap
xorg-xwininfo
xorg-xrandr
xorg-xinit
xdo
xcape
xdg-user-dirs
alsa-utils
mpv
feh
rofi
kitty
zathura
zathura-djvu
zathura-pdf-mupdf
code)

46
.archlinux/PKGBUILDs/tari-dev/PKGBUILD vendored Normal file
View File

@ -0,0 +1,46 @@
_vimplugver='0.10.0'
_httpiever='1.0.0'
pkgname=tari-dev
pkgver=0.1.1
pkgrel=2
pkgdesc="Packages I use relating to development and other things."
arch=('any')
depends=(vim
neovim
httpie
rsync
git
tig
diff-so-fancy
tmux
nodejs
npm
yarn
crystal
shards
llvm
rustup
ansible
docker
docker-compose
bind-tools
pacman-contrib
nginx-mainline
jdk-openjdk
texlive-core
texlive-science
texlive-humanities
texlive-fontsextra
texlive-latexextra
texlive-bibtexextra
minted)
source=("https://raw.githubusercontent.com/junegunn/vim-plug/${_vimplugver}/plug.vim"
"https://raw.githubusercontent.com/jakubroztocil/httpie/${_httpiever}/extras/httpie-completion.fish")
sha256sums=('01a138fc0ed99ef2678ba004613acbf8b0c51a85a8d2a1b658ef87af722e98e1'
'3d0deae85526fbb580ec35a625a043fd1c585c315ca98ac4e371b714d2d1a3ec')
package() {
install -Dm 644 plug.vim "$pkgdir"/usr/share/vim/vimfiles/autoload/plug.vim
install -Dm 644 httpie-completion.fish "$pkgdir"/usr/share/fish/vendor_completions.d/http.fish
}

View File

@ -0,0 +1,29 @@
pkgname=tari-gnome
pkgver=0.1.0
pkgrel=1
pkgdesc="Packages for my GNOME setup"
arch=('any')
depends=(gnome-shell
gnome-shell-extensions
gnome-backgrounds
gnome-control-center
evince
file-roller
nautilus
gnome-mpv
l3afpad
gthumb
lollypop
evolution
ghex
liferea
libreoffice-fresh
poedit
gnome-clocks
gnome-characters
gnome-maps
gnome-system-monitor
gnome-disk-utility
gnome-screenshot
gnome-weather
gnome-break-timer)

View File

@ -0,0 +1,36 @@
pkgname=tari-plasma
pkgver=0.1.0
pkgrel=1
pkgdesc="Packages for my Plasma setup"
arch=('any')
depends=(plasma-desktop
plasma-pa
kscreen
kleopatra
obs-studio
baka-mplayer
dolphin
ark
okular
gwenview
cantata
kwrite
kcolorchooser
kolourpaint
kmag
spectacle
kdenlive
krita
texstudio
kwave
kmplot
kalzium
kwordquiz
kollision
bovo
blinken
virtualbox
virtualbox-host-modules-arch
kimageformats
ffmpegthumbs
kdegraphics-thumbnailers)

View File

@ -0,0 +1,63 @@
#!/usr/bin/env perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
for ($green = 0; $green < 6; $green++) {
for ($blue = 0; $blue < 6; $blue++) {
printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
16 + ($red * 36) + ($green * 6) + $blue,
($red ? ($red * 40 + 55) : 0),
($green ? ($green * 40 + 55) : 0),
($blue ? ($blue * 40 + 55) : 0));
}
}
}
# colors 232-255 are a grayscale ramp, intentionally leaving out
# black and white
for ($gray = 0; $gray < 24; $gray++) {
$level = ($gray * 10) + 8;
printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
232 + $gray, $level, $level, $level);
}
# display the colors
# first the system ones:
print "System colors:\n";
for ($color = 0; $color < 8; $color++) {
print "\x1b[48;5;${color}m ";
}
print "\x1b[0m\n";
for ($color = 8; $color < 16; $color++) {
print "\x1b[48;5;${color}m ";
}
print "\x1b[0m\n\n";
# now the color cube
print "Color cube, 6x6x6:\n";
for ($green = 0; $green < 6; $green++) {
for ($red = 0; $red < 6; $red++) {
for ($blue = 0; $blue < 6; $blue++) {
$color = 16 + ($red * 36) + ($green * 6) + $blue;
print "\x1b[48;5;${color}m ";
}
print "\x1b[0m ";
}
print "\n";
}
# now the grayscale ramp
print "Grayscale ramp:\n";
for ($color = 232; $color < 256; $color++) {
print "\x1b[48;5;${color}m ";
}
print "\x1b[0m\n";

View File

@ -0,0 +1,42 @@
pkgname=tari-scripts
pkgver=0.1.0
pkgrel=1
pkgdesc="Visually appealing terminal scripts."
arch=('any')
source=('colorhash' 'colorhex' 'colorline' 'colorpanes'
'diamonds' 'pipes' 'pmabove' 'pmleft'
'dna' 'colortest' '256colortest' 'colorfade'
'ghosts' 'unowns' 'spaceinvaders')
sha256sums=('506b036cfce3229c922156f06a24ed2f796baa9b640c22beca23e12c8e04a8c0'
'de4df3f590fc349e471cfe84623c2a97757e9ade90d7fab7fb2921d59ffd464a'
'4c31394d04e16c39a04ea085858ece699f5f6ac846c7438ad860d519f09701fe'
'877452eb18bd94c00f9f3172f50d3980ce0c1446f0278afff1bbf4a6208cbcf6'
'56897e603eb5146f62cdc57a9573ed7c0bf5b1662351780be83275f95568ae18'
'466249fdb33dfe7c8fb20e63dc5a6f62038bca69538f5a2a38ef6e9e3d2433b2'
'e1f7dd3aa6cd9b8e3db189c4cf50d564d6605de81a6e552d4e97b804f79748d8'
'74102548cf7ea34846538115e26e2a7600f4705a8bbd2666aea5886d0365571f'
'6ae0d2b864bd9e0f47cac4533be8c9fc45b0c15b959c97699b07b08a2ad87342'
'a78f3d2f7665f3b2b5655da399d22a6573ea8898d69e71f99ac35ba28abe6a0c'
'006e6184c77864e943c412e4bbbd55a967fa7b930514982932015f1efa6b3a7b'
'14adff147f635206c77cce73f67547f5c39ddc419b9d8c9e1fd724bea361f813'
'60958f84b7c15a37a5157953e8b409821993ad228af454d55d9a989f92a8aa44'
'861a55ef7aeb3b49e09d7d4d679032fbbd5f3e95ad4def9cef4ea63123bc2b13'
'43988542d23f1fda4c0a33cab4713fbe55466a795771a4a457f4f933668734a9')
package() {
install -Dm 755 256colortest "$pkgdir"/usr/bin/256colortest
install -Dm 755 colorfade "$pkgdir"/usr/bin/colorfade
install -Dm 755 colorhash "$pkgdir"/usr/bin/colorhash
install -Dm 755 colorhex "$pkgdir"/usr/bin/colorhex
install -Dm 755 colorline "$pkgdir"/usr/bin/colorline
install -Dm 755 colorpanes "$pkgdir"/usr/bin/colorpanes
install -Dm 755 colortest "$pkgdir"/usr/bin/colortest
install -Dm 755 diamonds "$pkgdir"/usr/bin/diamonds
install -Dm 755 dna "$pkgdir"/usr/bin/dna
install -Dm 755 ghosts "$pkgdir"/usr/bin/ghosts
install -Dm 755 pipes "$pkgdir"/usr/bin/pipes
install -Dm 755 pmabove "$pkgdir"/usr/bin/pmabove
install -Dm 755 pmleft "$pkgdir"/usr/bin/pmleft
install -Dm 755 spaceinvaders "$pkgdir"/usr/bin/spaceinvaders
install -Dm 755 unowns "$pkgdir"/usr/bin/unowns
}

40
.archlinux/PKGBUILDs/tari-scripts/colorfade vendored Executable file
View File

@ -0,0 +1,40 @@
#!/bin/sh
# ANSI Color -- use these variables to easily have different color
# and format output. Make sure to output the reset sequence after
# colors (f = foreground, b = background), and use the 'off'
# feature for anything you turn on.
# Author: pfh
initializeANSI()
{
esc=""
blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
cyanf="${esc}[36m"; whitef="${esc}[37m"
blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
cyanb="${esc}[46m"; whiteb="${esc}[47m"
boldon="${esc}[1m"; boldoff="${esc}[22m"
italicson="${esc}[3m"; italicsoff="${esc}[23m"
ulon="${esc}[4m"; uloff="${esc}[24m"
invon="${esc}[7m"; invoff="${esc}[27m"
reset="${esc}[0m"
}
# note in this first use that switching colors doesn't require a reset
# first - the new color overrides the old one.
initializeANSI
cat << EOF
${redf}▒▒▒▒${reset} ${boldon}${redf}▒▒${reset} ${greenf}▒▒▒▒${reset} ${boldon}${greenf}▒▒${reset} ${yellowf}▒▒▒▒${reset} ${boldon}${yellowf}▒▒${reset} ${bluef}▒▒▒▒${reset} ${boldon}${bluef}▒▒${reset} ${purplef}▒▒▒▒${reset} ${boldon}${purplef}▒▒${reset} ${cyanf}▒▒▒▒${reset} ${boldon}${cyanf}▒▒${reset}
${redf}▒▒ ■${reset} ${boldon}${redf}▒▒${reset} ${greenf}▒▒ ■${reset} ${boldon}${greenf}▒▒${reset} ${yellowf}▒▒ ■${reset} ${boldon}${yellowf}▒▒${reset} ${bluef}▒▒ ■${reset} ${boldon}${bluef}▒▒${reset} ${purplef}▒▒ ■${reset} ${boldon}${purplef}▒▒${reset} ${cyanf}▒▒ ■${reset} ${boldon}${cyanf}▒▒${reset}
${redf}▒▒ ${reset}${boldon}${redf}▒▒▒▒${reset} ${greenf}▒▒ ${reset}${boldon}${greenf}▒▒▒▒${reset} ${yellowf}▒▒ ${reset}${boldon}${yellowf}▒▒▒▒${reset} ${bluef}▒▒ ${reset}${boldon}${bluef}▒▒▒▒${reset} ${purplef}▒▒ ${reset}${boldon}${purplef}▒▒▒▒${reset} ${cyanf}▒▒ ${reset}${boldon}${cyanf}▒▒▒▒${reset}
EOF

41
.archlinux/PKGBUILDs/tari-scripts/colorhash vendored Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
# ANSI Color -- use these variables to easily have different color
# and format output. Make sure to output the reset sequence after
# colors (f = foreground, b = background), and use the 'off'
# feature for anything you turn on.
initializeANSI()
{
esc=""
blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
cyanf="${esc}[36m"; whitef="${esc}[37m"
blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
cyanb="${esc}[46m"; whiteb="${esc}[47m"
boldon="${esc}[1m"; boldoff="${esc}[22m"
italicson="${esc}[3m"; italicsoff="${esc}[23m"
ulon="${esc}[4m"; uloff="${esc}[24m"
invon="${esc}[7m"; invoff="${esc}[27m"
reset="${esc}[0m"
}
# note in this first use that switching colors doesn't require a reset
# first - the new color overrides the old one.
initializeANSI
cat << EOF
${reset}${redf} ██ ██ ${reset}${boldon}${redf}██ ${reset}${greenf} ██ ██ ${reset}${boldon}${greenf}██ ${reset}${yellowf} ██ ██ ${reset}${boldon}${yellowf}██ ${reset}${bluef} ██ ██ ${reset}${boldon}${bluef}██ ${reset}${purplef} ██ ██ ${reset}${boldon}${purplef}██ ${reset}${cyanf} ██ ██ ${reset}${boldon}${cyanf}██
${reset}${redf}██████████ ${reset}${boldon}${redf}██ ${reset}${greenf}██████████ ${reset}${boldon}${greenf}██ ${reset}${yellowf}██████████ ${reset}${boldon}${yellowf}██ ${reset}${bluef}██████████ ${reset}${boldon}${bluef}██ ${reset}${purplef}██████████ ${reset}${boldon}${purplef}██ ${reset}${cyanf}██████████ ${reset}${boldon}${cyanf}██
${reset}${redf} ██ ██ ${reset}${boldon}${redf}██ ${reset}${greenf} ██ ██ ${reset}${boldon}${greenf}██ ${reset}${yellowf} ██ ██ ${reset}${boldon}${yellowf}██ ${reset}${bluef} ██ ██ ${reset}${boldon}${bluef}██ ${reset}${purplef} ██ ██ ${reset}${boldon}${purplef}██ ${reset}${cyanf} ██ ██ ${reset}${boldon}${cyanf}██
${reset}${redf}██████████ ${reset}${greenf}██████████ ${reset}${yellowf}██████████ ${reset}${bluef}██████████ ${reset}${purplef}██████████ ${reset}${cyanf}██████████
${reset}${redf} ██ ██ ${reset}${boldon}${redf}██ ${reset}${greenf} ██ ██ ${reset}${boldon}${greenf}██ ${reset}${yellowf} ██ ██ ${reset}${boldon}${yellowf}██ ${reset}${bluef} ██ ██ ${reset}${boldon}${bluef}██ ${reset}${purplef} ██ ██ ${reset}${boldon}${purplef}██ ${reset}${cyanf} ██ ██ ${reset}${boldon}${cyanf}██
${reset}
EOF

10
.archlinux/PKGBUILDs/tari-scripts/colorhex vendored Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
colors=($(xrdb -query | sed -n 's/.*color\([0-9]\)/\1/p' | sort -nu | cut -f2))
echo -e "\e[1;37m
Red Green Yellow Blue Magenta Cyan White
─────────────────────────────────────────────────────────────\e[0m"
for i in {1..7}; do echo -en "\e[$((30+$i))m ${colors[i]} \e[0m"; done
echo
for i in {9..15}; do echo -en "\e[1;$((22+$i))m ${colors[i]} \e[0m"; done
echo -e "\n"

24
.archlinux/PKGBUILDs/tari-scripts/colorline vendored Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
# set colors
colors=($(xrdb -query | sed -n 's/.*color\([0-9]\)/\1/p' | sort -nu | cut -f2))
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
done
t=$'\e[0m'
# output
cat << EOF
$f1▀▀▀▀▀▀▀$t $f2▀▀▀▀▀▀▀$t $f3▀▀▀▀▀▀▀$t $f4▀▀▀▀▀▀▀$t $f5▀▀▀▀▀▀▀$t $f6▀▀▀▀▀▀▀$t $f7▀▀▀▀▀▀▀$t
EOF
for i in {1..7}; do echo -en "\e[$((30+$i))m${colors[i]} \e[0m "; done
echo
echo

23
.archlinux/PKGBUILDs/tari-scripts/colorpanes vendored Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Author: GekkoP
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
done
d=$'\e[1m'
t=$'\e[0m'
v=$'\e[7m'
cat << EOF
$f1████$d▄$t $f2████$d▄$t $f3████$d▄$t $f4████$d▄$t $f5████$d▄$t $f6████$d▄$t $f7████$d▄$t
$f1████$d█$t $f2████$d█$t $f3████$d█$t $f4████$d█$t $f5████$d█$t $f6████$d█$t $f7████$d█$t
$f1████$d█$t $f2████$d█$t $f3████$d█$t $f4████$d█$t $f5████$d█$t $f6████$d█$t $f7████$d█$t
$d$f1 ▀▀▀▀ $f2▀▀▀▀ $f3▀▀▀▀ $f4▀▀▀▀ $f5▀▀▀▀ $f6▀▀▀▀ $f7▀▀▀▀$t
EOF

30
.archlinux/PKGBUILDs/tari-scripts/colortest vendored Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Daniel Crisman's ANSI color chart script from
# The Bash Prompt HOWTO: 6.1. Colours
# http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
#
# This function echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
T='•••' # The text for the color test
echo -e "\n def 40m 41m 42m 43m 44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
' 36m' '1;36m' ' 37m' '1;37m';
do FG=${FGs// /}
echo -en " $FGs \033[$FG $T "
for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
done
echo;
done
echo

207
.archlinux/PKGBUILDs/tari-scripts/diamonds vendored Executable file
View File

@ -0,0 +1,207 @@
#!/bin/bash
# Animated pipes.sh terminal screensaver at an angle.
# Copyright (c) 2013-2015 Yu-Jie Lin
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# Website: https://github.com/pipeseroni/pipesX.sh
VERSION=1.1.0
W=$(tput cols) H=$(tput lines)
# maximal random value + 1
M=32768
SETS=('╱╲' '/\' '..' 'oo' '\/')
COLORS=(31 32 33 34 35 36 37)
# default values
N=5
T=()
I=0.05
P=25
R=$((W * H / 4))
HELP="Usage: $(basename $0) [OPTIONS]
Animated pipes.sh terminal screensaver at an angle.
Options:
-n [1-] number of pipes. (Default: $N)
-t [0-$((${#SETS[@]} - 1))] types of pipes, can be used more than once. (Default: $T)
-t c[2chs] custom type of pipes.
-i [float] piping interval or maze generation interval. (Default: $I)
-P [0-100] probability of a turning pipe or of \\ in maze generation. (Default: $P)
-r [LIMIT] reset after x characters, 0 if no limit. (Default: $R)
-R random starting point.
-C no color.
-X maze generation.
-h this help message.
-v print version number.
"
while getopts "n:t:i:P:r:RCXhv" arg; do
case $arg in
n)
((N = OPTARG > 0 ? OPTARG : N))
;;
t)
if [[ "$OPTARG" = c?? ]]; then
T+=(${#SETS[@]})
SETS+=("${OPTARG:1}")
else
T+=($(((OPTARG >= 0 && OPTARG < ${#SETS[@]}) ? OPTARG : T)))
fi
;;
i)
I=$OPTARG
;;
P)
((P = (OPTARG >= 0 && OPTARG <= 100) ? OPTARG : P))
;;
r)
((R = OPTARG >= 0 ? OPTARG : R))
;;
R)
RNDSTART=1
;;
C)
NOCOLOR=1
;;
X)
MAZE=1
;;
h)
echo -e "$HELP"
exit 0
;;
v)
echo "$(basename -- "$0") $VERSION"
exit 0
esac
done
# set to default values if not by options
((${#T[@]})) || T=(0)
do_exit() {
# clear up standard input
read -t 0.001 && cat </dev/stdin>/dev/null
# terminal has no smcup and rmcup capabilities
((FORCE_RESET)) && reset && exit 0
tput rmcup
tput cnorm
stty echo
((NOCOLOR)) && echo -ne '\e[0m'
exit 0
}
trap do_exit HUP TERM
trap 'break 2' INT
# No echo stdin and hide the cursor
stty -echo
tput smcup || FORCE_RESET=1
tput civis
tput clear
# maze geneartion
while [[ $MAZE ]] && clear; do
[[ $NOCOLOR ]] || echo -ne "\e[1;${COLORS[${#COLORS[@]} * RANDOM / M]}m"
for ((i = 0; i < W * H; i++ )); do
echo -ne ${SETS[T]:100 * RANDOM / M < P:1}
done
read -t $I -n 1 && [[ $REPLY =~ q|Q ]] && do_exit
done
# initialze values
for ((n = 0; n < N; n++)); do
((X[n] = RNDSTART ? (W + 2) * RANDOM / M : W / 2))
((Y[n] = RNDSTART ? (H + 2) * RANDOM / M : H / 2))
D[n]=$((4 * RANDOM / M))
C[n]=${COLORS[${#COLORS[@]} * RANDOM / M]}
t[n]=${T[${#T[@]} * RANDOM / M]}
done
clear
while REPLY=; read -t $I -n 1; [[ -z $REPLY ]] ; do
for ((n = 0; n < N; n++, CC = 0)); do
x=${X[n]} y=${Y[n]}
d=${D[n]} c=${C[n]}
# calculate new direction `d`
# 1 0
# \/ 4 directions 0 to 3
# /\
# 2 3
# valid directions: d: dd', d' is the new direction
# d
# 0: / 00 \ 01 03
# / / /\
# 1: / 10 \ 11 12
# \ \ /\
# 2: \/ 21 / 22 / 23
# / \
# 3: \/ 30 \ 32 \ 33
# / \
((d = (100 * RANDOM / M) < P ? ((d + 1) + 2 * (RANDOM % 2)) % 4 : d))
((e = (d + 1) % 4))
# calculate new position
# d' x' y'
# 0: x+1 y-1
# 1: x-1 y-1
# 2: x-1 y+1
# 3: x+1 y+1
((xn = e < 2 ? x + 1 : x - 1))
((yn = d < 2 ? y - 1 : y + 1))
# adjust position and change color?
((d < 2 && y == 0)) && ((yn--, CC=1))
((e > 1 && x == 0)) && ((xn--, CC=1))
((d > 1 && y == H)) && ((yn++, CC=1))
((e < 2 && x == W)) && ((xn++, CC=1))
((CC)) && c=${COLORS[${#COLORS[@]} * RANDOM / M]}
((CC)) && t[n]=${T[${#T[@]} * RANDOM / M]}
# warp pipe
((xn = (xn + W + 1) % (W + 1)))
((yn = (yn + H + 1) % (H + 1)))
# calculate position in terminal
# d' xt yt
# 0: x' y'+1
# 1: x'+1 y'+1
# 2: x'+1 y'
# 3: x' y'
((xt = e < 2 ? xn : xn + 1))
((yt = d < 2 ? yn + 1 : yn))
echo -ne "\e[${yt};${xt}H"
[[ $NOCOLOR ]] || echo -ne "\e[1;${c}m"
echo -n "${SETS[t[n]]:d%2:1}"
X[n]=$xn Y[n]=$yn
D[n]=$d C[n]=$c
done
((R)) && ((r += N, r >= R)) && r=0 && clear
done
do_exit

43
.archlinux/PKGBUILDs/tari-scripts/dna vendored Executable file
View File

@ -0,0 +1,43 @@
#!/usr/bin/env bash
# ANSI color scheme script by pfh
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
done
bld=$'\e[1m'
rst=$'\e[0m'
inv=$'\e[7m'
cat << EOF
$f1█-----$bld█ $rst$f2█-----$bld█$rst $f3█-----$bld█$rst $f4█-----$bld█$rst $f5█-----$bld█$rst $f6█-----$bld█$rst
$f1█---$bld█$rst $f2█---$bld█$rst $f3█---$bld█$rst $f4█---$bld█$rst $f5█---$bld█$rst $f6█---$bld█$rst
$f1 █-$bld█$rst $f2 █-$bld█$rst $f3 █-$bld█$rst $f4 █-$bld█$rst $f5 █-$bld█$rst $f6 █-$bld█$rst
$f1█$rst $f2█$rst $f3█$rst $f4█$rst $f5█$rst $f6█$rst
$f1$bld█-$rst$f1█$rst $f2$bld█_$rst$f2█$rst $f3$bld█-$rst$f3█$rst $f4$bld█-$rst$f4█$rst $f5$bld█-$rst$f5█$rst $f6$bld█-$rst$f6█$rst
$f1$bld█---$rst$f1█$rst $f2$bld█---$rst$f2█$rst $f3$bld█---$rst$f3█$rst $f4$bld█---$rst$f4█$rst $f5$bld█---$rst$f5█$rst $f6$bld█---$rst$f6█$rst
$f1$bld█-----$rst$f1█$rst $f2$bld█-----$rst$f2█$rst $f3$bld█-----$rst$f3█$rst $f4$bld█-----$rst$f4█$rst $f5$bld█-----$rst$f5█$rst $f6$bld█-----$rst$f6█$rst
$f1$bld█---$rst$f1█$rst $f2$bld█---$rst$f2█$rst $f3$bld█---$rst$f3█$rst $f4$bld█---$rst$f4█$rst $f5$bld█---$rst$f5█$rst $f6$bld█---$rst$f6█$rst
$f1$bld█-$rst$f1█$rst $f2$bld█-$rst$f2█$rst $f3$bld█-$rst$f3█$rst $f4$bld█-$rst$f4█$rst $f5$bld█-$rst$f5█$rst $f6$bld█-$rst$f6█$rst
$f1$bld█$rst $f2$bld█$rst $f3$bld█$rst $f4$bld█$rst $f5$bld█$rst $f6$bld█$rst
$f1█-$bld█$rst $f2█-$bld█$rst $f3█-$bld█$rst $f4█-$bld█$rst $f5█-$bld█$rst $f6█-$bld█$rst
$f1█---$bld█$rst $f2█---$bld█$rst $f3█---$bld█$rst $f4█---$bld█$rst $f5█---$bld█$rst $f6█---$bld█$rst
$f1█-----$bld█ $rst$f2█-----$bld█$rst $f3█-----$bld█$rst $f4█-----$bld█$rst $f5█-----$bld█$rst $f6█-----$bld█$rst
$f1█---$bld█$rst $f2█---$bld█$rst $f3█---$bld█$rst $f4█---$bld█$rst $f5█---$bld█$rst $f6█---$bld█$rst
$f1 █-$bld█$rst $f2 █-$bld█$rst $f3 █-$bld█$rst $f4 █-$bld█$rst $f5 █-$bld█$rst $f6 █-$bld█$rst
$f1█$rst $f2█$rst $f3█$rst $f4█$rst $f5█$rst $f6█$rst
$f1$bld█-$rst$f1█$rst $f2$bld█_$rst$f2█$rst $f3$bld█-$rst$f3█$rst $f4$bld█-$rst$f4█$rst $f5$bld█-$rst$f5█$rst $f6$bld█-$rst$f6█$rst
$f1$bld█---$rst$f1█$rst $f2$bld█---$rst$f2█$rst $f3$bld█---$rst$f3█$rst $f4$bld█---$rst$f4█$rst $f5$bld█---$rst$f5█$rst $f6$bld█---$rst$f6█$rst
$f1$bld█-----$rst$f1█$rst $f2$bld█-----$rst$f2█$rst $f3$bld█-----$rst$f3█$rst $f4$bld█-----$rst$f4█$rst $f5$bld█-----$rst$f5█$rst $f6$bld█-----$rst$f6█$rst
$f1$bld█---$rst$f1█$rst $f2$bld█---$rst$f2█$rst $f3$bld█---$rst$f3█$rst $f4$bld█---$rst$f4█$rst $f5$bld█---$rst$f5█$rst $f6$bld█---$rst$f6█$rst
$f1$bld█-$rst$f1█$rst $f2$bld█-$rst$f2█$rst $f3$bld█-$rst$f3█$rst $f4$bld█-$rst$f4█$rst $f5$bld█-$rst$f5█$rst $f6$bld█-$rst$f6█$rst
$f1$bld█$rst $f2$bld█$rst $f3$bld█$rst $f4$bld█$rst $f5$bld█$rst $f6$bld█$rst
$f1█-$bld█$rst $f2█-$bld█$rst $f3█-$bld█$rst $f4█-$bld█$rst $f5█-$bld█$rst $f6█-$bld█$rst
$f1█---$bld█$rst $f2█---$bld█$rst $f3█---$bld█$rst $f4█---$bld█$rst $f5█---$bld█$rst $f6█---$bld█$rst
$f1█-----$bld█ $rst$f2█-----$bld█$rst $f3█-----$bld█$rst $f4█-----$bld█$rst $f5█-----$bld█$rst $f6█-----$bld█$rst
EOF

28
.archlinux/PKGBUILDs/tari-scripts/ghosts vendored Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env bash
# ANSI color scheme script by pfh
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
done
bld=$'\e[1m'
rst=$'\e[0m'
inv=$'\e[7m'
cat << EOF
$f1 ▄▄▄ $f2 ▄▄▄ $f3 ▄▄▄ $f4 ▄▄▄ $f5 ▄▄▄ $f6 ▄▄▄
$f1 ▀█▀██ ▄ $f2 ▀█▀██ ▄ $f3 ▀█▀██ ▄ $f4 ▀█▀██ ▄ $f5 ▀█▀██ ▄ $f6 ▀█▀██ ▄
$f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄██████▀ $f4 ▀▄██████▀ $f5 ▀▄██████▀ $f6 ▀▄██████▀
$f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████
$f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄
$bld
$f1 ▄▄▄ $f2 ▄▄▄ $f3 ▄▄▄ $f4 ▄▄▄ $f5 ▄▄▄ $f6 ▄▄▄
$f1 ▀█▀██ ▄ $f2 ▀█▀██ ▄ $f3 ▀█▀██ ▄ $f4 ▀█▀██ ▄ $f5 ▀█▀██ ▄ $f6 ▀█▀██ ▄
$f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄██████▀ $f4 ▀▄██████▀ $f5 ▀▄██████▀ $f6 ▀▄██████▀
$f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████
$f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄
$rst
EOF

142
.archlinux/PKGBUILDs/tari-scripts/pipes vendored Executable file
View File

@ -0,0 +1,142 @@
#!/usr/bin/env bash
# pipes.sh: Animated pipes terminal screensaver.
# Copyleft (ↄ) 2015 - Acidhub <acidhub@craft.net.br>
# 2015 - Pipeseroni - http://github.com/pipeseroni
# 2014 - Yu-Jie Lin <livibetter@gmail.com>
# ???? - Mathew Simpson
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
VERSION=1.2
M=32768
p=3
f=75 s=13 r=2000 t=0
w=$(tput cols) h=$(tput lines)
# ab -> idx = a*4 + b
# 0: up, 1: right, 2: down, 3: left
# 00 means going up , then going up -> ┃
# 12 means going right, then going down -> ┓
sets=(
"┃┏ ┓┛━┓ ┗┃┛┗ ┏━" # -t 0 "default"
"│╭ ╮╯─╮ ╰│╯╰ ╭─" # -t 1 "round"
"│┌ ┐┘─┐ └│┘└ ┌─" # -t 2 "weak"
"║╔ ╗╝═╗ ╚║╝╚ ╔═" # -t 3 "double"
"|+ ++-+ +|++ +-" # -t 4 "add/sub"
"|/ \/-\ \|/\ /-" # -t 5 "It' something"
".. .... .... .." # -t 6 "dots"
".o oo.o o.oo o." # -t 7 "dot-O"
"-\ /\|/ /-\/ \|" # -t 8 "railway"
"▓≡▓≡≡▓≡ ≡▓≡≡▓≡▓" # -t 9 "blocks"
)
v=()
RNDSTART=0
BOLD=1
NOCOLOR=0
OPTIND=1
while getopts "p:t:f:s:r:RBChv" arg; do
case $arg in
p) ((p=(OPTARG>0)?OPTARG:p));;
t)
if [[ "$OPTARG" = c???????????????? ]]; then
V+=(${#sets[@]})
sets+=("${OPTARG:1}")
else
((OPTARG>=0 && OPTARG<${#sets[@]})) && V+=($OPTARG)
fi
;;
f) ((f=(OPTARG>19 && OPTARG<101)?OPTARG:f));;
s) ((s=(OPTARG>4 && OPTARG<16 )?OPTARG:s));;
r) ((r=(OPTARG>=0)?OPTARG:r));;
R) RNDSTART=1;;
B) BOLD=0;;
C) NOCOLOR=1;;
h) echo -e "Usage: $(basename $0) [OPTION]..."
echo -e "Animated pipes terminal screensaver.\n"
echo -e " -p [1-?]\tnumber of pipes (D=3)."
echo -e " -t [0-$((${#sets[@]} - 1))]\ttype of pipes, can be used more than once (D=0)."
echo -e " -t c[16 chars]\tcustom type of pipes."
echo -e " -f [20-100]\tframerate (D=75)."
echo -e " -s [5-15]\tprobability of a straight fitting (D=13)."
echo -e " -r LIMIT\treset after x characters, 0 if no limit (D=2000)."
echo -e " -R \t\trandom starting point."
echo -e " -B \t\tno bold effect."
echo -e " -C \t\tno color."
echo -e " -h\t\thelp (this screen)."
echo -e " -v\t\tprint version number.\n"
exit 0;;
v) echo "$(basename -- "$0") $VERSION"
exit 0
esac
done
# set default values if not by options
((${#V[@]})) || V=(0)
cleanup() {
# clear up standard input
read -t 0.001 && cat </dev/stdin>/dev/null
# terminal has no smcup and rmcup capabilities
((FORCE_RESET)) && reset && exit 0
tput rmcup
tput cnorm
stty echo
((NOCOLOR)) && echo -ne '\e[0m'
exit 0
}
trap cleanup HUP TERM
trap 'break 2' INT
for (( i=1; i<=p; i++ )); do
c[i]=$((i%8)) n[i]=0 l[i]=0
((x[i]=RNDSTART==1?RANDOM*w/32768:w/2))
((y[i]=RNDSTART==1?RANDOM*h/32768:h/2))
v[i]=${V[${#V[@]} * RANDOM / M]}
done
stty -echo
tput smcup || FORCE_RESET=1
tput civis
tput clear
# any key press exits the loop and this script
while REPLY=; read -t 0.0$((1000/f)) -n 1; [[ -z $REPLY ]] ; do
for (( i=1; i<=p; i++ )); do
# New position:
((${l[i]}%2)) && ((x[i]+=-${l[i]}+2,1)) || ((y[i]+=${l[i]}-1))
# Loop on edges (change color on loop):
((${x[i]}>w||${x[i]}<0||${y[i]}>h||${y[i]}<0)) && ((c[i]=RANDOM%8, v[i]=V[${#V[@]}*RANDOM/M]))
((x[i]=(x[i]+w)%w))
((y[i]=(y[i]+h)%h))
# New random direction:
((n[i]=RANDOM%s-1))
((n[i]=(${n[i]}>1||${n[i]}==0)?${l[i]}:${l[i]}+${n[i]}))
((n[i]=(${n[i]}<0)?3:${n[i]}%4))
# Print:
tput cup ${y[i]} ${x[i]}
echo -ne "\e[${BOLD}m"
[[ $NOCOLOR == 0 ]] && echo -ne "\e[3${c[i]}m"
echo -n "${sets[v[i]]:l[i]*4+n[i]:1}"
l[i]=${n[i]}
done
((r>0 && t*p>=r)) && tput reset && tput civis && t=0 || ((t++))
done
cleanup

31
.archlinux/PKGBUILDs/tari-scripts/pmabove vendored Executable file
View File

@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Author: pfh
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
done
bld=$'\e[1m'
rst=$'\e[0m'
inv=$'\e[7m'
cat << EOF
$rst
$f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄
$f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7███$f2██$f7███$f2█▄ $f4▄█$f7███$f4██$f7███$f4█▄ $f5▄█$f7███$f5██$f7███$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄
$f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7█ █$f2██$f7█ █$f2██ $f4██$f7█ █$f4██$f7█ █$f4██ $f5██$f7█ █$f5██$f7█ █$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█
$f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████
$f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██
$f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀
$bld
$f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄
$f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7█ █$f2██$f7█ █$f2█▄ $f4▄█$f7█ █$f4██$f7█ █$f4█▄ $f5▄█$f7█ █$f5██$f7█ █$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄
$f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7███$f2██$f7███$f2██ $f4██$f7███$f4██$f7███$f4██ $f5██$f7███$f5██$f7███$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█
$f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████
$f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██
$f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀
$rst
EOF

41
.archlinux/PKGBUILDs/tari-scripts/pmleft vendored Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
initializeANSI()
{
esc=""
blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
cyanf="${esc}[36m"; whitef="${esc}[37m"
blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
cyanb="${esc}[46m"; whiteb="${esc}[47m"
boldon="${esc}[1m"; boldoff="${esc}[22m"
italicson="${esc}[3m"; italicsoff="${esc}[23m"
ulon="${esc}[4m"; uloff="${esc}[24m"
invon="${esc}[7m"; invoff="${esc}[27m"
reset="${esc}[0m"
}
initializeANSI
cat << EOF
${yellowf} ▄███████▄${reset} ${redf} ▄██████▄${reset} ${greenf} ▄██████▄${reset} ${bluef} ▄██████▄${reset} ${purplef} ▄██████▄${reset} ${cyanf} ▄██████▄${reset}
${yellowf}▄█████████▀▀${reset} ${redf}▄${whitef}█▀█${redf}██${whitef}█▀█${redf}██▄${reset} ${greenf}▄${whitef}█▀█${greenf}██${whitef}█▀█${greenf}██▄${reset} ${bluef}▄${whitef}█▀█${bluef}██${whitef}█▀█${bluef}██▄${reset} ${purplef}▄${whitef}█▀█${purplef}██${whitef}█▀█${purplef}██▄${reset} ${cyanf}▄${whitef}█▀█${cyanf}██${whitef}█▀█${cyanf}██▄${reset}
${yellowf}███████▀${reset} ${redf}█${whitef}▄▄█${redf}██${whitef}▄▄█${redf}███${reset} ${greenf}█${whitef}▄▄█${greenf}██${whitef}▄▄█${greenf}███${reset} ${bluef}█${whitef}▄▄█${bluef}██${whitef}▄▄█${bluef}███${reset} ${purplef}█${whitef}▄▄█${purplef}██${whitef}▄▄█${purplef}███${reset} ${cyanf}█${whitef}▄▄█${cyanf}██${whitef}▄▄█${cyanf}███${reset}
${yellowf}███████▄${reset} ${redf}████████████${reset} ${greenf}████████████${reset} ${bluef}████████████${reset} ${purplef}████████████${reset} ${cyanf}████████████${reset}
${yellowf}▀█████████▄▄${reset} ${redf}██▀██▀▀██▀██${reset} ${greenf}██▀██▀▀██▀██${reset} ${bluef}██▀██▀▀██▀██${reset} ${purplef}██▀██▀▀██▀██${reset} ${cyanf}██▀██▀▀██▀██${reset}
${yellowf} ▀███████▀${reset} ${redf}▀ ▀ ▀ ▀${reset} ${greenf}▀ ▀ ▀ ▀${reset} ${bluef}▀ ▀ ▀ ▀${reset} ${purplef}▀ ▀ ▀ ▀${reset} ${cyanf}▀ ▀ ▀ ▀${reset}
${boldon}${yellowf} ▄███████▄ ${redf} ▄██████▄ ${greenf} ▄██████▄ ${bluef} ▄██████▄ ${purplef} ▄██████▄ ${cyanf} ▄██████▄${reset}
${boldon}${yellowf}▄█████████▀▀ ${redf}▄${whitef}█▀█${redf}██${whitef}█▀█${redf}██▄ ${greenf}▄${whitef}█▀█${greenf}██${whitef}█▀█${greenf}██▄ ${bluef}▄${whitef}█▀█${bluef}██${whitef}█▀█${bluef}██▄ ${purplef}▄${whitef}█▀█${purplef}██${whitef}█▀█${purplef}██▄ ${cyanf}▄${whitef}█▀█${cyanf}██${whitef}█▀█${cyanf}██▄${reset}
${boldon}${yellowf}███████▀ ${redf}█${whitef}▄▄█${redf}██${whitef}▄▄█${redf}███ ${greenf}█${whitef}▄▄█${greenf}██${whitef}▄▄█${greenf}███ ${bluef}█${whitef}▄▄█${bluef}██${whitef}▄▄█${bluef}███ ${purplef}█${whitef}▄▄█${purplef}██${whitef}▄▄█${purplef}███ ${cyanf}█${whitef}▄▄█${cyanf}██${whitef}▄▄█${cyanf}███${reset}
${boldon}${yellowf}███████▄ ${redf}████████████ ${greenf}████████████ ${bluef}████████████ ${purplef}████████████ ${cyanf}████████████${reset}
${boldon}${yellowf}▀█████████▄▄ ${redf}██▀██▀▀██▀██ ${greenf}██▀██▀▀██▀██ ${bluef}██▀██▀▀██▀██ ${purplef}██▀██▀▀██▀██ ${cyanf}██▀██▀▀██▀██${reset}
${boldon}${yellowf} ▀███████▀ ${redf}▀ ▀ ▀ ▀ ${greenf}▀ ▀ ▀ ▀ ${bluef}▀ ▀ ▀ ▀ ${purplef}▀ ▀ ▀ ▀ ${cyanf}▀ ▀ ▀ ▀${reset}
EOF

View File

@ -0,0 +1,35 @@
#!/usr/bin/env bash
# ANSI color scheme script featuring Space Invaders
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
done
bld=$'\e[1m'
rst=$'\e[0m'
cat << EOF
$f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
$f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
$f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst
$f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst
$bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
$bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
$bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst
$bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst
$f7▌$rst
$f7▌$rst
$f7 ▄█▄ $rst
$f7▄█████████▄$rst
$f7▀▀▀▀▀▀▀▀▀▀▀$rst
EOF

64
.archlinux/PKGBUILDs/tari-scripts/unowns vendored Executable file
View File

@ -0,0 +1,64 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__ = 'actionless'
import random
unowns = [[
' ▀█▀▀▀█▀ ',
' ▄▀▀▀▄ ',
' ▀▄ ▀ ▄▀ ',
' ▀█▀ ',
' ▄█▄▄▄▄ ',
], [
' █▄ █ ',
' █ ▀▄▀▀▀▄ █ ',
' █ ▀▄ ▀ ▄▀ █ ',
' █ ▀▀▀ ▀▄█ ',
' ▀ ▀ ',
], [
' ▀▀▀█▀▀▀ ',
' ▄▀▀▀▄ ',
' ▀▄ ▀ ▄▀ ',
' ▀▀▀ ',
' ',
], [
' ▀▄ ▄▀ ',
' ▀▄▀▀▀▄▀ ',
' ▀▄ ▀ ▄▀ ',
' ▄▀ ▀▀▀ ▀▄ ',
' ▀ ▀ ',
], [
' █▀▀▄ ',
' ▄▀▀▀▄ ▀▄ ',
' ▀▄ ▀ ▄▀ █ ',
' ▀▀▀ ▄▀ ',
' ▀▀▀ ',
], [
' ▀▄ ▄▀ ',
' ▄▀▀▀▄ ',
' ▀▄ ▀ ▄▀ ',
' ▀█▀ ',
' ▄▀▄ ',
]]
print("")
for mode in ['normal', 'bold']:
random.shuffle(unowns)
if mode == 'bold':
print("\033[1m")
print(
'\n'.join([
''.join([
"\033[03{n}m{string}".format(
n=color_number + 1,
string=unowns[color_number][line_number]
)
for color_number in range(6)])
for line_number in range(5)])
)
# reset font:
print("\033[0m")

View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Olaf Tomalka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,17 @@
CC=gcc
CFLAGS=-O2
LIBS=-lX11
OBJ=main.o xeb_handler.o
.PHONY: all clean
all: xeventbind
xeventbind: $(OBJ)
$(CC) -o $@ $^ $(LIBS) $(CFLAGS)
%.o: %.c
$(CC) -c -o $@ $< $(CLAGS)
clean:
rm -f xeventbind *.o

View File

@ -0,0 +1,25 @@
pkgname=tari-util-xeventbind
pkgver=0.1.0
pkgrel=2
pkgdesc="Run a script on resolution change"
arch=('any')
license=('MIT')
provides=('xeventbind')
conflicts=('xeventbind')
depends=('libx11')
source=('xeb_event_types.h' 'xeb_handler.c' 'xeb_handler.h' 'main.c' 'Makefile' 'LICENSE')
sha256sums=('5e55b56bc1fc281d2549bb892a1a7e93f5eb7cb7ff88d3216345907456d02801'
'9a26c895d79244c76e3c9b5842dab6e6d4b628842f6f63a3001d4563c253a28b'
'b57396a210fde7858928c1e44febd1cecc2aa715b58ca11590afddc5aa3d7a75'
'1d44006d8e14ebd062415a8f20d746fe8771eacf5165d3064f20401b9ddca32d'
'420ee5dc1349c226423bf009a71a3f0b0b33456ffdf35d682fc12ee5b4dd207f'
'e219b161877df1f1986c4e79794fde8b6cb209da7bc4b4442b925da0d7fd93ee')
build() {
make
}
package() {
install -Dm 755 xeventbind "$pkgdir"/usr/bin/xeventbind
install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/xeventbind/LICENSE
}

View File

@ -0,0 +1,13 @@
# tari-util-xeventbind
[xeventbind][xeventbind] is used to run a script on resolution change.
xeventbind can be used to:
- Change the X DPI for specific resolutions, useful, for example, if you switch between traditional and HiDPI displays often
You should not use xeventbind if:
- You don't change resolutions often or don't need to run anything on resolution change
[xeventbind]: https://github.com/ritave/xeventbind

View File

@ -0,0 +1,107 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Olaf Tomalka
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include "xeb_event_types.h"
#include "xeb_handler.h"
struct arguments {
xeb_event_type event_type;
char *script_path;
};
struct event_map {
char *str;
xeb_event_type event;
};
static struct event_map mapping[] = {
{"resolution", ResolutionChange}
};
void print_usage(char *path) {
fprintf(stderr, "Usage: %s event_type script_path\n", path);
fprintf(stderr, "Event types:\n");
size_t mapping_size = sizeof(mapping) / sizeof(mapping[0]);
for (int i = 0; i < mapping_size; i++) {
fprintf(stderr, "\t%s\n", mapping[i].str);
}
exit(EXIT_FAILURE);
}
void parse_args(int argc, char** argv, struct arguments *args) {
if (argc != 3)
print_usage(argv[0]);
size_t mapping_size = sizeof(mapping) / sizeof(mapping[0]);
int found = 0;
for (int i = 0; i < mapping_size; i++) {
if (strcmp(argv[1], mapping[i].str) == 0) {
found = 1;
args->event_type = mapping[i].event;
break;
}
}
if (!found)
print_usage(argv[0]);
args->script_path = argv[2];
}
int handle_callback(xeb_event_type event, void *data) {
assert(data);
struct arguments *args = data;
assert(args->event_type == event);
pid_t pid = fork();
int err;
switch (pid) {
case -1:
perror("Failed to fork\n");
exit(EXIT_FAILURE);
break;
case 0: // Child
err = execlp(args->script_path, NULL);
if (err == -1) {
perror("Failed to open callback script\n");
exit(EXIT_FAILURE);
}
break;
}
}
int main(int argc, char **argv) {
struct arguments args;
int err;
parse_args(argc, argv, &args);
xeb_add_callback(args.event_type, handle_callback, &args);
return xeb_loop() ? EXIT_FAILURE : EXIT_SUCCESS;
}

View File

@ -0,0 +1,31 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Olaf Tomalka
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _XEVENTBIND_EVENT_TYPES_H
#define _XEVENTBIND_EVENT_TYPES_H
typedef enum {
ResolutionChange
} xeb_event_type;
#endif

View File

@ -0,0 +1,131 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Olaf Tomalka
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <assert.h>
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xeb_handler.h"
struct callback_data {
xeb_callback func;
void *data;
xeb_event_type event;
};
struct dimensions {
int width, height;
};
static struct callback_data *callbacks = NULL;
static int callbacks_count = 0;
static int callbacks_capacity = 0;
static void ensure_enough_callback_space(void) {
if (callbacks_count == 0)
return;
if (callbacks_capacity == 0) {
callbacks = malloc(callbacks_count * sizeof(struct callback_data));
callbacks_capacity = callbacks_count;
} else if (callbacks_count > callbacks_capacity) {
int new_size = callbacks_capacity;
while (new_size < callbacks_count)
new_size *= 2;
callbacks_capacity = new_size;
struct callback_dat *new_call = realloc(
callbacks,
callbacks_capacity * sizeof(struct callback_data));
if (new_call == NULL) {
fprintf(stderr, "Failed to realloc callback_data array\n");
exit(EXIT_FAILURE);
}
}
}
void xeb_add_callback(xeb_event_type event, xeb_callback func, void* data) {
assert(func != NULL);
callbacks_count++;
ensure_enough_callback_space();
struct callback_data *row = &callbacks[callbacks_count - 1];
row->event = event;
row->func = func;
row->data = data;
}
static void call_callbacks(xeb_event_type event) {
for (int i = 0; i < callbacks_count; i++) {
struct callback_data callback = callbacks[i];
if (callback.event == event) {
callback.func(event, callback.data);
}
}
}
int xeb_loop(void) {
Display *display = XOpenDisplay(NULL);
if (!display) {
fprintf(stderr, "Failed to open display\n");
return -1;
}
int screen_count = ScreenCount(display);
Window roots[screen_count];
struct dimensions dimens[screen_count];
for (int i = 0; i < screen_count; i++) {
roots[i] = RootWindow(display, i);
XWindowAttributes attrs;
Status status = XGetWindowAttributes(display, roots[i], &attrs);
if (!status) {
fprintf(stderr, "Failed to get root window attributes for screen: %d\n", i);
return -1;
}
dimens[i].width = attrs.width;
dimens[i].height = attrs.height;
XSelectInput(display, roots[i], StructureNotifyMask);
}
for (;;) {
XEvent e;
XNextEvent(display, &e);
if (e.type == ConfigureNotify) {
XConfigureEvent xce = e.xconfigure;
for (int i = 0; i < screen_count; i++) {
if (xce.window == roots[i]) {
if (xce.width != dimens[i].width || xce.height != dimens[i].height) {
dimens[i].width = xce.width;
dimens[i].height = xce.height;
call_callbacks(ResolutionChange);
}
break;
}
}
}
}
}

View File

@ -0,0 +1,44 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Olaf Tomalka
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _XEVENTBIND_HANDLER_H
#define _XEVENTBIND_HANDLER_H
#include "xeb_event_types.h"
typedef int xeb_callback_id;
/**
* @param event An event that this function was called for
* @param data A pointer to, optional, user defined input for the callback function
* @return 0 on success, anything else for error */
typedef int(*xeb_callback)(xeb_event_type event, void* data);
/**
* \brief Starts the event loop and blocks the thread until xeb_stop is called
* @return 0 on sucess, -1 on error
*/
int xeb_loop(void);
void xeb_add_callback(xeb_event_type event, xeb_callback func, void* data);
#endif

46
.archlinux/PKGBUILDs/tari-web/PKGBUILD vendored Normal file
View File

@ -0,0 +1,46 @@
_ubo='ublock_origin-1.17.2-an+fx.xpi'
_vimium='vimium_ff-1.64-an+fx.xpi'
_noscript='noscript_security_suite-10.1.9.9-an+fx.xpi'
_https='https_everywhere-2018.9.19-an+fx.xpi'
_arcdark='arc_dark_theme-2018.9.24-fx.xpi'
pkgname=tari-web
pkgver=0.2.0
pkgrel=1
pkgdesc="Web browser settings."
arch=('any')
depends=(firefox chromium)
source=('local-settings.js' 'mozilla.cfg'
"https://addons.cdn.mozilla.net/user-media/addons/607454/${_ubo}"
"https://addons.cdn.mozilla.net/user-media/addons/808538/${_vimium}"
"https://addons.cdn.mozilla.net/user-media/addons/722/${_noscript}"
"https://addons.cdn.mozilla.net/user-media/addons/229918/${_https}"
"https://addons.cdn.mozilla.net/user-media/addons/993966/${_arcdark}")
noextract=("${_ubo}" "${_vimium}" "${_noscript}" "${_https}" "${_arcdark}")
sha256sums=('4588ae786cf0cdf941a0c79ad71b7592cd1f5478a85822b019d98ff0d5e631d4'
'c625a3b98b3769bf08fe0a357898245dd2688f3d5c22c7a42ad4fc26132f45a9'
'b5e2fb5f12ef64d9ff4b8723af5f8d16ee349c5b9f2683edafc440f587efd078'
'1ac884ffd3345d83c5c47be1d6a6abe34b35678b6469ee68c7be6070100f5f98'
'e7ec0345c2174e64c7552ab708a59c8efd7c1078fedda64d9c9ad06a899194b9'
'90604ab36bd205d2cdee6a97d1e243b8193b678bd02731cc75209ce0c56590e4'
'95ab0e6116daa257a7023f134f14949d75271ef02428f69819d063da46f4ab8f')
package() {
install -Dm 644 local-settings.js "$pkgdir"/usr/lib/firefox/defaults/pref/local-settings.js
install -Dm 644 mozilla.cfg "$pkgdir"/usr/lib/firefox/mozilla.cfg
install -Dm 644 $_ubo \
"$pkgdir"/usr/lib/firefox/browser/extensions/uBlock0@raymondhill.net.xpi
install -Dm 644 $_vimium \
"$pkgdir"/usr/lib/firefox/browser/extensions/{d7742d87-e61d-4b78-b8a1-b469842139fa}.xpi
install -Dm 644 $_noscript \
"$pkgdir"/usr/lib/firefox/browser/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi
install -Dm 644 $_https \
"$pkgdir"/usr/lib/firefox/browser/extensions/https-everywhere@eff.org.xpi
install -Dm 644 $_arcdark \
"$pkgdir"/usr/lib/firefox/browser/extensions/arc-dark-theme@afnankhan.xpi
}

View File

@ -0,0 +1,2 @@
pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");

View File

@ -0,0 +1,50 @@
//
// Don't use pocket
lockPref("browser.pocket.enabled", false);
// Don't automatically scan websites
lockPref("browser.safebrowsing.malware.enabled", false);
lockPref("browser.safebrowsing.phishing.enabled", false);
lockPref("browser.safebrowsing.downloads.enabled", false);
lockPref("browser.safebrowsing.downloads.remote.block_uncommon", false);
lockPref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false);
// Don't try to suggest search results
lockPref("browser.search.suggest.enabled", false);
lockPref("browser.urlbar.searchSuggestionsChoice", false);
lockPref("browser.urlbar.suggest.searches", false);
// Don't try to update search engines automatically
lockPref("browser.search.update", false);
// Don't send excessive data
lockPref("browser.tabs.crashReporting.sendReport", false);
lockPref("datareporting.healthreport.uploadEnabled", false);
lockPref("app.shield.optoutstudies.enabled", false);
// Don't warn when closing tabs
lockPref("browser.tabs.warnOnClose", false);
// Don't save account information
lockPref("signon.rememberSignons", false);
// Disable the default new tab page
lockPref("browser.newtabpage.enabled", false);
lockPref("browser.newtabpage.activity-stream.showSearch", false);
lockPref("browser.newtabpage.activity-stream.showSponsored", false);
lockPref("browser.newtabpage.activity-stream.feeds.topsites", false);
lockPref("browser.newtabpage.activity-stream.feeds.snippets", false);
lockPref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
lockPref("browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false);
lockPref("browser.newtabpage.activity-stream.section.highlights.includeDownloads", false);
lockPref("browser.newtabpage.activity-stream.section.highlights.includePocket", false);
lockPref("browser.newtabpage.activity-stream.section.highlights.includeVisited", false);
// Use vim in the devtools editor
lockPref("devtools.editor.keymap", "vim");
// Disable the HTTPS everywhere section in devtools
lockPref("devtools.webextensions.https-everywhere@eff.org.enabled", false);
// vim:syn=javascript

18
.archlinux/README.md Normal file
View File

@ -0,0 +1,18 @@
# 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
- The ability to switch between GNOME, Plasma, and bspwm efficiently
- 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

View File

@ -0,0 +1,29 @@
#!/bin/sh
#
# This script assumes you already have an active internet connection
# (preferably through Ethernet).
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
# Sync the time with one online before doing anything
timedatectl set-ntp true
# Make a DOS partition table with one primary ext4 partition and
# enable boot for it. Then, create a primary swap partition with
# the remaining disk space.
parted /dev/sda mklabel msdos
parted /dev/sda mkpart primary ext4 1MiB 60GiB
parted /dev/sda set 1 boot on
parted /dev/sda mkpart primary linux-swap 60GiB 100%
# Format sda1 with ext4 and sda2 with swap
mkfs -t ext4 /dev/sda1
mkswap /dev/sda2
# Enable the swap partition
swapon /dev/sda2
# Mount the newly created file system (/dev/sda1) to /mnt.
mount /dev/sda1 /mnt

View File

@ -0,0 +1,13 @@
#!/bin/sh
#
# Install the base packages to the mounted partition (the newly
# created filesystem).
#
# We also install grub and fish since grub is the boot loader
# and fish is the preferred shell.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
pacstrap /mnt base base-devel grub fish

View File

@ -0,0 +1,58 @@
#!/bin/sh
#
# Once this script finishes, change the root password with passwd,
# then unmount /mnt (with umount) and restart the system.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
echo -n "Enter a hostname for this machine: "
read HOSTNAME
# Generate the fstab file (so the filesystem is mounted on boot)
genfstab -U /mnt > /mnt/etc/fstab
# Set the timezone
arch-chroot /mnt ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
# Generate /etc/adjtime
arch-chroot /mnt hwclock --systohc
# Set the hostname
echo "$HOSTNAME" > /mnt/etc/hostname
# Configure the hosts file (if your system has a permanent IP address, use that instead of 127.0.1.1)
echo "127.0.0.1 localhost" >> /mnt/etc/hosts
echo "::1 localhost" >> /mnt/etc/hosts
echo "127.0.1.1 $HOSTNAME.localdomain $HOSTNAME" >> /mnt/etc/hosts
# Set the language to English and use the en_US.UTF-8 locale.
echo "LANG=en_US.UTF-8" > /mnt/etc/locale.conf
echo "en_US.UTF-8 UTF-8" > /mnt/etc/locale.gen
# Generate the locale.
arch-chroot /mnt locale-gen
# Explicitly set the keymap to US.
echo "KEYMAP=us" > /mnt/etc/vconsole.conf
# Change the terminal font to a larger one (`latarcyrheb-sun32` is also an option)
echo "FONT=ter-132n" >> /mnt/etc/vconsole.conf
# Install grub to the primary partition.
arch-chroot /mnt grub-install /dev/sda
# Prevent the GRUB window from showing at boot, ideal for single OS machines (undo with chroot and mkconfig)
sed -i '/GRUB_TIMEOUT/c\GRUB_TIMEOUT=0' /mnt/etc/default/grub
# Make the configuration file for grub.
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
# Change the shell of the root account to fish.
arch-chroot /mnt chsh -s /usr/bin/fish
# Save our hardware information with mkinitcpio. This creates
# an initial ramdisk environment that allows us to boot the
# Linux kernel.
arch-chroot /mnt mkinitcpio -p linux

View File

@ -0,0 +1,30 @@
#!/bin/sh
#
# Common post-install system configuration that doesn't involve any
# external packages (besides fish)
#
# https://wiki.archlinux.org/index.php/General_recommendations
set -xe
echo -n "Enter a username for the local account with administrative rights: "
read USERNAME
# Start and enable the DHCP client daemon service
systemctl enable --now dhcpcd.service
# Sync the time periodically with a remote server
timedatectl set-ntp true
# Enable colors in pacman by uncommenting the Color line.
sed -i '/Color/s/^#//g' /etc/pacman.conf
sed -i '/VerbosePkgLists/s/^#//g' /etc/pacman.conf
# Give users in the wheel group permission to use sudo
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
# Create a new user account with sudo privileges and the fish shell.
arch-chroot /mnt useradd -m -g users -G wheel -s /usr/bin/fish "$USERNAME"
# Then, set the password equal to the username (change this later).
echo "$USERNAME:$USERNAME" | chpasswd

View File

@ -0,0 +1,18 @@
# Install Scripts
Here are my Arch Linux install scripts. They are divided into 4 parts:
1. Pre-install: Setting up the drive to install Arch on
2. Install: Installing Arch Linux to that drive
3. Configure: Writing some basic low-level config files
4. Post-install: Post-install configuration
I have one `install.sh` script that calls the first three scripts with the proper settings. The fourth script should be ran after a reboot. (TODO: Probably easier to run a subset of post-install commands in the installation media, + internet will already be covered, which allows us to clone this repository to the newly created home directory and run any other post-install commands on first boot... may also be useful to divide the install scripts a bit further to support more options).
> **Note**: If you do not understand my install scripts, you should follow the [Installation guide][archguide] instead.
## Setup
> TODO...
[archguide]: https://wiki.archlinux.org/index.php/Installation_guide

62
.fedora/Makefile Normal file
View File

@ -0,0 +1,62 @@
install=sudo dnf install --assumeyes
copr=sudo dnf copr enable --assumeyes
.PHONY: all
all: rice RPMs/muya.rpm install kitty wal crystal rust diff-so-fancy clean
.PHONY: rice
rice:
@${install} pop-gtk-theme pop-icon-theme breeze-cursor-theme
@../gnome/.config/gnome/extensions.sh
@../gnome/.config/gnome/antialiasing.sh
@../gnome/.config/gnome/pop-gtk-theme.sh
@../gnome/.config/gnome/breeze-cursor-theme.sh
.ONESHELL:
RPMs/muya.rpm: RPMs/muya.spec
@cd RPMs
@rm -rfv noarch
@fedpkg --release f29 local
@mv noarch/*.rpm muya.rpm
@rmdir noarch
@rm -fv *.src.rpm
.PHONY: install
install:
@${install} RPMs/muya.rpm
.PHONY: kitty
kitty:
@${copr} gagbo/kitty-latest
@${install} kitty
.PHONY: wal
wal:
@pip3 install --user pywal
.PHONY: crystal
crystal:
@sudo ./vendor/crystal-setup.sh
@${install} crystal
.PHONY: rust
rust:
@./vendor/rustup-init.sh -y
.PHONY: diff-so-fancy
diff-so-fancy:
@sudo install -Dm 755 ./vendor/diff-so-fancy /usr/bin/diff-so-fancy
.PHONY: clean
clean:
@rm -rv ~/rpmbuild
.PHONY: update
update:
@mkdir -pv vendor
@curl -L https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy -o vendor/diff-so-fancy
@curl -L https://sh.rustup.rs -o vendor/rustup-init.sh
@curl -L https://dist.crystal-lang.org/rpm/setup.sh -o vendor/crystal-setup.sh
@chmod 755 vendor/diff-so-fancy
@chmod 755 vendor/rustup-init.sh
@chmod 755 vendor/crystal-setup.sh

47
.fedora/README.md Normal file
View File

@ -0,0 +1,47 @@
# Muya - A light rice for Fedora
This is my setup for [Fedora][fedora], a [GNU/Linux][gnulinux] distribution that ships with GNOME by default, making it an ideal choice for most users. This guide covers a *simple* rice that will make your Fedora look much nicer than the defaults. It only uses packages from the official repositories, making it quick and easy to set up on any machine.
> This guide will work with the **latest version** of Fedora (29 as of this writing).
## Use my GNOME theme and settings
To copy the look and feel of my GNOME setup, run:
```sh
make rice
```
That's it! You now have a very simple Fedora rice.
## Use my packages and scripts
### Install kitty
Use `make kitty` to install the [kitty](/kitty) terminal emulator.
### Install wal
Use `make wal` to install [pywal](/wal).
### Install crystal
Use `make crystal` to install the [Crystal][crystal] programming language.
### Install rustup
Use `make rustup` to install the Rust toolchain installer.
## Mimic my entire setup
If you want to use *everything* I use, simply run the bootstrap script, like so:
```sh
./bootstrap.sh
```
The script will ask for sudo permissions the first time you run it. Then you can sit back and relax as no manual intervention is necessary.
[fedora]: https://getfedora.org
[gnulinux]: https://www.gnu.org/gnu/linux-and-gnu.html
[crystal]: https://crystal-lang.org/

76
.fedora/RPMs/muya.spec Normal file
View File

@ -0,0 +1,76 @@
Name: muya
Version: 0.2.0
Release: 1%{?dist}
Summary: Packages I use in addition to the defaults on Fedora
License: Various
BuildArch: noarch
# Packages
Requires: stow
Requires: neovim
Requires: vim-enhanced
Requires: fish
Requires: pass
Requires: ripgrep
Requires: fzf
Requires: exa
Requires: fd-find
Requires: httpie
Requires: jq
Requires: ranger
Requires: tig
Requires: youtube-dl
Requires: neofetch
Requires: cmatrix
Requires: borgbackup
Requires: rsync
Requires: texlive
Requires: nginx
Requires: nodejs
Requires: nodejs-yarn
Requires: java-11-openjdk
Requires: ansible
Requires: docker
Requires: docker-compose
Requires: chromium
%description
All the packages and other options I use on a fresh Fedora machine.
Keeping one package and updating it as time goes on makes it easy to
manage dependencies and other installed files.
%files
%{_bindir}/256colortest
%{_bindir}/colorfade
%{_bindir}/colorhash
%{_bindir}/colorhex
%{_bindir}/colorline
%{_bindir}/colorpanes
%{_bindir}/colortest
%{_bindir}/diamonds
%{_bindir}/dna
%{_bindir}/ghosts
%{_bindir}/pipes
%{_bindir}/pmabove
%{_bindir}/pmleft
%{_bindir}/spaceinvaders
%{_bindir}/unowns
%install
ROOT_DIR=../../.archlinux/PKGBUILDs
SCRIPTS_DIR=$ROOT_DIR/tari-scripts
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/256colortest
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/colorfade
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/colorhash
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/colorhex
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/colorline
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/colorpanes
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/colortest
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/diamonds
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/dna
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/ghosts
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/pipes
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/pmabove
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/pmleft
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/spaceinvaders
install -Dm 755 -t %{buildroot}/%{_bindir} $SCRIPTS_DIR/unowns

32
.fedora/bootstrap.sh Executable file
View File

@ -0,0 +1,32 @@
#!/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 &
# Install dependencies
sudo -n dnf install -y make fedpkg
# Run make
make
# Install dotfiles
make -C ..
# Change the color scheme to a sane default
wal --theme base16-tomorrow-night
# Run vim for the first time (i.e. install plugins and exit)
nvim
# Revoke privileges
sudo -K

8
.fedora/vendor/crystal-setup.sh vendored Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
cat > /etc/yum.repos.d/crystal.repo <<END
[crystal]
name = Crystal
baseurl = http://dist.crystal-lang.org/rpm/
END
rpm --import http://dist.crystal-lang.org/rpm/RPM-GPG-KEY

1059
.fedora/vendor/diff-so-fancy vendored Executable file

File diff suppressed because it is too large Load Diff

387
.fedora/vendor/rustup-init.sh vendored Executable file
View File

@ -0,0 +1,387 @@
#!/bin/bash
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
# This is just a little script that can be downloaded from the internet to
# install rustup. It just does platform detection, downloads the installer
# and runs it.
set -u
RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup/dist"
#XXX: If you change anything here, please make the same changes in setup_mode.rs
usage() {
cat 1>&2 <<EOF
rustup-init 1.0.0 (408ed84 2017-02-11)
The installer for rustup
USAGE:
rustup-init [FLAGS] [OPTIONS]
FLAGS:
-v, --verbose Enable verbose output
-y Disable confirmation prompt.
--no-modify-path Don't configure the PATH environment variable
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--default-host <default-host> Choose a default host triple
--default-toolchain <default-toolchain> Choose a default toolchain to install
--default-toolchain none Do not install any toolchains
EOF
}
main() {
downloader --check
need_cmd uname
need_cmd mktemp
need_cmd chmod
need_cmd mkdir
need_cmd rm
need_cmd rmdir
get_architecture || return 1
local _arch="$RETVAL"
assert_nz "$_arch" "arch"
local _ext=""
case "$_arch" in
*windows*)
_ext=".exe"
;;
esac
local _url="$RUSTUP_UPDATE_ROOT/$_arch/rustup-init$_ext"
local _dir="$(mktemp -d 2>/dev/null || ensure mktemp -d -t rustup)"
local _file="$_dir/rustup-init$_ext"
local _ansi_escapes_are_valid=false
if [ -t 2 ]; then
if [ "${TERM+set}" = 'set' ]; then
case "$TERM" in
xterm*|rxvt*|urxvt*|linux*|vt*)
_ansi_escapes_are_valid=true
;;
esac
fi
fi
# check if we have to use /dev/tty to prompt the user
local need_tty=yes
for arg in "$@"; do
case "$arg" in
-h|--help)
usage
exit 0
;;
-y)
# user wants to skip the prompt -- we don't need /dev/tty
need_tty=no
;;
*)
;;
esac
done
if $_ansi_escapes_are_valid; then
printf "\33[1minfo:\33[0m downloading installer\n" 1>&2
else
printf '%s\n' 'info: downloading installer' 1>&2
fi
ensure mkdir -p "$_dir"
ensure downloader "$_url" "$_file"
ensure chmod u+x "$_file"
if [ ! -x "$_file" ]; then
printf '%s\n' "Cannot execute $_file (likely because of mounting /tmp as noexec)." 1>&2
printf '%s\n' "Please copy the file to a location where you can execute binaries and run ./rustup-init$_ext." 1>&2
exit 1
fi
if [ "$need_tty" = "yes" ]; then
# The installer is going to want to ask for confirmation by
# reading stdin. This script was piped into `sh` though and
# doesn't have stdin to pass to its children. Instead we're going
# to explicitly connect /dev/tty to the installer's stdin.
if [ ! -t 1 ]; then
err "Unable to run interactively. Run with -y to accept defaults, --help for additional options"
fi
ignore "$_file" "$@" < /dev/tty
else
ignore "$_file" "$@"
fi
local _retval=$?
ignore rm "$_file"
ignore rmdir "$_dir"
return "$_retval"
}
get_bitness() {
need_cmd head
# Architecture detection without dependencies beyond coreutils.
# ELF files start out "\x7fELF", and the following byte is
# 0x01 for 32-bit and
# 0x02 for 64-bit.
# The printf builtin on some shells like dash only supports octal
# escape sequences, so we use those.
local _current_exe_head=$(head -c 5 /proc/self/exe )
if [ "$_current_exe_head" = "$(printf '\177ELF\001')" ]; then
echo 32
elif [ "$_current_exe_head" = "$(printf '\177ELF\002')" ]; then
echo 64
else
err "unknown platform bitness"
fi
}
get_endianness() {
local cputype=$1
local suffix_eb=$2
local suffix_el=$3
# detect endianness without od/hexdump, like get_bitness() does.
need_cmd head
need_cmd tail
local _current_exe_endianness="$(head -c 6 /proc/self/exe | tail -c 1)"
if [ "$_current_exe_endianness" = "$(printf '\001')" ]; then
echo "${cputype}${suffix_el}"
elif [ "$_current_exe_endianness" = "$(printf '\002')" ]; then
echo "${cputype}${suffix_eb}"
else
err "unknown platform endianness"
fi
}
get_architecture() {
local _ostype="$(uname -s)"
local _cputype="$(uname -m)"
if [ "$_ostype" = Linux ]; then
if [ "$(uname -o)" = Android ]; then
local _ostype=Android
fi
fi
if [ "$_ostype" = Darwin -a "$_cputype" = i386 ]; then
# Darwin `uname -s` lies
if sysctl hw.optional.x86_64 | grep -q ': 1'; then
local _cputype=x86_64
fi
fi
case "$_ostype" in
Android)
local _ostype=linux-android
;;
Linux)
local _ostype=unknown-linux-gnu
;;
FreeBSD)
local _ostype=unknown-freebsd
;;
NetBSD)
local _ostype=unknown-netbsd
;;
DragonFly)
local _ostype=unknown-dragonfly
;;
Darwin)
local _ostype=apple-darwin
;;
MINGW* | MSYS* | CYGWIN*)
local _ostype=pc-windows-gnu
;;
*)
err "unrecognized OS type: $_ostype"
;;
esac
case "$_cputype" in
i386 | i486 | i686 | i786 | x86)
local _cputype=i686
;;
xscale | arm)
local _cputype=arm
if [ "$_ostype" = "linux-android" ]; then
local _ostype=linux-androideabi
fi
;;
armv6l)
local _cputype=arm
if [ "$_ostype" = "linux-android" ]; then
local _ostype=linux-androideabi
else
local _ostype="${_ostype}eabihf"
fi
;;
armv7l | armv8l)
local _cputype=armv7
if [ "$_ostype" = "linux-android" ]; then
local _ostype=linux-androideabi
else
local _ostype="${_ostype}eabihf"
fi
;;
aarch64)
local _cputype=aarch64
;;
x86_64 | x86-64 | x64 | amd64)
local _cputype=x86_64
;;
mips)
local _cputype="$(get_endianness $_cputype "" 'el')"
;;
mips64)
local _bitness="$(get_bitness)"
if [ $_bitness = "32" ]; then
if [ $_ostype = "unknown-linux-gnu" ]; then
# 64-bit kernel with 32-bit userland
# endianness suffix is appended later
local _cputype=mips
fi
else
# only n64 ABI is supported for now
local _ostype="${_ostype}abi64"
fi
local _cputype="$(get_endianness $_cputype "" 'el')"
;;
ppc)
local _cputype=powerpc
;;
ppc64)
local _cputype=powerpc64
;;
ppc64le)
local _cputype=powerpc64le
;;
*)
err "unknown CPU type: $_cputype"
esac
# Detect 64-bit linux with 32-bit userland
if [ $_ostype = unknown-linux-gnu -a $_cputype = x86_64 ]; then
if [ "$(get_bitness)" = "32" ]; then
local _cputype=i686
fi
fi
# Detect armv7 but without the CPU features Rust needs in that build,
# and fall back to arm.
# See https://github.com/rust-lang-nursery/rustup.rs/issues/587.
if [ $_ostype = "unknown-linux-gnueabihf" -a $_cputype = armv7 ]; then
if ensure grep '^Features' /proc/cpuinfo | grep -q -v neon; then
# At least one processor does not have NEON.
local _cputype=arm
fi
fi
local _arch="$_cputype-$_ostype"
RETVAL="$_arch"
}
say() {
echo "rustup: $1"
}
err() {
say "$1" >&2
exit 1
}
need_cmd() {
if ! check_cmd "$1"
then err "need '$1' (command not found)"
fi
}
check_cmd() {
command -v "$1" > /dev/null 2>&1
return $?
}
need_ok() {
if [ $? != 0 ]; then err "$1"; fi
}
assert_nz() {
if [ -z "$1" ]; then err "assert_nz $2"; fi
}
# Run a command that should never fail. If the command fails execution
# will immediately terminate with an error showing the failing
# command.
ensure() {
"$@"
need_ok "command failed: $*"
}
# This is just for indicating that commands' results are being
# intentionally ignored. Usually, because it's being executed
# as part of error handling.
ignore() {
"$@"
}
# This wraps curl or wget. Try curl first, if not installed,
# use wget instead.
downloader() {
if check_cmd curl
then _dld=curl
elif check_cmd wget
then _dld=wget
else _dld='curl or wget' # to be used in error message of need_cmd
fi
if [ "$1" = --check ]
then need_cmd "$_dld"
elif [ "$_dld" = curl ]
then curl -sSfL "$1" -o "$2"
elif [ "$_dld" = wget ]
then wget "$1" -O "$2"
else err "Unknown downloader" # should not reach here
fi
}
main "$@" || exit 1

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
.archlinux/PKGBUILDs/**/* linguist-vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 924 KiB

View File

@ -1,26 +0,0 @@
name: tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run tests
run: deno test tests/main.ts --allow-read
- name: Check formatting
run: deno fmt tests/ --check
nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- run: nix flake check

17
.gitignore vendored
View File

@ -1,2 +1,15 @@
*.qcow2 # Ignore firefox extensions
result *.xpi
# Ignore tar files
*.tar*
# Ignore log files
*.log
# Ignore rpm files
*.rpm
# Ignore tari-dev source files
.archlinux/PKGBUILDs/tari-dev/*.vim
.archlinux/PKGBUILDs/tari-dev/*.fish

8
CHANGELOG.md Normal file
View File

@ -0,0 +1,8 @@
# Changelog
## [0.1.0] (December 1st 2018)
- Finally settled on a file hierarchy
- The Fedora bootstrap script works completely
- Arch Linux install scripts work, but can be improved
- The actual rice works very well

View File

@ -1,4 +1,4 @@
Copyright (C) 2017-2024 Donovan Glover Copyright (C) 2017-2018 Donovan Glover
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the

53
Makefile Normal file
View File

@ -0,0 +1,53 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2018 Donovan Glover
#
# Usage:
# make Defaults to `make install`
# make install Installs dotfiles
# make uninstall Uninstalls dotfiles
# make prune Removes stale links
verbose ?= 2
NS_CODE_EXTENSIONS := dbaeumer.vscode-eslint EditorConfig.EditorConfig faustinoaq.crystal-lang \
naumovs.color-highlight PKief.material-icon-theme vscodevim.vim
NS_REPO_PATH := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
NS_STOW_OPTIONS := --dir="${NS_REPO_PATH}" --target="${HOME}" --no-folding --verbose=${verbose}
NS_STOW_PACKAGES := $(wildcard */)
NS_SUCCESS := "SUCCESS: Stow command executed succesfully!"
NS_STOW_COMMAND := $(if ${package},ns_stow_package,ns_stow_all)
ns_stow_package = \
echo "STATUS: Found package variable. Stow operation will be performed if it is a valid directory..."; \
test -d ${package} && \
(stow -${1} ${package} ${NS_STOW_OPTIONS} && \
echo ${NS_SUCCESS}) || \
echo "FAILURE: Not a valid package directory."
ns_stow_all = \
echo "STATUS: No package variable given. Performing stow operation on all directories..."; \
$(foreach package,$(NS_STOW_PACKAGES),stow -${1} $(package) ${NS_STOW_OPTIONS} &&) \
echo ${NS_SUCCESS}
.PHONY: install
install:
@$(call ${NS_STOW_COMMAND},S)
.PHONY: uninstall
uninstall:
@$(call ${NS_STOW_COMMAND},D)
.PHONY: prune
prune:
@$(call ${NS_STOW_COMMAND},R)
.PHONY: code-extensions
code-extensions:
@$(foreach extension,${NS_CODE_EXTENSIONS},code --install-extension ${extension} --force;)
.PHONY: enable-mpd
enable-mpd:
@systemctl --user enable --now mpd.service
.PHONY: enable-ssh-agent
enable-ssh-agent:
@systemctl --user enable --now ssh-agent.service

100
README.md
View File

@ -1,37 +1,77 @@
# nix-config # ~/.files
My [NixOS] configuration with [Nix Flakes], [Home Manager], [Stylix], and [Hyprland]. > TODO: Screenshots
![A screenshot of Pepper looking earnestly at declaratively configured Git abbreviations for the fish shell, written in Nix.](./cover.jpg)
<sub>Background art: [The market](https://www.peppercarrot.com/en/viewer/artworks__2022-02-21_The-market_by-David-Revoy.html), [In Bloom](https://www.peppercarrot.com/en/viewer/artworks__2022-03-02_In-Bloom_by-David-Revoy.html) and [Vertical cover book two screen](https://www.peppercarrot.com/en/viewer/artworks__2016-11-14_vertical-cover-book-two_screen_by-David-Revoy.html) by David Revoy [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/deed.en).</sub>
![A screenshot of a Rust programming environment with Neovim, kitty, and bacon.](./.github/screenshots/neovim.png)
<sub>Background art: [Video game jam](https://www.peppercarrot.com/en/viewer/misc__2023-06-12_video-game-jam_by-David-Revoy.html) by David Revoy [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/deed.en).</sub>
## Features
- Clean, readable code that can be easily modified to add/remove things as needed.
- Fully reproducible and declarative environment thanks to NixOS.
- Reasonably secure containers isolated from your personal files and network.
- Nix Flakes + Home Manager + Btrfs on LUKS.
- Simple yet effective Neovim setup with nvim-lspconfig.
- Modern Wayland support with Hyprland and the master-stack layout.
- Full Japanese support with fonts, input method, and wine covered.
- Specializations for easy switching between Hyprland, GNOME, and Plasma.
- A universal color scheme inherited by all applications.
## Usage ## Usage
```fish ### Replicate my [Arch Linux](/.archlinux) setup
git clone https://github.com/donovanglover/nix-config && cd nix-config
nixos-rebuild build-vm --flake .#nixos On a fresh [Arch Linux][archlinux] install, run the bootstrap script.
./result/bin/run-nixos-vm
```sh
git clone https://github.com/GloverDonovan/.files --depth 1 && ./.files/.archlinux/bootstrap.sh
``` ```
The code base is designed to be small so it's easy to adjust things as needed. Have fun! ### Replicate my [Fedora](/.fedora) setup
[NixOS]: https://nixos.org/ On a fresh [Fedora][fedora] install, run the bootstrap script.
[Nix Flakes]: https://nixos.wiki/wiki/Flakes
[Home Manager]: https://nix-community.github.io/home-manager/ ```sh
[Stylix]: https://danth.github.io/stylix/ git clone https://github.com/GloverDonovan/.files --depth 1 && ./.files/.fedora/bootstrap.sh
[Hyprland]: https://hyprland.org/ ```
### Use only the dotfiles you want
#### Method 1. With [`stow`][stow]
First, install stow with your package manager. Then, run the following:
```sh
make package=kitty
```
This will symlink my kitty config to your `$XDG_CONFIG_HOME`. If you want to install a different package, simply replace `kitty` with the name of the directory you wish to get dotfiles from.
Since `stow` will only change what it owns, you do not have to worry about any of your existing dotfiles being changed when you use this method.
To uninstall packages, simply use:
```sh
make uninstall package=kitty
```
This will remove the symlink to my kitty config. If you have other kitty files, stow will not remove them, since stow only changes what it owns.
#### Method 2. Manually
If you already have dotfiles and want to improve them, you can use this repository as a guide. If you find something that makes your dotfiles better, you're free to use it.
If you don't want to use stow, you can simply copy/paste the dotfiles you want to their relevant directories.
## Updating
To update your system with any changes I make, you must first verify that the changes I made are actually changes you want. Eventually I want to consider my dotfiles "stable" (i.e. 1.0.0, 2.0.0, etc.) in which only major version upgrades would significantly alter existing functionality, but right now this simply isn't the case.
Once you've verified that you indeed want my changes, update your local copy of the repository like so:
```sh
git pull
```
If you used the stow method, all of the dotfiles that you use from me will already be updated; you do not have to do anything else. If git tells you that there are conflicts, you probably want to rebase your changes on top of mine, or consider making your own version of those files instead.
## Downgrading
If for some reason you updated by accident and want existing functionality back, you can simply checkout a previous version or commit.
For example, if your configuration was last known to work at commit `a1b2c3d`, you would use:
```sh
git checkout a1b2c3d
```
[archlinux]: https://www.archlinux.org
[fedora]: https://getfedora.org
[gnulinux]: https://www.gnu.org/gnu/linux-and-gnu.html
[freesw]: https://www.gnu.org/philosophy/free-sw.html
[stow]: https://www.gnu.org/software/stow/manual/stow.html

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

63
bspwm/.config/bspwm/bspwmrc Executable file
View File

@ -0,0 +1,63 @@
#!/bin/sh
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2018 Donovan Glover
export SXHKD_SHELL="/usr/bin/bash"
export XCURSOR_THEME="breeze_cursors"
export XDG_DATA_DIRS="/usr/share:/usr/share:/usr/local/share"
sxhkd &
bspc monitor -d 1 2 3 4 5 6
bspc config split_ratio 0.50
# When monocle mode is enabled, don't show borders or gaps (i.e. let it
# take up the full available space on the screen).
bspc config borderless_monocle true
bspc config gapless_monocle true
# Always focus the window under the cursor
# while moving the mouse, similar to i3
bspc config focus_follows_pointer true
# Make caps lock work as ctrl
xmodmap ~/.xmodmap
# Make caps lock (left ctrl) work as escape
xcape -e 'Control_L=Escape'
# Change the default X shaped cursor to a pointer
xsetroot -cursor_name left_ptr
# Set a temporary black background to avoid flash
~/.config/feh/tile.sh 000000
# If running with VirtualBox client utilities, start them.
# Useful for automatically changing display resolution, etc.
if hash VBoxClient-all 2>/dev/null; then
VBoxClient-all
fi
# Set the color scheme to a random one. Note that this command
# needs to be run after any screen resolution changes.
wal -o ~/.config/wal/done.sh -i ~/Pictures/Wallpapers
# Never blank the screen (disable power saving)
xset s off -dpms
# Start compton
compton -b
# Start polybar
~/.config/polybar/launch.sh main
# bspc rules
bspc rule -a mpv state=floating
bspc rule -a feh state=floating
bspc rule -a kitty:floating state=floating
bspc rule -a kwrite state=floating
bspc rule -a ark state=floating
bspc rule -a kmag state=floating
bspc rule -a kcharselect state=floating

10
bspwm/.config/bspwm/wal.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Source the colors from wal
source ~/.cache/wal/colors.sh
# Set the border colors
bspc config normal_border_color "$color8"
bspc config active_border_color "$color2"
bspc config focused_border_color "$color7"
bspc config presel_feedback_color "$color7"

18
bspwm/README.md Normal file
View File

@ -0,0 +1,18 @@
# bspwm
[bspwm][bspwm] is a tiling window manager for X11.
## Use Cases
bspwm can be used to:
- Automatically tile all kinds of windows, maximizing screen estate
- Have complete control of your window manager through simple shell commands
- Minimize resource usage; bspwm works best without a desktop environment
You should not use bspwm if:
- You are using a desktop environment
- You just want to open multiple shells (use [kitty](/kitty) or [tmux](/tmux) for this instead)
[bspwm]: https://github.com/baskerville/bspwm

View File

@ -0,0 +1,30 @@
// New Start: A modern Arch workflow built with an emphasis on functionality.
// Copyright (C) 2018 Donovan Glover
{
// Look and feel
"workbench.colorTheme": "vs-wal",
"workbench.iconTheme": "material-icon-theme",
"editor.smoothScrolling": true,
// Always start with the previous workspace
"workbench.startupEditor": "newUntitledFile",
// Confirmations
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
// Attempt to render things properly for HiDPI displays
"terminal.integrated.rendererType": "dom",
"editor.disableTranslate3d": true,
// Toggle the menu bar with alt
"window.menuBarVisibility": "toggle",
// Disable the enabled-by-default telemetry
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
// Prefer yarn over npm
"eslint.packageManager": "yarn"
}
// vim:syn=javascript

19
code/README.md Normal file
View File

@ -0,0 +1,19 @@
# Code
[Code][code] is an open source build of [a popular][vscode] GUI text editor.
## Use Cases
Code can be used to:
- Navigate graphical file trees entirely with the mouse
- Provide an editor for non-vim users as needed
- Perform a myriad of common command line operations through a point-click GUI
You should not use Code if:
- You want to learn how compilers, git, find, grep, and other software work
- You want to learn [vim](/vim), the standard text editor
[code]: https://www.archlinux.org/packages/community/x86_64/code/
[vscode]: https://github.com/Microsoft/vscode

View File

@ -0,0 +1,29 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
# Enable shadows (very important, as this makes everything look really nice)
shadow = true
# Disable shadow on docks like polybar
#no-dock-shadow = true
# Disable shadow for drag-and-drop functionality
no-dnd-shadow = true
# Fade windows when you open and close them, as well as change workspaces
fading = true
# "Clear shadow" means that shadows will only affect the borders of the
# windows and not the entire window. This makes drawing windows much faster.
clear-shadow = true
# Shadow settings
#shadow-opacity = 0.6
#shadow-radius = 20
#shadow-offset-x = -30
#shadow-offset-y = -10
# Add transparency to bspwm borders
#frame-opacity = 0.5
# vim:ft=dosini

18
compton/README.md Normal file
View File

@ -0,0 +1,18 @@
# compton
[compton][compton] is a desktop compositor for X11.
## Use Cases
compton can be used to:
- Reduce screen tear in certain environments
- Add elementary animations such as fading to your desktop
- Add shadows to your desktop
You should not use compton if:
- Your window manager or desktop environment already has a compositor
- You are not using X11
[compton]: https://github.com/yshui/compton

View File

@ -1,116 +0,0 @@
{ stylix
, home-manager
, sakaya
, ...
}:
let
template = {
privateNetwork = true;
ephemeral = true;
autoStart = true;
restartIfChanged = false;
bindMounts = {
"/mnt" = {
hostPath = "/home/user/containers/wine";
isReadOnly = false;
};
waylandDisplay = rec {
hostPath = "/run/user/1000";
mountPoint = hostPath;
};
x11Display = rec {
hostPath = "/tmp/.X11-unix";
mountPoint = hostPath;
};
dri = rec {
hostPath = "/dev/dri";
mountPoint = hostPath;
};
};
allowedDevices = [
{
modifier = "rw";
node = "/dev/dri/renderD128";
}
];
};
in
{
systemd.tmpfiles.rules = [
"d /run/user/1000 0700 user users -"
];
containers.wine = template // {
hostAddress = "192.168.100.34";
localAddress = "192.168.100.49";
config = { lib, pkgs, ... }: {
imports = [
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
./shared.nix
];
networking.nat.forwardPorts = [
{
destination = "192.168.100.49:39493";
sourcePort = 39493;
}
{
destination = "192.168.100.49:5029";
sourcePort = 5029;
}
];
networking.firewall.allowedTCPPorts = [
39493
5029
];
systemd.services.sakaya = {
enable = true;
description = "sakaya server";
unitConfig = {
Type = "simple";
};
path = with pkgs; [
su
];
serviceConfig = {
ExecStart = "/usr/bin/env su user --command=${sakaya.packages.${pkgs.system}.sakaya}/bin/sakaya";
};
wantedBy = [ "multi-user.target" ];
};
environment.systemPackages = with pkgs; [
wineWowPackages.waylandFull
winetricks
sakaya.packages.${system}.sakaya
rar
unrar
iamb
srb2
];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"rar"
"unrar"
];
environment.sessionVariables = {
LC_ALL = "ja_JP.UTF-8";
TZ = "Asia/Tokyo";
};
};
};
}

View File

@ -1,71 +0,0 @@
{ pkgs, ... }:
{
imports = [
../overlays
../modules/fish.nix
../modules/fonts.nix
../modules/home-manager.nix
../modules/locale.nix
../modules/neovim.nix
../modules/nix.nix
../modules/pipewire.nix
../modules/starship.nix
../modules/stylix.nix
../modules/timezone.nix
../modules/wine.nix
];
home-manager.sharedModules = [
../home/fish.nix
../home/git.nix
../home/gtk.nix
../home/htop.nix
../home/joshuto.nix
../home/kitty.nix
../home/neovim.nix
../home/xcursor.nix
../home/xresources.nix
];
environment = {
defaultPackages = [ ];
variables.TERM = "xterm-kitty";
sessionVariables = {
WAYLAND_DISPLAY = "wayland-1";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
MOZ_ENABLE_WAYLAND = "1";
XDG_RUNTIME_DIR = "/run/user/1000";
DISPLAY = ":0";
QT_IM_MODULE = "fcitx";
XMODIFIERS = "@im=fcitx";
SDL_IM_MODULE = "fcitx";
GLFW_IM_MODULE = "ibus";
};
};
environment.systemPackages = with pkgs; [
kitty
];
users = {
mutableUsers = false;
allowNoPasswordLogin = true;
users = {
user = {
isNormalUser = true;
home = "/home/user";
};
};
};
services.xserver.enable = true;
hardware.opengl.enable = true;
system.stateVersion = "22.11";
}

BIN
cover.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 KiB

View File

@ -1,14 +0,0 @@
{ home-manager, stylix, ... }:
{
imports = [
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
./containers
./hardware
./home
./modules
./packages
./overlays
];
}

8
dunst/.config/dunst/wal.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
# Symlink dunst config
ln -sf ~/.cache/wal/dunstrc ~/.config/dunst/dunstrc
# Restart dunst with the new color scheme
pkill dunst
dunst &

View File

@ -0,0 +1,57 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2018 Donovan Glover
# NOTE: This file is automatically generated by pywal. Do not edit it by hand.
[global]
# Make the width 3740 (3840 - 100), have 50 left margin and 95 above
geometry = "3740x5-50+95"
# Show multiple notifications in the same box
separator_height = 0
# Add vertical padding to the inside of the notification
padding = 24
# Add horizontal padding for when the text gets long enough
horizontal_padding = 24
# The frame color and width of the notification
frame_color = "{color4}"
frame_width = 6
# How long a user needs to be idle for sticky notifications
idle_threshold = 120
# Font and typography settings
font = Fira Mono 11
alignment = center
word_wrap = yes
# Format for how notifications will be displayed
# Usage: `notify-send 'Title' 'Summary'`
format = "<b>%s</b>: %b"
# Allow some HTML tags like <i> and <u> in notifications
markup = full
# These are the keybindings used to control dunst notifications
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
# Set the background and foreground (text) color for all notifications
[urgency_low]
background = "{background}"
foreground = "{foreground}"
[urgency_normal]
background = "{background}"
foreground = "{foreground}"
[urgency_critical]
background = "{background}"
foreground = "{foreground}"
# vim:ft=cfg

16
dunst/README.md Normal file
View File

@ -0,0 +1,16 @@
# dunst
[dunst][dunst] is used to display notifications on your desktop.
## Use Cases
dunst can be used to:
- Display messages sent with `notify-send`
- Strategically add notifications to your rice screenshots
You should not use dunst if:
- Your desktop environment already includes a notification daemon
[dunst]: https://github.com/dunst-project/dunst

View File

@ -0,0 +1,15 @@
root = true
# Use 2 spaces for indentation by default
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
# Use tab indentation (with size 4) for the following files
[Makefile]
indent_style = tab
indent_size = 4

20
editorconfig/README.md Normal file
View File

@ -0,0 +1,20 @@
# editorconfig
[editorconfig][editorconfig] is the standard tool for editing consistency between editors.
## Use Cases
editorconfig can be used to:
- Finally forget about whether spaces or tabs are being used; editorconfig will handle this automatically for you
- Share the same indentation settings in all the editors you and your colleagues use
You should not use editorconfig if:
- You should use editorconfig.
## Usage
If you use my [`.vimrc`](/vim) or [code](/code) config, editorconfig is already applied.
[editorconfig]: https://github.com/editorconfig/editorconfig

101
feh/.config/feh/keys Normal file
View File

@ -0,0 +1,101 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
# Remove the default keybindings
toggle_actions
toggle_aliasing
toggle_caption
toggle_filenames
toggle_exif
save_filelist
toggle_fixed_geometry
toggle_pause
toggle_info
toggle_keep_vp
toggle_menu
next_img
toggle_pointer
prev_img
quit
reload_image
save_image
toggle_fullscreen
size_to_image
close
jump_random
prev_dir
next_dir
orient_3
orient_1
# Remove the default editing functionality
flip
mirror
action_0
action_1
action_2
action_3
action_4
action_5
action_6
action_7
action_8
action_9
jump_first
jump_last
jump_fwd
jump_back
reload_plus
reload_minus
remove
delete
scroll_left
scroll_right
scroll_up
scroll_down
scroll_left_page
scroll_right_page
scroll_up_page
scroll_down_page
render
zoom_in
zoom_out
zoom_default
zoom_fit
zoom_fill
# Remove the menu stuff
menu_close
menu_up
menu_down
menu_parent
menu_child
menu_select
# Add our custom keybindings
# Note that k goes right (next) and j goes left (prev)
toggle_fullscreen f
next_img k Right
prev_img j Left
toggle_filenames d
toggle_fixed_geometry g
toggle_pause h
quit q
size_to_image w
jump_random z
scroll_left b
scroll_right n
scroll_up u Up
scroll_down d Down
zoom_in h
zoom_out l
zoom_default o
zoom_fill p
toggle_pointer a
jump_first J
jump_last K
jump_fwd H
jump_back L
delete v
save_image s
toggle_auto_zoom m

43
feh/.config/feh/tile.sh Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
# End the script if an error occurs.
set -e
# Change the working directory to a cache directory.
mkdir -p "$HOME/.cache/feh"
cd "$HOME/.cache/feh"
# If $1 is not defined, raise an error.
if [ -z "$1" ]; then
echo 'error: No color specified.'
echo 'usage: ./path/to/tile.sh <color> where color is hexadecimal'
exit 1
fi
# If $1 contains something other than 0-9 and A-F, raise an error.
if [[ -n "${1//[0-9A-F]/}" ]]; then
echo 'error: Invalid color specified. Colors must use 0-9 and A-F only.'
echo ' Colors should not use a-f since file names are case sensitive.'
exit 1
fi
# If $1 is not exactly six characters long, raise an error.
if ! [ "${#1}" -eq 6 ]; then
echo 'error: Invalid color specified. Colors must be of length 6.'
echo ' This is for the convert function, and is used to help'
echo ' prevent duplicate colors.'
exit 1
fi
# If the color doesn't exist yet, make it.
if ! test -e "$1.png"; then
echo 'status: Color file does not exist yet. Making it...'
convert -size 1x1 "xc:#$1" "$1.png"
fi
# Finally, set the specified color as the background.
echo 'status: Setting the desktop background as the specified color...'
feh --no-fehbg --bg-tile "$1.png"
# We're done here.
echo 'status: Successfully changed the background to the color specified!'

17
feh/README.md Normal file
View File

@ -0,0 +1,17 @@
# feh
[feh][feh] is an image viewer with no GUI. It can also change the desktop background.
## Use Cases
feh can be used to:
- Quickly view and browse through images without loading a GUI
- Change your desktop background if not using a desktop environment
- Strategically place GUI-less images in your rice screenshots
You should not use feh if:
- You are using a desktop environment with an image viewer
[feh]: https://github.com/derf/feh

View File

@ -0,0 +1,80 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
set -U fish_greeting ""
export VISUAL="nvim"
export EDITOR="nvim"
export BROWSER="firefox"
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
export XDG_CURRENT_DESKTOP="KDE"
# Use rg instead of ag / ack / grep for fzf (much faster)
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
export FZF_DEFAULT_OPTS='--height 40% --reverse --border --color=16'
# Required to make gpg-agent work in cases like git commit
export GPG_TTY=(tty)
# Always use the default keybindings in fish
fish_default_key_bindings
# Use exa as a drop-in replacement for ls and tree (faster, more colors, etc.)
alias ls="exa --group-directories-first"
alias tree="exa --group-directories-first --long --tree -I 'node_modules|lib|.git'"
# Abbreviations are aliases that expand
if not set -q set_abbr
set -U set_abbr
abbr g "git"
abbr ga "git add"
abbr gaa "git add --all"
abbr gap "git add --patch"
abbr gb "git branch --verbose" # List all branches
abbr gc "git commit -m"
abbr gca "git commit --amend"
abbr gco "git checkout"
abbr gd "git diff" # Show all file changes not staged yet
abbr gds "git diff --staged" # Show changes staged but not committed
abbr gg "git grep"
abbr gi "git init"
abbr gl "git log --oneline --decorate --all --graph -n 10"
abbr gp "git push" # Push your commits to a remote server
abbr gs "git status"
abbr gss "git status -s"
abbr gr "git reset HEAD~" # Undo the last commit but keep changed files
abbr gre "git remote --verbose" # List all remotes
abbr grh "git reset HEAD"
abbr grr "git reset --hard HEAD~" # Remove the last commit and all changes with it
abbr t "task"
abbr ta "task add"
abbr tc "task completed"
abbr td "task done"
abbr te "task edit"
abbr dl "youtube-dl"
abbr vol "amixer set 'Master'" # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
abbr copy "xclip -sel clip <" # Easily copy the contents of any file
abbr dog "pygmentize -g" # "dog" is a colorful version of cat
abbr cf "tput reset" # Clear the terminal completely
abbr b "feh --bg-fill" # Change the background
abbr c "clear" # Because 5 letters is too much
abbr e "exit"
abbr l "ls -l"
abbr w "wal -o ~/.config/wal/done.sh"
abbr T "tree"
abbr nano "vim" # The explanation is in the name
abbr emacs "vim" # No need to start another operating system
end
# Start X at login
if status --is-login
if test -z "$DISPLAY" -a $XDG_VTNR = 1
exec startx -- -keeptty
end
end

View File

@ -0,0 +1,28 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
function fish_prompt
# Use a more informative and non-unicode prompt for ttys
if status --is-login; and test -z "$DISPLAY"
set hostname (hostname)
set_color yellow; echo -n "$USER@$hostname"
set_color normal; echo -n " "
set_color magenta; echo -n "($PWD)"
else
set pwd (basename $PWD)
if [ $pwd = $USER ]
set pwd "~"
end
set_color magenta; echo -n "$pwd"
set_color normal; echo -n " "
set_color red; echo -n "➤"
set_color green; echo -n "➤"
set_color blue; echo -n "➤"
end
set_color normal; echo -n " "
end

17
fish/README.md Normal file
View File

@ -0,0 +1,17 @@
# fish
[fish][fish] is the friendly interactive shell.
## Use Cases
fish can be used to:
- Have syntax highlighting in the terminal with 0 configuration
- Have leading autocompletion in the terminal with 0 configuration
- Set abbreviations instead of aliases, making it easy to remember what aliases expand to
You should not use fish if:
- You should use fish.
[fish]: https://github.com/fish-shell/fish-shell

View File

@ -1,298 +0,0 @@
{
"nodes": {
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1689633990,
"narHash": "sha256-iwvQg2Vx0IIDWZaKo8Xmzxlv1YPHg+Kp/QSv8dRv0RY=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "dddf2e1c04845d43c89a8e9e37d574519649a404",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-alacritty": {
"flake": false,
"locked": {
"lastModified": 1674275109,
"narHash": "sha256-Adwx9yP70I6mJrjjODOgZJjt4OPPe8gJu7UuBboXO4M=",
"owner": "aarowill",
"repo": "base16-alacritty",
"rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7",
"type": "github"
},
"original": {
"owner": "aarowill",
"repo": "base16-alacritty",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-foot": {
"flake": false,
"locked": {
"lastModified": 1696725948,
"narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
"owner": "tinted-theming",
"repo": "base16-foot",
"rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-foot",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1696727917,
"narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-kitty": {
"flake": false,
"locked": {
"lastModified": 1665001328,
"narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=",
"owner": "kdrag0n",
"repo": "base16-kitty",
"rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805",
"type": "github"
},
"original": {
"owner": "kdrag0n",
"repo": "base16-kitty",
"type": "github"
}
},
"base16-tmux": {
"flake": false,
"locked": {
"lastModified": 1696725902,
"narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
"owner": "tinted-theming",
"repo": "base16-tmux",
"rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-tmux",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1663659192,
"narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=",
"owner": "chriskempson",
"repo": "base16-vim",
"rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d",
"type": "github"
},
"original": {
"owner": "chriskempson",
"repo": "base16-vim",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1689549921,
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1704980804,
"narHash": "sha256-lPNNKdPqIYcjhhYIVwlajNt/HqVWbMOoSdNnwCvOP04=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "93e804e7f8a1eb88bde6117cd5046501e66aa4bd",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1704916437,
"narHash": "sha256-aE35YzfCrPPiBoCOKt0/GLd/Qar0Qq2VtUuC5XrY2Qk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5fcfdd4990ab907895fe9bcb1e2e4083d92ca670",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"sakaya": "sakaya",
"stylix": "stylix"
}
},
"sakaya": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1702621386,
"narHash": "sha256-xssBjmGgci4+6hz7Wwt1suxW1ZzKgYV3bDH31GDEghI=",
"owner": "donovanglover",
"repo": "sakaya",
"rev": "14e585b2a3fc969ee118e09b476dd4a1b10d19c2",
"type": "github"
},
"original": {
"owner": "donovanglover",
"repo": "sakaya",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-alacritty": "base16-alacritty",
"base16-fish": "base16-fish",
"base16-foot": "base16-foot",
"base16-helix": "base16-helix",
"base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1704308480,
"narHash": "sha256-88ICCdJyYYtsolRnPhI9IF+bhUIVUyhJ7nrKcKPgf6M=",
"owner": "danth",
"repo": "stylix",
"rev": "9bc1900b6888efdda39c2e02c7c8666911b72608",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,31 +0,0 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
sakaya = {
url = "github:donovanglover/sakaya";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... } @ attrs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [ ./. ];
};
};
}

47
git/.gitconfig Normal file
View File

@ -0,0 +1,47 @@
[include]
path = ~/.gituser
# Always sign commits
[commit]
gpgsign = true
[core]
editor = vim
autocrlf = false
pager = diff-so-fancy | less --tabs=4 -RFX
excludesfile = ~/.gitignore
[web]
browser = firefox
[push]
default = simple
[branch]
autosetuprebase = always
[rerere]
enabled = true
[color]
ui = true
[alias]
contrib = shortlog -n -s
remotes = remote -v
praise = blame
verify = log --show-signature
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse

9
git/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
# Don't track temporary vim files
*~
.*.sw*
# Don't track Plasma directory files
.directory

6
git/.stow-local-ignore Normal file
View File

@ -0,0 +1,6 @@
# This .stow-local-ignore file is used to prevent stow from
# ignoring the .gitignore file by default.
#
# https://www.gnu.org/software/stow/manual/stow.html#Ignore-Lists
README.md

33
git/README.md Normal file
View File

@ -0,0 +1,33 @@
# Git
[Git][git] is the standard version control tool.
# Use Cases
Git can be used to:
- Keep track of file changes over time
- Keep a record of all contributors to a code base
- Rollback to a previous version of a project
- Create snapshots of a project with tags (also known as versions)
You should not use Git if:
- You are dealing with binary files
- You are dealing with large files that change often
## Usage
First, install [diff-so-fancy][diff-so-fancy], an amazing git diff utility.
Then, create a `~/.gituser` with the following:
```gitconfig
[user]
name = <the name you use for git commits>
email = <the email you use for git commits>
signingkey = <the subkey you use to sign git commits>
```
[git]: https://github.com/git/git
[diff-so-fancy]: https://github.com/so-fancy/diff-so-fancy

View File

@ -0,0 +1,5 @@
#!/bin/sh
# Use the 'best' antialiasing settings for modern displays
gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing rgba
gsettings set org.gnome.settings-daemon.plugins.xsettings hinting full

View File

@ -0,0 +1,5 @@
#!/bin/sh
# Use the dark variant of the Arc GTK theme
gsettings set org.gnome.desktop.interface gtk-theme Arc-Dark-solid
gsettings set org.gnome.desktop.interface icon-theme Papirus-Dark

View File

@ -0,0 +1,4 @@
#!/bin/sh
# Use Plasma's default cursor theme in GNOME
gsettings set org.gnome.desktop.interface cursor-theme breeze_cursors

View File

@ -0,0 +1,7 @@
#!/bin/sh
# Use the Alternate Tab and Launch New Instance extensions
gsettings set org.gnome.shell enabled-extensions "[
'alternate-tab@gnome-shell-extensions.gcampax.github.com',
'launch-new-instance@gnome-shell-extensions.gcampax.github.com'
]"

View File

@ -0,0 +1,5 @@
#!/bin/sh
# Use the light variant of the Pop GTK theme
gsettings set org.gnome.desktop.interface gtk-theme Pop
gsettings set org.gnome.desktop.interface icon-theme Pop

16
gnome/README.md Normal file
View File

@ -0,0 +1,16 @@
# GNOME
[GNOME][gnome] is a simple desktop environment with X11 and Wayland support. It includes an interface that works well with touch devices.
## Use Cases
GNOME can be used to:
- Have a desktop environment that just works, with no configuration necessary
You should not use GNOME if:
- You want to learn how X works behind the scenes
- You want complete control of your desktop environment
[gnome]: https://wiki.archlinux.org/index.php/GNOME

13
gpg/.gnupg/gpg-agent.conf Normal file
View File

@ -0,0 +1,13 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017 Donovan Glover
# Use the terminal instead of a GTK window when prompting for passwords
pinentry-program /usr/bin/pinentry-curses
# Cache the given input for 12 hours
default-cache-ttl 43200
# Invalidate the cache entry after 12 hours have passed
max-cache-ttl 43200
# vim:ft=dosini

46
gpg/.gnupg/gpg.conf Normal file
View File

@ -0,0 +1,46 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
# 1. Use a keypool (specifically sks) instead of a regular keyserver
# 2. Use hkps to ensure a secure connection (hkp is to GPG as what http is to the web)
keyserver hkps://hkps.pool.sks-keyservers.net
# Ignore all other keyservers since they may be malicious, whether intentional or not.
# This prevents pulling keys from a specific keyserver and forces GPG to use the keypool
keyserver-options no-honor-keyserver-url
# Use SHA512 instead of SHA256
personal-digest-preferences SHA512
cert-digest-algo SHA512
# Use AES256 instead of AES128 or CAST5
cipher-algo AES256
# Prefer encryption algorithms in this order
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
personal-cipher-preferences TWOFISH CAMELLIA256 AES 3DES
# Prevent the recipient id from being leaked in the message
throw-keyids
# Always show long key IDs
keyid-format 0xlong
# Always show full fingerprints of keys
with-fingerprint
# Never show the version number (should be default)
no-emit-version
# Never use comments (should be default)
no-comments
# Always use utf-8
display-charset utf-8
# Always view user IDs distinctly from keys (should be default)
fixed-list-mode
# Always show user ID validity (should be default)
verify-options show-uid-validity
list-options show-uid-validity

26
gpg/README.md Normal file
View File

@ -0,0 +1,26 @@
# GPG
GPG is the standard encryption tool.
## Use Cases
gpg can be used to:
- Sign things with your signing subkey
- Read encrypted messages sent to you with your encryption subkey
- Send encrypted messages to other people with their public key
- Verify the authenticity of someone's messages and other data with their public key
You should not use gpg if:
- You should use gpg.
## Usage
Export `GPG_TTY` in your shell's init script. This is how you would do it in [fish](/fish):
```fish
export GPG_TTY=(tty)
```
[gnupg]: https://github.com/gpg/gnupg

View File

@ -0,0 +1,10 @@
[Settings]
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=36
gtk-font-name=Cantarell 11
gtk-icon-theme-name=Papirus-Dark
gtk-theme-name=Arc-Dark-solid
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb

18
gtk/README.md Normal file
View File

@ -0,0 +1,18 @@
# gtk-settings
[GTK][gtk] is the widget toolkit used by Firefox, Electron, and many (if not all) GNOME applications.
GTK's `settings.ini` only affects window managers and not the GNOME desktop environment. This is because GNOME manages user preferences with [`dconf` through `gsettings`][gnome].
## Use Cases
gtk-settings can be used to:
- Control the appearance of GTK applications under non-GNOME environments
You do not need to use gtk-settings if:
- You are using the GNOME desktop environment
[gtk]: https://wiki.archlinux.org/index.php/GTK+
[gnome]: https://wiki.archlinux.org/index.php/GNOME#Configuration

View File

@ -1,5 +0,0 @@
{
imports = [
./laptop.nix
];
}

View File

@ -1,31 +0,0 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/nixos";
fsType = "btrfs";
};
boot.initrd.luks.devices."root".device = "/dev/disk/by-label/nixos-luks";
fileSystems."/boot" =
{ device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,31 +0,0 @@
{
home-manager.sharedModules = [
./dunst.nix
./eww.nix
./fcitx.nix
./fish.nix
./git.nix
./gpg.nix
./gtk.nix
./htop.nix
./hyprland.nix
./ironbar.nix
./joshuto.nix
./kitty.nix
./librewolf.nix
./mime-apps.nix
./mpv.nix
./ncmpcpp.nix
./neovim.nix
./pqiv.nix
./qutebrowser.nix
./rofi.nix
./swaylock.nix
./thunar.nix
./udiskie.nix
./xcursor.nix
./xdg-user-dirs.nix
./xresources.nix
./zathura.nix
];
}

Some files were not shown because too many files have changed in this diff Show More