Hyprland dotfiles
| 1 | #!/usr/bin/env bash |
| 2 | # Script parses /proc/uptime to get the system uptime |
| 3 | # and prints it in a human-readable format |
| 4 | # This is a workaround for system where `uptime` command is taken from coreutils |
| 5 | # where `uptime -p` is not supported |
| 6 | |
| 7 | if ; then |
| 8 | s= |
| 9 | s= |
| 10 | else |
| 11 | |
| 12 | |
| 13 | fi |
| 14 | |
| 15 | d=" days" |
| 16 | h=" hours" |
| 17 | m=" minutes" |
| 18 | |
| 19 | # Remove plural if < 2. |
| 20 | && d= |
| 21 | && h= |
| 22 | && m= |
| 23 | |
| 24 | # Hide empty fields. |
| 25 | && |
| 26 | && |
| 27 | && |
| 28 | |
| 29 | uptime= |
| 30 | uptime= |
| 31 | uptime= |
| 32 | |
| 33 |