the great reconciliation

This commit is contained in:
randomuser 2023-11-22 16:53:33 -06:00
parent 3d42877203
commit 925de32e4f
16 changed files with 71 additions and 162 deletions

View File

@ -65,4 +65,21 @@
gcc
gnumake
];
systemd.user.services.paperless-activate = {
script = ''
while true; do
# restart every 5 minutes
echo "starting link"
ssh -v -NR 3004:localhost:3004 -p 55555 useracc@beepboop.systems & disown
sudo ssh -v -NR 4000:localhost:80 -p 55555 useracc@beepboop.systems & disown
echo "waiting"
sleep $((60 * 5))
echo "killing and restarting"
pkill ssh
done
'';
wantedBy = [ "multi-user.target" ];
};
}

View File

@ -4,6 +4,7 @@
, bash
, feh
, jq
, figlet
, curl
, xrandr
, makeWrapper
@ -25,7 +26,7 @@ stdenv.mkDerivation rec {
for i in $(ls $src/sh); do
cp $src/sh/$i $out/bin
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq curl ]}
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl ]}
done
'';

View File

@ -1,11 +0,0 @@
#!/bin/sh
gaps="$(bspc config top_padding)"
if [ "$gaps" -eq 20 ]; then
bspc config window_gap 0
bspc config top_padding 18
else
bspc config window_gap 3
bspc config top_padding 20
fi

View File

@ -1,6 +0,0 @@
#!/bin/sh
sel="$(find -L ~/dot_testing 2>/dev/null | fzy)"
[ "$?" -eq 1 ] && exit 1
nvim "$sel"

View File

@ -1,3 +0,0 @@
#!/bin/sh
HOME="/home/usr/.local/share/firefox" firefox "$@"

View File

@ -1,41 +0,0 @@
#!/bin/sh
# wrapper script to make firefox suck less
RHOME="${HOME}"
firefox_data_location="$HOME/firefoxdumpster"
[ -z "$3" ] || url="$3"
# start a profile chooser
if [ -z "$2" ]; then
profile=$(printf "programming\nschool\ntmp-school\ntmp\nchromium\n" | tmenu)
else
profile="$2"
fi
[ -z "$profile" ] && exit
if [ "$profile" = "tmp" ]; then
# firefox doesn't start in a directory within /tmp
# so we create one in $HOME/.cache
tmp=$(basename $(mktemp))
mkdir -p "${RHOME}/.cache/${tmp}"
rm -r "/tmp/$tmp"
HOME="/home/$(whoami)/.local/share/firefox" firefox --profile "${RHOME}/.cache/${tmp}" --no-remote "$url"
rm -r "${RHOME}/.cache/${tmp}"
exit
fi
if [ "$profile" = "chromium" ]; then
HOME="/home/$(whoami)/.local/share/firefox" chromium
exit
fi
# start firefox
mkdir -p "${firefox_data_location}/profile"
HOME="/home/$(whoami)/.local/share/firefox" firefox --profile "${firefox_data_location}/${profile}" --no-remote "$url"
exit
printf "failed to specify a profile. exiting.\n"
exit 1

View File

@ -1,3 +0,0 @@
#!/bin/sh
printf "password=%s\n" "$(pash s tildegit)"

View File

@ -1,7 +0,0 @@
#!/bin/sh
sel="$(pash l | tmenu)"
[ "$?" -eq 1 ] && exit 0
# requires bspc rule -a st-gpg-menu state=floating
st -c st-gpg-menu -e pash-dmenu-backend "$sel"

View File

@ -1,6 +0,0 @@
#!/bin/sh
printf "%s\n" "$1"
pash c "$1"
bspc node -d '^9'
sleep 15

View File

@ -1,4 +0,0 @@
#!/bin/sh
[ "$1" = "" ] && exit 1
[ -f "$1" ] && curl -F"file=@${1}" https://0x0.st && exit 0

View File

@ -1,23 +0,0 @@
#!/bin/sh
[ -z "$1" ] && exit 1
[ -z "$2" ] && exit 1
printf "[info] this utility is used for adding youtube urls as rss feeds\n"
feed="$(curl "$1" -s | \
grep 'youtube/www\.youtube\.com/channel/.\{24\}' -o | \
awk -F'/' '{print "https://www.youtube.com/feeds/videos.xml?channel_id=" $NF}' | \
sed 1q)"
[ -z "$feed" ] && printf "[err] error processing the feed. are you sure it's *www*.youtube.com and not youtube.com?\n" && exit 1
sfeedrc="$HOME/.config/sfeed/sfeedrc"
ed "$sfeedrc" <<EOF
/feeds
a
feed "$2" "$feed"
.
w
EOF

18
builds/utils/sh/summarize Executable file
View File

@ -0,0 +1,18 @@
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,28 +0,0 @@
#!/bin/sh
# when the vim SwapExists autocommand is fired, this script is
# called with the path of the file in question.
# mad props to daniel conway for having this big brain idea
# note to self: protect $1 from expansion as it can contain a
# ~
[ "$#" -eq 0 ] && exit 2
window=$(
xdotool search --name "$1" | \
sed 1q
)
desk=$(
xdotool get_desktop_for_window "$window" 2>/dev/null || printf "none"
)
[ "$desk" = "none" ] && exit 1
desk=$((desk + 1))
bspc desktop -f "^${desk}"
killall -10 simplestatus
xdotool set_window --urgency 1 "$window"
exit 0

View File

@ -1,20 +1,27 @@
# exit mouse mode
q
mode sxhkdrc
# move left
{ctrl +,shift +,_} h
xdotool mousemove_relative -- {-5,-50,-20} 0
# move down
{ctrl +,shift +,_} j
xdotool mousemove_relative -- 0 {5,50,20}
# move up
{ctrl +,shift +,_} k
xdotool mousemove_relative -- 0 {-5,-50,-20}
# move right
{ctrl +,shift +,_} l
xdotool mousemove_relative -- {5,50,20} 0
# left, middle, right click
{ctrl +,_} {a,s,d}
xdotool {mousedown,click} {1,2,3}
# let go of clicked button
g
xdotool mouseup 1; xdotool mouseup 2; xdotool mouseup 3

View File

@ -1,53 +1,48 @@
# rndusr's sxhkdrc
# program launching + sxhkd reload
# spawn a terminal
super + Return
st
st
# spawn the launcher
super + d
tmenu_run
super + z
pash-dmenu
tmenu_run
# kill sxhkd with USR1 and restart bspwm
super + r
pkill -USR1 -x sxhkd; \
bspc wm -r
pkill -USR1 -x sxhkd; \
bspc wm -r
# reinitialize ancillary services
super + w
disp && wallpaper && statusbar && keyboard
disp && wallpaper && statusbar && keyboard
# control the national weather service
super + {_,shift + }n
nws {local,national}
nws {local,national}
# switch to "mouse mode"
super + m
mode mouse
{XF86AudioRaiseVolume,XF86AudioLowerVolume}
vol {inc,dec}
# bspwm
# kill the current node
super + q
bspc node -c
bspc node -c
# kill bspwm
super + e
bspc quit 0
bspc quit 0
# systemctl suspend
super + shift + e
systemctl suspend
systemctl suspend
# manipulate a node
super + {_,ctrl +,shift + }{h,j,k,l}
bspc node -{f,p,s} {west,south,north,east}
bspc node -{f,p,s} {west,south,north,east}
# change to or move a node to a desktop
super + {_,shift + } {1-9,0}
bspc {desktop -f,node -d} '{1-9,10}'
bspc {desktop -f,node -d} '{1-9,10}'
# change a node to tiling, floating, or fullscreen
super + {t,f,s}
bspc node -t {tiled,floating,fullscreen}
super + shift + t
bspwm-toggle-gaps
alt + F4
exit
bspc node -t {tiled,floating,fullscreen}

View File

@ -38,5 +38,8 @@ in {
};
certificateScheme = "acme-nginx";
};
security.acme.acceptTerms = true;
security.acme.defaults.email = "ryan@beepboop.systems";
};
}