shelix/libs/256colors
2024-02-26 00:37:44 +01:00

44 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# ╔-----------------------------------------------------------------------╗
# ║ ║
# ║ This file is part of the Shelix IDE. ║
# ║ Copyright (C) 2024 NVRM webdev23 https://github.com/webdev23 ║
# ║ ║
# ║ This program is free software: you can redistribute it and/or modify ║
# ║ it under the terms of the GNU General Public License as published by ║
# ║ the Free Software Foundation, either version 3 of the License, or ║
# ║ (at your option) any later version. ║
# ║ ║
# ║ This program is distributed in the hope that it will be useful, ║
# ║ but WITHOUT ANY WARRANTY; without even the implied warranty of ║
# ║ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ║
# ║ GNU General Public License for more details. ║
# ║ ║
# ║ You should have received a copy of the GNU General Public License ║
# ║ along with this program. If not, see <http://www.gnu.org/licenses/>. ║
# ╚-----------------------------------------------------------------------╝
CURRENTPANE=$(tmux display-message -p "#{pane_index}")
wrap=0
for i in {0..255}; do
printf '\e[38;5;%dm%3d ' $i $i
((wrap+=4))
if ((wrap >= 20)); then
printf '\e[0m\n'
wrap=0
fi
done
echo -e "\n"
read -p "Background color: " BG
read -p "Text color: " FG
tmux set -s status-style "bg=colour$BG,fg=colour$FG,none,align=left"
tmux kill-pane