├── .github
└── workflows
│ └── reviewdog.yml
├── LICENSE
├── Makefile
├── README.md
├── assets
├── example-pic.png
└── ramfetch-christmas.png
├── ramfetch
└── ramfetch4christmas
/.github/workflows/reviewdog.yml:
--------------------------------------------------------------------------------
1 | name: reviewdog
2 | on: [pull_request]
3 | jobs:
4 | reviewdog_and_shellcheck:
5 | name: shellcheck / misspell
6 | runs-on: ubuntu-latest
7 | steps:
8 | - name: Checkout
9 | uses: actions/checkout@v1
10 | - name: Misspell
11 | uses: reviewdog/action-misspell@v1
12 | - uses: actions/checkout@v1
13 | - name: Shellcheck
14 | uses: reviewdog/action-shellcheck@v1
15 | with:
16 | github_token: ${{ secrets.github_token }}
17 | reporter: github-pr-review
18 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 gentoo-btw
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 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | PREFIX ?= /usr
2 |
3 | install:
4 | @printf "=> ramfetch version v1.0.1, and merry christmas :) \n"
5 | @test -f /bin/bash && printf "\e[0;32m=>\e[0;m Found bash at /bin/bash.\n"
6 | @test -f ./ramfetch4christmas && printf "\e[0;32m=>\e[0;m Found ramfetch file at ./ramfetch4christmas \n"
7 | @test -f /bin/bash || printf "\e[0;31m=>\e[0;m Bash not found. Aborting..\n" || exit 1
8 | @test -f ./ramfetch4christmas || printf "\e[0;31m=>\e[0;m ramfetch4chirstmas file not found, Aborting..\n" || exit 1
9 | @printf "\e[0;34m=>\e[0;m install -Dm755 ramfetch4christmas /usr/local/bin/ramfetch\n"
10 | @install -Dm755 ramfetch4christmas /usr/local/bin/ramfetch
11 | @printf "\e[0;32m=>\e[0;m Thanks for installing ramfetch.\n"
12 |
13 | uninstall:
14 | @printf "=> ramfetch version v1.0.1, and merry christmas :) \n"
15 | @printf "\e[0;34m=>\e[0;m rm -f /usr/local/bin/ramfetch\n"
16 | @rm -f /usr/local/bin/ramfetch
17 | @printf "\e[0;32m=>\e[0;m Thanks for using ramfetch.\n"
18 |
19 | reinstall:
20 | @printf "=> ramfetch version v1.01, and merry christmas :) \n"
21 | @test -f /bin/bash && printf "\e[0;32m=>\e[0;m Found bash at /bin/bash.\n"
22 | @test -f ./ramfetch4christmas && printf "\e[0;32m=>\e[0;m Found ramfetch file at ./ramfetch4christmas\n"
23 | @test -f /bin/bash || printf "\e[0;31m=>\e[0;m Bash not found. Aborting..\n" || exit 1
24 | @test -f ./ramfetch4christmas || printf "\e[0;31m=>\e[0;m ramfetch4chirstmas file not found. Aborting..\n" || exit 1
25 | @printf "\e[0;34m=>\e[0;m rm -f /usr/local/bin/ramfetch\n"
26 | @rm -f /usr/local/bin/ramfetch
27 | @printf "\e[0;34m=>\e[0;m install -Dm755 ramfetch /usr/local/bin/ramfetch\n"
28 | @install -Dm755 ramfetch4christmas /usr/local/bin/ramfetch
29 | @printf "\e[0;32m=>\e[0;m Thanks for installing ramfetch.\n"
30 |
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
ramfetch
4 |
A fetch which displays memory info using /proc/meminfo.
5 |

6 |

7 |

8 |

9 |

10 |
11 |
12 |
13 |

14 |
15 |
16 |
17 |
18 | ramfetch is a fetch which displays memory info using /proc/meminfo. if you want to install ramfetch follow the steps below. it's really simple. you can also test ramfetch without installing it.
19 |
20 | ramfetch works on:
21 |
22 | ✓ Linux
23 |
24 | ✓ Android, using termux (no root)
25 |
26 |
27 | NOTE: You cannot install ramfetch on android. You need to add ramfetch to your PATH.
28 |
29 | ## Requirements
30 |
31 | `bash` for ramfetch to work.
32 |
33 | `make` to install ramfetch. (optional)
34 |
35 | ## Install
36 |
37 | ### AUR
38 | To install ramfetch from the AUR. install it by using your favorite AUR helper. (e.g yay) thanks to [jahway603](https://github.com/jahway603)
39 | ```bash
40 | $ yay -S ramfetch-git
41 | ```
42 | NOTE: The AUR version installs the stock version of ramfetch. not the christmas one. while the github method does.
43 |
44 | ### Github
45 | Clone this repo.
46 | ```bash
47 | $ git clone https://github.com/gentoo-btw/ramfetch
48 | ```
49 | Install ramfetch using `make install`.
50 | ```bash
51 | # make install
52 | ```
53 |
54 |
55 | ### Manual install
56 | Install ramfetch using `install`
57 | ```bash
58 | # install -Dm755 ramfetch /usr/local/bin/ramfetch
59 | ```
60 | ## Reinstall
61 | Reinstall ramfetch using `make`.
62 | ```bash
63 | # make reinstall
64 | ```
65 |
66 | ### Manual Reinstall
67 | Remove ramfetch and install ramfetch using `install` and then execute it.
68 | ```bash
69 | # rm -f /usr/local/bin/ramfetch
70 | # install -Dm755 ramfetch /usr/local/bin/ramfetch
71 | $ ramfetch
72 | ```
73 |
74 | ## Uninstall
75 | Uninstall ramfetch using `make`.
76 | ```bash
77 | # make uninstall
78 | ```
79 | ### Manual Uninstall
80 | Uninstall ramfetch by removing the ramfetch file.
81 | ```bash
82 | # rm -f /usr/local/bin/ramfetch
83 | ```
84 |
--------------------------------------------------------------------------------
/assets/example-pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WhoseTheNerd/ramfetch/d2a777090cfe7461a10bafecdc4d36898fa1ed2a/assets/example-pic.png
--------------------------------------------------------------------------------
/assets/ramfetch-christmas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WhoseTheNerd/ramfetch/d2a777090cfe7461a10bafecdc4d36898fa1ed2a/assets/ramfetch-christmas.png
--------------------------------------------------------------------------------
/ramfetch:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # MIT License
3 | #
4 | # Copyright (c) 2022 gentoo-btw
5 | #
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"), to deal
8 | # in the Software without restriction, including without limitation the rights
9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | # copies of the Software, and to permit persons to whom the Software is
11 | # furnished to do so, subject to the following conditions:
12 |
13 | # The above copyright notice and this permission notice shall be included in all
14 | # copies or substantial portions of the Software.
15 | #
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | # SOFTWARE.
23 |
24 |
25 | # colors for tty sessions
26 | if [[ "$TERM" = "linux" ]]; then
27 | BLK='\e[0;30m'
28 | RED='\e[0;31m'
29 | GRN='\e[1;32m'
30 | YEL='\e[1;33m'
31 | BLU='\e[0;34m'
32 | PURP='\e[0;35m'
33 | CYN='\e[0;36m'
34 | WHT='\e[0;37m'
35 | else
36 | # colors for gui
37 | BLK='\e[0;30m'
38 | RED='\e[0;31m'
39 | GRN='\e[2;32m'
40 | YEL='\e[0;33m'
41 | BLU='\e[0;34m'
42 | PURP='\e[0;35m'
43 | CYN='\e[0;36m'
44 | WHT='\e[0;37m'
45 | fi
46 |
47 | # blue arrow
48 | BLUE_ARROW="$(printf ${BLU}"->"${WHT})"
49 | # sets version
50 | RAMFETCH_VER="v1.0.1"
51 |
52 | # help and version
53 | [[ $@ =~ --help|-h ]] && {
54 | cat <"${WHT})"
113 | HOSTNAME="$(hostname)"
114 | host_user_len=$(echo ${#HOSTNAME} + ${#USER} + 1 | bc)
115 | host_user="$(printf "%b%s%b%c%b%s%b" "${GRN}" "$USER" "${WHT}" "@" "${YEL}" "$HOSTNAME" "${WHT}")"
116 | colorblocks="$(printf "%b%s%b%s%b%s%b%s%b%s%b%s%b%s%b%s%b" "${BLK}" "███" "${RED}" "███" "${GRN}" "███" "${BLU}" "███" "${YEL}" "███" "${PURP}" "███" "${CYN}" "███" "${WHT}" "███" "${WHT}")"
117 | # for ascii logo
118 | yellowpart="$(printf "%b" "${YEL}")"
119 | greenpart="$(printf "%b" "${GRN}")"
120 | end="$(printf "%b" "${WHT}")"
121 | # output
122 | cat <"${WHT})"
49 | # sets version
50 | RAMFETCH_VER="v1.0.1"
51 |
52 | # help and version
53 | [[ $@ =~ --help|-h ]] && {
54 | cat <"${WHT})"
113 | HOSTNAME="$(hostname)"
114 | host_user_len=$(echo ${#HOSTNAME} + ${#USER} + 1 | bc)
115 | host_user="$(printf "%b%s%b%c%b%s%b" "${RED}" "$USER" "${WHT}" "@" "${GRN}" "$HOSTNAME" "${WHT}")"
116 | colorblocks="$(printf "%b%s%b%s%b%s%b%s%b%s%b%s%b%s%b%s%b" "${BLK}" "███" "${RED}" "███" "${GRN}" "███" "${BLU}" "███" "${YEL}" "███" "${PURP}" "███" "${CYN}" "███" "${WHT}" "███" "${WHT}")"
117 | # for ascii logo
118 | yellowpart="$(printf "%b" "${YEL}")"
119 | greenpart="$(printf "%b" "${GRN}")"
120 | end="$(printf "%b" "${WHT}")"
121 | # output
122 | cat <