mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 20:59:23 +01:00
local/share: import darkman scripts from scripts since they developed more into this direction
This commit is contained in:
parent
0dd55997cb
commit
9953890c9b
16
local/share/dark-mode.d/breezedark.sh
Executable file
16
local/share/dark-mode.d/breezedark.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/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" &)
|
10
local/share/dark-mode.d/fedora-wallpaper.sh
Executable file
10
local/share/dark-mode.d/fedora-wallpaper.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/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<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'
|
11
local/share/dark-mode.d/zz-kde-kali-wallpaper.sh
Executable file
11
local/share/dark-mode.d/zz-kde-kali-wallpaper.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# To change the wallpaper on all desktops, you have to run a PlasmaShell script
|
||||||
|
# and iterate over all available desktops. This examples uses the default light
|
||||||
|
# wallpaper on Manjaro (Bamboo).
|
||||||
|
|
||||||
|
# Script credit @mamantoha: https://gist.github.com/mamantoha/c01363e5c791e8324d6248b09cf29bbb
|
||||||
|
|
||||||
|
WALLPAPER_PATH="/usr/share/wallpapers/KaliMetalDark/contents/images/3840x2160.png"
|
||||||
|
|
||||||
|
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'
|
2
local/share/dark-mode.d/zz-kde-plasma-theme-kalipurple.sh
Executable file
2
local/share/dark-mode.d/zz-kde-plasma-theme-kalipurple.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
lookandfeeltool --apply "Kali-Purple-Dark"
|
21
local/share/dark-mode.d/zz-konsole-kali.sh
Executable file
21
local/share/dark-mode.d/zz-konsole-kali.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# KDE's default terminal emulator supports profiles, you can create one in
|
||||||
|
# Settings > 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
|
16
local/share/light-mode.d/breeze.sh
Executable file
16
local/share/light-mode.d/breeze.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/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" &)
|
10
local/share/light-mode.d/wallpaper.sh
Executable file
10
local/share/light-mode.d/wallpaper.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/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<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'
|
11
local/share/light-mode.d/zz-kde-kali-wallpaper.sh
Executable file
11
local/share/light-mode.d/zz-kde-kali-wallpaper.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# To change the wallpaper on all desktops, you have to run a PlasmaShell script
|
||||||
|
# and iterate over all available desktops. This examples uses the default light
|
||||||
|
# wallpaper on Manjaro (Bamboo).
|
||||||
|
|
||||||
|
# Script credit @mamantoha: https://gist.github.com/mamantoha/c01363e5c791e8324d6248b09cf29bbb
|
||||||
|
|
||||||
|
WALLPAPER_PATH="/usr/share/wallpapers/KaliMetal/contents/images/3840x2160.jpg"
|
||||||
|
|
||||||
|
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'
|
2
local/share/light-mode.d/zz-kde-plasma-theme-kalipurple.sh
Executable file
2
local/share/light-mode.d/zz-kde-plasma-theme-kalipurple.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
lookandfeeltool --apply "Kali-Purple-Light"
|
21
local/share/light-mode.d/zz-konsole-kali.sh
Executable file
21
local/share/light-mode.d/zz-konsole-kali.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# KDE's default terminal emulator supports profiles, you can create one in
|
||||||
|
# Settings > 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
|
Loading…
Reference in New Issue
Block a user