diff --git a/.config/theming/modes/executors/01-Desktop-notification.sh b/.config/theming/modes/executors/01-Desktop-notification.sh new file mode 100755 index 0000000..2ea8c99 --- /dev/null +++ b/.config/theming/modes/executors/01-Desktop-notification.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "switching to ${TARGET_MODE} mode" diff --git a/.config/theming/modes/executors/10-Backlight.sh b/.config/theming/modes/executors/10-Backlight.sh new file mode 100755 index 0000000..720fc06 --- /dev/null +++ b/.config/theming/modes/executors/10-Backlight.sh @@ -0,0 +1,8 @@ +#!/bin/env sh + +TARGET_BRIGHTNESS=25% +if [[ $TARGET_MODE == 'light' ]]; then + TARGET_BRIGHTNESS=75% +fi + +brightnessctl set $TARGET_BRIGHTNESS diff --git a/.config/theming/modes/executors/10-Bluelight.sh b/.config/theming/modes/executors/10-Bluelight.sh new file mode 100755 index 0000000..823eb37 --- /dev/null +++ b/.config/theming/modes/executors/10-Bluelight.sh @@ -0,0 +1,7 @@ +#!/bin/env sh + +if [[ $TARGET_MODE == 'light' ]]; then + hyprctl hyprsunset identity +else + hyprctl hyprsunset temperature 5000 +fi diff --git a/.config/theming/modes/executors/10-Themes.sh b/.config/theming/modes/executors/10-Themes.sh new file mode 100755 index 0000000..e44b677 --- /dev/null +++ b/.config/theming/modes/executors/10-Themes.sh @@ -0,0 +1,21 @@ +#!/bin/env sh + +CURSOR="Qogir-dark" +THEME="Gruvbox-Orange-Dark" + +if [[ $TARGET_MODE == 'light' ]]; then + CURSOR="Qogir" + THEME="Gruvbox-Orange-Light" + + wal -l --theme base16-gruvbox-medium +else + wal --theme base16-gruvbox-medium +fi + +hyprctl setcursor ${CURSOR} 32 + +gsettings set org.gnome.desktop.interface color-scheme "prefer-${TARGET_MODE}" +gsettings set org.gnome.desktop.interface gtk-theme "${THEME}" + +$HOME/.config/theming/compile.sh +$HOME/.config/theming/update.sh diff --git a/.config/theming/modes/executors/20-Wallpaper.sh b/.config/theming/modes/executors/20-Wallpaper.sh new file mode 100755 index 0000000..4387c47 --- /dev/null +++ b/.config/theming/modes/executors/20-Wallpaper.sh @@ -0,0 +1,8 @@ +#!/bin/env sh + +SOURCE_WALLPAPER="$HOME/.local/share/wallpapers/commit-less.jpg" +SHADER_PATH="$HOME/.cache/wal/wallpaper.glsl" +TARGET_PATH="$HOME/.cache/wallpaper.png" + +image-glsl-processing --input "$SOURCE_WALLPAPER" --shader "$SHADER_PATH" --output "$TARGET_PATH" +swww img "$TARGET_PATH" diff --git a/.config/theming/modes/setup-theme.sh b/.config/theming/modes/setup-theme.sh new file mode 100755 index 0000000..b10c9e5 --- /dev/null +++ b/.config/theming/modes/setup-theme.sh @@ -0,0 +1,19 @@ +#!/bin/env sh + +set -eu + +SCRIPTPATH="$( + cd -- "$(dirname "$0")" >/dev/null 2>&1 + pwd -P +)" +EXECUTORS_PATH="$SCRIPTPATH/executors" + +export TARGET_MODE=$1 + +echo "=> Setup ${TARGET_MODE}..." + +while IFS= read -r file; do + if [[ -x "$file" && ! "$file" =~ "##" && ! "$file" =~ ~$ && ! "$file" =~ ".bak" ]]; then + $file + fi +done < <(find -L "$EXECUTORS_PATH" -type f | sort) diff --git a/.config/wal/templates/wallpaper.glsl b/.config/wal/templates/wallpaper.glsl new file mode 100644 index 0000000..7a4415f --- /dev/null +++ b/.config/wal/templates/wallpaper.glsl @@ -0,0 +1,14 @@ +#define FG_COLOR vec3({foreground.rgb}) +#define BG_COLOR vec3({background.rgb}) + +precision mediump float; + +uniform vec2 uSize; +uniform sampler2D uImage; + +void main() {{ + vec2 uv = gl_FragCoord.xy / uSize; + + float value = texture2D(uImage, uv).r; + gl_FragColor = vec4(mix(BG_COLOR / 255.0, FG_COLOR / 255.0, value), 1.0); +}} diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml index 0856af7..64642e9 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml @@ -19,5 +19,5 @@ - + diff --git a/.config/yadm/bootstrap.v2/applications/20-Theming.sh b/.config/yadm/bootstrap.v2/applications/20-Theming.sh index 759d038..5126320 100755 --- a/.config/yadm/bootstrap.v2/applications/20-Theming.sh +++ b/.config/yadm/bootstrap.v2/applications/20-Theming.sh @@ -1,3 +1,11 @@ #!/bin/env sh -addApplications python-pywal sass +addApplications python-pywal sass node + +addGitInstall "image-glsl-processing" "https://github.com/Neintonine/image-glsl-processing.git" setup_image_glsl_processing + +setup_image_glsl_processing() { + npm install + npm run build + sudo npm install -g . +} diff --git a/.config/yadm/bootstrap.v2/bootstrap b/.config/yadm/bootstrap.v2/bootstrap index 320c925..8f556eb 100755 --- a/.config/yadm/bootstrap.v2/bootstrap +++ b/.config/yadm/bootstrap.v2/bootstrap @@ -29,8 +29,6 @@ declare -x -a gitInstalls addApplications () { for application in "$@"; do - # echo "adding application: $application" - applications+=("$application") done } @@ -38,8 +36,6 @@ addApplications () addActions() { for action in "$@"; do - # echo "adding action: $action" - actions+=("$action") done } diff --git a/.local/share/dark-mode.d/backlight.sh b/.local/share/dark-mode.d/backlight.sh deleted file mode 100755 index 1bffe1e..0000000 --- a/.local/share/dark-mode.d/backlight.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/env sh - -brightnessctl set 25% diff --git a/.local/share/dark-mode.d/bluelight.sh b/.local/share/dark-mode.d/bluelight.sh deleted file mode 100755 index 10bda23..0000000 --- a/.local/share/dark-mode.d/bluelight.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/env sh - -hyprctl hyprsunset temperature 5000 diff --git a/.local/share/dark-mode.d/desktop-notification.sh b/.local/share/dark-mode.d/desktop-notification.sh deleted file mode 100755 index cfc386d..0000000 --- a/.local/share/dark-mode.d/desktop-notification.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -# trigger a small, passive popup dialog to inform the user about darkman's activity -# reference https://wiki.archlinux.org/title/Desktop_notifications#Usage_in_programming - -notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "switching to dark mode" diff --git a/.local/share/dark-mode.d/run-setup.sh b/.local/share/dark-mode.d/run-setup.sh new file mode 100755 index 0000000..2ae006a --- /dev/null +++ b/.local/share/dark-mode.d/run-setup.sh @@ -0,0 +1,3 @@ +#!/bin/env sh + +"$HOME/.config/theming/modes/setup-theme.sh" dark diff --git a/.local/share/dark-mode.d/theme-background.jpg b/.local/share/dark-mode.d/theme-background.jpg deleted file mode 100644 index 6026512..0000000 Binary files a/.local/share/dark-mode.d/theme-background.jpg and /dev/null differ diff --git a/.local/share/dark-mode.d/themes.sh b/.local/share/dark-mode.d/themes.sh deleted file mode 100755 index ec3639a..0000000 --- a/.local/share/dark-mode.d/themes.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/env sh - -hyprctl setcursor Qogir-dark 32 - -WALLPAPER_PATH="$HOME/.local/share/dark-mode.d/theme-background.jpg" - -gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' -gsettings set org.gnome.desktop.interface gtk-theme "Gruvbox-Orange-Dark" - -wal --theme base16-gruvbox-medium - -$HOME/.config/theming/compile.sh -$HOME/.config/theming/update.sh diff --git a/.local/share/light-mode.d/backlight.sh b/.local/share/light-mode.d/backlight.sh deleted file mode 100755 index 01f1c5b..0000000 --- a/.local/share/light-mode.d/backlight.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/env sh - -brightnessctl set 75% diff --git a/.local/share/light-mode.d/desktop-notification.sh b/.local/share/light-mode.d/desktop-notification.sh deleted file mode 100755 index 12ba061..0000000 --- a/.local/share/light-mode.d/desktop-notification.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -# trigger a small, passive popup dialog to inform the user about darkman's activity -# reference https://wiki.archlinux.org/title/Desktop_notifications#Usage_in_programming - -notify-send --app-name="darkman" --urgency=low --icon=weather-clear "switching to light mode" diff --git a/.local/share/light-mode.d/reset-bluelight.sh b/.local/share/light-mode.d/reset-bluelight.sh deleted file mode 100755 index c50a254..0000000 --- a/.local/share/light-mode.d/reset-bluelight.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/env sh - -hyprctl hyprsunset identity diff --git a/.local/share/light-mode.d/run-setup.sh b/.local/share/light-mode.d/run-setup.sh new file mode 100755 index 0000000..9a70fb7 --- /dev/null +++ b/.local/share/light-mode.d/run-setup.sh @@ -0,0 +1,3 @@ +#!/bin/env sh + +"$HOME/.config/theming/modes/setup-theme.sh" light diff --git a/.local/share/light-mode.d/theme-background.png b/.local/share/light-mode.d/theme-background.png deleted file mode 100644 index 0985ac5..0000000 Binary files a/.local/share/light-mode.d/theme-background.png and /dev/null differ diff --git a/.local/share/light-mode.d/themes.sh b/.local/share/light-mode.d/themes.sh deleted file mode 100755 index 8827b78..0000000 --- a/.local/share/light-mode.d/themes.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/env sh - -hyprctl setcursor Qogir 32 - -WALLPAPER_PATH="$HOME/.local/share/light-mode.d/theme-background.png" -gsettings set org.gnome.desktop.interface color-scheme 'prefer-light' -gsettings set org.gnome.desktop.interface gtk-theme "Gruvbox-Orange-Light" - -wal -l --theme base16-gruvbox-medium - -$HOME/.config/theming/compile.sh -$HOME/.config/theming/update.sh