reorganize things and use some magic for making things better on different setups

master
an 2019-07-25 01:36:09 -04:00
parent a57fe7898f
commit 3909c474a1
27 changed files with 71 additions and 42 deletions

View File

@ -1,3 +1,6 @@
# vim: syntax=fish:
# launch tmux if we're in an interactive terminal emulator
if status is-interactive
and not status is-login
and test -z "$TMUX"
@ -5,12 +8,34 @@ if status is-interactive
exec tmux new-session
end
for f in (find ~/src/scripts/fish -type f -name '*.fish')
source $f
# bootstrapping information
switch (uname)
case Linux
set -gx CC clang
set -gx CXX clang++
set -Ux _agw_dir_bin ~/bin
set -Ux _agw_dir_rc ~/src/git-scripts
set -Ux _agw_dir_scripts ~/src/scripts
set -Ux _agw_dir_src ~/src
case Darwin
set -gx CMAKE_PREFIX_PATH /usr/local/opt/qt/
set -gx DISTCC_HOSTS "192.168.1.2,cpp"
set -gx fish_user_paths "/usr/local/opt/ruby/bin" $fish_user_paths
set -gx LDFLAGS "-L/usr/local/opt/ruby/lib"
set -gx CPPFLAGS "-I/usr/local/opt/ruby/include"
set -Ux _agw_dir_bin ~/Binaries
set -Ux _agw_dir_rc ~/Sources/scripts
set -Ux _agw_dir_scripts ~/Scripts
set -Ux _agw_dir_src ~/Sources
end
# execute scripts
if test -f ~/.cargo/env
source ~/.cargo/env
end
for f in (find $_agw_dir_scripts/fish -type f -name '*.fish')
source $f
end
## EOF

View File

@ -1,3 +1,4 @@
# vim: syntax=sh:
COMPRESSBZ2=(pbzip2 -c -f)
COMPRESSGZ=(pigz -c -f -n)
COMPRESSXZ=(xz -c -z - --threads=0)
@ -6,7 +7,7 @@ CFLAGS="-mtune=native -march=native -O3 -pipe -fstack-protector-strong -fno-plt
CXXFLAGS="${CFLAGS}"
MAKEFLAGS="-j12"
PACKAGER="Alison Watson <marrub@greyserv.net>"
PKGDEST="$HOME/bin/packages"
SRCDEST="$HOME/bin/sources"
PKGDEST="$_agw_dir_bin/packages"
SRCDEST="$_agw_dir_bin/sources"
CC=clang
CXX=clang++

View File

@ -1,4 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
# copy regular files
mkdir -p \

1
files
View File

@ -21,7 +21,6 @@ network/motsognir.conf /etc/motsognir.conf
network/mpd.conf ~/.config/mpd/mpd.conf
network/nginx.conf /etc/nginx/nginx.conf
network/resolv.conf /etc/resolv.conf
scripts ~/src/scripts/*
scripts/bookmark-get.ps1 /mnt/d/w2/Output/_dlscr/bookmark_get.ps1
system/61-xwiimote-custom.conf /etc/X11/xorg.conf.d/61-xwiimote-custom.conf
system/grub /etc/default/grub

View File

@ -71,6 +71,7 @@ meow.social
merveilles.town
monsterpit.net
mst3k.interlinked.me
nitro.horse
niu.moe
nulled.red
occult.camp

10
scripts/cmds/build-hosts Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env fish
# vim: syntax=fish:
cd $_agw_dir_src/hosts
git pull
sudo sh -c "cat $_agw_dir_rc/applications/hosts > /etc/hosts"
sudo sh -c "cat $_agw_dir_src/hosts/hosts >> /etc/hosts"
## EOF

View File

@ -1,9 +0,0 @@
#!/usr/bin/env fish
cd ~/src/hosts
git pull
sudo sh -c "cat $HOME/src/git-scripts/applications/hosts > /etc/hosts"
sudo sh -c "cat $HOME/src/hosts/hosts >> /etc/hosts"
## EOF

View File

@ -1,4 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
for f in (find . -type f)
set ftype (file -b --mime-type "$f")

View File

@ -1,4 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
set filter 'pan=mono|c0=0.5*FL+-0.5*FR,silenceremove=start_periods=1:detection=peak'

View File

@ -1,4 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
set filter 'pan=mono|c0=0.5*FL+-0.5*FR,silenceremove=start_periods=1:detection=peak'

View File

@ -1,4 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
function fail
echo "failed to process $f, exiting"

View File

@ -1,4 +1,5 @@
#!/usr/bin/env sh
# vim: syntax=sh:
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=arch

View File

@ -1,4 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
function pull_plugins
for plugin in ./*

View File

@ -1,4 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
while true
x11vnc -forever -scale 0.25

View File

@ -1,13 +0,0 @@
switch (uname)
case Linux
set -gx CC clang
set -gx CXX clang++
case Darwin
set -gx CMAKE_PREFIX_PATH /usr/local/opt/qt/
set -gx DISTCC_HOSTS "192.168.1.2,cpp"
set -gx fish_user_paths "/usr/local/opt/ruby/bin" $fish_user_paths
set -gx LDFLAGS "-L/usr/local/opt/ruby/lib"
set -gx CPPFLAGS "-I/usr/local/opt/ruby/include"
end
## EOF

View File

@ -10,7 +10,7 @@ function fish_greeting
set_color c50ed2
echo "Word of the moment: "(shuf -n1 /usr/share/dict/words) |
awk -f ~/src/scripts/text/mid.awk col=$COLUMNS
awk -f $_agw_dir_scripts/text/mid.awk col=$COLUMNS
set_color normal
end

View File

@ -8,7 +8,6 @@
(require racket/system)
(require racket/port)
(define home (find-system-path 'home-dir))
(define cwd current-directory)
(define (sys cmd)
@ -35,7 +34,7 @@
(with-output-to-string (λ () (sys (~a "git describe --tags " latest)))))
(define (build-pkg pkg opts)
(parameterize ([cwd (build-path home "bin")])
(parameterize ([cwd (string->path (getenv "_agw_dir_bin"))])
(let ([makepkg-args (~a "-isrLcCf --noconfirm"
(str-or-empty opts 'asdeps " --asdeps")
(str-or-empty opts 'force " -f")

View File

@ -1,4 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
function notify
notify-send -a sharenix -i dialog-information $argv

5
scripts/sharenix-cw Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
source "$_agw_dir_scripts/sharenix"
run_spectacle -a

View File

@ -1,4 +0,0 @@
#!/usr/bin/env fish
source "$HOME/src/scripts/sharenix.fish"
run_spectacle -a

5
scripts/sharenix-fs Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
source "$_agw_dir_scripts/sharenix"
run_spectacle -m

View File

@ -1,4 +0,0 @@
#!/usr/bin/env fish
source "$HOME/src/scripts/sharenix.fish"
run_spectacle -m

5
scripts/sharenix-sel Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env fish
# vim: syntax=fish:
source "$_agw_dir_scripts/sharenix"
run_spectacle -r

View File

@ -1,4 +0,0 @@
#!/usr/bin/env fish
source "$HOME/src/scripts/sharenix.fish"
run_spectacle -r

View File

@ -1,5 +1,7 @@
#!/usr/bin/env fish
source ../qemu-setup.fish
run-qemu i386 \
--drive file=image,format=qcow2,media=disk \
--drive file="$m/MS Windows/2000 Pro/5.00.2195.iso",media=cdrom,readonly \

View File

@ -1,5 +1,7 @@
#!/usr/bin/env fish
source ../qemu-setup.fish
run-qemu i386 \
--drive file=image,format=qcow2,media=disk \
--drive file="$m/Boot Disks/98SE.img",format=raw,if=floppy,readonly \