RSS Amplifier

BurgeonLab: Full-text · Mar 30, 2024

Customizing Neofetch: Load Weather Data Faster

0
Sign in to vote or save

Naty S · BurgeonLab

I customized my MacOS terminal with OMZ. In the process, I learnt an awful lot about the ins and outs of config files, navigating a project’s GitHub page and how to use Nano (but eventually switching to using VSCodium as my main text editor).

For the colour theme, this GitHub page has a lot to choose from for the default macOS Terminal app.

While I was looking for cool terminal setups for inspiration, I came across this popular command-line tool called Neofetch. It shows a summary of the machine specs with a ASCII logo of the current OS (or any other custom ASCII).

I have made customizations using the config file, which is located in ${HOME}/.config/Neofetch/config.conf, to display only a few of the defaults, e.g. OS version, RAM, CPU usage and uptime. (My config.conf file is at the end of the post for reference.)

The most interesting feature for me is to see the current weather. Originally, I have followed the official documentation to add a one-liner to load the weather of my current location via wttr.in.

1prin "Weather" "$(curl wttr.in/?0?q?T | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}')"

But because I have set Neofetch to run on every new terminal instance, I noticed how there’s a significant delay each time it tried fetching the current weather condition. I googled to see if there was anyone having similar issues and I found a guy called Adam with the same problem. He wrote a Bash script that would cache the weather forecast hourly in a .txt file, so Neofetch wouldn’t try to fetch the data constantly.

Unfortunately, the code he shared didn’t work for me. It only worked on the first run, i.e., when the cached .txt file didn’t exist. Once it was present with the current weather data, it wasn’t able to update after the chosen duration has passed (e.g.set to one hour or 3600s).

I therefore modified his code to add a last retrieval time.txt in the process; using that to calculate the time difference instead of the last modified time of the cached weather.txt file. I also changed the refresh rate to 7200 (two hours).

 1}
 2getWeather() {
 3    weather_params="tai+po?format="%c+%C+%t+"("%f")"+%h"RH"""
 4    data_path="$HOME/.config/neofetch/data-weather.txt"
 5    last_retrieval_path="$HOME/.config/neofetch/last-retrieval.txt"
 6    duration=7200
 7
 8    # Check if the last retrieval time file exists
 9    if [[ -e "$last_retrieval_path" ]]; then
10        last_retrieval=$(cat "$last_retrieval_path")
11
12        # Calculate the time elapsed since the last retrieval
13        current_time=$(date +%s)
14        time_elapsed=$((current_time - last_retrieval))
15
16        # Compare the time elapsed with the duration
17        if ((time_elapsed >= duration)); then
18            getWeatherData
19            setWeatherData
20            echo "$current_time" > "$last_retrieval_path"
21        else
22            setWeatherData
23        fi
24    else
25        getWeatherData
26        setWeatherData
27        echo "$(date +%s)" > "$last_retrieval_path"
28    fi
29
30    showWeatherData
31}
32setWeatherData() {
33    weather_data=$(cat "$data_path")
34}
35getWeatherData() {
36    curl -s "https://wttr.in/$weather_params" > "$data_path"
37}
38showWeatherData() {
39    prin "Weather: $weather_data"
40}

Happy to say it’s all working fine now and loading much quicker than before. Hope this helps!

  1print_info() {
  2    info "OS" distro
  3    info "Host" model
  4    info "CPU" cpu
  5    info "Shell" shell
  6    info "Uptime" uptime
  7    info "Packages" packages
  8    info "Terminal" term
  9    info underline
 10    info "CPU Usage" cpu_usage
 11    info "Memory" memory
 12    info "Font" font
 13    info "Local IP" local_ip
 14    info underline
 15    prin "Date: $(date '+%a %Y-%m-%d') UTC+8"
 16    getWeather
 17    info cols
 18}
 19
 20getWeather() {
 21    weather_params="tai+po?format="%c+%C+%t+"("%f")"+%h"RH"""
 22    data_path="$HOME/.config/neofetch/data-weather.txt"
 23    last_retrieval_path="$HOME/.config/neofetch/last-retrieval.txt"
 24    duration=7200
 25
 26    # Check if the last retrieval time file exists
 27    if [[ -e "$last_retrieval_path" ]]; then
 28        last_retrieval=$(cat "$last_retrieval_path")
 29
 30        # Calculate the time elapsed since the last retrieval
 31        current_time=$(date +%s)
 32        time_elapsed=$((current_time - last_retrieval))
 33
 34        # Compare the time elapsed with the duration
 35        if ((time_elapsed >= duration)); then
 36            getWeatherData
 37            setWeatherData
 38            echo "$current_time" > "$last_retrieval_path"
 39        else
 40            setWeatherData
 41        fi
 42    else
 43        getWeatherData
 44        setWeatherData
 45        echo "$(date +%s)" > "$last_retrieval_path"
 46    fi
 47
 48    showWeatherData
 49}
 50setWeatherData() {
 51    weather_data=$(cat "$data_path")
 52}
 53getWeatherData() {
 54    curl -s "https://wttr.in/$weather_params" > "$data_path"
 55}
 56showWeatherData() {
 57    prin "Weather: $weather_data"
 58}
 59
 60# Title
 61
 62# Hide/Show Fully qualified domain name.
 63#
 64# Default:  'off'
 65# Values:   'on', 'off'
 66# Flag:     --title_fqdn
 67title_fqdn="off"
 68
 69# Kernel
 70
 71# Shorten the output of the kernel function.
 72
 73# Default:  'on'
 74# Values:   'on', 'off'
 75# Flag:     --kernel_shorthand
 76# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
 77
 78# Example:
 79# on:  '4.8.9-1-ARCH'
 80# off: 'Linux 4.8.9-1-ARCH'
 81kernel_shorthand="on"
 82
 83# Distro
 84
 85# Shorten the output of the distro function
 86
 87# Default:  'off'
 88# Values:   'on', 'tiny', 'off'
 89# Flag:     --distro_shorthand
 90# Supports: Everything except Windows and Haiku
 91distro_shorthand="tiny"
 92
 93# Show/Hide OS Architecture.
 94# Show 'x86_64', 'x86' and etc in 'Distro:' output.
 95
 96# Default: 'on'
 97# Values:  'on', 'off'
 98# Flag:    --os_arch
 99
100# Example:
101# on:  'Arch Linux x86_64'
102# off: 'Arch Linux'
103os_arch="on"
104
105# Uptime
106
107# Shorten the output of the uptime function
108
109# Default: 'on'
110# Values:  'on', 'tiny', 'off'
111# Flag:    --uptime_shorthand
112
113# Example:
114# on:   '2 days, 10 hours, 3 mins'
115# tiny: '2d 10h 3m'
116# off:  '2 days, 10 hours, 3 minutes'
117uptime_shorthand="tiny"
118
119# Memory
120
121# Show memory pecentage in output.
122
123# Default: 'off'
124# Values:  'on', 'off'
125# Flag:    --memory_percent
126
127# Example:
128# on:   '1801MiB / 7881MiB (22%)'
129# off:  '1801MiB / 7881MiB'
130memory_percent="on"
131
132# Change memory output unit.
133
134# Default: 'mib'
135# Values:  'kib', 'mib', 'gib'
136# Flag:    --memory_unit
137
138# Example:
139# kib  '1020928KiB / 7117824KiB'
140# mib  '1042MiB / 6951MiB'
141# gib: ' 0.98GiB / 6.79GiB'
142memory_unit="gib"
143
144# Packages
145
146# Show/Hide Package Manager names.
147
148# Default: 'tiny'
149# Values:  'on', 'tiny' 'off'
150# Flag:    --package_managers
151
152# Example:
153# on:   '998 (pacman), 8 (flatpak), 4 (snap)'
154# tiny: '908 (pacman, flatpak, snap)'
155# off:  '908'
156package_managers="on"
157
158# Shell
159
160# Show the path to $SHELL
161
162# Default: 'off'
163# Values:  'on', 'off'
164# Flag:    --shell_path
165
166# Example:
167# on:  '/bin/bash'
168# off: 'bash'
169shell_path="off"
170
171# Show $SHELL version
172
173# Default: 'on'
174# Values:  'on', 'off'
175# Flag:    --shell_version
176
177# Example:
178# on:  'bash 4.4.5'
179# off: 'bash'
180shell_version="on"
181
182# CPU
183
184# CPU speed type
185
186# Default: 'bios_limit'
187# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
188# Flag:    --speed_type
189# Supports: Linux with 'cpufreq'
190# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
191speed_type="bios_limit"
192
193# CPU speed shorthand
194
195# Default: 'off'
196# Values: 'on', 'off'.
197# Flag:    --speed_shorthand
198# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
199
200# Example:
201# on:    'i7-6500U (4) @ 3.1GHz'
202# off:   'i7-6500U (4) @ 3.100GHz'
203speed_shorthand="off"
204
205# Enable/Disable CPU brand in output.
206
207# Default: 'on'
208# Values:  'on', 'off'
209# Flag:    --cpu_brand
210
211# Example:
212# on:   'Intel i7-6500U'
213# off:  'i7-6500U (4)'
214cpu_brand="on"
215
216# CPU Speed
217# Hide/Show CPU speed.
218
219# Default: 'on'
220# Values:  'on', 'off'
221# Flag:    --cpu_speed
222
223# Example:
224# on:  'Intel i7-6500U (4) @ 3.1GHz'
225# off: 'Intel i7-6500U (4)'
226cpu_speed="on"
227
228# CPU Cores
229# Display CPU cores in output
230
231# Default: 'logical'
232# Values:  'logical', 'physical', 'off'
233# Flag:    --cpu_cores
234# Support: 'physical' doesn't work on BSD.
235
236# Example:
237# logical:  'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
238# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
239# off:      'Intel i7-6500U @ 3.1GHz'
240cpu_cores="logical"
241
242# CPU Temperature
243# Hide/Show CPU temperature.
244# Note the temperature is added to the regular CPU function.
245
246# Default: 'off'
247# Values:  'C', 'F', 'off'
248# Flag:    --cpu_temp
249# Supports: Linux, BSD
250# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
251#       coretemp kernel module. This only supports newer Intel processors.
252
253# Example:
254# C:   'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
255# F:   'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
256# off: 'Intel i7-6500U (4) @ 3.1GHz'
257cpu_temp="off"
258
259# GPU
260
261# Enable/Disable GPU Brand
262
263# Default: 'on'
264# Values:  'on', 'off'
265# Flag:    --gpu_brand
266
267# Example:
268# on:  'AMD HD 7950'
269# off: 'HD 7950'
270gpu_brand="on"
271
272# Which GPU to display
273
274# Default: 'all'
275# Values:  'all', 'dedicated', 'integrated'
276# Flag:    --gpu_type
277# Supports: Linux
278
279# Example:
280# all:
281#   GPU1: AMD HD 7950
282#   GPU2: Intel Integrated Graphics
283
284# dedicated:
285#   GPU1: AMD HD 7950
286
287# integrated:
288#   GPU1: Intel Integrated Graphics
289gpu_type="all"
290
291# Resolution
292
293# Display refresh rate next to each monitor
294# Default: 'off'
295# Values:  'on', 'off'
296# Flag:    --refresh_rate
297# Supports: Doesn't work on Windows.
298
299# Example:
300# on:  '1920x1080 @ 60Hz'
301# off: '1920x1080'
302refresh_rate="off"
303
304# Gtk Theme / Icons / Font
305
306# Shorten output of GTK Theme / Icons / Font
307
308# Default: 'off'
309# Values:  'on', 'off'
310# Flag:    --gtk_shorthand
311
312# Example:
313# on:  'Numix, Adwaita'
314# off: 'Numix [GTK2], Adwaita [GTK3]'
315gtk_shorthand="off"
316
317# Enable/Disable gtk2 Theme / Icons / Font
318
319# Default: 'on'
320# Values:  'on', 'off'
321# Flag:    --gtk2
322
323# Example:
324# on:  'Numix [GTK2], Adwaita [GTK3]'
325# off: 'Adwaita [GTK3]'
326gtk2="on"
327
328# Enable/Disable gtk3 Theme / Icons / Font
329
330# Default: 'on'
331# Values:  'on', 'off'
332# Flag:    --gtk3
333
334# Example:
335# on:  'Numix [GTK2], Adwaita [GTK3]'
336# off: 'Numix [GTK2]'
337gtk3="on"
338
339# IP Address
340
341# Website to ping for the public IP
342
343# Default: 'http://ident.me'
344# Values:  'url'
345# Flag:    --ip_host
346public_ip_host="http://ident.me"
347
348# Public IP timeout.
349
350# Default: '2'
351# Values:  'int'
352# Flag:    --ip_timeout
353public_ip_timeout=2
354
355# Desktop Environment
356
357# Show Desktop Environment version
358
359# Default: 'on'
360# Values:  'on', 'off'
361# Flag:    --de_version
362de_version="on"
363
364# Disk
365
366# Which disks to display.
367# The values can be any /dev/sdXX, mount point or directory.
368# NOTE: By default we only show the disk info for '/'.
369
370# Default: '/'
371# Values:  '/', '/dev/sdXX', '/path/to/drive'.
372# Flag:    --disk_show
373
374# Example:
375# disk_show=('/' '/dev/sdb1'):
376#      'Disk (/): 74G / 118G (66%)'
377#      'Disk (/mnt/Videos): 823G / 893G (93%)'
378
379# disk_show=('/'):
380#      'Disk (/): 74G / 118G (66%)'
381
382disk_show=('/')
383
384# Disk subtitle.
385# What to append to the Disk subtitle.
386
387# Default: 'mount'
388# Values:  'mount', 'name', 'dir', 'none'
389# Flag:    --disk_subtitle
390
391# Example:
392# name:   'Disk (/dev/sda1): 74G / 118G (66%)'
393#         'Disk (/dev/sdb2): 74G / 118G (66%)'
394
395# mount:  'Disk (/): 74G / 118G (66%)'
396#         'Disk (/mnt/Local Disk): 74G / 118G (66%)'
397#         'Disk (/mnt/Videos): 74G / 118G (66%)'
398
399# dir:    'Disk (/): 74G / 118G (66%)'
400#         'Disk (Local Disk): 74G / 118G (66%)'
401#         'Disk (Videos): 74G / 118G (66%)'
402
403# none:   'Disk: 74G / 118G (66%)'
404#         'Disk: 74G / 118G (66%)'
405#         'Disk: 74G / 118G (66%)'
406disk_subtitle="dir"
407
408# Disk percent.
409# Show/Hide disk percent.
410
411# Default: 'on'
412# Values:  'on', 'off'
413# Flag:    --disk_percent
414
415# Example:
416# on:  'Disk (/): 74G / 118G (66%)'
417# off: 'Disk (/): 74G / 118G'
418disk_percent="on"
419
420# Song
421
422# Manually specify a music player.
423
424# Default: 'auto'
425# Values:  'auto', 'player-name'
426# Flag:    --music_player
427
428# Available values for 'player-name':
429
430# amarok
431# audacious
432# banshee
433# bluemindo
434# clementine
435# cmus
436# deadbeef
437# deepin-music
438# dragon
439# elisa
440# exaile
441# gnome-music
442# gmusicbrowser
443# gogglesmm
444# guayadeque
445# io.elementary.music
446# iTunes
447# juk
448# lollypop
449# mocp
450# mopidy
451# mpd
452# muine
453# netease-cloud-music
454# olivia
455# playerctl
456# pogo
457# pragha
458# qmmp
459# quodlibet
460# rhythmbox
461# sayonara
462# smplayer
463# spotify
464# strawberry
465# tauonmb
466# tomahawk
467# vlc
468# xmms2d
469# xnoise
470# yarock
471music_player="auto"
472
473# Format to display song information.
474
475# Default: '%artist% - %album% - %title%'
476# Values:  '%artist%', '%album%', '%title%'
477# Flag:    --song_format
478
479# Example:
480# default: 'Song: Jet - Get Born - Sgt Major'
481song_format="%artist% - %album% - %title%"
482
483# Print the Artist, Album and Title on separate lines
484
485# Default: 'off'
486# Values:  'on', 'off'
487# Flag:    --song_shorthand
488
489# Example:
490# on:  'Artist: The Fratellis'
491#      'Album: Costello Music'
492#      'Song: Chelsea Dagger'
493
494# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
495song_shorthand="off"
496
497# 'mpc' arguments (specify a host, password etc).
498
499# Default:  ''
500# Example: mpc_args=(-h HOST -P PASSWORD)
501mpc_args=()
502
503# Text Colors
504
505# Text Colors
506
507# Default:  'distro'
508# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'
509# Flag:     --colors
510
511# Each number represents a different part of the text in
512# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
513
514# Example:
515# colors=(distro)      - Text is colored based on Distro colors.
516# colors=(4 6 1 8 8 6) - Text is colored in the order above.
517colors=(distro)
518
519# Text Options
520
521# Toggle bold text
522
523# Default:  'on'
524# Values:   'on', 'off'
525# Flag:     --bold
526bold="on"
527
528# Enable/Disable Underline
529
530# Default:  'on'
531# Values:   'on', 'off'
532# Flag:     --underline
533underline_enabled="on"
534
535# Underline character
536
537# Default:  '-'
538# Values:   'string'
539# Flag:     --underline_char
540underline_char="-"
541
542# Info Separator
543# Replace the default separator with the specified string.
544
545# Default:  ':'
546# Flag:     --separator
547
548# Example:
549# separator="->":   'Shell-> bash'
550# separator=" =":   'WM = dwm'
551separator=" |"
552
553# Color Blocks
554
555# Color block range
556# The range of colors to print.
557
558# Default:  '0', '15'
559# Values:   'num'
560# Flag:     --block_range
561
562# Example:
563
564# Display colors 0-7 in the blocks.  (8 colors)
565# neofetch --block_range 0 7
566
567# Display colors 0-15 in the blocks. (16 colors)
568# neofetch --block_range 0 15
569block_range=(0 15)
570
571# Toggle color blocks
572
573# Default:  'on'
574# Values:   'on', 'off'
575# Flag:     --color_blocks
576color_blocks="on"
577
578# Color block width in spaces
579
580# Default:  '3'
581# Values:   'num'
582# Flag:     --block_width
583block_width=4
584
585# Color block height in lines
586
587# Default:  '1'
588# Values:   'num'
589# Flag:     --block_height
590block_height=1
591
592# Color Alignment
593
594# Default: 'auto'
595# Values: 'auto', 'num'
596# Flag: --col_offset
597
598# Number specifies how far from the left side of the terminal (in spaces) to
599# begin printing the columns, in case you want to e.g. center them under your
600# text.
601# Example:
602# col_offset="auto" - Default behavior of neofetch
603# col_offset=7      - Leave 7 spaces then print the colors
604col_offset="auto"
605
606# Progress Bars
607
608# Bar characters
609
610# Default:  '-', '='
611# Values:   'string', 'string'
612# Flag:     --bar_char
613
614# Example:
615# neofetch --bar_char 'elapsed' 'total'
616# neofetch --bar_char '-' '='
617bar_char_elapsed="~"
618bar_char_total="="
619
620# Toggle Bar border
621
622# Default:  'on'
623# Values:   'on', 'off'
624# Flag:     --bar_border
625bar_border="on"
626
627# Progress bar length in spaces
628# Number of chars long to make the progress bars.
629
630# Default:  '15'
631# Values:   'num'
632# Flag:     --bar_length
633bar_length=15
634
635# Progress bar colors
636# When set to distro, uses your distro's logo colors.
637
638# Default:  'distro', 'distro'
639# Values:   'distro', 'num'
640# Flag:     --bar_colors
641
642# Example:
643# neofetch --bar_colors 3 4
644# neofetch --bar_colors distro 5
645bar_color_elapsed="distro"
646bar_color_total="distro"
647
648# Info display
649# Display a bar with the info.
650
651# Default: 'off'
652# Values:  'bar', 'infobar', 'barinfo', 'off'
653# Flags:   --cpu_display
654#          --memory_display
655#          --battery_display
656#          --disk_display
657
658# Example:
659# bar:     '[---=======]'
660# infobar: 'info [---=======]'
661# barinfo: '[---=======] info'
662# off:     'info'
663cpu_display="barinfo"
664memory_display="barinfo"
665battery_display="off"
666disk_display="barinfo"
667
668# Backend Settings
669
670# Image backend.
671
672# Default:  'ascii'
673# Values:   'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
674#           'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
675# Flag:     --backend
676image_backend="ascii"
677
678# Image Source
679
680# Which image or ascii file to display.
681
682# Default:  'auto'
683# Values:   'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
684#           'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
685# Flag:     --source
686
687# NOTE: 'auto' will pick the best image source for whatever image backend is used.
688#       In ascii mode, distro ascii art will be used and in an image mode, your
689#       wallpaper will be used.
690image_source="auto"
691
692# Ascii Options
693
694# Ascii distro
695# Which distro's ascii art to display.
696
697# Default: 'auto'
698# Values:  'auto', 'distro_name'
699# Flag:    --ascii_distro
700# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
701#       "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
702#       ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
703#       Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
704#       BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
705#       Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
706#       Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
707#       DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
708#       EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
709#       FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
710#       gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
711#       Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
712#       Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
713#       LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
714#       Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
715#       Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
716#       NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
717#       OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
718#       Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
719#       popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
720#       Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
721#       Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
722#       Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
723#       SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
724#       openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
725#       Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
726#       Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
727#       and IRIX have ascii logos
728# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
729#       Use '{distro name}_old' to use the old logos.
730# NOTE: Ubuntu has flavor variants.
731#       Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
732#       Ubuntu-Studio, Ubuntu-Mate  or Ubuntu-Budgie to use the flavors.
733# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
734#       CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
735#       Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
736#       Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
737#       Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
738#       postmarketOS, and Void have a smaller logo variant.
739#       Use '{distro name}_small' to use the small variants.
740ascii_distro="auto"
741
742# Ascii Colors
743
744# Default:  'distro'
745# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'
746# Flag:     --ascii_colors
747
748# Example:
749# ascii_colors=(distro)      - Ascii is colored based on Distro colors.
750# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
751ascii_colors=(distro)
752
753# Bold ascii logo
754# Whether or not to bold the ascii logo.
755
756# Default: 'on'
757# Values:  'on', 'off'
758# Flag:    --ascii_bold
759ascii_bold="off"
760
761# Image Options
762
763# Image loop
764# Setting this to on will make neofetch redraw the image constantly until
765# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
766
767# Default:  'off'
768# Values:   'on', 'off'
769# Flag:     --loop
770image_loop="off"
771
772# Thumbnail directory
773
774# Default: '~/.cache/thumbnails/neofetch'
775# Values:  'dir'
776thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
777
778# Crop mode
779
780# Default:  'normal'
781# Values:   'normal', 'fit', 'fill'
782# Flag:     --crop_mode
783
784# See this wiki page to learn about the fit and fill options.
785# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
786crop_mode="normal"
787
788# Crop offset
789# Note: Only affects 'normal' crop mode.
790
791# Default:  'center'
792# Values:   'northwest', 'north', 'northeast', 'west', 'center'
793#           'east', 'southwest', 'south', 'southeast'
794# Flag:     --crop_offset
795crop_offset="center"
796
797# Image size
798# The image is half the terminal width by default.
799
800# Default: 'auto'
801# Values:  'auto', '00px', '00%', 'none'
802# Flags:   --image_size
803#          --size
804image_size="auto"
805
806# Gap between image and text
807
808# Default: '3'
809# Values:  'num', '-num'
810# Flag:    --gap
811gap=3
812
813# Image offsets
814# Only works with the w3m backend.
815
816# Default: '0'
817# Values:  'px'
818# Flags:   --xoffset
819#          --yoffset
820yoffset=0
821xoffset=0
822
823# Image background color
824# Only works with the w3m backend.
825
826# Default: ''
827# Values:  'color', 'blue'
828# Flag:    --bg_color
829background_color=
830
831# Misc Options
832
833# Stdout mode
834# Turn off all colors and disables image backend (ASCII/Image).
835# Useful for piping into another command.
836# Default: 'off'
837# Values: 'on', 'off'
838stdout="off"

Read the original on burgeonlab.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.