From 27646d04c5754aa6042131229f08ae4acd007c89 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Wed, 15 May 2024 17:42:32 +0200 Subject: [PATCH] Updates --- .install/packages/hyprland-packages.sh | 1 + .install/remove.sh | 7 +++++++ .settings/hyprshade.sh | 6 ++++++ CHANGELOG | 2 ++ hypr/conf/keybindings/default.conf | 1 + hypr/scripts/hyprshade.sh | 21 +++++++++++++++++++++ 6 files changed, 38 insertions(+) create mode 100644 .settings/hyprshade.sh create mode 100755 hypr/scripts/hyprshade.sh diff --git a/.install/packages/hyprland-packages.sh b/.install/packages/hyprland-packages.sh index 263c831..0af54bc 100644 --- a/.install/packages/hyprland-packages.sh +++ b/.install/packages/hyprland-packages.sh @@ -16,4 +16,5 @@ packagesYay=( "wlogout" "nwg-look" "eww" + "hyprshade" ); diff --git a/.install/remove.sh b/.install/remove.sh index e71a3e9..70a5037 100755 --- a/.install/remove.sh +++ b/.install/remove.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Remove blueman +if [[ $(_isInstalledPacman "blueman") == 0 ]]; then + sudo pacman --noconfirm -Rns blueman + echo ":: blueman removed" + echo +fi + # Remove Rofi Calc if [[ $(_isInstalledPacman "rofi-calc") == 0 ]]; then sudo pacman --noconfirm -Rns rofi-calc diff --git a/.settings/hyprshade.sh b/.settings/hyprshade.sh new file mode 100644 index 0000000..4992ae0 --- /dev/null +++ b/.settings/hyprshade.sh @@ -0,0 +1,6 @@ +# Define the hyprshade filter +# - blue-light-filter +# - vibrance +# - off +# get available filters with hyprshade ls +hyprshade_filter="blue-light-filter" \ No newline at end of file diff --git a/CHANGELOG b/CHANGELOG index 9998221..a523f28 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,8 @@ https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9 - Directory for wallpapers can be customized with new .settings/wallpaper-folder.sh - Added hyprpicker and Keybinding SUPER+CTRL+P - Replaced blueman with overskride to manage bluetooth devices +- Screen shading possible with hyprshade. SUPER+SHIFT+S to toggle the hyprshade. The filter can be defined in ~/dotfiles/.settings/hyprshade.sh +For auto-activation at a dedicated time please set the filter to off and follow the instructions here https://github.com/loqusion/hyprshade Version 2.9 https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9 diff --git a/hypr/conf/keybindings/default.conf b/hypr/conf/keybindings/default.conf index df23aa8..0c6b058 100644 --- a/hypr/conf/keybindings/default.conf +++ b/hypr/conf/keybindings/default.conf @@ -45,6 +45,7 @@ bind = $mainMod, V, exec, ~/dotfiles/scripts/cliphist.sh bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh bind = $mainMod CTRL, S, exec, ~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage bind = $mainMod CTRL, P, exec, hyprpicker -a +bind = $mainMod SHIFT, S, exec, ~/dotfiles/hypr/scripts/hyprshade.sh # Workspaces bind = $mainMod, 1, workspace, 1 diff --git a/hypr/scripts/hyprshade.sh b/hypr/scripts/hyprshade.sh new file mode 100755 index 0000000..2f8b895 --- /dev/null +++ b/hypr/scripts/hyprshade.sh @@ -0,0 +1,21 @@ +#!/bin/bash +hyprshade_filter="blue-light-filter" +if [ -f ~/dotfiles/.settings/hyprshade.sh ] ;then + source ~/dotfiles/.settings/hyprshade.sh +fi +if [ "$hyprshade_filter" != "off" ] ;then + if [ -z $(hyprshade current) ] ;then + echo ":: hyprshade is not running" + hyprshade on $hyprshade_filter + echo ":: hyprshade started with $(hyprshade current)" + else + echo ":: Current hyprshade $(hyprshade current)" + echo ":: Switching hyprshade off" + hyprshade off + fi +else + if [ -z $(hyprshade current) ] ;then + hyprshade off + fi + echo ":: hyprshade turned off" +fi