Add darkman config

This commit is contained in:
Şahin Akkaya 2023-12-25 14:07:42 +03:00
parent 2973c82f36
commit 2990b556e2
7 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,3 @@
lat: 40.0
lng: 29.0
dbusserver: true

View File

@ -0,0 +1,7 @@
#!/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
theme=$(darkman get)
notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "switching to $theme mode"

View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Change the global Plasma Theme. On Manjaro you can use "org.manjaro.breath-dark.desktop"
# or you can create your own global Plasma Theme with the "Plasma Look And Feel Explorer".
# Reference: https://userbase.kde.org/Plasma/Create_a_Global_Theme_Package
#
# Since Plasma 5.26 the lookandfeeltool does not work anymore without "faking" the screen.
# Reference: https://bugs.kde.org/show_bug.cgi?id=460643
lookandfeeltool -platform offscreen --apply "org.kde.breeze.desktop"
# lookandfeeltool -platform offscreen --apply "org.kde.breezetwilight.desktop"
# lookandfeeltool -platform offscreen --apply "org.kde.breezedark.desktop"

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# GTK apps are not affected by the Plasma Global Theme, which only applies to Qt based programs.
# GTK themes can be installed here: Global Theme > Application Style > Configure GNOME/GTK Application Style.
# Reference: https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
source "$HOME/scripts/common-vars.sh"
if [ $theme == "dark" ]; then
theme_string="Breeze-dark-gtk"
else
theme_string="Default"
fi
echo "string:$theme_string"
dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:$theme_string"

View File

@ -0,0 +1,3 @@
#!/bin/sh
makoctl set-mode dark

4
.config/darkman/scripts/gtk.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
theme=$(darkman get)
gsettings set org.gnome.desktop.interface color-scheme "prefer-$theme"

View File

@ -0,0 +1,31 @@
#!/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
theme=$(darkman get)
PATH="$HOME/.local/bin/:$PATH"
if [ $theme == "dark" ]; then
sed -i 's/tokyonight_day/tokyonight_storm/g' "$HOME/.config/kitty/kitty.conf"
sed -i 's/Light/Origin/g' "$HOME/.config/bat/config"
sed -i 's/flat-remix-light/tokyo-storm/g' "$HOME/.config/btop/btop.conf"
else
sed -i 's/tokyonight_storm/tokyonight_day/g' "$HOME/.config/kitty/kitty.conf"
sed -i 's/Origin/Light/g' "$HOME/.config/bat/config"
sed -i 's/tokyo-storm/flat-remix-light/g' "$HOME/.config/btop/btop.conf"
fi
kill -SIGUSR1 $(pgrep kitty)
tmux source-file "$HOME/.config/tmux/$theme.conf"
# This uses the neovim-remote python package to control other neovim instances.
# see: https://github.com/mhinz/neovim-remote
# Further, it is assumed that toggling the background in neovim is enough.
# Anything else should be handled by the set color scheme.
for server in $(nvr --serverlist); do
nvr --servername "$server" -cc "set background=$theme"
done