diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-01-16 13:30:08 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-01-16 13:30:08 +0100 |
| commit | aeb613133472da374bf292a66296f16e23d8fc6f (patch) | |
| tree | 4ac2b16da0e81d67c52cf87c149f3e6c1489470b | |
| parent | 909bd099a8bd90a246146e6753b4744a0599d7d2 (diff) | |
Enable hyprland gnome settings to set prefer-dark for all apps
| -rw-r--r-- | roles/hyprland/tasks/main.yml | 2 | ||||
| -rw-r--r-- | roles/hyprland/templates/hyprland/envs.conf.j2 | 14 | ||||
| -rw-r--r-- | roles/hyprtheme/files/scripts/theme-set | 14 |
3 files changed, 23 insertions, 7 deletions
diff --git a/roles/hyprland/tasks/main.yml b/roles/hyprland/tasks/main.yml index 93fb2743..2119d456 100644 --- a/roles/hyprland/tasks/main.yml +++ b/roles/hyprland/tasks/main.yml @@ -9,6 +9,8 @@ - "hyprlock" - "hypridle" - "hyprland" + - "xdg-desktop-portal-gtk" + - "xdg-desktop-portal-hyprland" - name: "Configure greetd" become: true diff --git a/roles/hyprland/templates/hyprland/envs.conf.j2 b/roles/hyprland/templates/hyprland/envs.conf.j2 index 51f7bc08..05ba1693 100644 --- a/roles/hyprland/templates/hyprland/envs.conf.j2 +++ b/roles/hyprland/templates/hyprland/envs.conf.j2 @@ -3,3 +3,17 @@ env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 + +# Force all apps to use Wayland +env = GDK_BACKEND,wayland,x11,* +env = QT_QPA_PLATFORM,wayland;xcb +env = QT_STYLE_OVERRIDE,kvantum +env = SDL_VIDEODRIVER,wayland +env = MOZ_ENABLE_WAYLAND,1 +env = ELECTRON_OZONE_PLATFORM_HINT,wayland +env = OZONE_PLATFORM,wayland +env = XDG_SESSION_TYPE,wayland + +# Allow better support for screen sharing (Google Meet, Discord, etc) +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_DESKTOP,Hyprland diff --git a/roles/hyprtheme/files/scripts/theme-set b/roles/hyprtheme/files/scripts/theme-set index 31a9bc73..61b7345e 100644 --- a/roles/hyprtheme/files/scripts/theme-set +++ b/roles/hyprtheme/files/scripts/theme-set @@ -39,13 +39,13 @@ fi killall -SIGUSR1 kitty >/dev/null 2>&1 || true killall -SIGUSR2 ghostty >/dev/null 2>&1 || true -# if [[ -f ~/.config/hyprtheme/current/light.mode ]]; 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 +if [[ -f ~/.config/hyprtheme/current/light.mode ]]; 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 # # Change gnome icon theme color # GNOME_ICONS_THEME=~/.config/hyprtheme/current/icons.theme |
