Browse Source

beeg changes

master
Andrew Zah 8 months ago
parent
commit
e4661fa9e6
  1. 2
      .zshrc
  2. 5
      README.md
  3. 0
      bin/backup/neptunemc.sh
  4. 0
      bin/backup/restic-music-b2.sh
  5. 0
      bin/backup/restic-music-fs.sh
  6. 0
      bin/discord-chromium.sh
  7. 53
      bin/displayman
  8. 0
      bin/fix-docker-cgroup
  9. 0
      bin/fix-origin.sh
  10. 10
      bin/fix-x-keymaps
  11. 2
      bin/generate-selfsigned-cert
  12. 0
      bin/kill-teams
  13. 2
      bin/layouts/000-xps-docked.sh
  14. 2
      bin/layouts/001-xps-undocked.sh
  15. 0
      bin/lock
  16. 0
      bin/lockscreens/pipes2
  17. 0
      bin/pipewire-setup.sh
  18. 0
      bin/pulse/scarlett2i2
  19. 0
      bin/screen-layout.sh
  20. 0
      bin/whipper.sh
  21. 20
      debian/doas-setup.sh
  22. 6
      debian/scripts/fan-rpm.sh
  23. 4
      debian/scripts/jack-post-stop.sh
  24. 3
      debian/scripts/jack-pre-startup.sh
  25. 6
      debian/scripts/jack-pre-stop.sh
  26. 11
      debian/scripts/jack-shutdown.sh
  27. 20
      debian/scripts/jack-start.sh
  28. 2
      debian/scripts/layout.sh
  29. 28
      debian/scripts/mailrun.sh
  30. 18
      debian/scripts/patchbay1.xml
  31. 11
      debian/scripts/whipper.sh
  32. 0
      linux/.Xmodmap
  33. 0
      linux/.Xresources
  34. 0
      linux/.fonts.conf
  35. 0
      linux/.gemrc
  36. 0
      linux/.gitconfig
  37. 0
      linux/.gitignore
  38. 5
      linux/.xinitrc
  39. 0
      linux/Xorg.conf
  40. 0
      linux/config/dunst/dunstrc
  41. 0
      linux/config/i3/config
  42. 0
      linux/config/i3/polybar.sh
  43. 0
      linux/config/less/termcap
  44. 0
      linux/config/mpd/mpd.conf
  45. 0
      linux/config/ncmpcpp/config.sample
  46. 0
      linux/config/nvim/.netrwhist
  47. 0
      linux/config/nvim/init.vim
  48. 0
      linux/config/polybar/laptop-config
  49. 0
      linux/config/rofi/config
  50. 0
      linux/pulse-audio-mods
  51. 0
      linux/pulse-default.pa.bak
  52. 45
      linux/setup.sh
  53. 1
      linux/udevadm/85-caldigit-dock.rules
  54. 0
      linux/x-no-turnoff-time
  55. 0
      systemd/org.freedesktop.Notifications.service
  56. 0
      systemd/syncthing-resume.service
  57. 0
      systemd/syncthing@.service
  58. 0
      zsh/aliases.zsh
  59. 0
      zsh/config.zsh
  60. 0
      zsh/functions.zsh
  61. 5
      zsh/path-exports-options.zsh
  62. 0
      zsh/secret-exports.zsh
  63. 0
      zsh/theme.zsh
  64. 0
      zsh/zsh-configuration.zsh

2
debian/.zshrc → .zshrc

@ -2,7 +2,7 @@
### sourcing ###
################
ZSH_SCRIPTS_DIR="$HOME/.dotfiles/debian/zsh"
ZSH_SCRIPTS_DIR="$HOME/.dotfiles/zsh"
source "$ZSH_SCRIPTS_DIR/aliases.zsh"
source "$ZSH_SCRIPTS_DIR/functions.zsh"

5
README.md

@ -1,6 +1,7 @@
My personal dotfiles + ZSH config.
My personal dotfiles and ZSH config.
If you've stumbled upon this, don't blindly copy and paste. This just serves as a backup and ideas repo. It's far better to carefully build your own personal setup!
If you've stumbled upon this, kindly don't blindly copy and paste.
This just serves as a backup and ideas repo. It's far better to carefully build your own personal setup!
-Andrew

0
debian/scripts/backup/neptunemc.sh → bin/backup/neptunemc.sh

0
debian/scripts/backup/restic-music-b2.sh → bin/backup/restic-music-b2.sh

0
debian/scripts/backup/restic-music-fs.sh → bin/backup/restic-music-fs.sh

0
debian/scripts/discord-chromium.sh → bin/discord-chromium.sh

53
bin/displayman

@ -0,0 +1,53 @@
#!/bin/sh
# original: taken from https://git.sr.ht/~charles/dotfiles/tree/master/item/overlay.full/bin/displayman
# license: https://git.sr.ht/~charles/dotfiles/tree/master/item/LICENSE
# see also: http://cdaniels.net/posts/sigusr.html
trigger_reconfigure () {
echo "($(date)) re-configuring displays... "
ls -1 "$HOME/.screenlayout"/*.sh | sort | while read -r f ; do
echo "considering screenlayout $f"
if [ ! -x "$f" ] ; then
echo "ignoring $f, it is not executable"
continue
fi
if "$f" ; then
echo "configuration successful"
break
else
echo "configuration failed"
fi
done
# do some sanity checking
$HOME/.dotfiles/debian/bin/x-fix-keymaps
xrdb "$HOME/.Xresources"
#numlockx on
#xkbset nullify lock
#if [ -e /dev/wsmouse ] ; then
# xinput set-prop /dev/wsmouse "WS Pointer Wheel Emulation" 1
# xinput set-prop /dev/wsmouse "WS Pointer Wheel Emulation Button" 2
#fi
}
if pgrep displayman | grep -qv $$ ; then
echo "displayman is already running" 1>&2
pkill -USR1 displayman
exit 1
fi
trap trigger_reconfigure USR1
trigger_reconfigure
while true ; do
sleep 1
done
# vim: set syntax=sh:

0
debian/scripts/fixes/cgroup-docker → bin/fix-docker-cgroup

0
debian/scripts/fix-origin.sh → bin/fix-origin.sh

10
bin/fix-x-keymaps

@ -0,0 +1,10 @@
#!/bin/sh
layout=$(xmodmap -pm)
# don't run xmodmap if the keys are already remapped...
if ! echo "$layout" | grep -q "Caps_Lock (0x25)"; then
xmodmap ~/.Xmodmap
fi
# vim: set syntax=sh:

2
debian/scripts/gen-testing-cert.sh → bin/generate-selfsigned-cert

@ -2,7 +2,7 @@
set -exo pipefail
FQDN="${1:-test.local}"
FQDN="${1:?Please specify a FQDN.}"
openssl req \
-x509 \

0
debian/scripts/fixes/fuck-teams.sh → bin/kill-teams

2
bin/layouts/000-xps-docked.sh

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DP-4 --off --output DP-3 --mode 2560x1440 --pos 1920x0 --rotate normal --output DP-1 --off --output eDP-1 --primary --mode 1920x1200 --pos 0x80 --rotate normal --output DP-2 --off

2
bin/layouts/001-xps-undocked.sh

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DP-4 --off --output DP-3 --off --output DP-1 --off --output eDP-1 --primary --mode 1920x1200 --pos 0x0 --rotate normal --output DP-2 --off

0
debian/scripts/lock → bin/lock

0
debian/scripts/pipes2.sh → bin/lockscreens/pipes2

0
debian/scripts/pipewire-setup.sh → bin/pipewire-setup.sh

0
debian/scripts/pulse-scarlett.sh → bin/pulse/scarlett2i2

0
debian/scripts/screen-layout.sh → bin/screen-layout.sh

0
debian/scripts/whipper-debug.sh → bin/whipper.sh

20
debian/doas-setup.sh

@ -1,20 +0,0 @@
#!/usr/bin/env bash
set -exo pipefail
#### doas
apt install \
build-essential \
make \
bison \
flex \
libpam0g-dev
[ -d /tmp/doas ] && rm -r /tmp/doas
git clone "https://github.com/slicer69/doas.git" /tmp/doas
cd /tmp/doas
make
make install
rm /usr/local/etc/doas.conf
echo "permit andrew as root" | tee -a /usr/local/etc/doas.conf

6
debian/scripts/fan-rpm.sh

@ -1,6 +0,0 @@
#!/bin/sh
speed1=$(sensors | grep "fan1" | awk '{printf $2}')
speed2=$(sensors | grep "fan3" | awk '{printf $2}')
echo "${speed1} | ${speed2} RPM"

4
debian/scripts/jack-post-stop.sh

@ -1,4 +0,0 @@
#!/bin/bash
pacmd suspend false
killall jackd

3
debian/scripts/jack-pre-startup.sh

@ -1,3 +0,0 @@
#!/bin/bash
pactl load-module module-jack-sink channels=2; pactl load-module module-jack-source channels=2; pacmd set-default-sink jack_out

6
debian/scripts/jack-pre-stop.sh

@ -1,6 +0,0 @@
#!/bin/bash
pactl unload-module module-jack-sink
pactl unload-module module-jack-source
sleep 3

11
debian/scripts/jack-shutdown.sh

@ -1,11 +0,0 @@
#!/bin/bash
SINK='alsa_input.usb-Focusrite_Scarlett_2i2_USB_Y84Q6XE0693B8F-00.analog-stereo'
SOURCE='alsa_output.usb-Focusrite_Scarlett_2i2_USB_Y84Q6XE0693B8F-00.analog-stereo.monitor'
jack_control stop
pacmd set-default-source "$SOURCE"
pacmd set-default-sink "$SINK"
pulseaudio -k

20
debian/scripts/jack-start.sh

@ -1,20 +0,0 @@
#!/bin/bash
set -ex
a2jmidid -e &
SINK='alsa_output.usb-Focusrite_Scarlett_2i2_USB_Y84Q6XE0693B8F-00.analog-stereo'
SOURCE='alsa_output.usb-Focusrite_Scarlett_2i2_USB_Y84Q6XE0693B8F-00.analog-stereo'
#pacmd suspend-sink $SINK true
#pacmd suspend-sink $SOURCE true
pacmd load-module module-jack-sink channels=2
pacmd load-module module-jack-source channels=2
### Make some devices default
pacmd set-default-sink jack_out
pacmd set-default-source jack_in
pacmd load-module module-loopback source=jack_in sink=alsa_output.usb-Schiit_Audio_Modi_Multibit-00.analog-stereo channels=2

2
debian/scripts/layout.sh

@ -1,2 +0,0 @@
#!/bin/sh
xrandr --output USB-C-0 --off --output HDMI-0 --mode 2560x1440 --pos 0x0 --rotate right --output DP-5 --off --output DP-4 --primary --mode 2560x1440 --pos 1440x560 --rotate normal --output DP-3 --off --output DP-2 --off --output DP-1 --off --output DP-0 --off

28
debian/scripts/mailrun.sh

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Check every ten seconds if the process identified as $1 is still
# running. After 5 checks (~60 seconds), kill it. Return non-zero to
# indicate something was killed.
monitor() {
local pid=$1 i=0
while ps $pid &>/dev/null; do
if (( i++ > 5 )); then
echo "Max checks reached. Sending SIGKILL to ${pid}..." >&2
kill -9 $pid; return 1
fi
sleep 10
done
return 0
}
read -r pid < ~/.offlineimap/pid
if ps $pid &>/dev/null; then
echo "Process $pid already running. Exiting..." >&2
exit 1
fi
offlineimap -c /config/.offlineimaprc -o -u quiet & monitor $!

18
debian/scripts/patchbay1.xml

@ -1,18 +0,0 @@
<!DOCTYPE patchbay>
<patchbay version="0.6.3" name="patchbay1">
<output-sockets>
<socket type="jack-audio" client="PulseAudio JACK Sink" exclusive="off" name="PulseAudio JACK Sink 1">
<plug>front-left</plug>
<plug>front-right</plug>
</socket>
</output-sockets>
<input-sockets>
<socket type="jack-audio" client="system" exclusive="off" name="system 1">
<plug>playback_1</plug>
<plug>playback_2</plug>
</socket>
</input-sockets>
<slots/>
<cables/>
</patchbay>

11
debian/scripts/whipper.sh

@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -euxo pipefail
docker run \
-ti \
--rm \
--device=/dev/cdrom \
--mount "type=bind,source=${HOME}/.config/whipper,target=/home/worker/.config/whipper" \
--mount "type=bind,source=${HOME}/rips/output,target=/output" \
whipperteam/whipper "$@"

0
debian/.Xmodmap → linux/.Xmodmap

0
debian/.Xresources → linux/.Xresources

0
debian/.fonts.conf → linux/.fonts.conf

0
debian/.gemrc → linux/.gemrc

0
debian/.gitconfig → linux/.gitconfig

0
debian/.gitignore → linux/.gitignore

5
debian/.xinitrc → linux/.xinitrc

@ -13,7 +13,7 @@ fcitx
### locking ###
###############
sh "$HOME/.screenlayout/layout.sh"
sh "$HOME/.screenlayout/001-xps-undocked.sh"
xautolock -time 15 -locker "lock" 2>&1 &
#############
@ -31,4 +31,7 @@ dunst > /dev/null &
blueman-applet > /dev/null &
dbus-launch --sh-syntax --exit-with-session > /dev/null
# for caldigit dock
$HOME/.dotfiles/debian/bin/displayman > /tmp/displayman.txt &
exec i3

0
debian/Xorg.conf → linux/Xorg.conf

0
debian/config/dunst/dunstrc → linux/config/dunst/dunstrc

0
debian/config/i3/config → linux/config/i3/config

0
debian/config/i3/polybar.sh → linux/config/i3/polybar.sh

0
debian/config/less/termcap → linux/config/less/termcap

0
debian/config/mpd/mpd.conf → linux/config/mpd/mpd.conf

0
debian/config/ncmpcpp/config.sample → linux/config/ncmpcpp/config.sample

0
debian/config/nvim/.netrwhist → linux/config/nvim/.netrwhist

0
debian/config/nvim/init.vim → linux/config/nvim/init.vim

0
debian/config/polybar/laptop-config → linux/config/polybar/laptop-config

0
debian/config/rofi/config → linux/config/rofi/config

0
debian/pulse-audio-mods → linux/pulse-audio-mods

0
debian/pulse-default.pa.bak → linux/pulse-default.pa.bak

45
debian/setup.sh → linux/setup.sh

@ -2,6 +2,20 @@
set -exo pipefail
#####################
### FUNCTION DEFS ###
#####################
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" \
| grep '"tag_name":' \
| sed -E 's/.*"([^"]+)".*/\1/'
}
############
### OPTS ###
############
DIST=''
case "$1" in
"debian")
@ -23,6 +37,10 @@ while getopts "F" opt; do
esac
done
############
### VARS ###
############
BASE_DOTFILES_DIR="$HOME/.dotfiles"
DOTFILES_DIR="$BASE_DOTFILES_DIR/$DIST"
CONFIG_DIR="$HOME/.config"
@ -38,6 +56,10 @@ CONFIG_DIR="$HOME/.config"
# * libdvdcss - see ffmpeg website for download
# * teams - see microsoft website (ugh)
####################
### APPLICATIONS ###
####################
sudo apt update -y
sudo apt install -y \
@ -159,6 +181,10 @@ if [ ! -z "$FULL_INSTALL" ]; then
zsh
fi
###################################
### Symlink files + create dirs ###
###################################
mkdir -p "$HOME/programming"
mkdir -p "$HOME/work"
@ -218,9 +244,9 @@ ln -s "$DOTFILES_DIR/config/i3/config" "$CONFIG_DIR/i3/config"
if [ ! -f "$CONFIG_DIR/i3/polybar.sh" ]; then
ln -s "$DOTFILES_DIR/config/i3/polybar.sh" "$CONFIG_DIR/i3/polybar.sh"
echo "Don't forget to symlink which polybar-config you want to use..."
fi
if [ ! -f "$CONFIG_DIR/nvim/init.vim" ]; then
ln -s "$DOTFILES_DIR/config/nvim/init.vim" "$CONFIG_DIR/nvim/init.vim"
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
@ -228,7 +254,9 @@ if [ ! -f "$CONFIG_DIR/nvim/init.vim" ]; then
nvim -c ":Silent ':PlugInstall'"
fi
###### install programs
#########################
### Install utilities ###
#########################
if [ ! -f "/usr/local/bin/lock" ]; then
sudo ln -s "$DOTFILES_DIR/scripts/lock" "/usr/local/bin/lock"
@ -318,9 +346,16 @@ if [ ! -f "$HOME/.cargo/bin/fd" ]; then
cargo install -f fd-find
fi
if [ ! -f "$CONFIG_DIR/polybar/config" ]; then
echo "Don't forget to copy/paste a polybar config."
if [ ! -f "/usr/local/bin/hadolint" ]; then
ver=$(get_latest_release hadolint/hadolint)
url="https://github.com/hadolint/hadolint/releases/download/$ver/hadolint-Linux-x86_64"
sudo curl -L "$url" -o /usr/local/bin/hadolint
sudo chmod +x /usr/local/bin/hadolint
fi
##############
### FINISH ###
##############
echo "complete!"
echo "Don't forget to symlink which polybar-config you want to use..."

1
linux/udevadm/85-caldigit-dock.rules

@ -0,0 +1 @@
SUBSYSTEM=="input", ACTION=="remove|add", ENV{ID_VENDOR_ID}=="2188" RUN+="/usr/bin/pkill -USR1 displayman"

0
debian/x-no-turnoff-time → linux/x-no-turnoff-time

0
debian/services/org.freedesktop.Notifications.service → systemd/org.freedesktop.Notifications.service

0
debian/services/syncthing-resume.service → systemd/syncthing-resume.service

0
debian/services/syncthing@.service → systemd/syncthing@.service

0
debian/zsh/aliases.zsh → zsh/aliases.zsh

0
debian/zsh/config.zsh → zsh/config.zsh

0
debian/zsh/functions.zsh → zsh/functions.zsh

5
debian/zsh/path-exports-options.zsh → zsh/path-exports-options.zsh

@ -2,8 +2,8 @@
### GENERAL SYSTEM CONFIG ###
#############################
export LANG='en_US.UTF-8';
export LC_ALL='en_US.UTF-8';
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
export EDITOR='nvim'
export VISUAL="$EDITOR"
@ -41,6 +41,7 @@ export FZF_DEFAULT_OPTS="--ansi"
# currently: joplin, bitwarden, carla, cubiomes-viewer,
# jetbrains, sauerbraten, slippi, winbox
export PATH="$HOME/opt/bin:$PATH"
export PATH="$HOME/.dotfiles/bin:$PATH"
# python binaries ?
export PATH="$HOME/.local/bin:$PATH"

0
zsh/secret-exports.zsh

0
debian/zsh/theme.zsh → zsh/theme.zsh

0
debian/zsh/zsh-configuration.zsh → zsh/zsh-configuration.zsh

Loading…
Cancel
Save