--- /dev/null
+APT::AutoRemove::RecommendsImportant "false";
+APT::AutoRemove::SuggestsImportant "false";
+APT::Install-Recommends "false";
+APT::Install-Suggests "false";
--- /dev/null
+deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
+deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
+deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
+deb http://ftp.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
--- /dev/null
+REPLACE_WITH_FQDN {
+ root * /var/www/dump
+ basicauth /private/* {
+ user REPLACE_WITH_HASH
+ }
+ file_server browse
+}
--- /dev/null
+[Unit]
+Description=catgirl in tmux Session
+After=network.target
+
+[Service]
+Type=forking
+User=plom
+ExecStart=/usr/bin/tmux new-session -d -s catgirl_tmux /usr/bin/catgirl libera
+ExecStop=/usr/bin/tmux kill-session -t catgirl_tmux
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
+
--- /dev/null
+[Unit]
+Description=Run script for encrypting catgirl logs.
+
+[Service]
+Type=oneshot
+User=plom
+ExecStart=/bin/sh -cl 'encrypt_catgirl_logs'
+
--- /dev/null
+[Unit]
+Description=Run service for encrypting catgirl logs once every day.
+
+[Timer]
+OnCalendar=*-*-* 01:00:00
+
+[Install]
+WantedBy=timers.target
+
--- /dev/null
+[Unit]
+Description=rtorrent session
+After=network.target
+
+[Service]
+Type=simple
+User=plom
+Group=plom
+WorkingDirectory=/home/plom
+ExecStartPre=-/bin/rm -f /home/plom/session/rtorrent.lock
+ExecStart=/usr/bin/tmux new-session -d -s rtorrent_tmux /usr/bin/rtorrent
+ExecStop=/usr/bin/tmux kill-session -t rtorrent_tmux
+Restart=on-failure
+RestartSec=3
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+#!/usr/sbin/nft -f
+
+flush ruleset
+
+table inet filter {
+ chain input {
+ type filter \
+ hook input \
+ priority 0;
+ policy drop;
+ iif lo \
+ accept \
+ comment "accept localhost traffic";
+ ct state invalid \
+ drop \
+ comment "drop invalid connections";
+ ct state established, related \
+ accept \
+ comment "accept traffic originated from us";
+ tcp dport 22 \
+ accept \
+ comment "accept SSH on default port";
+ tcp dport 80 \
+ accept \
+ comment "accept HTTP on default port";
+ tcp dport 443 \
+ accept \
+ comment "accept HTTPS on default port";
+ ip protocol icmp \
+ icmp type echo-request \
+ accept \
+ comment "accept ICMP for pinging";
+ }
+ chain forward {
+ type filter \
+ hook forward \
+ priority 0;
+ policy drop;
+ }
+ chain output {
+ type filter \
+ hook output \
+ priority 0;
+ policy accept;
+ }
+}
--- /dev/null
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options override the
+# default value.
+
+Include /etc/ssh/sshd_config.d/*.conf
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+#HostKey /etc/ssh/ssh_host_ed25519_key
+
+# Ciphers and keying
+#RekeyLimit default none
+
+# Logging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin prohibit-password
+PermitRootLogin no # plomlompom's security rule
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#PubkeyAuthentication yes
+
+# Expect .ssh/authorized_keys2 to be disregarded by default in future.
+#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
+
+#AuthorizedPrincipalsFile none
+
+#AuthorizedKeysCommand none
+#AuthorizedKeysCommandUser nobody
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+PasswordAuthentication no
+#PermitEmptyPasswords no
+
+# Change to yes to enable challenge-response passwords (beware issues with
+# some PAM modules and threads)
+KbdInteractiveAuthentication no
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+#GSSAPIStrictAcceptorCheck yes
+#GSSAPIKeyExchange no
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the KbdInteractiveAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via KbdInteractiveAuthentication may bypass
+# the setting of "PermitRootLogin prohibit-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and KbdInteractiveAuthentication to 'no'.
+UsePAM yes
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+X11Forwarding yes
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PermitTTY yes
+PrintMotd no
+#PrintLastLog yes
+#TCPKeepAlive yes
+#PermitUserEnvironment no
+#Compression delayed
+ClientAliveInterval 15
+#ClientAliveCountMax 3
+#UseDNS no
+#PidFile /run/sshd.pid
+#MaxStartups 10:30:100
+#PermitTunnel no
+#ChrootDirectory none
+#VersionAddendum none
+
+# no default banner path
+#Banner none
+
+# Allow client to pass locale environment variables
+AcceptEnv LANG LC_*
+
+# override default of no subsystems
+Subsystem sftp /usr/lib/openssh/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# PermitTTY no
+# ForceCommand cvs server
--- /dev/null
+# ~/.bash_profile, if it exists, is sourced by Bash for all login shells,
+# instead of ~/.profile
+#
+# While I prefer using ~/.profile, I provide ~/.bash_profile because some
+# applications write to it even if it does not previously exist, which
+# deactivates ~/.profile if not explicitly sourced from within here.
+. "${HOME}/.profile"
+
--- /dev/null
+# ~/.bashrc is sourced by Bash for any interactive shells.
+
+# Use vim as default editor for anything.
+export VISUAL=vim
+export EDITOR="${VISUAL}"
+
+# Some helpful aliases.
+alias curlpost='curl -H "Content-Type: application/json" -X POST'
+alias ls="ls --color=auto"
+
+# Colored prompt with username, hostname, date/time, directory.
+COLOR_NUMBER=7 # default to white
+COLOR_NUMBER_FILE="${HOME}/.shell_prompt_color"
+[ -f "${COLOR_NUMBER_FILE}" ] && COLOR_NUMBER=`cat "${COLOR_NUMBER_FILE}"`
+tput_color="$(tput setaf "${COLOR_NUMBER}")$(tput bold)"
+tput_reset="$(tput sgr0)"
+# Bash confuses the line length when not told to not count escape sequences.
+if [ -n "${BASH}" ]; then
+ tput_color="\[$tput_color\]"
+ tput_reset="\[$tput_reset\]"
+fi
+PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $(whoami)@$(hostname):"\$\(pwd\)"]$ ${tput_reset}"
+PS2="${tput_color}> ${tput_reset}"
+PS3="${tput_color}select: ${tput_reset}"
+PS4="${tput_color}+ ${tput_reset}"
+
+# include others
+. "${HOME}/.plomlib/file_dot_variants"
+file_dot_variants "${HOME}/\.bashrc"
--- /dev/null
+../../.plomlib
\ No newline at end of file
--- /dev/null
+file_dot_variants() {
+ for FILE in ${1}\.*; do
+ if [ -f "${FILE}" ]; then
+ . "${FILE}"
+ fi
+ done
+}
--- /dev/null
+# ~/.profile is sourced on login, with its exports inherited by all processes
+# started below it under the same login, i.e. it has a very deep effect, but
+# changes to it only apply to new login sessions (compare to e.g. ~/.bashrc
+# which by is sourced anew for every new interactive Bash, login or not).
+#
+# Notably this makes ~/.profile (outside its optional sourcing of ~/.bashrc)
+# useful for providing environment variables to non-shell applications started
+# within a login session.
+PATH_BASHRC="${HOME}/.bashrc"
+[ -n "${BASH_VERSION}" -a -f "${PATH_BASHRC}" ] && . "${PATH_BASHRC}"
+
+PATH_LOCAL_BIN="${HOME}/.local/bin"
+[ -d "${PATH_LOCAL_BIN}" ] && PATH="${PATH_LOCAL_BIN}:${PATH}"
+
+# local changes to this shell variable otherwise will get lost
+export PATH
+
+# include others
+. "${HOME}/.plomlib/file_dot_variants"
+file_dot_variants "${HOME}/\.profile"
--- /dev/null
+host = irc.libera.chat
+join = #plomtest
+sasl-plain = plomtest:REPLACE_WITH_IRC_PASSWORD
+log
--- /dev/null
+#!/bin/sh
+set -e
+cd $(dirname "$0")
+. lib/expect_n_args
+
+expect_n_args 0 0 ''
+
+PATH_LOGS="${HOME}/.local/share/log"
+PATH_ENCRYPTED_LOGS="${HOME}/logs_encrypted"
+PATH_ENCRYPTION_KEY="${HOME}/.plomlib/encrypt_with.pub"
+
+TODAY="$(date +'%Y-%m-%d')"
+set +e
+PATHS_LOGFILES="$(ls ${PATH_LOGS}/*/*/*.log 2> /dev/null)"
+set -e
+if [ -z "${PATHS_LOGFILES}" ]; then
+ echo "No log files present, so nothing to do."
+ exit 0
+fi
+for _PATH_LOGFILE in ${PATHS_LOGFILES}; do
+ _FILENAME=$(basename "${_PATH_LOGFILE}")
+ _DATE_OF_LOG=$(echo "${_FILENAME}" | cut -d'.' -f1)
+ _DIRNAME=$(dirname "${_PATH_LOGFILE}")
+ _WINDOW_OF_LOG=$(basename "${_DIRNAME}")
+ _DIRNAME=$(dirname "${_DIRNAME}")
+ _NETWORK_OF_LOG=$(basename "${_DIRNAME}")
+ if ! [ "${_DATE_OF_LOG}" '<' "${TODAY}" ]; then
+ echo "${_PATH_LOGFILE} too young, ignoring."
+ else
+ echo "${_PATH_LOGFILE}: encrypting to ${PATH_ENCRYPTED_LOGS}, deleting original …"
+ _PATH_TARGET="${PATH_ENCRYPTED_LOGS}/${_NETWORK_OF_LOG}/${_WINDOW_OF_LOG}"
+ mkdir -p "${_PATH_TARGET}"
+ age -R "${PATH_ENCRYPTION_KEY}" "${_PATH_LOGFILE}" > "${_PATH_TARGET}/${_FILENAME}.age"
+ rm "${_PATH_LOGFILE}"
+ fi
+done
--- /dev/null
+../../../scripts/lib/abort
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/constants_user
\ No newline at end of file
--- /dev/null
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAoMa288S7iHnw8lEaSQTTK8pSJwBEWCCyPJF7zewbXrgGoHHXAYD88AJFrULBivTk6HIVpx+Dc0fdhheXr3yl8XGo57l7XTVd1xz2USxaPXfWHEz5mAtJVM4MJ7MjQ5eNkCgrJaOWZ1SLnSS/+dF3KGYs1BK7piIKFk/5AKQmX+0R3STxNlLlEOWG03224409VNliMKFhbfjszPJyaKDFKt4tnG12YgEZ0Zx2LbAfJZzFdkxb2qzcdb09vRHOEZgtFPszohVETaBtocl3mEPHRjwXzhE6fz/jzMHc+JZDViQONobvgJ7weVU7dnv8zmiobFuyOEb4uyAE1yugvBypPQ==
--- /dev/null
+../../../scripts/lib/expect_n_args
\ No newline at end of file
--- /dev/null
+# where to write downloads into
+directory.default.set = ~/downloads
+
+# rtorrent's memory
+session.path.set = ~/session
+
+# security and paranoia
+dht.mode.set = disable
+protocol.pex.set = no
+protocol.encryption.set = require,require_RC4,allow_incoming,try_outgoing
+
--- /dev/null
+# needed for torrenting
+rtorrent
+# needed for torrenting session
+tmux
+#
--- /dev/null
+/usr/share/zoneinfo/Europe/Berlin
+localtime
--- /dev/null
+APT::AutoRemove::RecommendsImportant "false";
+APT::AutoRemove::SuggestsImportant "false";
+APT::Install-Recommends "false";
+APT::Install-Suggests "false";
--- /dev/null
+deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
+deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
+deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
+deb http://ftp.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
--- /dev/null
+# ~/.bash_profile, if it exists, is sourced by Bash for all login shells,
+# instead of ~/.profile
+#
+# While I prefer using ~/.profile, I provide ~/.bash_profile because some
+# applications write to it even if it does not previously exist, which
+# deactivates ~/.profile if not explicitly sourced from within here.
+. "${HOME}/.profile"
+
--- /dev/null
+# ~/.bashrc is sourced by Bash for any interactive shells.
+
+# Use vim as default editor for anything.
+export VISUAL=vim
+export EDITOR="${VISUAL}"
+
+# Some helpful aliases.
+alias curlpost='curl -H "Content-Type: application/json" -X POST'
+alias ls="ls --color=auto"
+
+# Colored prompt with username, hostname, date/time, directory.
+COLOR_NUMBER=7 # default to white
+COLOR_NUMBER_FILE="${HOME}/.shell_prompt_color"
+[ -f "${COLOR_NUMBER_FILE}" ] && COLOR_NUMBER=`cat "${COLOR_NUMBER_FILE}"`
+tput_color="$(tput setaf "${COLOR_NUMBER}")$(tput bold)"
+tput_reset="$(tput sgr0)"
+# Bash confuses the line length when not told to not count escape sequences.
+if [ -n "${BASH}" ]; then
+ tput_color="\[$tput_color\]"
+ tput_reset="\[$tput_reset\]"
+fi
+PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $(whoami)@$(hostname):"\$\(pwd\)"]$ ${tput_reset}"
+PS2="${tput_color}> ${tput_reset}"
+PS3="${tput_color}select: ${tput_reset}"
+PS4="${tput_color}+ ${tput_reset}"
+
+# include others
+. "${HOME}/.plomlib/file_dot_variants"
+file_dot_variants "${HOME}/\.bashrc"
--- /dev/null
+../../.plomlib
+lib
--- /dev/null
+file_dot_variants() {
+ for FILE in ${1}\.*; do
+ if [ -f "${FILE}" ]; then
+ . "${FILE}"
+ fi
+ done
+}
--- /dev/null
+# ~/.profile is sourced on login, with its exports inherited by all processes
+# started below it under the same login, i.e. it has a very deep effect, but
+# changes to it only apply to new login sessions (compare to e.g. ~/.bashrc
+# which by is sourced anew for every new interactive Bash, login or not).
+#
+# Notably this makes ~/.profile (outside its optional sourcing of ~/.bashrc)
+# useful for providing environment variables to non-shell applications started
+# within a login session.
+PATH_BASHRC="${HOME}/.bashrc"
+[ -n "${BASH_VERSION}" -a -f "${PATH_BASHRC}" ] && . "${PATH_BASHRC}"
+
+PATH_LOCAL_BIN="${HOME}/.local/bin"
+[ -d "${PATH_LOCAL_BIN}" ] && PATH="${PATH_LOCAL_BIN}:${PATH}"
+
+# local changes to this shell variable otherwise will get lost
+export PATH
+
+# include others
+. "${HOME}/.plomlib/file_dot_variants"
+file_dot_variants "${HOME}/\.profile"
--- /dev/null
+../home/plom/.bash_profile
\ No newline at end of file
--- /dev/null
+../home/plom/.bashrc
\ No newline at end of file
--- /dev/null
+../home/plom/.local
\ No newline at end of file
--- /dev/null
+../home/plom/.plomlib
\ No newline at end of file
--- /dev/null
+../home/plom/.profile
\ No newline at end of file
--- /dev/null
+REPLACE_WITH_FQDN {
+ root * /var/www/dump
+ basicauth /private/* {
+ user REPLACE_WITH_HASH
+ }
+ file_server browse
+}
--- /dev/null
+[Unit]
+Description=catgirl in tmux Session
+After=network.target
+
+[Service]
+Type=forking
+User=plom
+ExecStart=/usr/bin/tmux new-session -d -s catgirl_tmux /usr/bin/catgirl libera
+ExecStop=/usr/bin/tmux kill-session -t catgirl_tmux
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
+
--- /dev/null
+[Unit]
+Description=Run script for encrypting catgirl logs.
+
+[Service]
+Type=oneshot
+User=plom
+ExecStart=/bin/sh -cl 'encrypt_catgirl_logs'
+
--- /dev/null
+[Unit]
+Description=Run service for encrypting catgirl logs once every day.
+
+[Timer]
+OnCalendar=*-*-* 01:00:00
+
+[Install]
+WantedBy=timers.target
+
--- /dev/null
+host = irc.libera.chat
+join = #plomtest
+sasl-plain = plomtest:REPLACE_WITH_IRC_PASSWORD
+log
--- /dev/null
+#!/bin/sh
+set -e
+cd $(dirname "$0")
+. lib/expect_n_args
+
+expect_n_args 0 0 ''
+
+PATH_LOGS="${HOME}/.local/share/log"
+PATH_ENCRYPTED_LOGS="${HOME}/logs_encrypted"
+PATH_ENCRYPTION_KEY="${HOME}/.plomlib/encrypt_with.pub"
+
+TODAY="$(date +'%Y-%m-%d')"
+set +e
+PATHS_LOGFILES="$(ls ${PATH_LOGS}/*/*/*.log 2> /dev/null)"
+set -e
+if [ -z "${PATHS_LOGFILES}" ]; then
+ echo "No log files present, so nothing to do."
+ exit 0
+fi
+for _PATH_LOGFILE in ${PATHS_LOGFILES}; do
+ _FILENAME=$(basename "${_PATH_LOGFILE}")
+ _DATE_OF_LOG=$(echo "${_FILENAME}" | cut -d'.' -f1)
+ _DIRNAME=$(dirname "${_PATH_LOGFILE}")
+ _WINDOW_OF_LOG=$(basename "${_DIRNAME}")
+ _DIRNAME=$(dirname "${_DIRNAME}")
+ _NETWORK_OF_LOG=$(basename "${_DIRNAME}")
+ if ! [ "${_DATE_OF_LOG}" '<' "${TODAY}" ]; then
+ echo "${_PATH_LOGFILE} too young, ignoring."
+ else
+ echo "${_PATH_LOGFILE}: encrypting to ${PATH_ENCRYPTED_LOGS}, deleting original …"
+ _PATH_TARGET="${PATH_ENCRYPTED_LOGS}/${_NETWORK_OF_LOG}/${_WINDOW_OF_LOG}"
+ mkdir -p "${_PATH_TARGET}"
+ age -R "${PATH_ENCRYPTION_KEY}" "${_PATH_LOGFILE}" > "${_PATH_TARGET}/${_FILENAME}.age"
+ rm "${_PATH_LOGFILE}"
+ fi
+done
--- /dev/null
+../../../../../scripts/lib/abort
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/constants_user
\ No newline at end of file
--- /dev/null
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAoMa288S7iHnw8lEaSQTTK8pSJwBEWCCyPJF7zewbXrgGoHHXAYD88AJFrULBivTk6HIVpx+Dc0fdhheXr3yl8XGo57l7XTVd1xz2USxaPXfWHEz5mAtJVM4MJ7MjQ5eNkCgrJaOWZ1SLnSS/+dF3KGYs1BK7piIKFk/5AKQmX+0R3STxNlLlEOWG03224409VNliMKFhbfjszPJyaKDFKt4tnG12YgEZ0Zx2LbAfJZzFdkxb2qzcdb09vRHOEZgtFPszohVETaBtocl3mEPHRjwXzhE6fz/jzMHc+JZDViQONobvgJ7weVU7dnv8zmiobFuyOEb4uyAE1yugvBypPQ==
--- /dev/null
+../../../../../scripts/lib/expect_n_args
\ No newline at end of file
--- /dev/null
+[Unit]
+Description=rtorrent session
+After=network.target
+
+[Service]
+Type=simple
+User=plom
+Group=plom
+WorkingDirectory=/home/plom
+ExecStartPre=-/bin/rm -f /home/plom/session/rtorrent.lock
+ExecStart=/usr/bin/tmux new-session -d -s rtorrent_tmux /usr/bin/rtorrent
+ExecStop=/usr/bin/tmux kill-session -t rtorrent_tmux
+Restart=on-failure
+RestartSec=3
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+#!/usr/sbin/nft -f
+
+flush ruleset
+
+table inet filter {
+ chain input {
+ type filter \
+ hook input \
+ priority 0;
+ policy drop;
+ iif lo \
+ accept \
+ comment "accept localhost traffic";
+ ct state invalid \
+ drop \
+ comment "drop invalid connections";
+ ct state established, related \
+ accept \
+ comment "accept traffic originated from us";
+ tcp dport 22 \
+ accept \
+ comment "accept SSH on default port";
+ tcp dport 80 \
+ accept \
+ comment "accept HTTP on default port";
+ tcp dport 443 \
+ accept \
+ comment "accept HTTPS on default port";
+ ip protocol icmp \
+ icmp type echo-request \
+ accept \
+ comment "accept ICMP for pinging";
+ }
+ chain forward {
+ type filter \
+ hook forward \
+ priority 0;
+ policy drop;
+ }
+ chain output {
+ type filter \
+ hook output \
+ priority 0;
+ policy accept;
+ }
+}
--- /dev/null
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options override the
+# default value.
+
+Include /etc/ssh/sshd_config.d/*.conf
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+#HostKey /etc/ssh/ssh_host_ed25519_key
+
+# Ciphers and keying
+#RekeyLimit default none
+
+# Logging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin prohibit-password
+PermitRootLogin no # plomlompom's security rule
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#PubkeyAuthentication yes
+
+# Expect .ssh/authorized_keys2 to be disregarded by default in future.
+#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
+
+#AuthorizedPrincipalsFile none
+
+#AuthorizedKeysCommand none
+#AuthorizedKeysCommandUser nobody
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+PasswordAuthentication no
+#PermitEmptyPasswords no
+
+# Change to yes to enable challenge-response passwords (beware issues with
+# some PAM modules and threads)
+KbdInteractiveAuthentication no
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+#GSSAPIStrictAcceptorCheck yes
+#GSSAPIKeyExchange no
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the KbdInteractiveAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via KbdInteractiveAuthentication may bypass
+# the setting of "PermitRootLogin prohibit-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and KbdInteractiveAuthentication to 'no'.
+UsePAM yes
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+X11Forwarding yes
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PermitTTY yes
+PrintMotd no
+#PrintLastLog yes
+#TCPKeepAlive yes
+#PermitUserEnvironment no
+#Compression delayed
+ClientAliveInterval 15
+#ClientAliveCountMax 3
+#UseDNS no
+#PidFile /run/sshd.pid
+#MaxStartups 10:30:100
+#PermitTunnel no
+#ChrootDirectory none
+#VersionAddendum none
+
+# no default banner path
+#Banner none
+
+# Allow client to pass locale environment variables
+AcceptEnv LANG LC_*
+
+# override default of no subsystems
+Subsystem sftp /usr/lib/openssh/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# PermitTTY no
+# ForceCommand cvs server
+++ /dev/null
-APT::AutoRemove::RecommendsImportant "false";
-APT::AutoRemove::SuggestsImportant "false";
-APT::Install-Recommends "false";
-APT::Install-Suggests "false";
+++ /dev/null
-deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
-deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
-deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
-deb http://ftp.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
+++ /dev/null
-REPLACE_WITH_FQDN {
- root * /var/www/dump
- basicauth /private/* {
- user REPLACE_WITH_HASH
- }
- file_server browse
-}
+++ /dev/null
-[Unit]
-Description=catgirl in tmux Session
-After=network.target
-
-[Service]
-Type=forking
-User=plom
-ExecStart=/usr/bin/tmux new-session -d -s catgirl_tmux /usr/bin/catgirl libera
-ExecStop=/usr/bin/tmux kill-session -t catgirl_tmux
-Restart=always
-RestartSec=10
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-[Unit]
-Description=Run script for encrypting catgirl logs.
-
-[Service]
-Type=oneshot
-User=plom
-ExecStart=/bin/sh -cl 'encrypt_catgirl_logs'
-
+++ /dev/null
-[Unit]
-Description=Run service for encrypting catgirl logs once every day.
-
-[Timer]
-OnCalendar=*-*-* 01:00:00
-
-[Install]
-WantedBy=timers.target
-
+++ /dev/null
-#!/usr/sbin/nft -f
-
-flush ruleset
-
-table inet filter {
- chain input {
- type filter \
- hook input \
- priority 0;
- policy drop;
- iif lo \
- accept \
- comment "accept localhost traffic";
- ct state invalid \
- drop \
- comment "drop invalid connections";
- ct state established, related \
- accept \
- comment "accept traffic originated from us";
- tcp dport 22 \
- accept \
- comment "accept SSH on default port";
- tcp dport 80 \
- accept \
- comment "accept HTTP on default port";
- tcp dport 443 \
- accept \
- comment "accept HTTPS on default port";
- ip protocol icmp \
- icmp type echo-request \
- accept \
- comment "accept ICMP for pinging";
- }
- chain forward {
- type filter \
- hook forward \
- priority 0;
- policy drop;
- }
- chain output {
- type filter \
- hook output \
- priority 0;
- policy accept;
- }
-}
+++ /dev/null
-
-# This is the sshd server system-wide configuration file. See
-# sshd_config(5) for more information.
-
-# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
-
-# The strategy used for options in the default sshd_config shipped with
-# OpenSSH is to specify options with their default value where
-# possible, but leave them commented. Uncommented options override the
-# default value.
-
-Include /etc/ssh/sshd_config.d/*.conf
-
-#Port 22
-#AddressFamily any
-#ListenAddress 0.0.0.0
-#ListenAddress ::
-
-#HostKey /etc/ssh/ssh_host_rsa_key
-#HostKey /etc/ssh/ssh_host_ecdsa_key
-#HostKey /etc/ssh/ssh_host_ed25519_key
-
-# Ciphers and keying
-#RekeyLimit default none
-
-# Logging
-#SyslogFacility AUTH
-#LogLevel INFO
-
-# Authentication:
-
-#LoginGraceTime 2m
-#PermitRootLogin prohibit-password
-PermitRootLogin no # plomlompom's security rule
-#StrictModes yes
-#MaxAuthTries 6
-#MaxSessions 10
-
-#PubkeyAuthentication yes
-
-# Expect .ssh/authorized_keys2 to be disregarded by default in future.
-#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
-
-#AuthorizedPrincipalsFile none
-
-#AuthorizedKeysCommand none
-#AuthorizedKeysCommandUser nobody
-
-# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
-#HostbasedAuthentication no
-# Change to yes if you don't trust ~/.ssh/known_hosts for
-# HostbasedAuthentication
-#IgnoreUserKnownHosts no
-# Don't read the user's ~/.rhosts and ~/.shosts files
-#IgnoreRhosts yes
-
-# To disable tunneled clear text passwords, change to no here!
-PasswordAuthentication no
-#PermitEmptyPasswords no
-
-# Change to yes to enable challenge-response passwords (beware issues with
-# some PAM modules and threads)
-KbdInteractiveAuthentication no
-
-# Kerberos options
-#KerberosAuthentication no
-#KerberosOrLocalPasswd yes
-#KerberosTicketCleanup yes
-#KerberosGetAFSToken no
-
-# GSSAPI options
-#GSSAPIAuthentication no
-#GSSAPICleanupCredentials yes
-#GSSAPIStrictAcceptorCheck yes
-#GSSAPIKeyExchange no
-
-# Set this to 'yes' to enable PAM authentication, account processing,
-# and session processing. If this is enabled, PAM authentication will
-# be allowed through the KbdInteractiveAuthentication and
-# PasswordAuthentication. Depending on your PAM configuration,
-# PAM authentication via KbdInteractiveAuthentication may bypass
-# the setting of "PermitRootLogin prohibit-password".
-# If you just want the PAM account and session checks to run without
-# PAM authentication, then enable this but set PasswordAuthentication
-# and KbdInteractiveAuthentication to 'no'.
-UsePAM yes
-
-#AllowAgentForwarding yes
-#AllowTcpForwarding yes
-#GatewayPorts no
-X11Forwarding yes
-#X11DisplayOffset 10
-#X11UseLocalhost yes
-#PermitTTY yes
-PrintMotd no
-#PrintLastLog yes
-#TCPKeepAlive yes
-#PermitUserEnvironment no
-#Compression delayed
-ClientAliveInterval 15
-#ClientAliveCountMax 3
-#UseDNS no
-#PidFile /run/sshd.pid
-#MaxStartups 10:30:100
-#PermitTunnel no
-#ChrootDirectory none
-#VersionAddendum none
-
-# no default banner path
-#Banner none
-
-# Allow client to pass locale environment variables
-AcceptEnv LANG LC_*
-
-# override default of no subsystems
-Subsystem sftp /usr/lib/openssh/sftp-server
-
-# Example of overriding settings on a per-user basis
-#Match User anoncvs
-# X11Forwarding no
-# AllowTcpForwarding no
-# PermitTTY no
-# ForceCommand cvs server
+++ /dev/null
-# ~/.bash_profile, if it exists, is sourced by Bash for all login shells,
-# instead of ~/.profile
-#
-# While I prefer using ~/.profile, I provide ~/.bash_profile because some
-# applications write to it even if it does not previously exist, which
-# deactivates ~/.profile if not explicitly sourced from within here.
-. "${HOME}/.profile"
-
+++ /dev/null
-# ~/.bashrc is sourced by Bash for any interactive shells.
-
-# Use vim as default editor for anything.
-export VISUAL=vim
-export EDITOR="${VISUAL}"
-
-# Some helpful aliases.
-alias curlpost='curl -H "Content-Type: application/json" -X POST'
-alias ls="ls --color=auto"
-
-# Colored prompt with username, hostname, date/time, directory.
-COLOR_NUMBER=7 # default to white
-COLOR_NUMBER_FILE="${HOME}/.shell_prompt_color"
-[ -f "${COLOR_NUMBER_FILE}" ] && COLOR_NUMBER=`cat "${COLOR_NUMBER_FILE}"`
-tput_color="$(tput setaf "${COLOR_NUMBER}")$(tput bold)"
-tput_reset="$(tput sgr0)"
-# Bash confuses the line length when not told to not count escape sequences.
-if [ -n "${BASH}" ]; then
- tput_color="\[$tput_color\]"
- tput_reset="\[$tput_reset\]"
-fi
-PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $(whoami)@$(hostname):"\$\(pwd\)"]$ ${tput_reset}"
-PS2="${tput_color}> ${tput_reset}"
-PS3="${tput_color}select: ${tput_reset}"
-PS4="${tput_color}+ ${tput_reset}"
-
-# include others
-. "${HOME}/.plomlib/file_dot_variants"
-file_dot_variants "${HOME}/\.bashrc"
+++ /dev/null
-file_dot_variants() {
- for FILE in ${1}\.*; do
- if [ -f "${FILE}" ]; then
- . "${FILE}"
- fi
- done
-}
+++ /dev/null
-# ~/.profile is sourced on login, with its exports inherited by all processes
-# started below it under the same login, i.e. it has a very deep effect, but
-# changes to it only apply to new login sessions (compare to e.g. ~/.bashrc
-# which by is sourced anew for every new interactive Bash, login or not).
-#
-# Notably this makes ~/.profile (outside its optional sourcing of ~/.bashrc)
-# useful for providing environment variables to non-shell applications started
-# within a login session.
-PATH_BASHRC="${HOME}/.bashrc"
-[ -n "${BASH_VERSION}" -a -f "${PATH_BASHRC}" ] && . "${PATH_BASHRC}"
-
-PATH_LOCAL_BIN="${HOME}/.local/bin"
-[ -d "${PATH_LOCAL_BIN}" ] && PATH="${PATH_LOCAL_BIN}:${PATH}"
-
-# local changes to this shell variable otherwise will get lost
-export PATH
-
-# include others
-. "${HOME}/.plomlib/file_dot_variants"
-file_dot_variants "${HOME}/\.profile"
+++ /dev/null
-host = irc.libera.chat
-join = #plomtest
-sasl-plain = plomtest:REPLACE_WITH_IRC_PASSWORD
-log
+++ /dev/null
-#!/bin/sh
-set -e
-cd $(dirname "$0")
-. lib/expect_n_args
-. lib/constants_catgirl # PATH_USER_SHARE_CATGIRL
-
-expect_n_args 0 0 ''
-
-PATH_LOGS="${PATH_USER_SHARE_CATGIRL}/log"
-PATH_ENCRYPTED_LOGS="${HOME}/logs_encrypted"
-PATH_ENCRYPTION_KEY="${HOME}/.plomlib/encrypt_with.pub"
-TODAY="$(date +'%Y-%m-%d')"
-set +e
-PATHS_LOGFILES="$(ls ${PATH_LOGS}/*/*/*.log 2> /dev/null)"
-set -e
-if [ -z "${PATHS_LOGFILES}" ]; then
- echo "No log files present, so nothing to do."
- exit 0
-fi
-for _PATH_LOGFILE in ${PATHS_LOGFILES}; do
- _FILENAME=$(basename "${_PATH_LOGFILE}")
- _DATE_OF_LOG=$(echo "${_FILENAME}" | cut -d'.' -f1)
- _DIRNAME=$(dirname "${_PATH_LOGFILE}")
- _WINDOW_OF_LOG=$(basename "${_DIRNAME}")
- _DIRNAME=$(dirname "${_DIRNAME}")
- _NETWORK_OF_LOG=$(basename "${_DIRNAME}")
- if ! [ "${_DATE_OF_LOG}" '<' "${TODAY}" ]; then
- echo "${_PATH_LOGFILE} too young, ignoring."
- else
- echo "${_PATH_LOGFILE}: encrypting to ${PATH_ENCRYPTED_LOGS}, deleting original …"
- _PATH_TARGET="${PATH_ENCRYPTED_LOGS}/${_NETWORK_OF_LOG}/${_WINDOW_OF_LOG}"
- mkdir -p "${_PATH_TARGET}"
- age -R "${PATH_ENCRYPTION_KEY}" "${_PATH_LOGFILE}" > "${_PATH_TARGET}/${_FILENAME}.age"
- rm "${_PATH_LOGFILE}"
- fi
-done
+++ /dev/null
-../../../scripts/lib/abort
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/constants_catgirl
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/constants_user
\ No newline at end of file
+++ /dev/null
-ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAoMa288S7iHnw8lEaSQTTK8pSJwBEWCCyPJF7zewbXrgGoHHXAYD88AJFrULBivTk6HIVpx+Dc0fdhheXr3yl8XGo57l7XTVd1xz2USxaPXfWHEz5mAtJVM4MJ7MjQ5eNkCgrJaOWZ1SLnSS/+dF3KGYs1BK7piIKFk/5AKQmX+0R3STxNlLlEOWG03224409VNliMKFhbfjszPJyaKDFKt4tnG12YgEZ0Zx2LbAfJZzFdkxb2qzcdb09vRHOEZgtFPszohVETaBtocl3mEPHRjwXzhE6fz/jzMHc+JZDViQONobvgJ7weVU7dnv8zmiobFuyOEb4uyAE1yugvBypPQ==
+++ /dev/null
-../../../scripts/lib/expect_n_args
\ No newline at end of file
+++ /dev/null
-. lib/constants_user # PATH_USER_HOME
-
-PATH_USER_SHARE_CATGIRL="${PATH_USER_HOME}/.local/share/catgirl"
-
+++ /dev/null
-. lib/expect_n_args
-. lib/mkdir_p_for_user
-
-copy_dirtree() {
- expect_n_args 4 99 'OWNER_TO_ENFORCE (to ignore, use "-") SOURCE_ROOT TARGET_ROOT TAG...' $@
- _OWNER="$1"
- _SOURCE_ROOT="$2"
- _TARGET_ROOT="$3"
- shift 3
- _TAGS="$@"
- for _TAG in ${_TAGS}; do
- _PATH_TAG="${_SOURCE_ROOT}/${_TAG}"
- if [ ! -d "${_PATH_TAG}" ]; then
- continue
- fi
- cd "${_PATH_TAG}"
- for _PATH_REL in $(find . -type f,l); do
- _PATH_TARGET="${_TARGET_ROOT}"$(echo "${_PATH_REL}" | cut -c 2-)
- _PATH_SOURCE=$(realpath "${_PATH_REL}")
- _DIRECTORY=$(dirname "${_PATH_TARGET}")
- if [ ! "${_OWNER}" = '-' ]; then
- mkdir_p_for_user "${_OWNER}" "${_DIRECTORY}"
- fi
- cp -av "${_PATH_SOURCE}" "${_PATH_TARGET}"
- if [ ! "${_OWNER}" = '-' ]; then
- chown "${_OWNER}:${_OWNER}" "${_PATH_TARGET}"
- fi
- done
- cd - > /dev/null
- done
-}
--- /dev/null
+copy_dirtrees() {
+ _TAGS="$@"
+ _PATHS_WRITTEN=
+ for _TAG in ${_TAGS}; do
+
+ _PATH_TAG="../copy/${_TAG}"
+ if [ ! -d "${_PATH_TAG}" ]; then
+ continue
+ fi
+ cd "${_PATH_TAG}"
+ for _PATH_REL in $(find . -type f,l); do
+ _PATH_TARGET="/$(echo ${_PATH_REL} | cut -c 2-)"
+ _DIRECTORY=$(dirname "${_PATH_TARGET}")
+
+ # ensure directory by mkdir -p; to avoid later chowning pre-existing directories,
+ # collect only what's returned by the command as actually newly created
+ _CREATION_SUMMARY=$(mkdir -pv "${_DIRECTORY}")
+ _CREATED_PATHS=(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g") | sed -E "s/\$mkdir: created directory '//g"
+ _PATHS_WRITTEN="${_CREATED_PATHS}${_PATHS_WRITTEN}"
+
+ # handle dirtree creation instruction files
+ _FILENAME="$(basename ${_PATH_REL})"
+ if [ "${_FILENAME}" = 'KILL_ME' ]; then # only there to ensure directory
+ continue
+ fi
+ _IS_LINK_ME=$(echo "${_FILENAME}" | grep -E '^LINK_ME')
+ if [ ! -z "${_IS_LINK_ME}" ]; then
+ _LINK_TARGET=$(cat "${_PATH_REL}" | head -1)
+ _LINK_NAME=$(cat "${_PATH_REL}" | tail -1)
+ if [ -z "${_LINK_NAME}" ]; then
+ _LINK_NAME=$(basename "${_LINK_TARGET}")
+ fi
+ _PATH_LINK="${_DIRECTORY}${_LINK_NAME}"
+ ln -s "${_LINK_TARGET}" "${_PATH_LINK}"
+ _PATHS_WRITTEN="${_PATH_LINK}\n${_PATHS_WRITTEN}"
+ continue
+ fi
+
+ # actual file copying
+ _PATH_SOURCE=$(realpath "${_PATH_REL}")
+ _CREATION_SUMMARY=$(cp -av "${_PATH_SOURCE}" "${_PATH_TARGET}")
+ _CREATED_PATHS=(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g") | sed "s/.*' -> '//g")
+ _PATHS_WRITTEN="${_CREATED_PATHS}${_PATHS_WRITTEN}"
+ done
+ cd - > /dev/null
+ done
+
+ # for all paths written into user home directories, chown to respective users
+ for _PATH in ${_PATHS_WRITTEN}; do
+ _IS_FOR_USER=$(echo "${_PATH}" | grep -E '^/home/")
+ if [ -z "${_IS_FOR_USER}" ]; then
+ continue
+ fi
+ _USERNAME=$(echo "${_PATH}" | sed -E '/^\/home\///' | sed -E '/\/.*//i')
+ chown -R "${_USERNAME}:${_USERNAME}" "${_PATH}"
+ do
+}
+++ /dev/null
-. lib/copy_dirtree
-. lib/constants_etc # PATH_ETC, PATH_REL_ETC
-. lib/constants_repopaths # PATH_CONF
-
-ensure_etc_of_tags() {
- _PATH_CONF_ETC="${PATH_CONF}/${PATH_REL_ETC}"
- copy_dirtree '-' "${_PATH_CONF_ETC}" "${PATH_ETC}" $@
-}
+++ /dev/null
-. lib/constants_user # PATH_USER_HOME, USERNAME
-. lib/constants_repopaths # PATH_CONF_HOME
-
-ensure_homefiles_of_tags() {
- copy_dirtree "${USERNAME}" "${PATH_CONF_HOME}" "${PATH_USER_HOME}" $@
-}
+++ /dev/null
-mkdir_p_for_user() {
- _USER="$1"
- _TO_SHORTEN=$(mkdir -pv "$2" | sed "s/mkdir: created directory '//g" | head -1)
- if [ ! -z "${_TO_SHORTEN}" ]; then
- _LENGTH=$(echo -n "${_TO_SHORTEN}" | wc -c)
- _TARGET_LENGTH=$(calc "${_LENGTH} - 1" | cut -f2)
- _TARGET_DIR=$(echo "${_TO_SHORTEN}" | cut -c "-${_TARGET_LENGTH}")
- chown -R "${_USER}:${_USER}" "${_TARGET_DIR}"
- fi
-}
--- /dev/null
+. lib/constants_user # USERNAME
+
+setup_user() {
+ echo "\nSetting up user: ${USERNAME}"
+ adduser --disabled-password --gecos "" "${USERNAME}"
+ usermod -a -G sudo "${USERNAME}"
+}
+++ /dev/null
-. lib/copy_dirtree
-. lib/constants_repopaths # PATH_CONF_HOME
-. lib/constants_user # PATH_USER_HOME, USERNAME
-. lib/ensure_homefiles_of_tags
-. lib/mkdir_p_for_user
-
-setup_users() {
- _MIN_TAGS="$1"
- _TAGS_USER="$2"
- _PATH_USER_BIN="${PATH_USER_HOME}/.local/bin"
-
- echo "\nSetting up root user's home directory."
- copy_dirtree 'root' "${PATH_CONF_HOME}" '/root' ${_MIN_TAGS} root
-
- echo "\nSetting up user ${USERNAME}."
- adduser --disabled-password --gecos "" "${USERNAME}"
- usermod -a -G sudo "${USERNAME}"
- ensure_homefiles_of_tags ${_MIN_TAGS} ${_TAGS_USER}
- mkdir_p_for_user "${USERNAME}" "${_PATH_USER_BIN}"
- cd "${_PATH_USER_BIN}"
- ln -s ../../.plomlib lib
- chown "${USERNAME}:${USERNAME}" lib
- cd - > /dev/null
-}
set -e
cd $(dirname "$0")
. lib/check_finished_marker
-. lib/constants_catgirl # PATH_USER_SHARE_CATGIRL
-. lib/constants_user # PATH_USER_HOME, USERNAME
-. lib/ensure_etc_of_tags
-. lib/ensure_homefiles_of_tags
+. lib/constants_user # PATH_USER_HOME
+. lib/copy_dirtrees_of_tags
. lib/ensure_packages_of_tags
. lib/expect_n_args
-. lib/mkdir_p_for_user
check_finished_marker 'setup_server'
expect_n_args 1 1 'IRC_PASSWORD' $@
IRC_PASSWORD="$1"
PATH_USER_CONF_CATGIRL="${PATH_USER_HOME}/.config/catgirl/libera"
+INSTALL_TAGS=catgirl
-echo "\nInstalling catgirl packages, /etc and /home files."
-ensure_packages_of_tags catgirl
-ensure_etc_of_tags catgirl
-ensure_homefiles_of_tags catgirl
-
-echo "\nSetting up ${PATH_USER_SHARE_CATGIRL} so logs can go there."
-mkdir_p_for_user "${USERNAME}" "${PATH_USER_SHARE_CATGIRL}"
+echo "\nInstalling packages, /etc and /home files."
+ensure_packages_of_tags ${INSTALL_TAGS}
+copy_dirtrees_of_tags ${INSTALL_TAGS}
echo "\nWriting provided password into ${PATH_USER_CONF_CATGIRL}."
sed -i "s/REPLACE_WITH_IRC_PASSWORD/${IRC_PASSWORD}/g" "${PATH_USER_CONF_CATGIRL}"
-chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_SHARE_CATGIRL}"
echo "\nActivating catgirl tmux session service."
systemctl enable --now catgirl
--- /dev/null
+#!/bin/sh
+set -e
+cd $(dirname "$0")
+. lib/check_finished_marker
+. lib/ensure_packages_of_tags
+. lib/copy_dirtrees_of_tags
+
+check_finished_marker 'setup_server'
+INSTALL_TAGS=seedbox
+
+echo "\nInstalling packages, /etc and /home files."
+ensure_packages_of_tags ${INSTALL_TAGS}
+copy_dirtrees ${INSTALL_TAGS}
+
+echo "\nActivating service."
+systemctl enable --now rtorrent
cd $(dirname "$0")
. lib/constants_etc # PATH_ETC
. lib/constants_ssh # PATH_REL_SSH, PATH_USER_SSH
+. lib/copy_dirtrees_of_tags
. lib/determine_ip
-. lib/ensure_etc_of_tags
. lib/expect_n_args
. lib/init_packages
. lib/path_tmp_timestamped
. lib/put_finished_marker
-. lib/setup_users
+. lib/setup_user
-MIN_TAGS='all server caddy'
+INSTALL_TAGS='all server caddy'
expect_n_args 3 3 'HOSTNAME, FQDN, WEB_PASSWORD' $@
HOSTNAME="$1"
cat "${PATH_CURL_ERROR}"
exit 1
fi
-curl -1Lf "${PATH_CADDY_REPO}/debian.deb.txt" > /etc/apt/sources.list.d/caddy-stable.list
+curl -1LfsS "${PATH_CADDY_REPO}/debian.deb.txt" > /etc/apt/sources.list.d/caddy-stable.list
-init_packages "${MIN_TAGS}"
+init_packages "${INSTALL_TAGS}"
echo '\nSetting hostname and FQDN.'
echo "${HOSTNAME}" > "${PATH_ETC}/hostname"
echo '127.0.0.1 localhost.localdomain localhost' > "${PATH_HOSTS}"
echo "$(determine_ip) ${FQDN} ${HOSTNAME}" >> "${PATH_HOSTS}"
-echo '\nAdapting /etc to our needs.'
-ensure_etc_of_tags ${MIN_TAGS}
+setup_user
+echo '\nCopying over files, directories.'
+copy_dirtrees_of_tags ${INSTALL_TAGS}
-echo '\nSetting Berlin localtime.'
-ln -sf /usr/share/zoneinfo/Europe/Berlin "${PATH_ETC}/localtime"
+echo '\nSyncing clock.'
ntpdate-debian
-setup_users "${MIN_TAGS}" ''
-
echo '\nMoving SSH data from root to user.'
mkdir -p "${PATH_USER_SSH}"
mv "/root/${PATH_REL_SSH}/authorized_keys" "${PATH_USER_SSH}/"
--- /dev/null
+../../../../../bookworm/etc/all/apt/apt.conf.d/99_minimize_dependencies
\ No newline at end of file
--- /dev/null
+deb http://deb.debian.org/debian testing main contrib non-free non-free-firmware
+deb http://security.debian.org/debian-security testing-security main contrib non-free non-free-firmware
--- /dev/null
+LANG="en_US.UTF-8"
--- /dev/null
+# This file lists locales that you wish to have built. You can find a list
+# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
+# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
+# this file, you need to rerun locale-gen.
+
+
+# aa_DJ ISO-8859-1
+# aa_DJ.UTF-8 UTF-8
+# aa_ER UTF-8
+# aa_ER@saaho UTF-8
+# aa_ET UTF-8
+# af_ZA ISO-8859-1
+# af_ZA.UTF-8 UTF-8
+# ak_GH UTF-8
+# am_ET UTF-8
+# an_ES ISO-8859-15
+# an_ES.UTF-8 UTF-8
+# anp_IN UTF-8
+# ar_AE ISO-8859-6
+# ar_AE.UTF-8 UTF-8
+# ar_BH ISO-8859-6
+# ar_BH.UTF-8 UTF-8
+# ar_DZ ISO-8859-6
+# ar_DZ.UTF-8 UTF-8
+# ar_EG ISO-8859-6
+# ar_EG.UTF-8 UTF-8
+# ar_IN UTF-8
+# ar_IQ ISO-8859-6
+# ar_IQ.UTF-8 UTF-8
+# ar_JO ISO-8859-6
+# ar_JO.UTF-8 UTF-8
+# ar_KW ISO-8859-6
+# ar_KW.UTF-8 UTF-8
+# ar_LB ISO-8859-6
+# ar_LB.UTF-8 UTF-8
+# ar_LY ISO-8859-6
+# ar_LY.UTF-8 UTF-8
+# ar_MA ISO-8859-6
+# ar_MA.UTF-8 UTF-8
+# ar_OM ISO-8859-6
+# ar_OM.UTF-8 UTF-8
+# ar_QA ISO-8859-6
+# ar_QA.UTF-8 UTF-8
+# ar_SA ISO-8859-6
+# ar_SA.UTF-8 UTF-8
+# ar_SD ISO-8859-6
+# ar_SD.UTF-8 UTF-8
+# ar_SS UTF-8
+# ar_SY ISO-8859-6
+# ar_SY.UTF-8 UTF-8
+# ar_TN ISO-8859-6
+# ar_TN.UTF-8 UTF-8
+# ar_YE ISO-8859-6
+# ar_YE.UTF-8 UTF-8
+# as_IN UTF-8
+# ast_ES ISO-8859-15
+# ast_ES.UTF-8 UTF-8
+# ayc_PE UTF-8
+# az_AZ UTF-8
+# be_BY CP1251
+# be_BY.UTF-8 UTF-8
+# be_BY@latin UTF-8
+# bem_ZM UTF-8
+# ber_DZ UTF-8
+# ber_MA UTF-8
+# bg_BG CP1251
+# bg_BG.UTF-8 UTF-8
+# bhb_IN.UTF-8 UTF-8
+# bho_IN UTF-8
+# bn_BD UTF-8
+# bn_IN UTF-8
+# bo_CN UTF-8
+# bo_IN UTF-8
+# br_FR ISO-8859-1
+# br_FR.UTF-8 UTF-8
+# br_FR@euro ISO-8859-15
+# brx_IN UTF-8
+# bs_BA ISO-8859-2
+# bs_BA.UTF-8 UTF-8
+# byn_ER UTF-8
+# ca_AD ISO-8859-15
+# ca_AD.UTF-8 UTF-8
+# ca_ES ISO-8859-1
+# ca_ES.UTF-8 UTF-8
+# ca_ES.UTF-8@valencia UTF-8
+# ca_ES@euro ISO-8859-15
+# ca_ES@valencia ISO-8859-15
+# ca_FR ISO-8859-15
+# ca_FR.UTF-8 UTF-8
+# ca_IT ISO-8859-15
+# ca_IT.UTF-8 UTF-8
+# ce_RU UTF-8
+# chr_US UTF-8
+# cmn_TW UTF-8
+# crh_UA UTF-8
+# cs_CZ ISO-8859-2
+# cs_CZ.UTF-8 UTF-8
+# csb_PL UTF-8
+# cv_RU UTF-8
+# cy_GB ISO-8859-14
+# cy_GB.UTF-8 UTF-8
+# da_DK ISO-8859-1
+# da_DK.UTF-8 UTF-8
+# de_AT ISO-8859-1
+# de_AT.UTF-8 UTF-8
+# de_AT@euro ISO-8859-15
+# de_BE ISO-8859-1
+# de_BE.UTF-8 UTF-8
+# de_BE@euro ISO-8859-15
+# de_CH ISO-8859-1
+# de_CH.UTF-8 UTF-8
+# de_DE ISO-8859-1
+# de_DE.UTF-8 UTF-8
+# de_DE@euro ISO-8859-15
+# de_IT ISO-8859-1
+# de_IT.UTF-8 UTF-8
+# de_LI.UTF-8 UTF-8
+# de_LU ISO-8859-1
+# de_LU.UTF-8 UTF-8
+# de_LU@euro ISO-8859-15
+# doi_IN UTF-8
+# dv_MV UTF-8
+# dz_BT UTF-8
+# el_CY ISO-8859-7
+# el_CY.UTF-8 UTF-8
+# el_GR ISO-8859-7
+# el_GR.UTF-8 UTF-8
+# en_AG UTF-8
+# en_AU ISO-8859-1
+# en_AU.UTF-8 UTF-8
+# en_BW ISO-8859-1
+# en_BW.UTF-8 UTF-8
+# en_CA ISO-8859-1
+# en_CA.UTF-8 UTF-8
+# en_DK ISO-8859-1
+# en_DK.ISO-8859-15 ISO-8859-15
+# en_DK.UTF-8 UTF-8
+# en_GB ISO-8859-1
+# en_GB.ISO-8859-15 ISO-8859-15
+# en_GB.UTF-8 UTF-8
+# en_HK ISO-8859-1
+# en_HK.UTF-8 UTF-8
+# en_IE ISO-8859-1
+# en_IE.UTF-8 UTF-8
+# en_IE@euro ISO-8859-15
+# en_IL UTF-8
+# en_IN UTF-8
+# en_NG UTF-8
+# en_NZ ISO-8859-1
+# en_NZ.UTF-8 UTF-8
+# en_PH ISO-8859-1
+# en_PH.UTF-8 UTF-8
+# en_SG ISO-8859-1
+# en_SG.UTF-8 UTF-8
+# en_US ISO-8859-1
+# en_US.ISO-8859-15 ISO-8859-15
+en_US.UTF-8 UTF-8
+# en_ZA ISO-8859-1
+# en_ZA.UTF-8 UTF-8
+# en_ZM UTF-8
+# en_ZW ISO-8859-1
+# en_ZW.UTF-8 UTF-8
+# eo UTF-8
+# es_AR ISO-8859-1
+# es_AR.UTF-8 UTF-8
+# es_BO ISO-8859-1
+# es_BO.UTF-8 UTF-8
+# es_CL ISO-8859-1
+# es_CL.UTF-8 UTF-8
+# es_CO ISO-8859-1
+# es_CO.UTF-8 UTF-8
+# es_CR ISO-8859-1
+# es_CR.UTF-8 UTF-8
+# es_CU UTF-8
+# es_DO ISO-8859-1
+# es_DO.UTF-8 UTF-8
+# es_EC ISO-8859-1
+# es_EC.UTF-8 UTF-8
+# es_ES ISO-8859-1
+# es_ES.UTF-8 UTF-8
+# es_ES@euro ISO-8859-15
+# es_GT ISO-8859-1
+# es_GT.UTF-8 UTF-8
+# es_HN ISO-8859-1
+# es_HN.UTF-8 UTF-8
+# es_MX ISO-8859-1
+# es_MX.UTF-8 UTF-8
+# es_NI ISO-8859-1
+# es_NI.UTF-8 UTF-8
+# es_PA ISO-8859-1
+# es_PA.UTF-8 UTF-8
+# es_PE ISO-8859-1
+# es_PE.UTF-8 UTF-8
+# es_PR ISO-8859-1
+# es_PR.UTF-8 UTF-8
+# es_PY ISO-8859-1
+# es_PY.UTF-8 UTF-8
+# es_SV ISO-8859-1
+# es_SV.UTF-8 UTF-8
+# es_US ISO-8859-1
+# es_US.UTF-8 UTF-8
+# es_UY ISO-8859-1
+# es_UY.UTF-8 UTF-8
+# es_VE ISO-8859-1
+# es_VE.UTF-8 UTF-8
+# et_EE ISO-8859-1
+# et_EE.ISO-8859-15 ISO-8859-15
+# et_EE.UTF-8 UTF-8
+# eu_ES ISO-8859-1
+# eu_ES.UTF-8 UTF-8
+# eu_ES@euro ISO-8859-15
+# eu_FR ISO-8859-1
+# eu_FR.UTF-8 UTF-8
+# eu_FR@euro ISO-8859-15
+# fa_IR UTF-8
+# ff_SN UTF-8
+# fi_FI ISO-8859-1
+# fi_FI.UTF-8 UTF-8
+# fi_FI@euro ISO-8859-15
+# fil_PH UTF-8
+# fo_FO ISO-8859-1
+# fo_FO.UTF-8 UTF-8
+# fr_BE ISO-8859-1
+# fr_BE.UTF-8 UTF-8
+# fr_BE@euro ISO-8859-15
+# fr_CA ISO-8859-1
+# fr_CA.UTF-8 UTF-8
+# fr_CH ISO-8859-1
+# fr_CH.UTF-8 UTF-8
+# fr_FR ISO-8859-1
+# fr_FR.UTF-8 UTF-8
+# fr_FR@euro ISO-8859-15
+# fr_LU ISO-8859-1
+# fr_LU.UTF-8 UTF-8
+# fr_LU@euro ISO-8859-15
+# fur_IT UTF-8
+# fy_DE UTF-8
+# fy_NL UTF-8
+# ga_IE ISO-8859-1
+# ga_IE.UTF-8 UTF-8
+# ga_IE@euro ISO-8859-15
+# gd_GB ISO-8859-15
+# gd_GB.UTF-8 UTF-8
+# gez_ER UTF-8
+# gez_ER@abegede UTF-8
+# gez_ET UTF-8
+# gez_ET@abegede UTF-8
+# gl_ES ISO-8859-1
+# gl_ES.UTF-8 UTF-8
+# gl_ES@euro ISO-8859-15
+# gu_IN UTF-8
+# gv_GB ISO-8859-1
+# gv_GB.UTF-8 UTF-8
+# ha_NG UTF-8
+# hak_TW UTF-8
+# he_IL ISO-8859-8
+# he_IL.UTF-8 UTF-8
+# hi_IN UTF-8
+# hne_IN UTF-8
+# hr_HR ISO-8859-2
+# hr_HR.UTF-8 UTF-8
+# hsb_DE ISO-8859-2
+# hsb_DE.UTF-8 UTF-8
+# ht_HT UTF-8
+# hu_HU ISO-8859-2
+# hu_HU.UTF-8 UTF-8
+# hy_AM UTF-8
+# hy_AM.ARMSCII-8 ARMSCII-8
+# ia_FR UTF-8
+# id_ID ISO-8859-1
+# id_ID.UTF-8 UTF-8
+# ig_NG UTF-8
+# ik_CA UTF-8
+# is_IS ISO-8859-1
+# is_IS.UTF-8 UTF-8
+# it_CH ISO-8859-1
+# it_CH.UTF-8 UTF-8
+# it_IT ISO-8859-1
+# it_IT.UTF-8 UTF-8
+# it_IT@euro ISO-8859-15
+# iu_CA UTF-8
+# ja_JP.EUC-JP EUC-JP
+# ja_JP.UTF-8 UTF-8
+# ka_GE GEORGIAN-PS
+# ka_GE.UTF-8 UTF-8
+# kk_KZ PT154
+# kk_KZ.RK1048 RK1048
+# kk_KZ.UTF-8 UTF-8
+# kl_GL ISO-8859-1
+# kl_GL.UTF-8 UTF-8
+# km_KH UTF-8
+# kn_IN UTF-8
+# ko_KR.EUC-KR EUC-KR
+# ko_KR.UTF-8 UTF-8
+# kok_IN UTF-8
+# ks_IN UTF-8
+# ks_IN@devanagari UTF-8
+# ku_TR ISO-8859-9
+# ku_TR.UTF-8 UTF-8
+# kw_GB ISO-8859-1
+# kw_GB.UTF-8 UTF-8
+# ky_KG UTF-8
+# lb_LU UTF-8
+# lg_UG ISO-8859-10
+# lg_UG.UTF-8 UTF-8
+# li_BE UTF-8
+# li_NL UTF-8
+# lij_IT UTF-8
+# ln_CD UTF-8
+# lo_LA UTF-8
+# lt_LT ISO-8859-13
+# lt_LT.UTF-8 UTF-8
+# lv_LV ISO-8859-13
+# lv_LV.UTF-8 UTF-8
+# lzh_TW UTF-8
+# mag_IN UTF-8
+# mai_IN UTF-8
+# mg_MG ISO-8859-15
+# mg_MG.UTF-8 UTF-8
+# mhr_RU UTF-8
+# mi_NZ ISO-8859-13
+# mi_NZ.UTF-8 UTF-8
+# mk_MK ISO-8859-5
+# mk_MK.UTF-8 UTF-8
+# ml_IN UTF-8
+# mn_MN UTF-8
+# mni_IN UTF-8
+# mr_IN UTF-8
+# ms_MY ISO-8859-1
+# ms_MY.UTF-8 UTF-8
+# mt_MT ISO-8859-3
+# mt_MT.UTF-8 UTF-8
+# my_MM UTF-8
+# nan_TW UTF-8
+# nan_TW@latin UTF-8
+# nb_NO ISO-8859-1
+# nb_NO.UTF-8 UTF-8
+# nds_DE UTF-8
+# nds_NL UTF-8
+# ne_NP UTF-8
+# nhn_MX UTF-8
+# niu_NU UTF-8
+# niu_NZ UTF-8
+# nl_AW UTF-8
+# nl_BE ISO-8859-1
+# nl_BE.UTF-8 UTF-8
+# nl_BE@euro ISO-8859-15
+# nl_NL ISO-8859-1
+# nl_NL.UTF-8 UTF-8
+# nl_NL@euro ISO-8859-15
+# nn_NO ISO-8859-1
+# nn_NO.UTF-8 UTF-8
+# nr_ZA UTF-8
+# nso_ZA UTF-8
+# oc_FR ISO-8859-1
+# oc_FR.UTF-8 UTF-8
+# om_ET UTF-8
+# om_KE ISO-8859-1
+# om_KE.UTF-8 UTF-8
+# or_IN UTF-8
+# os_RU UTF-8
+# pa_IN UTF-8
+# pa_PK UTF-8
+# pap_AW UTF-8
+# pap_CW UTF-8
+# pl_PL ISO-8859-2
+# pl_PL.UTF-8 UTF-8
+# ps_AF UTF-8
+# pt_BR ISO-8859-1
+# pt_BR.UTF-8 UTF-8
+# pt_PT ISO-8859-1
+# pt_PT.UTF-8 UTF-8
+# pt_PT@euro ISO-8859-15
+# quz_PE UTF-8
+# raj_IN UTF-8
+# ro_RO ISO-8859-2
+# ro_RO.UTF-8 UTF-8
+# ru_RU ISO-8859-5
+# ru_RU.CP1251 CP1251
+# ru_RU.KOI8-R KOI8-R
+# ru_RU.UTF-8 UTF-8
+# ru_UA KOI8-U
+# ru_UA.UTF-8 UTF-8
+# rw_RW UTF-8
+# sa_IN UTF-8
+# sat_IN UTF-8
+# sc_IT UTF-8
+# sd_IN UTF-8
+# sd_IN@devanagari UTF-8
+# se_NO UTF-8
+# sgs_LT UTF-8
+# shs_CA UTF-8
+# si_LK UTF-8
+# sid_ET UTF-8
+# sk_SK ISO-8859-2
+# sk_SK.UTF-8 UTF-8
+# sl_SI ISO-8859-2
+# sl_SI.UTF-8 UTF-8
+# so_DJ ISO-8859-1
+# so_DJ.UTF-8 UTF-8
+# so_ET UTF-8
+# so_KE ISO-8859-1
+# so_KE.UTF-8 UTF-8
+# so_SO ISO-8859-1
+# so_SO.UTF-8 UTF-8
+# sq_AL ISO-8859-1
+# sq_AL.UTF-8 UTF-8
+# sq_MK UTF-8
+# sr_ME UTF-8
+# sr_RS UTF-8
+# sr_RS@latin UTF-8
+# ss_ZA UTF-8
+# st_ZA ISO-8859-1
+# st_ZA.UTF-8 UTF-8
+# sv_FI ISO-8859-1
+# sv_FI.UTF-8 UTF-8
+# sv_FI@euro ISO-8859-15
+# sv_SE ISO-8859-1
+# sv_SE.ISO-8859-15 ISO-8859-15
+# sv_SE.UTF-8 UTF-8
+# sw_KE UTF-8
+# sw_TZ UTF-8
+# szl_PL UTF-8
+# ta_IN UTF-8
+# ta_LK UTF-8
+# tcy_IN.UTF-8 UTF-8
+# te_IN UTF-8
+# tg_TJ KOI8-T
+# tg_TJ.UTF-8 UTF-8
+# th_TH TIS-620
+# th_TH.UTF-8 UTF-8
+# the_NP UTF-8
+# ti_ER UTF-8
+# ti_ET UTF-8
+# tig_ER UTF-8
+# tk_TM UTF-8
+# tl_PH ISO-8859-1
+# tl_PH.UTF-8 UTF-8
+# tn_ZA UTF-8
+# tr_CY ISO-8859-9
+# tr_CY.UTF-8 UTF-8
+# tr_TR ISO-8859-9
+# tr_TR.UTF-8 UTF-8
+# ts_ZA UTF-8
+# tt_RU UTF-8
+# tt_RU@iqtelif UTF-8
+# ug_CN UTF-8
+# uk_UA KOI8-U
+# uk_UA.UTF-8 UTF-8
+# unm_US UTF-8
+# ur_IN UTF-8
+# ur_PK UTF-8
+# uz_UZ ISO-8859-1
+# uz_UZ.UTF-8 UTF-8
+# uz_UZ@cyrillic UTF-8
+# ve_ZA UTF-8
+# vi_VN UTF-8
+# wa_BE ISO-8859-1
+# wa_BE.UTF-8 UTF-8
+# wa_BE@euro ISO-8859-15
+# wae_CH UTF-8
+# wal_ET UTF-8
+# wo_SN UTF-8
+# xh_ZA ISO-8859-1
+# xh_ZA.UTF-8 UTF-8
+# yi_US CP1255
+# yi_US.UTF-8 UTF-8
+# yo_NG UTF-8
+# yue_HK UTF-8
+# zh_CN GB2312
+# zh_CN.GB18030 GB18030
+# zh_CN.GBK GBK
+# zh_CN.UTF-8 UTF-8
+# zh_HK BIG5-HKSCS
+# zh_HK.UTF-8 UTF-8
+# zh_SG GB2312
+# zh_SG.GBK GBK
+# zh_SG.UTF-8 UTF-8
+# zh_TW BIG5
+# zh_TW.EUC-TW EUC-TW
+# zh_TW.UTF-8 UTF-8
+# zu_ZA ISO-8859-1
+# zu_ZA.UTF-8 UTF-8
--- /dev/null
+Europe/Berlin
--- /dev/null
+# This file describes the network interfaces available on your system
+# and how to activate them. For more information, see interfaces(5).
+
+source /etc/network/interfaces.d/*
+
+# The loopback network interface
+auto lo
+iface lo inet loopback
+
+# anything more would only confuse NetworkManager
--- /dev/null
+../../../bookworm/home/all/.bash_profile
\ No newline at end of file
--- /dev/null
+../../../bookworm/home/all/.bashrc
\ No newline at end of file
--- /dev/null
+../../../../bookworm/home/all/.plomlib/file_dot_variants
\ No newline at end of file
--- /dev/null
+../../../bookworm/home/all/.profile
\ No newline at end of file
--- /dev/null
+# mere "kb" might be more flexible, but this way I won't accidentally try for
+# a non-existing "en" layout
+alias kb_de="swaymsg 'input * xkb_layout de'"
+alias kb_us="swaymsg 'input * xkb_layout us'"
--- /dev/null
+# because these are included by /etc/sway/config for probably good reason …
+include /etc/sway/config-vars.d/*
+include /etc/sway/config.d/*
+
+# font for wm text
+font pango:Terminus 16px
+
+# force "tabbed" as default layout for new windows
+workspace_layout tabbed
+
+# simple green background
+output * background #559911 solid_color
+
+# keyboard layout
+input * xkb_layout "us"
+
+# waybar
+bar {
+ position top
+ status_command ~/.nonpath_bins/status.sh
+}
+
+# make Windows key modifier key for all wm actions
+set $mod Mod4
+floating_modifier $mod
+
+# program launcher
+bindsym $mod+d exec wmenu-run
+bindsym $mod+x exec wmenu-run
+
+# launch terminal emulator
+bindsym $mod+Return exec foot --font=monospace:size=12
+
+# kill window
+bindsym $mod+Shift+q kill
+
+# move focus between windows, but not by mouse
+bindsym $mod+Left focus left
+bindsym $mod+Down focus down
+bindsym $mod+Up focus up
+bindsym $mod+Right focus right
+focus_follows_mouse no
+
+# move windows
+bindsym $mod+Shift+Left move left
+bindsym $mod+Shift+Down move down
+bindsym $mod+Shift+Up move up
+bindsym $mod+Shift+Right move right
+
+# resize windows
+bindsym $mod+h resize shrink width 1 px or 1 ppt
+bindsym $mod+l resize grow width 1 px or 1 ppt
+bindsym $mod+j resize shrink height
+bindsym $mod+k resize grow height
+
+# toggle fullscreen for focused window
+bindsym $mod+f fullscreen
+
+# toggle floating of window, focus on floating or tabbed windows.
+bindsym $mod+Shift+space floating toggle
+bindsym $mod+space focus mode_toggle
+
+# reload config file
+bindsym $mod+Shift+c reload
+
+# stop wm
+bindsym $mod+Shift+p exit
+
+# switch workspaces
+bindsym $mod+1 workspace 1
+bindsym $mod+2 workspace 2
+bindsym $mod+3 workspace 3
+bindsym $mod+4 workspace 4
+bindsym $mod+5 workspace 5
+bindsym $mod+6 workspace 6
+bindsym $mod+7 workspace 7
+bindsym $mod+8 workspace 8
+bindsym $mod+9 workspace 9
+bindsym $mod+0 workspace 10
+
+# move window to workspace
+bindsym $mod+Shift+1 move workspace 1
+bindsym $mod+Shift+2 move workspace 2
+bindsym $mod+Shift+3 move workspace 3
+bindsym $mod+Shift+4 move workspace 4
+bindsym $mod+Shift+5 move workspace 5
+bindsym $mod+Shift+6 move workspace 6
+bindsym $mod+Shift+7 move workspace 7
+bindsym $mod+Shift+8 move workspace 8
+bindsym $mod+Shift+9 move workspace 9
+bindsym $mod+Shift+0 move workspace 10
--- /dev/null
+#!/bin/sh
+set -e
+cd $(dirname "$0")
+. lib/abort
+. lib/constants_borg # PATH_BORG_CONF
+. lib/expect_n_args
+. lib/get_passphrase
+. lib/path_tmp_timestamped
+. lib/print_usage
+. lib/retry_until
+cd - > /dev/null
+
+USAGE_DESCRIPTION='Wrapper around certain borgbackup usages.\n\nAvailable commands:'
+USAGE_LINES='COMMAND [ARGUMENT]...'
+
+PATH_BORG_CONF_SECURITY="${PATH_BORG_CONF}/security"
+PATH_BORG_CONF_KEYS="${PATH_BORG_CONF}/keys"
+location_from_servername() { printf 'ssh://borg@%s/./borgrepo' "$1"; }
+servername_from_location() { echo "$1" | cut -d'/' -f3 | cut -d'@' -f2; }
+path_repo_location() { printf '%s' "${PATH_BORG_CONF_SECURITY}/${1}/location"; }
+
+# exits
+export BORG_EXIT_CODES=modern
+error_exit() { abort "Aborting due to $1"; }
+error_exit_with_usage() { error_exit "${1}\n\n$(print_usage)"; }
+exit_ok() { echo "$@"; exit 0; }
+
+# commands
+USAGE_INDICES='backup_keys claim help info init keys orgpull orgpush'
+
+_run_borg_with_passphrase() {
+ _FIRST_RUN=1
+ _ON_LOOP_START='
+ if [ -z "${BORG_PASSPHRASE}" ]; then
+ printf "Passphrase:"
+ export BORG_PASSPHRASE="$(get_passphrase)"
+ echo ""
+ fi
+ '
+ _TO_TEST='borg '"$@"
+ _ON_FAIL='echo "unexpected borg error, code ${_RESULT}."'
+ _ON_LOOP_END='export BORG_PASSPHRASE='
+ retry_until 52 "${_ON_LOOP_START}" "${_TO_TEST}" "${_ON_FAIL}" "${_ON_LOOP_END}"
+}
+
+_id_from_file() { head -1 "$1" | cut -d' ' -f2; }
+
+USAGE_ARGS_backup_keys='PATH'
+USAGE_DESC_backup_keys="copy known keys to PATH/, with their repos' server names as filenames"
+CMDFNC_backup_keys() {
+ expect_n_args 1 1 "${USAGE_ARGS_backup_keys}" $@
+ _PATH_TARGET_DIR=$(realpath "$1")
+ if [ -e "${_PATH_TARGET_DIR}" ] && [ ! -d "${_PATH_TARGET_DIR}" ]; then
+ error_exit "non-directory at ${_PATH_TARGET_DIR}"
+ fi
+ mkdir -p "${_PATH_TARGET_DIR}"
+ cd "${PATH_BORG_CONF_KEYS}"
+ ls -1 | while read _FILENAME; do
+ _KEY_ID=$(_id_from_file "${_FILENAME}")
+ _PATH_LOC="$(path_repo_location ${_KEY_ID})"
+ if [ ! -f "${_PATH_LOC}" ]; then
+ echo "Ignoring ${_FILENAME} due to lack of matching location file."
+ continue
+ fi
+ _NAME_SERVER=$(servername_from_location "$(cat ${_PATH_LOC})")
+ _PATH_TARGET="${_PATH_TARGET_DIR}/${_NAME_SERVER}"
+ echo "Copying ${_FILENAME} to ${_PATH_TARGET} …"
+ cp "${_FILENAME}" "${_PATH_TARGET}"
+ done
+ cd - > /dev/null
+}
+
+USAGE_ARGS_claim='PATH'
+USAGE_DESC_claim="register file of PATH as key to repo at \"$(location_from_servername SERVER_NAME)\", with SERVER_NAME the filename portion of PATH"
+CMDFNC_claim() {
+ expect_n_args 1 1 "${USAGE_ARGS_claim}" $@
+ _PATH_SOURCE="$1"
+ _ensure_no_overwrite_at() {
+ if [ -f "$1" ]; then
+ error_exit "refusing to overwrite pre-existing file at $1"
+ fi
+ }
+
+ _FILENAME=$(basename ${_PATH_SOURCE})
+ _PATH_TARGET_KEY="${PATH_BORG_CONF_KEYS}/${_FILENAME}"
+ if [ ! -f "${_PATH_SOURCE}" ]; then
+ error_exit "no file at ${_PATH_SOURCE}"
+ fi
+ _ensure_no_overwrite_at "${_PATH_TARGET_KEY}"
+ _REPO_ID="$(_id_from_file ${_PATH_SOURCE})"
+ if [ ! -z "$(echo ${_REPO_ID} | sed 's/[a-f0-9]//g')" ]; then
+ error_exit "inability to parse valid repo ID from alleged key file at $1"
+ fi
+ _PATH_TARGET_LOCATION="$(path_repo_location ${_REPO_ID})"
+ _ensure_no_overwrite_at "${_PATH_TARGET_LOCATION}"
+ mkdir -p "${PATH_BORG_CONF_KEYS}" "$(dirname ${_PATH_TARGET_LOCATION})"
+ echo "Copying ${_PATH_SOURCE} to ${_PATH_TARGET_KEY} …"
+ cp "${_PATH_SOURCE}" "${_PATH_TARGET_KEY}"
+ echo "Writing ${_PATH_TARGET_LOCATION} …"
+ printf '%s' "$(location_from_servername ${_FILENAME})" > "${_PATH_TARGET_LOCATION}"
+ chmod a-rwx,u+rw "${_PATH_TARGET_KEY}" "${_PATH_TARGET_LOCATION}"
+}
+
+USAGE_DESC_help='print this help and exit'
+CMDFNC_help() {
+ expect_n_args 0 0 '' $@
+ print_usage
+}
+
+USAGE_ARGS_info='SERVER_NAME [ARCHIVE]'
+USAGE_DESC_info="run 'borg info' against repo at \"$(location_from_servername SERVER_NAME)\", optionally only against ARCHIVE; if latter not provided, list most recent archives of repo"
+CMDFNC_info() {
+ expect_n_args 1 2 "${USAGE_ARGS_info}" $@
+ _TARGET_REPO="$(location_from_servername ${1})"
+ if [ ! -z "$2" ]; then
+ exit_ok $(borg info "${_TARGET_REPO}::$2")
+ fi
+ _run_borg_with_passphrase info "${_TARGET_REPO}"
+ echo "${_OUTPUT}\n\nMost recent archives:"
+ borg list "${_TARGET_REPO}" | tail -5
+}
+
+USAGE_ARGS_init='SERVER_NAME'
+USAGE_DESC_init="create repo at \"$(location_from_servername SERVER_NAME)\""
+CMDFNC_init() {
+ expect_n_args 1 1 "${USAGE_ARGS_init}" $@
+ _STASHED_BORG_PASSPHRASE="$(env | grep -E '^BORG_PASSPHRASE=' | cut -d'=' -f2-)"
+ unset BORG_PASSPHRASE
+ borg init --encryption=keyfile "$(location_from_servername $1)"
+ if [ ! -z "${_STASHED_BORG_PASSPHRASE}" ]; then
+ export BORG_PASSPHRASE="${_STASHED_BORG_PASSPHRASE}"
+ _STASHED_BORG_PASSPHRASE=
+ fi
+}
+
+USAGE_DESC_keys='list known repos in ID, key filename, and alleged location'
+CMDFNC_keys() {
+ expect_n_args 0 0 '' $@
+ echo "Known keys, as per ${PATH_BORG_CONF_KEYS}:"
+ _EXIT_OK_PREFIX='(none, since directory'
+ if [ ! -d "${PATH_BORG_CONF_KEYS}" ]; then
+ exit_ok "${_EXIT_OK_PREFIX} non-existant)"
+ fi
+ _KEYFILES="$(ls -1 ${PATH_BORG_CONF_KEYS})"
+ if [ -z "${_KEYFILES}" ]; then
+ exit_ok "${_EXIT_OK_PREFIX} empty)"
+ fi
+ echo "${_KEYFILES}" | while read _FILENAME; do
+ _KEY_ID=$(_id_from_file "${PATH_BORG_CONF_KEYS}/${_FILENAME}")
+ _PATH_LOC="$(path_repo_location ${_KEY_ID})"
+ printf "${_KEY_ID} ${_FILENAME} "
+ if [ -f "${_PATH_LOC}" ]; then
+ printf '%s\n' "$(cat ${_PATH_LOC})"
+ else
+ printf '?\n'
+ fi
+ done
+}
+
+USAGE_DESC_orgpull='pull most recent org directory available in repos'
+CMDFNC_orgpull() {
+ expect_n_args 0 0 '' $@
+ _NAME_ARCHIVE=orgdir
+
+ # determine server and repo
+ _PATH_PIPE="$(path_tmp_timestamped 'pipe')"
+ mkfifo "${_PATH_PIPE}"
+ ls -1 "${PATH_BORG_CONF_SECURITY}/" > "${_PATH_PIPE}" &
+ while read _FILENAME; do
+ _LOCATION="$(cat $(path_repo_location ${_FILENAME}))"
+ _NAME_SERVER=$(servername_from_location "${_LOCATION}")
+ if ping -c1 -W2 "${_NAME_SERVER}" > /dev/null 2>&1; then
+ _REPO="${_LOCATION}"
+ break
+ else
+ echo "Cannot reach ${_NAME_SERVER}, skipping."
+ fi
+ done < "${_PATH_PIPE}"
+ rm "${_PATH_PIPE}"
+ if [ -z "${_REPO}" ]; then
+ error_exit 'no repo being available.'
+ fi
+
+ # determine passphrase and archive
+ echo "Checking out ${_REPO} …"
+ _run_borg_with_passphrase list "${_REPO}"
+ _ARCHIVE=$(echo "${_OUTPUT}" | grep "${_NAME_ARCHIVE}" | tail -1 | cut -f1 -d' ')
+
+ # pull archive
+ echo "Pulling archive: ${_ARCHIVE}"
+ cd /
+ borg extract --verbose "${_REPO}::${_ARCHIVE}"
+}
+
+USAGE_DESC_orgpush='push org directory to repos'
+CMDFNC_orgpush() {
+ expect_n_args 0 0 '' $@
+ _NAME_ARCHIVE=orgdir
+
+ for _FILENAME in $(ls "${PATH_BORG_CONF_SECURITY}/"); do
+ _REPO="$(cat $(path_repo_location ${_FILENAME}))"
+ _ARCHIVE="${_REPO}::${_NAME_ARCHIVE}-{utcnow:%Y-%m-%dT%H:%M}"
+ _run_borg_with_passphrase create --verbose "${_ARCHIVE}" "${HOME}/org"
+ done
+}
+
+# parse args to execution
+if [ "$#" -lt 1 ]; then
+ error_exit_with_usage 'missing command.'
+fi
+for CMD in ${USAGE_INDICES}; do
+ if [ "$1" = "${CMD}" ]; then
+ break
+ fi
+ CMD=
+done
+if [ -z "${CMD}" ]; then
+ error_exit_with_usage "unknown command: ${1}"
+fi
+shift 1
+"CMDFNC_${CMD}" $@
--- /dev/null
+#!/bin/sh
+set -e
+
+cd $(dirname "$0")
+. lib/abort_if_exists
+. lib/constants_borg # NAME_BORGAPP, PATH_BORG_CONF
+. lib/constants_secrets # PATH_REL_SECRETS, PATH_SECRETS, PATH_SECRETS_BORGKEYS
+. lib/constants_ssh # PATH_USER_SSH
+. lib/constants_user # USERNAME
+. lib/mount_secrets # mount_secrets, copy_and_unmount_secrets
+
+abort_if_exists "${PATH_SECRETS}"
+echo "Collecting new ${PATH_REL_SECRETS}."
+mkdir "${PATH_SECRETS}"
+"${NAME_BORGAPP}" backup_keys "${PATH_SECRETS_BORGKEYS}"
+cp -a "${PATH_USER_SSH}" "${PATH_SECRETS_SSH}"
+echo "secrets file, last update: $(whoami)/$(hostname) at $(date)" > "${PATH_SECRETS}/info"
+
+mount_secrets "$1" # sets PATH_MOUNTED_SECRETS
+SUFFIX_OLD=.old
+PATH_REL_SECRETS_OLD="${PATH_REL_SECRETS}${SUFFIX_OLD}"
+PATH_MOUNTED_SECRETS_OLD="${PATH_MOUNTED_SECRETS}${SUFFIX_OLD}"
+if [ -d "${PATH_MOUNTED_SECRETS}" ]; then
+ echo "Drive already has ${PATH_REL_SECRETS}, moving to ${PATH_REL_SECRETS_OLD}."
+ rm -rf "${PATH_MOUNTED_SECRETS_OLD}"
+ mv "${PATH_MOUNTED_SECRETS}" "${PATH_MOUNTED_SECRETS_OLD}"
+fi
+copy_and_unmount_secrets 'out'
--- /dev/null
+#!/bin/sh
+set -e
+cd $(dirname "$0")
+. lib/abort
+. lib/audio_dev_is_mute
+. lib/print_usage
+
+MAX_LOUDNESS=150
+
+FLAG_HELP_SHORT='-h'
+FLAG_HELP_LONG='--help'
+
+USAGE_DESCRIPTION='Set audio volume, or (if called without any arguments) toggle audio device muteness.\n\nAvailable arguments:'
+USAGE_LINES='[COMMAND]\nLOUDNESS'
+USAGE_INDICES='LOUDNESS _help'
+USAGE_DESC_LOUDNESS='audio volume to set (as percentage, must be integer)'
+USAGE_DESC__help='display this help and exit'
+USAGE_NAME__help="${FLAG_HELP_SHORT}, ${FLAG_HELP_LONG}"
+
+error_exit() { abort "Aborting due to $1\n\n$(print_usage)"; }
+
+toggle_mute() {
+ if audio_dev_is_mute; then
+ MUTE_BOOL=0
+ MUTE_WORD=off
+ else
+ MUTE_BOOL=1
+ MUTE_WORD=on
+ fi
+ pacmd set-sink-mute 0 "${MUTE_BOOL}"
+ echo "Toggled audio device muteness ${MUTE_WORD}."
+}
+
+set_vol_percentage() {
+ AT_FULL=65536
+ pacmd set-sink-volume 0 $(calc "($1 * ${AT_FULL} // 100)")
+ echo -n "Audio volume set to ${1}%."
+ audio_dev_is_mute && echo -n " (But audio device is muted.)"
+ echo
+}
+
+N_MAX_ARGS=1
+if [ "$#" -gt "${N_MAX_ARGS}" ]; then
+ error_exit "number of arguments greater ${N_MAX_ARGS}."
+elif [ -z "$1" ]; then
+ toggle_mute
+elif [ -z "$(echo -n $1 | sed 's/[0-9]*//g')" ]; then
+ if [ "$1" -gt "${MAX_LOUDNESS}" ]; then
+ error_exit "demand for unreasonably high loudness: $1."
+ fi
+ set_vol_percentage "$1"
+elif [ "$1" = "$FLAG_HELP_SHORT" ] || [ "$1" = "$FLAG_HELP_LONG" ]; then
+ print_usage
+else
+ error_exit "unrecognized argument: $1"
+fi
--- /dev/null
+../../../scripts/lib/abort
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/abort_if_exists
\ No newline at end of file
--- /dev/null
+audio_dev_is_mute() {
+ [ "$(pactl get-sink-mute 0)" = "Mute: yes" ]
+}
--- /dev/null
+../../../scripts/lib/constants_borg
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/constants_secrets
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/constants_ssh
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/constants_user
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/expect_min_n_args
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/expect_n_args
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/get_passphrase
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/mount_secrets
\ No newline at end of file
--- /dev/null
+../../../scripts/lib/path_tmp_timestamped
\ No newline at end of file
--- /dev/null
+print_usage() {
+ echo 'Usage:'
+ echo "${USAGE_LINES}" | while read _LINE; do
+ echo " $(basename $0) ${_LINE}"
+ done
+ echo "\n${USAGE_DESCRIPTION}\n"
+ _var_of() { eval printf '"%s"' '"${'"${1}${2}"'}"'; }
+ _build_index() {
+ _ARGS="$(_var_of 'USAGE_ARGS_' ${_IDX})"
+ if [ ! -z "${_ARGS}" ]; then
+ _ARGS=" ${_ARGS}"
+ fi
+ _NAME="${_IDX}"
+ _ALT_NAME="$(_var_of 'USAGE_NAME_' ${_IDX})"
+ if [ ! -z "${_ALT_NAME}" ]; then
+ _NAME="${_ALT_NAME}"
+ fi
+ _KEY=" ${_NAME}${_ARGS}"
+ _LEN_KEY=$(echo -n "${_KEY}" | wc -c)
+ }
+ _MAX_LEN_KEY=0
+ for _IDX in ${USAGE_INDICES}; do
+ _build_index
+ if [ "${_LEN_KEY}" -gt "${_MAX_LEN_KEY}" ]; then
+ _MAX_LEN_KEY="${_LEN_KEY}"
+ fi
+ done
+ for _IDX in ${USAGE_INDICES}; do
+ _build_index
+ printf '%s' "${_KEY}"
+ _LEN_GAP=$(calc "${_MAX_LEN_KEY} - ${_LEN_KEY} + 4")
+ for _ in $(seq 1 ${_LEN_GAP}); do
+ printf ' '
+ done
+ printf '%s\n' "$(_var_of 'USAGE_DESC_' ${_IDX})"
+ done
+}
--- /dev/null
+../../../scripts/lib/retry_until
\ No newline at end of file
--- /dev/null
+# so we don't have to enter our SSH key password all the time
+eval $(ssh-agent) && ssh-add
+
+# zero audio volume (rather than "just" mute)
+vol 0
+
--- /dev/null
+bind j scrollline 3
+bind k scrollline -3
+set hintuppercase false
+set hintchars 123456qwertasdfgyxcvb
+
+set searchengine duckduckgo
+set searchurls.wiktionary https://en.wiktionary.org/w/index.php?search=
+set searchurls.dictcc https://www.dict.cc/?s=
+
+autocmd DocStart www.reddit.com urlmodify -t www.reddit old.reddit
+
+set theme dark
+guiset gui none
+guiset tabs always
+guiset hoverlink left
+
+escapehatch
--- /dev/null
+../../../bookworm/home/root/.shell_prompt_color
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+# see sway-bar(5) and swaybar-protocol(7)
+set -e
+
+. "${HOME}/.plomlib/audio_dev_is_mute"
+
+SYSCLASS_DIR=/sys/class
+
+COL_WHITE=dddddd
+COL_RED=dd0000
+COL_YELLOW=dddd00
+COL_GREEN=00dd00
+COL_GREY=aaaaaa
+
+print_bar_block() {
+ printf '{"full_text": "%s", ' "$1"
+ COLOR="${COL_GREY}"
+ if [ ! -z "$2" ]; then
+ COLOR="$2"
+ fi
+ printf '"color": "%s", ' "${COLOR}"
+ if [ "$3" = "0" ]; then
+ printf '"separator": false,\n'
+ printf '"separator_block_width": 0,'
+ fi
+ printf '"markup": "pango",\n'
+ printf '},\n'
+}
+
+print_calc() {
+ printf "%d" $(calc "$1")
+}
+
+color_at() {
+ IDX=0
+ while true; do
+ IDX=$(print_calc "${IDX} + 1")
+ STEP=$(echo "$2" | cut -d'_' -f${IDX})
+ if [ -z "${STEP}" ]; then
+ break
+ fi
+ LIMIT=$(echo "${STEP}" | cut -d':' -f1)
+ COLOR=$(echo "${STEP}" | cut -d':' -f2)
+ if [ "${LIMIT}" -ge "${1}" ]; then
+ printf "${COLOR}"
+ break
+ fi
+ done
+}
+
+print_clipboard() {
+ print_selection() {
+ print_bar_block "$1 [" "${COL_WHITE}" 0
+ CLEANED=$(wl-paste $2 | sed 's/"/\\"/g')
+ ELLIPSIS=
+ if [ $(echo "${CLEANED}" | wc -c) -gt 32 ]; then
+ CLEANED=$(echo "${CLEANED}" | cut -zc'-29')
+ ELLIPSIS='...'
+ fi
+ print_bar_block "${CLEANED}" "" 0
+ print_bar_block "${ELLIPSIS}]" "${COL_WHITE}" $3
+ }
+ print_selection 'wl-paste' '' 0
+ print_selection ' --primary' --primary
+}
+
+print_online() {
+ print_conn() {
+ print_bar_block "$(echo $1 | cut -c1):" "" 0
+ IP=$(ip --brief addr show | grep "$1" | sed -E 's/ +/\t/g' | cut -f3 | cut -f1 -d'/')
+ if [ -z "${IP}" ]; then
+ print_bar_block '-'
+ else
+ print_bar_block "${IP}" "${COL_WHITE}" "$2"
+ fi
+ }
+ print_conn enp
+ print_conn wlp 0
+ set +e
+ STATUS_WIFI=$(nmcli -t -f IN-USE,SSID,SIGNAL dev wifi | grep '^\*:')
+ set -e
+ if [ ! -z "${STATUS_WIFI}" ]; then
+ SIGNAL=$(echo -n "${STATUS_WIFI}" | cut -d':' -f3)
+ COLOR=$(color_at $SIGNAL "45:${COL_RED}_85:${COL_YELLOW}_100:${COL_GREEN}")
+ print_bar_block " ${SIGNAL}" "${COLOR}" 0
+ print_bar_block "% $(echo "${STATUS_WIFI}" | cut -d':' -f2)"
+ else
+ print_bar_block " "
+ fi
+}
+
+print_battery() {
+ BAT_DIR="${SYSCLASS_DIR}/power_supply/BAT0"
+
+ calc_percent () {
+ cat_energy() {
+ cat "${BAT_DIR}/energy_$1"
+ }
+ print_calc "100 * $(cat_energy $1) // $(cat_energy $2)"
+ }
+
+ CHARGE=$(calc_percent now full)
+ COLOR=$(color_at $CHARGE "25:${COL_RED}_65:${COL_YELLOW}_100:${COL_GREEN}")
+ print_bar_block "${CHARGE}%" "${COLOR}" 0
+
+ COLOR="${COL_WHITE}"
+ STATUS=$(cat "${BAT_DIR}/status")
+ CHARGING=?
+ if [ "${STATUS}" = "Not charging" ]; then
+ CHARGING=-
+ elif [ "${STATUS}" = "Charging" ]; then
+ CHARGING=^
+ COLOR="${COL_GREEN}"
+ elif [ "${STATUS}" = "Discharging" ]; then
+ CHARGING=v
+ COLOR="${COL_YELLOW}"
+ fi
+ print_bar_block "${CHARGING}" "${COLOR}" 0
+
+ print_bar_block "$(calc_percent full full_design)%"
+}
+
+print_temperature() {
+ COLOR="${COL_WHITE}"
+ TEMPERATURE=$(cat ${SYSCLASS_DIR}/thermal/thermal_zone0/temp)
+ TEMPERATURE_IN_C=$(print_calc "${TEMPERATURE} // 1000")
+ COLOR=$(color_at $TEMPERATURE_IN_C "65:${COL_GREEN}_85:${COL_YELLOW}_999:${COL_RED}")
+ print_bar_block "${TEMPERATURE_IN_C}" "${COLOR}" 0
+ print_bar_block '°'
+}
+
+print_datetime() {
+ DATE=$(date +'%Y-%m-%d')
+ TIME=$(date +'%H:%M:%S')
+ TZ=$(date +'/%Z')
+ print_bar_block "${DATE} " "" 0
+ print_bar_block "${TIME}" "${COL_WHITE}" 0
+ print_bar_block "${TZ}" ""
+}
+
+print_volume() {
+ print_bar_block "vol " '' 0
+ VOLUME="$(pactl get-sink-volume 0 | head -1 | sed 's/ //g' | cut -d'/' -f2)"
+ if audio_dev_is_mute; then
+ print_bar_block "<s>${VOLUME}</s>"
+ else
+ print_bar_block "${VOLUME}" "${COL_YELLOW}"
+ fi
+}
+
+print_keyboard() {
+ LAYOUT=$(swaymsg -t get_inputs | grep 'xkb_active_layout_name' | sed -E 's/[ ,"]+//g' | cut -d':' -f2 | head -1)
+ if [ "${LAYOUT}" = "English(US)" ]; then
+ LAYOUT=us
+ elif [ "${LAYOUT}" = "German" ]; then
+ LAYOUT=de
+ else
+ LAYOUT=??
+ fi
+ print_bar_block "kb_${LAYOUT}"
+}
+
+printf '{"version": 1}\n['
+while true; do
+ printf '['
+ print_clipboard
+ print_online
+ print_battery
+ print_temperature
+ print_datetime
+ print_volume
+ print_keyboard
+ printf '],'
+ sleep 0.1
+done
--- /dev/null
+[user]
+ email = c.heller@plomlompom.de
+ name = Christian Heller
--- /dev/null
+../../../../../../bookworm/copy/all/etc/apt/apt.conf.d/99_minimize_dependencies
\ No newline at end of file
--- /dev/null
+deb http://deb.debian.org/debian testing main contrib non-free non-free-firmware
+deb http://security.debian.org/debian-security testing-security main contrib non-free non-free-firmware
--- /dev/null
+LANG="en_US.UTF-8"
--- /dev/null
+# This file lists locales that you wish to have built. You can find a list
+# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
+# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
+# this file, you need to rerun locale-gen.
+
+
+# aa_DJ ISO-8859-1
+# aa_DJ.UTF-8 UTF-8
+# aa_ER UTF-8
+# aa_ER@saaho UTF-8
+# aa_ET UTF-8
+# af_ZA ISO-8859-1
+# af_ZA.UTF-8 UTF-8
+# ak_GH UTF-8
+# am_ET UTF-8
+# an_ES ISO-8859-15
+# an_ES.UTF-8 UTF-8
+# anp_IN UTF-8
+# ar_AE ISO-8859-6
+# ar_AE.UTF-8 UTF-8
+# ar_BH ISO-8859-6
+# ar_BH.UTF-8 UTF-8
+# ar_DZ ISO-8859-6
+# ar_DZ.UTF-8 UTF-8
+# ar_EG ISO-8859-6
+# ar_EG.UTF-8 UTF-8
+# ar_IN UTF-8
+# ar_IQ ISO-8859-6
+# ar_IQ.UTF-8 UTF-8
+# ar_JO ISO-8859-6
+# ar_JO.UTF-8 UTF-8
+# ar_KW ISO-8859-6
+# ar_KW.UTF-8 UTF-8
+# ar_LB ISO-8859-6
+# ar_LB.UTF-8 UTF-8
+# ar_LY ISO-8859-6
+# ar_LY.UTF-8 UTF-8
+# ar_MA ISO-8859-6
+# ar_MA.UTF-8 UTF-8
+# ar_OM ISO-8859-6
+# ar_OM.UTF-8 UTF-8
+# ar_QA ISO-8859-6
+# ar_QA.UTF-8 UTF-8
+# ar_SA ISO-8859-6
+# ar_SA.UTF-8 UTF-8
+# ar_SD ISO-8859-6
+# ar_SD.UTF-8 UTF-8
+# ar_SS UTF-8
+# ar_SY ISO-8859-6
+# ar_SY.UTF-8 UTF-8
+# ar_TN ISO-8859-6
+# ar_TN.UTF-8 UTF-8
+# ar_YE ISO-8859-6
+# ar_YE.UTF-8 UTF-8
+# as_IN UTF-8
+# ast_ES ISO-8859-15
+# ast_ES.UTF-8 UTF-8
+# ayc_PE UTF-8
+# az_AZ UTF-8
+# be_BY CP1251
+# be_BY.UTF-8 UTF-8
+# be_BY@latin UTF-8
+# bem_ZM UTF-8
+# ber_DZ UTF-8
+# ber_MA UTF-8
+# bg_BG CP1251
+# bg_BG.UTF-8 UTF-8
+# bhb_IN.UTF-8 UTF-8
+# bho_IN UTF-8
+# bn_BD UTF-8
+# bn_IN UTF-8
+# bo_CN UTF-8
+# bo_IN UTF-8
+# br_FR ISO-8859-1
+# br_FR.UTF-8 UTF-8
+# br_FR@euro ISO-8859-15
+# brx_IN UTF-8
+# bs_BA ISO-8859-2
+# bs_BA.UTF-8 UTF-8
+# byn_ER UTF-8
+# ca_AD ISO-8859-15
+# ca_AD.UTF-8 UTF-8
+# ca_ES ISO-8859-1
+# ca_ES.UTF-8 UTF-8
+# ca_ES.UTF-8@valencia UTF-8
+# ca_ES@euro ISO-8859-15
+# ca_ES@valencia ISO-8859-15
+# ca_FR ISO-8859-15
+# ca_FR.UTF-8 UTF-8
+# ca_IT ISO-8859-15
+# ca_IT.UTF-8 UTF-8
+# ce_RU UTF-8
+# chr_US UTF-8
+# cmn_TW UTF-8
+# crh_UA UTF-8
+# cs_CZ ISO-8859-2
+# cs_CZ.UTF-8 UTF-8
+# csb_PL UTF-8
+# cv_RU UTF-8
+# cy_GB ISO-8859-14
+# cy_GB.UTF-8 UTF-8
+# da_DK ISO-8859-1
+# da_DK.UTF-8 UTF-8
+# de_AT ISO-8859-1
+# de_AT.UTF-8 UTF-8
+# de_AT@euro ISO-8859-15
+# de_BE ISO-8859-1
+# de_BE.UTF-8 UTF-8
+# de_BE@euro ISO-8859-15
+# de_CH ISO-8859-1
+# de_CH.UTF-8 UTF-8
+# de_DE ISO-8859-1
+# de_DE.UTF-8 UTF-8
+# de_DE@euro ISO-8859-15
+# de_IT ISO-8859-1
+# de_IT.UTF-8 UTF-8
+# de_LI.UTF-8 UTF-8
+# de_LU ISO-8859-1
+# de_LU.UTF-8 UTF-8
+# de_LU@euro ISO-8859-15
+# doi_IN UTF-8
+# dv_MV UTF-8
+# dz_BT UTF-8
+# el_CY ISO-8859-7
+# el_CY.UTF-8 UTF-8
+# el_GR ISO-8859-7
+# el_GR.UTF-8 UTF-8
+# en_AG UTF-8
+# en_AU ISO-8859-1
+# en_AU.UTF-8 UTF-8
+# en_BW ISO-8859-1
+# en_BW.UTF-8 UTF-8
+# en_CA ISO-8859-1
+# en_CA.UTF-8 UTF-8
+# en_DK ISO-8859-1
+# en_DK.ISO-8859-15 ISO-8859-15
+# en_DK.UTF-8 UTF-8
+# en_GB ISO-8859-1
+# en_GB.ISO-8859-15 ISO-8859-15
+# en_GB.UTF-8 UTF-8
+# en_HK ISO-8859-1
+# en_HK.UTF-8 UTF-8
+# en_IE ISO-8859-1
+# en_IE.UTF-8 UTF-8
+# en_IE@euro ISO-8859-15
+# en_IL UTF-8
+# en_IN UTF-8
+# en_NG UTF-8
+# en_NZ ISO-8859-1
+# en_NZ.UTF-8 UTF-8
+# en_PH ISO-8859-1
+# en_PH.UTF-8 UTF-8
+# en_SG ISO-8859-1
+# en_SG.UTF-8 UTF-8
+# en_US ISO-8859-1
+# en_US.ISO-8859-15 ISO-8859-15
+en_US.UTF-8 UTF-8
+# en_ZA ISO-8859-1
+# en_ZA.UTF-8 UTF-8
+# en_ZM UTF-8
+# en_ZW ISO-8859-1
+# en_ZW.UTF-8 UTF-8
+# eo UTF-8
+# es_AR ISO-8859-1
+# es_AR.UTF-8 UTF-8
+# es_BO ISO-8859-1
+# es_BO.UTF-8 UTF-8
+# es_CL ISO-8859-1
+# es_CL.UTF-8 UTF-8
+# es_CO ISO-8859-1
+# es_CO.UTF-8 UTF-8
+# es_CR ISO-8859-1
+# es_CR.UTF-8 UTF-8
+# es_CU UTF-8
+# es_DO ISO-8859-1
+# es_DO.UTF-8 UTF-8
+# es_EC ISO-8859-1
+# es_EC.UTF-8 UTF-8
+# es_ES ISO-8859-1
+# es_ES.UTF-8 UTF-8
+# es_ES@euro ISO-8859-15
+# es_GT ISO-8859-1
+# es_GT.UTF-8 UTF-8
+# es_HN ISO-8859-1
+# es_HN.UTF-8 UTF-8
+# es_MX ISO-8859-1
+# es_MX.UTF-8 UTF-8
+# es_NI ISO-8859-1
+# es_NI.UTF-8 UTF-8
+# es_PA ISO-8859-1
+# es_PA.UTF-8 UTF-8
+# es_PE ISO-8859-1
+# es_PE.UTF-8 UTF-8
+# es_PR ISO-8859-1
+# es_PR.UTF-8 UTF-8
+# es_PY ISO-8859-1
+# es_PY.UTF-8 UTF-8
+# es_SV ISO-8859-1
+# es_SV.UTF-8 UTF-8
+# es_US ISO-8859-1
+# es_US.UTF-8 UTF-8
+# es_UY ISO-8859-1
+# es_UY.UTF-8 UTF-8
+# es_VE ISO-8859-1
+# es_VE.UTF-8 UTF-8
+# et_EE ISO-8859-1
+# et_EE.ISO-8859-15 ISO-8859-15
+# et_EE.UTF-8 UTF-8
+# eu_ES ISO-8859-1
+# eu_ES.UTF-8 UTF-8
+# eu_ES@euro ISO-8859-15
+# eu_FR ISO-8859-1
+# eu_FR.UTF-8 UTF-8
+# eu_FR@euro ISO-8859-15
+# fa_IR UTF-8
+# ff_SN UTF-8
+# fi_FI ISO-8859-1
+# fi_FI.UTF-8 UTF-8
+# fi_FI@euro ISO-8859-15
+# fil_PH UTF-8
+# fo_FO ISO-8859-1
+# fo_FO.UTF-8 UTF-8
+# fr_BE ISO-8859-1
+# fr_BE.UTF-8 UTF-8
+# fr_BE@euro ISO-8859-15
+# fr_CA ISO-8859-1
+# fr_CA.UTF-8 UTF-8
+# fr_CH ISO-8859-1
+# fr_CH.UTF-8 UTF-8
+# fr_FR ISO-8859-1
+# fr_FR.UTF-8 UTF-8
+# fr_FR@euro ISO-8859-15
+# fr_LU ISO-8859-1
+# fr_LU.UTF-8 UTF-8
+# fr_LU@euro ISO-8859-15
+# fur_IT UTF-8
+# fy_DE UTF-8
+# fy_NL UTF-8
+# ga_IE ISO-8859-1
+# ga_IE.UTF-8 UTF-8
+# ga_IE@euro ISO-8859-15
+# gd_GB ISO-8859-15
+# gd_GB.UTF-8 UTF-8
+# gez_ER UTF-8
+# gez_ER@abegede UTF-8
+# gez_ET UTF-8
+# gez_ET@abegede UTF-8
+# gl_ES ISO-8859-1
+# gl_ES.UTF-8 UTF-8
+# gl_ES@euro ISO-8859-15
+# gu_IN UTF-8
+# gv_GB ISO-8859-1
+# gv_GB.UTF-8 UTF-8
+# ha_NG UTF-8
+# hak_TW UTF-8
+# he_IL ISO-8859-8
+# he_IL.UTF-8 UTF-8
+# hi_IN UTF-8
+# hne_IN UTF-8
+# hr_HR ISO-8859-2
+# hr_HR.UTF-8 UTF-8
+# hsb_DE ISO-8859-2
+# hsb_DE.UTF-8 UTF-8
+# ht_HT UTF-8
+# hu_HU ISO-8859-2
+# hu_HU.UTF-8 UTF-8
+# hy_AM UTF-8
+# hy_AM.ARMSCII-8 ARMSCII-8
+# ia_FR UTF-8
+# id_ID ISO-8859-1
+# id_ID.UTF-8 UTF-8
+# ig_NG UTF-8
+# ik_CA UTF-8
+# is_IS ISO-8859-1
+# is_IS.UTF-8 UTF-8
+# it_CH ISO-8859-1
+# it_CH.UTF-8 UTF-8
+# it_IT ISO-8859-1
+# it_IT.UTF-8 UTF-8
+# it_IT@euro ISO-8859-15
+# iu_CA UTF-8
+# ja_JP.EUC-JP EUC-JP
+# ja_JP.UTF-8 UTF-8
+# ka_GE GEORGIAN-PS
+# ka_GE.UTF-8 UTF-8
+# kk_KZ PT154
+# kk_KZ.RK1048 RK1048
+# kk_KZ.UTF-8 UTF-8
+# kl_GL ISO-8859-1
+# kl_GL.UTF-8 UTF-8
+# km_KH UTF-8
+# kn_IN UTF-8
+# ko_KR.EUC-KR EUC-KR
+# ko_KR.UTF-8 UTF-8
+# kok_IN UTF-8
+# ks_IN UTF-8
+# ks_IN@devanagari UTF-8
+# ku_TR ISO-8859-9
+# ku_TR.UTF-8 UTF-8
+# kw_GB ISO-8859-1
+# kw_GB.UTF-8 UTF-8
+# ky_KG UTF-8
+# lb_LU UTF-8
+# lg_UG ISO-8859-10
+# lg_UG.UTF-8 UTF-8
+# li_BE UTF-8
+# li_NL UTF-8
+# lij_IT UTF-8
+# ln_CD UTF-8
+# lo_LA UTF-8
+# lt_LT ISO-8859-13
+# lt_LT.UTF-8 UTF-8
+# lv_LV ISO-8859-13
+# lv_LV.UTF-8 UTF-8
+# lzh_TW UTF-8
+# mag_IN UTF-8
+# mai_IN UTF-8
+# mg_MG ISO-8859-15
+# mg_MG.UTF-8 UTF-8
+# mhr_RU UTF-8
+# mi_NZ ISO-8859-13
+# mi_NZ.UTF-8 UTF-8
+# mk_MK ISO-8859-5
+# mk_MK.UTF-8 UTF-8
+# ml_IN UTF-8
+# mn_MN UTF-8
+# mni_IN UTF-8
+# mr_IN UTF-8
+# ms_MY ISO-8859-1
+# ms_MY.UTF-8 UTF-8
+# mt_MT ISO-8859-3
+# mt_MT.UTF-8 UTF-8
+# my_MM UTF-8
+# nan_TW UTF-8
+# nan_TW@latin UTF-8
+# nb_NO ISO-8859-1
+# nb_NO.UTF-8 UTF-8
+# nds_DE UTF-8
+# nds_NL UTF-8
+# ne_NP UTF-8
+# nhn_MX UTF-8
+# niu_NU UTF-8
+# niu_NZ UTF-8
+# nl_AW UTF-8
+# nl_BE ISO-8859-1
+# nl_BE.UTF-8 UTF-8
+# nl_BE@euro ISO-8859-15
+# nl_NL ISO-8859-1
+# nl_NL.UTF-8 UTF-8
+# nl_NL@euro ISO-8859-15
+# nn_NO ISO-8859-1
+# nn_NO.UTF-8 UTF-8
+# nr_ZA UTF-8
+# nso_ZA UTF-8
+# oc_FR ISO-8859-1
+# oc_FR.UTF-8 UTF-8
+# om_ET UTF-8
+# om_KE ISO-8859-1
+# om_KE.UTF-8 UTF-8
+# or_IN UTF-8
+# os_RU UTF-8
+# pa_IN UTF-8
+# pa_PK UTF-8
+# pap_AW UTF-8
+# pap_CW UTF-8
+# pl_PL ISO-8859-2
+# pl_PL.UTF-8 UTF-8
+# ps_AF UTF-8
+# pt_BR ISO-8859-1
+# pt_BR.UTF-8 UTF-8
+# pt_PT ISO-8859-1
+# pt_PT.UTF-8 UTF-8
+# pt_PT@euro ISO-8859-15
+# quz_PE UTF-8
+# raj_IN UTF-8
+# ro_RO ISO-8859-2
+# ro_RO.UTF-8 UTF-8
+# ru_RU ISO-8859-5
+# ru_RU.CP1251 CP1251
+# ru_RU.KOI8-R KOI8-R
+# ru_RU.UTF-8 UTF-8
+# ru_UA KOI8-U
+# ru_UA.UTF-8 UTF-8
+# rw_RW UTF-8
+# sa_IN UTF-8
+# sat_IN UTF-8
+# sc_IT UTF-8
+# sd_IN UTF-8
+# sd_IN@devanagari UTF-8
+# se_NO UTF-8
+# sgs_LT UTF-8
+# shs_CA UTF-8
+# si_LK UTF-8
+# sid_ET UTF-8
+# sk_SK ISO-8859-2
+# sk_SK.UTF-8 UTF-8
+# sl_SI ISO-8859-2
+# sl_SI.UTF-8 UTF-8
+# so_DJ ISO-8859-1
+# so_DJ.UTF-8 UTF-8
+# so_ET UTF-8
+# so_KE ISO-8859-1
+# so_KE.UTF-8 UTF-8
+# so_SO ISO-8859-1
+# so_SO.UTF-8 UTF-8
+# sq_AL ISO-8859-1
+# sq_AL.UTF-8 UTF-8
+# sq_MK UTF-8
+# sr_ME UTF-8
+# sr_RS UTF-8
+# sr_RS@latin UTF-8
+# ss_ZA UTF-8
+# st_ZA ISO-8859-1
+# st_ZA.UTF-8 UTF-8
+# sv_FI ISO-8859-1
+# sv_FI.UTF-8 UTF-8
+# sv_FI@euro ISO-8859-15
+# sv_SE ISO-8859-1
+# sv_SE.ISO-8859-15 ISO-8859-15
+# sv_SE.UTF-8 UTF-8
+# sw_KE UTF-8
+# sw_TZ UTF-8
+# szl_PL UTF-8
+# ta_IN UTF-8
+# ta_LK UTF-8
+# tcy_IN.UTF-8 UTF-8
+# te_IN UTF-8
+# tg_TJ KOI8-T
+# tg_TJ.UTF-8 UTF-8
+# th_TH TIS-620
+# th_TH.UTF-8 UTF-8
+# the_NP UTF-8
+# ti_ER UTF-8
+# ti_ET UTF-8
+# tig_ER UTF-8
+# tk_TM UTF-8
+# tl_PH ISO-8859-1
+# tl_PH.UTF-8 UTF-8
+# tn_ZA UTF-8
+# tr_CY ISO-8859-9
+# tr_CY.UTF-8 UTF-8
+# tr_TR ISO-8859-9
+# tr_TR.UTF-8 UTF-8
+# ts_ZA UTF-8
+# tt_RU UTF-8
+# tt_RU@iqtelif UTF-8
+# ug_CN UTF-8
+# uk_UA KOI8-U
+# uk_UA.UTF-8 UTF-8
+# unm_US UTF-8
+# ur_IN UTF-8
+# ur_PK UTF-8
+# uz_UZ ISO-8859-1
+# uz_UZ.UTF-8 UTF-8
+# uz_UZ@cyrillic UTF-8
+# ve_ZA UTF-8
+# vi_VN UTF-8
+# wa_BE ISO-8859-1
+# wa_BE.UTF-8 UTF-8
+# wa_BE@euro ISO-8859-15
+# wae_CH UTF-8
+# wal_ET UTF-8
+# wo_SN UTF-8
+# xh_ZA ISO-8859-1
+# xh_ZA.UTF-8 UTF-8
+# yi_US CP1255
+# yi_US.UTF-8 UTF-8
+# yo_NG UTF-8
+# yue_HK UTF-8
+# zh_CN GB2312
+# zh_CN.GB18030 GB18030
+# zh_CN.GBK GBK
+# zh_CN.UTF-8 UTF-8
+# zh_HK BIG5-HKSCS
+# zh_HK.UTF-8 UTF-8
+# zh_SG GB2312
+# zh_SG.GBK GBK
+# zh_SG.UTF-8 UTF-8
+# zh_TW BIG5
+# zh_TW.EUC-TW EUC-TW
+# zh_TW.UTF-8 UTF-8
+# zu_ZA ISO-8859-1
+# zu_ZA.UTF-8 UTF-8
--- /dev/null
+Europe/Berlin
--- /dev/null
+../../../../../bookworm/copy/all/home/plom/.bash_profile
\ No newline at end of file
--- /dev/null
+../../../../../bookworm/copy/all/home/plom/.bashrc
\ No newline at end of file
--- /dev/null
+../../.plomlib
+lib
--- /dev/null
+../../../../../../bookworm/copy/all/home/plom/.plomlib/file_dot_variants
\ No newline at end of file
--- /dev/null
+../../../../../bookworm/copy/all/home/plom/.profile
\ No newline at end of file
--- /dev/null
+../home/plom/.bash_profile
\ No newline at end of file
--- /dev/null
+../home/plom/.bashrc
\ No newline at end of file
--- /dev/null
+../home/plom/.local
\ No newline at end of file
--- /dev/null
+../home/plom/.plomlib
\ No newline at end of file
--- /dev/null
+../home/plom/.profile
\ No newline at end of file
--- /dev/null
+../../../../bookworm/copy/all/root/.shell_prompt_color
\ No newline at end of file
--- /dev/null
+# This file describes the network interfaces available on your system
+# and how to activate them. For more information, see interfaces(5).
+
+source /etc/network/interfaces.d/*
+
+# The loopback network interface
+auto lo
+iface lo inet loopback
+
+# anything more would only confuse NetworkManager
--- /dev/null
+# mere "kb" might be more flexible, but this way I won't accidentally try for
+# a non-existing "en" layout
+alias kb_de="swaymsg 'input * xkb_layout de'"
+alias kb_us="swaymsg 'input * xkb_layout us'"
--- /dev/null
+# because these are included by /etc/sway/config for probably good reason …
+include /etc/sway/config-vars.d/*
+include /etc/sway/config.d/*
+
+# font for wm text
+font pango:Terminus 16px
+
+# force "tabbed" as default layout for new windows
+workspace_layout tabbed
+
+# simple green background
+output * background #559911 solid_color
+
+# keyboard layout
+input * xkb_layout "us"
+
+# waybar
+bar {
+ position top
+ status_command ~/.nonpath_bins/status.sh
+}
+
+# make Windows key modifier key for all wm actions
+set $mod Mod4
+floating_modifier $mod
+
+# program launcher
+bindsym $mod+d exec wmenu-run
+bindsym $mod+x exec wmenu-run
+
+# launch terminal emulator
+bindsym $mod+Return exec foot --font=monospace:size=12
+
+# kill window
+bindsym $mod+Shift+q kill
+
+# move focus between windows, but not by mouse
+bindsym $mod+Left focus left
+bindsym $mod+Down focus down
+bindsym $mod+Up focus up
+bindsym $mod+Right focus right
+focus_follows_mouse no
+
+# move windows
+bindsym $mod+Shift+Left move left
+bindsym $mod+Shift+Down move down
+bindsym $mod+Shift+Up move up
+bindsym $mod+Shift+Right move right
+
+# resize windows
+bindsym $mod+h resize shrink width 1 px or 1 ppt
+bindsym $mod+l resize grow width 1 px or 1 ppt
+bindsym $mod+j resize shrink height
+bindsym $mod+k resize grow height
+
+# toggle fullscreen for focused window
+bindsym $mod+f fullscreen
+
+# toggle floating of window, focus on floating or tabbed windows.
+bindsym $mod+Shift+space floating toggle
+bindsym $mod+space focus mode_toggle
+
+# reload config file
+bindsym $mod+Shift+c reload
+
+# stop wm
+bindsym $mod+Shift+p exit
+
+# switch workspaces
+bindsym $mod+1 workspace 1
+bindsym $mod+2 workspace 2
+bindsym $mod+3 workspace 3
+bindsym $mod+4 workspace 4
+bindsym $mod+5 workspace 5
+bindsym $mod+6 workspace 6
+bindsym $mod+7 workspace 7
+bindsym $mod+8 workspace 8
+bindsym $mod+9 workspace 9
+bindsym $mod+0 workspace 10
+
+# move window to workspace
+bindsym $mod+Shift+1 move workspace 1
+bindsym $mod+Shift+2 move workspace 2
+bindsym $mod+Shift+3 move workspace 3
+bindsym $mod+Shift+4 move workspace 4
+bindsym $mod+Shift+5 move workspace 5
+bindsym $mod+Shift+6 move workspace 6
+bindsym $mod+Shift+7 move workspace 7
+bindsym $mod+Shift+8 move workspace 8
+bindsym $mod+Shift+9 move workspace 9
+bindsym $mod+Shift+0 move workspace 10
--- /dev/null
+#!/bin/sh
+set -e
+cd $(dirname "$0")
+. lib/abort
+. lib/constants_borg # PATH_BORG_CONF
+. lib/expect_n_args
+. lib/get_passphrase
+. lib/path_tmp_timestamped
+. lib/print_usage
+. lib/retry_until
+cd - > /dev/null
+
+USAGE_DESCRIPTION='Wrapper around certain borgbackup usages.\n\nAvailable commands:'
+USAGE_LINES='COMMAND [ARGUMENT]...'
+
+PATH_BORG_CONF_SECURITY="${PATH_BORG_CONF}/security"
+PATH_BORG_CONF_KEYS="${PATH_BORG_CONF}/keys"
+location_from_servername() { printf 'ssh://borg@%s/./borgrepo' "$1"; }
+servername_from_location() { echo "$1" | cut -d'/' -f3 | cut -d'@' -f2; }
+path_repo_location() { printf '%s' "${PATH_BORG_CONF_SECURITY}/${1}/location"; }
+
+# exits
+export BORG_EXIT_CODES=modern
+error_exit() { abort "Aborting due to $1"; }
+error_exit_with_usage() { error_exit "${1}\n\n$(print_usage)"; }
+exit_ok() { echo "$@"; exit 0; }
+
+# commands
+USAGE_INDICES='backup_keys claim help info init keys orgpull orgpush'
+
+_run_borg_with_passphrase() {
+ _FIRST_RUN=1
+ _ON_LOOP_START='
+ if [ -z "${BORG_PASSPHRASE}" ]; then
+ printf "Passphrase:"
+ export BORG_PASSPHRASE="$(get_passphrase)"
+ echo ""
+ fi
+ '
+ _TO_TEST='borg '"$@"
+ _ON_FAIL='echo "unexpected borg error, code ${_RESULT}."'
+ _ON_LOOP_END='export BORG_PASSPHRASE='
+ retry_until 52 "${_ON_LOOP_START}" "${_TO_TEST}" "${_ON_FAIL}" "${_ON_LOOP_END}"
+}
+
+_id_from_file() { head -1 "$1" | cut -d' ' -f2; }
+
+USAGE_ARGS_backup_keys='PATH'
+USAGE_DESC_backup_keys="copy known keys to PATH/, with their repos' server names as filenames"
+CMDFNC_backup_keys() {
+ expect_n_args 1 1 "${USAGE_ARGS_backup_keys}" $@
+ _PATH_TARGET_DIR=$(realpath "$1")
+ if [ -e "${_PATH_TARGET_DIR}" ] && [ ! -d "${_PATH_TARGET_DIR}" ]; then
+ error_exit "non-directory at ${_PATH_TARGET_DIR}"
+ fi
+ mkdir -p "${_PATH_TARGET_DIR}"
+ cd "${PATH_BORG_CONF_KEYS}"
+ ls -1 | while read _FILENAME; do
+ _KEY_ID=$(_id_from_file "${_FILENAME}")
+ _PATH_LOC="$(path_repo_location ${_KEY_ID})"
+ if [ ! -f "${_PATH_LOC}" ]; then
+ echo "Ignoring ${_FILENAME} due to lack of matching location file."
+ continue
+ fi
+ _NAME_SERVER=$(servername_from_location "$(cat ${_PATH_LOC})")
+ _PATH_TARGET="${_PATH_TARGET_DIR}/${_NAME_SERVER}"
+ echo "Copying ${_FILENAME} to ${_PATH_TARGET} …"
+ cp "${_FILENAME}" "${_PATH_TARGET}"
+ done
+ cd - > /dev/null
+}
+
+USAGE_ARGS_claim='PATH'
+USAGE_DESC_claim="register file of PATH as key to repo at \"$(location_from_servername SERVER_NAME)\", with SERVER_NAME the filename portion of PATH"
+CMDFNC_claim() {
+ expect_n_args 1 1 "${USAGE_ARGS_claim}" $@
+ _PATH_SOURCE="$1"
+ _ensure_no_overwrite_at() {
+ if [ -f "$1" ]; then
+ error_exit "refusing to overwrite pre-existing file at $1"
+ fi
+ }
+
+ _FILENAME=$(basename ${_PATH_SOURCE})
+ _PATH_TARGET_KEY="${PATH_BORG_CONF_KEYS}/${_FILENAME}"
+ if [ ! -f "${_PATH_SOURCE}" ]; then
+ error_exit "no file at ${_PATH_SOURCE}"
+ fi
+ _ensure_no_overwrite_at "${_PATH_TARGET_KEY}"
+ _REPO_ID="$(_id_from_file ${_PATH_SOURCE})"
+ if [ ! -z "$(echo ${_REPO_ID} | sed 's/[a-f0-9]//g')" ]; then
+ error_exit "inability to parse valid repo ID from alleged key file at $1"
+ fi
+ _PATH_TARGET_LOCATION="$(path_repo_location ${_REPO_ID})"
+ _ensure_no_overwrite_at "${_PATH_TARGET_LOCATION}"
+ mkdir -p "${PATH_BORG_CONF_KEYS}" "$(dirname ${_PATH_TARGET_LOCATION})"
+ echo "Copying ${_PATH_SOURCE} to ${_PATH_TARGET_KEY} …"
+ cp "${_PATH_SOURCE}" "${_PATH_TARGET_KEY}"
+ echo "Writing ${_PATH_TARGET_LOCATION} …"
+ printf '%s' "$(location_from_servername ${_FILENAME})" > "${_PATH_TARGET_LOCATION}"
+ chmod a-rwx,u+rw "${_PATH_TARGET_KEY}" "${_PATH_TARGET_LOCATION}"
+}
+
+USAGE_DESC_help='print this help and exit'
+CMDFNC_help() {
+ expect_n_args 0 0 '' $@
+ print_usage
+}
+
+USAGE_ARGS_info='SERVER_NAME [ARCHIVE]'
+USAGE_DESC_info="run 'borg info' against repo at \"$(location_from_servername SERVER_NAME)\", optionally only against ARCHIVE; if latter not provided, list most recent archives of repo"
+CMDFNC_info() {
+ expect_n_args 1 2 "${USAGE_ARGS_info}" $@
+ _TARGET_REPO="$(location_from_servername ${1})"
+ if [ ! -z "$2" ]; then
+ exit_ok $(borg info "${_TARGET_REPO}::$2")
+ fi
+ _run_borg_with_passphrase info "${_TARGET_REPO}"
+ echo "${_OUTPUT}\n\nMost recent archives:"
+ borg list "${_TARGET_REPO}" | tail -5
+}
+
+USAGE_ARGS_init='SERVER_NAME'
+USAGE_DESC_init="create repo at \"$(location_from_servername SERVER_NAME)\""
+CMDFNC_init() {
+ expect_n_args 1 1 "${USAGE_ARGS_init}" $@
+ _STASHED_BORG_PASSPHRASE="$(env | grep -E '^BORG_PASSPHRASE=' | cut -d'=' -f2-)"
+ unset BORG_PASSPHRASE
+ borg init --encryption=keyfile "$(location_from_servername $1)"
+ if [ ! -z "${_STASHED_BORG_PASSPHRASE}" ]; then
+ export BORG_PASSPHRASE="${_STASHED_BORG_PASSPHRASE}"
+ _STASHED_BORG_PASSPHRASE=
+ fi
+}
+
+USAGE_DESC_keys='list known repos in ID, key filename, and alleged location'
+CMDFNC_keys() {
+ expect_n_args 0 0 '' $@
+ echo "Known keys, as per ${PATH_BORG_CONF_KEYS}:"
+ _EXIT_OK_PREFIX='(none, since directory'
+ if [ ! -d "${PATH_BORG_CONF_KEYS}" ]; then
+ exit_ok "${_EXIT_OK_PREFIX} non-existant)"
+ fi
+ _KEYFILES="$(ls -1 ${PATH_BORG_CONF_KEYS})"
+ if [ -z "${_KEYFILES}" ]; then
+ exit_ok "${_EXIT_OK_PREFIX} empty)"
+ fi
+ echo "${_KEYFILES}" | while read _FILENAME; do
+ _KEY_ID=$(_id_from_file "${PATH_BORG_CONF_KEYS}/${_FILENAME}")
+ _PATH_LOC="$(path_repo_location ${_KEY_ID})"
+ printf "${_KEY_ID} ${_FILENAME} "
+ if [ -f "${_PATH_LOC}" ]; then
+ printf '%s\n' "$(cat ${_PATH_LOC})"
+ else
+ printf '?\n'
+ fi
+ done
+}
+
+USAGE_DESC_orgpull='pull most recent org directory available in repos'
+CMDFNC_orgpull() {
+ expect_n_args 0 0 '' $@
+ _NAME_ARCHIVE=orgdir
+
+ # determine server and repo
+ _PATH_PIPE="$(path_tmp_timestamped 'pipe')"
+ mkfifo "${_PATH_PIPE}"
+ ls -1 "${PATH_BORG_CONF_SECURITY}/" > "${_PATH_PIPE}" &
+ while read _FILENAME; do
+ _LOCATION="$(cat $(path_repo_location ${_FILENAME}))"
+ _NAME_SERVER=$(servername_from_location "${_LOCATION}")
+ if ping -c1 -W2 "${_NAME_SERVER}" > /dev/null 2>&1; then
+ _REPO="${_LOCATION}"
+ break
+ else
+ echo "Cannot reach ${_NAME_SERVER}, skipping."
+ fi
+ done < "${_PATH_PIPE}"
+ rm "${_PATH_PIPE}"
+ if [ -z "${_REPO}" ]; then
+ error_exit 'no repo being available.'
+ fi
+
+ # determine passphrase and archive
+ echo "Checking out ${_REPO} …"
+ _run_borg_with_passphrase list "${_REPO}"
+ _ARCHIVE=$(echo "${_OUTPUT}" | grep "${_NAME_ARCHIVE}" | tail -1 | cut -f1 -d' ')
+
+ # pull archive
+ echo "Pulling archive: ${_ARCHIVE}"
+ cd /
+ borg extract --verbose "${_REPO}::${_ARCHIVE}"
+}
+
+USAGE_DESC_orgpush='push org directory to repos'
+CMDFNC_orgpush() {
+ expect_n_args 0 0 '' $@
+ _NAME_ARCHIVE=orgdir
+
+ for _FILENAME in $(ls "${PATH_BORG_CONF_SECURITY}/"); do
+ _REPO="$(cat $(path_repo_location ${_FILENAME}))"
+ _ARCHIVE="${_REPO}::${_NAME_ARCHIVE}-{utcnow:%Y-%m-%dT%H:%M}"
+ _run_borg_with_passphrase create --verbose "${_ARCHIVE}" "${HOME}/org"
+ done
+}
+
+# parse args to execution
+if [ "$#" -lt 1 ]; then
+ error_exit_with_usage 'missing command.'
+fi
+for CMD in ${USAGE_INDICES}; do
+ if [ "$1" = "${CMD}" ]; then
+ break
+ fi
+ CMD=
+done
+if [ -z "${CMD}" ]; then
+ error_exit_with_usage "unknown command: ${1}"
+fi
+shift 1
+"CMDFNC_${CMD}" $@
--- /dev/null
+#!/bin/sh
+set -e
+
+cd $(dirname "$0")
+. lib/abort_if_exists
+. lib/constants_borg # NAME_BORGAPP, PATH_BORG_CONF
+. lib/constants_secrets # PATH_REL_SECRETS, PATH_SECRETS, PATH_SECRETS_BORGKEYS
+. lib/constants_ssh # PATH_USER_SSH
+. lib/constants_user # USERNAME
+. lib/mount_secrets # mount_secrets, copy_and_unmount_secrets
+
+abort_if_exists "${PATH_SECRETS}"
+echo "Collecting new ${PATH_REL_SECRETS}."
+mkdir "${PATH_SECRETS}"
+"${NAME_BORGAPP}" backup_keys "${PATH_SECRETS_BORGKEYS}"
+cp -a "${PATH_USER_SSH}" "${PATH_SECRETS_SSH}"
+echo "secrets file, last update: $(whoami)/$(hostname) at $(date)" > "${PATH_SECRETS}/info"
+
+mount_secrets "$1" # sets PATH_MOUNTED_SECRETS
+SUFFIX_OLD=.old
+PATH_REL_SECRETS_OLD="${PATH_REL_SECRETS}${SUFFIX_OLD}"
+PATH_MOUNTED_SECRETS_OLD="${PATH_MOUNTED_SECRETS}${SUFFIX_OLD}"
+if [ -d "${PATH_MOUNTED_SECRETS}" ]; then
+ echo "Drive already has ${PATH_REL_SECRETS}, moving to ${PATH_REL_SECRETS_OLD}."
+ rm -rf "${PATH_MOUNTED_SECRETS_OLD}"
+ mv "${PATH_MOUNTED_SECRETS}" "${PATH_MOUNTED_SECRETS_OLD}"
+fi
+copy_and_unmount_secrets 'out'
--- /dev/null
+#!/bin/sh
+set -e
+cd $(dirname "$0")
+. lib/abort
+. lib/audio_dev_is_mute
+. lib/print_usage
+
+MAX_LOUDNESS=150
+
+FLAG_HELP_SHORT='-h'
+FLAG_HELP_LONG='--help'
+
+USAGE_DESCRIPTION='Set audio volume, or (if called without any arguments) toggle audio device muteness.\n\nAvailable arguments:'
+USAGE_LINES='[COMMAND]\nLOUDNESS'
+USAGE_INDICES='LOUDNESS _help'
+USAGE_DESC_LOUDNESS='audio volume to set (as percentage, must be integer)'
+USAGE_DESC__help='display this help and exit'
+USAGE_NAME__help="${FLAG_HELP_SHORT}, ${FLAG_HELP_LONG}"
+
+error_exit() { abort "Aborting due to $1\n\n$(print_usage)"; }
+
+toggle_mute() {
+ if audio_dev_is_mute; then
+ MUTE_BOOL=0
+ MUTE_WORD=off
+ else
+ MUTE_BOOL=1
+ MUTE_WORD=on
+ fi
+ pacmd set-sink-mute 0 "${MUTE_BOOL}"
+ echo "Toggled audio device muteness ${MUTE_WORD}."
+}
+
+set_vol_percentage() {
+ AT_FULL=65536
+ pacmd set-sink-volume 0 $(calc "($1 * ${AT_FULL} // 100)")
+ echo -n "Audio volume set to ${1}%."
+ audio_dev_is_mute && echo -n " (But audio device is muted.)"
+ echo
+}
+
+N_MAX_ARGS=1
+if [ "$#" -gt "${N_MAX_ARGS}" ]; then
+ error_exit "number of arguments greater ${N_MAX_ARGS}."
+elif [ -z "$1" ]; then
+ toggle_mute
+elif [ -z "$(echo -n $1 | sed 's/[0-9]*//g')" ]; then
+ if [ "$1" -gt "${MAX_LOUDNESS}" ]; then
+ error_exit "demand for unreasonably high loudness: $1."
+ fi
+ set_vol_percentage "$1"
+elif [ "$1" = "$FLAG_HELP_SHORT" ] || [ "$1" = "$FLAG_HELP_LONG" ]; then
+ print_usage
+else
+ error_exit "unrecognized argument: $1"
+fi
--- /dev/null
+../../../../../scripts/lib/abort
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/abort_if_exists
\ No newline at end of file
--- /dev/null
+audio_dev_is_mute() {
+ [ "$(pactl get-sink-mute 0)" = "Mute: yes" ]
+}
--- /dev/null
+../../../../../scripts/lib/constants_borg
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/constants_secrets
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/constants_ssh
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/constants_user
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/expect_min_n_args
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/expect_n_args
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/get_passphrase
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/mount_secrets
\ No newline at end of file
--- /dev/null
+../../../../../scripts/lib/path_tmp_timestamped
\ No newline at end of file
--- /dev/null
+print_usage() {
+ echo 'Usage:'
+ echo "${USAGE_LINES}" | while read _LINE; do
+ echo " $(basename $0) ${_LINE}"
+ done
+ echo "\n${USAGE_DESCRIPTION}\n"
+ _var_of() { eval printf '"%s"' '"${'"${1}${2}"'}"'; }
+ _build_index() {
+ _ARGS="$(_var_of 'USAGE_ARGS_' ${_IDX})"
+ if [ ! -z "${_ARGS}" ]; then
+ _ARGS=" ${_ARGS}"
+ fi
+ _NAME="${_IDX}"
+ _ALT_NAME="$(_var_of 'USAGE_NAME_' ${_IDX})"
+ if [ ! -z "${_ALT_NAME}" ]; then
+ _NAME="${_ALT_NAME}"
+ fi
+ _KEY=" ${_NAME}${_ARGS}"
+ _LEN_KEY=$(echo -n "${_KEY}" | wc -c)
+ }
+ _MAX_LEN_KEY=0
+ for _IDX in ${USAGE_INDICES}; do
+ _build_index
+ if [ "${_LEN_KEY}" -gt "${_MAX_LEN_KEY}" ]; then
+ _MAX_LEN_KEY="${_LEN_KEY}"
+ fi
+ done
+ for _IDX in ${USAGE_INDICES}; do
+ _build_index
+ printf '%s' "${_KEY}"
+ _LEN_GAP=$(calc "${_MAX_LEN_KEY} - ${_LEN_KEY} + 4")
+ for _ in $(seq 1 ${_LEN_GAP}); do
+ printf ' '
+ done
+ printf '%s\n' "$(_var_of 'USAGE_DESC_' ${_IDX})"
+ done
+}
--- /dev/null
+../../../../../scripts/lib/retry_until
\ No newline at end of file
--- /dev/null
+# so we don't have to enter our SSH key password all the time
+eval $(ssh-agent) && ssh-add
+
+# zero audio volume (rather than "just" mute)
+vol 0
+
--- /dev/null
+bind j scrollline 3
+bind k scrollline -3
+set hintuppercase false
+set hintchars 123456qwertasdfgyxcvb
+
+set searchengine duckduckgo
+set searchurls.wiktionary https://en.wiktionary.org/w/index.php?search=
+set searchurls.dictcc https://www.dict.cc/?s=
+
+autocmd DocStart www.reddit.com urlmodify -t www.reddit old.reddit
+
+set theme dark
+guiset gui none
+guiset tabs always
+guiset hoverlink left
+
+escapehatch
--- /dev/null
+#!/bin/sh
+# see sway-bar(5) and swaybar-protocol(7)
+set -e
+
+. "${HOME}/.plomlib/audio_dev_is_mute"
+
+SYSCLASS_DIR=/sys/class
+
+COL_WHITE=dddddd
+COL_RED=dd0000
+COL_YELLOW=dddd00
+COL_GREEN=00dd00
+COL_GREY=aaaaaa
+
+print_bar_block() {
+ printf '{"full_text": "%s", ' "$1"
+ COLOR="${COL_GREY}"
+ if [ ! -z "$2" ]; then
+ COLOR="$2"
+ fi
+ printf '"color": "%s", ' "${COLOR}"
+ if [ "$3" = "0" ]; then
+ printf '"separator": false,\n'
+ printf '"separator_block_width": 0,'
+ fi
+ printf '"markup": "pango",\n'
+ printf '},\n'
+}
+
+print_calc() {
+ printf "%d" $(calc "$1")
+}
+
+color_at() {
+ IDX=0
+ while true; do
+ IDX=$(print_calc "${IDX} + 1")
+ STEP=$(echo "$2" | cut -d'_' -f${IDX})
+ if [ -z "${STEP}" ]; then
+ break
+ fi
+ LIMIT=$(echo "${STEP}" | cut -d':' -f1)
+ COLOR=$(echo "${STEP}" | cut -d':' -f2)
+ if [ "${LIMIT}" -ge "${1}" ]; then
+ printf "${COLOR}"
+ break
+ fi
+ done
+}
+
+print_clipboard() {
+ print_selection() {
+ print_bar_block "$1 [" "${COL_WHITE}" 0
+ CLEANED=$(wl-paste $2 | sed 's/"/\\"/g')
+ ELLIPSIS=
+ if [ $(echo "${CLEANED}" | wc -c) -gt 32 ]; then
+ CLEANED=$(echo "${CLEANED}" | cut -zc'-29')
+ ELLIPSIS='...'
+ fi
+ print_bar_block "${CLEANED}" "" 0
+ print_bar_block "${ELLIPSIS}]" "${COL_WHITE}" $3
+ }
+ print_selection 'wl-paste' '' 0
+ print_selection ' --primary' --primary
+}
+
+print_online() {
+ print_conn() {
+ print_bar_block "$(echo $1 | cut -c1):" "" 0
+ IP=$(ip --brief addr show | grep "$1" | sed -E 's/ +/\t/g' | cut -f3 | cut -f1 -d'/')
+ if [ -z "${IP}" ]; then
+ print_bar_block '-'
+ else
+ print_bar_block "${IP}" "${COL_WHITE}" "$2"
+ fi
+ }
+ print_conn enp
+ print_conn wlp 0
+ set +e
+ STATUS_WIFI=$(nmcli -t -f IN-USE,SSID,SIGNAL dev wifi | grep '^\*:')
+ set -e
+ if [ ! -z "${STATUS_WIFI}" ]; then
+ SIGNAL=$(echo -n "${STATUS_WIFI}" | cut -d':' -f3)
+ COLOR=$(color_at $SIGNAL "45:${COL_RED}_85:${COL_YELLOW}_100:${COL_GREEN}")
+ print_bar_block " ${SIGNAL}" "${COLOR}" 0
+ print_bar_block "% $(echo "${STATUS_WIFI}" | cut -d':' -f2)"
+ else
+ print_bar_block " "
+ fi
+}
+
+print_battery() {
+ BAT_DIR="${SYSCLASS_DIR}/power_supply/BAT0"
+
+ calc_percent () {
+ cat_energy() {
+ cat "${BAT_DIR}/energy_$1"
+ }
+ print_calc "100 * $(cat_energy $1) // $(cat_energy $2)"
+ }
+
+ CHARGE=$(calc_percent now full)
+ COLOR=$(color_at $CHARGE "25:${COL_RED}_65:${COL_YELLOW}_100:${COL_GREEN}")
+ print_bar_block "${CHARGE}%" "${COLOR}" 0
+
+ COLOR="${COL_WHITE}"
+ STATUS=$(cat "${BAT_DIR}/status")
+ CHARGING=?
+ if [ "${STATUS}" = "Not charging" ]; then
+ CHARGING=-
+ elif [ "${STATUS}" = "Charging" ]; then
+ CHARGING=^
+ COLOR="${COL_GREEN}"
+ elif [ "${STATUS}" = "Discharging" ]; then
+ CHARGING=v
+ COLOR="${COL_YELLOW}"
+ fi
+ print_bar_block "${CHARGING}" "${COLOR}" 0
+
+ print_bar_block "$(calc_percent full full_design)%"
+}
+
+print_temperature() {
+ COLOR="${COL_WHITE}"
+ TEMPERATURE=$(cat ${SYSCLASS_DIR}/thermal/thermal_zone0/temp)
+ TEMPERATURE_IN_C=$(print_calc "${TEMPERATURE} // 1000")
+ COLOR=$(color_at $TEMPERATURE_IN_C "65:${COL_GREEN}_85:${COL_YELLOW}_999:${COL_RED}")
+ print_bar_block "${TEMPERATURE_IN_C}" "${COLOR}" 0
+ print_bar_block '°'
+}
+
+print_datetime() {
+ DATE=$(date +'%Y-%m-%d')
+ TIME=$(date +'%H:%M:%S')
+ TZ=$(date +'/%Z')
+ print_bar_block "${DATE} " "" 0
+ print_bar_block "${TIME}" "${COL_WHITE}" 0
+ print_bar_block "${TZ}" ""
+}
+
+print_volume() {
+ print_bar_block "vol " '' 0
+ VOLUME="$(pactl get-sink-volume 0 | head -1 | sed 's/ //g' | cut -d'/' -f2)"
+ if audio_dev_is_mute; then
+ print_bar_block "<s>${VOLUME}</s>"
+ else
+ print_bar_block "${VOLUME}" "${COL_YELLOW}"
+ fi
+}
+
+print_keyboard() {
+ LAYOUT=$(swaymsg -t get_inputs | grep 'xkb_active_layout_name' | sed -E 's/[ ,"]+//g' | cut -d':' -f2 | head -1)
+ if [ "${LAYOUT}" = "English(US)" ]; then
+ LAYOUT=us
+ elif [ "${LAYOUT}" = "German" ]; then
+ LAYOUT=de
+ else
+ LAYOUT=??
+ fi
+ print_bar_block "kb_${LAYOUT}"
+}
+
+printf '{"version": 1}\n['
+while true; do
+ printf '['
+ print_clipboard
+ print_online
+ print_battery
+ print_temperature
+ print_datetime
+ print_volume
+ print_keyboard
+ printf '],'
+ sleep 0.1
+done
--- /dev/null
+[user]
+ email = c.heller@plomlompom.de
+ name = Christian Heller
+++ /dev/null
-../../../../../bookworm/etc/all/apt/apt.conf.d/99_minimize_dependencies
\ No newline at end of file
+++ /dev/null
-deb http://deb.debian.org/debian testing main contrib non-free non-free-firmware
-deb http://security.debian.org/debian-security testing-security main contrib non-free non-free-firmware
+++ /dev/null
-LANG="en_US.UTF-8"
+++ /dev/null
-# This file lists locales that you wish to have built. You can find a list
-# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
-# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
-# this file, you need to rerun locale-gen.
-
-
-# aa_DJ ISO-8859-1
-# aa_DJ.UTF-8 UTF-8
-# aa_ER UTF-8
-# aa_ER@saaho UTF-8
-# aa_ET UTF-8
-# af_ZA ISO-8859-1
-# af_ZA.UTF-8 UTF-8
-# ak_GH UTF-8
-# am_ET UTF-8
-# an_ES ISO-8859-15
-# an_ES.UTF-8 UTF-8
-# anp_IN UTF-8
-# ar_AE ISO-8859-6
-# ar_AE.UTF-8 UTF-8
-# ar_BH ISO-8859-6
-# ar_BH.UTF-8 UTF-8
-# ar_DZ ISO-8859-6
-# ar_DZ.UTF-8 UTF-8
-# ar_EG ISO-8859-6
-# ar_EG.UTF-8 UTF-8
-# ar_IN UTF-8
-# ar_IQ ISO-8859-6
-# ar_IQ.UTF-8 UTF-8
-# ar_JO ISO-8859-6
-# ar_JO.UTF-8 UTF-8
-# ar_KW ISO-8859-6
-# ar_KW.UTF-8 UTF-8
-# ar_LB ISO-8859-6
-# ar_LB.UTF-8 UTF-8
-# ar_LY ISO-8859-6
-# ar_LY.UTF-8 UTF-8
-# ar_MA ISO-8859-6
-# ar_MA.UTF-8 UTF-8
-# ar_OM ISO-8859-6
-# ar_OM.UTF-8 UTF-8
-# ar_QA ISO-8859-6
-# ar_QA.UTF-8 UTF-8
-# ar_SA ISO-8859-6
-# ar_SA.UTF-8 UTF-8
-# ar_SD ISO-8859-6
-# ar_SD.UTF-8 UTF-8
-# ar_SS UTF-8
-# ar_SY ISO-8859-6
-# ar_SY.UTF-8 UTF-8
-# ar_TN ISO-8859-6
-# ar_TN.UTF-8 UTF-8
-# ar_YE ISO-8859-6
-# ar_YE.UTF-8 UTF-8
-# as_IN UTF-8
-# ast_ES ISO-8859-15
-# ast_ES.UTF-8 UTF-8
-# ayc_PE UTF-8
-# az_AZ UTF-8
-# be_BY CP1251
-# be_BY.UTF-8 UTF-8
-# be_BY@latin UTF-8
-# bem_ZM UTF-8
-# ber_DZ UTF-8
-# ber_MA UTF-8
-# bg_BG CP1251
-# bg_BG.UTF-8 UTF-8
-# bhb_IN.UTF-8 UTF-8
-# bho_IN UTF-8
-# bn_BD UTF-8
-# bn_IN UTF-8
-# bo_CN UTF-8
-# bo_IN UTF-8
-# br_FR ISO-8859-1
-# br_FR.UTF-8 UTF-8
-# br_FR@euro ISO-8859-15
-# brx_IN UTF-8
-# bs_BA ISO-8859-2
-# bs_BA.UTF-8 UTF-8
-# byn_ER UTF-8
-# ca_AD ISO-8859-15
-# ca_AD.UTF-8 UTF-8
-# ca_ES ISO-8859-1
-# ca_ES.UTF-8 UTF-8
-# ca_ES.UTF-8@valencia UTF-8
-# ca_ES@euro ISO-8859-15
-# ca_ES@valencia ISO-8859-15
-# ca_FR ISO-8859-15
-# ca_FR.UTF-8 UTF-8
-# ca_IT ISO-8859-15
-# ca_IT.UTF-8 UTF-8
-# ce_RU UTF-8
-# chr_US UTF-8
-# cmn_TW UTF-8
-# crh_UA UTF-8
-# cs_CZ ISO-8859-2
-# cs_CZ.UTF-8 UTF-8
-# csb_PL UTF-8
-# cv_RU UTF-8
-# cy_GB ISO-8859-14
-# cy_GB.UTF-8 UTF-8
-# da_DK ISO-8859-1
-# da_DK.UTF-8 UTF-8
-# de_AT ISO-8859-1
-# de_AT.UTF-8 UTF-8
-# de_AT@euro ISO-8859-15
-# de_BE ISO-8859-1
-# de_BE.UTF-8 UTF-8
-# de_BE@euro ISO-8859-15
-# de_CH ISO-8859-1
-# de_CH.UTF-8 UTF-8
-# de_DE ISO-8859-1
-# de_DE.UTF-8 UTF-8
-# de_DE@euro ISO-8859-15
-# de_IT ISO-8859-1
-# de_IT.UTF-8 UTF-8
-# de_LI.UTF-8 UTF-8
-# de_LU ISO-8859-1
-# de_LU.UTF-8 UTF-8
-# de_LU@euro ISO-8859-15
-# doi_IN UTF-8
-# dv_MV UTF-8
-# dz_BT UTF-8
-# el_CY ISO-8859-7
-# el_CY.UTF-8 UTF-8
-# el_GR ISO-8859-7
-# el_GR.UTF-8 UTF-8
-# en_AG UTF-8
-# en_AU ISO-8859-1
-# en_AU.UTF-8 UTF-8
-# en_BW ISO-8859-1
-# en_BW.UTF-8 UTF-8
-# en_CA ISO-8859-1
-# en_CA.UTF-8 UTF-8
-# en_DK ISO-8859-1
-# en_DK.ISO-8859-15 ISO-8859-15
-# en_DK.UTF-8 UTF-8
-# en_GB ISO-8859-1
-# en_GB.ISO-8859-15 ISO-8859-15
-# en_GB.UTF-8 UTF-8
-# en_HK ISO-8859-1
-# en_HK.UTF-8 UTF-8
-# en_IE ISO-8859-1
-# en_IE.UTF-8 UTF-8
-# en_IE@euro ISO-8859-15
-# en_IL UTF-8
-# en_IN UTF-8
-# en_NG UTF-8
-# en_NZ ISO-8859-1
-# en_NZ.UTF-8 UTF-8
-# en_PH ISO-8859-1
-# en_PH.UTF-8 UTF-8
-# en_SG ISO-8859-1
-# en_SG.UTF-8 UTF-8
-# en_US ISO-8859-1
-# en_US.ISO-8859-15 ISO-8859-15
-en_US.UTF-8 UTF-8
-# en_ZA ISO-8859-1
-# en_ZA.UTF-8 UTF-8
-# en_ZM UTF-8
-# en_ZW ISO-8859-1
-# en_ZW.UTF-8 UTF-8
-# eo UTF-8
-# es_AR ISO-8859-1
-# es_AR.UTF-8 UTF-8
-# es_BO ISO-8859-1
-# es_BO.UTF-8 UTF-8
-# es_CL ISO-8859-1
-# es_CL.UTF-8 UTF-8
-# es_CO ISO-8859-1
-# es_CO.UTF-8 UTF-8
-# es_CR ISO-8859-1
-# es_CR.UTF-8 UTF-8
-# es_CU UTF-8
-# es_DO ISO-8859-1
-# es_DO.UTF-8 UTF-8
-# es_EC ISO-8859-1
-# es_EC.UTF-8 UTF-8
-# es_ES ISO-8859-1
-# es_ES.UTF-8 UTF-8
-# es_ES@euro ISO-8859-15
-# es_GT ISO-8859-1
-# es_GT.UTF-8 UTF-8
-# es_HN ISO-8859-1
-# es_HN.UTF-8 UTF-8
-# es_MX ISO-8859-1
-# es_MX.UTF-8 UTF-8
-# es_NI ISO-8859-1
-# es_NI.UTF-8 UTF-8
-# es_PA ISO-8859-1
-# es_PA.UTF-8 UTF-8
-# es_PE ISO-8859-1
-# es_PE.UTF-8 UTF-8
-# es_PR ISO-8859-1
-# es_PR.UTF-8 UTF-8
-# es_PY ISO-8859-1
-# es_PY.UTF-8 UTF-8
-# es_SV ISO-8859-1
-# es_SV.UTF-8 UTF-8
-# es_US ISO-8859-1
-# es_US.UTF-8 UTF-8
-# es_UY ISO-8859-1
-# es_UY.UTF-8 UTF-8
-# es_VE ISO-8859-1
-# es_VE.UTF-8 UTF-8
-# et_EE ISO-8859-1
-# et_EE.ISO-8859-15 ISO-8859-15
-# et_EE.UTF-8 UTF-8
-# eu_ES ISO-8859-1
-# eu_ES.UTF-8 UTF-8
-# eu_ES@euro ISO-8859-15
-# eu_FR ISO-8859-1
-# eu_FR.UTF-8 UTF-8
-# eu_FR@euro ISO-8859-15
-# fa_IR UTF-8
-# ff_SN UTF-8
-# fi_FI ISO-8859-1
-# fi_FI.UTF-8 UTF-8
-# fi_FI@euro ISO-8859-15
-# fil_PH UTF-8
-# fo_FO ISO-8859-1
-# fo_FO.UTF-8 UTF-8
-# fr_BE ISO-8859-1
-# fr_BE.UTF-8 UTF-8
-# fr_BE@euro ISO-8859-15
-# fr_CA ISO-8859-1
-# fr_CA.UTF-8 UTF-8
-# fr_CH ISO-8859-1
-# fr_CH.UTF-8 UTF-8
-# fr_FR ISO-8859-1
-# fr_FR.UTF-8 UTF-8
-# fr_FR@euro ISO-8859-15
-# fr_LU ISO-8859-1
-# fr_LU.UTF-8 UTF-8
-# fr_LU@euro ISO-8859-15
-# fur_IT UTF-8
-# fy_DE UTF-8
-# fy_NL UTF-8
-# ga_IE ISO-8859-1
-# ga_IE.UTF-8 UTF-8
-# ga_IE@euro ISO-8859-15
-# gd_GB ISO-8859-15
-# gd_GB.UTF-8 UTF-8
-# gez_ER UTF-8
-# gez_ER@abegede UTF-8
-# gez_ET UTF-8
-# gez_ET@abegede UTF-8
-# gl_ES ISO-8859-1
-# gl_ES.UTF-8 UTF-8
-# gl_ES@euro ISO-8859-15
-# gu_IN UTF-8
-# gv_GB ISO-8859-1
-# gv_GB.UTF-8 UTF-8
-# ha_NG UTF-8
-# hak_TW UTF-8
-# he_IL ISO-8859-8
-# he_IL.UTF-8 UTF-8
-# hi_IN UTF-8
-# hne_IN UTF-8
-# hr_HR ISO-8859-2
-# hr_HR.UTF-8 UTF-8
-# hsb_DE ISO-8859-2
-# hsb_DE.UTF-8 UTF-8
-# ht_HT UTF-8
-# hu_HU ISO-8859-2
-# hu_HU.UTF-8 UTF-8
-# hy_AM UTF-8
-# hy_AM.ARMSCII-8 ARMSCII-8
-# ia_FR UTF-8
-# id_ID ISO-8859-1
-# id_ID.UTF-8 UTF-8
-# ig_NG UTF-8
-# ik_CA UTF-8
-# is_IS ISO-8859-1
-# is_IS.UTF-8 UTF-8
-# it_CH ISO-8859-1
-# it_CH.UTF-8 UTF-8
-# it_IT ISO-8859-1
-# it_IT.UTF-8 UTF-8
-# it_IT@euro ISO-8859-15
-# iu_CA UTF-8
-# ja_JP.EUC-JP EUC-JP
-# ja_JP.UTF-8 UTF-8
-# ka_GE GEORGIAN-PS
-# ka_GE.UTF-8 UTF-8
-# kk_KZ PT154
-# kk_KZ.RK1048 RK1048
-# kk_KZ.UTF-8 UTF-8
-# kl_GL ISO-8859-1
-# kl_GL.UTF-8 UTF-8
-# km_KH UTF-8
-# kn_IN UTF-8
-# ko_KR.EUC-KR EUC-KR
-# ko_KR.UTF-8 UTF-8
-# kok_IN UTF-8
-# ks_IN UTF-8
-# ks_IN@devanagari UTF-8
-# ku_TR ISO-8859-9
-# ku_TR.UTF-8 UTF-8
-# kw_GB ISO-8859-1
-# kw_GB.UTF-8 UTF-8
-# ky_KG UTF-8
-# lb_LU UTF-8
-# lg_UG ISO-8859-10
-# lg_UG.UTF-8 UTF-8
-# li_BE UTF-8
-# li_NL UTF-8
-# lij_IT UTF-8
-# ln_CD UTF-8
-# lo_LA UTF-8
-# lt_LT ISO-8859-13
-# lt_LT.UTF-8 UTF-8
-# lv_LV ISO-8859-13
-# lv_LV.UTF-8 UTF-8
-# lzh_TW UTF-8
-# mag_IN UTF-8
-# mai_IN UTF-8
-# mg_MG ISO-8859-15
-# mg_MG.UTF-8 UTF-8
-# mhr_RU UTF-8
-# mi_NZ ISO-8859-13
-# mi_NZ.UTF-8 UTF-8
-# mk_MK ISO-8859-5
-# mk_MK.UTF-8 UTF-8
-# ml_IN UTF-8
-# mn_MN UTF-8
-# mni_IN UTF-8
-# mr_IN UTF-8
-# ms_MY ISO-8859-1
-# ms_MY.UTF-8 UTF-8
-# mt_MT ISO-8859-3
-# mt_MT.UTF-8 UTF-8
-# my_MM UTF-8
-# nan_TW UTF-8
-# nan_TW@latin UTF-8
-# nb_NO ISO-8859-1
-# nb_NO.UTF-8 UTF-8
-# nds_DE UTF-8
-# nds_NL UTF-8
-# ne_NP UTF-8
-# nhn_MX UTF-8
-# niu_NU UTF-8
-# niu_NZ UTF-8
-# nl_AW UTF-8
-# nl_BE ISO-8859-1
-# nl_BE.UTF-8 UTF-8
-# nl_BE@euro ISO-8859-15
-# nl_NL ISO-8859-1
-# nl_NL.UTF-8 UTF-8
-# nl_NL@euro ISO-8859-15
-# nn_NO ISO-8859-1
-# nn_NO.UTF-8 UTF-8
-# nr_ZA UTF-8
-# nso_ZA UTF-8
-# oc_FR ISO-8859-1
-# oc_FR.UTF-8 UTF-8
-# om_ET UTF-8
-# om_KE ISO-8859-1
-# om_KE.UTF-8 UTF-8
-# or_IN UTF-8
-# os_RU UTF-8
-# pa_IN UTF-8
-# pa_PK UTF-8
-# pap_AW UTF-8
-# pap_CW UTF-8
-# pl_PL ISO-8859-2
-# pl_PL.UTF-8 UTF-8
-# ps_AF UTF-8
-# pt_BR ISO-8859-1
-# pt_BR.UTF-8 UTF-8
-# pt_PT ISO-8859-1
-# pt_PT.UTF-8 UTF-8
-# pt_PT@euro ISO-8859-15
-# quz_PE UTF-8
-# raj_IN UTF-8
-# ro_RO ISO-8859-2
-# ro_RO.UTF-8 UTF-8
-# ru_RU ISO-8859-5
-# ru_RU.CP1251 CP1251
-# ru_RU.KOI8-R KOI8-R
-# ru_RU.UTF-8 UTF-8
-# ru_UA KOI8-U
-# ru_UA.UTF-8 UTF-8
-# rw_RW UTF-8
-# sa_IN UTF-8
-# sat_IN UTF-8
-# sc_IT UTF-8
-# sd_IN UTF-8
-# sd_IN@devanagari UTF-8
-# se_NO UTF-8
-# sgs_LT UTF-8
-# shs_CA UTF-8
-# si_LK UTF-8
-# sid_ET UTF-8
-# sk_SK ISO-8859-2
-# sk_SK.UTF-8 UTF-8
-# sl_SI ISO-8859-2
-# sl_SI.UTF-8 UTF-8
-# so_DJ ISO-8859-1
-# so_DJ.UTF-8 UTF-8
-# so_ET UTF-8
-# so_KE ISO-8859-1
-# so_KE.UTF-8 UTF-8
-# so_SO ISO-8859-1
-# so_SO.UTF-8 UTF-8
-# sq_AL ISO-8859-1
-# sq_AL.UTF-8 UTF-8
-# sq_MK UTF-8
-# sr_ME UTF-8
-# sr_RS UTF-8
-# sr_RS@latin UTF-8
-# ss_ZA UTF-8
-# st_ZA ISO-8859-1
-# st_ZA.UTF-8 UTF-8
-# sv_FI ISO-8859-1
-# sv_FI.UTF-8 UTF-8
-# sv_FI@euro ISO-8859-15
-# sv_SE ISO-8859-1
-# sv_SE.ISO-8859-15 ISO-8859-15
-# sv_SE.UTF-8 UTF-8
-# sw_KE UTF-8
-# sw_TZ UTF-8
-# szl_PL UTF-8
-# ta_IN UTF-8
-# ta_LK UTF-8
-# tcy_IN.UTF-8 UTF-8
-# te_IN UTF-8
-# tg_TJ KOI8-T
-# tg_TJ.UTF-8 UTF-8
-# th_TH TIS-620
-# th_TH.UTF-8 UTF-8
-# the_NP UTF-8
-# ti_ER UTF-8
-# ti_ET UTF-8
-# tig_ER UTF-8
-# tk_TM UTF-8
-# tl_PH ISO-8859-1
-# tl_PH.UTF-8 UTF-8
-# tn_ZA UTF-8
-# tr_CY ISO-8859-9
-# tr_CY.UTF-8 UTF-8
-# tr_TR ISO-8859-9
-# tr_TR.UTF-8 UTF-8
-# ts_ZA UTF-8
-# tt_RU UTF-8
-# tt_RU@iqtelif UTF-8
-# ug_CN UTF-8
-# uk_UA KOI8-U
-# uk_UA.UTF-8 UTF-8
-# unm_US UTF-8
-# ur_IN UTF-8
-# ur_PK UTF-8
-# uz_UZ ISO-8859-1
-# uz_UZ.UTF-8 UTF-8
-# uz_UZ@cyrillic UTF-8
-# ve_ZA UTF-8
-# vi_VN UTF-8
-# wa_BE ISO-8859-1
-# wa_BE.UTF-8 UTF-8
-# wa_BE@euro ISO-8859-15
-# wae_CH UTF-8
-# wal_ET UTF-8
-# wo_SN UTF-8
-# xh_ZA ISO-8859-1
-# xh_ZA.UTF-8 UTF-8
-# yi_US CP1255
-# yi_US.UTF-8 UTF-8
-# yo_NG UTF-8
-# yue_HK UTF-8
-# zh_CN GB2312
-# zh_CN.GB18030 GB18030
-# zh_CN.GBK GBK
-# zh_CN.UTF-8 UTF-8
-# zh_HK BIG5-HKSCS
-# zh_HK.UTF-8 UTF-8
-# zh_SG GB2312
-# zh_SG.GBK GBK
-# zh_SG.UTF-8 UTF-8
-# zh_TW BIG5
-# zh_TW.EUC-TW EUC-TW
-# zh_TW.UTF-8 UTF-8
-# zu_ZA ISO-8859-1
-# zu_ZA.UTF-8 UTF-8
+++ /dev/null
-Europe/Berlin
+++ /dev/null
-# This file describes the network interfaces available on your system
-# and how to activate them. For more information, see interfaces(5).
-
-source /etc/network/interfaces.d/*
-
-# The loopback network interface
-auto lo
-iface lo inet loopback
-
-# anything more would only confuse NetworkManager
+++ /dev/null
-../../../bookworm/home/all/.bash_profile
\ No newline at end of file
+++ /dev/null
-../../../bookworm/home/all/.bashrc
\ No newline at end of file
+++ /dev/null
-../../../../bookworm/home/all/.plomlib/file_dot_variants
\ No newline at end of file
+++ /dev/null
-../../../bookworm/home/all/.profile
\ No newline at end of file
+++ /dev/null
-# mere "kb" might be more flexible, but this way I won't accidentally try for
-# a non-existing "en" layout
-alias kb_de="swaymsg 'input * xkb_layout de'"
-alias kb_us="swaymsg 'input * xkb_layout us'"
+++ /dev/null
-# because these are included by /etc/sway/config for probably good reason …
-include /etc/sway/config-vars.d/*
-include /etc/sway/config.d/*
-
-# font for wm text
-font pango:Terminus 16px
-
-# force "tabbed" as default layout for new windows
-workspace_layout tabbed
-
-# simple green background
-output * background #559911 solid_color
-
-# keyboard layout
-input * xkb_layout "us"
-
-# waybar
-bar {
- position top
- status_command ~/.nonpath_bins/status.sh
-}
-
-# make Windows key modifier key for all wm actions
-set $mod Mod4
-floating_modifier $mod
-
-# program launcher
-bindsym $mod+d exec wmenu-run
-bindsym $mod+x exec wmenu-run
-
-# launch terminal emulator
-bindsym $mod+Return exec foot --font=monospace:size=12
-
-# kill window
-bindsym $mod+Shift+q kill
-
-# move focus between windows, but not by mouse
-bindsym $mod+Left focus left
-bindsym $mod+Down focus down
-bindsym $mod+Up focus up
-bindsym $mod+Right focus right
-focus_follows_mouse no
-
-# move windows
-bindsym $mod+Shift+Left move left
-bindsym $mod+Shift+Down move down
-bindsym $mod+Shift+Up move up
-bindsym $mod+Shift+Right move right
-
-# resize windows
-bindsym $mod+h resize shrink width 1 px or 1 ppt
-bindsym $mod+l resize grow width 1 px or 1 ppt
-bindsym $mod+j resize shrink height
-bindsym $mod+k resize grow height
-
-# toggle fullscreen for focused window
-bindsym $mod+f fullscreen
-
-# toggle floating of window, focus on floating or tabbed windows.
-bindsym $mod+Shift+space floating toggle
-bindsym $mod+space focus mode_toggle
-
-# reload config file
-bindsym $mod+Shift+c reload
-
-# stop wm
-bindsym $mod+Shift+p exit
-
-# switch workspaces
-bindsym $mod+1 workspace 1
-bindsym $mod+2 workspace 2
-bindsym $mod+3 workspace 3
-bindsym $mod+4 workspace 4
-bindsym $mod+5 workspace 5
-bindsym $mod+6 workspace 6
-bindsym $mod+7 workspace 7
-bindsym $mod+8 workspace 8
-bindsym $mod+9 workspace 9
-bindsym $mod+0 workspace 10
-
-# move window to workspace
-bindsym $mod+Shift+1 move workspace 1
-bindsym $mod+Shift+2 move workspace 2
-bindsym $mod+Shift+3 move workspace 3
-bindsym $mod+Shift+4 move workspace 4
-bindsym $mod+Shift+5 move workspace 5
-bindsym $mod+Shift+6 move workspace 6
-bindsym $mod+Shift+7 move workspace 7
-bindsym $mod+Shift+8 move workspace 8
-bindsym $mod+Shift+9 move workspace 9
-bindsym $mod+Shift+0 move workspace 10
+++ /dev/null
-#!/bin/sh
-set -e
-cd $(dirname "$0")
-. lib/abort
-. lib/constants_borg # PATH_BORG_CONF
-. lib/expect_n_args
-. lib/get_passphrase
-. lib/path_tmp_timestamped
-. lib/print_usage
-. lib/retry_until
-cd - > /dev/null
-
-USAGE_DESCRIPTION='Wrapper around certain borgbackup usages.\n\nAvailable commands:'
-USAGE_LINES='COMMAND [ARGUMENT]...'
-
-PATH_BORG_CONF_SECURITY="${PATH_BORG_CONF}/security"
-PATH_BORG_CONF_KEYS="${PATH_BORG_CONF}/keys"
-location_from_servername() { printf 'ssh://borg@%s/./borgrepo' "$1"; }
-servername_from_location() { echo "$1" | cut -d'/' -f3 | cut -d'@' -f2; }
-path_repo_location() { printf '%s' "${PATH_BORG_CONF_SECURITY}/${1}/location"; }
-
-# exits
-export BORG_EXIT_CODES=modern
-error_exit() { abort "Aborting due to $1"; }
-error_exit_with_usage() { error_exit "${1}\n\n$(print_usage)"; }
-exit_ok() { echo "$@"; exit 0; }
-
-# commands
-USAGE_INDICES='backup_keys claim help info init keys orgpull orgpush'
-
-_run_borg_with_passphrase() {
- _FIRST_RUN=1
- _ON_LOOP_START='
- if [ -z "${BORG_PASSPHRASE}" ]; then
- printf "Passphrase:"
- export BORG_PASSPHRASE="$(get_passphrase)"
- echo ""
- fi
- '
- _TO_TEST='borg '"$@"
- _ON_FAIL='echo "unexpected borg error, code ${_RESULT}."'
- _ON_LOOP_END='export BORG_PASSPHRASE='
- retry_until 52 "${_ON_LOOP_START}" "${_TO_TEST}" "${_ON_FAIL}" "${_ON_LOOP_END}"
-}
-
-_id_from_file() { head -1 "$1" | cut -d' ' -f2; }
-
-USAGE_ARGS_backup_keys='PATH'
-USAGE_DESC_backup_keys="copy known keys to PATH/, with their repos' server names as filenames"
-CMDFNC_backup_keys() {
- expect_n_args 1 1 "${USAGE_ARGS_backup_keys}" $@
- _PATH_TARGET_DIR=$(realpath "$1")
- if [ -e "${_PATH_TARGET_DIR}" ] && [ ! -d "${_PATH_TARGET_DIR}" ]; then
- error_exit "non-directory at ${_PATH_TARGET_DIR}"
- fi
- mkdir -p "${_PATH_TARGET_DIR}"
- cd "${PATH_BORG_CONF_KEYS}"
- ls -1 | while read _FILENAME; do
- _KEY_ID=$(_id_from_file "${_FILENAME}")
- _PATH_LOC="$(path_repo_location ${_KEY_ID})"
- if [ ! -f "${_PATH_LOC}" ]; then
- echo "Ignoring ${_FILENAME} due to lack of matching location file."
- continue
- fi
- _NAME_SERVER=$(servername_from_location "$(cat ${_PATH_LOC})")
- _PATH_TARGET="${_PATH_TARGET_DIR}/${_NAME_SERVER}"
- echo "Copying ${_FILENAME} to ${_PATH_TARGET} …"
- cp "${_FILENAME}" "${_PATH_TARGET}"
- done
- cd - > /dev/null
-}
-
-USAGE_ARGS_claim='PATH'
-USAGE_DESC_claim="register file of PATH as key to repo at \"$(location_from_servername SERVER_NAME)\", with SERVER_NAME the filename portion of PATH"
-CMDFNC_claim() {
- expect_n_args 1 1 "${USAGE_ARGS_claim}" $@
- _PATH_SOURCE="$1"
- _ensure_no_overwrite_at() {
- if [ -f "$1" ]; then
- error_exit "refusing to overwrite pre-existing file at $1"
- fi
- }
-
- _FILENAME=$(basename ${_PATH_SOURCE})
- _PATH_TARGET_KEY="${PATH_BORG_CONF_KEYS}/${_FILENAME}"
- if [ ! -f "${_PATH_SOURCE}" ]; then
- error_exit "no file at ${_PATH_SOURCE}"
- fi
- _ensure_no_overwrite_at "${_PATH_TARGET_KEY}"
- _REPO_ID="$(_id_from_file ${_PATH_SOURCE})"
- if [ ! -z "$(echo ${_REPO_ID} | sed 's/[a-f0-9]//g')" ]; then
- error_exit "inability to parse valid repo ID from alleged key file at $1"
- fi
- _PATH_TARGET_LOCATION="$(path_repo_location ${_REPO_ID})"
- _ensure_no_overwrite_at "${_PATH_TARGET_LOCATION}"
- mkdir -p "${PATH_BORG_CONF_KEYS}" "$(dirname ${_PATH_TARGET_LOCATION})"
- echo "Copying ${_PATH_SOURCE} to ${_PATH_TARGET_KEY} …"
- cp "${_PATH_SOURCE}" "${_PATH_TARGET_KEY}"
- echo "Writing ${_PATH_TARGET_LOCATION} …"
- printf '%s' "$(location_from_servername ${_FILENAME})" > "${_PATH_TARGET_LOCATION}"
- chmod a-rwx,u+rw "${_PATH_TARGET_KEY}" "${_PATH_TARGET_LOCATION}"
-}
-
-USAGE_DESC_help='print this help and exit'
-CMDFNC_help() {
- expect_n_args 0 0 '' $@
- print_usage
-}
-
-USAGE_ARGS_info='SERVER_NAME [ARCHIVE]'
-USAGE_DESC_info="run 'borg info' against repo at \"$(location_from_servername SERVER_NAME)\", optionally only against ARCHIVE; if latter not provided, list most recent archives of repo"
-CMDFNC_info() {
- expect_n_args 1 2 "${USAGE_ARGS_info}" $@
- _TARGET_REPO="$(location_from_servername ${1})"
- if [ ! -z "$2" ]; then
- exit_ok $(borg info "${_TARGET_REPO}::$2")
- fi
- _run_borg_with_passphrase info "${_TARGET_REPO}"
- echo "${_OUTPUT}\n\nMost recent archives:"
- borg list "${_TARGET_REPO}" | tail -5
-}
-
-USAGE_ARGS_init='SERVER_NAME'
-USAGE_DESC_init="create repo at \"$(location_from_servername SERVER_NAME)\""
-CMDFNC_init() {
- expect_n_args 1 1 "${USAGE_ARGS_init}" $@
- _STASHED_BORG_PASSPHRASE="$(env | grep -E '^BORG_PASSPHRASE=' | cut -d'=' -f2-)"
- unset BORG_PASSPHRASE
- borg init --encryption=keyfile "$(location_from_servername $1)"
- if [ ! -z "${_STASHED_BORG_PASSPHRASE}" ]; then
- export BORG_PASSPHRASE="${_STASHED_BORG_PASSPHRASE}"
- _STASHED_BORG_PASSPHRASE=
- fi
-}
-
-USAGE_DESC_keys='list known repos in ID, key filename, and alleged location'
-CMDFNC_keys() {
- expect_n_args 0 0 '' $@
- echo "Known keys, as per ${PATH_BORG_CONF_KEYS}:"
- _EXIT_OK_PREFIX='(none, since directory'
- if [ ! -d "${PATH_BORG_CONF_KEYS}" ]; then
- exit_ok "${_EXIT_OK_PREFIX} non-existant)"
- fi
- _KEYFILES="$(ls -1 ${PATH_BORG_CONF_KEYS})"
- if [ -z "${_KEYFILES}" ]; then
- exit_ok "${_EXIT_OK_PREFIX} empty)"
- fi
- echo "${_KEYFILES}" | while read _FILENAME; do
- _KEY_ID=$(_id_from_file "${PATH_BORG_CONF_KEYS}/${_FILENAME}")
- _PATH_LOC="$(path_repo_location ${_KEY_ID})"
- printf "${_KEY_ID} ${_FILENAME} "
- if [ -f "${_PATH_LOC}" ]; then
- printf '%s\n' "$(cat ${_PATH_LOC})"
- else
- printf '?\n'
- fi
- done
-}
-
-USAGE_DESC_orgpull='pull most recent org directory available in repos'
-CMDFNC_orgpull() {
- expect_n_args 0 0 '' $@
- _NAME_ARCHIVE=orgdir
-
- # determine server and repo
- _PATH_PIPE="$(path_tmp_timestamped 'pipe')"
- mkfifo "${_PATH_PIPE}"
- ls -1 "${PATH_BORG_CONF_SECURITY}/" > "${_PATH_PIPE}" &
- while read _FILENAME; do
- _LOCATION="$(cat $(path_repo_location ${_FILENAME}))"
- _NAME_SERVER=$(servername_from_location "${_LOCATION}")
- if ping -c1 -W2 "${_NAME_SERVER}" > /dev/null 2>&1; then
- _REPO="${_LOCATION}"
- break
- else
- echo "Cannot reach ${_NAME_SERVER}, skipping."
- fi
- done < "${_PATH_PIPE}"
- rm "${_PATH_PIPE}"
- if [ -z "${_REPO}" ]; then
- error_exit 'no repo being available.'
- fi
-
- # determine passphrase and archive
- echo "Checking out ${_REPO} …"
- _run_borg_with_passphrase list "${_REPO}"
- _ARCHIVE=$(echo "${_OUTPUT}" | grep "${_NAME_ARCHIVE}" | tail -1 | cut -f1 -d' ')
-
- # pull archive
- echo "Pulling archive: ${_ARCHIVE}"
- cd /
- borg extract --verbose "${_REPO}::${_ARCHIVE}"
-}
-
-USAGE_DESC_orgpush='push org directory to repos'
-CMDFNC_orgpush() {
- expect_n_args 0 0 '' $@
- _NAME_ARCHIVE=orgdir
-
- for _FILENAME in $(ls "${PATH_BORG_CONF_SECURITY}/"); do
- _REPO="$(cat $(path_repo_location ${_FILENAME}))"
- _ARCHIVE="${_REPO}::${_NAME_ARCHIVE}-{utcnow:%Y-%m-%dT%H:%M}"
- _run_borg_with_passphrase create --verbose "${_ARCHIVE}" "${HOME}/org"
- done
-}
-
-# parse args to execution
-if [ "$#" -lt 1 ]; then
- error_exit_with_usage 'missing command.'
-fi
-for CMD in ${USAGE_INDICES}; do
- if [ "$1" = "${CMD}" ]; then
- break
- fi
- CMD=
-done
-if [ -z "${CMD}" ]; then
- error_exit_with_usage "unknown command: ${1}"
-fi
-shift 1
-"CMDFNC_${CMD}" $@
+++ /dev/null
-#!/bin/sh
-set -e
-
-cd $(dirname "$0")
-. lib/abort_if_exists
-. lib/constants_borg # NAME_BORGAPP, PATH_BORG_CONF
-. lib/constants_secrets # PATH_REL_SECRETS, PATH_SECRETS, PATH_SECRETS_BORGKEYS
-. lib/constants_ssh # PATH_USER_SSH
-. lib/constants_user # USERNAME
-. lib/mount_secrets # mount_secrets, copy_and_unmount_secrets
-
-abort_if_exists "${PATH_SECRETS}"
-echo "Collecting new ${PATH_REL_SECRETS}."
-mkdir "${PATH_SECRETS}"
-"${NAME_BORGAPP}" backup_keys "${PATH_SECRETS_BORGKEYS}"
-cp -a "${PATH_USER_SSH}" "${PATH_SECRETS_SSH}"
-echo "secrets file, last update: $(whoami)/$(hostname) at $(date)" > "${PATH_SECRETS}/info"
-
-mount_secrets "$1" # sets PATH_MOUNTED_SECRETS
-SUFFIX_OLD=.old
-PATH_REL_SECRETS_OLD="${PATH_REL_SECRETS}${SUFFIX_OLD}"
-PATH_MOUNTED_SECRETS_OLD="${PATH_MOUNTED_SECRETS}${SUFFIX_OLD}"
-if [ -d "${PATH_MOUNTED_SECRETS}" ]; then
- echo "Drive already has ${PATH_REL_SECRETS}, moving to ${PATH_REL_SECRETS_OLD}."
- rm -rf "${PATH_MOUNTED_SECRETS_OLD}"
- mv "${PATH_MOUNTED_SECRETS}" "${PATH_MOUNTED_SECRETS_OLD}"
-fi
-copy_and_unmount_secrets 'out'
+++ /dev/null
-#!/bin/sh
-set -e
-cd $(dirname "$0")
-. lib/abort
-. lib/audio_dev_is_mute
-. lib/print_usage
-
-MAX_LOUDNESS=150
-
-FLAG_HELP_SHORT='-h'
-FLAG_HELP_LONG='--help'
-
-USAGE_DESCRIPTION='Set audio volume, or (if called without any arguments) toggle audio device muteness.\n\nAvailable arguments:'
-USAGE_LINES='[COMMAND]\nLOUDNESS'
-USAGE_INDICES='LOUDNESS _help'
-USAGE_DESC_LOUDNESS='audio volume to set (as percentage, must be integer)'
-USAGE_DESC__help='display this help and exit'
-USAGE_NAME__help="${FLAG_HELP_SHORT}, ${FLAG_HELP_LONG}"
-
-error_exit() { abort "Aborting due to $1\n\n$(print_usage)"; }
-
-toggle_mute() {
- if audio_dev_is_mute; then
- MUTE_BOOL=0
- MUTE_WORD=off
- else
- MUTE_BOOL=1
- MUTE_WORD=on
- fi
- pacmd set-sink-mute 0 "${MUTE_BOOL}"
- echo "Toggled audio device muteness ${MUTE_WORD}."
-}
-
-set_vol_percentage() {
- AT_FULL=65536
- pacmd set-sink-volume 0 $(calc "($1 * ${AT_FULL} // 100)")
- echo -n "Audio volume set to ${1}%."
- audio_dev_is_mute && echo -n " (But audio device is muted.)"
- echo
-}
-
-N_MAX_ARGS=1
-if [ "$#" -gt "${N_MAX_ARGS}" ]; then
- error_exit "number of arguments greater ${N_MAX_ARGS}."
-elif [ -z "$1" ]; then
- toggle_mute
-elif [ -z "$(echo -n $1 | sed 's/[0-9]*//g')" ]; then
- if [ "$1" -gt "${MAX_LOUDNESS}" ]; then
- error_exit "demand for unreasonably high loudness: $1."
- fi
- set_vol_percentage "$1"
-elif [ "$1" = "$FLAG_HELP_SHORT" ] || [ "$1" = "$FLAG_HELP_LONG" ]; then
- print_usage
-else
- error_exit "unrecognized argument: $1"
-fi
+++ /dev/null
-../../../scripts/lib/abort
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/abort_if_exists
\ No newline at end of file
+++ /dev/null
-audio_dev_is_mute() {
- [ "$(pactl get-sink-mute 0)" = "Mute: yes" ]
-}
+++ /dev/null
-../../../scripts/lib/constants_borg
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/constants_secrets
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/constants_ssh
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/constants_user
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/expect_min_n_args
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/expect_n_args
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/get_passphrase
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/mount_secrets
\ No newline at end of file
+++ /dev/null
-../../../scripts/lib/path_tmp_timestamped
\ No newline at end of file
+++ /dev/null
-print_usage() {
- echo 'Usage:'
- echo "${USAGE_LINES}" | while read _LINE; do
- echo " $(basename $0) ${_LINE}"
- done
- echo "\n${USAGE_DESCRIPTION}\n"
- _var_of() { eval printf '"%s"' '"${'"${1}${2}"'}"'; }
- _build_index() {
- _ARGS="$(_var_of 'USAGE_ARGS_' ${_IDX})"
- if [ ! -z "${_ARGS}" ]; then
- _ARGS=" ${_ARGS}"
- fi
- _NAME="${_IDX}"
- _ALT_NAME="$(_var_of 'USAGE_NAME_' ${_IDX})"
- if [ ! -z "${_ALT_NAME}" ]; then
- _NAME="${_ALT_NAME}"
- fi
- _KEY=" ${_NAME}${_ARGS}"
- _LEN_KEY=$(echo -n "${_KEY}" | wc -c)
- }
- _MAX_LEN_KEY=0
- for _IDX in ${USAGE_INDICES}; do
- _build_index
- if [ "${_LEN_KEY}" -gt "${_MAX_LEN_KEY}" ]; then
- _MAX_LEN_KEY="${_LEN_KEY}"
- fi
- done
- for _IDX in ${USAGE_INDICES}; do
- _build_index
- printf '%s' "${_KEY}"
- _LEN_GAP=$(calc "${_MAX_LEN_KEY} - ${_LEN_KEY} + 4")
- for _ in $(seq 1 ${_LEN_GAP}); do
- printf ' '
- done
- printf '%s\n' "$(_var_of 'USAGE_DESC_' ${_IDX})"
- done
-}
+++ /dev/null
-../../../scripts/lib/retry_until
\ No newline at end of file
+++ /dev/null
-# so we don't have to enter our SSH key password all the time
-eval $(ssh-agent) && ssh-add
-
-# zero audio volume (rather than "just" mute)
-vol 0
-
+++ /dev/null
-bind j scrollline 3
-bind k scrollline -3
-set hintuppercase false
-set hintchars 123456qwertasdfgyxcvb
-
-set searchengine duckduckgo
-set searchurls.wiktionary https://en.wiktionary.org/w/index.php?search=
-set searchurls.dictcc https://www.dict.cc/?s=
-
-autocmd DocStart www.reddit.com urlmodify -t www.reddit old.reddit
-
-set theme dark
-guiset gui none
-guiset tabs always
-guiset hoverlink left
-
-escapehatch
+++ /dev/null
-../../../bookworm/home/root/.shell_prompt_color
\ No newline at end of file
+++ /dev/null
-#!/bin/sh
-# see sway-bar(5) and swaybar-protocol(7)
-set -e
-
-. "${HOME}/.plomlib/audio_dev_is_mute"
-
-SYSCLASS_DIR=/sys/class
-
-COL_WHITE=dddddd
-COL_RED=dd0000
-COL_YELLOW=dddd00
-COL_GREEN=00dd00
-COL_GREY=aaaaaa
-
-print_bar_block() {
- printf '{"full_text": "%s", ' "$1"
- COLOR="${COL_GREY}"
- if [ ! -z "$2" ]; then
- COLOR="$2"
- fi
- printf '"color": "%s", ' "${COLOR}"
- if [ "$3" = "0" ]; then
- printf '"separator": false,\n'
- printf '"separator_block_width": 0,'
- fi
- printf '"markup": "pango",\n'
- printf '},\n'
-}
-
-print_calc() {
- printf "%d" $(calc "$1")
-}
-
-color_at() {
- IDX=0
- while true; do
- IDX=$(print_calc "${IDX} + 1")
- STEP=$(echo "$2" | cut -d'_' -f${IDX})
- if [ -z "${STEP}" ]; then
- break
- fi
- LIMIT=$(echo "${STEP}" | cut -d':' -f1)
- COLOR=$(echo "${STEP}" | cut -d':' -f2)
- if [ "${LIMIT}" -ge "${1}" ]; then
- printf "${COLOR}"
- break
- fi
- done
-}
-
-print_clipboard() {
- print_selection() {
- print_bar_block "$1 [" "${COL_WHITE}" 0
- CLEANED=$(wl-paste $2 | sed 's/"/\\"/g')
- ELLIPSIS=
- if [ $(echo "${CLEANED}" | wc -c) -gt 32 ]; then
- CLEANED=$(echo "${CLEANED}" | cut -zc'-29')
- ELLIPSIS='...'
- fi
- print_bar_block "${CLEANED}" "" 0
- print_bar_block "${ELLIPSIS}]" "${COL_WHITE}" $3
- }
- print_selection 'wl-paste' '' 0
- print_selection ' --primary' --primary
-}
-
-print_online() {
- print_conn() {
- print_bar_block "$(echo $1 | cut -c1):" "" 0
- IP=$(ip --brief addr show | grep "$1" | sed -E 's/ +/\t/g' | cut -f3 | cut -f1 -d'/')
- if [ -z "${IP}" ]; then
- print_bar_block '-'
- else
- print_bar_block "${IP}" "${COL_WHITE}" "$2"
- fi
- }
- print_conn enp
- print_conn wlp 0
- set +e
- STATUS_WIFI=$(nmcli -t -f IN-USE,SSID,SIGNAL dev wifi | grep '^\*:')
- set -e
- if [ ! -z "${STATUS_WIFI}" ]; then
- SIGNAL=$(echo -n "${STATUS_WIFI}" | cut -d':' -f3)
- COLOR=$(color_at $SIGNAL "45:${COL_RED}_85:${COL_YELLOW}_100:${COL_GREEN}")
- print_bar_block " ${SIGNAL}" "${COLOR}" 0
- print_bar_block "% $(echo "${STATUS_WIFI}" | cut -d':' -f2)"
- else
- print_bar_block " "
- fi
-}
-
-print_battery() {
- BAT_DIR="${SYSCLASS_DIR}/power_supply/BAT0"
-
- calc_percent () {
- cat_energy() {
- cat "${BAT_DIR}/energy_$1"
- }
- print_calc "100 * $(cat_energy $1) // $(cat_energy $2)"
- }
-
- CHARGE=$(calc_percent now full)
- COLOR=$(color_at $CHARGE "25:${COL_RED}_65:${COL_YELLOW}_100:${COL_GREEN}")
- print_bar_block "${CHARGE}%" "${COLOR}" 0
-
- COLOR="${COL_WHITE}"
- STATUS=$(cat "${BAT_DIR}/status")
- CHARGING=?
- if [ "${STATUS}" = "Not charging" ]; then
- CHARGING=-
- elif [ "${STATUS}" = "Charging" ]; then
- CHARGING=^
- COLOR="${COL_GREEN}"
- elif [ "${STATUS}" = "Discharging" ]; then
- CHARGING=v
- COLOR="${COL_YELLOW}"
- fi
- print_bar_block "${CHARGING}" "${COLOR}" 0
-
- print_bar_block "$(calc_percent full full_design)%"
-}
-
-print_temperature() {
- COLOR="${COL_WHITE}"
- TEMPERATURE=$(cat ${SYSCLASS_DIR}/thermal/thermal_zone0/temp)
- TEMPERATURE_IN_C=$(print_calc "${TEMPERATURE} // 1000")
- COLOR=$(color_at $TEMPERATURE_IN_C "65:${COL_GREEN}_85:${COL_YELLOW}_999:${COL_RED}")
- print_bar_block "${TEMPERATURE_IN_C}" "${COLOR}" 0
- print_bar_block '°'
-}
-
-print_datetime() {
- DATE=$(date +'%Y-%m-%d')
- TIME=$(date +'%H:%M:%S')
- TZ=$(date +'/%Z')
- print_bar_block "${DATE} " "" 0
- print_bar_block "${TIME}" "${COL_WHITE}" 0
- print_bar_block "${TZ}" ""
-}
-
-print_volume() {
- print_bar_block "vol " '' 0
- VOLUME="$(pactl get-sink-volume 0 | head -1 | sed 's/ //g' | cut -d'/' -f2)"
- if audio_dev_is_mute; then
- print_bar_block "<s>${VOLUME}</s>"
- else
- print_bar_block "${VOLUME}" "${COL_YELLOW}"
- fi
-}
-
-print_keyboard() {
- LAYOUT=$(swaymsg -t get_inputs | grep 'xkb_active_layout_name' | sed -E 's/[ ,"]+//g' | cut -d':' -f2 | head -1)
- if [ "${LAYOUT}" = "English(US)" ]; then
- LAYOUT=us
- elif [ "${LAYOUT}" = "German" ]; then
- LAYOUT=de
- else
- LAYOUT=??
- fi
- print_bar_block "kb_${LAYOUT}"
-}
-
-printf '{"version": 1}\n['
-while true; do
- printf '['
- print_clipboard
- print_online
- print_battery
- print_temperature
- print_datetime
- print_volume
- print_keyboard
- printf '],'
- sleep 0.1
-done
+++ /dev/null
-[user]
- email = c.heller@plomlompom.de
- name = Christian Heller
+++ /dev/null
-../../../bookworm/scripts/lib/copy_dirtree
\ No newline at end of file
+++ /dev/null
-../../../bookworm/scripts/lib/ensure_etc_of_tags
\ No newline at end of file
+++ /dev/null
-../../../bookworm/scripts/lib/ensure_homefiles_of_tags
\ No newline at end of file
+++ /dev/null
-../../../bookworm/scripts/lib/mkdir_p_for_user
\ No newline at end of file
--- /dev/null
+../../../bookworm/scripts/lib/setup_user
\ No newline at end of file
+++ /dev/null
-../../../bookworm/scripts/lib/setup_users
\ No newline at end of file
cd $(dirname "$0")
. lib/abort
. lib/abort_if_offline
-. lib/constants_etc # PATH_REL_ETC, PATH_ETC, PATH_REL_ETC
-. lib/constants_repopaths # PATH_CONF
+. lib/constants_etc # PATH_ETC, PATH_REL_ETC
. lib/constants_user # USERNAME
. lib/determine_ip
-. lib/ensure_etc_of_tags
. lib/expect_min_n_args
. lib/init_packages
. lib/put_finished_marker
-. lib/setup_users
+. lib/setup_user
-PATH_CONF_ETC="${PATH_CONF}/${PATH_REL_ETC}"
+PATH_CONF_ETC="../${PATH_REL_ETC}"
PATH_NETWORK_INTERFACES="${PATH_ETC}/network/interfaces"
PATH_REL_APT=apt
PATH_REL_APT_CONF=${PATH_REL_APT}/apt.conf.d
echo "127.0.0.1 localhost.localdomain localhost" > /etc/hosts
echo "$(determine_ip) ${SYSTEM_NAME}" >> /etc/hosts
-echo "\nAdapting /etc to our needs."
-ensure_etc_of_tags ${TAGS_PACKAGES}
+setup_user
+echo '\nCopying over files, directories.'
+copy_dirtrees_of_tags ${INSTALL_TAGS}
echo "\nEnsuring our desired locale is available."
locale-gen
-echo "\nSetting Berlin localtime."
-ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
+echo '\nSyncing clock.'
ntpdate-debian
-setup_users "${MIN_TAGS}" "${TAGS_USER}"
+echo '\nFinal user setup.'
adduser plom plugdev # so user may use pmount
passwd "${USERNAME}"