remove more redundant materials

This commit is contained in:
stupidcomputer 2024-11-29 04:12:40 -06:00
parent 3d4c88b066
commit e1255dc9ef
31 changed files with 11 additions and 509 deletions

View File

@ -31,10 +31,6 @@ ctrl + b; r
pkill -USR1 -x sxhkd; \
bspc wm -r
# show nws radar
super + {_,shift + }n
nws {local,national}
# switch to "mouse mode"
super + m
mode mouse
@ -96,10 +92,6 @@ super + {t,f,s}
ctrl + b; {t,f,s}
bspc node -t {tiled,floating,fullscreen}
# x230t specific -- activate the tablet menu
XF86RotateWindows
tabletmenu
shift + Insert
special_ins

View File

@ -3,7 +3,6 @@
{
imports = [
../../home/x11.nix
../../home/chromium
];
home.stateVersion = "24.05";

View File

@ -3,7 +3,6 @@
{
imports = [
../../home/x11.nix
../../home/chromium
];
home.stateVersion = "23.11";

View File

@ -1,44 +0,0 @@
#!/bin/sh
[ "$(pgrep -c NetworkManager)" -eq 1 ] &&
printf "NetworkManager is already running!\n" &&
exit
case $1 in
"c"*)
wpa_supplicant -iwlp3s0 -c/etc/wpa_supplicant/wpa_supplicant.conf -B
dhcpcd wlp3s0
# make tor and nohup shut up in a posix-compliant way
nohup tor >/dev/null 2>&1
;;
"d"*)
killall -15 wpa_supplicant dhcpcd tor
;;
"r"*)
sh "$0" d
sh "$0" c
;;
"t"*)
[ "$(pgrep -c wpa_supplicant)" -eq 1 ] && sh "$0" d && exit
sh "$0" c
;;
"l"*)
iw dev wlp3s0 scan | \
grep 'SSID\|signal' | \
grep -v 'SSID List' | \
awk -F': ' '{print $2}' | \
sed 'N;s/\n/ /' | \
grep -v '\x00'
;;
*)
echo "
simple wrapper for connecting to a network
${0} toggle to toggle wifi connection
${0} restart to restart wifi
${0} disconnect to disconnect
${0} connect to connect to network
${0} list to list networks
"
;;
esac
exit 0

View File

@ -49,12 +49,6 @@ exists() {
}
case "$(hostname)" in
"mainsail")
echo "mainsail"
xrandr --output VGA-1 --left-of HDMI-1
bspc monitor VGA-1 -d 01 03 05 07 09
bspc monitor HDMI-1 -d 02 04 06 08 00
;;
"aristotle")
bspc monitor eDP-1 -d 01 02 03 04 05 06 07 08 09
;;
@ -113,38 +107,6 @@ case "$(hostname)" in
sshfs "usr@$target:/home/usr/vdir" $HOME/.cache/mount_point5 -o ConnectTimeout=1
ln -sf $HOME/.cache/mount_point5 $HOME/vdir
;;
"x230t")
echo "x230t"
case "$1" in
"dockedtwo")
# assume we're connected to the two external displays
xrandr --output VGA-1 --primary --mode 1920x1080 --rotate normal \
--output HDMI-1 --mode 1920x1080 --rotate normal --right-of VGA-1 \
--output LVDS-1 --off
bspc monitor VGA-1 -d 01 03 05 07 09
bspc monitor HDMI-1 -d 02 04 06 08
;;
*)
if
assert_edid "VGA-1" "35737dc483d2c3b1b20ea2343ce13c6c42d115febdc9634f8437e1b9f7fd3f5c" &&
assert_edid "HDMI-A-1" "01887cbd23d74201e489a6334656f7db73a7b7f732a738a9f1ee2d53389f7817";
then
echo "docked"
xrandr --output LVDS-1 --primary --mode 1366x768 --pos 1194x1080 --rotate normal \
--output VGA-1 --mode 1920x1080 --pos 0x0 --rotate normal \
--output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal \
--output DP-1 --off \
--output HDMI-2 --off \
--output DP-2 --off
bspc monitor LVDS-1 -d 01 04 07
bspc monitor VGA-1 -d 02 05 08
bspc monitor HDMI-1 -d 03 06 09
else
bspc monitor LVDS-1 -d 01 02 03 04 05 06 07 08 09
fi
;;
esac
;;
"copernicus")
case "$1" in
@ -169,7 +131,6 @@ case "$(hostname)" in
bspc monitor HDMI-1-2 -d 10
;;
esac
dunst & disown
phone pair & disown
;;
"localhost") # phone in termux

View File

@ -1,12 +0,0 @@
#!/bin/sh
discord &
st -c send-to-9 -e cmus &
st -c send-to-9 -e ncpamixer &
sleep 1
cmus-remote <<EOF
view playlist
win-down
win-activate
EOF
steam &

View File

@ -1 +0,0 @@
scrcpy --raw-key-events -M

View File

@ -1,3 +0,0 @@
cssid=$(nmcli -t -f IN-USE,SSID device wifi list | grep '^\*' | awk -F':' '{print $2}')
[ "WCS-BYOT" = "$cssid" ]

View File

@ -1 +0,0 @@
ytfzf -am lofi hip hop radio - beats to relax/study to lofi girl

View File

@ -1,18 +0,0 @@
#!/bin/sh
host="$(hostname)"
case "$host" in
"mlg")
exit 1
;;
"toaster")
exit 2
;;
"fish")
exit 3
;;
"think")
exit 4
;;
esac

View File

@ -1,11 +0,0 @@
#!/bin/sh
temp=$(mktemp)
ls > $temp
nvim "$temp"
different=$(ls | cat "$temp" - | sort | uniq -u)
rm $different
for i in $different; do
printf "rm %i\n" "$i"
done

View File

@ -1,16 +0,0 @@
#!/bin/sh
temp=$(mktemp)
ls > $temp
nvim $temp
results=$(ls | paste -d'|' - $temp)
IFS="
"
for i in $results; do
before="${i%%|*}"
after="${i#*|}"
[ "$before" != "$after" ] && mv "$before" "$after"
printf "%s -> %s\n" "$before" "$after"
done

View File

@ -1,8 +0,0 @@
#!/bin/sh
svkbd-mobile-intl &
choice=$(ls ~/annex/music/works | tmenu)
kill %1
if [ -n "$choice" ]; then
find "$HOME/annex/music/works/$choice/" -type f | sxiv -i
fi

View File

@ -1,104 +0,0 @@
#!/bin/sh
[ -z "${XDG_CONFIG_DIR}" ] && XDG_CONFIG_DIR="${HOME}/.config"
[ -z "${NWS_CONFIG}" ] && NWS_CONFIG="${XDG_CONFIG_DIR}/nws"
[ -n "${NWS_ZONE}" ] || \
[ -e "${NWS_CONFIG}" ] && NWS_ZONE=$(cat "${NWS_CONFIG}") ||
NWS_ZONE="KGYX"
[ -z "${NWS_GIF}" ] && NWS_GIF="mpv --loop"
[ -z "${NWS_TORIFY}" ] && NWS_TORIFY=""
info () {
printf %s "\
nws - wrapper for the National Weather Service's website
=> [n]ational - View national weather mosaic
=> [l]ocal - View local weather mosaic
=> [r]ivers - View local river conditions
=> [w]eather - View local weather observations
=> [m]osaic [id] - View a given area's weather mosaic
=> [s]et [id] - Set local zone
=> [t]ext [id] - View text messages by catagory
Default zone: export NWS_ZONE=<zone>
GIF player: export NWS_GIF=<command>
Configuration: export NWS_CONFIG=<file>
Torify wrapper: export NWS_TORIFY=<command>
"
}
err () {
printf "err: %s\n" "${1}"
[ -z "${2}" ] && exit 1
exit "${2}"
}
kstrip () {
printf %s "$1" | sed 's/^K\(.*\)/\1/'
}
national () {
mosaic CONUS-LARGE
}
# name interestingly to avoid keyword collision
localradar () {
mosaic ${NWS_ZONE}
}
mosaic () {
${NWS_GIF} "https://radar.weather.gov/ridge/standard/${1}_loop.gif"
}
setzone () {
printf "%s" "${1}" > "${NWS_CONFIG}"
}
river () {
textmessage "RVA"
}
weather () {
textmessage "ZFP"
}
textmessage () {
curl --silent --fail "https://forecast.weather.gov/product.php?site=NWS&issuedby=$(kstrip ${NWS_ZONE})&product=${1}&format=TXT&version=1" | \
sed -n '/<!-- \/\/ CONTENT STARTS HERE -->/,/<\/pre>/p' | \
grep -v "a href" | \
grep -v '<!-- // CONTENT STARTS HERE -->' | \
grep -v '<\/pre>' || \
printf "${1} data not found for zone %s" ${NWS_ZONE}
}
case $1 in
"n"*)
national
;;
"l"*)
localradar
;;
"r"*)
river
;;
"w"*)
weather
;;
"m"*)
if [ "$#" -eq 2 ]; then
mosaid "$2"
else
err "two args required"
fi
;;
"s"*)
if [ "$#" -eq 2 ]; then
setzone "$2"
else
err "two args required"
fi
;;
"t"*)
if [ "$#" -eq 2 ]; then
textmessage "$2"
else
err "two args required"
fi
;;
*)
info
;;
esac
exit 0

View File

@ -1,23 +0,0 @@
#!/bin/sh
print_help() {
echo "
rotate -- a thin wrapper around imagemagick
$1 - degrees (clockwise)
$2 - infile
$3 - outfile"
exit
}
if [ "$1" = "-h" ]; then
print_help
fi
if [ -z "$1" ]; then
print_help
fi
[ -z "$3" ] && 3="$2.out"
convert "$1" -rotate "$2" "$3"

View File

@ -1,12 +0,0 @@
#!/bin/sh
pkill x11vnc
x11vnc -loop -display $DISPLAY -rfbport 5900 -listen 127.0.0.1 & # main screen
x11vnc -loop -display $DISPLAY -rfbport 5901 -listen 127.0.0.1 -clip xinerama0 & # screen 0
x11vnc -loop -display $DISPLAY -rfbport 5902 -listen 127.0.0.1 -clip xinerama1 & # screen 1
x11vnc -loop -display $DISPLAY -rfbport 5903 -listen 127.0.0.1 -clip xinerama2 & # screen 2
x11vnc -loop -display $DISPLAY -rfbport 5904 -listen 127.0.0.1 -clip xinerama3 & # screen 3
x11vnc -loop -display $DISPLAY -rfbport 5905 -listen 127.0.0.1 -clip xinerama4 & # screen 4
read

View File

@ -1,21 +0,0 @@
ssh phone "
termux-notification -c 'a computer connected via the termux bridge';
while true; do
termux-sms-list -d -t inbox | \
jq -r 'map(select(.read == false)).[] | if .sender == null then .number else .sender end, .body' | \
xargs -d '\n' -n2
done
" 2>&1 | awk '!seen[$0]++' | tee help_me_im_going_insane | xargs -L1 dunstify
ssh phone "
# ( while true; do
# echo "911
#testing message"
#done ) | {
#( while true; do
# ssh phone "termux-sms-list -d -t inbox" \
# | jq -r 'map(select(.read == false)) | if .[].sender == null then .[].number else .[].sender end, .[].body'
#done ) | {
# paste -d ' ' - -
#}

View File

@ -1,18 +0,0 @@
case $? in
0)
st -g 100x30+20+20 -c generic-st-window sh -c 'summarize backend | less'
;;
1)
figlet help menu
for i in $(ls ~/.config/sxhkd); do
printf "\n%s mode | ----------------------\n" $i
grep -iv "^[[:blank:]].*$" ~/.config/sxhkd/$i | \
grep -v '^$' | \
sed 'N;s/\n/ -> /' | \
sed 's/^\# //g'
done
;;
*)
echo "???????????????"
;;
esac

View File

@ -1,7 +1,6 @@
if [ "$(hostname)" = "localhost" ]; then
mbsync --config=$HOME/.config/isync/phone-config
else
is_school && echo "enable the vpn"
mbsync --config=$HOME/.config/isync/config main
fi

View File

@ -1,50 +0,0 @@
svkbd-mobile-intl &
choice=$(
printf "
vert-mode
hori-mode
keyb
nokeyb
musexplore
brave
chromium
run
close-wind
" | tmenu
)
pkill svkbd
case "$choice" in
"vert-mode")
xrandr --output LVDS-1 --rotate left
xinput set-prop "Wacom ISDv4 E6 Finger" 178 0 -1 1 1 0 0 0 0 1
sleep 4
;;
"hori-mode")
xrandr --output LVDS-1 --rotate normal
xinput set-prop "Wacom ISDv4 E6 Finger" 178 1 0 0 0 1 0 0 0 1
;;
"nokeyb")
pkill svkbd
;;
"keyb")
svkbd-mobile-intl & disown
;;
"musexplore")
musexplore
;;
"brave")
brave
;;
"chromium")
chromium
;;
"run")
tmenu_run
;;
"close-wind")
bspc node -c
;;
esac

View File

@ -1,10 +0,0 @@
tmux new-session -d -s tmuxbird "neomutt"
tmux split-window -fb -t tmuxbird:0 -l 3% -d 'watch -n 30 "mbsync --config=$HOME/.config/isync/config main; vdirsyncer sync; rbw sync"'
sleep 1
tmux resize-pane -t 1 -U 5
tmux split-window -fhb -t tmuxbird:0 -l 3% -d 'watch -n 30 "todo list"'
tmux rename-window mailview
tmux new-window -n calview "khal interactive"
tmux split-window -fhb -t tmuxbird:1 -l 10 -d 'todo shell'
tmux select-window -t 0
tmux attach-session -t tmuxbird

View File

@ -1,5 +0,0 @@
#!/bin/sh
# a poor man's vpn
ip=$(dig +short beepboop.systems)
sshuttle --dns -r ryan@$ip:443 0/0

View File

@ -1,16 +1,9 @@
{ lib, inputs, config, pkgs, home, ... }:
let
plib = import ../../lib { inherit pkgs; };
in {
{
programs.chromium = {
enable = true;
package = lib.mkForce (plib.mkPackageWrapper
pkgs.brave
"export HOME=$HOME/.cache/brave"
""
"--args --disable-frame-rate-limit"
);
package = pkgs.brave;
extensions = [
{ id = "ecnphlgnajanjnkcmbpancdjoidceilk"; }
];

View File

@ -1,15 +0,0 @@
{ lib, inputs, config, pkgs, home, ... }:
{
home.packages = with pkgs; [
ungoogled-chromium
];
programs.chromium = {
enable = true;
package = pkgs.ungoogled-chromium;
extensions = [
{ id = "ecnphlgnajanjnkcmbpancdjoidceilk"; }
];
};
}

View File

@ -1,15 +0,0 @@
{ lib, config, pkgs, home, ... }:
{
home.file = {
".config/dunst/dunstrc" = {
source = ../../.config/dunst/dunstrc;
};
".config/dunst/notification_handler.sh" = {
source = ../../.config/dunst/notification_handler.sh;
};
".config/dunst/beep.m4a" = {
source = ../../.config/dunst/beep.m4a;
};
};
}

View File

@ -1,11 +0,0 @@
{ lib, config, pkgs, home, ... }:
{
programs.emacs.enable = true;
home.file = {
".config/emacs/init.el" = {
source = ../../.config/emacs/init.el;
};
};
}

View File

@ -1,9 +0,0 @@
{ lib, config, pkgs, home, ... }:
{
home.file = {
".config/tridactyl/tridactylrc" = {
source = ../../.config/tridactyl/tridactylrc;
};
};
}

View File

@ -1,15 +1,13 @@
{ lib, config, pkgs, ...}:
let
plib = import ../lib { inherit pkgs; };
in {
home.packages = [
pkgs.xclip
pkgs.xcape
pkgs.mpv
pkgs.sxiv
pkgs.xwallpaper
pkgs.xbrightness
pkgs.xdotool
{
home.packages = with pkgs; [
xclip
xcape
mpv
sxiv
xwallpaper
xbrightness
xdotool
];
}

View File

@ -4,10 +4,8 @@
imports = [
./bspwm
./brave
./dunst
./sx
./sxhkd
./tridactyl
./zathura
./wallpapers
./vdirsyncer
@ -18,7 +16,6 @@
./neomutt
./msmtp
./rbw
./nws
./xscreensaver
./x11-progs.nix

View File

@ -5,7 +5,6 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
initrd.kernelModules = [ ];

View File

@ -1,28 +0,0 @@
{ pkgs ? import <nixpkgs> {} }:
let
getPkgName =
pkg:
builtins.elemAt (builtins.split "-" pkg.name) 0;
in {
mkPackageWrapper =
pkg:
environ:
prefix:
postfix:
pkgs.writeScriptBin
(getPkgName pkg)
''
#! ${pkgs.bash}/bin/bash
${environ}
exec ${prefix} ${pkg}/bin/${getPkgName pkg} ${postfix} "$@"
'';
mkQuarantinedPackage =
pkg:
pkgs.writeScriptBin
(getPkgName pkg)
''
#! ${pkgs.bash}/bin/bash
export HOME=$HOME/.local/${getPkgName pkg}
exec ${pkg}/bin/${getPkgName pkg}
'';
}