Compare commits

...

2 Commits

Author SHA1 Message Date
soraefir db6662420c fastfetch 2026-06-14 16:01:13 +02:00
soraefir d5ea865a4e eww timings 2026-06-14 12:37:21 +02:00
16 changed files with 331 additions and 186 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{ ... }: { { ... }: {
imports = imports =
[ ./btop ./git ./helix ./kitty ./neofetch ./other ./starship ./zsh ]; [ ./btop ./git ./helix ./kitty ./fastfetch ./other ./starship ./zsh ];
} }
+115
View File
@@ -0,0 +1,115 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small",
"padding": {
"top": 2,
"right": 4
},
"color": {
"1": "blue",
"2": "white"
}
},
"display": {
"separator": " ",
"key": { "width": 16 },
"color": {
"separator": "90"
}
},
"modules": [
{
"type": "title",
"colorUser": "blue",
"colorAt": "90",
"colorHost": "cyan"
},
"separator",
{
"type": "os",
"key": "󱄅 os",
"keyColor": "blue",
"format": "{2} {8}"
},
{
"type": "kernel",
"key": "󰌽 kernel",
"keyColor": "blue",
"format": "{2}"
},
{
"type": "packages",
"key": "󰏗 pkgs",
"keyColor": "blue"
},
{
"type": "uptime",
"key": "󰅐 uptime",
"keyColor": "blue"
},
"break",
{
"type": "cpu",
"key": "󱛠 cpu",
"keyColor": "green",
"format": "{1} ({4}t @ {6})"
},
{
"type": "gpu",
"key": "󰍹 gpu",
"keyColor": "green",
"format": "{2} [{6}]"
},
{
"type": "memory",
"key": "󰑭 ram",
"keyColor": "green"
},
{
"type": "disk",
"key": "󰋊 disk",
"keyColor": "green",
"folders": "/"
},
"break",
{
"type": "wm",
"key": "󱂬 wm",
"keyColor": "yellow",
"format": "{2}"
},
{
"type": "terminal",
"key": "󰆍 terminal",
"keyColor": "yellow"
},
{
"type": "shell",
"key": "󱆃 shell",
"keyColor": "yellow"
},
"break",
{
"type": "command",
"key": "󰃑 installed",
"keyColor": "magenta",
"text": "birth=$(stat -c %W /); echo \"$(( ($(date +%s) - birth) / 86400 )) days\""
},
{
"type": "command",
"key": "󰜅 generation",
"keyColor": "magenta",
"text": "nixos-rebuild list-generations | awk '$NF == \"True\" {print $2, $3}' | xargs -I {} date -d \"{}\" +\"%s\" | awk '{diff=systime()-$1; if(diff<3600) printf \"%d mins\\n\", diff/60; else if(diff<86400) printf \"%.0f hours\\n\", diff/3600; else printf \"%.0f days\\n\", diff/86400}'"
},
"break",
{
"type": "colors",
"paddingLeft": 1,
"block": {
"width": 3,
"range": [0, 7]
}
}
]
}
+149
View File
@@ -0,0 +1,149 @@
{ pkgs, config, lib, ... }:
let
p = config.colorScheme.palette;
hexDigits = {
"0"=0; "1"=1; "2"=2; "3"=3; "4"=4; "5"=5; "6"=6; "7"=7;
"8"=8; "9"=9; "a"=10; "b"=11; "c"=12; "d"=13; "e"=14; "f"=15;
};
hexByte = h:
hexDigits.${lib.toLower (builtins.substring 0 1 h)} * 16 +
hexDigits.${lib.toLower (builtins.substring 1 1 h)};
rgb = hex:
let r = toString (hexByte (builtins.substring 0 2 hex));
g = toString (hexByte (builtins.substring 2 2 hex));
b = toString (hexByte (builtins.substring 4 2 hex));
in "${r};${g};${b}";
# in a JSON string → ESC; JSON custom module format uses this directly
blk = c: "\\u001b[38;2;${rgb c}m\\ue0b7\\ue0b5 \\u001b[0m";
row = cs: " " + builtins.concatStringsSep "" (map blk cs);
base = row [ p.base00 p.base01 p.base02 p.base03 p.base04 p.base05 p.base06 p.base07 ];
alt = row [ p.alt00 p.alt01 p.alt02 p.alt03 p.alt04 p.alt05 p.alt06 p.alt07 ];
high = row [ p.high08 p.high09 p.high0A p.high0B p.high0C p.high0D p.high0E p.high0F ];
low = row [ p.low08 p.low09 p.low0A p.low0B p.low0C p.low0D p.low0E p.low0F ];
# ── logo colors ── change $1 / $2 to any palette entry ───────────────────
logoColor1 = p.base07;
logoColor2 = p.base07;
# ─────────────────────────────────────────────────────────────────────────
in {
home.packages = with pkgs; [ fastfetch ];
xdg.configFile."neofetch/config.conf".source = ./config.conf;
xdg.configFile."fastfetch/logo.txt".source = ./logo.txt;
xdg.configFile."fastfetch/config.jsonc".text = ''
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "file",
"source": "~/.config/fastfetch/logo.txt",
"color": {
"1": "38;2;${rgb logoColor1}",
"2": "38;2;${rgb logoColor2}"
},
"padding": {
"top": 1,
"right": 4
}
},
"display": {
"separator": " ",
"key": { "width": 16 },
"color": {
"separator": "90"
}
},
"modules": [
{
"type": "title",
"colorUser": "blue",
"colorAt": "90",
"colorHost": "cyan"
},
"separator",
{
"type": "os",
"key": "󱄅 os",
"keyColor": "blue",
"format": "{2} {8}"
},
{
"type": "kernel",
"key": "󰌽 kernel",
"keyColor": "blue",
"format": "{2}"
},
{
"type": "packages",
"key": "󰏗 pkgs",
"keyColor": "blue"
},
{
"type": "uptime",
"key": "󰅐 uptime",
"keyColor": "blue"
},
"break",
{
"type": "cpu",
"key": "󱛠 cpu",
"keyColor": "green",
"format": "{1} ({4}t @ {6})"
},
{
"type": "gpu",
"key": "󰍹 gpu",
"keyColor": "green",
"format": "{2} [{6}]"
},
{
"type": "memory",
"key": "󰑭 ram",
"keyColor": "green"
},
{
"type": "disk",
"key": "󰋊 disk",
"keyColor": "green",
"folders": "/"
},
"break",
{
"type": "wm",
"key": "󱂬 wm",
"keyColor": "yellow",
"format": "{2}"
},
{
"type": "terminal",
"key": "󰆍 terminal",
"keyColor": "yellow"
},
{
"type": "shell",
"key": "󱆃 shell",
"keyColor": "yellow"
},
"break",
{
"type": "command",
"key": "󰃑 installed",
"keyColor": "magenta",
"text": "birth=$(stat -c %W /); echo \"$(( ($(date +%s) - birth) / 86400 )) days\""
},
{
"type": "command",
"key": "󰜅 generation",
"keyColor": "magenta",
"text": "nixos-rebuild list-generations | awk '$NF == \"True\" {print $2, $3}' | xargs -I {} date -d \"{}\" +\"%s\" | awk '{diff=systime()-$1; if(diff<3600) printf \"%d mins\\n\", diff/60; else if(diff<86400) printf \"%.0f hours\\n\", diff/3600; else printf \"%.0f days\\n\", diff/86400}'"
},
"break",
{ "type": "custom", "format": "${base}" },
{ "type": "custom", "format": "${alt}" },
{ "type": "custom", "format": "${high}" },
{ "type": "custom", "format": "${low}" }
]
}
'';
}
+14
View File
@@ -0,0 +1,14 @@
$2 $1⢀⣴⣦⡀
$2⢀⣴⣶⣿⣿⣿⣿⣷⣶⣦⣤⣀⡀ $1⢀⣴⣿⡿⠋
$2⢸⣿⣿⡿⠋⠉⠁⠉⠉⠉⠙⠛⠿⢷⣦⣄ $1⢀⣴⣿⡿⠋
$2⠘⣿⣿⣇ ⢀⣤⣤⣤⣤⣄⣀⠈⠙⠛$1⢀⣴⣿⡿⠋
$2 ⠘⣿⣿⣆ ⢸⣿⣿⠛⠛⠛⠛⠿⢃$1⣴⣿⡿⠋
$2 ⠈⢻⣿⣧⡀ ⠹⣿⣦⡀ $1⢀⣴⣿⡿⠛$2⠻⣷⣦⡀
$2 ⠙⠿⣿⣦⣄⠈⠙⢿⣷$2⣿⣿⣿$2⣿⣶⣄ ⠙⢿⣷⣄
$2 ⠈⠻⢿⣷⣦⣄⡈⠙⠛⠛⠋⠙⢿⣷⡀ ⠙⢿⣷⣄
$2 $1⢀⣴⣿⡿$2⠿⣿⣷⣶⣤⣤⣤⣼⣿⣷ ⠈⢻⣿⣦
$2 $1⢀⣴⣿⡿⠋ $2⠈⠉⠛⠛⠛⠛⠛⠁ ⣿⣿⡇
$2 $1⢀⣴⣿⡿⠋ $2⠠⢤⣀⣀⣀⣀⣀⣀⣤⣾⣿⣿⠇
$2 $1⠻⡿⠋ $2⠈⠉⠙⠛⠛⠛⠛⠛⠛⠁
-147
View File
@@ -1,147 +0,0 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "builtin", // Logo type: auto, builtin, small, file, etc.
// "source": "arch",
"width": 10,
"height": 10,
"padding": {
"top": 3,
"left": 2,
"right": 2
},
"color": {
"1": "blue",
"2": "white",
"3": "cyan"
}
},
"display": { /* Display settings */},
"modules": [
"break",
{
"type": "custom",
"format": "\u001b[90m┌──────────────────────Hardware──────────────────────┐"
},
{
"type": "host",
"key": "󰌢 PC",
"keyColor": "green",
"format": "{2}"
},
{
"type": "cpu",
"key": "│ ├󱛠 ",
"keyColor": "green",
"format": "{1} | {4} @{6}"
},
{
"type": "gpu",
"key": "│ ├󰍹 ",
"keyColor": "green",
"format": "{2} | {7}"
},
{
"type": "memory",
"key": "│ ├󰑭 ",
"keyColor": "green",
"format": "{2}"
},
// {
// "type": "disk",
// "key": "└ └󰋊 ",
// "keyColor": "green"
// },
{
"type": "custom",
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
},
"break",
{
"type": "custom",
"format": "\u001b[90m┌──────────────────────Software──────────────────────┐"
},
{
"type": "os",
"key": " OS",
"keyColor": "yellow",
"format": " {2} {8}"
},
{
"type": "kernel",
"key": "│ ├󰌽 ",
"keyColor": "yellow",
"format": "{1} {2}"
},
{
"type": "bios",
"key": "│ ├󰖡 ",
"keyColor": "yellow"
},
{
"type": "packages",
"key": "│ ├󰏗 ",
"keyColor": "yellow"
},
{
"type": "de",
"key": "󰧨 DE",
"keyColor": "blue",
"format": "{2} | {3}"
},
{
"type": "lm",
"key": "│ ├󰍁 ",
"keyColor": "blue",
"format": "{1} {2} {3}"
},
{
"type": "wm",
"key": "│ ├󱂬 ",
"keyColor": "blue",
"format": "{2} {5}"
},
{
"type": "custom",
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
},
"break",
{
"type": "custom",
"format": "\u001b[90m┌──────────────────────Age───────────────────────────┐"
},
{
"type": "command",
"key": " OS Age ",
"keyColor": "magenta",
"text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days"
},
{
"type": "command",
"key": " Update ",
"keyColor": "magenta",
"text": "nixos-rebuild list-generations | awk '$NF == \"True\" {print $2, $3}' | xargs -I {} date -d \"{}\" +\"%s\" | awk '{diff=systime()-$1; printf \"%d days, %d hours, %d mins\\n\", diff/86400, (diff%86400)/3600, (diff%3600)/60}'"
},
{
"type": "uptime",
"key": " Uptime ",
"keyColor": "magenta"
},
{
"type": "custom",
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
},
{
"type": "colors",
"paddingLeft": 2,
"block": {
"width": 3,
"range": [
0,
15
]
} //,
//"symbol": "circle"
},
]
}
-5
View File
@@ -1,5 +0,0 @@
{ pkgs, config, ... }: {
home.packages = with pkgs; [ fastfetch ];
xdg.configFile."neofetch/config.conf".source = ./config.conf;
xdg.configFile."fastfetch/config.jsonc".source = ./config.jsonc;
}
@@ -14,10 +14,10 @@
:orientation "v" :orientation "v"
(label :show-truncated false (label :show-truncated false
:class "hour" :class "hour"
:text {hour}) :text {time.hour})
(label :show-truncated false (label :show-truncated false
:class "minute" :class "minute"
:text {minute})) :text {time.minute}))
(revealer (revealer
:reveal date_rev :reveal date_rev
(box (box
@@ -25,10 +25,10 @@
:orientation "v" :orientation "v"
(label :show-truncated "false" (label :show-truncated "false"
:class "day" :class "day"
:text {day}) :text {time.day})
(label :show-truncated "false" (label :show-truncated "false"
:class "month" :class "month"
:text {month})) :text {time.month}))
) )
) )
) )
@@ -36,7 +36,5 @@
) )
) )
(defpoll hour :interval "15s" "date '+%H'") (defpoll time :interval "15s" "date '+{\"hour\":\"%H\",\"minute\":\"%M\",\"day\":\"%d\",\"month\":\"%m\"}'")
(defpoll minute :interval "15s" "date '+%M'")
(defpoll day :interval "15s" "date '+%d'")
(defpoll month :interval "15s" "date '+%m'")
@@ -22,7 +22,8 @@ case "$1" in
*) *)
gen_output gen_output
[ -z "$DEV" ] && exit 0 [ -z "$DEV" ] && exit 0
# Poll for changes every 2s (sysfs files don't support inotify reliably) udevadm monitor --udev --subsystem-match=backlight 2>/dev/null | while read -r _; do
while true; do sleep 2; gen_output; done gen_output
done
;; ;;
esac esac
@@ -27,8 +27,8 @@ pipe="$tmp/bt-events"
mkfifo "$pipe" mkfifo "$pipe"
trap 'rm -rf "$tmp"; kill 0 2>/dev/null' EXIT INT TERM trap 'rm -rf "$tmp"; kill 0 2>/dev/null' EXIT INT TERM
# Poll every 2s as reliable fallback for missed events # Poll every 10s as reliable fallback for missed events
(while true; do sleep 2; echo poll; done) > "$pipe" & (while true; do sleep 10; echo poll; done) > "$pipe" &
# bluetoothctl monitor for reactive device connect/disconnect events # bluetoothctl monitor for reactive device connect/disconnect events
(bluetoothctl monitor 2>/dev/null | grep --line-buffered -E "Powered|Connected|Device") > "$pipe" & (bluetoothctl monitor 2>/dev/null | grep --line-buffered -E "Powered|Connected|Device") > "$pipe" &
@@ -22,8 +22,8 @@ pipe="$tmp/bt-dev-events"
mkfifo "$pipe" mkfifo "$pipe"
trap 'rm -rf "$tmp"; kill 0 2>/dev/null' EXIT INT TERM trap 'rm -rf "$tmp"; kill 0 2>/dev/null' EXIT INT TERM
# Poll every 3s as fallback for missed events # Poll every 10s as fallback for missed events
(while true; do sleep 3; echo poll; done) > "$pipe" & (while true; do sleep 10; echo poll; done) > "$pipe" &
# Reactive updates from D-Bus # Reactive updates from D-Bus
(bluetoothctl monitor 2>/dev/null | grep --line-buffered -E "Connected|Device|Powered") > "$pipe" & (bluetoothctl monitor 2>/dev/null | grep --line-buffered -E "Connected|Device|Powered") > "$pipe" &
@@ -1,9 +1,15 @@
#!/usr/bin/env bash #!/usr/bin/env bash
current=$(eww state 2>/dev/null | grep '^power-save:' | awk '{print $2}') case "$1" in
if [ "$current" = "true" ]; then status)
powerprofilesctl set balanced 2>/dev/null || true powerprofilesctl get | grep -q power-saver && echo true || echo false
echo false ;;
else *)
powerprofilesctl set power-saver 2>/dev/null || true if powerprofilesctl get | grep -q power-saver; then
echo true powerprofilesctl set balanced 2>/dev/null || true
fi echo false
else
powerprofilesctl set power-saver 2>/dev/null || true
echo true
fi
;;
esac
@@ -33,8 +33,8 @@ case "$1" in
mkfifo "$pipe" mkfifo "$pipe"
trap 'rm -rf "$tmp"; kill 0 2>/dev/null' EXIT INT TERM trap 'rm -rf "$tmp"; kill 0 2>/dev/null' EXIT INT TERM
# 1s polling fallback # 2s polling fallback
(while true; do sleep 1; echo poll; done) > "$pipe" & (while true; do sleep 2; echo poll; done) > "$pipe" &
# PipeWire property-change events (fires on mute/volume change) # PipeWire property-change events (fires on mute/volume change)
(pw-cli -m 2>/dev/null | grep --line-buffered "changed") > "$pipe" & (pw-cli -m 2>/dev/null | grep --line-buffered "changed") > "$pipe" &
@@ -69,8 +69,8 @@
; --- Quick Actions --- ; --- Quick Actions ---
(defvar power-save false) (defpoll power-save :interval "5s" :initial "false" "scripts/power-save status")
(defvar night-light false) (defpoll night-light :interval "5s" :initial "false" "scripts/nightlight status")
(defwidget quick-btn [icon label onclick active] (defwidget quick-btn [icon label onclick active]
(button :class "quick-btn ${active ? 'quick-btn-active' : ''}" (button :class "quick-btn ${active ? 'quick-btn-active' : ''}"
@@ -85,8 +85,8 @@
(box :orientation "v" :space-evenly false :class "quick-grid" :spacing 4 (box :orientation "v" :space-evenly false :class "quick-grid" :spacing 4
(box :orientation "h" :space-evenly true (box :orientation "h" :space-evenly true
(quick-btn :icon "󰸉" :label "Wallpaper" :onclick "scripts/wallpaper" :active false) (quick-btn :icon "󰸉" :label "Wallpaper" :onclick "scripts/wallpaper" :active false)
(quick-btn :icon "󱐋" :label "Power Save" :onclick "eww update power-save=$(scripts/power-save)" :active {power-save}) (quick-btn :icon "󱐋" :label "Power Save" :onclick "scripts/power-save" :active {power-save})
(quick-btn :icon "󰌵" :label "Night Light" :onclick "eww update night-light=$(scripts/nightlight)" :active {night-light})) (quick-btn :icon "󰌵" :label "Night Light" :onclick "scripts/nightlight" :active {night-light}))
(box :orientation "h" :space-evenly true (box :orientation "h" :space-evenly true
(quick-btn :icon "󰹑" :label "Screenshot" :onclick "scripts/screenshot" :active false) (quick-btn :icon "󰹑" :label "Screenshot" :onclick "scripts/screenshot" :active false)
(quick-btn :icon "󰌾" :label "Lock" :onclick "scripts/lock" :active false) (quick-btn :icon "󰌾" :label "Lock" :onclick "scripts/lock" :active false)
@@ -1,11 +1,11 @@
(defpoll swap :interval "5s" "scripts/sys/swap") (defpoll swap :interval "30s" "scripts/sys/swap")
(defpoll cpu-freq-min :interval "60s" (defpoll cpu-freq-min :interval "60s"
"awk '{print $1/1000}' /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq") "awk '{print $1/1000}' /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq")
(defpoll cpu-freq-max :interval "60s" (defpoll cpu-freq-max :interval "60s"
"awk '{print $1/1000}' /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq") "awk '{print $1/1000}' /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq")
(defpoll cpu-temp :interval "2s" (defpoll cpu-temp :interval "4s"
"scripts/sys/cputemp") "scripts/sys/cputemp")
(defpoll cpu-freq-avg :interval "2s" (defpoll cpu-freq-avg :interval "2s"
"awk '{sum+=$1; count++} END {printf \"%.1f\", sum/count/1000000}' /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq") "awk '{sum+=$1; count++} END {printf \"%.1f\", sum/count/1000000}' /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq")
+14
View File
@@ -0,0 +1,14 @@
⢀⣴⣦⡀
⢀⣴⣶⣿⣿⣿⣿⣷⣶⣦⣤⣀⡀ ⢀⣴⣿⡿⠋
⢸⣿⣿⡿⠋⠉⠁⠉⠉⠉⠙⠛⠿⢷⣦⣄ ⢀⣴⣿⡿⠋
⠘⣿⣿⣇ ⢀⣤⣤⣤⣤⣄⣀⠈⠙⠛⢀⣴⣿⡿⠋
⠘⣿⣿⣆ ⢸⣿⣿⠛⠛⠛⠛⠿⢃⣴⣿⡿⠋
⠈⢻⣿⣧⡀ ⠹⣿⣦⡀ ⢀⣴⣿⡿⠛⠻⣷⣦⡀
⠙⠿⣿⣦⣄⠈⠙⢿⣷⣿⣿⣿⣿⣶⣄ ⠙⢿⣷⣄
⠈⠻⢿⣷⣦⣄⡈⠙⠛⠛⠋⠙⢿⣷⡀ ⠙⢿⣷⣄
⢀⣴⣿⡿⠿⣿⣷⣶⣤⣤⣤⣼⣿⣷ ⠈⢻⣿⣦
⢀⣴⣿⡿⠋ ⠈⠉⠛⠛⠛⠛⠛⠁ ⣿⣿⡇
⢀⣴⣿⡿⠋ ⠠⢤⣀⣀⣀⣀⣀⣀⣤⣾⣿⣿⠇
⠻⡿⠋ ⠈⠉⠙⠛⠛⠛⠛⠛⠛⠁