my nixos dotfiles :3 codeberg.org/koibtw/dotfiles
dotfiles neovim nixos catppuccin linux

fastfetch: nuke dat shi

Changed files
+167 -96
external
config
fastfetch
quickshell
Services
Niri
scripts
home
modules
-84
external/config/fastfetch/config.jsonc
··· 1 - // Copyright (c) 2024-present nnyyxxxx, Adam Perkowski 2 - 3 - { 4 - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", 5 - "display": { 6 - "color": "#b4befe", 7 - "separator": " :", 8 - 9 - "key": { 10 - "width": 17, 11 - "paddingLeft": 2, 12 - "type": "both" 13 - } 14 - }, 15 - 16 - "logo": { 17 - "source": "auto", 18 - "color": { 19 - "1": "#b4befe", 20 - "2": "#cba6f7" 21 - }, 22 - "padding": { 23 - "top": 1, 24 - "left": 2, 25 - "right": 2 26 - } 27 - }, 28 - 29 - "modules": [ 30 - "break", 31 - "break", 32 - { 33 - "type": "custom", 34 - "format": "\u001b[0;38;2;180;190;254mᓚ₍ ^. .^₎  ₍^. .^ ₎ᓗ\u001b[0m" 35 - }, 36 - { 37 - "type": "custom", 38 - "format": "\u001b[0;38;2;203;166;247m╭──────────────────────────────────╮\u001b[0m" 39 - }, 40 - { 41 - "type": "users", 42 - "key": "user ", 43 - "keyIcon": " ", 44 - "format": "{name}" 45 - }, 46 - { 47 - "type": "command", 48 - "shell": "/bin/sh", 49 - "text": "hostname", 50 - "key": "hostname", 51 - "keyIcon": " ", 52 - "format": "{result}" 53 - }, 54 - { 55 - "type": "uptime", 56 - "key": "uptime ", 57 - "keyIcon": " ", 58 - "format": "{days}d {hours}h {minutes}m" 59 - }, 60 - { 61 - "type": "os", 62 - "key": "distro ", 63 - "keyIcon": " ", 64 - "format": "{name} {version-id}" 65 - }, 66 - { 67 - "type": "kernel", 68 - "key": "kernel ", 69 - "keyIcon": " " 70 - }, 71 - { 72 - "type": "command", 73 - "shell": "/bin/sh", 74 - "text": "kitget -V | cut -d ' ' -f2", 75 - "key": "kitget ", 76 - "keyIcon": "󰄛 ", 77 - "format": "{result}" 78 - }, 79 - { 80 - "type": "custom", 81 - "format": "\u001b[0;38;2;203;166;247m╰──────────────────────────────────╯\u001b[0m" 82 - } 83 - ] 84 - }
+3 -2
external/config/quickshell/Services/Niri/niri.mjs
··· 1 1 export const handleEvent = (evRaw, ns) => { 2 2 const ev = JSON.parse(evRaw); 3 3 4 - if (ev.WorkspacesChanged) ns.wmWSC = ev.WorkspacesChanged.workspaces.filter(w => w.name).length; 5 - else if (ev.WorkspaceActivated) ns.wmWSA = ev.WorkspaceActivated.id; 4 + if (ev.WorkspaceActivated) ns.wmWSA = ev.WorkspaceActivated.id; 5 + else if (ev.WorkspacesChanged) ns.wmWSC = ev.WorkspacesChanged.workspaces.filter(w => w.name) 6 + .length; 6 7 };
+164 -7
external/scripts/ff.sh
··· 1 1 #! /usr/bin/env bash 2 2 3 - set -eo pipefail 3 + set -euo pipefail 4 4 5 - if [[ -n $FF_SKIP ]]; then 6 - FF_SKIP= 5 + if [[ "${FF_SKIP:-}" != "" ]]; then 7 6 exit 0 8 7 fi 9 8 10 9 kitget_output="$(mktemp --suffix=-kitget.png)" 10 + trap 'rm -f -- "$kitget_output"' EXIT 11 + 12 + c1=$'\e[1;38;2;180;190;254m' 13 + c2=$'\e[1;38;2;203;166;247m' 14 + nc=$'\e[0m' 15 + 16 + ascii_logo() { 17 + local c1="$1" 18 + local c2="$2" 19 + cat <<EOF 20 + ${c1} ▗▄ ${c2}▗▄ ▄▖ 21 + ${c1} ▄▄🬸█▄▄▄${c2}🬸█▛ ${c1}▃ 22 + ${c2} ▟▛ ▜${c1}▃▟🬕 23 + ${c2}🬋🬋🬫█ ${c1}█🬛🬋🬋 24 + ${c2} 🬷▛🮃${c1}▙ ▟▛ 25 + ${c2} 🮃 ${c1}▟█🬴${c2}▀▀▀█🬴▀▀ 26 + ${c1} ▝▀ ▀▘ ${c2}▀ 27 + EOF 28 + } 29 + 30 + header="${c1}ᓚ₍ ^. .^₎  ₍^. .^ ₎ᓗ${nc}" 31 + stats_header="${c2}╭─────────────────────────────────╮${nc}" 32 + stats_footer="${c2}╰─────────────────────────────────╯${nc}" 33 + 34 + get_uptime() { 35 + if [[ -r /proc/uptime ]]; then 36 + local seconds total d h m s 37 + seconds=$(cut -d ' ' -f1 </proc/uptime) 38 + total=${seconds%.*} 39 + d=$((total / 86400)) 40 + h=$(((total % 86400) / 3600)) 41 + m=$(((total % 3600) / 60)) 42 + s=$((total % 60)) 43 + local parts=() 44 + ((d > 0)) && parts+=("${d}d") 45 + ((h > 0)) && parts+=("${h}h") 46 + ((m > 0)) && parts+=("${m}m") 47 + ((s > 0)) && parts+=("${s}s") 48 + printf '%s\n' "${parts[*]}" 49 + else 50 + uptime | cut -d ' ' -f 2 51 + fi 52 + } 53 + 54 + get_distro() { 55 + local name="" version="" 56 + # shellcheck disable=SC1091 57 + . /etc/os-release 58 + name="${NAME:-}" 59 + version="${VERSION_ID:-${VERSION:-}}" 60 + printf '%s%s%s\n' "${name}" "${version:+ }" "${version}" 61 + } 62 + 63 + stats_names=( 64 + " user" 65 + " host" 66 + " uptime" 67 + " distro" 68 + " kernel" 69 + ) 70 + 71 + stats_data=( 72 + "$(id -un 2>/dev/null || whoami)" 73 + "$(hostnamectl --static 2>/dev/null || hostname)" 74 + "$(get_uptime)" 75 + "$(get_distro)" 76 + "$(uname -sr)" 77 + ) 78 + 79 + stats_padding=0 80 + for name in "${stats_names[@]}"; do 81 + ((${#name} > stats_padding)) && stats_padding=${#name} 82 + done 83 + stats_padding=$((stats_padding + 1)) 84 + 85 + print_stat() { 86 + local i="$1" 87 + if ((i == 0)); then 88 + printf '%s\n' "$stats_header" 89 + return 1 90 + fi 11 91 12 - if [[ -n $FF_NO_KITGET ]] || ! kitget --square -o "$kitget_output" &>/dev/null; then 13 - fastfetch --logo nixos_small --logo-padding-top 3 "$@" 92 + local name="${stats_names[i - 1]:-}" 93 + local data="${stats_data[i - 1]:-}" 94 + 95 + if [[ -n "$data" ]]; then 96 + printf ' %s' "${c1}${name}${nc}" 97 + local x 98 + for ((x = ${#name}; x < stats_padding; x++)); do 99 + printf ' ' 100 + done 101 + printf ': %s\n' "$data" 102 + else 103 + printf '%s\n' "$stats_footer" 104 + fi 105 + } 106 + 107 + printf '\n\n' 108 + 109 + use_kitget=true 110 + if [[ "${FF_NO_KITGET:-}" != "" ]]; then 111 + use_kitget=false 112 + elif ! command -v kitget >/dev/null 2>&1; then 113 + use_kitget=false 114 + fi 115 + 116 + if "$use_kitget" && kitget --square -o "$kitget_output" >/dev/null 2>&1; then 117 + if command -v kitty >/dev/null 2>&1; then 118 + clear 119 + kitty +kitten icat --place 22x22@2x1 --scale-up=yes --no-trailing-newline "$kitget_output" 120 + printf '\n' 121 + padding=26 122 + for ((i = 0; i < padding; i++)); do printf ' '; done 123 + printf '%s\n' "$header" 124 + 125 + for ((i = 0; i < padding; i++)); do printf ' '; done 126 + print_stat 0 || true 127 + 128 + for i in "${!stats_names[@]}"; do 129 + for ((x = 0; x < padding; x++)); do printf ' '; done 130 + print_stat "$((i + 1))" || continue 131 + done 132 + 133 + for ((x = 0; x < padding; x++)); do printf ' '; done 134 + printf '%s\n\n' "$stats_footer" 135 + else 136 + readarray -t logo <<<"$(ascii_logo "$c1" "$c2")" 137 + readarray -t logo_raw <<<"$(ascii_logo "" "")" 138 + 139 + padding=0 140 + for i in "${!logo_raw[@]}"; do 141 + ((${#logo_raw[i]} > padding)) && padding=${#logo_raw[i]} 142 + done 143 + padding=$((padding + 2)) 144 + 145 + for ((i = 0; i < padding + 2; i++)); do printf ' '; done 146 + printf '%s\n' "$header" 147 + 148 + for i in "${!logo[@]}"; do 149 + printf ' %s' "${logo[i]}" 150 + for ((x = ${#logo_raw[i]}; x < padding; x++)); do printf ' '; done 151 + print_stat "$i" || continue 152 + done 153 + fi 14 154 else 15 - fastfetch --kitty "$kitget_output" "$@" 16 - rm -f "$kitget_output" 155 + readarray -t logo <<<"$(ascii_logo "$c1" "$c2")" 156 + readarray -t logo_raw <<<"$(ascii_logo "" "")" 157 + 158 + padding=0 159 + for i in "${!logo_raw[@]}"; do 160 + ((${#logo_raw[i]} > padding)) && padding=${#logo_raw[i]} 161 + done 162 + padding=$((padding + 2)) 163 + 164 + for ((i = 0; i < padding + 2; i++)); do printf ' '; done 165 + printf '%s\n' "$header" 166 + 167 + for i in "${!logo[@]}"; do 168 + printf ' %s' "${logo[i]}" 169 + for ((x = ${#logo_raw[i]}; x < padding; x++)); do printf ' '; done 170 + print_stat "$i" || continue 171 + done 17 172 fi 173 + 174 + printf '\n'
-1
home/modules/packages.nix
··· 6 6 jellyfin-mpv-shim 7 7 jellyfin-tui 8 8 prettyping 9 - fastfetch 10 9 playerctl 11 10 lsd 12 11 jq
-2
home/modules/programs/niri.nix
··· 11 11 programs.niri.settings = { 12 12 spawn-at-startup = [ 13 13 { argv = [ "swww img ~/.wallpaper.jpg" ]; } 14 - { argv = [ "waybar" ]; } 15 - { argv = [ "sleep 5; vesktop" ]; } 16 14 ]; 17 15 18 16 screenshot-path = "~/screenshots/%Y-%m-%d_%H-%M-%S.png";