diff --git a/scwrypts/dotwryn/desktop/xorg/backlight b/scwrypts/dotwryn/desktop/xorg/backlight index 921b0c9..09896ad 100755 --- a/scwrypts/dotwryn/desktop/xorg/backlight +++ b/scwrypts/dotwryn/desktop/xorg/backlight @@ -20,7 +20,7 @@ MAIN() { case $1 in up ) case $UTIL in - xbacklight ) xbacklight + 10 ;; + xbacklight ) xbacklight -inc 10 ;; gmux_backlight ) gmux_backlight +100 ;; enlighten ) @@ -31,7 +31,13 @@ MAIN() { ;; down ) case $UTIL in - xbacklight ) xbacklight - 10 ;; + xbacklight ) + [[ $(xbacklight -get) -le 10 ]] \ + && xbacklight -set 1 \ + || xbacklight -dec 10 \ + ; + [[ $(xbacklight -get) -le 0 ]] && xbacklight -set 1 + ;; gmux_backlight ) gmux_backlight -100 ;; enlighten ) diff --git a/scwrypts/dotwryn/lib/desktop/colorscheme/alacritty.module.zsh b/scwrypts/dotwryn/lib/desktop/colorscheme/alacritty.module.zsh index 926d0a0..ae0f495 100644 --- a/scwrypts/dotwryn/lib/desktop/colorscheme/alacritty.module.zsh +++ b/scwrypts/dotwryn/lib/desktop/colorscheme/alacritty.module.zsh @@ -5,31 +5,31 @@ _GENERATE_THEME__alacritty() { echo "# do not edit; generated by scwrypts # theme : $THEME_NAME [colors.cursor] -cursor = '0x$CURSOR' +cursor = '0x$(_GET_HEX .alacritty.cursor cursor)' [colors.primary] -background = '0x$BACKGROUND' -foreground = '0x$FOREGROUND' +background = '0x$(_GET_HEX .alacritty.background .background)' +foreground = '0x$(_GET_HEX .alacritty.foreground .foreground)' [colors.normal] -black = '0x$BLACK' -red = '0x$RED' -green = '0x$GREEN' -yellow = '0x$YELLOW' -blue = '0x$BLUE' -magenta = '0x$MAGENTA' -cyan = '0x$CYAN' -white = '0x$WHITE' +black = '0x$(_GET_HEX .ansi.gray.black)' +red = '0x$(_GET_HEX .ansi.red.regular)' +green = '0x$(_GET_HEX .ansi.green.regular)' +yellow = '0x$(_GET_HEX .ansi.yellow.regular)' +blue = '0x$(_GET_HEX .ansi.blue.regular)' +magenta = '0x$(_GET_HEX .ansi.magenta.regular)' +cyan = '0x$(_GET_HEX .ansi.cyan.regular)' +white = '0x$(_GET_HEX .ansi.gray.white)' [colors.bright] -black = '0x$BRIGHT_BLACK' -red = '0x$BRIGHT_RED' -green = '0x$BRIGHT_GREEN' -yellow = '0x$BRIGHT_YELLOW' -blue = '0x$BRIGHT_BLUE' -magenta = '0x$BRIGHT_MAGENTA' -cyan = '0x$BRIGHT_CYAN' -white = '0x$BRIGHT_WHITE' +black = '0x$(_GET_HEX .ansi.gray.regular)' +red = '0x$(_GET_HEX .ansi.red.bright)' +green = '0x$(_GET_HEX .ansi.green.bright)' +yellow = '0x$(_GET_HEX .ansi.yellow.bright)' +blue = '0x$(_GET_HEX .ansi.blue.bright)' +magenta = '0x$(_GET_HEX .ansi.magenta.bright)' +cyan = '0x$(_GET_HEX .ansi.cyan.bright)' +white = '0x$(_GET_HEX .ansi.gray.bright)' " | sed '$d' > "$_COLORSCHEME_FILE__alacritty_toml" # backwards yaml compatibility diff --git a/scwrypts/dotwryn/lib/desktop/colorscheme/colorscheme.module.zsh b/scwrypts/dotwryn/lib/desktop/colorscheme/colorscheme.module.zsh index 2dcf383..ac3da7a 100644 --- a/scwrypts/dotwryn/lib/desktop/colorscheme/colorscheme.module.zsh +++ b/scwrypts/dotwryn/lib/desktop/colorscheme/colorscheme.module.zsh @@ -17,6 +17,8 @@ DEFAULT_MATERIAL_REFERENCES="$ACTIVE_THEME_PATH/default.yaml" DEPENDENCIES+=(sed yq) +__CHECK_ENV_VAR DESKTOP__WALLPAPER_PATH --optional + ##################################################################### MAX_LOOKUP_RECURSION=10 @@ -226,6 +228,10 @@ SET_THEME() { } done + local WALLPAPER="$(find "$DESKTOP__WALLPAPER_PATH" -type f -name $THEME_NAME.\* 2>/dev/null | head -n1)" + [ "$WALLPAPER" ] && command -v feh &>/dev/null \ + && feh --bg-fill "$WALLPAPER" + CHECK_ERRORS --no-usage \ && echo "$THEME_NAME" > "$ACTIVE_THEME_PATH/name.txt" }