mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 10:30:44 +02:00
Auto: cleanup-2026-05-18T16-56-07Z
This commit is contained in:
@@ -14,28 +14,28 @@ writeShellApplication {
|
||||
];
|
||||
text = ''
|
||||
|
||||
# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down
|
||||
until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \
|
||||
ping -c1 -W1 8.8.8.8 >/dev/null 2>&1
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down
|
||||
until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \
|
||||
ping -c1 -W1 8.8.8.8 >/dev/null 2>&1
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
set +e
|
||||
set +e
|
||||
|
||||
output=$(rclone lsd kdrive: 2>&1)
|
||||
status=$?
|
||||
output=$(rclone lsd kdrive: 2>&1)
|
||||
status=$?
|
||||
|
||||
set -e
|
||||
set -e
|
||||
|
||||
if [ $status -eq 0 ]; then
|
||||
echo "kdrive OK"
|
||||
else
|
||||
echo "kdrive rclone failed with error: $output"
|
||||
notify-send "rclone kdrive failed" "$output"
|
||||
matrix-commander-rs --verbose -m "rclone kdrive failed.<br>Error: <pre>$output</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||
--html \
|
||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||
fi
|
||||
if [ $status -eq 0 ]; then
|
||||
echo "kdrive OK"
|
||||
else
|
||||
echo "kdrive rclone failed with error: $output"
|
||||
notify-send "rclone kdrive failed" "$output"
|
||||
matrix-commander-rs --verbose -m "rclone kdrive failed.<br>Error: <pre>$output</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||
--html \
|
||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
zsh,
|
||||
kitty,
|
||||
fzf,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
|
||||
{
|
||||
writeShellApplication,
|
||||
hyprland,
|
||||
gawk,
|
||||
libnotify,
|
||||
...
|
||||
}:
|
||||
{writeShellApplication, ...}:
|
||||
writeShellApplication {
|
||||
name = "custom-performance";
|
||||
runtimeInputs = [
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
{ pkgs, python3Packages, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
python3Packages,
|
||||
...
|
||||
}:
|
||||
pkgs.writers.writePython3Bin "custom-syllabes" {
|
||||
libraries = [
|
||||
python3Packages.pyphen
|
||||
];
|
||||
} ''
|
||||
import sys
|
||||
import pyphen
|
||||
import sys
|
||||
import pyphen
|
||||
|
||||
dic = pyphen.Pyphen(lang="fr")
|
||||
dic = pyphen.Pyphen(lang="fr")
|
||||
|
||||
text = sys.stdin.read().strip()
|
||||
text = sys.stdin.read().strip()
|
||||
|
||||
chunks = []
|
||||
total = 0
|
||||
chunks = []
|
||||
total = 0
|
||||
|
||||
for w in text.split():
|
||||
hyphenated = dic.inserted(w)
|
||||
parts = hyphenated.split("-")
|
||||
chunks.append("/".join(parts))
|
||||
total += len(parts)
|
||||
for w in text.split():
|
||||
hyphenated = dic.inserted(w)
|
||||
parts = hyphenated.split("-")
|
||||
chunks.append("/".join(parts))
|
||||
total += len(parts)
|
||||
|
||||
print(f"{total} ({'/'.join(chunks)})")
|
||||
print(f"{total} ({'/'.join(chunks)})")
|
||||
''
|
||||
/* used IPA but had a deprecated dependency
|
||||
/*
|
||||
used IPA but had a deprecated dependency
|
||||
{ pkgs, python3Packages, ... }:
|
||||
|
||||
pkgs.writers.writePython3Bin "custom-syllabes" {
|
||||
@@ -56,8 +60,10 @@ for word in text.split():
|
||||
chunks.append(f"{word}/{ipa}")
|
||||
|
||||
print(f"{total} ({' | '.join(chunks)})")
|
||||
''*/
|
||||
/*{ pkgs, ... }:
|
||||
''
|
||||
*/
|
||||
/*
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
lexique = pkgs.fetchurl {
|
||||
@@ -170,4 +176,6 @@ def main():
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
''*/
|
||||
''
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user