Make light mode possible via gsettings based off a marker

This commit is contained in:
David Heinemeier Hansson
2025-07-16 21:48:14 -07:00
parent 9a2d8852d3
commit 6542784559
5 changed files with 22 additions and 22 deletions

View File

@ -1,10 +0,0 @@
[Desktop Entry]
Name=Bluetooth
Comment=Configure Bluetooth settings
Icon=bluetooth
Exec=env GTK_THEME=Adwaita-dark blueberry
Terminal=false
Type=Application
Categories=GTK;GNOME;Settings;HardwareSettings;X-XFCE-SettingsDialog;X-XFCE-HardwareSettings;
StartupNotify=true
NotShowIn=GNOME;KDE;Unity;

View File

@ -1,10 +0,0 @@
[Desktop Entry]
Version=1.0
Name=Volume Control
Comment=Adjust the volume level
Exec=env GTK_THEME=Adwaita-dark pavucontrol
Icon=multimedia-volume-control
StartupNotify=true
Type=Application
Categories=AudioVideo;Audio;Mixer;GTK;Settings;X-XFCE-SettingsDialog;X-XFCE-HardwareSettings;
Keywords=pavucontrol;PulseAudio;Microphone;Volume;Fade;Balance;Headset;Speakers;Headphones;Audio;Mixer;Output;Input;Devices;Playback;Recording;System Sounds;Sound Card;Settings;Preferences;

View File

@ -25,6 +25,15 @@ fi
ln -nsf "$BACKGROUND_PATH" "$HOME/.config/omarchy/current/backgrounds" ln -nsf "$BACKGROUND_PATH" "$HOME/.config/omarchy/current/backgrounds"
ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR" ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR"
# Change gnome modes
if [[ -f ~/.config/omarchy/current/theme/light.marker ]]; then
gsettings set org.gnome.desktop.interface color-scheme "prefer-light"
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita"
else
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
fi
# Trigger alacritty config reload # Trigger alacritty config reload
touch "$HOME/.config/alacritty/alacritty.toml" touch "$HOME/.config/alacritty/alacritty.toml"

View File

@ -92,11 +92,11 @@
"format-disabled": "󰂲", "format-disabled": "󰂲",
"format-connected": "", "format-connected": "",
"tooltip-format": "Devices connected: {num_connections}", "tooltip-format": "Devices connected: {num_connections}",
"on-click": "GTK_THEME=Adwaita-dark blueberry" "on-click": "blueberry"
}, },
"pulseaudio": { "pulseaudio": {
"format": "{icon}", "format": "{icon}",
"on-click": "GTK_THEME=Adwaita-dark pavucontrol", "on-click": "pavucontrol",
"on-click-right": "pamixer -t", "on-click-right": "pamixer -t",
"tooltip-format": "Playing at {volume}%", "tooltip-format": "Playing at {volume}%",
"scroll-step": 5, "scroll-step": 5,

11
migrations/1752725616.sh Normal file
View File

@ -0,0 +1,11 @@
echo "Make light themes possible"
if [[ -f ~/.local/share/applications/blueberry.desktop ]]; then
rm -f ~/.local/share/applications/blueberry.desktop
rm -f ~/.local/share/applications/org.pulseaudio.pavucontrol.desktop
update-desktop-database ~/.local/share/applications/
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
omarchy-refresh-waybar
fi