colorscheme fixes
This commit is contained in:
parent
7dff111a84
commit
d0cfe58dd2
14
scwrypts/dotwryn/desktop/colorscheme/get-theme
Executable file
14
scwrypts/dotwryn/desktop/colorscheme/get-theme
Executable 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'
|
||||
}
|
@ -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() {
|
||||
|
@ -226,7 +226,8 @@ SET_THEME() {
|
||||
}
|
||||
done
|
||||
|
||||
CHECK_ERRORS --no-usage
|
||||
CHECK_ERRORS --no-usage \
|
||||
&& echo "$THEME_NAME" > "$ACTIVE_THEME_PATH/name.txt"
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
|
@ -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)
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user