Compare commits

...

122 Commits

Author SHA1 Message Date
stupidcomputer af38624f59 add an evil hack 2024-09-19 00:04:02 -05:00
stupidcomputer 3001ba4dde inc flake.lock 2024-09-18 22:56:43 -05:00
stupidcomputer cc89c4ed0e get rid of steam and discord 2024-09-17 15:41:20 -05:00
stupidcomputer b0ad4e58f0 add new mailbox to netbox 2024-09-17 15:40:53 -05:00
stupidcomputer c824d7a6b5 add some schedule changes 2024-09-17 02:39:16 -05:00
stupidcomputer b1c87c3b86 add do_backup 2024-09-09 01:07:13 -05:00
stupidcomputer 2be886d132 add git-annex to copernicus 2024-09-09 01:07:06 -05:00
stupidcomputer 221b97c41c add mdadm to copernicus package list 2024-09-02 17:25:11 -05:00
stupidcomputer 7ef78737d5 Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-09-02 17:20:32 -05:00
stupidcomputer 7f0dde3687 add new script: mount_raid_array 2024-09-02 17:20:13 -05:00
stupidcomputer c569ae410d add some winget dependencies (because windows) 2024-09-02 16:58:24 -05:00
stupidcomputer b47225c26b inc flake.lock 2024-08-31 20:18:15 -05:00
stupidcomputer a167c6161f misc. aristotle things 2024-08-31 20:13:14 -05:00
stupidcomputer f5da4b013b add xscreensaver configuration 2024-08-31 20:02:43 -05:00
stupidcomputer 9c811c5b77 add new machine: aristotle 2024-08-31 19:10:25 -05:00
stupidcomputer fdd8c5144f add a utility for quickly creating a lot of todo list items 2024-08-27 19:17:36 -05:00
stupidcomputer ce0b116cbb some changes to the briefing system 2024-08-26 20:01:48 -05:00
stupidcomputer c015833774 add archutils and initial utility
add an archutils subdirectory and a shell script that generates a nice
pdf for everything I have to do for the day
2024-08-26 17:44:22 -05:00
stupidcomputer d16d8f2991 change schedules in khalmacs 2024-08-26 16:10:07 -05:00
stupidcomputer 403af5a796 make bspwm focus first desktop on startup 2024-08-26 12:13:08 -05:00
stupidcomputer bf93ab10c0 add two things to the phone utility 2024-08-26 00:41:29 -05:00
stupidcomputer 6946936158 enable virtualbox 2024-08-25 19:09:11 -05:00
stupidcomputer e35562e6a4 make kdeconnect autoconnect work 2024-08-25 19:07:12 -05:00
stupidcomputer e08c671a95 increase font size on dunst notifications 2024-08-15 03:11:35 -05:00
stupidcomputer 8dc19fd4ab update copernicus 2024-08-15 03:11:25 -05:00
stupidcomputer 07980aa0db fully configure dunst and kdeconnect 2024-08-11 14:23:01 -05:00
stupidcomputer 85bf27d8b3 add dunst configuration 2024-08-11 14:22:42 -05:00
stupidcomputer 9cb6b9e34d increment flake.lock 2024-08-04 19:42:46 -05:00
stupidcomputer 2653aa81dd replace pulse with pipewire on copernicus 2024-08-04 18:43:03 -05:00
stupidcomputer 5decb4c14c decouple pulseaudio from x11 module loading 2024-08-04 18:32:40 -05:00
stupidcomputer db8a710e51 add support for top two monitors 2024-08-04 17:46:40 -05:00
stupidcomputer 18e99c3b15 add computersarebad rss feed 2024-08-03 21:07:52 -05:00
stupidcomputer efd46a51ba increment flake.lock 2024-08-02 05:58:51 -05:00
stupidcomputer 0a145e9ac8 add another setting to disp 2024-08-02 05:58:31 -05:00
stupidcomputer 38bee39349 remove kdeconnect from copernicus 2024-08-02 05:54:00 -05:00
stupidcomputer 5e27475b23 make git autosetup branches 2024-07-30 20:04:04 -05:00
stupidcomputer 935964a047 remove extraneous manual/ directory 2024-07-29 20:45:36 -05:00
stupidcomputer b268a84393 add query_command to neomutt 2024-07-29 13:01:35 -05:00
stupidcomputer ca4515d440 rework the regeneration mechanism for tmenu_run 2024-07-25 01:53:02 -05:00
stupidcomputer 8ed9beffba allow capture to run in tmenu 2024-07-25 00:51:56 -05:00
stupidcomputer ecbd242551 different PS1 for different hostnames 2024-07-24 13:37:30 -05:00
stupidcomputer 43a639af99 increment flake.lock 2024-07-24 13:20:47 -05:00
stupidcomputer fc7bee4b2b add prompt_for_new_password executable 2024-07-24 13:20:24 -05:00
stupidcomputer 74a6e7658a swap some monitors around 2024-07-24 13:16:58 -05:00
stupidcomputer 2cc261dc68 add some adb, pci, and usb utils 2024-07-22 22:14:13 -05:00
stupidcomputer e58604ad2c inc flake.lock 2024-07-22 16:30:44 -05:00
stupidcomputer 6baa5c0e96 add copernicus to the allowed hosts 2024-07-22 16:30:37 -05:00
stupidcomputer 264ef86797 change password entry names 2024-07-22 16:04:40 -05:00
stupidcomputer f4d9057f44 add autocorrect to gitconfig 2024-07-22 15:46:32 -05:00
stupidcomputer f98acbb12a automagically make git passwords work 2024-07-22 15:42:44 -05:00
stupidcomputer bd1731aae8 add some programs to the default set for copernicus 2024-07-22 15:12:19 -05:00
stupidcomputer 1b300b233e add a simple rotate wrapper around imagemagick 2024-07-22 15:11:57 -05:00
stupidcomputer 90e4234f2a add custom_command support to `rebuild`
since `netbox` has some weird requirements, add a custom_command option
for `rebuild`.
2024-07-22 14:21:02 -05:00
stupidcomputer b834f6e76a add shebang and mass_delete 2024-07-22 14:03:45 -05:00
stupidcomputer 5f17ccf995 add a mass rename script 2024-07-22 13:47:58 -05:00
stupidcomputer c23635a853 some changes 2024-07-22 01:22:27 -05:00
stupidcomputer b32e3af440 update flake.lock 2024-07-01 16:33:35 -05:00
stupidcomputer fc7c140bc1 make passmenu work the first time 2024-06-29 20:10:08 -05:00
stupidcomputer 3f85eab3ba Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-25 20:14:15 -05:00
stupidcomputer ec0f618a60 add powersave to x230t 2024-06-25 20:13:53 -05:00
stupidcomputer 94e1957b55 remove old man pages and clean up utils 2024-06-24 02:39:35 -05:00
stupidcomputer a514c944bd add franklincce and docker on a trial basis 2024-06-23 14:16:23 -05:00
stupidcomputer aa91852de0 make rebuild a global availability 2024-06-23 13:01:25 -05:00
stupidcomputer 26fa23ab80 modularize netbox 2024-06-23 13:01:12 -05:00
stupidcomputer 0672122eb1 remove gmail_mail_bridge 2024-06-23 13:00:52 -05:00
stupidcomputer 115deb8fc0 fix tabs in netbox/default.nix 2024-06-23 13:00:52 -05:00
stupidcomputer 413796ae2a add usr to the docker group 2024-06-23 13:00:52 -05:00
stupidcomputer 858bfb84d0 add a mailmap 2024-06-23 13:00:52 -05:00
stupidcomputer 1703177ade actually disable user registration for gitea 2024-06-20 19:02:08 -05:00
stupidcomputer fc785fa6dd make ssh pubkey auth required 2024-06-19 01:03:51 -05:00
stupidcomputer 1210e716f3 changes to netbox 2024-06-18 16:34:55 -05:00
stupidcomputer e781396a19 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-16 20:32:37 -05:00
stupidcomputer 085fadf2d0 update some attribute sets because of the 24.05 upgrade 2024-06-16 20:32:27 -05:00
stupidcomputer 6cfbe5e003 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-15 21:58:37 -05:00
stupidcomputer 0e5d3288f2 readd python3 -- it's needed 2024-06-15 21:58:09 -05:00
stupidcomputer c1ff21e877 remove the rewrite rule in nginx 2024-06-15 21:57:21 -05:00
stupidcomputer 53a9878e82 refine the licensing situation 2024-06-15 21:40:49 -05:00
stupidcomputer 237f7c2691 potpourri - add brave into home/, st has light mode, etc. 2024-06-15 21:34:04 -05:00
stupidcomputer fd3f89ce28 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-15 21:20:15 -05:00
stupidcomputer 66b98eab2e potpourri - add brave into home/, st has light mode, etc. 2024-06-15 21:19:41 -05:00
stupidcomputer e7e75d747c add a "solo" option for mlg
I'm on vacation, so it now makes sense for mlg to be solo, instead of
being forevermore plugged into a dock. Now, you can type `disp solo` and
make it configure DP-0 for working, instead of trying to configure
DP-1-1 and DP-1-2.

Additionally, this commit also introduces DISP_ACCESS_IP, to remotely
specify the access IP of `x230t`. This is because the wifi I'm using
right now:

- doesn't have the right subnet
- not the right network prefix
- no static ip assignment
- etc.
2024-06-15 20:19:11 -05:00
stupidcomputer 236529f36a Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-12 12:15:24 -05:00
stupidcomputer d9f3b42108 upgrade to 24.05 2024-06-12 12:14:31 -05:00
stupidcomputer 5620e61f31 make the statusbar program actually work 2024-06-12 12:14:20 -05:00
stupidcomputer 5161262388 update statusbar setup.py to say GPLv3, not MIT 2024-06-07 17:52:49 -05:00
stupidcomputer a0866a7bfd remove comments from statusbar and change statusbar location to ~/.cache/statusbar 2024-05-28 10:14:39 -05:00
stupidcomputer 36b441f054 add a shift+ins to insert special characters 2024-05-28 10:14:25 -05:00
stupidcomputer 1be3c2feaa invert monitors 2024-05-25 21:01:11 -05:00
stupidcomputer 6e80934f75 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-05-25 14:06:29 -05:00
stupidcomputer cb5a278470 bump flake.lock 2024-05-25 14:06:20 -05:00
stupidcomputer db20d9e047 plus 20 focus 2024-05-25 14:06:08 -05:00
stupidcomputer edceb9cf4e add special case for htmldjango 2024-05-25 10:33:13 -05:00
stupidcomputer 8563eede63 mlg has two displays now 2024-05-25 10:32:57 -05:00
stupidcomputer f7c7671dce update khard config location 2024-05-25 10:32:43 -05:00
stupidcomputer 032df33f95 add khard config 2024-05-18 22:19:16 -05:00
stupidcomputer f28f9837f6 add the new_mail module 2024-05-17 10:33:46 -05:00
stupidcomputer 921c36dc0f add sxhkd mode support to statusbar.py 2024-05-13 18:44:23 -05:00
stupidcomputer 427885772a some changes 2024-05-12 17:30:33 -05:00
stupidcomputer b2256fdc19 enable bitlbee 2024-05-12 17:10:30 -05:00
stupidcomputer 9053b258c0 capture updates 2024-05-12 17:08:24 -05:00
stupidcomputer 1bd70f34ca misc changes 2024-05-12 13:24:03 -05:00
stupidcomputer c713065135 add new statusbar program 2024-05-12 13:24:03 -05:00
stupidcomputer 56193d308a merge remote branch 2024-05-01 07:49:39 -05:00
stupidcomputer 56e59a8331 inc flake.lock 2024-05-01 07:48:03 -05:00
stupidcomputer 43c689ff90 add light documentation to khalmacs 2024-05-01 07:46:42 -05:00
stupidcomputer 4da2c989cd add jq and termux-api to termux packages 2024-04-28 23:24:04 -05:00
stupidcomputer bd1bbdfb1f Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-04-28 23:23:50 -05:00
stupidcomputer c40fc1eebf add phone as a host on local net 2024-04-28 17:58:51 -05:00
stupidcomputer 1648db66d2 inc flake.lock 2024-04-28 17:58:28 -05:00
stupidcomputer f2ff0448aa add tig to termux distribution 2024-04-26 14:32:28 -05:00
stupidcomputer 246e43bae7 update README.md to reflect new termux 'output' 2024-04-26 14:29:19 -05:00
stupidcomputer 7ae57a2f0d Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-04-26 14:21:53 -05:00
stupidcomputer 883a0e6ee6 automatically clean up nix store on mainsail 2024-04-26 14:21:23 -05:00
stupidcomputer 8c7ba43b93 automatically clean up nix store on mainsail 2024-04-26 14:14:11 -05:00
stupidcomputer 6ede499b2f add some strategically placed .gitignore files
because of the implementation of the termux-android Makefile installer,
the .config directory contents are symlinked into ~/.config. this
results in programs being able to write into the repo. these .gitignores
combat this.
2024-04-26 14:06:01 -05:00
stupidcomputer 9a64781d08 add new packages to phone termux setup; modify start-termux-xorg 2024-04-26 12:16:23 -05:00
stupidcomputer 900e8e2445 add phone key to ssh 2024-04-25 17:10:06 -05:00
stupidcomputer 937e2c648a make some minor changes to sxhkdrc and x230t config 2024-04-25 09:51:01 -05:00
stupidcomputer 45bbbac20c Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-04-25 09:50:06 -05:00
stupidcomputer ca80f73ef2 add termux support to the Makefile 2024-04-24 11:35:35 -05:00
stupidcomputer d106210de2 Merge branch 'statusbar-messaging' 2024-04-16 08:02:16 -05:00
stupidcomputer f2d4c7c364 add new sync script 2024-04-15 21:48:58 -05:00
143 changed files with 2062 additions and 1251 deletions

2
.config/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.config
rbw

1
.config/bash/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
hist

View File

@ -21,6 +21,28 @@ 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

View File

@ -26,3 +26,5 @@ bspc config top_padding 20
# post-wm configuration # post-wm configuration
disp disp
bspc desktop -f 1

BIN
.config/dunst/beep.m4a Normal file

Binary file not shown.

24
.config/dunst/dunstrc Normal file
View File

@ -0,0 +1,24 @@
[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

View File

@ -0,0 +1,3 @@
#!/bin/sh
mpv ~/.config/dunst/beep.m4a

3
.config/elinks/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
bookmarks
globhist
gotohist

View File

@ -3,10 +3,19 @@
name = stupidcomputer name = stupidcomputer
[credential "https://git.beepboop.systems"] [credential "https://git.beepboop.systems"]
username = stupidcomputer helper = !git-rbw-wrap gitea
[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

19
.config/khard/khard.conf Normal file
View File

@ -0,0 +1,19 @@
[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

View File

@ -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" mailboxes +SMS +INBOX "+College Messages" +"Internship 24"
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,3 +26,4 @@ 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
.config/nvim/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
plugin

View File

@ -92,6 +92,7 @@ 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)

View File

@ -1,3 +1,3 @@
# start the wm # start the wm
sxhkd & mode sxhkdrc
bspwm bspwm

View File

@ -11,11 +11,6 @@ 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}
@ -39,6 +34,10 @@ 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}
@ -51,5 +50,9 @@ 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

View File

@ -1,4 +1,5 @@
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"

View File

@ -56,11 +56,10 @@ 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", "beepboop.systems radicale instance"] password.fetch = ["command", "rbw", "get", "radicale"]
[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]
@ -77,4 +76,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", "beepboop.systems radicale instance"] password.fetch = ["command", "rbw", "get", "radicale"]

View File

@ -0,0 +1,300 @@
# 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 Normal file
View File

@ -0,0 +1,4 @@
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 Normal file
View File

@ -0,0 +1,39 @@
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

View File

@ -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 alternate installations on non-NixOS hosts, a Makefile will be made available for installation onto Termux, run `make`.
things to do things to do
------------ ------------
@ -33,7 +33,9 @@ things to do
license license
------- -------
all materials, except for: all materials in this repository, except for:
a) `./home/wallpapers/pape.jpg`, which is of unknown licenses, and
b) ./builds/st, which is licensed under MIT, persuant to ./builds/st/LICENSE, * `./home/wallpapers/pape.jpg`, which is of unknown license, and
is licensed under the GPLv3. * `./builds/st`, which is licensed under MIT, persuant to `./builds/st/LICENSE`,
is (c) rndusr, randomuser, stupidcomputer, etc 2024 and licensed under the GPLv3 (see `./LICENSE`)

View File

@ -0,0 +1,58 @@
{ 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";
}

View File

@ -0,0 +1,39 @@
# 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;
}

10
boxes/aristotle/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
../../home/x11.nix
../../home/chromium
];
home.stateVersion = "24.05";
}

View File

@ -0,0 +1,112 @@
{ 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
}

View File

@ -0,0 +1,40 @@
# 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;
}

10
boxes/copernicus/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
../../home/x11.nix
../../home/chromium
];
home.stateVersion = "23.11";
}

View File

@ -0,0 +1,39 @@
{ 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";
};
};
}

View File

@ -8,6 +8,12 @@
../../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";
@ -69,6 +75,7 @@
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";

View File

@ -9,11 +9,19 @@
../../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
@ -63,7 +71,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.nssmdns = true; # enables the mDNS NSS plug-in services.avahi.nssmdns4 = 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";
@ -71,8 +79,19 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
networking = { networking = {
hostName = "mlg"; hostName = "mlg";
firewall.enable = true; 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 = "23.11"; # don't change this, lol system.stateVersion = "23.11"; # don't change this, lol
} }

View File

@ -0,0 +1 @@
sudo nixos-rebuild --flake . switch --impure -I nixos-config=./

View File

@ -5,10 +5,25 @@
[ [
./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
]; ];
networking.networkmanager.enable = true; # nix optimization
nix.optimise = {
automatic = true;
dates = [ "03:45" ];
};
time.timeZone = "America/Chicago"; time.timeZone = "America/Chicago";
@ -26,272 +41,38 @@
tree tree
dig dig
htop htop
gnumake
neovim neovim
]; ];
services.gmail_mail_bridge.enable = true; system = {
copySystemConfiguration = true;
system.copySystemConfiguration = true; stateVersion = "23.05"; # don't change this, lol
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";
}
];
}; };
networking.hostName = "netbox"; boot.loader = {
grub.enable = true;
services.radicale = { grub.device = "/dev/vda";
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" ];
}; };
services.openssh = { networking = {
enable = true; usePredictableInterfaceNames = false;
ports = [55555]; networkmanager.enable = true;
}; hostName = "netbox";
services.endlessh.enable = true; firewall = {
services.endlessh.port = 22; enable = true;
services.vaultwarden.enable = true; allowedTCPPorts = [ 80 443 ];
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 ];
}; };
} }

42
boxes/netbox/fail2ban.nix Normal file
View File

@ -0,0 +1,42 @@
{ 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
'';
};
}

View File

@ -0,0 +1,41 @@
{ 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" ];
};
}

43
boxes/netbox/gitea.nix Normal file
View File

@ -0,0 +1,43 @@
{ 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";
};
};
}

23
boxes/netbox/nginx.nix Normal file
View File

@ -0,0 +1,23 @@
{ 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";
};
}

38
boxes/netbox/radicale.nix Normal file
View File

@ -0,0 +1,38 @@
{ 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";
};
}

View File

@ -0,0 +1,24 @@
{ 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";
};
};
};
}

13
boxes/netbox/ssh.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, config, pkgs, ... }:
{
services.openssh = {
enable = true;
ports = [55555];
settings = {
X11Forwarding = false;
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
}

19
boxes/netbox/sslh.nix Normal file
View File

@ -0,0 +1,19 @@
{ lib, config, pkgs, ... }:
{
services.sslh = {
enable = true;
settings.protocols = [
{
host = "localhost";
name = "ssh";
port = "55555";
service = "ssh";
}
{
host = "localhost";
name = "tls";
port = "442";
}
];
};
}

View File

@ -0,0 +1,22 @@
{ 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";
};
};
}

View File

@ -7,6 +7,7 @@
../../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
]; ];

View File

@ -7,6 +7,7 @@
../../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
@ -25,6 +26,7 @@
ffmpeg ffmpeg
thunderbird thunderbird
ledger ledger
ranger
]; ];
hardware.bluetooth = { hardware.bluetooth = {
@ -58,7 +60,6 @@
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;
networking.hostName = "x230t"; networking.hostName = "x230t";
system.stateVersion = "23.11"; system.stateVersion = "23.11";

39
builds/archutils.nix Normal file
View File

@ -0,0 +1,39 @@
{ 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
'';
}

View File

@ -0,0 +1,118 @@
#!/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"

11
builds/archutils/masstodo Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
temp=$(mktemp)
nvim $temp
IFS='
'
for i in $(cat $temp); do
todo new "$i"
done

View File

@ -0,0 +1,3 @@
#!/bin/sh
generate_daily_brief | tail -1 | sed 's|file://||g' | xargs lp -d EPSONTHING

View File

@ -1,19 +0,0 @@
{ 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";
};
};
};
}

View File

@ -1 +0,0 @@
__pycache_/

View File

@ -1,10 +0,0 @@
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!

View File

@ -1,20 +0,0 @@
{ 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";
}

View File

@ -1,37 +0,0 @@
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"

View File

@ -1,12 +0,0 @@
{ 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
];
}

View File

@ -1,23 +0,0 @@
// 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);
}
}

View File

@ -1,4 +1,11 @@
#!/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

View File

@ -7,6 +7,7 @@
, fontconfig , fontconfig
, freetype , freetype
, ncurses , ncurses
, lightMode ? false
, extraLibs ? [ ] , extraLibs ? [ ]
}: }:
@ -19,7 +20,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config fontconfig freetype ncurses ]; nativeBuildInputs = [ pkg-config fontconfig freetype ncurses ];
buildInputs = [ libX11 libXft ] ++ extraLibs; buildInputs = [ libX11 libXft ] ++ extraLibs;
buildPhase = '' buildPhase = lib.optionalString (lightMode == true) "cp lightmode.h colors.h;" +
''
make make
''; '';

20
builds/st/lightmode.h Normal file
View File

@ -0,0 +1,20 @@
/* 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 */
};

View File

@ -0,0 +1,2 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.callPackage ./derivation.nix {}

View File

@ -0,0 +1,10 @@
{ lib, python3Packages }:
with python3Packages;
buildPythonApplication {
pname = "statusbar";
version = "1.0";
propagatedBuildInputs = [ ];
src = ./.;
}

23
builds/statusbar/setup.py Normal file
View File

@ -0,0 +1,23 @@
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
)

View File

View File

@ -0,0 +1,189 @@
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()

View File

@ -1,8 +1,6 @@
{ stdenv { stdenv
, lib , lib
# for statusbar , pkgs
, pkg-config
, libxcb
# shell scripts stuff # shell scripts stuff
, makeWrapper , makeWrapper
, sshuttle , sshuttle
@ -11,17 +9,19 @@
, 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
, libsForQt5 , xmessage
, imagemagick
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -30,23 +30,16 @@ stdenv.mkDerivation rec {
src = ./utils; src = ./utils;
nativeBuildInputs = [ makeWrapper pkg-config libxcb ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ libxcb bash feh xrandr jq curl fzy ytfzf ffmpeg sshuttle svkbd scrcpy xkbset rbw xclip libsForQt5.kolourpaint ]; buildInputs = [ bash feh xrandr jq curl fzy ytfzf sshuttle svkbd scrcpy rbw xclip ffcast xkbset xmessage imagemagick ];
buildPhase = ''
ls
make
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
for i in $(ls $src/sh); do for i in $(ls $src/); do
cp $src/sh/$i $out/bin cp $src/$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 ytfzf ffmpeg sshuttle svkbd scrcpy libsForQt5.kolourpaint ]} 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 ]}
done done
cp c/status/main $out/bin/statusbar
''; '';
} }

View File

@ -1,3 +0,0 @@
.PHONY: main
main:
make -C c/status -f Makefile

View File

@ -1,5 +0,0 @@
TODO LIST
---------
- fix paste
- make the c programs less buggy and let them not suck as much

View File

@ -1,2 +0,0 @@
main
*.o

View File

@ -1,9 +0,0 @@
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

View File

@ -1,4 +0,0 @@
status
------
a simple statusbar script thing (tm)

View File

@ -1,38 +0,0 @@
#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;
}

View File

@ -1,6 +0,0 @@
#ifndef STATUS_BATTERY_H
#define STATUS_BATTERY_H
int mod_battery(char *config, char *name, char *pipename);
#endif

View File

@ -1,48 +0,0 @@
#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;
}

View File

@ -1,6 +0,0 @@
#ifndef STATUS_BATTSTAT_H
#define STATUS_BATTSTAT_H
int mod_battstatus(char *config, char *name, char *pipename);
#endif

View File

@ -1,73 +0,0 @@
#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;
}

View File

@ -1,6 +0,0 @@
#ifndef STATUS_BSPWM_H
#define STATUS_BSPWM_H
int mod_bspwm(char *config, char *name, char *pipename);
#endif

View File

@ -1,21 +0,0 @@
#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

View File

@ -1,88 +0,0 @@
#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;
}

View File

@ -1,35 +0,0 @@
#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;
}

View File

@ -1,6 +0,0 @@
#ifndef STATUS_MESSAGE_H
#define STATUS_MESSAGE_H
int mod_message(char *config, char *name, char *pipename);
#endif

View File

@ -1,9 +0,0 @@
with import <nixpkgs> {};
pkgs.mkShell {
nativeBuildInputs = [
gdb
gnumake
pkg-config
xorg.libxcb
];
}

View File

@ -1,27 +0,0 @@
#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);
}
}

View File

@ -1,6 +0,0 @@
#ifndef STATUS_TIME_H
#define STATUS_TIME_H
int mod_time(char *config, char *name, char *pipename);
#endif

45
builds/utils/capture Executable file
View File

@ -0,0 +1,45 @@
#!/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

View File

@ -3,6 +3,8 @@
set -x set -x
[ "$1" = "-h" ] && echo "use DISP_ACCESS_IP to control sshfs conn ip" && exit 0
set_walls() { set_walls() {
for i in $(xrandr | grep ' connected' | cut -d' ' -f1); do for i in $(xrandr | grep ' connected' | cut -d' ' -f1); do
xwallpaper --output $i --zoom ~/.local/share/pape.jpg xwallpaper --output $i --zoom ~/.local/share/pape.jpg
@ -11,6 +13,7 @@ set_walls() {
screensaver () { screensaver () {
pkill xscreensaver pkill xscreensaver
mkdir -p ~/.config/xscreensaver
HOME=".config/xscreensaver" xscreensaver --no-splash & 2>&1 > /dev/null HOME=".config/xscreensaver" xscreensaver --no-splash & 2>&1 > /dev/null
} }
@ -52,53 +55,62 @@ case "$(hostname)" in
bspc monitor VGA-1 -d 1 3 5 7 9 bspc monitor VGA-1 -d 1 3 5 7 9
bspc monitor HDMI-1 -d 2 4 6 8 0 bspc monitor HDMI-1 -d 2 4 6 8 0
;; ;;
"aristotle")
bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9
;;
"mlg") "mlg")
case "$1" in case "$1" in
"invert") "invert")
xrandr \ xrandr \
--output HDMI-0 --mode 1920x1080 --pos 3840x0 --rotate right --rate 60 \
--output DP-0 --off \
--output DP-1-2 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \
--output DP-1-1 --mode 1920x1080 --pos 1920x352 --rotate normal --rate 180
bspc monitor DP-1-2 -d 1 3 5 7
bspc monitor DP-1-1 -d 2 4 6 8
bspc monitor HDMI-0 -d 9
;;
*)
xrandr \
--output HDMI-0 --mode 1920x1080 --pos 3840x0 --rotate right --rate 60 \
--output DP-0 --off \ --output DP-0 --off \
--output DP-1-1 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \ --output DP-1-1 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \
--output DP-1-2 --mode 1920x1080 --pos 1920x352 --rotate normal --rate 180 --output DP-1-2 --mode 1920x1080 --pos 1920x352 --rotate normal --rate 180
bspc monitor DP-1-1 -d 1 3 5 7 bspc monitor DP-1-1 -d 1 3 5 7
bspc monitor DP-1-2 -d 2 4 6 8 bspc monitor DP-1-2 -d 2 4 6 8
bspc monitor HDMI-0 -d 9 ;;
"solo")
bspc monitor DP-0 -d 1 2 3 4 5 6 7 8 9
;;
*)
xrandr \
--output DP-0 --off \
--output DP-1-2 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \
--output DP-1-1 --mode 1920x1080 --pos 1920x352 --rotate normal --rate 180
bspc monitor DP-1-2 -d 1 3 5 7
bspc monitor DP-1-1 -d 2 4 6 8
;; ;;
esac esac
xinput set-prop 'INSTANT USB GAMING MOUSE ' 'libinput Accel Speed' -1 xinput set-prop 'INSTANT USB GAMING MOUSE ' 'libinput Accel Speed' -1
# setup synchronization # setup synchronization
# check if we have another IP defined
if [ ! -z "$DISP_ACCESS_IP" ]; then
target="$DISP_ACCESS_IP"
else
target=x230t
fi
pkill sshfs pkill sshfs
rm $HOME/doc # this is safe, as doc is a dir if it mattered, rm $HOME/doc # this is safe, as doc is a dir if it mattered,
# but it's just a link, so it's a regular file. # but it's just a link, so it's a regular file.
# in conclusion, good either way # in conclusion, good either way
mkdir -p $HOME/.cache/mount_point mkdir -p $HOME/.cache/mount_point
sshfs usr@x230t:/home/usr/doc $HOME/.cache/mount_point sshfs "usr@$target:/home/usr/doc" $HOME/.cache/mount_point -o ConnectTimeout=1
ln -sf $HOME/.cache/mount_point $HOME/doc ln -sf $HOME/.cache/mount_point $HOME/doc
rm $HOME/.thunderbird # see previous comment rm $HOME/.thunderbird # see previous comment
mkdir -p $HOME/.cache/mount_point3 mkdir -p $HOME/.cache/mount_point3
sshfs usr@x230t:/home/usr/.thunderbird $HOME/.cache/mount_point3 sshfs "usr@$target:/home/usr/.thunderbird" $HOME/.cache/mount_point3 -o ConnectTimeout=1
ln -sf $HOME/.cache/mount_point3 $HOME/.thunderbird ln -sf $HOME/.cache/mount_point3 $HOME/.thunderbird
rm $HOME/Mail rm $HOME/Mail
mkdir -p $HOME/.cache/mount_point4 mkdir -p $HOME/.cache/mount_point4
sshfs usr@x230t:/home/usr/Mail $HOME/.cache/mount_point4 sshfs "usr@$target:/home/usr/Mail" $HOME/.cache/mount_point4 -o ConnectTimeout=1
ln -sf $HOME/.cache/mount_point4 $HOME/Mail ln -sf $HOME/.cache/mount_point4 $HOME/Mail
rm $HOME/vdir rm $HOME/vdir
mkdir -p $HOME/.cache/mount_point5 mkdir -p $HOME/.cache/mount_point5
sshfs usr@x230t:/home/usr/vdir $HOME/.cache/mount_point5 sshfs "usr@$target:/home/usr/vdir" $HOME/.cache/mount_point5 -o ConnectTimeout=1
ln -sf $HOME/.cache/mount_point5 $HOME/vdir ln -sf $HOME/.cache/mount_point5 $HOME/vdir
;; ;;
@ -134,11 +146,50 @@ case "$(hostname)" in
;; ;;
esac esac
;; ;;
"copernicus")
case "$1" in
"tv")
xrandr --output HDMI-0 --off \
--output DP-0 --off \
--output DP-1 --off \
--output DP-2 --off \
--output DP-3 --off \
--output DP-4 --off \
--output DP-5 --off \
--output DP-1-1 --off \
--output HDMI-1-1 --off \
--output DP-1-2 --off \
--output HDMI-1-2 --primary --mode 1920x1080 --pos 0x0 --rotate normal
bspc monitor HDMI-1-2 -d 1 2 3 4 5 6 7 8 9
;;
*)
xinput set-prop 'INSTANT USB GAMING MOUSE ' 'libinput Accel Speed' -1
xrandr \
--output HDMI-0 --primary --mode 1920x1080 --pos 1920x1080 --rotate normal --rate 180 \
--output DP-0 --mode 1920x1080 --pos 0x1080 --rotate normal --rate 180 \
--output DP-1 --off \
--output DP-2 --mode 1920x1080 --pos 0x0 --rotate normal \
--output DP-3 --off \
--output DP-4 --off \
--output DP-5 --off \
--output DP-1-1 --off \
--output HDMI-1-1 --off \
--output HDMI-1-2 --mode 1920x1080 --pos 3840x485 --rotate normal \
--output DP-1-2 --mode 1920x1080 --pos 1920x0 --rotate normal
bspc monitor DP-0 -d 1 3 5
bspc monitor HDMI-0 -d 2 4 6
bspc monitor DP-2 -d 7
bspc monitor DP-1-2 -d 8
bspc monitor HDMI-1-2 -d 9
;;
esac
dunst & disown
phone pair & disown
;;
esac esac
# initial post-wm setup # initial post-wm setup
keyboard keyboard
statuswrap statusbar start_statusbars
set_walls set_walls
screensaver screensaver

23
builds/utils/do_backup Executable file
View File

@ -0,0 +1,23 @@
#!/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"

View File

@ -1,26 +0,0 @@
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')

19
builds/utils/git-rbw-wrap Executable file
View File

@ -0,0 +1,19 @@
#!/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

3
builds/utils/is_school Executable file
View File

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

43
builds/utils/khalmacs Executable file
View File

@ -0,0 +1,43 @@
#!/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

View File

@ -1,32 +0,0 @@
.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

View File

@ -1,11 +0,0 @@
.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.

View File

@ -1,87 +0,0 @@
.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

View File

@ -1,30 +0,0 @@
.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>

View File

@ -1,10 +0,0 @@
.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

11
builds/utils/mass_delete Executable file
View File

@ -0,0 +1,11 @@
#!/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

16
builds/utils/mass_rename Executable file
View File

@ -0,0 +1,16 @@
#!/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

Some files were not shown because too many files have changed in this diff Show More