mntray - Manjaro announcements tray app

Hi,

I've made a little tray-icon app which shows Manjaro announcements in a menu.
New articles will be shown as a desktop notification.

Clicking a news item from the menu will open your default browser and navigate to the appropriate forum post.

It's written in Go and uses the Qt framework/toolkit.
So you'd have to have qt5-base installed (which is already installed by default on the main editions).

You can find here: https://github.com/moson-mo/mntray

If you're interested, give it a try and let me know your thoughts.

Regards,
moson

30 Likes

Works well on gnome wayland with tray icons extension.

1 Like

Is there any option to hide the icon when there is no announcement ?

1 Like

Right now, no. But should be easy to implement. I'll have a look.
When all items have been read, the icon changes (instead of a red "n" it'll be white)

1 Like

Stefano Capitani wrote one too but it's always good to have alternatives :slight_smile:

3 Likes

New option "HideNoNews" has been added. You can set it to true in order to hide the tray icon when all news items have been marked as read...

3 Likes

Let me know if all is ok gìfor you i can package it :wink: . If unsìderstand correctly this show all from announce category right ?

2 Likes

Yes, by default it shows announcements from all categories, but it can be customized in the config file:

"Categories": [
		"Testing Updates",
		"Stable Updates",
		"Unstable Updates",
		"Announcements",
		"manjaro32"
	],

Thanks for your offer with the packaging. I would first let it mature a little bit before offering it as a package. I have a few things in mind to change/implement first. I'll come back to that then...

4 Likes

Ok.. When ready ping me and i package it with pleasure

6 Likes

Moved to #manjaro-development:projects since that's what it's for

I set it to true but it reverts back to false after restarting the program.

I whipped up a PKGBUILD for the binary:

mntray-bin
pkgname=mntray-bin
pkgver=0.1.3
pkgrel=1
pkgdesc="A Manjaro Linux announcements notification app"
arch=('x86_64')
url="https://github.com/moson-mo/mntray"
license=('MIT')
depends=('qt5-base')
provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}")
source=("$url/releases/download/$pkgver/${pkgname%-bin}-linux-x64-v$pkgver.tar.gz"
        "https://raw.githubusercontent.com/moson-mo/${pkgname%-bin}/master/LICENSE.md")
sha256sums=('317e4b2f0c19a5841be5720980d6b4fc9d8a774575baadeb632f8bb7803072df'
            '7464e5e1670895c267a2951820f166972dab35d6869d4fcf7c68668eccfdfeb6')

package() {
	install -Dm755 "${pkgname%-bin}" "$pkgdir/usr/bin/${pkgname%-bin}"
	install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/LICENSE.md"
}

There was a warning stripping the binary, but it doesn't seem to affect anything:

  -> Stripping unneeded symbols from binaries and libraries...
strip: error: the input file './usr/bin/mntray' has no sections

I'm working on a PKGBUILD that builds from source, but I hit a roadblock. I'll work on it more later.

3 Likes

if you need a tester I will offer myself to be a guinneypig

1 Like

Nice.

Did you change the file while it was running? Because it'll save settings on exit (which then overwrites the file with the current running settings)

Hmm, might be because I upx'ed the file. (which brings it from 6.7 to 2.6MB or so)

Yep, that was it. :grimacing:

Well, Mr. Guinea Pig, there's nothing to test yet as it fails to build.

@moson Here's the PKGBUILD and build log:

mntray
pkgname=mntray
pkgver=0.1.3
pkgrel=1
pkgdesc="A Manjaro Linux announcements notification app"
arch=('x86_64')
url="https://github.com/moson-mo/mntray"
license=('MIT')
depends=('qt5-base')
makedepends=('go-pie' 'dep')
source=("$pkgname-$pkgver.tar.gz::https://github.com/moson-mo/mntray/archive/$pkgver.tar.gz"
        "https://raw.githubusercontent.com/moson-mo/$pkgname/master/LICENSE.md")
sha256sums=('be039e4a202dfb907f928f87b34b71987e3acfc6de1326aa4b6af3f920dafe91'
            '7464e5e1670895c267a2951820f166972dab35d6869d4fcf7c68668eccfdfeb6')

prepare() {
	mkdir -p gopath/src/github.com/moson-mo
	ln -rTsf $pkgname-$pkgver gopath/src/github.com/moson-mo/$pkgname
	export GOPATH="$srcdir"/gopath
	
	go get -u -v github.com/therecipe/qt/cmd/...

	cd gopath/src/github.com/moson-mo/$pkgname
	dep init
	dep ensure
}

build() {
	export GOPATH="$srcdir"/gopath
	export QT_PKG_CONFIG=true
	
	cd gopath/src/github.com/moson-mo/$pkgname
	$GOPATH/bin/qtdeploy build desktop
}

package() {
	cd gopath/src/github.com/moson-mo/$pkgname
	install -Dm755 deploy/linux/$pkgname "$pkgdir/usr/bin/$pkgname"
	install -Dm644 "$srcdir/LICENSE.md" "$pkgdir/usr/share/licenses/LICENSE.md"
}
build log
==> Making package: mntray 0.1.3-1 (Thu 17 Oct 2019 12:31:53 PM MDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found mntray-0.1.3.tar.gz
  -> Found LICENSE.md
==> Validating source files with sha256sums...
    mntray-0.1.3.tar.gz ... Passed
    LICENSE.md ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting mntray-0.1.3.tar.gz with bsdtar
==> Starting prepare()...
github.com/therecipe/qt (download)
github.com/therecipe/env_linux_amd64_513 (download)
github.com/sirupsen/logrus (download)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
golang.org/x/sys (download)
get "golang.org/x/tools/imports": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/imports?go-get=1
get "golang.org/x/tools/imports": verifying non-authoritative meta tag
golang.org/x/tools (download)
get "golang.org/x/tools/internal/imports": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/internal/imports?go-get=1
get "golang.org/x/tools/internal/imports": verifying non-authoritative meta tag
get "golang.org/x/tools/go/ast/astutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/go/ast/astutil?go-get=1
get "golang.org/x/tools/go/ast/astutil": verifying non-authoritative meta tag
get "golang.org/x/tools/go/packages": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/go/packages?go-get=1
get "golang.org/x/tools/go/packages": verifying non-authoritative meta tag
get "golang.org/x/tools/go/gcexportdata": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/go/gcexportdata?go-get=1
get "golang.org/x/tools/go/gcexportdata": verifying non-authoritative meta tag
get "golang.org/x/tools/go/internal/gcimporter": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/go/internal/gcimporter?go-get=1
get "golang.org/x/tools/go/internal/gcimporter": verifying non-authoritative meta tag
get "golang.org/x/tools/go/internal/packagesdriver": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/go/internal/packagesdriver?go-get=1
get "golang.org/x/tools/go/internal/packagesdriver": verifying non-authoritative meta tag
get "golang.org/x/tools/internal/gopathwalk": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/internal/gopathwalk?go-get=1
get "golang.org/x/tools/internal/gopathwalk": verifying non-authoritative meta tag
get "golang.org/x/tools/internal/fastwalk": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/internal/fastwalk?go-get=1
get "golang.org/x/tools/internal/fastwalk": verifying non-authoritative meta tag
get "golang.org/x/tools/internal/semver": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/internal/semver?go-get=1
get "golang.org/x/tools/internal/semver": verifying non-authoritative meta tag
get "golang.org/x/tools/internal/span": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/internal/span?go-get=1
get "golang.org/x/tools/internal/span": verifying non-authoritative meta tag
get "golang.org/x/tools/internal/module": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/internal/module?go-get=1
get "golang.org/x/tools/internal/module": verifying non-authoritative meta tag
golang.org/x/tools/internal/span
golang.org/x/tools/go/packages
golang.org/x/tools/internal/imports
  Using master as constraint for direct dep github.com/therecipe/qt
  Locking in master (0491386) for direct dep github.com/therecipe/qt
  Locking in master (d3ddacd) for transitive dep github.com/gopherjs/gopherjs
==> Starting build()...
ERRO[0010] failed to run command                         _func=RunCmd cmd="go build -p 8 -v -ldflags=all=\"-s\" \"-w\" -trimpath -o /home/yochanan/Documents/pkgbuilds/mntray/src/gopath/src/github.com/moson-mo/mntray/deploy/linux/mntray -tags=minimal" dir=/home/yochanan/Documents/pkgbuilds/mntray/src/gopath/src/github.com/moson-mo/mntray env="XAUTHORITY=/run/user/1000/gdm/Xauthority SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 QT_PKG_CONFIG=true JOURNAL_STREAM=9:584847 GOPATH=/home/yochanan/Documents/pkgbuilds/mntray/src/gopath USERNAME=yochanan MANAGERPID=1410 TILIX_ID=1fe99f7b-5700-4ebf-92e6-155c0fae1792 LC_TIME=en_US.UTF-8 DIFFPROG=meld PWD=/home/yochanan/Documents/pkgbuilds/mntray/src/gopath/src/github.com/moson-mo/mntray DISPLAY=:1 MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins OLDPWD=/home/yochanan/Documents/pkgbuilds/mntray/src LC_ADDRESS=en_US.UTF-8 GJS_DEBUG_TOPICS=JS ERROR;JS LOG DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus SESSION_MANAGER=local/inspirognome:@/tmp/.ICE-unix/1537,unix/inspirognome:/tmp/.ICE-unix/1537 MAKEFLAGS=-j8 XDG_RUNTIME_DIR=/run/user/1000 GDMSESSION=gnome MAIL=/var/spool/mail/yochanan _=/home/yochanan/Documents/pkgbuilds/mntray/src/gopath/bin/qtdeploy CGO_LDFLAGS= CGO_ENABLED=1 LC_NAME=en_US.UTF-8 TEXTDOMAINDIR=/usr/share/locale DESKTOP_SESSION=gnome LC_MONETARY=en_US.UTF-8 XDG_SESSION_DESKTOP=gnome COMMAND_MODE=legacy LC_PAPER=en_US.UTF-8 COLORTERM=truecolor LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now VTE_VERSION=5800 INVOCATION_ID=a171db4aa4b14d538372fe424205020d USER=yochanan HOME=/home/yochanan LC_IDENTIFICATION=en_US.UTF-8 TERM=xterm-256color SUDO_EDITOR=gedit GO111MODULE=off GOARCH=amd64 SHELL=/bin/bash CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fdiagnostics-color=always GDK_BACKEND=x11 XDG_MENU_PREFIX=gnome- PKGFILE_PROMPT_INSTALL_MISSING=1 WINDOWPATH=2 CPPFLAGS=-D_FORTIFY_SOURCE=2 XDG_SESSION_CLASS=user VISUAL=gedit LC_NUMERIC=en_US.UTF-8 XDG_CURRENT_DESKTOP=GNOME SHLVL=2 LC_MEASUREMENT=en_US.UTF-8 CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fdiagnostics-color=always GOROOT=/usr/lib/go LOGNAME=yochanan QT_QPA_PLATFORMTHEME=qt5ct TEXTDOMAIN=pacman-scripts EDITOR=gedit LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh GDM_LANG=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 GOOS=linux PATH=/home/yochanan/.local/bin:/usr/sbin:/sbin:/bin:/usr/games:/home/yochanan/bin:/home/yochanan/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl SOURCE_DATE_EPOCH=1571337113 XDG_SESSION_TYPE=x11 LANG=en_US.UTF-8 GJS_DEBUG_OUTPUT=stderr CHOST=x86_64-pc-linux-gnu" error="exit status 1" name="build for linux on linux"
tray/moc.go:15:2: build constraints exclude all Go files in /home/yochanan/Documents/pkgbuilds/mntray/src/gopath/src/github.com/moson-mo/mntray/vendor/github.com/therecipe/qt/core
tray/moc.go:16:2: build constraints exclude all Go files in /home/yochanan/Documents/pkgbuilds/mntray/src/gopath/src/github.com/moson-mo/mntray/vendor/github.com/therecipe/qt/gui
tray/moc.go:17:2: build constraints exclude all Go files in /home/yochanan/Documents/pkgbuilds/mntray/src/gopath/src/github.com/moson-mo/mntray/vendor/github.com/therecipe/qt/widgets

==> ERROR: A failure occurred in build().
    Aborting...
1 Like

Awesome job, @moson !! :partying_face:

2 Likes

Nicely done!
While i enjoy seeing the Manjaro logo, i find it a bit too much in some situations, when visually has the same size as the one used in Menu and Manjaro Settings Manager, plus it doesn't quite fit with the rest of the tray icons.

My proposal (probably will look off on a white forum theme):

m64

m64n

10 Likes

Thanks, I'm not really the a "design" guy :slight_smile:
But I'm open for proposals for sure. Maybe @SGS wants to contribute with some of his magic too :wink:

When I find the time I'll have a look. Not too familiar with pkgbuilds I must say.
Also the library which is used (qt bindings) is quite tricky in that regard it seems (and huge it seems :open_mouth:)

1 Like

I couldn't have done it better ( :wink: ),
very well also the transparent part which adapts to every topic/theme.

Very well done, as always, bogdan :slight_smile:

Inspired by @bogdancovaciu and @moson

mntray-logo-sgs

mntray-02-logo-sgs

mntray-03-logo-sgs

8 Likes

Forum kindly sponsored by