From 2611ce7e3e15d44f2fb7a503a33efb0867e84c28 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Fri, 19 Jul 2024 22:01:17 +0300 Subject: [PATCH] move/symlink darkman scripts to shell-things --- bash/darkman/.gitignore | 2 ++ bash/darkman/dark-mode.d | 1 + bash/darkman/dark-mode.d/breezedark.sh | 16 -------------- bash/darkman/dark-mode.d/fedora-wallpaper.sh | 10 --------- .../dark-mode.d/zz-kde-kali-wallpaper.sh | 11 ---------- .../zz-kde-plasma-theme-kalipurple.sh | 2 -- bash/darkman/dark-mode.d/zz-konsole-kali.sh | 21 ------------------- bash/darkman/light-mode.d | 1 + bash/darkman/light-mode.d/breeze.sh | 16 -------------- bash/darkman/light-mode.d/wallpaper.sh | 10 --------- .../light-mode.d/zz-kde-kali-wallpaper.sh | 11 ---------- .../zz-kde-plasma-theme-kalipurple.sh | 2 -- bash/darkman/light-mode.d/zz-konsole-kali.sh | 21 ------------------- submodules/shell-things | 2 +- 14 files changed, 5 insertions(+), 121 deletions(-) create mode 120000 bash/darkman/dark-mode.d delete mode 100755 bash/darkman/dark-mode.d/breezedark.sh delete mode 100755 bash/darkman/dark-mode.d/fedora-wallpaper.sh delete mode 100755 bash/darkman/dark-mode.d/zz-kde-kali-wallpaper.sh delete mode 100755 bash/darkman/dark-mode.d/zz-kde-plasma-theme-kalipurple.sh delete mode 100755 bash/darkman/dark-mode.d/zz-konsole-kali.sh create mode 120000 bash/darkman/light-mode.d delete mode 100755 bash/darkman/light-mode.d/breeze.sh delete mode 100755 bash/darkman/light-mode.d/wallpaper.sh delete mode 100755 bash/darkman/light-mode.d/zz-kde-kali-wallpaper.sh delete mode 100755 bash/darkman/light-mode.d/zz-kde-plasma-theme-kalipurple.sh delete mode 100755 bash/darkman/light-mode.d/zz-konsole-kali.sh diff --git a/bash/darkman/.gitignore b/bash/darkman/.gitignore index 1b28872..86f700b 100644 --- a/bash/darkman/.gitignore +++ b/bash/darkman/.gitignore @@ -1 +1,3 @@ darkman-setup.bash +dark-mode.d +light-mode.d diff --git a/bash/darkman/dark-mode.d b/bash/darkman/dark-mode.d new file mode 120000 index 0000000..7e6efff --- /dev/null +++ b/bash/darkman/dark-mode.d @@ -0,0 +1 @@ +../../submodules/shell-things/local/share/dark-mode.d \ No newline at end of file diff --git a/bash/darkman/dark-mode.d/breezedark.sh b/bash/darkman/dark-mode.d/breezedark.sh deleted file mode 100755 index 568ddf3..0000000 --- a/bash/darkman/dark-mode.d/breezedark.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# This is all adapted from /usr/share/doc/darkman/examples/dark-mode.d/ - -# Notify of light theme switch -(notify-send --app-name="darkman" --urgency=low --icon=moon-phase-full "Moonlights" &) - -# GTK Theme -(gsettings set org.gnome.desktop.interface gtk-theme Breeze-Dark &) -(dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Breeze" &) - -# Xfce theme? -(exec xfconf-query -c xsettings -p /Net/ThemeName -s 'Breeze' &) - -# Plasma -(lookandfeeltool --apply "org.kde.breezedark.desktop" &) diff --git a/bash/darkman/dark-mode.d/fedora-wallpaper.sh b/bash/darkman/dark-mode.d/fedora-wallpaper.sh deleted file mode 100755 index dab6f0e..0000000 --- a/bash/darkman/dark-mode.d/fedora-wallpaper.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -export DISTROID=$(lsb_release -si) -export DISTROREL=$(lsb_release -sr) - -if [ "$DISTROID" == "Fedora" ]; then - export WALLPAPER_PATH="/usr/share/wallpapers/F$DISTROREL/contents/images_dark/3840x2160.png" -fi - -qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i Manage Profiles. You can select a dark or light theme in -# Appearance > Color scheme and font. The following script iterates over all -# instances of Konsole und changes the profile of all sessions. This is necessary, -# if there are multiple tabs in one of the Konsole instances. -# Reference: https://docs.kde.org/stable5/en/konsole/konsole/konsole.pdf - -PROFILE='Kali-Dark' - -# loop over all running konsole instances -for pid in $(pidof konsole); do - # TODO: loop over all windows of the instance, instead of only the first - - # loop over all sessions in the current window - for session in $(qdbus "org.kde.konsole-$pid" /Windows/1 sessionList); do - # change profile through dbus message - qdbus "org.kde.konsole-$pid" "/Sessions/$session" setProfile "$PROFILE" - done -done diff --git a/bash/darkman/light-mode.d b/bash/darkman/light-mode.d new file mode 120000 index 0000000..d99fec9 --- /dev/null +++ b/bash/darkman/light-mode.d @@ -0,0 +1 @@ +../../submodules/shell-things/local/share/light-mode.d \ No newline at end of file diff --git a/bash/darkman/light-mode.d/breeze.sh b/bash/darkman/light-mode.d/breeze.sh deleted file mode 100755 index 2a3d8fa..0000000 --- a/bash/darkman/light-mode.d/breeze.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# This is all adapted from /usr/share/doc/darkman/examples/light-mode.d/ - -# Notify of light theme switch -(notify-send --app-name="darkman" --urgency=low --icon=weather-clear "Let there be light" &) - -# GTK Theme -(gsettings set org.gnome.desktop.interface gtk-theme Breeze &) -(dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Breeze" &) - -# Xfce theme? -(exec xfconf-query -c xsettings -p /Net/ThemeName -s 'Breeze' &) - -# Plasma -(lookandfeeltool --apply "org.kde.breeze.desktop" &) diff --git a/bash/darkman/light-mode.d/wallpaper.sh b/bash/darkman/light-mode.d/wallpaper.sh deleted file mode 100755 index 135d45e..0000000 --- a/bash/darkman/light-mode.d/wallpaper.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -export DISTROID=$(lsb_release -si) -export DISTROREL=$(lsb_release -sr) - -if [ "$DISTROID" == "Fedora" ]; then - export WALLPAPER_PATH="/usr/share/wallpapers/F$DISTROREL/contents/images/3840x2160.png" -fi - -qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i Manage Profiles. You can select a dark or light theme in -# Appearance > Color scheme and font. The following script iterates over all -# instances of Konsole und changes the profile of all sessions. This is necessary, -# if there are multiple tabs in one of the Konsole instances. -# Reference: https://docs.kde.org/stable5/en/konsole/konsole/konsole.pdf - -PROFILE='Kali-Light' - -# loop over all running konsole instances -for pid in $(pidof konsole); do - # TODO: loop over all windows of the instance, instead of only the first - - # loop over all sessions in the current window - for session in $(qdbus "org.kde.konsole-$pid" /Windows/1 sessionList); do - # change profile through dbus message - qdbus "org.kde.konsole-$pid" "/Sessions/$session" setProfile "$PROFILE" - done -done diff --git a/submodules/shell-things b/submodules/shell-things index f427d07..9953890 160000 --- a/submodules/shell-things +++ b/submodules/shell-things @@ -1 +1 @@ -Subproject commit f427d07d1dad87ddc7d29fe53f7878fd0122afa0 +Subproject commit 9953890c9b9f8bc72fc24f7fd2a1f77d66d88520