A few theme problems in Sway

Hi there,

I am having problems with a few issues on Manjaro Sway on my Pinebook Pro, which are below:

  1. cursor theme inconsistency: The cursor is seemingly set to breeze. However, when I move the cursor to blank workspace over the wallpaper, the cursor theme is switching to another theme “adwaita” I believe. How can this be solved?

  2. font size in qt/kde applications: I am changing the font size in Qt 5 settings application. However, I lose the saved settings after rebooting. How can I make this persistent?

  3. Changing the default theme: I am curious if there is any detailed instructions on how to change the default theme including “gtk” and “fonts”. If not, can anyone make a post about how to change theme settings in Manjaro Sway?

Any help would be appreciated.

i add all the theme stuff to ~/.config/sway/config.d/00-user.conf.

set theme

set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme “Matcha-light-azul”
gsettings set $gnome-schema icon-theme “Papirus-Light”
gsettings set $gnome-schema cursor-theme “Adwaita”
gsettings set $gnome-schema font-name “Sans 12”
}

set $gtk-theme Matcha-light-azul
set $icon-theme Papirus-Light
set $cursor-theme Adwaita
set $gui-font Sans 12
set $term-font Monospace 14
set $kvantum-theme Matcha-light-azul

background

set $background /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png
output * bg $background fill

also for the main, there is 2 choices blue or green.
~/.config/sway/config.d/user-definitons

styles - matcha-green or matcha-blue

set $theme /etc/sway/themes/matcha-blue

Thank you for the detailed response, which I appreciate. I want to stay with the dark theme; however, with blue version if possible.

My other two issues are a bit more important. Font size is too small for me to read esp. for qt applications. I want to make it at 11pt or 12pt.

Also, the cursor theme issue is a bit distracting too. When there is the blank sway session, the cursor theme switches from adwaita to breeze whenever I move the cursor on top of the waybar.

that’s not a problem, wherever you see “Light” change to “Dark”, i’m old with bad eye’s so i need light.

i have no qt apps, so never looked into qt fonts.

the cursor theme i could not fix, so i just put it on Adwaita to be less annoyed. i have my cursor set to disapper(unclutter) so it really don’t matter to me as it only shows when i move the mouse.

mouse settings

focus_follows_mouse no
seat * hide_cursor 5000

I am confused on the configuration files. There seems to be two files, one in ./config/sway/user-definitions while the other one ./config/sway/config.d/00-user.conf. I already used the user-definitions file in setting up my modifier key to pine and some shortcuts. Both files have some commented settings regarding change of theme. Do I to need to uncomment them? If so, which one?

Also, the gtk settings you have indicated in the snippet (your first message), do I still need to apply them as well? They seem to be overlapping with the existing information so I am confused here. I have dconf-editor here to try but I doubt it saves the modified settings to 00-user.conf.

I have qt applications that I can’t replace with a gtk/gnome one. FreeCAD, Gnu Octave have no alternatives in gtk world. So I am confined to use qt applications. There is Qt5 editor installed by default, which I use to change the font size. It is reverting back to the original size after a reboot. This makes me scratch my head.

00-user.conf is the main config, most everything goes in there to configure sway.
user-definitions is for certain things that just don’t work in 00-user.conf, like that 1 theme setting, it won’t work in the main config.

The modifier key? It seems not working if I set it in 00-user.conf file.

I do not understand how the settings are changed in Manjaro sway; so, I will keep on using the defaults up until I see a clear explanation. I do not want to change settings on dconf-editor either as I am not sure if it breaks anything.

I wish I could fix at least the Qt font size. It is small and I don’t seem to find a way for changing it.

qt settings in in the menu, press alt+d, type qt, should come to top.

Yes, I have “Qt5 Settings” that comes by default installation of Manjaro Sway. I am able to select a font and apply the font to qt5 applications. The problem is occuring when I logout/shutdown and boot/login again. The fonts I select are not preserved and I am presented with the same small “Cantarell” fonts at 10px set for both default and the fixed font options.

I guess you would likely have the same issue if you are using the default Manjaro Sway edition.

Is this a bug?

did you click the “create fonts.conf” button?

yes, it’s a bug. i just tested the reboot & everything was rest.

No, I feared I could break something as I am not 100% sure what I am doing.

I know other distros using gnome, xfce etc. that I used Qt5 Settings and successfully changed the font on Qt applications effortlessly. This just doesn’t make sense.

Ok, at least I know that I am not alone.

I wish I could eliminate Qt applications from the gtk based environment but it will not happen. I have qt based applications indispensable for me.

Same goes if I go with a Qt based environment. I remember trying Emacs (gtk+) on Kde which turned out to be a problem.

How will we report this bug?

Hey,

To share some insights here:

The important file to understand the sequence of file imports during the initialization of sway is ~/.config/sway/config (overlays/sway/etc/skel/.config/sway/config · master · manjaro-arm / applications / arm-profiles · GitLab). As you can see there it first loads a file with common definitions for things like the super and meta key, the theme to use as well as what’s the terminal and the application launcher (default settings in /etc/sway/definitions - overlays/sway/etc/sway/definitions · master · manjaro-arm / applications / arm-profiles · GitLab). To make it easier to override some of those it will load the content of the user-definitions next. So if you want to change something like this it has to go into there…

Then it loads the default input/output definitions as well as modes (mainly used for screenshooting or screen recording). After that it runs everything that is defined in /etc/sway/conf.d, whose files are mainly used for things like setting up the GNOME/QT themes and running some autostart applications. To add the possibility to put things on top of the default there is the ~/.config/sway/conf.d/ directory in which you can add additional files that will be sourced at the end of the init procedure….

For the font settings in KDE/QT apps the bug is to be found here:

It looks like the font settings are somewhat encoded in the configuration file and as such can’t be easily replaced via a sed script triggered as part of the autostart (overlays/sway/etc/sway/config.d/91-enable-kvantum-theme · master · manjaro-arm / applications / arm-profiles · GitLab). Will have to check how I can update the font config for QT…

Awesome customization for the sway theme. Do you have your dotfiles online? Can check if I include a matcha-light theme as part of the default installation…

my 00-user.conf:

add your customizations here

set app

set $menu wofi --show “drun” --prompt “Applications” --xoffset 0
set $term_float_portrait $term --name=floating_shell_portrait –
set $term_float_landscape $term --name=floating_shell_landscape –
set $term gnome-terminal

cpu / mem monitors

set $cpu_mon ‘htop --sort-key=PERCENT_CPU’
set $mem_mon ‘htop --sort-key=PERCENT_MEM’

set borders

gaps inner 4
gaps outer 2
smart_gaps on
default_border pixel 4

mouse settings

focus_follows_mouse no
seat * hide_cursor 5000

bind keys

bindsym $mod+x kill
bindsym --release Super_L exec $menu
bindsym Print exec grimshot save screen ~/Pictures/$(date +%H-%m-%s).png
bindsym $mod+F2 exec firefox
bindsym $mod+F3 exec nautilus

execute command

exec nautilus --gapplication-service

float apps

for_window [app_id=“yad”] floating enable
for_window [app_id=“zenity”] floating enable

set theme

set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme “Matcha-light-azul”
gsettings set $gnome-schema icon-theme “Papirus-Light”
gsettings set $gnome-schema cursor-theme “Adwaita”
gsettings set $gnome-schema font-name “Sans 12”
}

set $gtk-theme Matcha-light-azul
set $icon-theme Papirus-Light
set $cursor-theme Adwaita
set $gui-font Sans 12
set $term-font Monospace 14
set $kvantum-theme Matcha-light-azul

background

set $background /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png
output * bg $background fill

1 Like

my waybar config:

[
{ “layer”: “top”,
“position”: “top”,
“height”: 32,

"modules-left": ["custom/menu"],
"modules-center": ["clock"],
"modules-right": ["tray", "network", "pulseaudio", "custom/exit"],

"custom/menu": {
    "format": " Apps ",
    "on-click": "swaymsg exec \\$menu",
    "tooltip": false
},

 "custom/exit": {
        "tooltip": false,
        "format": " ⏻ ",
        "on-click": "swaynag -f 'Sans 12' -m 'Do you really want to exit?' -b ' Logout ' 'swaymsg exit' -b ' Reboot ' 'systemctl reboot' -b ' Shutdown ' 'systemctl poweroff' -s ' Cancel ' -e top"
  },

"clock": {
    "format": "{:%a %d %b %l:%M %p}",
    "tooltip": true,
    "tooltip-format": "<small>{:%B %Y}</small>\n<tt><big>{calendar}</big></tt>",
    "on-click": "swaymsg exec 'yad --calendar'"
 },

"network": {
    "interval": 5,
    "format-wifi": "", // Icon: wifi
    "format-ethernet": " {ifname}", // Icon: ethernet
    "format-disconnected": "⚠ Disconnected",
    "tooltip-format": "{ifname}: {ipaddr} {essid} ({signalStrength}%)",
    "on-click": "swaymsg exec \\$term_float_portrait nmtui"
},

"pulseaudio": {
    //"scroll-step": 1,
    "format": "{icon} {volume}%",
    "format-bluetooth": "{icon} {volume}%",
    "format-muted": "",
    "format-icons": {
        "headphones": "",
        "handsfree": "",
        "headset": "",
        "phone": "",
        "portable": "",
        "car": "",
        "default": ["", ""]
    },
    "on-click": "swaymsg exec \\$pulseaudio"
},

"tray": {
    "icon-size": 24,
    "spacing": 5
},

},

{ “layer”: “top”,
“position”: “bottom”,
“height”: 32,

"modules-left": ["sway/workspaces", "custom/terminal", "custom/files", "custom/firefox", "sway/window", "sway/modes"],
"modules-center": [],
"modules-right": ["cpu", "memory", "temperature"],

"sway/window": {
    "format": "  {}",
    "on-click": "swaymsg kill"
 },

"cpu": {
    "interval": 5,
    "format": " {usage}%", // Icon: microchip
    "states": {
        "warning": 70,
        "critical": 90
    },
    "on-click": "swaymsg exec \"\\$term_float_landscape '\\$cpu_mon'\""
},

"memory": {
    "interval": 5,
    "format": " {}%", // Icon: memory
    "states": {
        "warning": 70,
        "critical": 90
    },
    "on-click": "swaymsg exec \"\\$term_float_landscape '\\$mem_mon'\""
},

"temperature": {
  "critical-threshold": 70,
  "interval": 5,
  "format": "{icon} {temperatureC}°C",
  "format-icons": [
      "", // Icon: temperature-empty
      "", // Icon: temperature-quarter
      "", // Icon: temperature-half
      "", // Icon: temperature-three-quarters
      ""  // Icon: temperature-full
  ],
  "tooltip": false
},

"bluetooth": {
    "format": "{icon}",
    "interval": 30,
    "format-icons": {
        "enabled": "",
        "disabled": ""
    },
    "on-click": "blueman-manager",
    "tooltip-format": "{}"
},
    "custom/firefox": {
        "tooltip": false,
        "format": "   ",
        "on-click": "swaymsg exec 'firefox'"
    },
    "custom/files": {
        "tooltip": false,
        "format": "  ",
        "on-click": "swaymsg exec 'nautilus -w'"
    },
    "custom/terminal": {
        "tooltip": false,
        "format": "   ",
        "on-click": "swaymsg exec \\$term"
    },

}
]

1 Like

alright, time for a work around.
use the qt settings.
chmod 0444 ~/.config/qt5ct/qt5ct.conf

reboot to test