main/postmarketos-ui-xfce4: move configs to /etc/xdg & clean-ups
Trigger of this MR was issue #1418 (closed): The path of the pmOS icon needs to be updated in the configs.
However, this also brought up the topic of installing the configs to a new location:
- Currently the configs of xfce4-phone repository are installed at /etc/skel/.config. Upon creation of a user, they are one-time-copied to ~/.config altogether. From then on, they are independent from /etc/skel/.config.
- They better should be installed to /etc/xdg. There they serve as a default config. Changes made by the user will be stored at ~/.config and override the default config at /etc/xdg. The priority of configs files will be:
- ~/.config/xfce4 -> changes by the user, however also the system creates some files automatically
- /etc/xdg/xfce4-phone -> default configs from xfce4-phone repository
- /etc/xdg/xfce4 -> default configs from upstream
Though this MR wouldn't have preventes the pmOS icon from disappearing. whiskermenu saves a config file to ~/.config/xfce4/panel. It also contains the icon path of the button, so this one wouldn't have been updated by changing the configs at /etc/xdg/xfce4-phone
Nevertheless, with the new approach, restoring the default configs becomes easier. It's sufficient to delete or move the folder ~/.config/xfce4. Right now this doesn't work, it restores the upstream Xfce4 configs, which look totally different. With this MR merged, it falls back to the pmOS Xfce4 configs.
To make sure that the configs in /etc/xdg/xfce4-phone have a higher priority than the upstream configs in /etc/xdg/xfce4, the new file /etc/profile.d/xfce4-phone.sh alters the $XDG_CONFIG_DIRS environment variable accordingly.
In future, this new config handling could also be used to override the default configs for customization like disabling compositing on certain devices (#1162 (closed)) or special configs for high-resolution screens (#293 (closed)). An additional config folder like e.g. "config_hi-res" would need be implemented at xfce4-phone repository, install it to "/etc/xdg/xfce4-phone_hi-res" and add a new file "/etc/profile.d/xfce4-phone_hi-res.sh" to set the priorities to "/etc/xdg/xfce4-phone_hi-res:/etc/xdg/xfce4-phone".
I wasn't able to get the gtk-3.0 configs working at /etc/xdg. Therefore they remain at /etc/skel.
In the first line of package()
, I changed install -d -m755
to mkdir -p
. It's better readable and the result should be the same.
Changes in postmarketos-ui-xfce4:
- move custom xfce4 configs to /etc/xdg/xfce4-phone
- move custom onboard autostart to /etc/xdg/xfce4-phone
- add /etc/profile.d/xfce4-phone.sh to set the config priority
Changes in xfce4-phone repository (xfce4-phone!9 (merged)):
- Change icon path of whiskermenu button to new location
- Prepare for moving configs to new install directory in /etc/xdg
- Apply pmOS wallpaper to more monitors
- Clean-up: remove desktop files of launchers-13, -14, -15
- Clean-up: move panel default to panel folder
- Clean-up: remove dpi value from from xsettings-xml
- Clean-up: remove DecorationLayout from xsettings-xml
- Clean-up: reduce xfwm4.xml to config snippet
- Clean-up: reduce whiskermenu-1.rc to config snippet
- Clean-up: remove keyboard-shortcuts
This MR is marked as draft because of the workflow:
-
First MR xfce4-phone!9 (merged) needs to be approved and merged. -
Someone needs to add a new tag 0.5.1 in xfce4-phone repository. -
Then I'll change this MR to the new tag.