This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ClearScreen() { printf "\033[2J" ; } | |
ClearRight() { printf "\033[0K" ; } | |
ClearLeft() { printf "\033[1K" ; } | |
ClearLine() { printf "\033[2K" ; } | |
MoveCursor() { printf "\033[%d;%dH" "$1" "$2" ; } | |
MoveCursorUp() { printf "\033[%dA" "$1" ; } | |
MoveCursorDown() { printf "\033[%dB" "$1" ; } | |
MoveCursorRight() { printf "\033[%dC" "$1" ; } | |
MoveCursorLeft() { printf "\033[%dD" "$1" ; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
CaptureSpecialKeys(){ | |
local SELECTION rest | |
IFS= read -r -n1 -s SELECTION | |
#echo "$SELECTION" | hexdump >&2 | |
if [[ $SELECTION == $'\x1b' ]]; then | |
read -r -n2 -s rest | |
SELECTION+="$rest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
while IFS= read -r -n1 -s SELECTION && [[ -n "$SELECTION" ]]; do | |
if [[ $SELECTION == $'\x1b' ]]; then | |
read -r -n2 -s rest | |
SELECTION+="$rest" | |
fi | |
case $SELECTION in | |
$'\x1b\x5b\x41') #up arrow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# CurrentVersion >= 5 | |
if [ -z "$BASH_VERSION" ]; then | |
echo "This script works only Bash 5 or higher." | |
exit 1 | |
elif ! [[ "${BASH_VERSINFO[0]}" -ge 5 ]]; then | |
echo "Error: Your Bash version is not supported by this script." >&2 | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# shellcheck source=/dev/null | |
source /dev/stdin < <(curl -sL "https://raw.githubusercontent.com/Hayao0819/FasBashLib/26e244d6f3839bcf159787dfd3e230df39e4500c/fasbashlib.sh") | |
Fsblib.RequireLib "BetterShell" "ParseArg" "Ini" "Emerge" "Array" | |
# Initial variable | |
SpecifiedRepo=() | |
#PrintRepoName=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeu -o pipefail | |
# shellcheck source=/dev/null | |
source /dev/stdin < <(curl -sL "https://github.com/Hayao0819/FasBashLib/releases/download/v0.2.5/fasbashlib.sh") | |
(( "$UID" == 0 )) || { Msg.Err "Please run as root."; exit 1; } | |
readarray -t EntryList < <(awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | grep -v "^$") | |
LastEntry=$( | |
last="$(grub-editenv list | cut -d "=" -f 2-)" | |
[[ -n "${last-""}" ]] || exit 0 | |
eval "Array=($(grep "$last" /boot/grub/grub.cfg))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 5.19.4-gentoo Kernel Configuration | |
# | |
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 12.2.0 p1) 12.2.0" | |
CONFIG_CC_IS_GCC=y | |
CONFIG_GCC_VERSION=120200 | |
CONFIG_CLANG_VERSION=0 | |
CONFIG_AS_IS_GNU=y | |
CONFIG_AS_VERSION=23800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
Force=false | |
# shellcheck source=/dev/null | |
#source <(curl -sL https://raw.githubusercontent.com/Hayao0819/FasBashLib/build-0.2.x/fasbashlib.sh) | |
PrintArray(){ printf '%s\n' "${@}"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# | |
#:: License | |
# | |
# Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
# | |
# Everyone is permitted to copy and distribute verbatim or modified | |
# copies of this license document, and changing it is allowed as long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# shellcheck disable=SC2034 | |
set -Eeu | |
#ArchNewsRSSURL="https://www.archlinux.jp/feeds/news.xml" | |
ArchNewsRSSURL="https://archlinux.org/feeds/news/" | |
CachePath="${XDG_STATE_HOME-"$HOME/.local/state"}/archnews.latest" | |
AutoStartPath="${XDG_CONFIG_HOME-"${HOME}/.config"}/autostart/archnews.desktop" | |
RSSXML=() |