MSM Next Generation

I would like to present an alpha version of new Manjaro Settings Manager

It’s still WIP but already has some functionality.

Most noticeable features/changes are:

  • Logic is separated from GUI so we will have GTK and Qt versions (and maybe TUI version later)
  • Pamac backend is used instead of pacman CLI
  • New modern UI respecting GNOME and KDE guidelines
  • Removed modules of settings that can be configured in DE - locale, date and time, keyboard.

Manjaro Hello will become a part of MSM to get more tight integration between system utilities. Also there are plans to replace MHWD with Solus’ Linux Driver Management library.

Screenshots of Qt version:

  • Manjaro Hello - more or less a mockup, not yet functional, but will get updates soon

  • Kernel Manager - fully working. Will get some more indication soon (already implemented just needs adjustments from repository side)

  • Lanugage packs - works more or less as intended

GTK has only kernel management mockup for now but it’s not hard to implement everything.

Any feedback is highly appreciated.

14 Likes

GIT PKGBUILD (Thanks to @Yochanan for corrections) :

# Maintainer: Artyom Grinyov (LordTermor)

pkgbase=msm-ng
pkgname=('msm-ng-core-git' 'msm-ng-qt-git')
pkgver=r18.5ef0335
pkgrel=1
pkgdesc="Manjaro Settings"
arch=('x86_64')
url="https://gitlab.com/LordTermor/msm-ng"
license=('GPL3')
depends=('libsigc++' 'nlohmann-json' 'pamac-common' 'linux-driver-management'
         'qt5-base>=5.15.0' 'qt5-quickcontrols2' 'qqc2-desktop-style'
         'qt5-webengine' 'gtkmm3')
makedepends=('git' 'cmake')
#options=('!emptydirs')
source=('git+https://gitlab.com/LordTermor/msm-ng.git')
sha256sums=('SKIP')

pkgver() {
  cd msm-ng
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cmake -B build -S msm-ng \
    -DCMAKE_INSTALL_PREFIX=/usr
  make -C build
}

package_msm-ng-core-git() {
  pkgdesc="Manjaro Settings - core library"
  depends=('libsigc++' 'nlohmann-json' 'pamac-common' 'linux-driver-management')
  provides=("${pkgname%-git}" 'libmsm.so=libmsm.so-64')
  conflicts=("${pkgname%-git}")

  make -C build/libmsm DESTDIR="$pkgdir" install
}
package_msm-ng-qt-git() {
  pkgdesc="Manjaro Settings - Qt GUI"
  depends=('qt5-base>=5.15.0' 'qt5-quickcontrols2' 'qqc2-desktop-style'
           'qt5-webengine' 'msm-ng-core-git')
  provides=("${pkgname%-git}")
  conflicts=("${pkgname%-git}")

  make -C build/msm-qt DESTDIR="$pkgdir" install
}

package_msm-ng-gtk-git() {
  pkgdesc="Manjaro Settings - GTK GUI"
  depends=('gtkmm3' 'msm-ng-core-git')
  provides=("${pkgname%-git}")
  conflicts=("${pkgname%-git}")

  make -C build/msm-gtk DESTDIR="$pkgdir" install
}

Can you explain this a bit more in detail? Is Pamac mandatory to use the new MSM?

It would sure look like it, from the PKGBUILD.

Pamac library (pamac-common package) is needed not pamac itself

5 Likes

Pretty!

So, if hello gets replaced by msm, shall we plug also gnome-layout-switcher switcher in there like we did with manjaro hello? If yes, then making the layout switcher work with kde too becomes appealing.

There are such plans, sure! However I will need to think how to make separate modules and how to distribute them. Maybe making packages like msm-modules-kde (or -gnome)? Hmm :thinking:

The way the current layout looks, it could also fit nicely as blades in gnome-control-center too. Do you think we should go there, like Ubuntu has? Or is it too much extra work.

This indeed is the idea. But as Ubuntu devs stated there is too much work to achieve this. If there will be some standard interface to integrate third-party modules to Gnome Control Settings then MSM will be there just like KCMs for Qt version.

UPD: I still need someone with Glade skills to help me with GTK UI

Good job looks great @LordTermor :+1:

1 Like

uh… YES PLEASE! I love TUI programs!

It’s just only matter of time. Already found good C++ library for ncurses

You can look at what spotify-tui uses, or even pacui

I will. Thank you!

Btw, there is also mhwd-tui tui already integrated into bmenu, the official Manjaro cli main menu. It does kernel management and driver switching with mhwd.

All these comments and it’s obvious no one attempted to build it. :stuck_out_tongue_winking_eye:

This fails to build in a clean chroot, FYI.

PKGBUILD critique:

  • The pkgbase should be msm-ng. Look at the pamac PKGBUILD for an example.
  • msm-ng-gtk-git is missing from the pkgname() array
  • The _pkgver variable is never used
  • No reason to specify i686 in the arch() array, it’s not supported
  • Almost all the dependencies required to build are missing as they’re only specified in the individual package() functions (see PKGBUILD diff below)
  • nlohmann-json is a missing dependency:
    -- Checking for module 'nlohmann_json'
    --   Package 'nlohmann_json', required by 'virtual:world', not found
  • No need to create a build directory manually, see Cmake package guidelines: Specifying directories
  • The pkgver() function should be first. I suppose it’s cosmetic, but it’s run before anything else.
  • VCS packages need to provide and conflict with the main package (see PKGBUILD diff below)
    .
PKGBUILD diff
❯ batdiff PKGBUILD-orig PKGBUILD
───────┬───────────────────────────────────────────────────────────────────────────────────
       β”‚ STDIN
───────┼───────────────────────────────────────────────────────────────────────────────────
   1   β”‚ --- PKGBUILD-orig   2020-10-12 17:36:07.974445603 -0600
   2   β”‚ +++ PKGBUILD    2020-10-12 17:25:49.631593916 -0600
   3   β”‚ @@ -1,54 +1,53 @@
   4   β”‚ -pkgbase=msm-ng-core
   5   β”‚ -pkgname=('msm-ng-core-git' 'msm-ng-qt-git')
   6   β”‚ -_pkgver=0.1
   7   β”‚ -pkgver=r17.0fe4570
   8   β”‚ +pkgbase=msm-ng
   9   β”‚ +pkgname=('msm-ng-core-git' 'msm-ng-qt-git' 'msm-ng-gtk-git')
  10   β”‚ +pkgver=r18.5ef0335
  11   β”‚  pkgrel=1
  12   β”‚  pkgdesc="Manjaro Settings"
  13   β”‚ -arch=('i686' 'x86_64')
  14   β”‚ +arch=('x86_64')
  15   β”‚  url="https://gitlab.com/LordTermor/msm-ng"
  16   β”‚  license=('GPL3')
  17   β”‚ -depends=('libsigc++')
  18   β”‚ +depends=('libsigc++' 'nlohmann-json' 'pamac-common' 'linux-driver-management'
  19   β”‚ +         'qt5-base>=5.15.0' 'qt5-quickcontrols2' 'qqc2-desktop-style'
  20   β”‚ +         'qt5-webengine' 'gtkmm3')
  21   β”‚  makedepends=('git' 'cmake')
  22   β”‚ -options=(!emptydirs)
  23   β”‚ +#options=('!emptydirs')
  24   β”‚ +source=('git+https://gitlab.com/LordTermor/msm-ng.git')
  25   β”‚ +sha256sums=('SKIP')
  26   β”‚  
  27   β”‚ -source=("git+https://gitlab.com/LordTermor/msm-ng.git")
  28   β”‚ -sha256sums=(SKIP)
  29   β”‚ -
  30   β”‚ -prepare() {
  31   β”‚ -  mkdir -p build
  32   β”‚ +pkgver() {
  33   β”‚ +  cd msm-ng
  34   β”‚ +  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  35   β”‚  }
  36   β”‚  
  37   β”‚  build() {
  38   β”‚ -  cd build
  39   β”‚ -  cmake -DCMAKE_INSTALL_PREFIX="/usr" ../msm-ng
  40   β”‚ -  make
  41   β”‚ +  cmake -B build -S msm-ng \
  42   β”‚ +    -DCMAKE_INSTALL_PREFIX=/usr
  43   β”‚ +  make -C build
  44   β”‚  }
  45   β”‚  
  46   β”‚  package_msm-ng-core-git() {
  47   β”‚    pkgdesc="Manjaro Settings - core library"
  48   β”‚ +  depends=('libsigc++' 'nlohmann-json' 'pamac-common' 'linux-driver-management')
  49   β”‚ +  provides=("${pkgname%-git}" 'libmsm.so=libmsm.so-64')
  50   β”‚ +  conflicts=("${pkgname%-git}")
  51   β”‚  
  52   β”‚ -  depends+=('pamac-common linux-driver-management')
  53   β”‚ -
  54   β”‚ -  cd build/libmsm
  55   β”‚ -  make DESTDIR="${pkgdir}" install
  56   β”‚ +  make -C build/libmsm DESTDIR="$pkgdir" install
  57   β”‚  }
  58   β”‚  package_msm-ng-qt-git() {
  59   β”‚    pkgdesc="Manjaro Settings - Qt GUI"
  60   β”‚ +  depends=('qt5-base>=5.15.0' 'qt5-quickcontrols2' 'qqc2-desktop-style'
  61   β”‚ +           'qt5-webengine' 'msm-ng-core-git')
  62   β”‚ +  provides=("${pkgname%-git}")
  63   β”‚ +  conflicts=("${pkgname%-git}")
  64   β”‚  
  65   β”‚ -  depends+=( 'qt5-base>=5.15.0' 'qt5-quickcontrols2' 'qqc2-desktop-style'  'qt5-w
       β”‚ ebengine' 'msm-ng-core-git')
  66   β”‚ -
  67   β”‚ -  cd build/msm-qt
  68   β”‚ -  make DESTDIR="${pkgdir}" install
  69   β”‚ +  make -C build/msm-qt DESTDIR="$pkgdir" install
  70   β”‚  }
  71   β”‚ +
  72   β”‚  package_msm-ng-gtk-git() {
  73   β”‚    pkgdesc="Manjaro Settings - GTK GUI"
  74   β”‚ -  depends+=('gtkmm3' 'msm-ng-core-git')
  75   β”‚ -
  76   β”‚ -  cd build/msm-gtk
  77   β”‚ -  make DESTDIR="${pkgdir}" install
  78   β”‚ -}
  79   β”‚ +  depends=('gtkmm3' 'msm-ng-core-git')
  80   β”‚ +  provides=("${pkgname%-git}")
  81   β”‚ +  conflicts=("${pkgname%-git}")
  82   β”‚  
  83   β”‚ -pkgver() {
  84   β”‚ -  cd msm-ng
  85   β”‚ -  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  86   β”‚ +  make -C build/msm-gtk DESTDIR="$pkgdir" install
  87   β”‚  }
───────┴───────────────────────────────────────────────────────────────────────────────────

The Qt version does not run as it can’t find pamac.conf. It should be using /etc/pamac.conf:

❯ MSM-ng-qt

** (process:1378242): WARNING **: 17:30:43.710: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.

** (process:1378242): WARNING **: 17:30:43.716: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.

** (process:1378242): WARNING **: 17:30:43.721: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.

** (process:1378242): WARNING **: 17:30:43.724: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.

** (process:1378242): WARNING **: 17:30:43.757: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.

** (process:1378242): WARNING **: 17:30:43.762: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.

** (process:1378242): WARNING **: 17:30:43.767: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.

** (process:1378242): WARNING **: 17:30:43.772: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.

** (process:1378242): WARNING **: 17:30:43.776: pamac_config.vala:267: File '/etc/msm/pamac.conf' doesn't exist.
terminate called after throwing an instance of 'nlohmann::detail::parse_error'
  what():  [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
zsh: abort (core dumped)  MSM-ng-qt

The GTK version installed no files. I’ll have to do a little more digging.

Current PKGBUILD (subject to change).

3 Likes
  • Cinnamon does not offer locale configuration. Now, I don’t know if you will take it into account, as it is not a official flavour of Manjaro (unlike XFCE, KDE or GNOME). I wonder if you can do that on XFCE.

  • Hopefully we will still have a module to configure user accounts that allows to configure groups. Many DEs does not offer to configure user accounts at all, and those that does offer that feature are very limited on that aspect (generally just able to create/delete users and set it as β€œadministrator” or not, but you can’t select groups individually).

  • In Date and Time, I like that it allowed you to enable/disable systemd-timesyncd and also configure if the OS has to consider the hardware clock as local time or UTC time. Although you could create a β€œMiscellaneous configurations” module where you could put various little tweaks like that. It could also include an option like β€œMute PC speaker” (which would add a β€œblacklist pcspkr” in /etc/modprobe.d) to deal with the few PCs that still have a PC speaker screeching loudly.

It looks pretty cute and promising.

3 Likes

It’s just a draft but yes I didn’t tested it in a clean chroot (both building and running) so I just forgot to add some things

Because it’s non functional for now and install directive needs to have resource creation in CMake first.

There is no base package for now so I just dropped it.

MSM will use separate pamac.conf from /etc/msm but it’s not the reason of crash. I forgot to put .json with language packages to install directive. Will fix it now.

Many thanks!

1 Like

The idea of this was not to show duplicated modules if they are present in default DE settings. They will be implemented and can used anywhere but later. So I’m open to ideas how to make it better. β€œMisc” module looks promising for example.

Indeed, this is what I understood. However, not all DE are created equally. XFCE does not offer to configure locale and user accounts (I have just check that right now) at all, unlike KDE or GNOME, for example. So even if you stick solely on official editions of Manjaro, you might have to create modules later on that will duplicate (partially or totally) functionalities because a DE doesn’t have the feature included.

Of course, you might prioritize some features than others right now. I am thinking more in long term.

2 Likes