diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index e8e15ba..c7ec02a 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -9,6 +9,16 @@ desktop_default_session_env: xorg desktop_restart_emptty_automatically: false desktop_emptty_session_error_logging: disabled +desktop_ui_font_family: Noto Sans +desktop_ui_font_size: 10 +desktop_fixed_font_family: Hack Nerd Font +desktop_sway_font_size: 10 +desktop_alacritty_font_size: 12 +desktop_emacs_font_size: 14 +desktop_cursor_theme: Yaru +desktop_cursor_size: 24 +desktop_icon_theme: Yaru-orange-dark + desktop_common_packages: - brightnessctl - dex @@ -47,8 +57,11 @@ desktop_i3_packages: - xss-lock desktop_sway_packages: + - adw-gtk-theme - grim - kanshi + - qt5ct + - qt6ct - slurp - swayfx - wl-clipboard @@ -310,4 +323,14 @@ desktop_flatpak_packages: - org.telegram.desktop desktop_flatpak_extensions: - - org.gtk.Gtk3theme.Yaru-Blue-dark//stable + - org.gtk.Gtk3theme.Yaru-Orange-dark//3.22 + +desktop_flatpak_global_filesystems: + - xdg-config/gtk-3.0:ro + - xdg-config/gtk-4.0:ro + - xdg-config/qt5ct:ro + - xdg-config/qt6ct:ro + +desktop_flatpak_global_env: + - QT_QPA_PLATFORM=wayland + - QT_QPA_PLATFORMTHEME=qt6ct diff --git a/ansible/roles/profile_desktop_sway/tasks/main.yml b/ansible/roles/profile_desktop_sway/tasks/main.yml index da33ed4..254ed07 100644 --- a/ansible/roles/profile_desktop_sway/tasks/main.yml +++ b/ansible/roles/profile_desktop_sway/tasks/main.yml @@ -10,6 +10,10 @@ loop: - "{{ user_home }}/.config/sway" - "{{ user_home }}/.config/kanshi" + - "{{ user_home }}/.config/qt5ct" + - "{{ user_home }}/.config/qt5ct/colors" + - "{{ user_home }}/.config/qt6ct" + - "{{ user_home }}/.config/qt6ct/colors" when: "'sway' in (desktop_sessions_enabled | default([]))" - name: Ensure Noctalia config directories exist @@ -69,6 +73,26 @@ mode: "0644" when: "'sway' in (desktop_sessions_enabled | default([]))" +- name: Render qt5ct config + tags: [dotfiles, dotfiles:desktop, sway, noctalia] + ansible.builtin.template: + src: qt5ct.conf.j2 + dest: "{{ user_home }}/.config/qt5ct/qt5ct.conf" + owner: "{{ username }}" + group: "{{ user_group }}" + mode: "0644" + when: "'sway' in (desktop_sessions_enabled | default([]))" + +- name: Render qt6ct config + tags: [dotfiles, dotfiles:desktop, sway, noctalia] + ansible.builtin.template: + src: qt6ct.conf.j2 + dest: "{{ user_home }}/.config/qt6ct/qt6ct.conf" + owner: "{{ username }}" + group: "{{ user_group }}" + mode: "0644" + when: "'sway' in (desktop_sessions_enabled | default([]))" + - name: Manage Noctalia shell plugins tags: [dotfiles, dotfiles:desktop, sway, noctalia] ansible.builtin.include_tasks: noctalia.yml @@ -83,3 +107,37 @@ group: "{{ user_group }}" mode: "0644" when: "'sway' in (desktop_sessions_enabled | default([]))" + +- name: Allow Flatpak apps to read shared theme configs + tags: [packages, dotfiles, dotfiles:desktop, sway, noctalia] + ansible.builtin.command: + argv: + - flatpak + - override + - --user + - "--filesystem={{ item }}" + become_user: "{{ username }}" + environment: + HOME: "{{ user_home }}" + changed_when: false + loop: "{{ desktop_flatpak_global_filesystems | default([]) }}" + when: + - "'sway' in (desktop_sessions_enabled | default([]))" + - (desktop_flatpak_packages | default([])) | length > 0 + +- name: Export global Flatpak environment for theme integration + tags: [packages, dotfiles, dotfiles:desktop, sway, noctalia] + ansible.builtin.command: + argv: + - flatpak + - override + - --user + - "--env={{ item }}" + become_user: "{{ username }}" + environment: + HOME: "{{ user_home }}" + changed_when: false + loop: "{{ desktop_flatpak_global_env | default([]) }}" + when: + - "'sway' in (desktop_sessions_enabled | default([]))" + - (desktop_flatpak_packages | default([])) | length > 0 diff --git a/ansible/roles/profile_desktop_sway/templates/noctalia-settings.json.j2 b/ansible/roles/profile_desktop_sway/templates/noctalia-settings.json.j2 index b375623..b847cb4 100644 --- a/ansible/roles/profile_desktop_sway/templates/noctalia-settings.json.j2 +++ b/ansible/roles/profile_desktop_sway/templates/noctalia-settings.json.j2 @@ -561,15 +561,17 @@ {"enabled": true, "id": "alacritty"}, {"enabled": true, "id": "gtk"}, {"enabled": true, "id": "emacs"}, - {"enabled": true, "id": "telegram"} + {"enabled": true, "id": "telegram"}, + {"enabled": true, "id": "qt"}, + {"enabled": true, "id": "sway"} ], "enableUserTheming": false }, "ui": { "boxBorderEnabled": false, - "fontDefault": "Sans Serif", + "fontDefault": "{{ desktop_ui_font_family | default('Noto Sans') }}", "fontDefaultScale": 1, - "fontFixed": "monospace", + "fontFixed": "{{ desktop_fixed_font_family | default('Hack Nerd Font') }}", "fontFixedScale": 1, "panelBackgroundOpacity": 0.93, "panelsAttachedToBar": true, diff --git a/ansible/roles/profile_desktop_sway/templates/qt5ct.conf.j2 b/ansible/roles/profile_desktop_sway/templates/qt5ct.conf.j2 new file mode 100644 index 0000000..8430045 --- /dev/null +++ b/ansible/roles/profile_desktop_sway/templates/qt5ct.conf.j2 @@ -0,0 +1,6 @@ +[Appearance] +color_scheme_path={{ user_home }}/.config/qt5ct/colors/noctalia.conf +custom_palette=true +icon_theme={{ desktop_icon_theme | default('Yaru-orange-dark') }} +standard_dialogs=default +style=Fusion diff --git a/ansible/roles/profile_desktop_sway/templates/qt6ct.conf.j2 b/ansible/roles/profile_desktop_sway/templates/qt6ct.conf.j2 new file mode 100644 index 0000000..5486b68 --- /dev/null +++ b/ansible/roles/profile_desktop_sway/templates/qt6ct.conf.j2 @@ -0,0 +1,6 @@ +[Appearance] +color_scheme_path={{ user_home }}/.config/qt6ct/colors/noctalia.conf +custom_palette=true +icon_theme={{ desktop_icon_theme | default('Yaru-orange-dark') }} +standard_dialogs=default +style=Fusion diff --git a/dotfiles/desktop/.config/alacritty/alacritty.toml b/dotfiles/desktop/.config/alacritty/alacritty.toml index 8041e59..566b74c 100644 --- a/dotfiles/desktop/.config/alacritty/alacritty.toml +++ b/dotfiles/desktop/.config/alacritty/alacritty.toml @@ -1,3 +1,6 @@ +[general] +import = ["~/.config/alacritty/themes/noctalia.toml"] + [window] padding = { x = 8, y = 8 } opacity = 1.0 @@ -13,30 +16,6 @@ multiplier = 3 [cursor] style = { shape = "Beam", blinking = "Off" } -[colors.primary] -background = "#000000" -foreground = "#c8c8c8" - -[colors.normal] -black = "#1f1f28" -red = "#c7162b" -green = "#4caf50" -yellow = "#e95420" -blue = "#4a90d9" -magenta = "#7e57c2" -cyan = "#6daeea" -white = "#eeeeee" - -[colors.bright] -black = "#3a3a46" -red = "#ff5c5c" -green = "#7ad97a" -yellow = "#ff8f40" -blue = "#6daeea" -magenta = "#9575cd" -cyan = "#8bd6ff" -white = "#ffffff" - [keyboard] bindings = [ { key = "V", mods = "Control|Shift", action = "Paste" }, diff --git a/dotfiles/desktop/.config/noctalia/plugins/clipper/settings.json b/dotfiles/desktop/.config/noctalia/plugins/clipper/settings.json index f0d0259..ff4b3d0 100644 --- a/dotfiles/desktop/.config/noctalia/plugins/clipper/settings.json +++ b/dotfiles/desktop/.config/noctalia/plugins/clipper/settings.json @@ -38,43 +38,7 @@ "fg": "mOnError" } }, - "customColors": { - "Text": { - "bg": "#555555", - "separator": "#000000", - "fg": "#e9e4f0" - }, - "Image": { - "bg": "#e0b7c9", - "separator": "#000000", - "fg": "#20161f" - }, - "Link": { - "bg": "#c7a1d8", - "separator": "#000000", - "fg": "#1a151f" - }, - "Code": { - "bg": "#a984c4", - "separator": "#000000", - "fg": "#f3edf7" - }, - "Color": { - "bg": "#a984c4", - "separator": "#000000", - "fg": "#f3edf7" - }, - "Emoji": { - "bg": "#e0b7c9", - "separator": "#000000", - "fg": "#20161f" - }, - "File": { - "bg": "#e9899d", - "separator": "#000000", - "fg": "#1e1418" - } - }, + "customColors": {}, "enableTodoIntegration": true, "autoOpenPinnedPanel": false, "pincardsEnabled": true, diff --git a/dotfiles/desktop/.config/sway/config b/dotfiles/desktop/.config/sway/config index 3b653c3..1eea6b9 100644 --- a/dotfiles/desktop/.config/sway/config +++ b/dotfiles/desktop/.config/sway/config @@ -6,7 +6,7 @@ set $fallback_terminal st include ~/.config/sway/host.conf include ~/.config/sway/shell.conf -font pango:Liberation Mono 10 +font pango:Hack Nerd Font 10 # Input and output defaults seat seat0 xcursor_theme Yaru 24 @@ -166,9 +166,4 @@ mode "resize" { bindsym $mod+r mode "resize" -client.focused #4a90d9 #4a90d9 #ffffff #4a90d9 #4a90d9 -client.focused_inactive #3a3a46 #2b2b36 #eeeeee #3a3a46 #3a3a46 -client.unfocused #2b2b36 #1f1f28 #bcbcbc #2b2b36 #2b2b36 -client.urgent #c7162b #c7162b #ffffff #c7162b #c7162b -client.placeholder #1f1f28 #1f1f28 #bcbcbc #1f1f28 #1f1f28 -client.background #1f1f28 +include ~/.config/sway/noctalia diff --git a/dotfiles/desktop/.emacs.d/lisp/core/ui.el b/dotfiles/desktop/.emacs.d/lisp/core/ui.el index 711b398..6657044 100644 --- a/dotfiles/desktop/.emacs.d/lisp/core/ui.el +++ b/dotfiles/desktop/.emacs.d/lisp/core/ui.el @@ -1,16 +1,14 @@ ;;; core-ui.el -*- lexical-binding: t; -*- -;; Load default theme -(use-package nordic-night-theme - :ensure t) - -(load-theme 'nordic-night t) +;; Load generated Noctalia theme. +(add-to-list 'custom-theme-load-path (expand-file-name "themes" user-emacs-directory)) +(load-theme 'noctalia t) ;; Setting default font -(set-frame-font "Liberation Mono 14" nil t) +(set-frame-font "Hack Nerd Font 14" nil t) (add-to-list 'default-frame-alist - '(font . "Liberation Mono-14")) + '(font . "Hack Nerd Font-14")) ;; Remove toolbar (tool-bar-mode -1) diff --git a/dotfiles/desktop/.local/bin/setup-gtk-theme b/dotfiles/desktop/.local/bin/setup-gtk-theme index 33e5419..76e0299 100644 --- a/dotfiles/desktop/.local/bin/setup-gtk-theme +++ b/dotfiles/desktop/.local/bin/setup-gtk-theme @@ -1,15 +1,13 @@ #!/bin/sh -THEME="Yaru-blue-dark" -ICONS="Yaru-blue-dark" +ICONS="Yaru-orange-dark" CURSOR="Yaru" -FONT_UI="Liberation Sans 10" +FONT_UI="Noto Sans 10" mkdir -p "$HOME/.config/gtk-3.0" mkdir -p "$HOME/.config/gtk-4.0" cat > "$HOME/.gtkrc-2.0" < "$HOME/.config/gtk-3.0/settings.ini" < "$HOME/.config/gtk-4.0/settings.ini" </dev/null 2>&1; then - gsettings set org.gnome.desktop.interface gtk-theme "$THEME" >/dev/null 2>&1 || true gsettings set org.gnome.desktop.interface icon-theme "$ICONS" >/dev/null 2>&1 || true gsettings set org.gnome.desktop.interface cursor-theme "$CURSOR" >/dev/null 2>&1 || true + gsettings set org.gnome.desktop.interface font-name "$FONT_UI" >/dev/null 2>&1 || true gsettings set org.gnome.desktop.interface color-scheme prefer-dark >/dev/null 2>&1 || true fi diff --git a/dotfiles/desktop/Pictures/Wallpapers/star-wars-trio.jpg b/dotfiles/desktop/Pictures/Wallpapers/star-wars-trio.jpg new file mode 100644 index 0000000..a3f73d4 Binary files /dev/null and b/dotfiles/desktop/Pictures/Wallpapers/star-wars-trio.jpg differ diff --git a/dotfiles/nymph/.config/sway/session-env b/dotfiles/nymph/.config/sway/session-env index 89b6647..4a16e3a 100644 --- a/dotfiles/nymph/.config/sway/session-env +++ b/dotfiles/nymph/.config/sway/session-env @@ -1,4 +1,6 @@ export LIBVA_DRIVER_NAME=iHD +export QT_QPA_PLATFORM=wayland +export QT_QPA_PLATFORMTHEME=qt6ct export SWAY_UNSUPPORTED_GPU=1 export WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 export WLR_NO_HARDWARE_CURSORS=1