From 2de514dd98d641fcd13d7cf07d74b09c32db7574 Mon Sep 17 00:00:00 2001 From: Amolith Date: Thu, 5 May 2022 19:15:10 -0400 Subject: [PATCH] add dark mode automation --- .../dark-mode.d/executable_desktop-notification.sh | 3 +++ dot_local/share/dark-mode.d/executable_swap.sh | 13 +++++++++++++ .../light-mode.d/executable_desktop-notification.sh | 3 +++ dot_local/share/light-mode.d/executable_swap.sh | 13 +++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 dot_local/share/dark-mode.d/executable_desktop-notification.sh create mode 100644 dot_local/share/dark-mode.d/executable_swap.sh create mode 100644 dot_local/share/light-mode.d/executable_desktop-notification.sh create mode 100644 dot_local/share/light-mode.d/executable_swap.sh diff --git a/dot_local/share/dark-mode.d/executable_desktop-notification.sh b/dot_local/share/dark-mode.d/executable_desktop-notification.sh new file mode 100644 index 0000000000000000000000000000000000000000..e0b2f28836a2602a08fbc30f12eef13cd8cb1b87 --- /dev/null +++ b/dot_local/share/dark-mode.d/executable_desktop-notification.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +notify-send --app-name="darkman" --urgency=low "Switching to dark mode" diff --git a/dot_local/share/dark-mode.d/executable_swap.sh b/dot_local/share/dark-mode.d/executable_swap.sh new file mode 100644 index 0000000000000000000000000000000000000000..b0b84ec14ac6234cc0c23f1d6f70c14271246987 --- /dev/null +++ b/dot_local/share/dark-mode.d/executable_swap.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +sed -i 's/light/dark/g' ~/.config/chezmoi/chezmoi.yaml +chezmoi apply +xfconf-query -c xsettings -p /Net/ThemeName -s "Dracula" +xrdb -load ~/.Xresources +pkill polybar +i3-msg exec "polybar top" +i3-msg exec "polybar bottom" +doom sync +unlink ~/.wallpaper.png +ln -s ~/Pictures/walls/dracula-pro.png ~/.wallpaper.png +feh --bg-scale ~/.wallpaper.png diff --git a/dot_local/share/light-mode.d/executable_desktop-notification.sh b/dot_local/share/light-mode.d/executable_desktop-notification.sh new file mode 100644 index 0000000000000000000000000000000000000000..cad0f3c397168f335540bc20caae7a1f4d043723 --- /dev/null +++ b/dot_local/share/light-mode.d/executable_desktop-notification.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +notify-send --app-name="darkman" --urgency=low "Switching to light mode" diff --git a/dot_local/share/light-mode.d/executable_swap.sh b/dot_local/share/light-mode.d/executable_swap.sh new file mode 100644 index 0000000000000000000000000000000000000000..f3f20306e4a3b2df78b826018708fecefaef3f0c --- /dev/null +++ b/dot_local/share/light-mode.d/executable_swap.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +sed -i 's/dark/light/g' ~/.config/chezmoi/chezmoi.yaml +chezmoi apply +xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita" +xrdb -load ~/.Xresources +pkill polybar +i3-msg exec "polybar top" +i3-msg exec "polybar bottom" +doom sync +unlink ~/.wallpaper.png +ln -s Pictures/walls/doom-one-light.png ~/.wallpaper.png +feh --bg-scale ~/.wallpaper.png