Compare commits

..

No commits in common. "d2237c0a1265d0f9ba42e544d77f8b9228679073" and "62ed33c82c57ff254e33905b94b06bfa0e6cc75f" have entirely different histories.

13 changed files with 392 additions and 366 deletions

View file

@ -13,3 +13,4 @@ jobs:
run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux" --attic-cache "nixfleet" --skip-cached --result-file result.json || true run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux" --attic-cache "nixfleet" --skip-cached --result-file result.json || true
- name: Report checks - name: Report checks
run: report-checks run: report-checks

View file

@ -1,7 +1,7 @@
name: update-flake-lock name: update-flake-lock
on: on:
schedule: schedule:
- cron: "0 15 * * *" # daily at 15:00 - cron: '0 15 * * *' # daily at 15:00
jobs: jobs:
lockfile: lockfile:

View file

@ -19,21 +19,7 @@
flakeCheck = true; flakeCheck = true;
programs = { programs = {
nixfmt.enable = true; nixfmt.enable = true;
prettier.enable = true;
black.enable = true;
shfmt.enable = true;
}; };
settings.global.excludes = [
"*.age"
"*.svg"
"*.png"
"*.jpg"
"*.bin"
"*.el"
"*.org"
".envrc"
"*.conf"
];
}; };
pre-commit.settings = { pre-commit.settings = {

View file

@ -1,7 +1,6 @@
:root { :root { /* Catppuccin Colors */
/* Catppuccin Colors */
--bg: #1e1e2e; --bg: #1e1e2e;
--currentline: #302d41; --currentline: #302D41;
--fg: #d9e0ee; --fg: #d9e0ee;
--comment: #575268; --comment: #575268;
--flamingo: #f2cdcd; --flamingo: #f2cdcd;
@ -111,10 +110,7 @@
min-height: unset; min-height: unset;
} }
#completions table tr td.prefix, #completions table tr td.prefix,#completions table tr td.privatewindow,#completions table tr td.container,#completions table tr td.icon {
#completions table tr td.privatewindow,
#completions table tr td.container,
#completions table tr td.icon {
display: none; display: none;
} }
@ -125,15 +121,13 @@
table-layout: unset; table-layout: unset;
} }
#completions table tr .title, #completions table tr .title, #completions table tr td.excmd {
#completions table tr td.excmd {
width: 50%; width: 50%;
padding-left: 1rem; padding-left: 1rem;
color: var(--blue); color: var(--blue);
} }
#completions table tr .content, #completions table tr .content, #completions table tr td.documentation {
#completions table tr td.documentation {
padding-right: 1rem; padding-right: 1rem;
} }
@ -144,7 +138,7 @@
} }
#completions table tr td { #completions table tr td {
padding: 0.5rem 0; padding: .5rem 0;
} }
#completions .sectionHeader { #completions .sectionHeader {

View file

@ -1,21 +1,16 @@
/* * Do not remove the @namespace line -- it's required for correct functioning */ /* * Do not remove the @namespace line -- it's required for correct functioning */
/* set default namespace to XUL */ /* set default namespace to XUL */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Remove Back button when there's nothing to go Back to */ /* Remove Back button when there's nothing to go Back to */
#back-button[disabled="true"] { #back-button[disabled="true"] { display: none; }
display: none;
}
/* Remove Forward button when there's nothing to go Forward to */ /* Remove Forward button when there's nothing to go Forward to */
#forward-button[disabled="true"] { #forward-button[disabled="true"] { display: none; }
display: none;
}
/* Remove Home button (never use it) */ /* Remove Home button (never use it) */
#home-button { #home-button { display: none; }
display: none;
}
.titlebar-spacer { .titlebar-spacer {
display: none !important; display: none !important;
@ -32,8 +27,7 @@ toolbarbutton.bookmark-item:not(.subviewbutton) {
} }
/* Remove whitespace in toolbar */ /* Remove whitespace in toolbar */
#nav-bar toolbarpaletteitem[id^="wrapper-customizableui-special-spring"], #nav-bar toolbarpaletteitem[id^="wrapper-customizableui-special-spring"], #nav-bar toolbarspring {
#nav-bar toolbarspring {
display: none; display: none;
} }

View file

@ -3,6 +3,7 @@
border-radius: 0; border-radius: 0;
min-height: 0; min-height: 0;
font-family: Fira Code; font-family: Fira Code;
} }
window#waybar { window#waybar {
@ -22,8 +23,7 @@ window#waybar {
box-shadow: inset 0 -5px red; box-shadow: inset 0 -5px red;
} }
#workspaces button.focused, #workspaces button.focused, #workspaces button:hover {
#workspaces button:hover {
box-shadow: inset 0 -5px white; box-shadow: inset 0 -5px white;
} }
@ -39,16 +39,7 @@ window#waybar {
/* color: @unfocused_borders; */ /* color: @unfocused_borders; */
} }
#pulseaudio, #pulseaudio, #network, #cpu, #memory, #disk, #temperature, #battery, #language, #clock, #tray {
#network,
#cpu,
#memory,
#disk,
#temperature,
#battery,
#language,
#clock,
#tray {
margin: 0 4px; margin: 0 4px;
padding: 0 2px; padding: 0 2px;
} }

View file

@ -0,0 +1,26 @@
{pkgs, ...}: {
# $ nix-env -qaP | grep wget
environment.systemPackages =
[ pkgs.vim
];
# # Auto upgrade nix package and the daemon service.
# services.nix-daemon.enable = true;
# # nix.package = pkgs.nix;
# # Necessary for using flakes on this system.
# nix.settings.experimental-features = "nix-command flakes";
# # Create /etc/zshrc that loads the nix-darwin environment.
# programs.zsh.enable = true; # default shell on catalina
# # programs.fish.enable = true;
# # # Set Git commit hash for darwin-version.
# # system.configurationRevision = self.rev or self.dirtyRev or null;
# # Used for backwards compatibility, please read the changelog before changing.
# # $ darwin-rebuild changelog
# system.stateVersion = 4;
# # The platform the configuration will be used on.
}

View file

@ -4,9 +4,7 @@
@import url("cgit.css"); @import url("cgit.css");
* { * { line-height: 1.25em; }
line-height: 1.25em;
}
div#cgit { div#cgit {
max-width: 117ch; max-width: 117ch;
@ -52,106 +50,37 @@ div#cgit div#summary {
} }
/* for hilex(1) */ /* for hilex(1) */
div#cgit pre .Ke { div#cgit pre .Ke { color: dimgray; }
color: dimgray; div#cgit pre .Ma { color: green; }
} div#cgit pre .Co { color: navy; }
div#cgit pre .Ma { div#cgit pre .St { color: teal; }
color: green; div#cgit pre .Fo { color: teal; font-weight: bold; }
} div#cgit pre .Su { color: olive; }
div#cgit pre .Co {
color: navy;
}
div#cgit pre .St {
color: teal;
}
div#cgit pre .Fo {
color: teal;
font-weight: bold;
}
div#cgit pre .Su {
color: olive;
}
/* for htagml(1) */ /* for htagml(1) */
div#cgit pre a.tag { div#cgit pre a.tag { color: inherit; text-decoration: underline; }
color: inherit; div#cgit pre a.tag:target { color: goldenrod; outline: none; }
text-decoration: underline;
}
div#cgit pre a.tag:target {
color: goldenrod;
outline: none;
}
/* for mandoc(1) */ /* for mandoc(1) */
table.head, table.head, table.foot { width: 100%; }
table.foot { td.head-rtitle, td.foot-os { text-align: right; }
width: 100%; td.head-vol { text-align: center; }
} div.Pp { margin: 1ex 0ex; }
td.head-rtitle, div.Nd, div.Bf, div.Op { display: inline; }
td.foot-os { span.Pa, span.Ad { font-style: italic; }
text-align: right; span.Ms { font-weight: bold; }
} dl.Bl-diag > dt { font-weight: bold; }
td.head-vol { code.Nm, code.Fl, code.Cm, code.Ic, code.In, code.Fd, code.Fn,
text-align: center; code.Cd { font-weight: bold; font-family: inherit; }
}
div.Pp {
margin: 1ex 0ex;
}
div.Nd,
div.Bf,
div.Op {
display: inline;
}
span.Pa,
span.Ad {
font-style: italic;
}
span.Ms {
font-weight: bold;
}
dl.Bl-diag > dt {
font-weight: bold;
}
code.Nm,
code.Fl,
code.Cm,
code.Ic,
code.In,
code.Fd,
code.Fn,
code.Cd {
font-weight: bold;
font-family: inherit;
}
h1.Sh { h1.Sh { font-size: 1.5em; }
font-size: 1.5em; table.Nm td:first-child { padding-right: 1ch; }
} code.Fl { white-space: nowrap; }
table.Nm td:first-child { span.RsT { font-style: italic; }
padding-right: 1ch; dl.Bl-tag:not(.Bl-compact) > dt { margin-top: 1em; }
} ul.Bl-bullet:not(.Bl-compact) > li { margin-top: 1em; }
code.Fl { div.Bd-indent { margin-left: 4ch; }
white-space: nowrap; table.Bl-column { width: 100%; }
} table.foot { margin-top: 1em; }
span.RsT {
font-style: italic;
}
dl.Bl-tag:not(.Bl-compact) > dt {
margin-top: 1em;
}
ul.Bl-bullet:not(.Bl-compact) > li {
margin-top: 1em;
}
div.Bd-indent {
margin-left: 4ch;
}
table.Bl-column {
width: 100%;
}
table.foot {
margin-top: 1em;
}
div#cgit a.permalink { div#cgit a.permalink { color: inherit; }
color: inherit;
}

View file

@ -13,7 +13,7 @@ class MaildirHandler(FileSystemEventHandler):
def on_created(self, event): def on_created(self, event):
if not event.is_directory: if not event.is_directory:
print(f"New email found: {event.src_path}") print(f"New email found: {event.src_path}")
with open(event.src_path, "r") as email_file: with open(event.src_path, 'r') as email_file:
msg = message_from_file(email_file) msg = message_from_file(email_file)
print(f'{msg["From"]}: {msg["Subject"]}') print(f'{msg["From"]}: {msg["Subject"]}')
self.notifier.send( self.notifier.send(
@ -21,13 +21,16 @@ class MaildirHandler(FileSystemEventHandler):
message=msg["Subject"], message=msg["Subject"],
sound=DEFAULT_SOUND, sound=DEFAULT_SOUND,
icon=Icon(name="mail-message-new"), icon=Icon(name="mail-message-new"),
timeout=20, timeout=20
) )
if __name__ == "__main__": if __name__ == "__main__":
maildir_new = os.path.expanduser(os.environ.get("INBOX_NEW")) maildir_new = os.path.expanduser(os.environ.get("INBOX_NEW"))
notifier = DesktopNotifierSync(app_name="Mails", notification_limit=10) notifier = DesktopNotifierSync(
app_name="Mails",
notification_limit=10
)
event_handler = MaildirHandler(notifier) event_handler = MaildirHandler(notifier)
observer = Observer() observer = Observer()

View file

@ -4,20 +4,18 @@ from pyforgejo.models.create_status_option import CreateStatusOption
import json import json
from os import environ from os import environ
client = AuthenticatedClient( client = AuthenticatedClient(base_url=environ["GITHUB_API_URL"], token=environ["GITHUB_TOKEN"])
base_url=environ["GITHUB_API_URL"], token=environ["GITHUB_TOKEN"]
)
with open("result.json", "r") as file: with open('result.json', 'r') as file:
data = json.load(file) data = json.load(file)
print("Reporting statuses acording to the following result.json") print("Reporting statuses acording to the following result.json")
print(json.dumps(data, indent=2)) print(json.dumps(data, indent=2))
for result in data["results"]: for result in data['results']:
attr = result["attr"] attr = result['attr']
success = result["success"] success = result['success']
type = result["type"] type = result['type']
print(f"Report status success={success} for {type} {attr}") print(f"Report status success={success} for {type} {attr}")
response = repo_create_status.sync_detailed( response = repo_create_status.sync_detailed(
owner="aciceri", owner="aciceri",
@ -28,10 +26,8 @@ for result in data["results"]:
context=type, context=type,
description=attr, description=attr,
target_url="https://git.aciceri.dev", # FIXME target_url="https://git.aciceri.dev", # FIXME
state=( state="success" if success else "failure" # may be pending,success,failure,error_message
"success" if success else "failure" )
), # may be pending,success,failure,error_message
),
) )
print("Done reporting statuses") print("Done reporting statuses")

View file

@ -66,19 +66,8 @@ class GarminCollector:
def collect(self): def collect(self):
try: try:
body = self.api.get_daily_weigh_ins(today.isoformat())["totalAverage"] body = self.api.get_daily_weigh_ins(today.isoformat())["totalAverage"]
metric_gauge = GaugeMetricFamily( metric_gauge = GaugeMetricFamily("body_composition", "Body composition and weight", labels=["metric"])
"body_composition", "Body composition and weight", labels=["metric"] for k in ["weight", "bmi", "bodyFat", "bodyWater", "boneMass", "muscleMass", "physiqueRating", "visceralFat"]:
)
for k in [
"weight",
"bmi",
"bodyFat",
"bodyWater",
"boneMass",
"muscleMass",
"physiqueRating",
"visceralFat",
]:
metric_gauge.add_metric([k], body[k]) metric_gauge.add_metric([k], body[k])
except Exception as e: except Exception as e:
print(f"Something went wrong while fetching body composition data\n{e}") print(f"Something went wrong while fetching body composition data\n{e}")
@ -90,4 +79,4 @@ if __name__ == "__main__":
registry = CollectorRegistry() registry = CollectorRegistry()
registry.register(GarminCollector()) registry.register(GarminCollector())
push_to_gateway(gateway_address, job="garmin", registry=registry) push_to_gateway(gateway_address, job='garmin', registry=registry)

View file

@ -653,11 +653,25 @@
}, },
"targets": { "targets": {
"default": { "default": {
"aiohttp": ["aiosignal", "attrs", "frozenlist", "multidict", "yarl"], "aiohttp": [
"aiosignal": ["frozenlist"], "aiosignal",
"alembic": ["mako", "sqlalchemy", "typing-extensions"], "attrs",
"frozenlist",
"multidict",
"yarl"
],
"aiosignal": [
"frozenlist"
],
"alembic": [
"mako",
"sqlalchemy",
"typing-extensions"
],
"annotated-types": [], "annotated-types": [],
"ansible": ["ansible-core"], "ansible": [
"ansible-core"
],
"ansible-core": [ "ansible-core": [
"cryptography", "cryptography",
"jinja2", "jinja2",
@ -665,27 +679,45 @@
"pyyaml", "pyyaml",
"resolvelib" "resolvelib"
], ],
"anyio": ["idna", "sniffio"], "anyio": [
"idna",
"sniffio"
],
"argcomplete": [], "argcomplete": [],
"attrs": [], "attrs": [],
"beautifulsoup4": ["soupsieve"], "beautifulsoup4": [
"build": ["packaging", "pyproject-hooks"], "soupsieve"
],
"build": [
"packaging",
"pyproject-hooks"
],
"certifi": [], "certifi": [],
"cffi": ["pycparser"], "cffi": [
"pycparser"
],
"chardet": [], "chardet": [],
"charset-normalizer": [], "charset-normalizer": [],
"click": [], "click": [],
"colorclass": [], "colorclass": [],
"compressed-rtf": [], "compressed-rtf": [],
"cryptography": ["cffi"], "cryptography": [
"dataclasses-json": ["marshmallow", "typing-inspect"], "cffi"
],
"dataclasses-json": [
"marshmallow",
"typing-inspect"
],
"distro": [], "distro": [],
"dnspython": [], "dnspython": [],
"docutils": [], "docutils": [],
"docx2txt": [], "docx2txt": [],
"easygui": [], "easygui": [],
"ebcdic": [], "ebcdic": [],
"email-validator": ["dnspython", "idna"], "email-validator": [
"dnspython",
"idna"
],
"et-xmlfile": [], "et-xmlfile": [],
"extract-msg": [ "extract-msg": [
"beautifulsoup4", "beautifulsoup4",
@ -699,12 +731,25 @@
"frozenlist": [], "frozenlist": [],
"greenlet": [], "greenlet": [],
"h11": [], "h11": [],
"httpcore": ["certifi", "h11"], "httpcore": [
"httpx": ["anyio", "certifi", "httpcore", "idna", "sniffio"], "certifi",
"h11"
],
"httpx": [
"anyio",
"certifi",
"httpcore",
"idna",
"sniffio"
],
"idna": [], "idna": [],
"iniconfig": [], "iniconfig": [],
"jinja2": ["markupsafe"], "jinja2": [
"jsonpatch": ["jsonpointer"], "markupsafe"
],
"jsonpatch": [
"jsonpointer"
],
"jsonpointer": [], "jsonpointer": [],
"langchain": [ "langchain": [
"aiohttp", "aiohttp",
@ -740,21 +785,42 @@
"pyyaml", "pyyaml",
"tenacity" "tenacity"
], ],
"langchain-openai": ["langchain-core", "openai", "tiktoken"], "langchain-openai": [
"langchain-text-splitters": ["langchain-core"], "langchain-core",
"langsmith": ["orjson", "pydantic", "requests"], "openai",
"tiktoken"
],
"langchain-text-splitters": [
"langchain-core"
],
"langsmith": [
"orjson",
"pydantic",
"requests"
],
"lark": [], "lark": [],
"lxml": [], "lxml": [],
"mako": ["markupsafe"], "mako": [
"markdown-it-py": ["mdurl"], "markupsafe"
],
"markdown-it-py": [
"mdurl"
],
"markupsafe": [], "markupsafe": [],
"marshmallow": ["packaging"], "marshmallow": [
"packaging"
],
"mdurl": [], "mdurl": [],
"msoffcrypto-tool": ["cryptography", "olefile"], "msoffcrypto-tool": [
"cryptography",
"olefile"
],
"multidict": [], "multidict": [],
"mypy-extensions": [], "mypy-extensions": [],
"names": [], "names": [],
"numexpr": ["numpy"], "numexpr": [
"numpy"
],
"numpy": [], "numpy": [],
"olefile": [], "olefile": [],
"oletools": [ "oletools": [
@ -774,11 +840,16 @@
"tqdm", "tqdm",
"typing-extensions" "typing-extensions"
], ],
"openpyxl": ["et-xmlfile"], "openpyxl": [
"et-xmlfile"
],
"orjson": [], "orjson": [],
"packaging": [], "packaging": [],
"pcodedmp": [], "pcodedmp": [],
"pdfminer-six": ["charset-normalizer", "cryptography"], "pdfminer-six": [
"charset-normalizer",
"cryptography"
],
"pillow": [], "pillow": [],
"pip": [], "pip": [],
"pip-tools": [ "pip-tools": [
@ -790,31 +861,68 @@
"wheel" "wheel"
], ],
"pluggy": [], "pluggy": [],
"prompt-toolkit": ["wcwidth"], "prompt-toolkit": [
"wcwidth"
],
"pycparser": [], "pycparser": [],
"pydantic": ["annotated-types", "pydantic-core", "typing-extensions"], "pydantic": [
"pydantic-core": ["typing-extensions"], "annotated-types",
"pydantic-core",
"typing-extensions"
],
"pydantic-core": [
"typing-extensions"
],
"pygments": [], "pygments": [],
"pyparsing": [], "pyparsing": [],
"pyperclip": [], "pyperclip": [],
"pyproject-hooks": [], "pyproject-hooks": [],
"pytest": ["iniconfig", "packaging", "pluggy"], "pytest": [
"pytest-datadir": ["pytest"], "iniconfig",
"python-frontmatter": ["pyyaml"], "packaging",
"python-pptx": ["lxml", "pillow", "xlsxwriter"], "pluggy"
],
"pytest-datadir": [
"pytest"
],
"python-frontmatter": [
"pyyaml"
],
"python-pptx": [
"lxml",
"pillow",
"xlsxwriter"
],
"pyyaml": [], "pyyaml": [],
"red-black-tree-mod": [], "red-black-tree-mod": [],
"regex": [], "regex": [],
"requests": ["certifi", "charset-normalizer", "idna", "urllib3"], "requests": [
"certifi",
"charset-normalizer",
"idna",
"urllib3"
],
"resolvelib": [], "resolvelib": [],
"rich": ["markdown-it-py", "pygments"], "rich": [
"rtfde": ["lark", "oletools"], "markdown-it-py",
"pygments"
],
"rtfde": [
"lark",
"oletools"
],
"setuptools": [], "setuptools": [],
"six": [], "six": [],
"sniffio": [], "sniffio": [],
"soupsieve": [], "soupsieve": [],
"speechrecognition": ["requests", "typing-extensions"], "speechrecognition": [
"sqlalchemy": ["greenlet", "typing-extensions"], "requests",
"typing-extensions"
],
"sqlalchemy": [
"greenlet",
"typing-extensions"
],
"tenacity": [], "tenacity": [],
"textract": [ "textract": [
"argcomplete", "argcomplete",
@ -829,17 +937,26 @@
"speechrecognition", "speechrecognition",
"xlrd" "xlrd"
], ],
"tiktoken": ["regex", "requests"], "tiktoken": [
"regex",
"requests"
],
"tqdm": [], "tqdm": [],
"typing-extensions": [], "typing-extensions": [],
"typing-inspect": ["mypy-extensions", "typing-extensions"], "typing-inspect": [
"mypy-extensions",
"typing-extensions"
],
"tzlocal": [], "tzlocal": [],
"urllib3": [], "urllib3": [],
"wcwidth": [], "wcwidth": [],
"wheel": [], "wheel": [],
"xlrd": [], "xlrd": [],
"xlsxwriter": [], "xlsxwriter": [],
"yarl": ["idna", "multidict"] "yarl": [
"idna",
"multidict"
]
}, },
"dev": {} "dev": {}
} }