colorscheme fixes

This commit is contained in:
Wryn (yage) Wagner 2024-04-23 15:04:29 -06:00
parent 7dff111a84
commit d0cfe58dd2
5 changed files with 29 additions and 4 deletions

View File

@ -0,0 +1,14 @@
#!/bin/zsh
use desktop/colorscheme --group dotwryn
#####################################################################
USAGE__description+='
output the name of the current system theme
'
#####################################################################
MAIN() {
cat "$ACTIVE_THEME_PATH/name.txt" 2>/dev/null \
|| ERROR 'theme name not available'
}

View File

@ -61,6 +61,14 @@ colors:
cyan: '0x$BRIGHT_CYAN'
white: '0x$BRIGHT_WHITE'
" | sed '$d' > "$_COLORSCHEME_FILE__alacritty_yaml"
local TRANSPARENCY_OVERRIDE=$(cat "$SOURCE_THEME" | YQ -r '.alacritty.transparency' | grep -v '^null$')
[ $TRANSPARENCY_OVERRIDE ] && {
printf "[window]\nopacity = $TRANSPARENCY_OVERRIDE\n" >> "$_COLORSCHEME_FILE__alacritty_toml"
printf "window:\n opacity: 0.8" >> "$_COLORSCHEME_FILE__alacritty_yaml"
}
return 0
}
_SET_THEME__alacritty() {

View File

@ -226,7 +226,8 @@ SET_THEME() {
}
done
CHECK_ERRORS --no-usage
CHECK_ERRORS --no-usage \
&& echo "$THEME_NAME" > "$ACTIVE_THEME_PATH/name.txt"
}
#####################################################################

View File

@ -5,8 +5,9 @@ _GENERATE_THEME__polybar() {
# theme : $THEME_NAME
[colors]
background = #$(_GET_HEX .polybar.background .background)
background-alt = #$(_GET_HEX .polybar.background-alt .selection.background)
foreground = #$(_GET_HEX .polybar.foreground .foreground)
background-alt = #$(_GET_HEX .polybar.background-alt .selection.background)
foreground-alt = #$(_GET_HEX .polybar.foreground-alt .selection.foreground)
primary = #$(_GET_HEX .polybar.primary .material.base.primary .ansi.green.regular)
secondary = #$(_GET_HEX .polybar.secondary .material.base.secondary .ansi.blue.regular)
alert = #$(_GET_HEX .polybar.alert .material.base.error .ansi.red.regular)

View File

@ -7,9 +7,10 @@ _GENERATE_THEME__rofi() {
**/
*{
background: #$(_GET_HEX .rofi.background .background);
foreground: #$(_GET_HEX .rofi.foreground .foreground);
background: #$(_GET_HEX .rofi.background .material.secondary.900 .background);
foreground: #$(_GET_HEX .rofi.foreground .material.foreground.secondary.900 .foreground);
background-alt: #$(_GET_HEX .rofi.background-alt .material.primary.300 .selection.background);
foreground-alt: #$(_GET_HEX .rofi.foreground-alt .material.foreground.primary.300 .selection.foreground);
selected: #$(_GET_HEX .rofi.selected .material.foreground.primary.300 .selection.foreground);
active: #$(_GET_HEX .rofi.active .material.base.primary .ansi.green.regular);
urgent: #$(_GET_HEX .rofi.urgent .material.base.error .ansi.red.regular );