├── GLF.png ├── GLFFetch-example.png ├── LICENSE ├── README.md ├── challenge.jsonc └── scripts ├── challenge.sh ├── completion.sh ├── icon.sh ├── install_date.sh └── vars.sh /GLF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaming-Linux-FR/GLFfetch/d38c289d5190d7ece558aa062100d16ecfc45141/GLF.png -------------------------------------------------------------------------------- /GLFFetch-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaming-Linux-FR/GLFfetch/d38c289d5190d7ece558aa062100d16ecfc45141/GLFFetch-example.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 A1RM4X 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GLFfetch 2 | 3 | ## Project migrated on Codeberg 4 | 5 | The project is now available here : https://codeberg.org/Gaming-Linux-FR/GLFfetch 6 | 7 | --- 8 | 9 |

10 | GLFfetch screenshoot 11 |

12 | 13 | A project which aims at making creating a small config file for all the GLF Linux challenges participants. 14 | 15 |

16 | DiscordGithub 17 |

18 | 19 | ## YouTube Overview 20 | 21 | [![GLFFetch on YouTube](http://img.youtube.com/vi/zEoRNoo0WSQ/0.jpg)](http://www.youtube.com/watch?v=zEoRNoo0WSQ "Discover GLFFetch with A1RM4X") 22 | 23 | ### Installation 24 | --- 25 | 26 | Make sure you have the packages installed on your system: 27 | - `fastfetch` 28 | - a nerd font for the icons display (https://github.com/ryanoasis/nerd-fonts). I recommend ```ttf-fantasque-nerd```. 29 | 30 | Then, clone this repository in fastfetch configuration folder by running: 31 | 32 | ```bash 33 | rm -fr ~/.config/fastfetch/GLFfetch && git clone https://github.com/Gaming-Linux-FR/GLFfetch ~/.config/fastfetch/GLFfetch && chmod u+x ~/.config/fastfetch/GLFfetch/scripts/*.sh && ~/.config/fastfetch/GLFfetch/scripts/icon.sh 34 | ``` 35 | 36 | ### Launch GLFfetch 37 | --- 38 | 39 | Create an alias in your terminal. 40 | 41 | If you use bash : 42 | 43 | ```bash 44 | echo 'alias GLFfetch="fastfetch --config ~/.config/fastfetch/GLFfetch/challenge.jsonc"' >> ~/.bashrc && source ~/.bashrc 45 | ``` 46 | 47 | If you use fish : 48 | 49 | ```bash 50 | alias GLFfetch="fastfetch --config ~/.config/fastfetch/GLFfetch/challenge.jsonc" --save 51 | ``` 52 | 53 | If you use zsh : 54 | 55 | ```bash 56 | echo "alias GLFfetch='fastfetch --config ~/.config/fastfetch/GLFfetch/challenge.jsonc'" >> ~/.zshrc 57 | ``` 58 | 59 | Execute in terminal : 60 | 61 | ```bash 62 | GLFfetch 63 | ``` 64 | 65 | Contribution 66 | --- 67 | 68 | - Thanks to for the base and the inspiration of this repo: https://github.com/Chick2D/neofetch-themes 69 | - Thanks to for the base theme of this config: gosxrgxx https://github.com/gosxrgxx (simpleFetch) 70 | - Thanks to GLF for inspiring me to create this little config file. 71 | - Thanks to all the testers and the contributors to make it a better script 72 | 73 | 74 | TODO 75 | --- 76 | 77 | There is a lot to be done. 78 | 79 | Some ideas I would like to do in the future: 80 | - ~~find an easy way to get access to the icons in terminal on all distros (I had to remove the icons until we find an easy solution)~~ 81 | - ~~move to Fastfetch because why not~~ (Thanks to @Sparkway) 82 | - improve output colors / display with GLF brand colors 83 | - Improve the README (Thanks to @Cardiacman13) 84 | - ~~add a if in the print info when 30 days goal reached~~ (Thanks to @Sparkway) 85 | - ~~add progress bar~~ (Thanks to @Sparkway) 86 | -------------------------------------------------------------------------------- /challenge.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", 3 | "logo": { 4 | "type": "auto", 5 | "source": "~/.config/fastfetch/GLFfetch/GLF.png", 6 | "width": 20, 7 | "padding": { 8 | "top": 0 9 | } 10 | }, 11 | "display": { 12 | "separator": " ▐ " 13 | }, 14 | "modules": [ 15 | "break", 16 | { 17 | "type": "os", 18 | "format": "{3}", 19 | "key": "󰣇 ", 20 | "keyColor": "bright_blue" 21 | }, 22 | 23 | { 24 | "type": "kernel", 25 | "key": " ", 26 | "keyColor": "white" 27 | }, 28 | 29 | { 30 | "type": "packages", 31 | "key": "󰆧 ", 32 | "keyColor": "bright_green" 33 | }, 34 | 35 | { 36 | "type": "shell", 37 | "key": " ", 38 | "keyColor": "yellow" 39 | }, 40 | 41 | { 42 | "type": "terminal", 43 | "key": "󰆍 ", 44 | "format": "{3}", 45 | "keyColor": "white" 46 | }, 47 | 48 | { 49 | "type": "wm", 50 | "key": "󰹑 ", 51 | "format": "{2}", 52 | "keyColor": "bright_magenta" 53 | }, 54 | 55 | { 56 | "type": "command", 57 | "shell": "/bin/bash", 58 | "key": " ", 59 | "text": "~/.config/fastfetch/GLFfetch/scripts/install_date.sh", 60 | "keyColor": "blue" 61 | }, 62 | 63 | { 64 | "type": "command", 65 | "shell": "/bin/bash", 66 | "key": "󰘤 ", 67 | "text": "~/.config/fastfetch/GLFfetch/scripts/challenge.sh", 68 | "keyColor": "yellow" 69 | }, 70 | 71 | { 72 | "type": "command", 73 | "shell": "/bin/bash", 74 | "key": "󰔵 ", 75 | "text": "~/.config/fastfetch/GLFfetch/scripts/completion.sh", 76 | "keyColor": "white" 77 | }, 78 | // "break", 79 | // "colors" 80 | ] 81 | } 82 | -------------------------------------------------------------------------------- /scripts/challenge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ~/.config/fastfetch/GLFfetch/scripts/vars.sh 3 | echo "GLF Distro Challenge $install_time/30 days" 4 | -------------------------------------------------------------------------------- /scripts/completion.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ~/.config/fastfetch/GLFfetch/scripts/vars.sh 3 | 4 | if [[ $percentage -lt 100 ]] 5 | then 6 | ProgressBar ${install_time} ${end_challenge} 7 | else [[ $percentage -ge 100 ]] 8 | echo "GLF Challenge completed" 9 | fi 10 | -------------------------------------------------------------------------------- /scripts/icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | file="$HOME/.config/fastfetch/GLFfetch/challenge.jsonc" 3 | os=$(grep ^ID= /etc/os-release | cut -d "=" -f 2 | tr -d \") 4 | old_icon=$(grep key "$HOME"/.config/fastfetch/GLFfetch/challenge.jsonc | head -n 1 | cut -d ":" -f2 | tr -d \", | awk '{$1=$1};1') 5 | old_color=$(grep keyColor "$HOME"/.config/fastfetch/GLFfetch/challenge.jsonc | head -n 1 | cut -d ":" -f2 | tr -d \", | awk '{$1=$1};1') 6 | 7 | case "$os" in 8 | "arch") 9 | new_icon="󰣇" 10 | new_color="bright_blue" ;; 11 | "endeavouros") 12 | new_icon="" 13 | new_color="bright_magenta" ;; 14 | "manjaro") 15 | new_icon="󱘊" 16 | new_color="bright_green" ;; 17 | "debian") 18 | new_icon="󰣚" 19 | new_color="bright_red" ;; 20 | "ubuntu") 21 | new_icon="󰕈" 22 | new_color="red" ;; 23 | "fedora") 24 | new_icon="󰣛" 25 | new_color="blue" ;; 26 | "opensuse") 27 | new_icon="" 28 | new_color="green" ;; 29 | "gentoo") 30 | new_icon="" 31 | new_color="magenta" ;; 32 | *) 33 | new_icon="󰣇" 34 | new_color="bright_blue" ;; 35 | esac 36 | 37 | if [[ -n "$new_icon" ]]; then 38 | sed -zi -e "s/$old_icon/$new_icon/" -e "s/$old_color/$new_color/" "$file" 39 | fi 40 | -------------------------------------------------------------------------------- /scripts/install_date.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ~/.config/fastfetch/GLFfetch/scripts/vars.sh 3 | echo "Distro installed the $install_date_day" 4 | -------------------------------------------------------------------------------- /scripts/vars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Thanks to https://github.com/fearside/ProgressBar 3 | function ProgressBar { 4 | let _progress=(${1}*100/${2}*100)/100 5 | let _done=(${_progress}*${bar_length})/10 6 | let _left=${bar_length}*10-${_done} 7 | printf -v _fill "%${_done}s" 8 | printf -v _empty "%${_left}s" 9 | 10 | printf "[${_fill// /▇}${_empty// / }] ${_progress}%% Done" 11 | } 12 | 13 | bar_length=2 #Number between 1 and 10 14 | today=$(date +%s) 15 | install_date=$(stat -c %W /) 16 | install_date_day=$(stat -c %W / | awk '{print strftime("%e/%m/%Y",$1)}' | awk '{$1=$1};1') 17 | install_time=$(( ($today - $install_date) / 86400 )) 18 | end_challenge=30 19 | percentage=$(( $install_time / $end_challenge * 100 )) 20 | --------------------------------------------------------------------------------