From e0540495a0aed652e4d02cf1a5ce3e497e8bbaec Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 18 May 2022 17:44:50 -0400 Subject: [PATCH] dotfiles --- bin/autotranslate | 11 + bin/batterymonitor | 54 +++++ bin/data | 211 ++++++++++++++++++ bin/mnt | 36 +++ bin/music | 39 ++++ bin/rotate | 33 +++ bin/transform | 12 + bin/translate | 85 +++++++ bin/volume | 158 +++++++++++++ dotfiles/.Xresources | 81 +++++++ dotfiles/.aliases | 47 ++++ dotfiles/.config/bspwm/bspwmrc | 15 ++ ...001\005\020\020\020Ť\003Ť\003\020\001\004" | 0 dotfiles/.config/displaym/bspwm_sxhkdrc | 24 ++ dotfiles/.config/displaym/i3wm_sxhkdrc | 27 +++ dotfiles/.config/displaym/sxhkdrc | 50 +++++ dotfiles/.config/i3/config | 144 ++++++++++++ dotfiles/.config/i3status/config | 53 +++++ dotfiles/.config/sxhkd/sxhkdrc-base | 52 +++++ dotfiles/.config/ytfeed-config.txt | 8 + dotfiles/.ctwmrc | 110 +++++++++ dotfiles/.env | 10 + dotfiles/.profile | 16 ++ dotfiles/.vimrc | 18 ++ dotfiles/clone.sh | 24 ++ dotfiles/manifest_dir | 13 ++ dotfiles/manifest_file | 24 ++ dotfiles/misc/PKGBUILD_doas-sudo | 17 ++ dotfiles/misc/README.txt | 38 ++++ dotfiles/misc/arch_yay.sh | 13 ++ dotfiles/misc/cc.sh | 15 ++ dotfiles/misc/cdecho.sh | 4 + dotfiles/misc/dash_sh.sh | 18 ++ dotfiles/misc/doas-sudo.sh | 12 + dotfiles/misc/dotfiles.sh | 45 ++++ dotfiles/misc/dsic.sh | 9 + dotfiles/misc/grammy/icons.sh | 31 +++ dotfiles/misc/grammy/image.sh | 38 ++++ dotfiles/misc/motd | 8 + dotfiles/misc/nmap.sh | 30 +++ dotfiles/misc/oneliners.sh | 45 ++++ dotfiles/misc/sic.sh | 6 + dotfiles/misc/spacer.sh | 8 + dotfiles/misc/unscii-16-full.sh | 16 ++ dotfiles/packages/all | 74 ++++++ dotfiles/packages/alpine_apk | 12 + dotfiles/packages/arch_pacman | 1 + dotfiles/packages/artix_pacman | 7 + dotfiles/packages/bootstrap | 8 + .../packages/common-arch_pacman-artix_pacman | 35 +++ dotfiles/packages/common-arch_yay-artix_yay | 24 ++ .../common-arch_yay-artix_yay-debian_apt | 2 + dotfiles/packages/debian_apt | 5 + man/dotfiles.md | 19 ++ 54 files changed, 1895 insertions(+) create mode 100755 bin/autotranslate create mode 100755 bin/batterymonitor create mode 100755 bin/data create mode 100755 bin/mnt create mode 100755 bin/music create mode 100755 bin/rotate create mode 100755 bin/transform create mode 100755 bin/translate create mode 100755 bin/volume create mode 100644 dotfiles/.Xresources create mode 100755 dotfiles/.aliases create mode 100755 dotfiles/.config/bspwm/bspwmrc create mode 100644 "dotfiles/.config/displaym/\001p\020@čI@8\v@1\006\004@@@h\002h\002\b\003\004¨\002¨\002¨\002\034\034\001\001\004p\006p\006\020\001\005\020\020\020Ť\003Ť\003\020\001\004" create mode 100644 dotfiles/.config/displaym/bspwm_sxhkdrc create mode 100755 dotfiles/.config/displaym/i3wm_sxhkdrc create mode 100755 dotfiles/.config/displaym/sxhkdrc create mode 100644 dotfiles/.config/i3/config create mode 100644 dotfiles/.config/i3status/config create mode 100755 dotfiles/.config/sxhkd/sxhkdrc-base create mode 100644 dotfiles/.config/ytfeed-config.txt create mode 100644 dotfiles/.ctwmrc create mode 100644 dotfiles/.env create mode 100644 dotfiles/.profile create mode 100644 dotfiles/.vimrc create mode 100755 dotfiles/clone.sh create mode 100644 dotfiles/manifest_dir create mode 100644 dotfiles/manifest_file create mode 100644 dotfiles/misc/PKGBUILD_doas-sudo create mode 100644 dotfiles/misc/README.txt create mode 100755 dotfiles/misc/arch_yay.sh create mode 100644 dotfiles/misc/cc.sh create mode 100644 dotfiles/misc/cdecho.sh create mode 100644 dotfiles/misc/dash_sh.sh create mode 100755 dotfiles/misc/doas-sudo.sh create mode 100755 dotfiles/misc/dotfiles.sh create mode 100755 dotfiles/misc/dsic.sh create mode 100644 dotfiles/misc/grammy/icons.sh create mode 100755 dotfiles/misc/grammy/image.sh create mode 100644 dotfiles/misc/motd create mode 100644 dotfiles/misc/nmap.sh create mode 100755 dotfiles/misc/oneliners.sh create mode 100755 dotfiles/misc/sic.sh create mode 100755 dotfiles/misc/spacer.sh create mode 100755 dotfiles/misc/unscii-16-full.sh create mode 100644 dotfiles/packages/all create mode 100644 dotfiles/packages/alpine_apk create mode 100644 dotfiles/packages/arch_pacman create mode 100644 dotfiles/packages/artix_pacman create mode 100644 dotfiles/packages/bootstrap create mode 100644 dotfiles/packages/common-arch_pacman-artix_pacman create mode 100644 dotfiles/packages/common-arch_yay-artix_yay create mode 100644 dotfiles/packages/common-arch_yay-artix_yay-debian_apt create mode 100644 dotfiles/packages/debian_apt create mode 100644 man/dotfiles.md diff --git a/bin/autotranslate b/bin/autotranslate new file mode 100755 index 0000000..dc41f9a --- /dev/null +++ b/bin/autotranslate @@ -0,0 +1,11 @@ +#!/bin/sh -x + +[ -n "$dmenu" ] || dmenu=dmenu + +lang="$LANG" +# lots of potentially wrong assumptions here +printf "%s\n" "$lang" | grep "_" >/dev/null 2>&1 \ + && lang="$(printf "%s\n" "$lang" | cut -d '_' -f 1)" \ + || lang=en + +printf "%s\n" "$(xclip -o)" | translate auto $lang | "$($dmenu -p "Press Escape to dismiss.")" diff --git a/bin/batterymonitor b/bin/batterymonitor new file mode 100755 index 0000000..fb6de6c --- /dev/null +++ b/bin/batterymonitor @@ -0,0 +1,54 @@ +#!/bin/sh + +POLLING_FREQUENCY=1 + +# ISO 8601 +alias date="date '+%Y-%m-%dT%T'" + +emit() { + printf "[%s] " "$(date)" + echo "$@" +} +get_current_level() { + # adapted from other script i wrote, also in the public domain + if [ "$(uname)" = "Linux" ]; then + # this is a dirty hack. + # acpi | awk '{print $4}' will print the battery percentage, + # and s/,$// strips the trailing comma. + # acpi -a will just print the power adapter status. + printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//')" + return 0 + elif [ "$(uname)" = "NetBSD" ]; then + printf "%b" "$(envstat -s acpibat0:charge \ + | sed 1,2d \ + | cut -d ':' -f 2 \ + | awk '{print $1}' \ + | cut -d '.' -f 1)" + return 0 + else + printf "get_battery_status: unsupported OS" >>/dev/stderr + return 1 + fi +} + +! get_current_level >/dev/null \ + && printf "Unable to get battery status on this system.\n" >>/dev/stderr \ + && exit 1 \ + || true + +current_level=$(get_current_level) +previous_level=$current_level + +emit "$(printf "Current level: %d%%" "$current_level")" + +while true; do + current_level=$(get_current_level) + if ! [ $current_level -eq $previous_level ]; then + [ $current_level -lt $previous_level ] \ + && emit "$(printf "Discharged: %d%% -> %d%%\n" $previous_level $current_level )" \ + || emit "$(printf " Charged: %d%% -> %d%%\n" $previous_level $current_level )" + previous_level=$current_level + fi + + sleep $POLLING_FREQUENCY +done diff --git a/bin/data b/bin/data new file mode 100755 index 0000000..08fe086 --- /dev/null +++ b/bin/data @@ -0,0 +1,211 @@ +#!/bin/sh + +set -e + +# depends on https://git.sr.ht/~trinity/utilities (particularly fdivide(1), +# gt(1), and stris(1)) +# there are issues with the POSIX shell implementations included in this script +# and particularly with stris + +# on Linux only: +# these files (separated by newlines) will have the current CPU temperature +# multiplied by $CPU_TEMP_SCALE. this script divides the file contents by scale +# and displays that temperature (assumed to be in Celsius units) +CPU_TEMP_FILES="/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp2_input +/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp3_input" +CPU_TEMP_SCALE=1000 + +# format for the date (by default in this script, ISO 8601) +alias date="date '+%Y-%m-%dT%T'" + +DELIMITER=" || " + +# how fast to refresh the display (in seconds, will be substituted with 1 if +# not an integer) +INTERVAL=1 + +# enable if you have issues with missing `stris` etc. will save negligible time +# with shells that don't spawn new processes for test(1) +# fdivide_posix() may not be fully working yet, so it's not enabled by default +#POSIXLY_CORRECT=1 + +# this URL will have in plain text the public IP address from which it was +# accessed +#PUBLIC_IP_FETCH_URL="http://ifconfig.io/" +#PUBLIC_IP_FETCH_URL="https://ifconfig.io" +#PUBLIC_IP_FETCH_URL="http://icanhazip.com" +PUBLIC_IP_FETCH_URL="https://icanhazip.com" +PUBLIC_IP6_FETCH_URL="$PUBLIC_IP_FETCH_URL" + +get_battery_status() { + if [ "$(uname)" = "Linux" ]; then + # this is a dirty hack. + # acpi | awk '{print $4}' will print the battery percentage, + # and s/,$// strips the trailing comma. + # acpi -a will just print the power adapter status. + printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//') ($(acpi -a))" + return + elif [ "$(uname)" = "NetBSD" ]; then + printf "%b%%" "$(envstat -s acpibat0:charge \ + | sed 1,2d \ + | cut -d ':' -f 2 \ + | awk '{print $1}' \ + | cut -d '.' -f 1)" + return + else + printf "get_battery_status: unsupported OS" + fi +} + +get_cpu_temp() { + if [ "$(uname)" = "Linux" ]; then + RETVAL="" + # iterate over files, adjust, print out "%dC " + for file in $CPU_TEMP_FILES; + do RETVAL="$RETVAL$(fdivide $(cat $file) $CPU_TEMP_SCALE)C " + done + # in-line python (bet you've never seen that before) that + # strips off trailing whitespace. could be done with sed but + # this was more fun + printf "%b" "$RETVAL" \ + | python -c "from sys import stdin; print(stdin.read().rstrip() + '\n')" + return + elif [ "$(uname)" = "NetBSD" ]; then + printf "%bC" "$(envstat -s coretemp0:'cpu0 temperature' \ + | sed 1,2d \ + | cut -d ':' -f 2 \ + | awk '{print $1}' \ + | cut -d '.' -f 1)" + return + else + printf "get_cpu_temp: unsupported OS" + fi +} + +get_current_desktop() { + case "$WM" in + (bspwm) printf "[%b] " "$(bspc query -D -d focused --names)" ;; + esac +} + +get_memory_usage() { + if [ "$(uname)" = "Linux" ]; then + printf "%b" \ + "$(free | head -n 2 | tail -n 1 \ + | awk '{print $3 " used / " $2 " total"}')" + return + fi +} + +get_public_ip() { + PUBLIC_IP4="$(curl -4 "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \ + || printf "-1")" + PUBLIC_IP6="$(curl -6 "$PUBLIC_IP6_FETCH_URL" --no-progress-meter 2>/dev/null \ + || printf "-1")" + if [ "$PUBLIC_IP4" = "-1" ] && [ "$PUBLIC_IP6" = "-1" ]; then + printf "[error fetching address]" + elif [ "$PUBLIC_IP4" = "-1" ]; then + printf "%b" "$PUBLIC_IP6" + elif [ "$PUBLIC_IP6" = "-1" ]; then + printf "%b" "$PUBLIC_IP4" + else + printf "%b / %b" "$PUBLIC_IP4" "$PUBLIC_IP6" + fi + return +} + +# slow, so fetch it in advance +PUBLIC_IP="$(get_public_ip)" + +printbar() { + printf "%b" "$(get_current_desktop)" + printf "%b" "$(date)" + printf "%b" "$DELIMITER" + printf "%b" "BAT: $(get_battery_status)" + printf "%b" "$DELIMITER" + printf "%b" "CPU: $(get_cpu_temp)" + printf "%b" "$DELIMITER" + printf "%b" "PuIP: $PUBLIC_IP" + #printf "%b" "$DELIMITER" + #printf "%b" "MEM: $(get_memory_usage)" + printf "\n" + return +} + +############################################################################### +# the following is for error prevention and doesn't need to be changed # +############################################################################### + +# POSIX shell version of fdivide +fdivide_posix() { + [ -n "$2" ] && [ -n "$1" ] && [ -z "$3" ] \ + || return 1 + printf "%b\n" "$(($1/$2))" + return +} + +# [ -gt ] with better syntax +gt_posix() { + while [ -n "$2" ]; do + [ "$1" -gt "$2" ] \ + || return 1 + shift 1 + done + return 0 +} + +# limited POSIX shell version of stris +# BROKEN REGEX. MUSTFIX. +stris_posix() { + [ -n "$2" ] || return 1 + case "$1" in + (int) + # https://stackoverflow.com/questions/2210349/test-whether-string-is-a-valid-integer + printf "$2" | grep '^-?[0-9]+$' >/dev/null \ + && return 0 \ + || return 1 + ;; + (uint) + printf "$2" | grep '^[0-9]+$' >/dev/null \ + && return 0 \ + || return 1 + ;; + (*) + return 1 + ;; + esac + return +} + +# check to make sure we have non-standard utilities + +[ -n "$POSIXLY_CORRECT" ] || ! which fdivide >/dev/null 2>&1 \ + && alias fdivide="fdivide_posix" \ + || true + +[ -n "$POSIXLY_CORRECT" ] || ! which gt >/dev/null 2>&1 \ + && alias gt="gt_posix" \ + || true + +[ -n "$POSIXLY_CORRECT" ] || ! which stris >/dev/null 2>&1 \ + && alias stris="stris_posix" \ + || true + +# check to make sure customizeable vars are in proper format + +[ -n "$INTERVAL" ] && stris int "$INTERVAL" \ + || INTERVAL=1 + +[ -n "$CPU_TEMP_SCALE" ] && stris int "$CPU_TEMP_SCALE" \ + && gt "$CPU_TEMP_SCALE" 0 \ + || CPU_TEMP_SCALE=1 + +[ -n "$CPU_TEMP_FILES" ] \ + || alias get_cpu_temp="printf '[no temperature files specified]\n'" + +# main loop + +while true; do + printbar + sleep "$INTERVAL" +done diff --git a/bin/mnt b/bin/mnt new file mode 100755 index 0000000..2e6359c --- /dev/null +++ b/bin/mnt @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +DEV="/dev" +MNT="/mnt" +# will not be split when used +SUDO="doas" + +# preliminary checks +[ -n "$2" ] || [ -z "$1" ] \ + && printf "Usage: %b [device in %b/]\n" "$0" "$DEV" >>/dev/stderr \ + && exit 1 \ + || true + +# no need to priviledge escalate if we're already root +! [ "$(id -u)" = 0 ] \ + || SUDO="" + +# exhaustive checks to ensure $DEV/$1 exists and that $MNT/$1 can be safely used as a mountpoint +! [ -d "$MNT/$1" ] && [ -a "$MNT/$1" ] \ + && printf "%b: '%b/%b' already exists, but isn't a directory.\n" "$0" "$MNT" "$1" >>/dev/stderr \ + && exit 1 \ + || true +[ -d "$MNT/$1" ] \ + || mkdir "$MNT/$1" +! [ "$(ls -A "$MNT/$1" | wc -l | xargs echo)" = 0 ] \ + && printf "%b: '%b/%b' is a directory, but isn't empty.\n" "$0" "$MNT" "$1" >>/dev/stderr \ + && exit 1 \ + || true +! [ -e "/dev/$1" ] \ + && printf "%b: '%b/%b' doesn't exist.\n" "$0" "$DEV" "$1" >>/dev/stderr \ + && exit 1 \ + || true + +# ok, we're safe +"$SUDO" mount "$DEV/$1" "$MNT/$1" diff --git a/bin/music b/bin/music new file mode 100755 index 0000000..8c91b6e --- /dev/null +++ b/bin/music @@ -0,0 +1,39 @@ +#!/bin/sh +set -e + +# DistroTube's dm-radio fixed and in POSIX shell + +alias nonzero="test -n" + +nonzero "$MUSIC_PLAYER" || MUSIC_PLAYER=mpv +nonzero "$DMENU" || DMENU=dmenu + +# tab delimits name from URL +STATIONS="\ +50s Rewind https://zeno.fm/radio/50s-rewind/ +60s Rewind https://zeno.fm/radio/60s-rewind/ +70s Rewind https://zeno.fm/radio/70s-rewind/ +80s Rewind https://zeno.fm/radio/80s-rewind/ +90s Rock https://zeno.fm/radio/90s-rock/ +The 2000s https://zeno.fm/radio/the-2000s/ +Classical Radio https://zeno.fm/radio/classical-radio/ +Classical Relaxation https://zeno.fm/radio/radio-christmas-non-stop-classical/ +Classic Rock https://zeno.fm/radio/classic-rockdnb2sav8qs8uv/ +Gangsta49 https://zeno.fm/radio/gangsta49/ +HipHop49 https://zeno.fm/radio/hiphop49/ +Madhouse Country Radio https://zeno.fm/radio/madhouse-country-radio/ +PopMusic https://zeno.fm/radio/popmusic74vyurvmug0uv/ +PopStars https://zeno.fm/radio/popstars/ +RadioMetal https://zeno.fm/radio/radio-metal/ +RocknRoll Radio https://zeno.fm/radio/rocknroll-radio994c7517qs8uv/ +Cancel nop:// +" + +selection="$(printf "%s\n" "$STATIONS" | grep -F "$(printf "%s\n" "$STATIONS" | cut -f 1 | dmenu) ")" + +if [ "$selection" = "Cancel nop://" ] +then exit 0 +fi + +pkill -f http || printf "%s: mpv not running.\n" "$0" 1>&2 +printf "%s\n" "$selection" | cut -f 2 | xargs mpv diff --git a/bin/rotate b/bin/rotate new file mode 100755 index 0000000..2195ce5 --- /dev/null +++ b/bin/rotate @@ -0,0 +1,33 @@ +#!/bin/sh +set -e + +ROTATION_FILE="$HOME/.rotation" +SCREEN="$1" + +_core(){ + case "$1" in + 1) xrandr --output "$SCREEN" --rotate normal ;; + 2) xrandr --output "$SCREEN" --rotate left ;; + 3) xrandr --output "$SCREEN" --rotate inverted ;; + 4) xrandr --output "$SCREEN" --rotate right ;; + *) return 1 + esac + return 0 +} + +if [ -e "$ROTATION_FILE" ] +then ROTATION="$(dd <"$ROTATION_FILE" 2>/dev/null)" + if ! _core "$ROTATION" + then _core 1 + ROTATION=2 + else ROTATION=$(printf "%s + 1\n" "$ROTATION" | bc) + ! [ "$ROTATION" -gt 4 ] \ + || ROTATION=1 + fi +else _core 1 + ROTATION=2 +fi + +printf "%s\n" "$ROTATION" >"$ROTATION_FILE" + +exit 0 diff --git a/bin/transform b/bin/transform new file mode 100755 index 0000000..718e8fc --- /dev/null +++ b/bin/transform @@ -0,0 +1,12 @@ +#!/bin/sh +argv0="$0" +usage(){ + printf "Usage: %s (un) [XRandR output]\n" "$argv0" 1>&2 + exit 64 # sysexits(3) EX_USAGE +} +if [ -n "$2" ] && [ "$1" = un ] +then xrandr --output "$2" --transform none +elif [ -n "$1" ] +then "$DISPLAYM_CONFIG/xrandr_transform.sh" "$1" +else usage +fi diff --git a/bin/translate b/bin/translate new file mode 100755 index 0000000..f9af8a6 --- /dev/null +++ b/bin/translate @@ -0,0 +1,85 @@ +#!/usr/bin/env python3 + +# googletrans comes with a translate(1) command line application but I don't +# like its UI. + +import sys; + +stdin = sys.stdin; +stdout = sys.stdout; +stderr = sys.stderr; + +_exit = exit; +exit = sys.exit; + +def printf(s, *args): + return fprintf(stdout, s, *args); + +def fprintf(f, s, *args): + printing = s if len(args) == 0 else (s % args); + return f.write(printing); + +try: + import googletrans; +except: + printf( + "%s: This Python script requires the \"googletrans\" library.\n", + sys.argv[0] + ); + +def usage(name): + fprintf( + stderr, "Usage: %s [source language] [destination language]\n", + name + ); + exit(1); + +def main(argc, argv): + accepted_languages = set(list(googletrans.LANGCODES) + + list(googletrans.LANGUAGES) + [ "auto" ]); + good = True; + isatty = stdout.isatty(); + translator = googletrans.Translator(); + + if argc != 3: + usage(argv[0]); + + src = argv[1].lower(); + dest = argv[2].lower(); + for arg in [ src, dest ]: + if not(arg in accepted_languages): + good = False; + fprintf(stderr, + "%s: %s: Language not recognized.\n", + argv[0], arg); + if(not(good)): + fprintf(stderr, "The following languages and language codes are" + + " recognized:\n"); + print(googletrans.LANGCODES); + exit(1); + + try: + text = stdin.read().split('\n')[:-1] + except KeyboardInterrupt: + fprintf(stderr, "%s: Cancelled (keyboard interrupt).\n", argv[0]); + exit(1); + for line in text: + try: + translation = translator.translate(line, src=src, dest=dest); + except: + fprintf(stderr, "%s: %s ->%s\n\t%s\n", + argv[0], line, dest, "Error trying to translate."); + if isatty: + fprintf(stdout, + "%s -> %s\n" + + "\t%s -> %s\n" + + "\tGiven pronunciation: %s\n", + translation.origin, translation.text, + translation.src, translation.dest, + translation.pronunciation + ); + else: + fprintf(stdout, "%s\n", translation.text); + return 0; + +exit(main(len(sys.argv), sys.argv)); diff --git a/bin/volume b/bin/volume new file mode 100755 index 0000000..e1197cb --- /dev/null +++ b/bin/volume @@ -0,0 +1,158 @@ +#!/bin/sh + +argv0="$0" + +# ADDING A NEW SOUND SERVER/CLIENT/WHATEVERIDK +# `volume a` and `volume s` are the system dependent functions. + +# `volume a $2` must set the volume to $2, an integer value. This should be a +# percentage, 100% being the loudest possible volume that can be output by +# hardware without quality loss. Percentages above 100% will be allowable in +# software if using percentage units. If percentage units are implausible to +# implement, system units are okay (e.g. 0-$arbitrary scale versus 0-100). + +# `volume s` must output the current volume in integer form in whatever units +# are being used by `volume a` on the given system. + +VOLUME_TMP_FILE="$HOME/.volume-previous" + +if [ "$(uname)" = "NetBSD" ]; then + backend="NetBSD" +elif command -v pactl >/dev/null; then + backend="pulseaudio" +fi + +unknown_system(){ + printf "%s: Unknown system.\n" "$argv0" 1>&2 + exit 1 +} + +usage(){ + printf "\ +Usage: %b {function} (operand)\n" "$argv0" + printf "\ +Functions: + '+' - shortcut to \"relative \$2\" + '-' - shortcut to \"relative -\$2\" + absolute - change sound output to absolute unit + help,'' - print this help output + mute - toggle mute/unmute + relative - change sound output relative to current status + status - print current sound output in system unit +" + printf "\ +The options are matched with [char]*. So \"%b help\" +works the same as \"%b h\". + +" "$argv0" "$argv0" + printf "\ +The backend detected is %b. +" "$backend" + exit 1 +} + +# $1 becomes 'help' if previously empty +[ -n "$1" ] \ + && argv1="$1" \ + || argv1=help + +case "$argv1" in +# +# SYSTEM DEPENDENT +# +(a*) + [ -n "$2" ] && [ -z "$3" ] || usage + + case "$backend" in + NetBSD) + # NetBSD 9.2 STABLE 2021-07 + audioctl -w play.gain=$2 >/dev/null + ;; + + pulseaudio) + # pactl 15.0 compiled+linked with libpulse 15.0.0 + pactl set-sink-volume @DEFAULT_SINK@ $2% + ;; + + *) unknown_system + esac + exit 0 ;; +(s*) + [ -z "$2" ] || usage + + case "$backend" in + NetBSD) + # hacky + audioctl -a \ + | grep "play\.gain" \ + | cut -d '=' -f 2 + ;; + + pulseaudio) + # really hacky, gets the job done + # gets the volume % of Lchan specifically + pactl get-sink-volume @DEFAULT_SINK@ \ + | sed q \ + | cut -d '/' -f 2 \ + | xargs echo \ + | sed s/'%'// + ;; + + *) unknown_system ;; + esac + exit 0 ;; +# +# SYSTEM independent +# +(+) + [ -n "$2" ] && [ -z "$3" ] \ + && "$argv0" r "$2" \ + || usage + ;; +(-) + [ -n "$2" ] && [ -z "$3" ] \ + && "$argv0" r -"$2" \ + || usage + ;; +(m*) + [ -z "$2" ] || usage + # restore previous volume if there is one + if [ -e "$VOLUME_TMP_FILE" ]; then + "$argv0" a "$(cat "$VOLUME_TMP_FILE")" \ + && rm "$VOLUME_TMP_FILE" \ + && printf "Unmuted.\n" \ + && exit 0 \ + || printf "Error restoring previous volume.\n" \ + >/dev/stderr \ + && exit 1 + fi + + # otherwise, make new file with previous volume + + # dd used rather than shell redirect so it's easy to determine + # whether or not the file write worked + if ! printf "%b" "$("$argv0" s)" \ + | dd >"$VOLUME_TMP_FILE" 2>/dev/null + then + printf "Error writing to file.\n" >/dev/stderr + false + fi + + # and then of course mute + "$argv0" a 0 + printf "Muted.\n" + + exit 0 ;; +(r*) + [ -n "$2" ] && [ -z "$3" ] \ + || usage + + if ! newval="$(printf "%s %s + p\n" "$("$argv0" s)" "$(printf "%s\n" "$2" | sed 's/^-/_/')" | dc)"; then + printf "%b: Error finding new value for volume.\n" "$argv0" + exit 1 + fi + "$argv0" a "$newval" + exit $? ;; +(h*) usage ;; +(*) usage ;; +esac diff --git a/dotfiles/.Xresources b/dotfiles/.Xresources new file mode 100644 index 0000000..7eab4dd --- /dev/null +++ b/dotfiles/.Xresources @@ -0,0 +1,81 @@ +#define AMBER #FFBD00 +#define BLACK #000000 +#define PINK #FFDBDB +#define WHITE #FFFFFF + +#define FOREGROUND PINK +#define BACKGROUND BLACK + +! unscii font +*faceName: unscii:antialias=false +*faceSize: 12 + +*cursorColor: FOREGROUND +*Foreground: FOREGROUND +*Background: BACKGROUND + +! xterm specific stuff +xterm*loginshell: true +xterm*locale: UTF-8 +xterm*titleModes: 16 +xterm*metaSendsEscape: true +xterm*utf8: 1 +xterm*utf8Fonts: 1 +xterm*utf8Title: true + +! I used to use these but they make it really hard to see default Lynx. + +! "quantified colors" but every nybble +! is decremented ====================== +! black/dark-gray +!*.color0: #000000 +!*.color8: #343434 +! red/orange +!*.color1: #DE9591 +!*.color9: #D09E74 +! green/aquamarine +!*.color2: #70B880 +!*.color10: #49BB9E +! amber/yellow +!*.color3: #958350 +!*.color11: #B7B763 +! blue/violet +!*.color4: #92A7DE +!*.color12: #BB9BDC +! magenta/rose +!*.color5: #D592CB +!*.color13: #E190B1 +! cyan/azure +!*.color6: #40B9BC +!*.color14: #63B2D3 +! gray/white +!*.color7: #707070 +!*.color15: #B0B0B0 +! ===================================== + +! "quantified colors" ================= +! black/dark-gray +!*.color0: #101010 +!*.color8: #454545 +! red/orange +!*.color1: #EFA6A2 +!*.color9: #E0AF85 +! green/aquamarine +!*.color2: #80C990 +!*.color10: #5ACCAF +! amber/yellow +!*.color3: #A69460 +!*.color11: #C8C874 +! blue/violet +!*.color4: #A3B8EF +!*.color12: #CCACED +! magenta/rose +!*.color5: #E6A3DC +!*.color13: #F2A1C2 +! cyan/azure +!*.color6: #50CACD +!*.color14: #74C3E4 +! gray/white +!*.color7: #808080 +!*.color15: #C0C0C0 +! ===================================== diff --git a/dotfiles/.aliases b/dotfiles/.aliases new file mode 100755 index 0000000..dd23097 --- /dev/null +++ b/dotfiles/.aliases @@ -0,0 +1,47 @@ +#!/bin/sh + +# audio drive +#alias audio="sudo mount -L 'AUDIO' /mnt/audio" + +alias awk="nawk" +alias b="$BROWSER" +alias cls="clear" +alias cp="cp -iv" +alias doas="$SUDO" +alias e="$EDITOR" +alias ipconfig="ifconfig" +#alias ls="9 ls" +alias ls="ls -1A" +alias mpv="LIBGL_ALWAYS_SOFTWARE=1 mpv --vo=x11" +alias mullvad="curl https://am.i.mullvad.net/connected" +alias mv="mv -iv" +alias p="ping 1.1.1.1" + +# media hard drive +alias partone="sudo mount -L 'PARTONE' /mnt/partone" +alias prat="$HOME/src/packrat/prat" + +pyenv() { + eq $# 0 \ + && . ./bin/activate \ + || . $1/bin/activate +} + +alias sensors="watch sensors" +alias sudo="$SUDO" +alias try="PREFIX=/home/trinity/src/trilsd/ /home/trinity/src/trilsd/dist/try" + +# Wacom Intuos 2 +#alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1" +#alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" + +alias units="units --history /dev/null" +alias v="$VISUAL" +alias weather="curl wttr.in/lewiston+maine?m" + +webm() { + ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis "$(printf "%b" "$1" | awk -F '.' '{print $1}')".webm +} + +alias y=youtube-dl +alias yay="paru" diff --git a/dotfiles/.config/bspwm/bspwmrc b/dotfiles/.config/bspwm/bspwmrc new file mode 100755 index 0000000..7bdebab --- /dev/null +++ b/dotfiles/.config/bspwm/bspwmrc @@ -0,0 +1,15 @@ +#!/bin/sh +bspc config active_border_color '#FFCACA' +bspc config focus_follows_pointer true +bspc config focused_border_color '#FFFFFF' +bspc config normal_border_color '#FFDBDB' +bspc config window_gap 0 +bspc monitor LVDS1 -d 1 2 3 4 +xrandr | grep ' connected ' | awk '{print $1}' | grep VGA >/dev/null 2>&1 \ + && bspc monitor VGA1 -d 5 6 7 8 \ + || true +bspc rule -a XClock manage=off # thanks emanuele6 +bspc rule -a xload manage=off +xdo lower -NXClock +xdo lower -Nxload +data | lemonbar -bf '-*-unscii-*-*-*-*-*-*-*-*-*-*-*-*' -F '#FFDBDB' diff --git "a/dotfiles/.config/displaym/\001p\020@čI@8\v@1\006\004@@@h\002h\002\b\003\004¨\002¨\002¨\002\034\034\001\001\004p\006p\006\020\001\005\020\020\020Ť\003Ť\003\020\001\004" "b/dotfiles/.config/displaym/\001p\020@čI@8\v@1\006\004@@@h\002h\002\b\003\004¨\002¨\002¨\002\034\034\001\001\004p\006p\006\020\001\005\020\020\020Ť\003Ť\003\020\001\004" new file mode 100644 index 0000000..e69de29 diff --git a/dotfiles/.config/displaym/bspwm_sxhkdrc b/dotfiles/.config/displaym/bspwm_sxhkdrc new file mode 100644 index 0000000..7a90078 --- /dev/null +++ b/dotfiles/.config/displaym/bspwm_sxhkdrc @@ -0,0 +1,24 @@ +# thanks weedsmokingjew + +mod1 + {_,shift + }F4 + bspc node -{c,k} +mod1 + {_,shift + }q + bspc node -{c,k} + +mod1 + {_,shift + }{1-4} + bspc {desktop -f,node -d} '^{1-4}' + +mod1 + shift + e + [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && bspc quit + +mod1 + f + bspc node -t '~fullscreen' + +mod1 + {h,j,k,l} + bspc node -f {west,south,north,east} + +mod1 + shift + {h,j,k,l} + bspc node -s {west,south,north,east} + +mod1 + shift + r + bspc wm -r && pkill -USR1 -x sxhkd diff --git a/dotfiles/.config/displaym/i3wm_sxhkdrc b/dotfiles/.config/displaym/i3wm_sxhkdrc new file mode 100755 index 0000000..943fcaa --- /dev/null +++ b/dotfiles/.config/displaym/i3wm_sxhkdrc @@ -0,0 +1,27 @@ +mod1 + F4 + i3-msg kill + +mod1 + {h,j,k,l} + i3-msg focus {left,down,up,right} + +mod1 + f + i3-msg fullscreen toggle +mod1 + F11 + i3-msg fullscreen toggle + +mod1 + {s,w} + i3-msg layout {stacking,tabbed} +mod1 + e + i3-msg layout toggle split + +mod1 + space + i3-msg focus mode_toggle + +mod1 + shift + space + i3-msg floating toggle + +mod1 + shift + {h,j,k,l} + i3-msg move {left,down,up,right} + +mod1 + shift + e + [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && i3-msg exit diff --git a/dotfiles/.config/displaym/sxhkdrc b/dotfiles/.config/displaym/sxhkdrc new file mode 100755 index 0000000..ae4d2c7 --- /dev/null +++ b/dotfiles/.config/displaym/sxhkdrc @@ -0,0 +1,50 @@ +XF86AudioMute + volume m +XF86Audio{Lower,Raise}Volume + volume r {-5,5} +XF86Launch1 + $TERMINAL + +XF86TaskPane + rotate LVDS1 + +control + shift + Escape + $TERMINAL -e htop +Print + scrot + +mod1 + {9,0} + volume r {-5,5} +# cred 4 https://github.com/patrickbolle/dotfiles/ +mod1 + equal + light -A 5 +mod1 + shift + equal + light -A 1 +mod1 + minus + light -U 5 +mod1 + shift + minus + light -U 1 + +mod1 + shift + r + pkill -USR1 sxhkd + +mod1 + t + dmenu="dmenu -fn unscii -l 1 -nb #000 -nf #FFDBDB -sb #000 -sf #FFDBDB" autotranslate + +mod1 + shift + i + pkill dmenubar + +mod1 + d + dmenu_run -fn unscii -nb '#000' -nf '#FFDBDB' -p '$' -sb '#FFDBDB' -sf '#000' + +mod1 + Return + $TERMINAL + +mod1 + v + $TERMINAL -e aiomixer + +mod1 + b + $BROWSER + +mod1 + m + volume m diff --git a/dotfiles/.config/i3/config b/dotfiles/.config/i3/config new file mode 100644 index 0000000..834d743 --- /dev/null +++ b/dotfiles/.config/i3/config @@ -0,0 +1,144 @@ +# i3 config file (v4) +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod1 + +# Font for window titles +font pango:unscii 12 + +# keybindings +exec_always --no-startup-id sxhkd + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start pulseaudio +exec --no-startup-id pulseaudio --start + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload + +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart + +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.") ] && i3-msg exit + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status + separator_symbol " // " + +# defaults +# colors { +# background #ffffff +# statusline #000000 +# separator #ff0000 +# focused_workspace #4c7899 #285577 #ffffff +# active_workspace #333333 #5f676a #ffffff +# inactive_workspace #333333 #222222 #888888 +# urgent_workspace #2f343a #900000 #ffffff +# binding_mode #2f343a #900000 #ffffff +# } + + colors { + background #ffdbdb + statusline #000000 + separator #ff0000 + # border bg text + focused_workspace #ff0000 #ff0000 #ffffff + active_workspace #ffffff #ffffff #000000 + inactive_workspace #000000 #000000 #ffffff + urgent_workspace #2f343a #900000 #ff0000 + binding_mode #2f343a #900000 #ffffff + } +} + +# color customization +# class border bg text indicator child_border +client.focused #ff0000 #ffffff #ff0000 #2e9ef4 #ff0000 +client.focused_inactive #ffffff #ffffff #000000 #484e50 #000000 +client.unfocused #000000 #000000 #ff0000 #292d2e #ffffff +client.urgent #900000 #900000 #ffffff #900000 #900000 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c + +client.background #ffffff + +# Wallpaper +exec --no-startup-id feh --bg-center /home/trinity/Pictures/Wallpapers/akirablast.jpg + +# moving workspaces +bindsym $mod+Shift+greater move container to output right +bindsym $mod+Shift+less move container to output left + +# Gaps +#gaps inner 10 +#gaps outer 10 +#gaps horizontal 10 +#gaps vertical 10 +#gaps top 10 +#gaps right 10 +#gaps bottom 10 +#gaps left 10 + +# disables titlebars +new_window 1pixel diff --git a/dotfiles/.config/i3status/config b/dotfiles/.config/i3status/config new file mode 100644 index 0000000..8429036 --- /dev/null +++ b/dotfiles/.config/i3status/config @@ -0,0 +1,53 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# Ăź +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = false + interval = 5 +} + +#order += "ipv6" +order += "wireless _first_" +order += "ethernet _first_" +order += "battery all" +order += "disk /" +#order += "load" +order += "memory" +order += "tztime local" + +wireless _first_ { + format_up = "wlan0: (%quality at %essid) %ip" + format_down = "wlan0 DOWN" +} + +ethernet _first_ { + format_up = "eth0: %ip (%speed)" + format_down = "eth0 DOWN" +} + +battery all { + format = "%status %percentage %remaining" +} + +disk "/" { + format = "%avail" +} + +#load { +# format = "%1min" +#} + +memory { + format = "%used/%available" + threshold_degraded = "1G" + format_degraded = "MEMORY < %available" +} + +tztime local { + format = "%Y-%m-%dT%H:%M:%S" +} diff --git a/dotfiles/.config/sxhkd/sxhkdrc-base b/dotfiles/.config/sxhkd/sxhkdrc-base new file mode 100755 index 0000000..c1c3bdd --- /dev/null +++ b/dotfiles/.config/sxhkd/sxhkdrc-base @@ -0,0 +1,52 @@ +XF86AudioMicMute + pactl set-source-mute @DEFAULT_SOURCE@ toggle +XF86AudioMute + pactl -- set-sink-mute @DEFAULT_SINK@ toggle +XF86Audio{Lower,Raise}Volume + pactl set-sink-volume @DEFAULT_SINK@ {"-5%","+5%"} +XF86Audio{Play,Pause,Next,Prev} + playerctl {play,pause,next,previous} +XF86Launch1 + $TERMINAL + +control + shift + Escape + $TERMINAL -e htop +Print + scrot + +# cred 4 https://github.com/patrickbolle/dotfiles/ +mod1 + equal + light -A 5 +mod1 + shift + equal + light -A 1 +mod1 + minus + light -U 5 +mod1 + shift + minus + light -U 1 + +mod1 + shift + r + pkill -USR1 sxhkd + +mod1 + i + ps aux | grep dmenubar | grep -v grep && pkill dmenubar; \ + data | /home/trinity/src/dmenubar/dmenubar -b + +mod1 + shift + i + pkill dmenubar + +mod1 + d + dmenu_run + +mod1 + Return + $TERMINAL + +mod1 + v + $TERMINAL -e pulsemixer + +mod1 + b + $BROWSER + +mod1 + m + pactl -- set-sink-mute @DEFAULT_SINK@ toggle +mod1 + shift + m + pactl set-source-mute @DEFAULT_SOURCE@ toggle diff --git a/dotfiles/.config/ytfeed-config.txt b/dotfiles/.config/ytfeed-config.txt new file mode 100644 index 0000000..5cc802f --- /dev/null +++ b/dotfiles/.config/ytfeed-config.txt @@ -0,0 +1,8 @@ +auto_refresh_feeds: -1 +cap: 200 +consumption_file_name: /home/trinity/.ytfeed/consumption.txt +feed_directory: /home/trinity/.ytfeed/feeds/ +xml_storage_directory: /home/trinity/.ytfeed/feeds/ +video_downloader: youtube-dlp +viewer: youtube-dl-mpv +web_browser: firefox-developer-edition diff --git a/dotfiles/.ctwmrc b/dotfiles/.ctwmrc new file mode 100644 index 0000000..27f4176 --- /dev/null +++ b/dotfiles/.ctwmrc @@ -0,0 +1,110 @@ +# BEGIN ctwmrc +# thanks to https://datagubbe.se/twm/ +NoDefaults +DontShowWelcomeWindow + +# fonts +TitleFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" +ResizeFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" +MenuFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" +IconFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" +IconManagerFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" + +Color { + TitleBackground "#FFDBDB" + TitleForeground "#000000" + BorderColor "#FFDBDB" + BorderTileBackground "#206090" + BorderTileForeground "#206090" + + MenuBackground "Gray" + MenuForeground "Black" + MenuShadowColor "#004070" + MenuTitleBackground "#C06077" + MenuTitleForeground "White" +} + +WindowRing +WindowRingExclude { + "xload" + "xclock" +} + +Cursors { + Frame "left_ptr" + Title "left_ptr" + Icon "left_ptr" + IconMgr "hand2" + Move "fleur" + Resize "fleur" + Menu "sb_left_arrow" + Button "hand2" + Wait "watch" + Select "dot" + Destroy "pirate" +} + +NoBorder { + "xclock" + "xload" +} + +NoTitle { + "TWM Icon Manager" + "xload" + "xclock" + "feh" + "xeyes" +} + +Function "move-and-raise" { + f.move + f.deltastop + f.raise +} + +Function "deiconify-and-raise" { + f.deiconify + f.raise +} +Function "next-and-raise" { + f.downiconmgr + f.raise +} + +Button3 = : root : f.menu "apps" + +Button1 = : title : f.function "move-and-raise" +Button2 = : title : f.delete +Button3 = : title : f.menu "winops" +Button1 = : frame : f.function "move-and-raise" +Button2 = : frame : f.nop +Button3 = : frame : f.resize + +Button1 = : iconmgr : f.function "deiconify-and-raise" +Button2 = : iconmgr : f.lower +Button3 = : iconmgr : f.iconify + +# on NetBSD with non-modular Xorg, bitmaps are stored in +# /usr/X11R7/include/X11/bitmaps +LeftTitleButton ":xlogo" = f.menu "winops" +RightTitleButton "vertmax.xbm" = f.zoom +RightTitleButton "close.xbm" = f.delete + +menu "winops" { + "Delete" f.delete + "Destroy" f.destroy + "Fullscreen Zoom" f.fullscreenzoom + "Full Zoom" f.fullzoom + "Identify" f.identify + "Initial size" f.initsize +} + +# Workspace Menu +menu "apps" { + "Workspace" f.title + "Restart" f.restart + "Exit" f.quit +} + +# END twmrc diff --git a/dotfiles/.env b/dotfiles/.env new file mode 100644 index 0000000..ad8b536 --- /dev/null +++ b/dotfiles/.env @@ -0,0 +1,10 @@ +if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi + +PS1="; " +PS2="; " +PS3="; " + +set -o vi + +. $HOME/.aliases +. $HOME/.cargo/env diff --git a/dotfiles/.profile b/dotfiles/.profile new file mode 100644 index 0000000..65d6a2e --- /dev/null +++ b/dotfiles/.profile @@ -0,0 +1,16 @@ +BROWSER=firefox; export BROWSER +DISPLAYM_CONFIG="$HOME/.config/displaym"; export DISPLAYM_CONFIG +DOOMWADDIR=/mnt/partone/misc/doomwads/; export DOOMWADDIR +EDITOR=ed; export EDITOR +PAGER="less"; export PAGER +PLAN9=/usr/local/plan9; export PLAN9 +PATH="$HOME/bin/:$HOME/bin/oneliners/:$PATH:/usr/pkg/bin:/usr/pkg/sbin:/usr/pkg/qt5/bin:$PLAN9/bin"; export PATH +SUDO="sudo"; export SUDO +TERMINAL="uxterm"; export TERMINAL +UNITS_SYSTEM="si"; export UNITS_SYSTEM +VISUAL=vi; export VISUAL +WALLPAPER="$HOME/Pictures/Wallpapers/ghibli_wars.jpg" + +ENV=$HOME/.env; export ENV +. $ENV +rm -f "/home/trinity/.profile.profile-check" diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc new file mode 100644 index 0000000..70e2bf6 --- /dev/null +++ b/dotfiles/.vimrc @@ -0,0 +1,18 @@ +set bg=dark +set mouse= +set nocp +set noexpandtab +set noim +set nois +set nu +set relativenumber +set rnu +set ruler +set tabstop=8 +set term=xterm +set tf +set title +set tty=xterm +set vb +set nowrap +syntax on diff --git a/dotfiles/clone.sh b/dotfiles/clone.sh new file mode 100755 index 0000000..19ef9b7 --- /dev/null +++ b/dotfiles/clone.sh @@ -0,0 +1,24 @@ +#!/bin/sh -e +alias cp="$(which cp)" +SRC="$HOME" +DEST="$(pwd)" +[ "$(printf "Abort.\nContinue.\n" | dmenu -p "Copying from '$SRC' to '$DEST'. Continue?")" = "Continue." ] || exit +set -x + +for dir in $(cat manifest_dir); do + if ! [ -d "$SRC/$dir" ]; then + printf "Directory missing from SRC: %b\n" "$dir" + false + else + mkdir -p "$DEST/$dir" + fi +done + +for file in $(cat manifest_file); do + if ! [ -e "$SRC/$file" ]; then + printf "File missing from SRC: %b\n" "$file" + false + else + cp "$SRC/$file" "$DEST/$file" + fi +done diff --git a/dotfiles/manifest_dir b/dotfiles/manifest_dir new file mode 100644 index 0000000..2b5188e --- /dev/null +++ b/dotfiles/manifest_dir @@ -0,0 +1,13 @@ +.config/ +.config/bspwm/ +.config/displaym/ +.config/displaym/bspwm +.config/displaym/ctwm +.config/displaym/i3wm +.config/i3/ +.config/i3status/ +.config/sxhkd/ +.config/sxhkd/ +.config/sxhkd/ +bin/ +src/dmenu/ diff --git a/dotfiles/manifest_file b/dotfiles/manifest_file new file mode 100644 index 0000000..ffd9b5e --- /dev/null +++ b/dotfiles/manifest_file @@ -0,0 +1,24 @@ +.Xresources +.aliases +.ctwmrc +.env +.profile +.vimrc +.config/bspwm/bspwmrc +.config/displaym/.xinitrc +.config/displaym/sxhkdrc +.config/displaym/bspwm/.xinitrc +.config/displaym/bspwm/start.sh +.config/displaym/bspwm/sxhkdrc +.config/displaym/ctwm/.xinitrc +.config/displaym/ctwm/start.sh +.config/displaym/i3wm/.xinitrc +.config/displaym/i3wm/sxhkdrc +.config/i3/config +.config/i3status/config +bin/batterymonitor +bin/data +bin/displaym +bin/mnt +bin/volume +src/dmenu/config.h diff --git a/dotfiles/misc/PKGBUILD_doas-sudo b/dotfiles/misc/PKGBUILD_doas-sudo new file mode 100644 index 0000000..2cba10e --- /dev/null +++ b/dotfiles/misc/PKGBUILD_doas-sudo @@ -0,0 +1,17 @@ +# Maintainer: deven +# VERY LIGHTLY modified version of the AUR package opendoas-sudo +pkgname=doas-sudo +pkgver=1 +pkgrel=1 +pkgdesc="A symlink for using the port of BSD's doas(1) as a drop-in replacement to sudo" +arch=('any') +url="https://github.com/slicer69/doas" +license=('MIT') +depends=('doas') +provides=('sudo') +conflicts=('sudo') + +package() { + install -d "$pkgdir"/usr/bin + ln -s $(which doas) "$pkgdir"/usr/bin/sudo +} diff --git a/dotfiles/misc/README.txt b/dotfiles/misc/README.txt new file mode 100644 index 0000000..a05ba3e --- /dev/null +++ b/dotfiles/misc/README.txt @@ -0,0 +1,38 @@ +#!/bin/bash + +set -e + +# dotfiles/scripts +# Basic scripts to rebuild a system. +# Usage: +# bash README.txt arch + +# packages/bootstrap - bare minimum programs. Necessary for system use. +# Install these before running this script. + +mkdir -p $HOME/bin # executables +mkdir -p $HOME/src # source code + +if [ $1 = "arch" ]; then + sudo pacman -S $(cat packages/all packages/*arch_pacman*) + + bash arch_yay.sh + yay -S $(cat packages/*arch_yay*) + + bash doas-sudo.sh arch + # you can undo this with pacman -S sudo + +elif [ $1 = "artix" ]; then + sudo pacman -S $(cat packages/all packages/*artix_pacman*) + + bash arch_yay.sh + yay -S $(cat packages/*artix_yay*) + + bash doas-sudo.sh arch + # you can undo this with pacman -S sudo + +elif [ $1 = "debian" ]; then + +fi + +bash dotfiles.sh diff --git a/dotfiles/misc/arch_yay.sh b/dotfiles/misc/arch_yay.sh new file mode 100755 index 0000000..1cb5269 --- /dev/null +++ b/dotfiles/misc/arch_yay.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e +source ./cdecho.sh + +YAYURL="https://aur.archlinux.org/yay.git" + +cde $HOME/src +git clone $YAYURL || printf "yay already downloaded\n" +cde yay +git pull +makepkg -si +yay -V diff --git a/dotfiles/misc/cc.sh b/dotfiles/misc/cc.sh new file mode 100644 index 0000000..876d255 --- /dev/null +++ b/dotfiles/misc/cc.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +CC="$(which cc)" + +which tcc >/dev/null + +if [ -h "$CC" ]; then + unlink "$CC" + ln -s "$(which tcc)" "$CC" +else + printf "$0: \$(which cc), $(which cc), is not a symbolic link\n" >/dev/stderr + exit 1 +fi diff --git a/dotfiles/misc/cdecho.sh b/dotfiles/misc/cdecho.sh new file mode 100644 index 0000000..7aeac50 --- /dev/null +++ b/dotfiles/misc/cdecho.sh @@ -0,0 +1,4 @@ +cde() { + cd $1 + printf "Entered %s.\n" $(pwd) +} diff --git a/dotfiles/misc/dash_sh.sh b/dotfiles/misc/dash_sh.sh new file mode 100644 index 0000000..00b9d32 --- /dev/null +++ b/dotfiles/misc/dash_sh.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -ex + +which sh >/dev/null 2>&1 \ + || exit 1 + +SH_LOCATION="$(which sh)" + +[ -L "$SH_LOCATION" ] \ + || exit 1 + +which dash >/dev/null 2>&1 \ + || exit 1 + +unlink "$SH_LOCATION" + +ln -s "$(which dash)" "$SH_LOCATION" diff --git a/dotfiles/misc/doas-sudo.sh b/dotfiles/misc/doas-sudo.sh new file mode 100755 index 0000000..83c9b60 --- /dev/null +++ b/dotfiles/misc/doas-sudo.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e +source ./cdecho.sh + +if [ $1 = "arch" ]; then + mkdir -p $HOME/src/doas-sudo + cp PKGBUILD_doas-sudo $HOME/src/doas-sudo/PKGBUILD + + cde $HOME/src/doas-sudo + makepkg -si +fi diff --git a/dotfiles/misc/dotfiles.sh b/dotfiles/misc/dotfiles.sh new file mode 100755 index 0000000..37802b5 --- /dev/null +++ b/dotfiles/misc/dotfiles.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# could be more succinct in places but it works + +source ./cdecho.sh + +# retrieve dotfiles +cde $HOME/src +git clone https://github.com/devenblake/dotfiles.git +cde dotfiles + +# unscii +curl http://pelulamu.net/unscii/unscii-16-full.ttf -o $HOME/.local/share/fonts/unscii-16-full.ttf +fc-cache + +# basic configs +cp {.Xresources,.aliases,.bashrc,.profile} $HOME/ +ln -s $HOME/.Xresources $HOME/.Xdefaults + +# dmenu +cde $HOME/src +if [ git clone https://git.suckless.org/dmenu ]; then + cde dmenu + cp $HOME/dotfiles/src/dmenu/config.h ./ + make + [ "Yes." = $(printf "No.\nYes." | ./dmenu -p "Install dmenu?") ] && sudo make install +fi + +# i3wm +mkdir -p $HOME/.config/i3 +mkdir $HOME/.config/i3status +cde $HOME/.config/ +cp $HOME/src/dotfiles/.config/i3/config i3/ +cp $HOME/src/dotfiles/.config/i3status/config i3status/ + +# winamp skin (checks to see if audacious is installed first) +sudo mkdir -p /usr/share/audacious/Skins/ +which audacious && sudo curl https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Gang.wsz -o /usr/share/audacious/Skins/Sailor_Moon_Gang.wsz || printf "[ERROR] Could not curl audacious skin.\n" + +# wallpaper +cde $HOME +mkdir -p $HOME/Pictures/Wallpapers +curl https://ia801502.us.archive.org/3/items/asuka-98/Asuka%2098.jpg -o Pictures/Wallpapers/Asuka\ 98.jpg || printf "[ERROR] Could not curl wallpaper.\n" + +xrdb -load .Xresources diff --git a/dotfiles/misc/dsic.sh b/dotfiles/misc/dsic.sh new file mode 100755 index 0000000..e237c5a --- /dev/null +++ b/dotfiles/misc/dsic.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +SIC_C=$HOME/src/sic/sic.c +cp "$SIC_C" ./ + +sed -e 's/No channel to send to/No channel to which to send./' -e '170s/sic/dsic/' dsic.c + +diff sic.c dsic.c +[ "$(printf "No.\nYes.\n" | dmenu -p "Write changes?")" = "Yes." ] && mv "$SIC_C" "$SIC_C".bak && mv dsic.c "$SIC_C" diff --git a/dotfiles/misc/grammy/icons.sh b/dotfiles/misc/grammy/icons.sh new file mode 100644 index 0000000..2d269a7 --- /dev/null +++ b/dotfiles/misc/grammy/icons.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# icon fetcher +# i made this script to fetch icons for my grandmother and put them in icons/ +# so i wouldn't have to fetch the icons for her desktop when i made her a new +# system. +# i could have downloaded all the icons and put them into a repo for her but +# this uses less space + +# all these icons are on the internet archive so if the local sites change +# they'll still be available + +icons_folder="~/Pictures/icons/" + +! which curl && printf "$0: missing dependency: curl\n" >/dev/stderr && exit 1 + +mkdir -p "$icons_folder" +cd "$icons_folder" + +curl -o "989wclz.com.png" "https://web.archive.org/web/20200629174002if_/https://989wclz.com/wp-content/themes/wclz/img/touch-icon-144.png" +curl -o "amazon.com.ico" "https://web.archive.org/web/20200718050400if_/https://www.amazon.com/favicon.ico" +curl -o "bangordailynews.com.png" "http://web.archive.org/web/20200721195123if_/https://i0.wp.com/bdn-data.s3.amazonaws.com/uploads/2020/06/BDN-logo_green-3-1.png" +curl -o "theguardian.com.png" "https://web.archive.org/web/20200720041457if_/https://assets.guim.co.uk/images/favicons/fee5e2d638d1c35f6d501fa397e53329/152x152.png" +curl -o "centralmaine.com.png" "https://web.archive.org/web/20200720023956if_/https://multifiles.pressherald.com/uploads/sites/2/2014/06/apple-touch-icon-iphone-retina-display.png" +curl -o "dictionary.com.png" "https://web.archive.org/web/20200719135458if_/https://www.dictionary.com/hp-assets/dcom_favicon-1bff2f1b49c077ed504e55c3649f2a4b.png" +curl -o "google.com.jpg" "https://web.archive.org/web/20170621105937if_/https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no/photo.jpg" +curl -o "longfellowsgreenhouses.com.jpg" "https://web.archive.org/web/20200718173559im_/https://longfellowsgreenhouses.com/wp-content/uploads/2020/03/Longfellows-Logo-Light-Green.jpg" +curl -o "mainepublic.org.png" "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/e5/8e/30457/1/c300.png" +curl -o "news.google.com.png" "https://upload.wikimedia.org/wikipedia/commons/0/0b/Google_News_icon.png" +curl -o "newscentermaine.com.png" "https://web.archive.org/web/20200721190548if_/https://www.newscentermaine.com/assets/favicons/WCSH.png?ver=2.4.7.4" +curl -o "pressherald.com.png" "https://multifiles.pressherald.com/uploads/sites/4/2014/06/apple-touch-icon-iphone-retina-display.png" +curl -o "weather.com.png" "https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/The_Weather_Channel_logo_2005-present.svg/1200px-The_Weather_Channel_logo_2005-present.svg.png" diff --git a/dotfiles/misc/grammy/image.sh b/dotfiles/misc/grammy/image.sh new file mode 100755 index 0000000..a0db885 --- /dev/null +++ b/dotfiles/misc/grammy/image.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +argv0="$0" +argv1="$1" +argv2="$2" + +FILE_NAME="image.img.gz" +COMPACT="gzip -c" +EXTRACT="gzip -cd" + +usage() { + printf "Usage: $argv0 {save,deploy} [device] + +Examples: + $argv0 save /dev/sda1 # images installation at /dev/sda1 + $argv0 deploy /dev/sda # deploys saved image to /dev/sda + +In-program constants (edit this script to change them): + \$FILE_NAME - where to save/read the image + \$COMPACT - command to compact the image (such as \"gzip -c\" to + compress with gzip) + \$EXTRACT - command to extract the image (such as \"gzip -cd\" to + extract gzip)\n" + exit 1 +} + +[ -n "$argv2" ] || usage + +set -x + +case "$argv1" in +(save) $COMPACT <"$argv2" >"$FILE_NAME" ;; +(deploy) $EXTRACT <"$FILE_NAME" >"$argv2" ;; +esac + +exit 0 diff --git a/dotfiles/misc/motd b/dotfiles/misc/motd new file mode 100644 index 0000000..588a337 --- /dev/null +++ b/dotfiles/misc/motd @@ -0,0 +1,8 @@ +Welcome to Trinity's Thinkpad X200T. + +Unauthorized access is a violation of +United States federal law according to +the Computer Fraud and Abuse Act, 18 +USC Section 1030. + +Mess with the best, die like the rest. diff --git a/dotfiles/misc/nmap.sh b/dotfiles/misc/nmap.sh new file mode 100644 index 0000000..200006f --- /dev/null +++ b/dotfiles/misc/nmap.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# builds and installs nmap 7.80 because the fucking pieces of shit that +# maintain nmap decided to make 7.90+ NONFREE. +# i do like nmap and i have nothing personal against the actual maintainers. +# but come ON. + +# anyway... + +set -e + +FILENAME="nmap-7.80.tar.bz2" +ORIGINAL_DIST_BZ2="https://nmap.org/dist/nmap-7.80.tar.bz2" +ARCHIVED_DIST_BZ2="http://web.archive.org/web/20200922062002/https://nmap.org/dist/nmap-7.80.tar.bz2" + +cd $HOME/src + +curl "$ORIGINAL_DIST_BZ2" >"$FILENAME" || curl "$ARCHIVED_DIST_BZ2" >"$FILENAME" + +bzip2 -cd <"$FILENAME" | tar -x + +# see, i could do complicated math to determine this based on the filename, or +# i could hard-code this and let it error if i've inexplicably grabbed +# nmap-7.8.1 + +cd "nmap-7.8.0" + +./configure +make +sudo make install diff --git a/dotfiles/misc/oneliners.sh b/dotfiles/misc/oneliners.sh new file mode 100755 index 0000000..97811a6 --- /dev/null +++ b/dotfiles/misc/oneliners.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# This is the place for the scripts that are a bit more involved than can be +# expressed in shell aliases or functions, or that I want to access from dmenu. +# These are pretty messy but most of them work. Pretty easy for bugs to hide in +# here so I go in with pesticide often. + +set -x +mkdir -p $HOME/bin/oneliners || exit +cd $HOME/bin/oneliners + +SUDO=doas +SHEBANG="#!/bin/sh\n" +BASH_SHEBANG="#!/bin/bash\n" + +DMENU_LINES="40" + +# private bookmarks +printf $SHEBANG'$BROWSER file://$HOME/bookmarks.html\n' >bmarks + +# deemix +printf $SHEBANG'python $HOME/src/deemix-pyweb/deemix-pyweb.py\n' >deemix + +# settings for specific monitors +printf $SHEBANG'xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n' >1702 +printf $SHEBANG'xrandr --output VGA-1 --auto --right-of LVDS-1\n' >mv720 + +# more monitor settings +printf $SHEBANG"xrandr --output HDMI-1 --off\n" >hdmioff +printf $SHEBANG"xrandr --output VGA-1 --off\n" >vgaoff + +# youtube-dl stuff +printf $SHEBANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo +printf $SHEBANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp +printf $SHEBANG"youtube-dlp -f \$(youtube-dl -F \$1 | tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | awk '{ print \$1 }') \"\$@\"\n" >youtube-dl-interactive +printf $SHEBANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv + +# sxhkd +printf $SHEBANG"cd '$HOME/.config/sxhkd/' +cat sxhkdrc-base sxhkdrc-bspwm >sxhkdrc +pkill sxhkd -USR1\n" >sxhkd-bspwm-reload + +set +x + +ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * diff --git a/dotfiles/misc/sic.sh b/dotfiles/misc/sic.sh new file mode 100755 index 0000000..43c5ee4 --- /dev/null +++ b/dotfiles/misc/sic.sh @@ -0,0 +1,6 @@ +#!/bin/sh +mkdir -p $HOME/src +cd $HOME/src +git clone https://git.suckless.org/sic +cd $HOME/src/dotfiles/scripts +./dsic.sh # apply patches diff --git a/dotfiles/misc/spacer.sh b/dotfiles/misc/spacer.sh new file mode 100755 index 0000000..f84b8f6 --- /dev/null +++ b/dotfiles/misc/spacer.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# creates an 8GB empty file in the root dir +# that way when the alarm bells go off you can delete it to save a couple +# minutes before the system really runs out of disk +BS=512; COUNT=16777216 # 512 * 16777216 = 8GB +! [ -e /spacer.img ] || return 1 || exit 1 +dd bs=$BS count=$COUNT spacer.img +$SUDO mv ./spacer.img /spacer.img diff --git a/dotfiles/misc/unscii-16-full.sh b/dotfiles/misc/unscii-16-full.sh new file mode 100755 index 0000000..7d1df9d --- /dev/null +++ b/dotfiles/misc/unscii-16-full.sh @@ -0,0 +1,16 @@ +#!/bin/sh -x + +set -e + +[ "$(id -u)" = "0" ] \ + && LOCATION="/usr/share/fonts/unscii" \ + || LOCATION="$HOME/.fonts" + +mkdir -p "$LOCATION" + +curl "http://viznut.fi/unscii/unscii-16-full.otf" \ + >"$LOCATION/unscii-16-full.otf" +curl "http://viznut.fi/unscii/unscii-16-full.pcf" \ + >"$LOCATION/unscii-16-full.pcf" +curl "http://viznut.fi/unscii/unscii-16-full.ttf" \ + >"$LOCATION/unscii-16-full.ttf" diff --git a/dotfiles/packages/all b/dotfiles/packages/all new file mode 100644 index 0000000..c41cd56 --- /dev/null +++ b/dotfiles/packages/all @@ -0,0 +1,74 @@ +alsa-plugins-nice +alsa-utils +anki +audacious +curl +dvdbackup +ed +feh +ffmpeg +gcc +git +gparted +gperf +gwenview +htop +inetutils +iptables +k3b +kate +kdenlive +krita +lame +linux-headers +lynx +macchanger +make +man-pages +mercurial +moc +moreutils +mpv +net-tools +nmap +p7zip +pkgfile +powertop +progress +pulseaudio +pulseaudio-alsa +pulseaudio-utils +pulsemixer +python3 +qbittorrent +qemu +rsync +s-tui +screen +scrot +sed +smartmontools +thunar +thunderbird +ttf-liberation +tlp +twin +units +unrar +unzip +util-linux +vim +virt-manager +vlc +wget +wireguard-tools +xclip +xf86-input-libinput +xf86-input-wacom +xf86-video-intel +xscreensaver +xterm +zathura +zathura-cb +zathura-djvu +zathura-ps diff --git a/dotfiles/packages/alpine_apk b/dotfiles/packages/alpine_apk new file mode 100644 index 0000000..96126e3 --- /dev/null +++ b/dotfiles/packages/alpine_apk @@ -0,0 +1,12 @@ +build-base +consolekit2 +dbus +dbus-x11 +firefox +libx11-dev +libxft-dev +libxinerama-dev +neofetch +tcc +udev +xorg-xserver diff --git a/dotfiles/packages/arch_pacman b/dotfiles/packages/arch_pacman new file mode 100644 index 0000000..20340f3 --- /dev/null +++ b/dotfiles/packages/arch_pacman @@ -0,0 +1 @@ +virtualbox-host-modules-arch diff --git a/dotfiles/packages/artix_pacman b/dotfiles/packages/artix_pacman new file mode 100644 index 0000000..68b946f --- /dev/null +++ b/dotfiles/packages/artix_pacman @@ -0,0 +1,7 @@ +acpid +acpid-openrc +fuse-openrc +iwd-openrc +libvirt-openrc +openresolv +wireguard-openrc diff --git a/dotfiles/packages/bootstrap b/dotfiles/packages/bootstrap new file mode 100644 index 0000000..f03db7d --- /dev/null +++ b/dotfiles/packages/bootstrap @@ -0,0 +1,8 @@ +bash +coreutils +ed +gcc +git +less +linux +make diff --git a/dotfiles/packages/common-arch_pacman-artix_pacman b/dotfiles/packages/common-arch_pacman-artix_pacman new file mode 100644 index 0000000..63b8020 --- /dev/null +++ b/dotfiles/packages/common-arch_pacman-artix_pacman @@ -0,0 +1,35 @@ +asp +base-devel +clisp +cpupower +dhcpcd +firefox-developer-edition +fuse2 +gvim +i3status +iputils +iw +iwd +jre11-openjdk +jre8-openjdk +kimageformats +libreoffice-fresh +light +ntfs-3g +otf-ipafont +pulseaudio-alsa +pulseaudio-bluetooth +python-pip +qemu-arch-extra +qt5-imageformats +stalonetray +ttf-dejavu +vi +which +wireshark-cli +xorg-server +xorg-xauth +xorg-xinit +xorg-xrdb +youtube-dl +zathura-pdf-mupdf diff --git a/dotfiles/packages/common-arch_yay-artix_yay b/dotfiles/packages/common-arch_yay-artix_yay new file mode 100644 index 0000000..1e994b2 --- /dev/null +++ b/dotfiles/packages/common-arch_yay-artix_yay @@ -0,0 +1,24 @@ +aic94xx-firmware +bitwarden +bitwarden-cli +bitwarden-dmenu +dashbinsh +discord_arch_electron +doas +freedownloadmanager +google-chrome +gzdoom +i3-gaps +i3-swallow +instagram-scraper +iwgtk +lemonbar-git +makebootfat +minecraft-launcher +mullvad-vpn-beta +multimc5 +spotify +steam +tor-browser +wd719x-firmware +zoom diff --git a/dotfiles/packages/common-arch_yay-artix_yay-debian_apt b/dotfiles/packages/common-arch_yay-artix_yay-debian_apt new file mode 100644 index 0000000..af6e452 --- /dev/null +++ b/dotfiles/packages/common-arch_yay-artix_yay-debian_apt @@ -0,0 +1,2 @@ +moon-buggy +syncterm diff --git a/dotfiles/packages/debian_apt b/dotfiles/packages/debian_apt new file mode 100644 index 0000000..6febc2e --- /dev/null +++ b/dotfiles/packages/debian_apt @@ -0,0 +1,5 @@ +build-essential +fonts-dejavu +libreoffice +linux-tools-common +linux-tools-generic diff --git a/man/dotfiles.md b/man/dotfiles.md new file mode 100644 index 0000000..fce237e --- /dev/null +++ b/man/dotfiles.md @@ -0,0 +1,19 @@ +# devenblake/dotfiles +Pretty config stuff. + +![This is a screenshot of my desktop.](https://web.archive.org/web/20200926155417if_/https://i.redd.it/jwhsmokcfcp51.png) +For this configuration, [posted on r/unixporn on 2020-09-25](https://www.reddit.com/r/unixporn/comments/izpvwp/i3gaps_basic_but_it_works/), refer to the [state of the repository around 2020-09-26](https://git.sr.ht/~trinity/dotfiles/tree/7d0a35b6d06c2bb46990087c6a6c4b2a2685d49c) or so. + +My setup has changed drastically since then. + +My shell aliases are in `.aliases` and my general shell configuration is in `.env`. +I use `dash` as my shell. I sort of miss tab-completion but it's worth it so I know everything I do is reproducible. + +Refer to `scripts/` for scripts that help me keep everything organized, except for `clone.sh` (which clones all my dotfiles to `~/src/dotfiles/`, where I keep my local copy of this repo). + +A list of all the packages I use is available in `scripts/packages/`, organized by repository availability. + +## License + +See `LICENSE` for the repository license if you want but basically all code, unless otherwise stated, is released unencumbered into the public domain. +A notable exception to this is `src/dmenu/config.h` which is licensed under the MIT/X Consortium license as is dmenu; this license can be found in `licenses/DMENU`.