Adds proper wallpaper reaction to theme

This commit is contained in:
Michel Fedde 2025-05-02 14:36:12 +02:00
parent ab0c103ad9
commit 1a04002bd2
22 changed files with 96 additions and 55 deletions

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "switching to ${TARGET_MODE} mode"

View file

@ -0,0 +1,8 @@
#!/bin/env sh
TARGET_BRIGHTNESS=25%
if [[ $TARGET_MODE == 'light' ]]; then
TARGET_BRIGHTNESS=75%
fi
brightnessctl set $TARGET_BRIGHTNESS

View file

@ -0,0 +1,7 @@
#!/bin/env sh
if [[ $TARGET_MODE == 'light' ]]; then
hyprctl hyprsunset identity
else
hyprctl hyprsunset temperature 5000
fi

View file

@ -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

View file

@ -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"

View file

@ -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)

View file

@ -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);
}}

View file

@ -19,5 +19,5 @@
<property name="misc-expandable-folders" type="bool" value="true"/>
<property name="last-splitview-separator-position" type="int" value="-1"/>
<property name="last-renamer-dialog-maximized" type="bool" value="true"/>
<property name="last-compact-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_100_PERCENT"/>
<property name="last-compact-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_150_PERCENT"/>
</channel>

View file

@ -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 .
}

View file

@ -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
}