From 1c32e4e3d28ae7e18f599db8010a1c1b67f7d91b Mon Sep 17 00:00:00 2001 From: Jonas Hahn Date: Sat, 1 Nov 2025 21:48:20 +0100 Subject: [PATCH] Added grayscale --- gui/dot-config/hypr/hyprland.conf | 28 ++++++++++++++++--- .../hypr/shaders/grayscale-custom.glsl | 23 +++++++++++++++ home/.zshrc | 3 ++ home/dot-common_shell | 4 ++- home/dot-ssh/config | 3 +- 5 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 gui/dot-config/hypr/shaders/grayscale-custom.glsl diff --git a/gui/dot-config/hypr/hyprland.conf b/gui/dot-config/hypr/hyprland.conf index 04f695d..de88b98 100644 --- a/gui/dot-config/hypr/hyprland.conf +++ b/gui/dot-config/hypr/hyprland.conf @@ -23,16 +23,31 @@ exec-once = hyprsunset -t 3000 exec-once = wl-clip-persist --clipboard regular exec-once = hyprpaper exec-once = nm-applet -exec-once = nextcloud +exec-once = sleep 5 && nextcloud # Prevent speaker damage -exec-once = wpctl set-volume @DEFAULT_AUDIO_SINK@ 42% +exec-once = sleep 5 && wpctl set-volume @DEFAULT_AUDIO_SINK@ 42% exec-once = ~/projects/scripts/shell/rnote_mapper.sh +exec-once = ~/projects/scripts/shell/toggle_grayscale.sh # Mount the webdav folder configured by rclone exec-once = mkdir -p ~/webdav -exec-once = rclone mount Strato: ~/webdav + +# Only run this on the laptops and phones that dont want to run synthing +#exec-once = rclone mount Strato: ~/webdav \ +# --vfs-cache-mode writes \ +# --vfs-cache-max-size 10G \ +# --vfs-cache-poll-interval 5m \ +# --vfs-write-back 30s \ +# --buffer-size 128M \ +# --dir-cache-time 12h \ +# --poll-interval 5m \ +# --umask 022 \ +# --no-modtime \ +# --daemon + +#exec-once = rclone bisync Strato: ~/webdav --verbose # Set the right workspace otherwise it is set to ten exec-once = sleep 0.1 && hyprctl dispatch workspace 1 @@ -191,7 +206,7 @@ windowrulev2 = workspace 5, class:(steam) windowrulev2 = workspace 5, class:(blender) windowrulev2 = workspace 6, initialTitle:(LibreOffice) -windowrulev2 = workspace 6, initialTitle:(GNU Image Manipulation Program) +#windowrulev2 = workspace 6, initialTitle:(GNU Image Manipulation Program) windowrulev2 = workspace 6, class:(org.shotcut.Shotcut) # Social Apps @@ -229,6 +244,9 @@ windowrulev2 = float, class:(qt5ct) windowrulev2 = float, title:(Open File) windowrulev2 = float, title:(Open Folder) windowrulev2 = float, title:(Save As) +windowrulev2 = float, title:(Preferences) + +windowrulev2 = float, title:(Add) windowrulev2 = size 450 450, class:(Gnuplot) windowrulev2 = move 100 203, class:(Gnuplot) @@ -241,7 +259,9 @@ windowrulev2 = float, title:(Select Document) windowrulev2 = float, class:(Nextcloud) windowrulev2 = move 1250 28, class:(Nextcloud) windowrulev2 = move 700 50, title:(Nextcloud Settings) + windowrulev2 = size 700 800, title:(Nextcloud Settings) +windowrulev2 = size 1200 900, title:(Add) windowrulev2 = size 800 450, class:(org.pulseaudio.pavucontrol) windowrulev2 = move 40 80, class:(org.pulseaudio.pavucontrol) diff --git a/gui/dot-config/hypr/shaders/grayscale-custom.glsl b/gui/dot-config/hypr/shaders/grayscale-custom.glsl new file mode 100644 index 0000000..0aaf9b2 --- /dev/null +++ b/gui/dot-config/hypr/shaders/grayscale-custom.glsl @@ -0,0 +1,23 @@ +#version 300 es + +precision highp float; + +in vec2 v_texcoord; +uniform sampler2D tex; +out vec4 fragColor; + +void main() { + vec4 pixColor = texture(tex, v_texcoord); + float gray = 0.0; + + // Get gray with luminosity and hdr + // https://en.wikipedia.org/wiki/Grayscale#Luma_coding_in_video_systems + gray = dot(pixColor.rgb, vec3(0.2627, 0.6780, 0.0593)); + + // Change contrast + float contrast = 0.95; + gray = (gray - 0.5) * contrast + 0.5; + gray = clamp(gray, 0.0, 1.0); + + fragColor = vec4(vec3(gray), pixColor.a); +} diff --git a/home/.zshrc b/home/.zshrc index 21ddcf8..dabd256 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -74,3 +74,6 @@ fi if [ -f "/etc/NIXOS" ]; then eval "$(starship init zsh)" fi + +# opencode +export PATH=/home/jonas/.opencode/bin:$PATH diff --git a/home/dot-common_shell b/home/dot-common_shell index 0470876..a70b043 100644 --- a/home/dot-common_shell +++ b/home/dot-common_shell @@ -17,6 +17,8 @@ export loc="$HOME/files_local/" alias oati="~/projects/scripts/oathi.sh" alias imu="immich upload -r ." alias chch="~/projects/scripts/check_git.sh" +alias rp="rsync --info=progress2 -a --checksum" + alias aut="~/projects/scripts/autostart-server.sh" alias tt="~/projects/scripts/find_gits.sh" alias on="nvim ~/projects/planner/quick.md" @@ -64,7 +66,7 @@ alias gui="Hyprland && clear" alias ls='ls --color=auto' alias tofiu='rm ~/.cache/tofi-drun' alias ll='exa -la ' -alias shd="shutdown now" +alias shd="systemctl poweroff" alias ttt='timer -f 10m' alias zshconfig="mate ~/.zshrc" alias giter="git add . && git commit -a -m 'auto commit' && git push" diff --git a/home/dot-ssh/config b/home/dot-ssh/config index fffede0..dab2914 100644 --- a/home/dot-ssh/config +++ b/home/dot-ssh/config @@ -33,5 +33,6 @@ Host informatik User j.hahn02 Host dock - HostName ascyii.de + HostName paper.ascyii.de + Port 24 User admin