From e00c9635cda31fd323c0d02b0f4305b6c6e41a8e Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Mon, 27 May 2024 14:37:48 +0200 Subject: [PATCH] Updates --- .settings/hyprshade.sh | 7 +------ hypr/scripts/hyprshade.sh | 15 ++++----------- waybar/modules.json | 4 ++-- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.settings/hyprshade.sh b/.settings/hyprshade.sh index 93d10c7..c0cdbd8 100644 --- a/.settings/hyprshade.sh +++ b/.settings/hyprshade.sh @@ -1,6 +1 @@ -# Define the hyprshade filter -# - blue-light-filter -# - vibrance -# - off -# get available filters with hyprshade ls -hyprshade_filter="grayscale" \ No newline at end of file +hyprshade_filter="blue-light-filter" \ No newline at end of file diff --git a/hypr/scripts/hyprshade.sh b/hypr/scripts/hyprshade.sh index 1860ecd..ccb9b7f 100755 --- a/hypr/scripts/hyprshade.sh +++ b/hypr/scripts/hyprshade.sh @@ -10,17 +10,8 @@ if [[ "$1" == "rofi" ]]; then # Open rofi to select the Hyprshade filter for toggle - - # List all available shaders - option1="blue-light-filter" - option2="vibrance" - option3="invert-colors" - option4="off" - - options="$option1\n" - options="$options$option2\n" - options="$options$option3\n$option4" - + options="$(hyprshade ls)\noff" + # Open rofi choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-hyprshade.rasi -i -no-show-icons -l 4 -width 30 -p "Hyprshade") if [ ! -z $choice ] ;then @@ -43,8 +34,10 @@ else if [ -z $(hyprshade current) ] ;then echo ":: hyprshade is not running" hyprshade on $hyprshade_filter + notify-send "Hyprshade activated" "with $(hyprshade current)" echo ":: hyprshade started with $(hyprshade current)" else + notify-send "Hyprshade deactivated" echo ":: Current hyprshade $(hyprshade current)" echo ":: Switching hyprshade off" hyprshade off diff --git a/waybar/modules.json b/waybar/modules.json index 142ae93..7bbcb2d 100644 --- a/waybar/modules.json +++ b/waybar/modules.json @@ -199,8 +199,8 @@ // Hyprshade "custom/hyprshade": { "format": "", - "on-click": "sleep 0.1; ~/dotfiles/hypr/scripts/hyprshade.sh", - "on-click-right": "sleep 0.1; ~/dotfiles/hypr/scripts/hyprshade.sh rofi", + "on-click": "sleep 0.5; ~/dotfiles/hypr/scripts/hyprshade.sh", + "on-click-right": "sleep 0.5; ~/dotfiles/hypr/scripts/hyprshade.sh rofi", "tooltip": false },