From 602d38affa78454415159d3f157df2216f41df9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Dudr?= Date: Fri, 25 Nov 2022 10:26:10 +0100 Subject: [PATCH] zsh: lscolors --- dot_config/zsh/coltrans | 95 +++++++++++++++++++++++++++++++ dot_config/zsh/include/colors.zsh | 2 + dot_config/zsh/lscol | 21 +++++++ 3 files changed, 118 insertions(+) create mode 100644 dot_config/zsh/coltrans create mode 100644 dot_config/zsh/include/colors.zsh create mode 100644 dot_config/zsh/lscol diff --git a/dot_config/zsh/coltrans b/dot_config/zsh/coltrans new file mode 100644 index 0000000..514fc08 --- /dev/null +++ b/dot_config/zsh/coltrans @@ -0,0 +1,95 @@ +# shellcheck shell=bash +# shellcheck disable=SC2034 + +declare -A colors + +colors=( + [dark0_hard]='#1d2021' + [dark0]='#282828' + [dark0_soft]='#32302f' + [dark1]='#3c3836' + [dark2]='#504945' + [dark3]='#665c54' + [dark4]='#7c6f64' + [dark4_256]='#7c6f64' + + [gray_245]='#928374' + [gray_244]='#928374' + + [light0_hard]='#f9f5d7' + [light0]='#fbf1c7' + [light0_soft]='#f2e5bc' + [light1]='#ebdbb2' + [light2]='#d5c4a1' + [light3]='#bdae93' + [light4]='#a89984' + [light4_256]='#a89984' + + [bright_red]='#fb4934' + [bright_green]='#b8bb26' + [bright_yellow]='#fabd2f' + [bright_blue]='#83a598' + [bright_purple]='#d3869b' + [bright_aqua]='#8ec07c' + [bright_orange]='#fe8019' + + [neutral_red]='#cc241d' + [neutral_green]='#98971a' + [neutral_yellow]='#d79921' + [neutral_blue]='#458588' + [neutral_purple]='#b16286' + [neutral_aqua]='#689d6a' + [neutral_orange]='#d65d0e' + + [faded_red]='#9d0006' + [faded_green]='#79740e' + [faded_yellow]='#b57614' + [faded_blue]='#076678' + [faded_purple]='#8f3f71' + [faded_aqua]='#427b58' + [faded_orange]='#af3a03' +) + +map=( + [grey]=${colors[dark4]} + + [white]=${colors[light0_hard]} + + [bright_red]=${colors[bright_red]} + [bright_green]=${colors[bright_green]} + [bright_yellow]=${colors[bright_yellow]} + [bright_blue]=${colors[bright_blue]} + [bright_magenta]=${colors[bright_purple]} + [bright_cyan]=${colors[bright_aqua]} + [bright_orange]=${colors[bright_orange]} + + [red]=${colors[neutral_red]} + [green]=${colors[neutral_green]} + [yellow]=${colors[neutral_yellow]} + [blue]=${colors[neutral_blue]} + [magenta]=${colors[neutral_purple]} + [cyan]=${colors[neutral_aqua]} + [orange]=${colors[neutral_orange]} + + [1]=${colors[neutral_red]} + [2]=${colors[neutral_green]} + [3]=${colors[neutral_yellow]} + [4]=${colors[neutral_blue]} + [5]=${colors[neutral_purple]} + [6]=${colors[neutral_aqua]} + [7]=${colors[neutral_orange]} + [9]=${colors[bright_red]} + [10]=${colors[bright_green]} + [11]=${colors[bright_yellow]} + [12]=${colors[bright_blue]} + [13]=${colors[bright_purple]} + [14]=${colors[bright_aqua]} + [15]=${colors[bright_orange]} + ) + +col=${map[$1]###} +r=${col:0:2} +g=${col:2:2} +b=${col:4:2} + +echo -n "8;2;$((0x$r));$((0x$g));$((0x$b))" diff --git a/dot_config/zsh/include/colors.zsh b/dot_config/zsh/include/colors.zsh new file mode 100644 index 0000000..b4d1c1f --- /dev/null +++ b/dot_config/zsh/include/colors.zsh @@ -0,0 +1,2 @@ +LS_COLORS='rs=0:di=01;38;2;131;165;152:ln=40;01;38;2;142;192;124:or=09;40;01;38;2;142;192;124:mh=00:pi=40;38;2;215;153;33:so=01;38;2;211;134;155:do=01;38;2;211;134;155:bd=40;01;38;2;215;153;33:cd=40;01;38;2;215;153;33:mi=00:su=48;2;204;36;29;38;2;254;128;25:sg=30;48;2;215;153;33:ca=00:tw=48;2;152;151;26;38;2;69;133;136:ow=30;48;2;152;151;26:st=30;48;2;69;133;136:ex=01;38;2;184;187;38:'; +export LS_COLORS diff --git a/dot_config/zsh/lscol b/dot_config/zsh/lscol new file mode 100644 index 0000000..f164139 --- /dev/null +++ b/dot_config/zsh/lscol @@ -0,0 +1,21 @@ +RESET 0 +DIR 01;38;2;131;165;152 +LINK 40;01;38;2;142;192;124 +ORPHAN 09;40;01;38;2;142;192;124 + +MULTIHARDLINK 00 +FIFO 40;38;2;215;153;33 +SOCK 01;38;2;211;134;155 +DOOR 01;38;2;211;134;155 + +BLK 40;01;38;2;215;153;33 +CHR 40;01;38;2;215;153;33 + +MISSING 00 +SETUID 48;2;204;36;29;38;2;254;128;25 +SETGID 30;48;2;215;153;33 +CAPABILITY 00 +STICKY_OTHER_WRITABLE 48;2;152;151;26;38;2;69;133;136 +OTHER_WRITABLE 30;48;2;152;151;26 +STICKY 30;48;2;69;133;136 +EXEC 01;38;2;184;187;38