diff --git a/.gitignore b/.gitignore index 84b500e..5261fb8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ lfm/.config/lfm/lfm.history -lazygit/.config/jesseduffield/lazygit/state.yml -lazygit/.config/**/*.patch +lazygit/.config/lazygit/**/*.patch +lazygit/.config/lazygit/state.yml bin/.local/bin/ @@ -16,6 +16,9 @@ mutt/.config/mutt/*.mailboxes matterhorn/.config/matterhorn/history.txt matterhorn/.config/matterhorn/last_run_state_*.json +nvim/.config/nvim/plugin/packer_compiled.lua +nvim/.config/nvim/spell + ssh/.ssh/* ssh/.ssh/known_hosts* !ssh/.ssh/config @@ -27,10 +30,8 @@ vifm/.config/vifm/vifminfo.json* vim/.vim/autoload/ vim/.vim/colors/ vim/.vim/plugged/ +vim/.vim/spell vim/.vim/swap/ vim/.vim/undo/ -lazygit/.config/lazygit/state.yml -nvim/.config/nvim/plugin/packer_compiled.lua -nvim/.config/nvim/spell -vim/.vim/spell +wofi/.config/wofi/style.css diff --git a/darkman/.config/darkman/config.yaml b/darkman/.config/darkman/config.yaml new file mode 100644 index 0000000..7733fdc --- /dev/null +++ b/darkman/.config/darkman/config.yaml @@ -0,0 +1,4 @@ +lat: 43.7 +lng: 7.2 +dbusserver: true +portal: true diff --git a/darkman/.local/share/dark-mode.d/gtk-theme.sh b/darkman/.local/share/dark-mode.d/gtk-theme.sh new file mode 100755 index 0000000..fbb8840 --- /dev/null +++ b/darkman/.local/share/dark-mode.d/gtk-theme.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +gsettings set org.gnome.desktop.interface color-scheme prefer-dark +gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark + diff --git a/darkman/.local/share/dark-mode.d/notification.sh b/darkman/.local/share/dark-mode.d/notification.sh new file mode 100755 index 0000000..cfc386d --- /dev/null +++ b/darkman/.local/share/dark-mode.d/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/darkman/.local/share/dark-mode.d/wofi.sh b/darkman/.local/share/dark-mode.d/wofi.sh new file mode 100755 index 0000000..6b6ecac --- /dev/null +++ b/darkman/.local/share/dark-mode.d/wofi.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +cat \ + "$HOME/.config/wofi/colors-dark.css" \ + "$HOME/.config/wofi/base.css" \ + > "$HOME/.config/wofi/style.css" diff --git a/darkman/.local/share/light-mode.d/gtk-theme.sh b/darkman/.local/share/light-mode.d/gtk-theme.sh new file mode 100755 index 0000000..bdf4f63 --- /dev/null +++ b/darkman/.local/share/light-mode.d/gtk-theme.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +gsettings set org.gnome.desktop.interface color-scheme prefer-light +gsettings set org.gnome.desktop.interface gtk-theme Adwaita + diff --git a/darkman/.local/share/light-mode.d/notification.sh b/darkman/.local/share/light-mode.d/notification.sh new file mode 100755 index 0000000..12ba061 --- /dev/null +++ b/darkman/.local/share/light-mode.d/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/darkman/.local/share/light-mode.d/wofi.sh b/darkman/.local/share/light-mode.d/wofi.sh new file mode 100755 index 0000000..5b76dae --- /dev/null +++ b/darkman/.local/share/light-mode.d/wofi.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +cat \ + "$HOME/.config/wofi/colors-light.css" \ + "$HOME/.config/wofi/base.css" \ + > "$HOME/.config/wofi/style.css" diff --git a/waybar/.config/waybar/config.jsonc b/waybar/.config/waybar/config.jsonc index 4bd3e5a..33566f9 100644 --- a/waybar/.config/waybar/config.jsonc +++ b/waybar/.config/waybar/config.jsonc @@ -17,6 +17,7 @@ "modules-right": [ "idle_inhibitor", "custom/ddcbrightness", + "custom/light-dark-mode", "pulseaudio", "network", "bluetooth", @@ -210,5 +211,16 @@ "format-ok": "", "system": true, // Monitor failed systemwide units. "user": true // Ignore failed user units. + }, + "custom/light-dark-mode": { + "exec": "/home/bca/.config/waybar/darkman", + "return-type": "json", + "format": "{icon}", + "tooltip": true, + "on-click": "darkman toggle", + "format-icons": { + "light": " ", + "dark": " " + } } } diff --git a/waybar/.config/waybar/darkman b/waybar/.config/waybar/darkman new file mode 100755 index 0000000..0105dd2 --- /dev/null +++ b/waybar/.config/waybar/darkman @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# vim: ft=bash + +print_json() { + case "$1" in + prefer-dark) + echo '{"text": "dark", "alt": "dark", "class": "dark", "tooltip": "Dark mode"}' + ;; + prefer-light) + echo '{"text": "light", "alt": "light", "class": "light", "tooltip": "Light mode"}' + ;; + esac +} + +print_json "$(gsettings get org.gnome.desktop.interface color-scheme | cut -nd"'" -f 2)" +gsettings monitor org.gnome.desktop.interface color-scheme | while read -r l; do + print_json "$(echo "$l" | cut -d"'" -f 2)" +done + diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index 2fd9d7b..5199f96 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -97,6 +97,7 @@ button:hover { #idle_inhibitor, #scratchpad, #power-profiles-daemon, +#customcustom-light-dark-mode, #custom-ddcbrightness, #idle_inhibitor, #mpd { diff --git a/wofi/.config/wofi/base.css b/wofi/.config/wofi/base.css new file mode 100644 index 0000000..2d0242b --- /dev/null +++ b/wofi/.config/wofi/base.css @@ -0,0 +1,42 @@ +#window { + background-color: @window-background; +} + +#outer-box { + margin: 10px; + background-color: @background; +} + +#entry{ + background-color: @background; +} + +#entry:selected { + background-color: @background-selected; +} + +#expander-box { + margin-left: 4em; +} + +expander { + color: @foreground; +} + +:not(expander) > * > .entry { + margin-left: 1.1em; +} + +image { + margin-right: 1em; +} + +#text { + color: @foreground; +} + +#input { + color: @foreground; + background-color: @background; + border: 0; +} diff --git a/wofi/.config/wofi/colors-dark.css b/wofi/.config/wofi/colors-dark.css new file mode 100644 index 0000000..1e1fdc3 --- /dev/null +++ b/wofi/.config/wofi/colors-dark.css @@ -0,0 +1,6 @@ +@define-color window-background rgba(255, 255, 255, 0.1); +@define-color background #002b36; +@define-color background-selected #073642; +@define-color foreground #839496; + + diff --git a/wofi/.config/wofi/colors-light.css b/wofi/.config/wofi/colors-light.css new file mode 100644 index 0000000..6e0caf1 --- /dev/null +++ b/wofi/.config/wofi/colors-light.css @@ -0,0 +1,5 @@ +@define-color window-background rgba(255, 255, 255, 0.1); +@define-color background #fdf6e3; +@define-color background-selected #eee8d5; +@define-color foreground #657b83; +