From 35910b0ca911b4361ef5ce1473fa00707467f505 Mon Sep 17 00:00:00 2001 From: Michel Fedde Date: Sat, 29 Mar 2025 19:08:37 +0100 Subject: [PATCH] Adds scripts for darkman --- .gitignore | 4 +++- .local/share/dark-mode.d/bluelight.sh | 3 +++ .local/share/dark-mode.d/desktop-notification.sh | 6 ++++++ .local/share/dark-mode.d/themes.sh | 4 ++++ .local/share/light-mode.d/desktop-notification.sh | 6 ++++++ .local/share/light-mode.d/reset-bluelight.sh | 3 +++ .local/share/light-mode.d/themes.sh | 4 ++++ 7 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 .local/share/dark-mode.d/bluelight.sh create mode 100755 .local/share/dark-mode.d/desktop-notification.sh create mode 100755 .local/share/dark-mode.d/themes.sh create mode 100755 .local/share/light-mode.d/desktop-notification.sh create mode 100755 .local/share/light-mode.d/reset-bluelight.sh create mode 100755 .local/share/light-mode.d/themes.sh diff --git a/.gitignore b/.gitignore index 6627e45..beff29a 100644 --- a/.gitignore +++ b/.gitignore @@ -34,8 +34,10 @@ !/.local/ /.local/* !/.local/share/ -/.local/share/ +/.local/share/* !/.local/share/scripts/ +!/.local/share/light-mode.d/ +!/.local/share/dark-mode.d/ !/.zen/ /.zen/* diff --git a/.local/share/dark-mode.d/bluelight.sh b/.local/share/dark-mode.d/bluelight.sh new file mode 100755 index 0000000..c517d04 --- /dev/null +++ b/.local/share/dark-mode.d/bluelight.sh @@ -0,0 +1,3 @@ +#!/bin/env sh + +hyprctl hyprsunset temperature 4600 diff --git a/.local/share/dark-mode.d/desktop-notification.sh b/.local/share/dark-mode.d/desktop-notification.sh new file mode 100755 index 0000000..cfc386d --- /dev/null +++ b/.local/share/dark-mode.d/desktop-notification.sh @@ -0,0 +1,6 @@ +#!/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/themes.sh b/.local/share/dark-mode.d/themes.sh new file mode 100755 index 0000000..4b6884f --- /dev/null +++ b/.local/share/dark-mode.d/themes.sh @@ -0,0 +1,4 @@ +#!/bin/env sh + +gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' +gsettings set org.gnome.desktop.interface gtk-theme "Gruvbox-Orange-Dark" diff --git a/.local/share/light-mode.d/desktop-notification.sh b/.local/share/light-mode.d/desktop-notification.sh new file mode 100755 index 0000000..12ba061 --- /dev/null +++ b/.local/share/light-mode.d/desktop-notification.sh @@ -0,0 +1,6 @@ +#!/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 new file mode 100755 index 0000000..c50a254 --- /dev/null +++ b/.local/share/light-mode.d/reset-bluelight.sh @@ -0,0 +1,3 @@ +#!/bin/env sh + +hyprctl hyprsunset identity diff --git a/.local/share/light-mode.d/themes.sh b/.local/share/light-mode.d/themes.sh new file mode 100755 index 0000000..1b651e0 --- /dev/null +++ b/.local/share/light-mode.d/themes.sh @@ -0,0 +1,4 @@ +#!/bin/env sh + +gsettings set org.gnome.desktop.interface color-scheme 'prefer-light' +gsettings set org.gnome.desktop.interface gtk-theme "Gruvbox-Orange-Light"