Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _:
- let
- key = pos: color: icon: name: "{#90}${pos} {#${color}}${icon} ${name} {#keys}";
- top = key "╭─";
- mid = key "├─";
- bot = key "╰─";
- dotsPad = 16;
- center = dotsPad + 7;
- in
- {
- programs.fastfetch = {
- enable = true;
- settings = {
- display = {
- separator = " ";
- key.width = 15; # aligns every value in one column
- bar = {
- char = {
- elapsed = "=";
- total = "-";
- };
- width = 13;
- };
- percent = {
- type = 2;
- green = 65;
- yellow = 80;
- };
- };
- modules = [
- {
- type = "command";
- key = " ";
- text = ''
- t="$USER@$(uname -n)"
- n=$(printf %s "$t" | wc -m)
- printf '%*s%s' $(( ${toString center} - n / 2 )) "" "$t"
- '';
- }
- "break"
- { type = "os"; key = top "31" "{icon}" "os"; }
- { type = "kernel"; key = mid "33" "{icon}" "kernel"; }
- { type = "bootmgr"; key = mid "32" "{icon}" "boot"; }
- { type = "packages"; key = mid "34" "{icon}" "packages"; }
- { type = "uptime"; key = bot "35" "{icon}" "uptime"; }
- "break"
- { type = "lm"; key = top "35" "{icon}" "lm"; }
- { type = "wm"; key = mid "36" "{icon}" "wm"; }
- {
- type = "command";
- key = mid "32" "" "de";
- text = ''
- pgrep -f noctalia >/dev/null || { echo "$XDG_CURRENT_DESKTOP"; exit; }
- v=$(readlink -f "$(command -v noctalia)" | sed -n 's|.*noctalia-\([0-9][^/]*\)/.*|\1|p')
- echo "noctalia $v"
- '';
- }
- { type = "shell"; key = mid "33" "{icon}" "shell"; }
- { type = "terminal"; key = bot "34" "{icon}" "term"; }
- "break"
- { type = "host"; key = top "32" "" "host"; }
- { type = "chassis"; key = mid "36" "{icon}" "chassis"; }
- { type = "cpu"; key = mid "35" "" "cpu"; }
- { type = "memory"; key = mid "34" "" "memory"; }
- { type = "swap"; key = mid "33" "" "swap"; }
- { type = "disk"; key = mid "31" "" "disk"; folders = "/"; }
- {
- type = "command";
- key = bot "32" "" "age";
- text = ''
- birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days
- '';
- }
- "break"
- {
- type = "wifi";
- key = top "36" "" "wifi";
- format = "{signal-quality-bar} {signal-quality}";
- percent.type = [ "bar" "num" "num-color" ];
- }
- {
- type = "localip";
- key = bot "35" "" "ip";
- format = "{ipv4}";
- showPrefixLen = false;
- }
- "break"
- { type = "colors"; paddingLeft = dotsPad; symbol = "circle"; }
- ];
- };
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment