Compare commits
No commits in common. "master" and "statusbar-messaging" have entirely different histories.
master
...
statusbar-
|
@ -1,2 +0,0 @@
|
||||||
.config
|
|
||||||
rbw
|
|
|
@ -1 +0,0 @@
|
||||||
hist
|
|
|
@ -21,28 +21,6 @@ shopt -s histverify
|
||||||
|
|
||||||
PS1="\h:\w\$ "
|
PS1="\h:\w\$ "
|
||||||
|
|
||||||
# hostname shenanigans
|
|
||||||
case "$HOSTNAME" in
|
|
||||||
"aristotle")
|
|
||||||
PS1="\[\033[36;1m\]$PS1\[\033[0;0m\]"
|
|
||||||
;;
|
|
||||||
"copernicus")
|
|
||||||
PS1="\[\033[92;1m\]$PS1\[\033[0;0m\]"
|
|
||||||
;;
|
|
||||||
"x230t")
|
|
||||||
PS1="\[\033[93;1m\]$PS1\[\033[0;0m\]"
|
|
||||||
;;
|
|
||||||
"mlg")
|
|
||||||
PS1="\[\033[94;1m\]$PS1\[\033[0;0m\]"
|
|
||||||
;;
|
|
||||||
"netbox")
|
|
||||||
PS1="\[\033[95;1m\]$PS1\[\033[0;0m\]"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
PS1="\[\033[96;1m\]$PS1\[\033[0;0m\]"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
repos() {
|
repos() {
|
||||||
sel="$(ls ~/git | fzy | awk '{print "/home/usr/git/"$1}')"
|
sel="$(ls ~/git | fzy | awk '{print "/home/usr/git/"$1}')"
|
||||||
[ "$?" -eq 1 ] && exit
|
[ "$?" -eq 1 ] && exit
|
||||||
|
|
|
@ -26,5 +26,3 @@ bspc config top_padding 20
|
||||||
|
|
||||||
# post-wm configuration
|
# post-wm configuration
|
||||||
disp
|
disp
|
||||||
|
|
||||||
bspc desktop -f 1
|
|
||||||
|
|
Binary file not shown.
|
@ -1,24 +0,0 @@
|
||||||
[global]
|
|
||||||
follow = mouse
|
|
||||||
font = Fantasque Sans Mono 20
|
|
||||||
frame_width = 1
|
|
||||||
always_run_script = true
|
|
||||||
|
|
||||||
[urgency_low]
|
|
||||||
background = "#161510"
|
|
||||||
foreground = "#cccccc"
|
|
||||||
frame_color = "#727a18"
|
|
||||||
|
|
||||||
[urgency_normal]
|
|
||||||
background = "#161510"
|
|
||||||
foreground = "#cccccc"
|
|
||||||
frame_color = "#727a18"
|
|
||||||
|
|
||||||
[urgency_critical]
|
|
||||||
background = "#161510"
|
|
||||||
foreground = "#cccccc"
|
|
||||||
frame_color = "#727a18"
|
|
||||||
|
|
||||||
[notify]
|
|
||||||
summary = "*"
|
|
||||||
script = ~/.config/dunst/notification_handler.sh
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
mpv ~/.config/dunst/beep.m4a
|
|
|
@ -1,3 +0,0 @@
|
||||||
bookmarks
|
|
||||||
globhist
|
|
||||||
gotohist
|
|
|
@ -3,19 +3,10 @@
|
||||||
name = stupidcomputer
|
name = stupidcomputer
|
||||||
|
|
||||||
[credential "https://git.beepboop.systems"]
|
[credential "https://git.beepboop.systems"]
|
||||||
helper = !git-rbw-wrap gitea
|
username = stupidcomputer
|
||||||
|
|
||||||
[credential "https://github.com"]
|
|
||||||
helper = !git-rbw-wrap github-pat
|
|
||||||
|
|
||||||
[advice]
|
[advice]
|
||||||
addIgnoredFile = false
|
addIgnoredFile = false
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
|
|
||||||
[help]
|
|
||||||
autocorrect = prompt
|
|
||||||
|
|
||||||
[push]
|
|
||||||
autoSetupRemote = true
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
[addressbooks]
|
|
||||||
[[main]]
|
|
||||||
path = ~/vdir/people/main/20cda0dd-5922-4905-8956-859c989a6519
|
|
||||||
[general]
|
|
||||||
default_action = list
|
|
||||||
editor = nvim
|
|
||||||
merge_editor = nvim, -d
|
|
||||||
|
|
||||||
[contact table]
|
|
||||||
display = first_name
|
|
||||||
group_by_addressbook = no
|
|
||||||
reverse = no
|
|
||||||
show_nicknames = no
|
|
||||||
show_uids = yes
|
|
||||||
show_kinds = no
|
|
||||||
sort = last_name
|
|
||||||
localize_dates = yes
|
|
||||||
preferred_phone_number_type = pref, cell, home
|
|
||||||
preferred_email_address_type = pref, work, home
|
|
|
@ -17,7 +17,7 @@ set spoolfile = +INBOX
|
||||||
set record = "+Sent"
|
set record = "+Sent"
|
||||||
set trash = "+Trash"
|
set trash = "+Trash"
|
||||||
set postponed = "+Drafts"
|
set postponed = "+Drafts"
|
||||||
mailboxes +SMS +INBOX "+College Messages" +"Internship 24"
|
mailboxes +SMS +INBOX "+College Messages"
|
||||||
|
|
||||||
unset wait_key
|
unset wait_key
|
||||||
macro index S "<shell-escape>mbsync --config=$HOME/.config/isync/config main; vdirsyncer sync<enter>"
|
macro index S "<shell-escape>mbsync --config=$HOME/.config/isync/config main; vdirsyncer sync<enter>"
|
||||||
|
@ -26,4 +26,3 @@ set use_threads = yes
|
||||||
set sort_aux = reverse-last-date-received
|
set sort_aux = reverse-last-date-received
|
||||||
|
|
||||||
set imap_keepalive = 300
|
set imap_keepalive = 300
|
||||||
set query_command = "khard email --parsable --search-in-source-files '%s'"
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
plugin
|
|
|
@ -92,7 +92,6 @@ function setTabbing(lang, width)
|
||||||
end
|
end
|
||||||
|
|
||||||
setTabbing("python", 4)
|
setTabbing("python", 4)
|
||||||
setTabbing("htmldjango", 4)
|
|
||||||
setTabbing("javascript", 4)
|
setTabbing("javascript", 4)
|
||||||
setTabbing("css", 4)
|
setTabbing("css", 4)
|
||||||
setTabbing("html", 4)
|
setTabbing("html", 4)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# start the wm
|
# start the wm
|
||||||
mode sxhkdrc
|
sxhkd &
|
||||||
bspwm
|
bspwm
|
||||||
|
|
|
@ -11,6 +11,11 @@ super + r
|
||||||
pkill -USR1 -x sxhkd; \
|
pkill -USR1 -x sxhkd; \
|
||||||
bspc wm -r
|
bspc wm -r
|
||||||
|
|
||||||
|
# reinitialize ancillary services
|
||||||
|
super + w
|
||||||
|
disp && keyboard
|
||||||
|
|
||||||
|
# control the national weather service
|
||||||
super + {_,shift + }n
|
super + {_,shift + }n
|
||||||
nws {local,national}
|
nws {local,national}
|
||||||
|
|
||||||
|
@ -34,10 +39,6 @@ super + shift + e
|
||||||
super + z
|
super + z
|
||||||
passmenu
|
passmenu
|
||||||
|
|
||||||
# start a browser
|
|
||||||
super + b
|
|
||||||
chromium
|
|
||||||
|
|
||||||
# manipulate a node
|
# manipulate a node
|
||||||
super + {_,ctrl +,shift + }{h,j,k,l}
|
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}
|
||||||
|
@ -50,9 +51,5 @@ super + {_,shift + } {1-9,0}
|
||||||
super + {t,f,s}
|
super + {t,f,s}
|
||||||
bspc node -t {tiled,floating,fullscreen}
|
bspc node -t {tiled,floating,fullscreen}
|
||||||
|
|
||||||
# x230t specific -- activate the tablet menu
|
|
||||||
XF86RotateWindows
|
XF86RotateWindows
|
||||||
tabletmenu
|
tabletmenu
|
||||||
|
|
||||||
shift + Insert
|
|
||||||
special_ins
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
path = "~/vdir/calendar/personal/*"
|
path = "~/vdir/calendar/personal/*"
|
||||||
date_format = "%m-%d-%Y"
|
date_format = "%m-%d-%Y"
|
||||||
time_format = "%H:%M"
|
time_format = "%H:%M"
|
||||||
default_due = 0
|
|
||||||
default_list = "edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0"
|
default_list = "edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0"
|
||||||
|
|
|
@ -56,10 +56,11 @@ type = "carddav"
|
||||||
|
|
||||||
url = "https://radicale.beepboop.systems/ryan/20cda0dd-5922-4905-8956-859c989a6519/"
|
url = "https://radicale.beepboop.systems/ryan/20cda0dd-5922-4905-8956-859c989a6519/"
|
||||||
username = "ryan"
|
username = "ryan"
|
||||||
password.fetch = ["command", "rbw", "get", "radicale"]
|
password.fetch = ["command", "rbw", "get", "beepboop.systems radicale instance"]
|
||||||
|
|
||||||
[storage band_calendar_remote]
|
[storage band_calendar_remote]
|
||||||
type = "http"
|
type = "http"
|
||||||
|
|
||||||
url = "https://calendar.google.com/calendar/ical/i6bong6iferbcuf1u25jg47t7k%40group.calendar.google.com/public/basic.ics"
|
url = "https://calendar.google.com/calendar/ical/i6bong6iferbcuf1u25jg47t7k%40group.calendar.google.com/public/basic.ics"
|
||||||
|
|
||||||
[storage pco_remote]
|
[storage pco_remote]
|
||||||
|
@ -76,4 +77,4 @@ type = "caldav"
|
||||||
|
|
||||||
url = "https://radicale.beepboop.systems/ryan/edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0/"
|
url = "https://radicale.beepboop.systems/ryan/edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0/"
|
||||||
username = "ryan"
|
username = "ryan"
|
||||||
password.fetch = ["command", "rbw", "get", "radicale"]
|
password.fetch = ["command", "rbw", "get", "beepboop.systems radicale instance"]
|
||||||
|
|
|
@ -1,300 +0,0 @@
|
||||||
# XScreenSaver Preferences File
|
|
||||||
# Written by xscreensaver-settings 6.08 for usr on Sat Aug 31 19:23:22 2024.
|
|
||||||
# https://www.jwz.org/xscreensaver/
|
|
||||||
|
|
||||||
timeout: 0:10:00
|
|
||||||
cycle: 0:10:00
|
|
||||||
lock: False
|
|
||||||
lockTimeout: 0:00:00
|
|
||||||
passwdTimeout: 0:00:30
|
|
||||||
visualID: default
|
|
||||||
installColormap: True
|
|
||||||
verbose: False
|
|
||||||
splash: True
|
|
||||||
splashDuration: 0:00:05
|
|
||||||
demoCommand: xscreensaver-settings
|
|
||||||
nice: 10
|
|
||||||
fade: True
|
|
||||||
unfade: True
|
|
||||||
fadeSeconds: 0:00:03
|
|
||||||
ignoreUninstalledPrograms:False
|
|
||||||
dpmsEnabled: False
|
|
||||||
dpmsQuickOff: False
|
|
||||||
dpmsStandby: 2:00:00
|
|
||||||
dpmsSuspend: 2:00:00
|
|
||||||
dpmsOff: 4:00:00
|
|
||||||
grabDesktopImages: True
|
|
||||||
grabVideoFrames: False
|
|
||||||
chooseRandomImages: False
|
|
||||||
imageDirectory:
|
|
||||||
|
|
||||||
mode: one
|
|
||||||
selected: 24
|
|
||||||
|
|
||||||
textMode: url
|
|
||||||
textLiteral: XScreenSaver
|
|
||||||
textFile:
|
|
||||||
textProgram: fortune
|
|
||||||
textURL: https://en.wikipedia.org/w/index.php?title=Special:NewPages&feed=rss
|
|
||||||
dialogTheme: default
|
|
||||||
settingsGeom: 761,550 0,0
|
|
||||||
|
|
||||||
programs: \
|
|
||||||
maze --root \n\
|
|
||||||
GL: superquadrics --root \n\
|
|
||||||
attraction --root \n\
|
|
||||||
blitspin --root \n\
|
|
||||||
greynetic --root \n\
|
|
||||||
helix --root \n\
|
|
||||||
hopalong --root \n\
|
|
||||||
imsmap --root \n\
|
|
||||||
- noseguy --root \n\
|
|
||||||
- pyro --root \n\
|
|
||||||
qix --root \n\
|
|
||||||
- rocks --root \n\
|
|
||||||
rorschach --root \n\
|
|
||||||
decayscreen --root \n\
|
|
||||||
flame --root \n\
|
|
||||||
halo --root \n\
|
|
||||||
slidescreen --root \n\
|
|
||||||
pedal --root \n\
|
|
||||||
bouboule --root \n\
|
|
||||||
- braid --root \n\
|
|
||||||
coral --root \n\
|
|
||||||
deco --root \n\
|
|
||||||
drift --root \n\
|
|
||||||
- fadeplot --root \n\
|
|
||||||
galaxy --root --delay 82787 --ncolors 143 \
|
|
||||||
--no-spin \n\
|
|
||||||
goop --root \n\
|
|
||||||
grav --root \n\
|
|
||||||
ifs --root \n\
|
|
||||||
GL: jigsaw --root \n\
|
|
||||||
julia --root \n\
|
|
||||||
- kaleidescope --root \n\
|
|
||||||
GL: moebius --root \n\
|
|
||||||
moire --root \n\
|
|
||||||
GL: morph3d --root \n\
|
|
||||||
mountain --root \n\
|
|
||||||
munch --root \n\
|
|
||||||
penrose --root \n\
|
|
||||||
GL: pipes --root \n\
|
|
||||||
rdbomb --root \n\
|
|
||||||
GL: rubik --root \n\
|
|
||||||
- sierpinski --root \n\
|
|
||||||
slip --root \n\
|
|
||||||
GL: sproingies --root \n\
|
|
||||||
starfish --root \n\
|
|
||||||
strange --root \n\
|
|
||||||
swirl --root \n\
|
|
||||||
triangle --root \n\
|
|
||||||
xjack --root \n\
|
|
||||||
xlyap --root \n\
|
|
||||||
GL: atlantis --root \n\
|
|
||||||
bsod --root \n\
|
|
||||||
GL: bubble3d --root \n\
|
|
||||||
GL: cage --root \n\
|
|
||||||
- crystal --root \n\
|
|
||||||
cynosure --root \n\
|
|
||||||
discrete --root \n\
|
|
||||||
distort --root \n\
|
|
||||||
epicycle --root \n\
|
|
||||||
flow --root \n\
|
|
||||||
GL: glplanet --root \n\
|
|
||||||
interference --root \n\
|
|
||||||
kumppa --root \n\
|
|
||||||
GL: lament --root \n\
|
|
||||||
moire2 --root \n\
|
|
||||||
GL: sonar --root \n\
|
|
||||||
GL: stairs --root \n\
|
|
||||||
truchet --root \n\
|
|
||||||
- vidwhacker --root \n\
|
|
||||||
- webcollage --root \n\
|
|
||||||
blaster --root \n\
|
|
||||||
bumps --root \n\
|
|
||||||
ccurve --root \n\
|
|
||||||
compass --root \n\
|
|
||||||
deluxe --root \n\
|
|
||||||
- demon --root \n\
|
|
||||||
GL: extrusion --root \n\
|
|
||||||
- loop --root \n\
|
|
||||||
penetrate --root \n\
|
|
||||||
petri --root \n\
|
|
||||||
phosphor --root \n\
|
|
||||||
GL: pulsar --root \n\
|
|
||||||
ripples --root \n\
|
|
||||||
shadebobs --root \n\
|
|
||||||
GL: sierpinski3d --root \n\
|
|
||||||
spotlight --root \n\
|
|
||||||
squiral --root \n\
|
|
||||||
wander --root \n\
|
|
||||||
xflame --root \n\
|
|
||||||
xmatrix --root \n\
|
|
||||||
GL: gflux --root \n\
|
|
||||||
- nerverot --root \n\
|
|
||||||
xrayswarm --root \n\
|
|
||||||
xspirograph --root \n\
|
|
||||||
GL: circuit --root \n\
|
|
||||||
GL: dangerball --root \n\
|
|
||||||
- GL: dnalogo --root \n\
|
|
||||||
GL: engine --root \n\
|
|
||||||
GL: flipscreen3d --root \n\
|
|
||||||
GL: gltext --root \n\
|
|
||||||
GL: menger --root \n\
|
|
||||||
GL: molecule --root \n\
|
|
||||||
rotzoomer --root \n\
|
|
||||||
scooter --root \n\
|
|
||||||
speedmine --root \n\
|
|
||||||
GL: starwars --root \n\
|
|
||||||
GL: stonerview --root \n\
|
|
||||||
vermiculate --root \n\
|
|
||||||
whirlwindwarp --root \n\
|
|
||||||
zoom --root \n\
|
|
||||||
anemone --root \n\
|
|
||||||
apollonian --root \n\
|
|
||||||
GL: boxed --root \n\
|
|
||||||
GL: cubenetic --root \n\
|
|
||||||
GL: endgame --root \n\
|
|
||||||
euler2d --root \n\
|
|
||||||
fluidballs --root \n\
|
|
||||||
GL: flurry --root \n\
|
|
||||||
- GL: glblur --root \n\
|
|
||||||
GL: glsnake --root \n\
|
|
||||||
halftone --root \n\
|
|
||||||
GL: juggler3d --root \n\
|
|
||||||
GL: lavalite --root \n\
|
|
||||||
- polyominoes --root \n\
|
|
||||||
GL: queens --root \n\
|
|
||||||
- GL: sballs --root \n\
|
|
||||||
GL: spheremonics --root \n\
|
|
||||||
twang --root \n\
|
|
||||||
- GL: antspotlight --root \n\
|
|
||||||
apple2 --root \n\
|
|
||||||
GL: atunnel --root \n\
|
|
||||||
barcode --root \n\
|
|
||||||
GL: blinkbox --root \n\
|
|
||||||
GL: blocktube --root \n\
|
|
||||||
GL: bouncingcow --root \n\
|
|
||||||
cloudlife --root \n\
|
|
||||||
GL: cubestorm --root \n\
|
|
||||||
eruption --root \n\
|
|
||||||
GL: flipflop --root \n\
|
|
||||||
GL: flyingtoasters --root \n\
|
|
||||||
fontglide --root \n\
|
|
||||||
GL: gleidescope --root \n\
|
|
||||||
GL: glknots --root \n\
|
|
||||||
GL: glmatrix --root \n\
|
|
||||||
- GL: glslideshow --root \n\
|
|
||||||
GL: hypertorus --root \n\
|
|
||||||
- GL: jigglypuff --root \n\
|
|
||||||
metaballs --root \n\
|
|
||||||
GL: mirrorblob --root \n\
|
|
||||||
piecewise --root \n\
|
|
||||||
GL: polytopes --root \n\
|
|
||||||
pong --root \n\
|
|
||||||
popsquares --root \n\
|
|
||||||
GL: surfaces --root \n\
|
|
||||||
xanalogtv --root \n\
|
|
||||||
abstractile --root \n\
|
|
||||||
anemotaxis --root \n\
|
|
||||||
- GL: antinspect --root \n\
|
|
||||||
fireworkx --root \n\
|
|
||||||
fuzzyflakes --root \n\
|
|
||||||
interaggregate --root \n\
|
|
||||||
intermomentary --root \n\
|
|
||||||
memscroller --root \n\
|
|
||||||
GL: noof --root \n\
|
|
||||||
pacman --root \n\
|
|
||||||
GL: pinion --root \n\
|
|
||||||
GL: polyhedra --root \n\
|
|
||||||
- GL: providence --root \n\
|
|
||||||
substrate --root \n\
|
|
||||||
wormhole --root \n\
|
|
||||||
- GL: antmaze --root \n\
|
|
||||||
GL: boing --root \n\
|
|
||||||
boxfit --root \n\
|
|
||||||
GL: carousel --root \n\
|
|
||||||
celtic --root \n\
|
|
||||||
GL: crackberg --root \n\
|
|
||||||
GL: cube21 --root \n\
|
|
||||||
fiberlamp --root \n\
|
|
||||||
GL: fliptext --root \n\
|
|
||||||
GL: glhanoi --root \n\
|
|
||||||
GL: tangram --root \n\
|
|
||||||
GL: timetunnel --root \n\
|
|
||||||
GL: glschool --root \n\
|
|
||||||
GL: topblock --root \n\
|
|
||||||
GL: cubicgrid --root \n\
|
|
||||||
cwaves --root \n\
|
|
||||||
GL: gears --root \n\
|
|
||||||
GL: glcells --root \n\
|
|
||||||
GL: lockward --root \n\
|
|
||||||
m6502 --root \n\
|
|
||||||
GL: moebiusgears --root \n\
|
|
||||||
GL: voronoi --root \n\
|
|
||||||
GL: hypnowheel --root \n\
|
|
||||||
GL: klein --root \n\
|
|
||||||
- lcdscrub --root \n\
|
|
||||||
GL: photopile --root \n\
|
|
||||||
GL: skytentacles --root \n\
|
|
||||||
GL: rubikblocks --root \n\
|
|
||||||
GL: companioncube --root \n\
|
|
||||||
GL: hilbert --root \n\
|
|
||||||
GL: tronbit --root \n\
|
|
||||||
GL: geodesic --root \n\
|
|
||||||
hexadrop --root \n\
|
|
||||||
GL: kaleidocycle --root \n\
|
|
||||||
GL: quasicrystal --root \n\
|
|
||||||
GL: unknownpleasures --root \n\
|
|
||||||
binaryring --root \n\
|
|
||||||
GL: cityflow --root \n\
|
|
||||||
GL: geodesicgears --root \n\
|
|
||||||
GL: projectiveplane --root \n\
|
|
||||||
GL: romanboy --root \n\
|
|
||||||
tessellimage --root \n\
|
|
||||||
GL: winduprobot --root \n\
|
|
||||||
GL: splitflap --root \n\
|
|
||||||
GL: cubestack --root \n\
|
|
||||||
GL: cubetwist --root \n\
|
|
||||||
GL: discoball --root \n\
|
|
||||||
GL: dymaxionmap --root \n\
|
|
||||||
GL: energystream --root \n\
|
|
||||||
GL: hexstrut --root \n\
|
|
||||||
GL: hydrostat --root \n\
|
|
||||||
GL: raverhoop --root \n\
|
|
||||||
GL: splodesic --root \n\
|
|
||||||
GL: unicrud --root \n\
|
|
||||||
GL: esper --root \n\
|
|
||||||
GL: vigilance --root \n\
|
|
||||||
GL: crumbler --root \n\
|
|
||||||
filmleader --root \n\
|
|
||||||
glitchpeg --root \n\
|
|
||||||
GL: handsy --root \n\
|
|
||||||
GL: maze3d --root \n\
|
|
||||||
GL: peepers --root \n\
|
|
||||||
GL: razzledazzle --root \n\
|
|
||||||
vfeedback --root \n\
|
|
||||||
GL: deepstars --root \n\
|
|
||||||
GL: gravitywell --root \n\
|
|
||||||
GL: beats --root \n\
|
|
||||||
GL: covid19 --root \n\
|
|
||||||
GL: etruscanvenus --root \n\
|
|
||||||
GL: gibson --root \n\
|
|
||||||
GL: headroom --root \n\
|
|
||||||
GL: sphereeversion --root \n\
|
|
||||||
binaryhorizon --root \n\
|
|
||||||
marbling --root \n\
|
|
||||||
GL: chompytower --root \n\
|
|
||||||
GL: hextrail --root \n\
|
|
||||||
GL: mapscroller --root \n\
|
|
||||||
GL: nakagin --root \n\
|
|
||||||
GL: squirtorus --root \n\
|
|
||||||
GL: cubocteversion --root \n\
|
|
||||||
droste --root \n\
|
|
||||||
GL: papercube --root \n\
|
|
||||||
GL: skulloop --root \n\
|
|
||||||
|
|
||||||
|
|
||||||
pointerHysteresis: 10
|
|
||||||
authWarningSlack: 20
|
|
||||||
|
|
4
.mailmap
4
.mailmap
|
@ -1,4 +0,0 @@
|
||||||
stupidcomputer <ryan@beepboop.systems> <randomuser@tilde.club>
|
|
||||||
stupidcomputer <ryan@beepboop.systems>
|
|
||||||
stupidcomputer <ryan@beepboop.systems> <rndusr@beepboop.systems>
|
|
||||||
stupidcomputer <ryan@beepboop.systems> <Unixsys@github.com>
|
|
39
Makefile
39
Makefile
|
@ -1,39 +0,0 @@
|
||||||
termux: termux-pkgs termux-dots utils-sh st
|
|
||||||
|
|
||||||
st:
|
|
||||||
cd builds/st/ && CC=clang make && cp st ~/.local/bin/st
|
|
||||||
|
|
||||||
utils-sh:
|
|
||||||
cp builds/utils/sh/* ~/.local/bin
|
|
||||||
|
|
||||||
termux-pkgs:
|
|
||||||
pkg install \
|
|
||||||
neovim \
|
|
||||||
git \
|
|
||||||
tig \
|
|
||||||
tigervnc \
|
|
||||||
sxhkd \
|
|
||||||
clang \
|
|
||||||
elinks \
|
|
||||||
tmux \
|
|
||||||
fontconfig \
|
|
||||||
xorgproto \
|
|
||||||
fzy \
|
|
||||||
man \
|
|
||||||
libxft \
|
|
||||||
firefox \
|
|
||||||
mupdf \
|
|
||||||
texlive-bin \
|
|
||||||
htop \
|
|
||||||
rbw \
|
|
||||||
pkg-config \
|
|
||||||
bspwm \
|
|
||||||
termux-api \
|
|
||||||
jq \
|
|
||||||
x11-repo
|
|
||||||
|
|
||||||
termux-dots:
|
|
||||||
ln -sf $(CURDIR)/.config ~/.config
|
|
||||||
ln -sf $(CURDIR)/home/ssh/config ~/.ssh/config
|
|
||||||
ln -sf ~/.config/bash/bashrc ~/.bashrc
|
|
||||||
ln -sf ~/.config/bash/profile ~/.bash_profile
|
|
12
README.md
12
README.md
|
@ -20,7 +20,7 @@ if you're trying to install `netbox`, then use the `--impure` flag:
|
||||||
|
|
||||||
`sudo nixos-rebuild --flake .#netbox switch --impure`
|
`sudo nixos-rebuild --flake .#netbox switch --impure`
|
||||||
|
|
||||||
for installation onto Termux, run `make`.
|
for alternate installations on non-NixOS hosts, a Makefile will be made available
|
||||||
|
|
||||||
things to do
|
things to do
|
||||||
------------
|
------------
|
||||||
|
@ -33,9 +33,7 @@ things to do
|
||||||
license
|
license
|
||||||
-------
|
-------
|
||||||
|
|
||||||
all materials in this repository, except for:
|
all materials, except for:
|
||||||
|
a) `./home/wallpapers/pape.jpg`, which is of unknown licenses, and
|
||||||
* `./home/wallpapers/pape.jpg`, which is of unknown license, and
|
b) ./builds/st, which is licensed under MIT, persuant to ./builds/st/LICENSE,
|
||||||
* `./builds/st`, which is licensed under MIT, persuant to `./builds/st/LICENSE`,
|
is licensed under the GPLv3.
|
||||||
|
|
||||||
is (c) rndusr, randomuser, stupidcomputer, etc 2024 and licensed under the GPLv3 (see `./LICENSE`)
|
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
{ lib, config, pkgs, ...}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../../modules/bootstrap.nix
|
|
||||||
../../modules/common.nix
|
|
||||||
../../modules/x11.nix
|
|
||||||
../../modules/pulse.nix
|
|
||||||
../../modules/hosts.nix
|
|
||||||
../../modules/tlp.nix
|
|
||||||
../../modules/media.nix
|
|
||||||
../../modules/anki.nix
|
|
||||||
../../modules/power-control.nix
|
|
||||||
../../modules/adb.nix
|
|
||||||
../../modules/rbw.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
xscreensaver
|
|
||||||
texliveFull
|
|
||||||
libreoffice
|
|
||||||
|
|
||||||
ecryptfs
|
|
||||||
ffmpeg
|
|
||||||
thunderbird
|
|
||||||
ledger
|
|
||||||
ranger
|
|
||||||
];
|
|
||||||
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
services.avahi = {
|
|
||||||
enable = true;
|
|
||||||
nssmdns4 = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.usr.extraGroups = [ "input" ];
|
|
||||||
|
|
||||||
services.getty.autologinUser = "usr";
|
|
||||||
|
|
||||||
boot.loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.pulseaudio.enable = true;
|
|
||||||
|
|
||||||
networking.hostName = "aristotle";
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/bcae81bd-95d9-457f-8694-709f887cf2e2";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/CAEA-2672";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ lib, inputs, config, pkgs, home, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../../home/x11.nix
|
|
||||||
../../home/chromium
|
|
||||||
];
|
|
||||||
|
|
||||||
home.stateVersion = "24.05";
|
|
||||||
}
|
|
|
@ -1,112 +0,0 @@
|
||||||
{ lib, config, pkgs, ...}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./nvidia.nix
|
|
||||||
../x230t/special-ssh-magic.nix
|
|
||||||
../../modules/ssh-phone-home.nix
|
|
||||||
../../modules/hosts.nix
|
|
||||||
../../modules/bootstrap.nix
|
|
||||||
../../modules/common.nix
|
|
||||||
../../modules/x11.nix
|
|
||||||
../../modules/rbw.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
users.users.usr.extraGroups = [
|
|
||||||
"docker"
|
|
||||||
"adbusers"
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
wine
|
|
||||||
xdotool
|
|
||||||
|
|
||||||
qemu
|
|
||||||
virt-manager
|
|
||||||
libreoffice
|
|
||||||
nomacs
|
|
||||||
vscodium
|
|
||||||
thunderbird
|
|
||||||
libreoffice
|
|
||||||
texliveMedium
|
|
||||||
ledger
|
|
||||||
|
|
||||||
unzip
|
|
||||||
imagemagick
|
|
||||||
pciutils
|
|
||||||
usbutils
|
|
||||||
pwvucontrol
|
|
||||||
|
|
||||||
dunst
|
|
||||||
libnotify
|
|
||||||
ffmpeg
|
|
||||||
mdadm
|
|
||||||
git-annex
|
|
||||||
|
|
||||||
(pkgs.callPackage ../../builds/archutils.nix {})
|
|
||||||
];
|
|
||||||
|
|
||||||
services.hardware.bolt.enable = true; # thunderbolt support
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
General = {
|
|
||||||
AutoEnable = true;
|
|
||||||
Enable = "Source,Sink,Media,Socket";
|
|
||||||
ControllerMode = "bredr";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.virtualbox.host.enable = true;
|
|
||||||
|
|
||||||
boot.loader = {
|
|
||||||
efi = {
|
|
||||||
canTouchEfiVariables = true;
|
|
||||||
efiSysMountPoint = "/boot";
|
|
||||||
};
|
|
||||||
grub = {
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
services.avahi.enable = true; # runs the Avahi daemon
|
|
||||||
services.avahi.nssmdns4 = true; # enables the mDNS NSS plug-in
|
|
||||||
services.avahi.openFirewall = true; # opens the firewall for UDP port 5353
|
|
||||||
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.adb.enable = true;
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
networking = {
|
|
||||||
hostName = "copernicus";
|
|
||||||
firewall = {
|
|
||||||
enable = true;
|
|
||||||
allowedTCPPorts = [ 6000 ];
|
|
||||||
allowedTCPPortRanges = [
|
|
||||||
{ from = 1714; to = 1764; } # KDE Connect
|
|
||||||
];
|
|
||||||
allowedUDPPortRanges = [
|
|
||||||
{ from = 1714; to = 1764; } # KDE Connect
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "24.05"; # don't change this, lol
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/8182bde6-7213-4108-9dbf-951f76870207";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/0D21-265A";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/fc5366cc-2cec-415e-85dd-7c01a4e4fb4f"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ lib, inputs, config, pkgs, home, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../../home/x11.nix
|
|
||||||
../../home/chromium
|
|
||||||
];
|
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
# Make sure opengl is enabled
|
|
||||||
hardware.opengl = {
|
|
||||||
enable = true;
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
glxinfo
|
|
||||||
];
|
|
||||||
|
|
||||||
# Tell Xorg to use the nvidia driver (also valid for Wayland)
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
|
||||||
|
|
||||||
# Modesetting is needed for most Wayland compositors
|
|
||||||
modesetting.enable = true;
|
|
||||||
|
|
||||||
# Use the open source version of the kernel module
|
|
||||||
# Only available on driver 515.43.04+
|
|
||||||
open = false;
|
|
||||||
|
|
||||||
# Enable the nvidia settings menu
|
|
||||||
nvidiaSettings = true;
|
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
|
|
||||||
prime = {
|
|
||||||
sync.enable = true;
|
|
||||||
|
|
||||||
intelBusId = "PCI:0:2:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -8,12 +8,6 @@
|
||||||
../../modules/common.nix
|
../../modules/common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# nix optimization
|
|
||||||
nix.optimise = {
|
|
||||||
automatic = true;
|
|
||||||
dates = [ "03:45" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
|
||||||
|
@ -75,7 +69,6 @@
|
||||||
users.users.usr.openssh.authorizedKeys.keys = [
|
users.users.usr.openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2xUbQw9+RCPVw7qCFm4NNCP/MpS2BIArcwMv0KdKOI usr" # mlg
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2xUbQw9+RCPVw7qCFm4NNCP/MpS2BIArcwMv0KdKOI usr" # mlg
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHZw5bg0TrvSkW/XQa4c+2iLbIKOxfMGbjy5Nb3HSfBv usr" # phone
|
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
|
@ -9,19 +9,11 @@
|
||||||
../../modules/bootstrap.nix
|
../../modules/bootstrap.nix
|
||||||
../../modules/common.nix
|
../../modules/common.nix
|
||||||
../../modules/x11.nix
|
../../modules/x11.nix
|
||||||
../../modules/pulse.nix
|
|
||||||
../../modules/discord.nix
|
../../modules/discord.nix
|
||||||
# ../../modules/gaming.nix
|
../../modules/gaming.nix
|
||||||
../../modules/rbw.nix
|
../../modules/rbw.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
users.users.usr.extraGroups = [
|
|
||||||
"docker"
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wine
|
wine
|
||||||
xdotool
|
xdotool
|
||||||
|
@ -71,7 +63,7 @@
|
||||||
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
services.avahi.enable = true; # runs the Avahi daemon
|
services.avahi.enable = true; # runs the Avahi daemon
|
||||||
services.avahi.nssmdns4 = true; # enables the mDNS NSS plug-in
|
services.avahi.nssmdns = true; # enables the mDNS NSS plug-in
|
||||||
services.avahi.openFirewall = true; # opens the firewall for UDP port 5353
|
services.avahi.openFirewall = true; # opens the firewall for UDP port 5353
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
@ -79,19 +71,8 @@
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "mlg";
|
hostName = "mlg";
|
||||||
firewall = {
|
firewall.enable = true;
|
||||||
enable = true;
|
|
||||||
allowedTCPPorts = [ 6000 ];
|
|
||||||
allowedTCPPortRanges = [
|
|
||||||
{ from = 1714; to = 1764; } # KDE Connect
|
|
||||||
];
|
|
||||||
allowedUDPPortRanges = [
|
|
||||||
{ from = 1714; to = 1764; } # KDE Connect
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "23.11"; # don't change this, lol
|
system.stateVersion = "23.11"; # don't change this, lol
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
sudo nixos-rebuild --flake . switch --impure -I nixos-config=./
|
|
|
@ -5,25 +5,10 @@
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/bootstrap.nix
|
../../modules/bootstrap.nix
|
||||||
|
../../builds/gmail_mail_bridge.nix
|
||||||
./radicale.nix
|
|
||||||
./ssh.nix
|
|
||||||
./gitea.nix
|
|
||||||
./radicale.nix
|
|
||||||
./vaultwarden.nix
|
|
||||||
./sslh.nix
|
|
||||||
./rss2email.nix
|
|
||||||
./fail2ban.nix
|
|
||||||
./nginx.nix
|
|
||||||
./franklincce.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# nix optimization
|
networking.networkmanager.enable = true;
|
||||||
nix.optimise = {
|
|
||||||
automatic = true;
|
|
||||||
dates = [ "03:45" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
time.timeZone = "America/Chicago";
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
@ -41,38 +26,272 @@
|
||||||
tree
|
tree
|
||||||
dig
|
dig
|
||||||
htop
|
htop
|
||||||
|
gnumake
|
||||||
neovim
|
neovim
|
||||||
];
|
];
|
||||||
|
|
||||||
system = {
|
services.gmail_mail_bridge.enable = true;
|
||||||
copySystemConfiguration = true;
|
|
||||||
stateVersion = "23.05"; # don't change this, lol
|
system.copySystemConfiguration = true;
|
||||||
|
system.stateVersion = "23.05"; # don't change this, lol
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.device = "/dev/vda";
|
||||||
|
|
||||||
|
services.sslh = {
|
||||||
|
enable = true;
|
||||||
|
settings.protocols = [
|
||||||
|
{
|
||||||
|
host = "localhost";
|
||||||
|
name = "ssh";
|
||||||
|
port = "55555";
|
||||||
|
service = "ssh";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
host = "localhost";
|
||||||
|
name = "tls";
|
||||||
|
port = "442";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.loader = {
|
networking.hostName = "netbox";
|
||||||
grub.enable = true;
|
|
||||||
grub.device = "/dev/vda";
|
services.radicale = {
|
||||||
|
enable = true;
|
||||||
|
config = ''
|
||||||
|
[auth]
|
||||||
|
type = htpasswd
|
||||||
|
htpasswd_filename = radicale-passwd
|
||||||
|
htpasswd_encryption = plain
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.rss2email = {
|
||||||
|
enable = true;
|
||||||
|
to = "ryan@beepboop.systems";
|
||||||
|
feeds = {
|
||||||
|
"eff" = {
|
||||||
|
url = "https://www.eff.org/rss/updates.xml";
|
||||||
|
};
|
||||||
|
"nixos" = {
|
||||||
|
url = "https://nixos.org/blog/announcements-rss.xml";
|
||||||
|
};
|
||||||
|
"drewdevault" = {
|
||||||
|
url = "https://drewdevault.com/blog/index.xml";
|
||||||
|
};
|
||||||
|
"nullprogram" = {
|
||||||
|
url = "https://nullprogram.com/feed/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.fail2ban = {
|
||||||
|
enable = true;
|
||||||
|
ignoreIP = [
|
||||||
|
"192.168.1.0/24"
|
||||||
|
];
|
||||||
|
extraPackages = [pkgs.ipset];
|
||||||
|
banaction = "iptables-ipset-proto6-allports";
|
||||||
|
|
||||||
|
jails = {
|
||||||
|
"nginx-bruteforce" = ''
|
||||||
|
enabled = true
|
||||||
|
filter = nginx-bruteforce
|
||||||
|
logpath = /var/log/nginx/access.log
|
||||||
|
backend = auto
|
||||||
|
maxretry = 6
|
||||||
|
findtime = 600
|
||||||
|
'';
|
||||||
|
|
||||||
|
"postfix-bruteforce" = ''
|
||||||
|
enabled = true
|
||||||
|
filter = postfix-bruteforce
|
||||||
|
maxretry = 6
|
||||||
|
findtime = 600
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/nginx-bruteforce.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^<HOST>.*GET.*(matrix/server|\.php|admin|wp\-).* HTTP/\d.\d\" 404.*$
|
||||||
|
'';
|
||||||
|
|
||||||
|
"fail2ban/filter.d/postfix-bruteforce.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = warning: [\w\.\-]+\[<HOST>\]: SASL LOGIN authentication failed.*$
|
||||||
|
journalmatch = _SYSTEMD_UNIT=postfix.service
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.ryan = {
|
users.users.ryan = {
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILBGh1FHPneg7PCDkhMs2BCJPTIRVJkRTKpOj1w02ydD usr" # copernicus
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGrpVDLQszFKoYbvYKRyVTTpehxR0BVU47SXkz39l2wK usr" # mainsail
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGrpVDLQszFKoYbvYKRyVTTpehxR0BVU47SXkz39l2wK usr" # mainsail
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHZw5bg0TrvSkW/XQa4c+2iLbIKOxfMGbjy5Nb3HSfBv usr" # phone
|
|
||||||
];
|
];
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "docker" ];
|
extraGroups = [ "wheel" "docker" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
services.openssh = {
|
||||||
usePredictableInterfaceNames = false;
|
enable = true;
|
||||||
networkmanager.enable = true;
|
ports = [55555];
|
||||||
hostName = "netbox";
|
};
|
||||||
|
|
||||||
firewall = {
|
services.endlessh.enable = true;
|
||||||
enable = true;
|
services.endlessh.port = 22;
|
||||||
allowedTCPPorts = [ 80 443 ];
|
services.vaultwarden.enable = true;
|
||||||
|
services.vaultwarden.config = {
|
||||||
|
DOMAIN = "https://bitwarden.beepboop.systems";
|
||||||
|
SIGNUPS_ALLOWED = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.usePredictableInterfaceNames = false;
|
||||||
|
|
||||||
|
services.gitea = {
|
||||||
|
enable = true;
|
||||||
|
appName = "beepboop.systems"; # Give the site a name
|
||||||
|
database = {
|
||||||
|
type = "postgres";
|
||||||
|
passwordFile = "/etc/gittea-pass";
|
||||||
|
};
|
||||||
|
settings.security.INSTALL_LOCK = true;
|
||||||
|
settings.service.SHOW_REGISTRATION_BUTTON = false;
|
||||||
|
settings.ui.DEFAULT_THEME = "arc-green";
|
||||||
|
settings.api.ENABLE_SWAGGER = false;
|
||||||
|
settings.server = {
|
||||||
|
DOMAIN = "git.beepboop.systems";
|
||||||
|
ROOT_URL = "https://git.beepboop.systems/";
|
||||||
|
LANDING_PAGE = "explore";
|
||||||
|
HTTP_PORT = 3001;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true; # Ensure postgresql is enabled
|
||||||
|
authentication = ''
|
||||||
|
local gitea all ident map=gitea-users
|
||||||
|
'';
|
||||||
|
identMap = # Map the gitea user to postgresql
|
||||||
|
''
|
||||||
|
gitea-users gitea gitea
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.enable = true;
|
||||||
|
services.nginx.clientMaxBodySize = "100m";
|
||||||
|
services.nginx.defaultSSLListenPort = 442;
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
root = "/var/www/beepboop.systems";
|
||||||
|
locations."/" = {
|
||||||
|
extraConfig = ''
|
||||||
|
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
|
||||||
|
return 302 /$1;
|
||||||
|
}
|
||||||
|
try_files $uri $uri.html $uri/ =404;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."git.beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:3001";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."bit.beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
globalRedirect = "bitwarden.beepboop.systems";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."bitwarden.beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:8000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."radicale.beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:5232";
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_set_header X-Script-Name /;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_pass_header Authorization;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."calendar.beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
globalRedirect = "radicale.beepboop.systems";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."cal.beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
globalRedirect = "radicale.beepboop.systems";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."skillissue.agency" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
root = "/var/www/skillissue.agency";
|
||||||
|
};
|
||||||
|
|
||||||
|
security.acme = {
|
||||||
|
acceptTerms = true;
|
||||||
|
email = "nickforanick@protonmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
# services.roundcube = {
|
||||||
|
# enable = true;
|
||||||
|
# # this is the url of the vhost, not necessarily the same as the fqdn of
|
||||||
|
# # the mailserver
|
||||||
|
# hostName = "cube.beepboop.systems";
|
||||||
|
# extraConfig = ''
|
||||||
|
# # starttls needed for authentication, so the fqdn required to match
|
||||||
|
# # the certificate
|
||||||
|
# $config['smtp_server'] = "tls://${config.mailserver.fqdn}";
|
||||||
|
# $config['smtp_user'] = "%u";
|
||||||
|
# $config['smtp_pass'] = "%p";
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."roundcube.beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
globalRedirect = "cube.beepboop.systems";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."mail.beepboop.systems" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/bridge-submit" = {
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_pass http://localhost:8041;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/" = {
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://cube.beepboop.systems;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = [ 80 443 ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.fail2ban = {
|
|
||||||
enable = true;
|
|
||||||
ignoreIP = [
|
|
||||||
"192.168.1.0/24"
|
|
||||||
];
|
|
||||||
extraPackages = [pkgs.ipset];
|
|
||||||
banaction = "iptables-ipset-proto6-allports";
|
|
||||||
|
|
||||||
jails = {
|
|
||||||
"nginx-bruteforce" = ''
|
|
||||||
enabled = true
|
|
||||||
filter = nginx-bruteforce
|
|
||||||
logpath = /var/log/nginx/access.log
|
|
||||||
backend = auto
|
|
||||||
maxretry = 6
|
|
||||||
findtime = 600
|
|
||||||
'';
|
|
||||||
|
|
||||||
"postfix-bruteforce" = ''
|
|
||||||
enabled = true
|
|
||||||
filter = postfix-bruteforce
|
|
||||||
maxretry = 6
|
|
||||||
findtime = 600
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc = {
|
|
||||||
"fail2ban/filter.d/nginx-bruteforce.conf".text = ''
|
|
||||||
[Definition]
|
|
||||||
failregex = ^<HOST>.*GET.*(matrix/server|\.php|admin|wp\-).* HTTP/\d.\d\" 404.*$
|
|
||||||
'';
|
|
||||||
|
|
||||||
"fail2ban/filter.d/postfix-bruteforce.conf".text = ''
|
|
||||||
[Definition]
|
|
||||||
failregex = warning: [\w\.\-]+\[<HOST>\]: SASL LOGIN authentication failed.*$
|
|
||||||
journalmatch = _SYSTEMD_UNIT=postfix.service
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."franklincce.beepboop.systems" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:1337";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# WARNING WARNING WARNING
|
|
||||||
# the below is SUPER BAD and should not be copied ANYWHERE
|
|
||||||
# the docker container should be initialized by a flake or other nix concept,
|
|
||||||
# not this nonsense
|
|
||||||
|
|
||||||
systemd.services.franklincce = {
|
|
||||||
description = "the docker container that runs the franklincce app";
|
|
||||||
|
|
||||||
environment = { # this is EVIL, NEVER DO THIS!!!111!
|
|
||||||
NIX_PATH = "nixpkgs=flake:nixpkgs:/nix/var/nix/profiles/per-user/root/channels";
|
|
||||||
};
|
|
||||||
|
|
||||||
script = ''
|
|
||||||
cd /home/ryan
|
|
||||||
|
|
||||||
# don't fail if cloning the git repo fails
|
|
||||||
${pkgs.git}/bin/git clone https://git.beepboop.systems/stupidcomputer/yig yig || true
|
|
||||||
|
|
||||||
cd /home/ryan/yig
|
|
||||||
${pkgs.nix}/bin/nix-shell --command make
|
|
||||||
'';
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
User = "ryan";
|
|
||||||
};
|
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.gitea = {
|
|
||||||
enable = true;
|
|
||||||
appName = "beepboop.systems"; # Give the site a name
|
|
||||||
database = {
|
|
||||||
type = "postgres";
|
|
||||||
passwordFile = "/etc/gittea-pass";
|
|
||||||
};
|
|
||||||
settings.security.INSTALL_LOCK = true;
|
|
||||||
settings.service = {
|
|
||||||
SHOW_REGISTRATION_BUTTON = false;
|
|
||||||
DISABLE_REGISTRATION = true;
|
|
||||||
};
|
|
||||||
settings.ui.DEFAULT_THEME = "arc-green";
|
|
||||||
settings.api.ENABLE_SWAGGER = false;
|
|
||||||
settings.server = {
|
|
||||||
DOMAIN = "git.beepboop.systems";
|
|
||||||
ROOT_URL = "https://git.beepboop.systems/";
|
|
||||||
LANDING_PAGE = "explore";
|
|
||||||
HTTP_PORT = 3001;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.postgresql = {
|
|
||||||
enable = true; # Ensure postgresql is enabled
|
|
||||||
authentication = ''
|
|
||||||
local gitea all ident map=gitea-users
|
|
||||||
'';
|
|
||||||
identMap = # Map the gitea user to postgresql
|
|
||||||
''
|
|
||||||
gitea-users gitea gitea
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."git.beepboop.systems" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:3001";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.nginx.enable = true;
|
|
||||||
services.nginx.clientMaxBodySize = "100m";
|
|
||||||
services.nginx.defaultSSLListenPort = 442;
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."beepboop.systems" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
root = "/var/www/beepboop.systems";
|
|
||||||
locations."/" = {
|
|
||||||
extraConfig = ''
|
|
||||||
port_in_redirect off;
|
|
||||||
absolute_redirect off;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
defaults.email = "nickforanick@protonmail.com";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.radicale = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
auth = {
|
|
||||||
type = "htpasswd";
|
|
||||||
htpasswd_filename = "radicale-passwd";
|
|
||||||
htpasswd_encryption = "plain";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."radicale.beepboop.systems" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:5232";
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_set_header X-Script-Name /;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_pass_header Authorization;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."calendar.beepboop.systems" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
globalRedirect = "radicale.beepboop.systems";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."cal.beepboop.systems" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
globalRedirect = "radicale.beepboop.systems";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.rss2email = {
|
|
||||||
enable = true;
|
|
||||||
to = "ryan@beepboop.systems";
|
|
||||||
feeds = {
|
|
||||||
"eff" = {
|
|
||||||
url = "https://www.eff.org/rss/updates.xml";
|
|
||||||
};
|
|
||||||
"nixos" = {
|
|
||||||
url = "https://nixos.org/blog/announcements-rss.xml";
|
|
||||||
};
|
|
||||||
"drewdevault" = {
|
|
||||||
url = "https://drewdevault.com/blog/index.xml";
|
|
||||||
};
|
|
||||||
"nullprogram" = {
|
|
||||||
url = "https://nullprogram.com/feed/";
|
|
||||||
};
|
|
||||||
"computersarebad" = {
|
|
||||||
url = "https://computer.rip/rss.xml";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
ports = [55555];
|
|
||||||
settings = {
|
|
||||||
X11Forwarding = false;
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.sslh = {
|
|
||||||
enable = true;
|
|
||||||
settings.protocols = [
|
|
||||||
{
|
|
||||||
host = "localhost";
|
|
||||||
name = "ssh";
|
|
||||||
port = "55555";
|
|
||||||
service = "ssh";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
host = "localhost";
|
|
||||||
name = "tls";
|
|
||||||
port = "442";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.vaultwarden.enable = true;
|
|
||||||
services.vaultwarden.config = {
|
|
||||||
DOMAIN = "https://bitwarden.beepboop.systems";
|
|
||||||
SIGNUPS_ALLOWED = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."bit.beepboop.systems" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
globalRedirect = "bitwarden.beepboop.systems";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."bitwarden.beepboop.systems" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:8000";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -7,7 +7,6 @@
|
||||||
../../modules/hosts.nix
|
../../modules/hosts.nix
|
||||||
../../modules/common.nix
|
../../modules/common.nix
|
||||||
../../modules/x11.nix
|
../../modules/x11.nix
|
||||||
../../modules/pulse.nix
|
|
||||||
../../modules/discord.nix
|
../../modules/discord.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
../../modules/bootstrap.nix
|
../../modules/bootstrap.nix
|
||||||
../../modules/common.nix
|
../../modules/common.nix
|
||||||
../../modules/x11.nix
|
../../modules/x11.nix
|
||||||
../../modules/pulse.nix
|
|
||||||
../../modules/hosts.nix
|
../../modules/hosts.nix
|
||||||
../../modules/tlp.nix
|
../../modules/tlp.nix
|
||||||
../../modules/media.nix
|
../../modules/media.nix
|
||||||
|
@ -26,7 +25,6 @@
|
||||||
ffmpeg
|
ffmpeg
|
||||||
thunderbird
|
thunderbird
|
||||||
ledger
|
ledger
|
||||||
ranger
|
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
|
@ -60,6 +58,7 @@
|
||||||
|
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
|
|
||||||
|
|
||||||
networking.hostName = "x230t";
|
networking.hostName = "x230t";
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
{ stdenv
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, makeWrapper
|
|
||||||
, sxhkd
|
|
||||||
, bash
|
|
||||||
, feh
|
|
||||||
, jq
|
|
||||||
, fzy
|
|
||||||
, curl
|
|
||||||
, texliveFull
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "archutils";
|
|
||||||
version = "1.01";
|
|
||||||
|
|
||||||
src = ./archutils;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
buildInputs = [
|
|
||||||
bash
|
|
||||||
feh
|
|
||||||
jq
|
|
||||||
curl
|
|
||||||
fzy
|
|
||||||
texliveFull
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
|
|
||||||
for i in $(ls $src/); do
|
|
||||||
cp $src/$i $out/bin
|
|
||||||
ln -sf $out/bin/tmenu_run $out/bin/regenerate
|
|
||||||
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ bash feh jq curl fzy texliveFull ]}
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,118 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
working_directory=$(date +%Y-%m-%d)
|
|
||||||
human_readable=$(date "+%d %b %Y")
|
|
||||||
|
|
||||||
cd ~/doc/briefs/
|
|
||||||
mkdir "$working_directory"
|
|
||||||
cd "$working_directory"
|
|
||||||
|
|
||||||
cat > main.tex <<EOF
|
|
||||||
\documentclass[oneside]{article}
|
|
||||||
|
|
||||||
\usepackage{amssymb}
|
|
||||||
\usepackage[left=1.5cm, right=1.5cm, top=1.5cm, bottom=1.5cm]{geometry}
|
|
||||||
|
|
||||||
\pagenumbering{gobble}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
\noindent {\Large Ryan Marina} \hspace{\fill} {\Large Briefing for $human_readable}
|
|
||||||
|
|
||||||
\noindent \textsc{Internal Document System} \hspace{\fill} $ \square $ \textit{scanned?} $ \square $ \textit{not scanned?}
|
|
||||||
|
|
||||||
\noindent \textit{Digital Archive Supplement} \hspace{\fill} internal notes: \rule{3cm}{0.4pt}
|
|
||||||
|
|
||||||
\noindent \texttt{iref:doc/briefs/$working_directory}
|
|
||||||
|
|
||||||
\vspace{0.4cm}
|
|
||||||
|
|
||||||
\noindent \textsc{Schedule}
|
|
||||||
|
|
||||||
\vspace{-0.30cm}
|
|
||||||
|
|
||||||
\noindent \rule{\textwidth}{0.4pt}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
schedule=$(
|
|
||||||
khal list today today --format "{calendar}|{categories}|{start-time}|{end-time}|{title}" |
|
|
||||||
grep -E '^home\|school\||band\|'
|
|
||||||
)
|
|
||||||
IFS='
|
|
||||||
'
|
|
||||||
|
|
||||||
for class in $schedule; do
|
|
||||||
echo "$class" |
|
|
||||||
awk -F'|' '{
|
|
||||||
print "\\noindent " $5 " \\hspace{\\fill} \\textit{(" $3 "-" $4 ")}\n\n"
|
|
||||||
}' >> main.tex
|
|
||||||
done
|
|
||||||
|
|
||||||
cat >> main.tex <<EOF
|
|
||||||
\vspace{0.4cm}
|
|
||||||
|
|
||||||
\noindent \textsc{Unresolved Items}
|
|
||||||
|
|
||||||
\vspace{-0.30cm}
|
|
||||||
|
|
||||||
\noindent \rule{\textwidth}{0.4pt}
|
|
||||||
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
todo_items=$(
|
|
||||||
todo --porcelain |
|
|
||||||
jq -r '.[].summary'
|
|
||||||
)
|
|
||||||
IFS='
|
|
||||||
'
|
|
||||||
|
|
||||||
for todo in $todo_items; do
|
|
||||||
printf '\\noindent $ \\square $ %s\n\n' "$todo" >> main.tex
|
|
||||||
done
|
|
||||||
|
|
||||||
cat >> main.tex <<EOF
|
|
||||||
\vspace{0.4cm}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# generate notices
|
|
||||||
ssh netbox df -h |
|
|
||||||
grep /dev/vda3 |
|
|
||||||
awk -F' ' '{print "\\item \\texttt{" $1 "} on \\texttt{netbox} is at " $5 " utilization."}' |
|
|
||||||
sed 's/\%/\\%/g' > notices.tex
|
|
||||||
|
|
||||||
if [ -f notices.tex ]; then
|
|
||||||
cat >> main.tex <<EOF
|
|
||||||
\noindent \textsc{Procedural Notices}
|
|
||||||
|
|
||||||
\vspace{-0.30cm}
|
|
||||||
|
|
||||||
\noindent \rule{\textwidth}{0.4pt}
|
|
||||||
|
|
||||||
\begin{enumerate}
|
|
||||||
|
|
||||||
\input{notices}
|
|
||||||
|
|
||||||
\end{enumerate}
|
|
||||||
|
|
||||||
\vspace{0.4cm}
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >> main.tex <<EOF
|
|
||||||
\noindent \textsc{Items to be Appended to the Agenda}
|
|
||||||
|
|
||||||
\vspace{-0.30cm}
|
|
||||||
|
|
||||||
\noindent \rule{\textwidth}{0.4pt}
|
|
||||||
|
|
||||||
\end{document}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
pdflatex main.tex
|
|
||||||
|
|
||||||
printf "[!] briefing generated\n"
|
|
||||||
|
|
||||||
printf "file:///home/usr/doc/briefs/%s/main.pdf\n" "$working_directory"
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
temp=$(mktemp)
|
|
||||||
|
|
||||||
nvim $temp
|
|
||||||
|
|
||||||
IFS='
|
|
||||||
'
|
|
||||||
for i in $(cat $temp); do
|
|
||||||
todo new "$i"
|
|
||||||
done
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
generate_daily_brief | tail -1 | sed 's|file://||g' | xargs lp -d EPSONTHING
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.services.gmail_mail_bridge;
|
||||||
|
appEnv = pkgs.python3.withPackages (p: with p; [ waitress (callPackage ./gmail_mail_bridge/default.nix {}) ]);
|
||||||
|
in {
|
||||||
|
options.services.gmail_mail_bridge = {
|
||||||
|
enable = lib.mkEnableOption "Enable the gmail_mail_bridge";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
systemd.services.gmail_mail_bridge = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${appEnv}/bin/waitress-serve --port=8041 gmail_mail_bridge:app";
|
||||||
|
StandardOutput = "journal";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
__pycache_/
|
|
@ -0,0 +1,10 @@
|
||||||
|
synchronize email from gmail accounts whose OAuth access is heavily restricted
|
||||||
|
|
||||||
|
background
|
||||||
|
----------
|
||||||
|
|
||||||
|
my school district disabled external OAuth access to email, which is not cool. this script gets around this and creates a bridge so you can recieve emails from your school email.
|
||||||
|
|
||||||
|
do note that this is heavily unpolished and most definately insecure. there are some hardcoded credentials (which you can change, it just takes a little technical know-how)
|
||||||
|
|
||||||
|
have fun!
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, pythonPackages ? (import <nixpkgs> {}).python3Packages }:
|
||||||
|
pythonPackages.buildPythonPackage {
|
||||||
|
name = "gmail_mail_bridge";
|
||||||
|
src = ./gmail_mail_bridge;
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ pythonPackages.flask pkgs.system-sendmail ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/${pythonPackages.python.sitePackages}
|
||||||
|
cp -r . $out/${pythonPackages.python.sitePackages}/gmail_mail_bridge
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
shellHook = "export FLASK_APP=gmail_mail_bridge";
|
||||||
|
|
||||||
|
format = "other";
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
from flask import Flask
|
||||||
|
from flask import request
|
||||||
|
from flask import redirect
|
||||||
|
from flask import abort
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
import smtplib
|
||||||
|
import email
|
||||||
|
|
||||||
|
from subprocess import Popen, PIPE, STDOUT
|
||||||
|
|
||||||
|
pre_shared_secret = "amongus sussy imposter"
|
||||||
|
to = "ryan@beepboop.systems"
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
def handle_post(request):
|
||||||
|
msg = email.message_from_string(request.form["payload"])
|
||||||
|
del msg["To"]
|
||||||
|
msg["To"] = to
|
||||||
|
if not msg["From"]:
|
||||||
|
msg["From"] = "unknown-sender@mail.beepboop.systems"
|
||||||
|
|
||||||
|
s = smtplib.SMTP('localhost')
|
||||||
|
s.send_message(msg)
|
||||||
|
s.quit()
|
||||||
|
|
||||||
|
@app.route("/bridge-submit", methods = ["GET", "POST"])
|
||||||
|
def testing():
|
||||||
|
if request.method == 'POST':
|
||||||
|
data = request.form
|
||||||
|
if data['auth'] == pre_shared_secret:
|
||||||
|
handle_post(request)
|
||||||
|
else:
|
||||||
|
return 'you didn\'t use post'
|
||||||
|
return "default answer"
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11") {} }:
|
||||||
|
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = [
|
||||||
|
(pkgs.python3.withPackages (ps: [
|
||||||
|
ps.flask
|
||||||
|
]))
|
||||||
|
|
||||||
|
pkgs.curl
|
||||||
|
pkgs.jq
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
// google-side synchronization
|
||||||
|
// add a minute-wise trigger for mail synchronization
|
||||||
|
// go to the sidebar, select triggers, add a new one, configure it
|
||||||
|
// to run syncMail every minute
|
||||||
|
|
||||||
|
function syncMail() {
|
||||||
|
var threads = GmailApp.search("label:need_processing");
|
||||||
|
var label = GmailApp.getUserLabelByName("need_processing");
|
||||||
|
for (var thread of threads) {
|
||||||
|
for (var message of GmailApp.getMessagesForThread(thread)) {
|
||||||
|
var formData = {
|
||||||
|
auth: 'amongus sussy imposter',
|
||||||
|
payload: message.getRawContent(),
|
||||||
|
};
|
||||||
|
var options = {
|
||||||
|
'method' : 'POST',
|
||||||
|
'payload' : formData
|
||||||
|
};
|
||||||
|
var resp = UrlFetchApp.fetch('https://mail.beepboop.systems/bridge-submit', options);
|
||||||
|
}
|
||||||
|
thread.removeLabel(label);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,4 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
cd ~/dot_testing
|
cd ~/dot_testing
|
||||||
if [ -f "boxes/$(hostname)/custom_command" ]; then
|
|
||||||
eval "$(cat boxes/$(hostname)/custom_command)"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "flake.nix" ]; then
|
if [ -f "flake.nix" ]; then
|
||||||
sudo nixos-rebuild --flake . switch $@
|
sudo nixos-rebuild --flake . switch $@
|
||||||
else
|
else
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
, fontconfig
|
, fontconfig
|
||||||
, freetype
|
, freetype
|
||||||
, ncurses
|
, ncurses
|
||||||
, lightMode ? false
|
|
||||||
, extraLibs ? [ ]
|
, extraLibs ? [ ]
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -20,8 +19,7 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ pkg-config fontconfig freetype ncurses ];
|
nativeBuildInputs = [ pkg-config fontconfig freetype ncurses ];
|
||||||
buildInputs = [ libX11 libXft ] ++ extraLibs;
|
buildInputs = [ libX11 libXft ] ++ extraLibs;
|
||||||
|
|
||||||
buildPhase = lib.optionalString (lightMode == true) "cp lightmode.h colors.h;" +
|
buildPhase = ''
|
||||||
''
|
|
||||||
make
|
make
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
/* Terminal colors (16 first used in escape sequence) */
|
|
||||||
static const char *colorname[] = {
|
|
||||||
/* solarized light */
|
|
||||||
"#eee8d5", /* 0: black */
|
|
||||||
"#dc322f", /* 1: red */
|
|
||||||
"#859900", /* 2: green */
|
|
||||||
"#b58900", /* 3: yellow */
|
|
||||||
"#268bd2", /* 4: blue */
|
|
||||||
"#d33682", /* 5: magenta */
|
|
||||||
"#2aa198", /* 6: cyan */
|
|
||||||
"#073642", /* 7: white */
|
|
||||||
"#fdf6e3", /* 8: brblack */
|
|
||||||
"#cb4b16", /* 9: brred */
|
|
||||||
"#93a1a1", /* 10: brgreen */
|
|
||||||
"#839496", /* 11: bryellow */
|
|
||||||
"#657b83", /* 12: brblue */
|
|
||||||
"#6c71c4", /* 13: brmagenta*/
|
|
||||||
"#586e75", /* 14: brcyan */
|
|
||||||
"#002b36", /* 15: brwhite */
|
|
||||||
};
|
|
|
@ -1,2 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
pkgs.callPackage ./derivation.nix {}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ lib, python3Packages }:
|
|
||||||
with python3Packages;
|
|
||||||
buildPythonApplication {
|
|
||||||
pname = "statusbar";
|
|
||||||
version = "1.0";
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ ];
|
|
||||||
|
|
||||||
src = ./.;
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name = 'pystatus',
|
|
||||||
version = '1.0.0',
|
|
||||||
author = 'stupidcomputer',
|
|
||||||
author_email = 'ryan@beepboop.systems',
|
|
||||||
url = 'https://git.beepboop.systems/stupidcomputer/dot_testing',
|
|
||||||
description = 'simple statusbar content program',
|
|
||||||
license = 'GPLv3',
|
|
||||||
entry_points = {
|
|
||||||
'console_scripts': [
|
|
||||||
'statusbar = statusbar.statusbar:main'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
classifiers = (
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
||||||
"Operating System :: POSIX :: Linux",
|
|
||||||
"Environment :: Console"
|
|
||||||
),
|
|
||||||
zip_safe = False
|
|
||||||
)
|
|
|
@ -1,189 +0,0 @@
|
||||||
from multiprocessing import Process, Queue
|
|
||||||
from collections import defaultdict
|
|
||||||
from sys import argv
|
|
||||||
from sys import stdout
|
|
||||||
from math import floor
|
|
||||||
import datetime
|
|
||||||
import signal
|
|
||||||
import subprocess
|
|
||||||
import re
|
|
||||||
|
|
||||||
import os, socket, time
|
|
||||||
|
|
||||||
def find_all_belonging_to_monitor(splitted, monitor):
|
|
||||||
splitted = [i[1:] if i[1:] == monitor else i for i in splitted]
|
|
||||||
our_monitor = splitted.index(monitor)
|
|
||||||
next_monitor = None
|
|
||||||
for i in range(our_monitor, len(splitted)):
|
|
||||||
if splitted[i][0].lower() == "m":
|
|
||||||
next_monitor = i
|
|
||||||
break
|
|
||||||
|
|
||||||
if not next_monitor:
|
|
||||||
next_monitor = len(splitted) - 1
|
|
||||||
|
|
||||||
return splitted[our_monitor:next_monitor]
|
|
||||||
|
|
||||||
def generate_desktop_string(monitor_array):
|
|
||||||
output = []
|
|
||||||
for i in monitor_array:
|
|
||||||
if i[0] == "O":
|
|
||||||
output.append("*{}".format(i[1:]))
|
|
||||||
|
|
||||||
if i[0] == "o":
|
|
||||||
output.append("{}".format(i[1:]))
|
|
||||||
|
|
||||||
if i[0] == "F":
|
|
||||||
output.append("*{}".format(i[1:]))
|
|
||||||
|
|
||||||
return ' '.join(output)
|
|
||||||
|
|
||||||
def filemodfactory(filename: str, modname: str):
|
|
||||||
def filemod(queue, _):
|
|
||||||
orig = 0
|
|
||||||
while True:
|
|
||||||
new = os.path.getmtime(filename)
|
|
||||||
if(new > orig):
|
|
||||||
with open(filename, 'r') as f:
|
|
||||||
queue.put({
|
|
||||||
"module": modname,
|
|
||||||
"data": f.read().rstrip()
|
|
||||||
})
|
|
||||||
orig = new
|
|
||||||
time.sleep(0.1)
|
|
||||||
|
|
||||||
return filemod
|
|
||||||
|
|
||||||
def new_mail(queue, _):
|
|
||||||
while True:
|
|
||||||
dir_output = os.listdir("/home/usr/Mail/main/INBOX/new")
|
|
||||||
dir_output = len(dir_output)
|
|
||||||
queue.put({
|
|
||||||
"module": "newmail",
|
|
||||||
"data": str(dir_output)
|
|
||||||
})
|
|
||||||
time.sleep(20)
|
|
||||||
|
|
||||||
def bspwm(queue, monitor):
|
|
||||||
client = socket.socket(
|
|
||||||
socket.AF_UNIX,
|
|
||||||
socket.SOCK_STREAM
|
|
||||||
)
|
|
||||||
client.connect("/tmp/bspwm_1_0-socket")
|
|
||||||
|
|
||||||
message = "subscribe\0".encode()
|
|
||||||
client.send(message)
|
|
||||||
while True:
|
|
||||||
resp = client.recv(1024).decode().rstrip()
|
|
||||||
splitted = resp[1:].split(":")
|
|
||||||
if not monitor == "all":
|
|
||||||
monitor_array = find_all_belonging_to_monitor(splitted, monitor)
|
|
||||||
else:
|
|
||||||
monitor_array = splitted
|
|
||||||
queue.put({
|
|
||||||
"module": "bspwm",
|
|
||||||
"data": generate_desktop_string(monitor_array)
|
|
||||||
})
|
|
||||||
|
|
||||||
client.close()
|
|
||||||
|
|
||||||
def clock(queue, _):
|
|
||||||
while True:
|
|
||||||
queue.put({
|
|
||||||
"module": "clock",
|
|
||||||
"data": datetime.datetime.now().strftime("%d/%m | %H:%M")
|
|
||||||
})
|
|
||||||
|
|
||||||
time.sleep(60)
|
|
||||||
|
|
||||||
def filecheckerfactory(filename: str, modname: str, timeout=60):
|
|
||||||
def filechecker(queue, _):
|
|
||||||
while True:
|
|
||||||
try:
|
|
||||||
file = open(filename)
|
|
||||||
buf = file.read(128).rstrip()
|
|
||||||
queue.put({
|
|
||||||
"module": modname,
|
|
||||||
"data": buf
|
|
||||||
})
|
|
||||||
|
|
||||||
except FileNotFoundError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
time.sleep(timeout)
|
|
||||||
|
|
||||||
return filechecker
|
|
||||||
|
|
||||||
battery = filecheckerfactory("/sys/class/power_supply/BAT0/capacity", "bat")
|
|
||||||
batterystatus = filecheckerfactory("/sys/class/power_supply/BAT0/status", "batstat")
|
|
||||||
sxhkdmode = filemodfactory("/home/usr/.cache/statusbar/sxhkd_mode", "sxhkdmode")
|
|
||||||
|
|
||||||
def render(modules) -> str:
|
|
||||||
columns, _ = os.get_terminal_size(0)
|
|
||||||
|
|
||||||
left = "{} | {}({})".format(modules["clock"], modules["bspwm"], modules["sxhkdmode"])
|
|
||||||
right = "{} {}({})".format(modules["newmail"], modules["bat"], modules["batstat"])
|
|
||||||
padding = " " * (columns - len(left) - len(right) - 0)
|
|
||||||
|
|
||||||
output = left + padding + right
|
|
||||||
|
|
||||||
# special battery trickery
|
|
||||||
try:
|
|
||||||
batt_percentage = int(modules["bat"]) / 100
|
|
||||||
except ValueError:
|
|
||||||
batt_percentage = 1
|
|
||||||
|
|
||||||
highlighted = floor(columns * batt_percentage)
|
|
||||||
|
|
||||||
output = "\033[?25l\033[2J\033[H\033[4m" + \
|
|
||||||
output[:highlighted] + \
|
|
||||||
"\033[24m" + \
|
|
||||||
output[highlighted:]
|
|
||||||
|
|
||||||
print(output, end='')
|
|
||||||
stdout.flush()
|
|
||||||
|
|
||||||
def main():
|
|
||||||
try:
|
|
||||||
os.mkdir("/home/usr/.cache/statusbar")
|
|
||||||
except FileExistsError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if argv[1] == "start_statusbars":
|
|
||||||
# get the monitors
|
|
||||||
xrandr = subprocess.Popen(['xrandr'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
|
||||||
output = list(xrandr.stdout)
|
|
||||||
output = [i.decode("utf-8") for i in output if " connected" in i.decode("utf-8")]
|
|
||||||
serialized = []
|
|
||||||
for i in output:
|
|
||||||
splitted = i.split(' ')
|
|
||||||
print(splitted)
|
|
||||||
displayname = splitted[0]
|
|
||||||
geometry = splitted[2]
|
|
||||||
if geometry == "primary":
|
|
||||||
geometry = splitted[3]
|
|
||||||
|
|
||||||
try:
|
|
||||||
geometry_splitted = [int(i) for i in geometry.replace('x', '+').split('+')]
|
|
||||||
except ValueError:
|
|
||||||
continue
|
|
||||||
geometry_splitted[1] = 20
|
|
||||||
print(displayname, geometry_splitted)
|
|
||||||
os.system("st -c statusbar -p -g {}x{}+{}+{} -e statusbar {} & disown".format(
|
|
||||||
*map(str, geometry_splitted),
|
|
||||||
displayname
|
|
||||||
))
|
|
||||||
return
|
|
||||||
queue = Queue()
|
|
||||||
modules = [bspwm, clock, battery, batterystatus, sxhkdmode, new_mail]
|
|
||||||
[Process(target=module, args=(queue, argv[1])).start() for module in modules]
|
|
||||||
|
|
||||||
module_outputs = defaultdict(lambda: "")
|
|
||||||
|
|
||||||
while True:
|
|
||||||
result = queue.get()
|
|
||||||
module_outputs[result["module"]] = result["data"]
|
|
||||||
render(module_outputs)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
, pkgs
|
# for statusbar
|
||||||
|
, pkg-config
|
||||||
|
, libxcb
|
||||||
# shell scripts stuff
|
# shell scripts stuff
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, sshuttle
|
, sshuttle
|
||||||
|
@ -9,19 +11,17 @@
|
||||||
, bash
|
, bash
|
||||||
, feh
|
, feh
|
||||||
, jq
|
, jq
|
||||||
|
, ffmpeg
|
||||||
, fzy
|
, fzy
|
||||||
, figlet
|
, figlet
|
||||||
, curl
|
, curl
|
||||||
, ytfzf
|
, ytfzf
|
||||||
, xrandr
|
, xrandr
|
||||||
, xrectsel
|
|
||||||
, ffcast
|
|
||||||
, svkbd
|
, svkbd
|
||||||
, xkbset
|
, xkbset
|
||||||
, rbw
|
, rbw
|
||||||
, xclip
|
, xclip
|
||||||
, xmessage
|
, libsForQt5
|
||||||
, imagemagick
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -30,16 +30,23 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = ./utils;
|
src = ./utils;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper pkg-config libxcb ];
|
||||||
buildInputs = [ bash feh xrandr jq curl fzy ytfzf sshuttle svkbd scrcpy rbw xclip ffcast xkbset xmessage imagemagick ];
|
buildInputs = [ libxcb bash feh xrandr jq curl fzy ytfzf ffmpeg sshuttle svkbd scrcpy xkbset rbw xclip libsForQt5.kolourpaint ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
ls
|
||||||
|
make
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
for i in $(ls $src/); do
|
for i in $(ls $src/sh); do
|
||||||
cp $src/$i $out/bin
|
cp $src/sh/$i $out/bin
|
||||||
ln -sf $out/bin/tmenu_run $out/bin/regenerate
|
ln -sf $out/bin/tmenu_run $out/bin/regenerate
|
||||||
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy xkbset ytfzf sshuttle svkbd scrcpy xrectsel ffcast xmessage imagemagick ]}
|
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy ytfzf ffmpeg sshuttle svkbd scrcpy libsForQt5.kolourpaint ]}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
cp c/status/main $out/bin/statusbar
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
.PHONY: main
|
||||||
|
main:
|
||||||
|
make -C c/status -f Makefile
|
|
@ -0,0 +1,5 @@
|
||||||
|
TODO LIST
|
||||||
|
---------
|
||||||
|
|
||||||
|
- fix paste
|
||||||
|
- make the c programs less buggy and let them not suck as much
|
|
@ -0,0 +1,2 @@
|
||||||
|
main
|
||||||
|
*.o
|
|
@ -0,0 +1,9 @@
|
||||||
|
LDFLAGS=`pkg-config --cflags --libs xcb`
|
||||||
|
CFLAGS=-ggdb -fsanitize=address
|
||||||
|
main: battery.o bspwm.o time.o battstatus.o message.o
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm *.o main
|
||||||
|
|
||||||
|
run:
|
||||||
|
./main
|
|
@ -0,0 +1,4 @@
|
||||||
|
status
|
||||||
|
------
|
||||||
|
|
||||||
|
a simple statusbar script thing (tm)
|
|
@ -0,0 +1,38 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include "battery.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
/* config contains a path to the battery */
|
||||||
|
int mod_battery(char *config, char *name, char *pipename) {
|
||||||
|
struct message msg;
|
||||||
|
strcpy(msg.name, name);
|
||||||
|
|
||||||
|
int fd = open(pipename, O_WRONLY);
|
||||||
|
int battery;
|
||||||
|
int recvd;
|
||||||
|
|
||||||
|
chdir("/sys/class/power_supply");
|
||||||
|
chdir(config);
|
||||||
|
|
||||||
|
for(;;) {
|
||||||
|
battery = open("capacity", O_RDONLY);
|
||||||
|
recvd = read(battery, msg.content, 3);
|
||||||
|
msg.content[3] = '\0';
|
||||||
|
if (msg.content[2] == '\n') {
|
||||||
|
msg.content[2] = '\0';
|
||||||
|
}
|
||||||
|
close(battery);
|
||||||
|
write(fd, &msg, sizeof(msg));
|
||||||
|
|
||||||
|
sleep(30);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef STATUS_BATTERY_H
|
||||||
|
#define STATUS_BATTERY_H
|
||||||
|
|
||||||
|
int mod_battery(char *config, char *name, char *pipename);
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,48 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include "battstatus.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
int mod_battstatus(char *config, char *name, char *pipename) {
|
||||||
|
char status;
|
||||||
|
int battery;
|
||||||
|
struct message msg;
|
||||||
|
strcpy(msg.name, name);
|
||||||
|
|
||||||
|
int fd = open(pipename, O_WRONLY);
|
||||||
|
|
||||||
|
chdir("/sys/class/power_supply");
|
||||||
|
chdir(config);
|
||||||
|
|
||||||
|
for(;;) {
|
||||||
|
battery = open("status", O_RDONLY);
|
||||||
|
read(battery, msg.content, 1);
|
||||||
|
switch(msg.content[0]) {
|
||||||
|
case 'N': /* not charging */
|
||||||
|
msg.content[0] = '-';
|
||||||
|
break;
|
||||||
|
case 'C': /* charging */
|
||||||
|
msg.content[0] = '^';
|
||||||
|
break;
|
||||||
|
case 'D': /* discharging */
|
||||||
|
msg.content[0] = 'U';
|
||||||
|
break;
|
||||||
|
case 'U': /* unknown */
|
||||||
|
msg.content[0] = '?';
|
||||||
|
break;
|
||||||
|
default: /* what's going on? */
|
||||||
|
msg.content[0] = '!';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
msg.content[1] = '\0';
|
||||||
|
close(battery);
|
||||||
|
write(fd, &msg, sizeof(msg));
|
||||||
|
|
||||||
|
sleep(30);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef STATUS_BATTSTAT_H
|
||||||
|
#define STATUS_BATTSTAT_H
|
||||||
|
|
||||||
|
int mod_battstatus(char *config, char *name, char *pipename);
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,73 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/un.h>
|
||||||
|
#include <xcb/xcb.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include "bspwm.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
const char subscribe[] = "subscribe";
|
||||||
|
|
||||||
|
int get_socket(void) {
|
||||||
|
struct sockaddr_un sock;
|
||||||
|
char *host;
|
||||||
|
int displaynumber, screennumber;
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
xcb_parse_display(NULL, &host, &displaynumber, &screennumber);
|
||||||
|
|
||||||
|
sock.sun_family = AF_UNIX;
|
||||||
|
snprintf(
|
||||||
|
sock.sun_path,
|
||||||
|
sizeof(sock.sun_path), "/tmp/bspwm%s_%i_%i-socket",
|
||||||
|
host, displaynumber, screennumber
|
||||||
|
);
|
||||||
|
|
||||||
|
free(host);
|
||||||
|
|
||||||
|
fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||||
|
if (connect(
|
||||||
|
fd,
|
||||||
|
(struct sockaddr *) &sock,
|
||||||
|
sizeof(sock)
|
||||||
|
) == -1) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
return fd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int should_be_shown(char c) {
|
||||||
|
return c == 'O' || c == 'o' || c == 'F' || c == 'U' || c == 'u';
|
||||||
|
}
|
||||||
|
|
||||||
|
int is_a_desktop(char c) {
|
||||||
|
return c == 'O' || c == 'o' || c == 'F' || c == 'f' || c == 'U' || c == 'u';
|
||||||
|
}
|
||||||
|
|
||||||
|
int mod_bspwm(char *config, char *name, char *pipename) {
|
||||||
|
struct message msg;
|
||||||
|
int fd, bspcfd;
|
||||||
|
char in[BUFFER_SIZE];
|
||||||
|
|
||||||
|
strcpy(msg.name, name);
|
||||||
|
msg.flags = 0;
|
||||||
|
|
||||||
|
fd = open(pipename, O_WRONLY);
|
||||||
|
bspcfd = get_socket();
|
||||||
|
|
||||||
|
send(bspcfd, subscribe, sizeof(subscribe), 0);
|
||||||
|
|
||||||
|
for(;;) {
|
||||||
|
int recvd = recv(bspcfd, msg.content, sizeof(msg.content), 0);
|
||||||
|
msg.content[recvd - 1] = '\0';
|
||||||
|
write(fd, &msg, sizeof(msg));
|
||||||
|
memset(msg.content, 0, 512);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef STATUS_BSPWM_H
|
||||||
|
#define STATUS_BSPWM_H
|
||||||
|
|
||||||
|
int mod_bspwm(char *config, char *name, char *pipename);
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef STATUS_COMMON_H
|
||||||
|
#define STATUS_COMMON_H
|
||||||
|
|
||||||
|
#define LENGTH(x) sizeof(x) / sizeof(x[0])
|
||||||
|
#define BUFFER_SIZE 512
|
||||||
|
|
||||||
|
struct module {
|
||||||
|
int (*fork_callback)(char *config, char *name, char *pipename);
|
||||||
|
char name[16];
|
||||||
|
char config[512];
|
||||||
|
char buffer[512];
|
||||||
|
int buflen;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct message {
|
||||||
|
int flags;
|
||||||
|
char name[16];
|
||||||
|
char content[512];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,88 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/un.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <xcb/xcb.h>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "battery.h"
|
||||||
|
#include "battstatus.h"
|
||||||
|
#include "bspwm.h"
|
||||||
|
#include "time.h"
|
||||||
|
#include "message.h"
|
||||||
|
|
||||||
|
struct module mods[] = {
|
||||||
|
{mod_battery, "battery", "BAT0", { '\0' }},
|
||||||
|
{mod_battstatus, "battstatus", "BAT0", { '\0' }},
|
||||||
|
{mod_time, "time", "", { '\0' }},
|
||||||
|
{mod_bspwm, "bspwm", "", { '\0' }},
|
||||||
|
/* {mod_message, "message", "/home/usr/.cache/statusbar_notification", { '\0' }}, */
|
||||||
|
};
|
||||||
|
|
||||||
|
void create_module_proc(int index, char *pipename) {
|
||||||
|
pid_t pid = fork();
|
||||||
|
|
||||||
|
if (pid == 0) { /* we're the child */
|
||||||
|
mods[index].fork_callback(
|
||||||
|
mods[index].config,
|
||||||
|
mods[index].name,
|
||||||
|
pipename
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void create_module_procs(char *pipename) {
|
||||||
|
for(int i = 0; i < LENGTH(mods); i++) {
|
||||||
|
create_module_proc(i, pipename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void redraw() {
|
||||||
|
/* get the progress' module's value, convert it to int, and then
|
||||||
|
* figure out how much of the screen should be shaded in */
|
||||||
|
|
||||||
|
printf("\033[H\033[2J");
|
||||||
|
for(int i = 0; i < LENGTH(mods); i++) {
|
||||||
|
if (i == 0) printf("%s ", mods[i].buffer);
|
||||||
|
else printf("| %s ", mods[i].buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
|
||||||
|
static char NAMED_PIPE[] = "/home/usr/.cache/statusbar_pipe";
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
srand(time(NULL));
|
||||||
|
mkfifo(&NAMED_PIPE, 0666); /* it's okay if this fails */
|
||||||
|
int fd = open(&NAMED_PIPE, O_RDWR);
|
||||||
|
struct message msg;
|
||||||
|
|
||||||
|
create_module_procs(&NAMED_PIPE);
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
int ret = read(fd, &msg, sizeof(msg));
|
||||||
|
if(ret < 0) {
|
||||||
|
printf("error while reading message from child\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < LENGTH(mods); i++) {
|
||||||
|
if(strcmp(mods[i].name, msg.name) == 0) {
|
||||||
|
mods[i].buflen = strlen(msg.content);
|
||||||
|
strcpy(mods[i].buffer, msg.content);
|
||||||
|
redraw();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/inotify.h>
|
||||||
|
|
||||||
|
#include "message.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
int mod_message(char *config, char *name, char *pipename) {
|
||||||
|
struct message msg;
|
||||||
|
struct inotify_event buf;
|
||||||
|
strcpy(msg.name, name);
|
||||||
|
|
||||||
|
int fd = inotify_init();
|
||||||
|
int outfd = open(pipename, O_WRONLY);
|
||||||
|
|
||||||
|
for(;;) {
|
||||||
|
int watchdesc = inotify_add_watch(fd, config, IN_MODIFY);
|
||||||
|
read:
|
||||||
|
int watchread = read(fd, &buf, sizeof(struct inotify_event));
|
||||||
|
|
||||||
|
/* the file's changed, so reread it */
|
||||||
|
int filefd = open(config, O_RDONLY, 0);
|
||||||
|
int read_in = read(filefd, msg.content, sizeof(msg.content));
|
||||||
|
msg.content[read_in - 1] = '\0';
|
||||||
|
close(filefd);
|
||||||
|
|
||||||
|
/* write the new */
|
||||||
|
write(outfd, &msg, sizeof(msg));
|
||||||
|
inotify_rm_watch(fd, watchdesc); /* not sure why this is needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef STATUS_MESSAGE_H
|
||||||
|
#define STATUS_MESSAGE_H
|
||||||
|
|
||||||
|
int mod_message(char *config, char *name, char *pipename);
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,9 @@
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
pkgs.mkShell {
|
||||||
|
nativeBuildInputs = [
|
||||||
|
gdb
|
||||||
|
gnumake
|
||||||
|
pkg-config
|
||||||
|
xorg.libxcb
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "time.h"
|
||||||
|
|
||||||
|
int mod_time(char *config, char *name, char *pipename) {
|
||||||
|
struct message msg;
|
||||||
|
time_t now;
|
||||||
|
struct tm *tm;
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
strcpy(msg.name, name);
|
||||||
|
msg.flags = 0;
|
||||||
|
fd = open(pipename, O_WRONLY);
|
||||||
|
|
||||||
|
for(;;) {
|
||||||
|
time(&now);
|
||||||
|
tm = localtime(&now);
|
||||||
|
strftime(msg.content, 512, "%H:%M", tm);
|
||||||
|
write(fd, &msg, sizeof(msg));
|
||||||
|
|
||||||
|
sleep(60);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef STATUS_TIME_H
|
||||||
|
#define STATUS_TIME_H
|
||||||
|
|
||||||
|
int mod_time(char *config, char *name, char *pipename);
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,45 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$IS_RUNNING_IN_TMENU" = "yes" ]; then
|
|
||||||
unset IS_RUNNING_IN_TMENU
|
|
||||||
st -c tmenu-prompt -e "$0"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
display=$(xrandr \
|
|
||||||
| grep ' connected' \
|
|
||||||
| awk -F ' ' '{print $1}' \
|
|
||||||
| sed '1i select rectangle' \
|
|
||||||
| fzy)
|
|
||||||
|
|
||||||
case "$display" in
|
|
||||||
"select"*)
|
|
||||||
geom=$(xrectsel)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
geom=$(xrandr \
|
|
||||||
| grep "$display" \
|
|
||||||
| awk -F ' ' '{print $3 " " $4}' \
|
|
||||||
| sed 's/primary //g' \
|
|
||||||
| awk -F ' ' '{print $1}' \
|
|
||||||
| grep '[[:digit:]]'
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
printf "[] selected geometry is %s\n" "$geom"
|
|
||||||
|
|
||||||
medium=$(
|
|
||||||
printf ".mp4\n.png\n" | fzy
|
|
||||||
)
|
|
||||||
|
|
||||||
printf "[] capturing in medium %s\n" "$medium"
|
|
||||||
|
|
||||||
case "$medium" in
|
|
||||||
*"mp4"*)
|
|
||||||
ffcast -g $geom rec $HOME/output.mp4
|
|
||||||
;;
|
|
||||||
*"png"*)
|
|
||||||
ffcast -g $geom png
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# check for the disks
|
|
||||||
if [ "$(lsusb | grep -c 152d:1561)" -ne 1 ]; then
|
|
||||||
printf "is the disk drive connected?\n"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(lsblk | grep -Ec '^sdb|^sdc')" -ne 2 ]; then
|
|
||||||
printf "are the disk drives available\n"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mount_raid_array
|
|
||||||
|
|
||||||
cd ~/mount/annex
|
|
||||||
git annex sync
|
|
||||||
git annex get .
|
|
||||||
cd /tmp
|
|
||||||
|
|
||||||
mount_raid_array umount
|
|
||||||
|
|
||||||
printf "done\n"
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
import httplib2
|
||||||
|
import json
|
||||||
|
import math
|
||||||
|
import time
|
||||||
|
|
||||||
|
# fun fact: i got bored so made this on a southwest flight
|
||||||
|
|
||||||
|
while True:
|
||||||
|
request = httplib2.Http()
|
||||||
|
# you have to look in the network tab in 'inspect element', and find the '_' parameter, and paste that in
|
||||||
|
# of course, you have to be connected to southwest's onboard wifi
|
||||||
|
_param = "fill this in"
|
||||||
|
data = request.request("https://getconnected.southwestwifi.com/fp3d_fcgi-php/portal/public/index.php?_url=/index/getFile&path=last&_=" + _param)
|
||||||
|
data = json.loads(data[1])
|
||||||
|
print("-- Update --")
|
||||||
|
print("Nautical Miles: " + str(data["distanceToDestinationNauticalMiles"]))
|
||||||
|
print("Phase: " + data["presentPhase"])
|
||||||
|
print("Speed: " + str(data["groundSpeedKnots"]) + "kts")
|
||||||
|
seconds = data['timeToDestination']
|
||||||
|
minutes = math.floor(seconds / 60)
|
||||||
|
seconds = seconds % 60
|
||||||
|
print("Minutes: " + str(minutes) + " Seconds: " + str(seconds))
|
||||||
|
print("Flight Number: " + data["flightNumber"] + " Registration: " + data["tailNumber"])
|
||||||
|
|
||||||
|
time.sleep(3)
|
||||||
|
print('\033[H\033[2J')
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
[ -z "$1" ] && exit 1
|
|
||||||
|
|
||||||
# wrap rbw get $1 --full to output in the git credential helper
|
|
||||||
# format
|
|
||||||
|
|
||||||
# assume we're running xorg
|
|
||||||
prompt_for_rbw_password
|
|
||||||
|
|
||||||
# username=yourusername
|
|
||||||
# password=yourpassword
|
|
||||||
|
|
||||||
output=$(rbw get $1 --full)
|
|
||||||
echo "$output" | \
|
|
||||||
sed '1{s/^/password=/}' | \
|
|
||||||
sed 's/Username: /username=/g' | \
|
|
||||||
grep -E 'username|password' | \
|
|
||||||
tac
|
|
|
@ -1,3 +0,0 @@
|
||||||
cssid=$(nmcli -t -f IN-USE,SSID device wifi list | grep '^\*' | awk -F':' '{print $2}')
|
|
||||||
|
|
||||||
[ "WCS-BYOT" = "$cssid" ]
|
|
|
@ -1,43 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
print_help() {
|
|
||||||
echo "
|
|
||||||
this is khalmacs.
|
|
||||||
|
|
||||||
builtin-options:
|
|
||||||
- regular
|
|
||||||
- late
|
|
||||||
"
|
|
||||||
}
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
"regular")
|
|
||||||
khal new -g school -a home $2 07:40 08:27 AP Computer Science
|
|
||||||
khal new -g school -a home $2 08:34 09:19 Chemistry I H
|
|
||||||
khal new -g school -a home $2 09:29 10:14 AP Precalculus
|
|
||||||
khal new -g school -a home $2 10:21 11:06 AP European History
|
|
||||||
khal new -g school -a home $2 11:06 11:08 Flex Check time
|
|
||||||
khal new -g school -a home $2 11:15 12:05 Wind Ensemble H
|
|
||||||
khal new -g school -a home $2 12:12 12:37 SAIL
|
|
||||||
khal new -g school -a home $2 12:37 13:02 Lunch
|
|
||||||
khal new -g school -a home $2 13:09 13:54 English II H
|
|
||||||
khal new -g school -a home $2 14:01 14:47 Spanish III H
|
|
||||||
;;
|
|
||||||
"late")
|
|
||||||
khal new -g school -a home $2 08:25 09:08 AP Computer Science
|
|
||||||
khal new -g school -a home $2 09:15 09:56 Chemistry I H
|
|
||||||
khal new -g school -a home $2 10:06 10:47 AP Precalculus
|
|
||||||
khal new -g school -a home $2 10:54 11:33 AP European History
|
|
||||||
khal new -g school -a home $2 11:33 11:35 Flex Check time
|
|
||||||
khal new -g school -a home $2 11:41 12:22 Wind Ensemble H
|
|
||||||
khal new -g school -a home $2 12:29 13:10 Lunch
|
|
||||||
khal new -g school -a home $2 13:17 13:58 English II H
|
|
||||||
khal new -g school -a home $2 14:05 14:47 Spanish III H
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
print_help
|
|
||||||
;;
|
|
||||||
"help")
|
|
||||||
print_help
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
.TH COLORS 1 colors
|
||||||
|
.SH NAME
|
||||||
|
colors \- generate colorscheme and run hooks
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B colors [-hefc] [-w path]
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.B -h
|
||||||
|
disable running hooks (implies -e)
|
||||||
|
.TP
|
||||||
|
.B -e
|
||||||
|
echo colors to stdout
|
||||||
|
.TP
|
||||||
|
.B -c
|
||||||
|
check colors using color checking algorithm
|
||||||
|
.TP
|
||||||
|
.B -f
|
||||||
|
print wallpaper filename to stdout
|
||||||
|
.TP
|
||||||
|
.B -w
|
||||||
|
provide wallpaper path
|
||||||
|
.SH HOOKS
|
||||||
|
When -h is not used, a program at ~/.config/cwal/handler is executed. The first sixteen arguments are the colors in the colorscheme, and the seventeenth argument is the filename.
|
||||||
|
.SH EXIT CODES
|
||||||
|
.TP
|
||||||
|
.B 0
|
||||||
|
Normal exit code
|
||||||
|
.TP
|
||||||
|
.B 1
|
||||||
|
check_colors(...) failed.
|
||||||
|
.SH AUTHOR
|
||||||
|
randomuser
|
|
@ -0,0 +1,11 @@
|
||||||
|
.TH RNDUTILS 1 rndutils
|
||||||
|
.SH NAME
|
||||||
|
rndutils \- simple shell script utilities
|
||||||
|
.SH INSTALLATION
|
||||||
|
.B make install
|
||||||
|
.SH LICENSE
|
||||||
|
The author, randomuser (randomuser at tilde dot club) hereby
|
||||||
|
releases the software in this distribution and all
|
||||||
|
accompanying texts into the public domain, thereby relieving
|
||||||
|
him of any warranty of any kind.
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
.TH TIMER 1 timer
|
||||||
|
.SH NAME
|
||||||
|
timer \- simple command line timer program
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B timer [-evdbft] [-h int] [-m int] [-s int]
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.B -e
|
||||||
|
enable usage of vt100 escape sequences for timer rendering (overrides -v)
|
||||||
|
.TP
|
||||||
|
.B -v
|
||||||
|
enable printing of timer status
|
||||||
|
.TP
|
||||||
|
.B -d
|
||||||
|
count down; when timer reaches 00:00, finish (use -h, -m, -s to set ending time)
|
||||||
|
.TP
|
||||||
|
.B -b
|
||||||
|
ASCII BEL when timer finish state reached
|
||||||
|
.TP
|
||||||
|
.B -f
|
||||||
|
timer display contains hour slot
|
||||||
|
.TP
|
||||||
|
.B -t
|
||||||
|
use a tomato timer (use -h, -m, -s to set work cycle time, rest cycle time is assumed to be half of the working time)
|
||||||
|
.TP
|
||||||
|
.B -p
|
||||||
|
disable pausing after finishing tomato timer cycle (required -t to work)
|
||||||
|
.TP
|
||||||
|
.B -z
|
||||||
|
enable build-specific runtime settings (default -ebf)
|
||||||
|
.TP
|
||||||
|
.B "-h int"
|
||||||
|
specify number of hours for timer parameters
|
||||||
|
.TP
|
||||||
|
.B "-m int"
|
||||||
|
specify number of minutes for timer parameters
|
||||||
|
.TP
|
||||||
|
.B "-s int"
|
||||||
|
specify number of seconds for timer parameters
|
||||||
|
.SH INTERACTIVE USAGE
|
||||||
|
.TP
|
||||||
|
.B pausing
|
||||||
|
a timer is paused when an astrisk prefixes the display (with -e) and/or when the timer ceases to update, e.g. count up or down. you can use the enter key to pause/unpause it (refer to the below example)
|
||||||
|
.nf
|
||||||
|
$ timer -e
|
||||||
|
* 05:45
|
||||||
|
.fi
|
||||||
|
.TP
|
||||||
|
.B stopping a timer
|
||||||
|
should you wish to stop a timer prematurely, or a timer which has no specified end condition, you may press the key combination that sends a killing signal to the program (e.g. a la SIGTERM) in your shell, which is usually ^C. the timer has no major places to clean up. however, memory leaks might occur on some operating systems due to no free()ing of resources.
|
||||||
|
.SH EXIT CODES/TERMINATION SIGNALS
|
||||||
|
.TP
|
||||||
|
.B 0
|
||||||
|
timer finished successfully
|
||||||
|
.TP
|
||||||
|
.B 1 / SIGABRT
|
||||||
|
error parsing arguments
|
||||||
|
.SH EXAMPLES
|
||||||
|
.B start a ten minute timer, counting up:
|
||||||
|
.nf
|
||||||
|
$ timer -m 10
|
||||||
|
.fi
|
||||||
|
.B show the vt100 interface, too:
|
||||||
|
.nf
|
||||||
|
$ timer -em 10
|
||||||
|
.fi
|
||||||
|
.B start a one hour sixty-two minute fourty-nine second timer counting down (with vt100 interface):
|
||||||
|
.nf
|
||||||
|
$ timer -edh 1 -m 62 -s 49
|
||||||
|
.fi
|
||||||
|
.B start a tomato timer with a work interval of fourty minutes and a rest interval of twenty minutes:
|
||||||
|
.nf
|
||||||
|
$ timer -etm 40
|
||||||
|
.fi
|
||||||
|
.SH REQUIRED HEADERS
|
||||||
|
.nf
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <poll.h>
|
||||||
|
#include <string.h>
|
||||||
|
.fi
|
||||||
|
.SH BUGS
|
||||||
|
- when passing -p each tomato timer cycle is cut short one second
|
||||||
|
send email to random user at-sign tilde dot club
|
||||||
|
.SH AUTHOR
|
||||||
|
randomuser
|
|
@ -0,0 +1,30 @@
|
||||||
|
.TH TRSS 1 trss
|
||||||
|
.SH NAME
|
||||||
|
trss \- command oriented feed reader powered by sfeed
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B trss
|
||||||
|
.SH INTERFACE
|
||||||
|
.TP
|
||||||
|
.B ls
|
||||||
|
list all feed names in the 'feed home', or within a feed, list all items within
|
||||||
|
.TP
|
||||||
|
.B cd
|
||||||
|
focus another feed. in order to go back to the 'feed home', use 'cd' or 'cd ..'
|
||||||
|
.TP
|
||||||
|
.B sync
|
||||||
|
with no arguments and in the 'feed home', syncs all feeds. if in a specific feed, syncs that feed. a feed can be specified in an argument.
|
||||||
|
.TP
|
||||||
|
.B cat
|
||||||
|
open all feeds whose titles contain text as specified by an argument in 'lynx'
|
||||||
|
|
||||||
|
.SH trss-yt-id
|
||||||
|
this script is designed to allow one to obtain an rss feed for the uploads of a youtube channel. this command takes the homepage of the youtube channel in question as an argument and then returns the rss feed for that channel.
|
||||||
|
|
||||||
|
.SH BUGS
|
||||||
|
- when in a feed, you can't cd to another directly, you must go to to the 'feed home' and then cd
|
||||||
|
|
||||||
|
.SH DEPENDS
|
||||||
|
sfeed
|
||||||
|
|
||||||
|
.SH AUTHOR
|
||||||
|
randomuser <random user at tilde dot club>
|
|
@ -0,0 +1,10 @@
|
||||||
|
.TH XGETNEWWINDOW 1 xgetnewwindow
|
||||||
|
.SH NAME
|
||||||
|
xgetnewwindow
|
||||||
|
.SH SYNOPSIS
|
||||||
|
xgetnewwindow blocks until it recieves a CreateNotify event; that is, until a new window is created within the current Xorg instance. Once a new window is created, xgetnewwindow prints the window id (in hexadecimal) to stdout and exits.
|
||||||
|
.SH EXIT CODES
|
||||||
|
1 for abnormal termination, 0 for success.
|
||||||
|
.SH AUTHOR
|
||||||
|
randomuser
|
||||||
|
|
|
@ -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
|
|
|
@ -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
|
|
|
@ -1,20 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
hostname=$(hostname)
|
|
||||||
|
|
||||||
if [ "$hostname" != "copernicus" ]; then
|
|
||||||
echo "this script should be run only on copernicus"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "umount" ]; then
|
|
||||||
sudo umount ~/mount
|
|
||||||
sudo mdadm --stop /dev/md0
|
|
||||||
|
|
||||||
echo "done"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo mdadm --assemble --run /dev/md0 /dev/sdb2 /dev/sdc2
|
|
||||||
mkdir -p ~/mount
|
|
||||||
sudo mount /dev/md0 ~/mount
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
"pair")
|
|
||||||
dbus-launch kdeconnect-cli -d 96613dd9_3f79_4050_a4a1_c4dfe7fead92 --pair
|
|
||||||
;;
|
|
||||||
"screen")
|
|
||||||
scrcpy
|
|
||||||
;;
|
|
||||||
"help")
|
|
||||||
echo "pair -- to init kdeconnect and screen, to run scrcpy"
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
st -c tmenu-prompt -e rbw list
|
|
|
@ -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"
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# get screen info and temporary file
|
||||||
|
tmp=$(mktemp -d)
|
||||||
|
res=$(xrandr |
|
||||||
|
grep ' connected' |
|
||||||
|
awk -F' ' '{print $1 " " $4}' |
|
||||||
|
awk -F'+' '{print $1}' |
|
||||||
|
fzy |
|
||||||
|
awk -F' ' '{print $2}' )
|
||||||
|
|
||||||
|
# still or motion
|
||||||
|
medium=$(printf ".mp4\n.png\n" | fzy)
|
||||||
|
output="$tmp/main$medium"
|
||||||
|
|
||||||
|
# capture
|
||||||
|
case "$medium" in
|
||||||
|
*mp4*)
|
||||||
|
printf "> starting video capture...\n"
|
||||||
|
ffmpeg -video_size "$res" -f x11grab -framerate 60 -i $DISPLAY -preset ultrafast -pix_fmt yuv420p "$output"
|
||||||
|
;;
|
||||||
|
*png*)
|
||||||
|
printf "> taking screenshot...\n"
|
||||||
|
# for a screenshot, we usually want an a s t h e t i c
|
||||||
|
ffmpeg -f x11grab -video_size "$res" -i $DISPLAY -vframes 1 "$output" -loglevel quiet # be quiet
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf "not a choice\n"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
# what to do with the capture?
|
||||||
|
printf "> written to %s\n" "$output"
|
||||||
|
while true; do
|
||||||
|
result=$(printf "delete\nmove to home directory\nupload to pastebin\nreview footage\nquit\n" | fzy --prompt="what next? ")
|
||||||
|
case "$result" in
|
||||||
|
*upload*)
|
||||||
|
paste "$output" | xclip -i
|
||||||
|
printf "> pasted! check your clipboard\n"
|
||||||
|
;;
|
||||||
|
*review*)
|
||||||
|
[ "$medium" = ".mp4" ] && mpv "$output" && continue
|
||||||
|
feh "$output"
|
||||||
|
;;
|
||||||
|
*delete*)
|
||||||
|
printf "> removing target file...\n"
|
||||||
|
rm "$output"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*home*)
|
||||||
|
printf "> warping your capture to home...\n"
|
||||||
|
name=$(echo "capture$medium" | fzy --prompt="name please? ")
|
||||||
|
mv "$output" "$HOME/$name"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*quit*)
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue